You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

838 lines
1.7 MiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

var mL=Object.defineProperty;var vL=(e,t,n)=>t in e?mL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var zS=(e,t,n)=>(vL(e,typeof t!="symbol"?t+"":t,n),n);function xP(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const l=Object.getOwnPropertyDescriptor(r,i);l&&Object.defineProperty(e,i,l.get?l:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerpolicy&&(l.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?l.credentials="include":i.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();var Us=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Iw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},ir={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Fp=Symbol.for("react.element"),gL=Symbol.for("react.portal"),yL=Symbol.for("react.fragment"),xL=Symbol.for("react.strict_mode"),_L=Symbol.for("react.profiler"),bL=Symbol.for("react.provider"),wL=Symbol.for("react.context"),CL=Symbol.for("react.forward_ref"),SL=Symbol.for("react.suspense"),EL=Symbol.for("react.memo"),kL=Symbol.for("react.lazy"),FS=Symbol.iterator;function TL(e){return e===null||typeof e!="object"?null:(e=FS&&e[FS]||e["@@iterator"],typeof e=="function"?e:null)}var _P={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},bP=Object.assign,wP={};function nf(e,t,n){this.props=e,this.context=t,this.refs=wP,this.updater=n||_P}nf.prototype.isReactComponent={};nf.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};nf.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function CP(){}CP.prototype=nf.prototype;function Mw(e,t,n){this.props=e,this.context=t,this.refs=wP,this.updater=n||_P}var Rw=Mw.prototype=new CP;Rw.constructor=Mw;bP(Rw,nf.prototype);Rw.isPureReactComponent=!0;var $S=Array.isArray,SP=Object.prototype.hasOwnProperty,Aw={current:null},EP={key:!0,ref:!0,__self:!0,__source:!0};function kP(e,t,n){var r,i={},l=null,c=null;if(t!=null)for(r in t.ref!==void 0&&(c=t.ref),t.key!==void 0&&(l=""+t.key),t)SP.call(t,r)&&!EP.hasOwnProperty(r)&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var h=Array(o),p=0;p<o;p++)h[p]=arguments[p+2];i.children=h}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return{$$typeof:Fp,type:e,key:l,ref:c,props:i,_owner:Aw.current}}function PL(e,t){return{$$typeof:Fp,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ow(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fp}function IL(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var BS=/\/+/g;function gx(e,t){return typeof e=="object"&&e!==null&&e.key!=null?IL(""+e.key):t.toString(36)}function lg(e,t,n,r,i){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var c=!1;if(e===null)c=!0;else switch(l){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case Fp:case gL:c=!0}}if(c)return c=e,i=i(c),e=r===""?"."+gx(c,0):r,$S(i)?(n="",e!=null&&(n=e.replace(BS,"$&/")+"/"),lg(i,t,n,"",function(p){return p})):i!=null&&(Ow(i)&&(i=PL(i,n+(!i.key||c&&c.key===i.key?"":(""+i.key).replace(BS,"$&/")+"/")+e)),t.push(i)),1;if(c=0,r=r===""?".":r+":",$S(e))for(var o=0;o<e.length;o++){l=e[o];var h=r+gx(l,o);c+=lg(l,t,n,h,i)}else if(h=TL(e),typeof h=="function")for(e=h.call(e),o=0;!(l=e.next()).done;)l=l.value,h=r+gx(l,o++),c+=lg(l,t,n,h,i);else if(l==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return c}function xv(e,t,n){if(e==null)return e;var r=[],i=0;return lg(e,r,"","",function(l){return t.call(n,l,i++)}),r}function ML(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Co={current:null},ug={transition:null},RL={ReactCurrentDispatcher:Co,ReactCurrentBatchConfig:ug,ReactCurrentOwner:Aw};ir.Children={map:xv,forEach:function(e,t,n){xv(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return xv(e,function(){t++}),t},toArray:function(e){return xv(e,function(t){return t})||[]},only:function(e){if(!Ow(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ir.Component=nf;ir.Fragment=yL;ir.Profiler=_L;ir.PureComponent=Mw;ir.StrictMode=xL;ir.Suspense=SL;ir.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=RL;ir.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=bP({},e.props),i=e.key,l=e.ref,c=e._owner;if(t!=null){if(t.ref!==void 0&&(l=t.ref,c=Aw.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(h in t)SP.call(t,h)&&!EP.hasOwnProperty(h)&&(r[h]=t[h]===void 0&&o!==void 0?o[h]:t[h])}var h=arguments.length-2;if(h===1)r.children=n;else if(1<h){o=Array(h);for(var p=0;p<h;p++)o[p]=arguments[p+2];r.children=o}return{$$typeof:Fp,type:e.type,key:i,ref:l,props:r,_owner:c}};ir.createContext=function(e){return e={$$typeof:wL,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:bL,_context:e},e.Consumer=e};ir.createElement=kP;ir.createFactory=function(e){var t=kP.bind(null,e);return t.type=e,t};ir.createRef=function(){return{current:null}};ir.forwardRef=function(e){return{$$typeof:CL,render:e}};ir.isValidElement=Ow;ir.lazy=function(e){return{$$typeof:kL,_payload:{_status:-1,_result:e},_init:ML}};ir.memo=function(e,t){return{$$typeof:EL,type:e,compare:t===void 0?null:t}};ir.startTransition=function(e){var t=ug.transition;ug.transition={};try{e()}finally{ug.transition=t}};ir.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};ir.useCallback=function(e,t){return Co.current.useCallback(e,t)};ir.useContext=function(e){return Co.current.useContext(e)};ir.useDebugValue=function(){};ir.useDeferredValue=function(e){return Co.current.useDeferredValue(e)};ir.useEffect=function(e,t){return Co.current.useEffect(e,t)};ir.useId=function(){return Co.current.useId()};ir.useImperativeHandle=function(e,t,n){return Co.current.useImperativeHandle(e,t,n)};ir.useInsertionEffect=function(e,t){return Co.current.useInsertionEffect(e,t)};ir.useLayoutEffect=function(e,t){return Co.current.useLayoutEffect(e,t)};ir.useMemo=function(e,t){return Co.current.useMemo(e,t)};ir.useReducer=function(e,t,n){return Co.current.useReducer(e,t,n)};ir.useRef=function(e){return Co.current.useRef(e)};ir.useState=function(e){return Co.current.useState(e)};ir.useSyncExternalStore=function(e,t,n){return Co.current.useSyncExternalStore(e,t,n)};ir.useTransition=function(){return Co.current.useTransition()};ir.version="18.2.0";(function(e){e.exports=ir})(C);const tr=Iw(C.exports),Dg=xP({__proto__:null,default:tr},[C.exports]);var X_={},uu={exports:{}},ea={},TP={exports:{}},PP={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(oe,ye){var Re=oe.length;oe.push(ye);e:for(;0<Re;){var Te=Re-1>>>1,ke=oe[Te];if(0<i(ke,ye))oe[Te]=ye,oe[Re]=ke,Re=Te;else break e}}function n(oe){return oe.length===0?null:oe[0]}function r(oe){if(oe.length===0)return null;var ye=oe[0],Re=oe.pop();if(Re!==ye){oe[0]=Re;e:for(var Te=0,ke=oe.length,De=ke>>>1;Te<De;){var Me=2*(Te+1)-1,Ne=oe[Me],Le=Me+1,Ve=oe[Le];if(0>i(Ne,Re))Le<ke&&0>i(Ve,Ne)?(oe[Te]=Ve,oe[Le]=Re,Te=Le):(oe[Te]=Ne,oe[Me]=Re,Te=Me);else if(Le<ke&&0>i(Ve,Re))oe[Te]=Ve,oe[Le]=Re,Te=Le;else break e}}return ye}function i(oe,ye){var Re=oe.sortIndex-ye.sortIndex;return Re!==0?Re:oe.id-ye.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,o=c.now();e.unstable_now=function(){return c.now()-o}}var h=[],p=[],g=1,b=null,w=3,P=!1,I=!1,A=!1,O=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function N(oe){for(var ye=n(p);ye!==null;){if(ye.callback===null)r(p);else if(ye.startTime<=oe)r(p),ye.sortIndex=ye.expirationTime,t(h,ye);else break;ye=n(p)}}function z(oe){if(A=!1,N(oe),!I)if(n(h)!==null)I=!0,re(B);else{var ye=n(p);ye!==null&&de(z,ye.startTime-oe)}}function B(oe,ye){I=!1,A&&(A=!1,M(H),H=-1),P=!0;var Re=w;try{for(N(ye),b=n(h);b!==null&&(!(b.expirationTime>ye)||oe&&!le());){var Te=b.callback;if(typeof Te=="function"){b.callback=null,w=b.priorityLevel;var ke=Te(b.expirationTime<=ye);ye=e.unstable_now(),typeof ke=="function"?b.callback=ke:b===n(h)&&r(h),N(ye)}else r(h);b=n(h)}if(b!==null)var De=!0;else{var Me=n(p);Me!==null&&de(z,Me.startTime-ye),De=!1}return De}finally{b=null,w=Re,P=!1}}var U=!1,q=null,H=-1,te=5,Y=-1;function le(){return!(e.unstable_now()-Y<te)}function J(){if(q!==null){var oe=e.unstable_now();Y=oe;var ye=!0;try{ye=q(!0,oe)}finally{ye?Z():(U=!1,q=null)}}else U=!1}var Z;if(typeof R=="function")Z=function(){R(J)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,ge=Q.port2;Q.port1.onmessage=J,Z=function(){ge.postMessage(null)}}else Z=function(){O(J,0)};function re(oe){q=oe,U||(U=!0,Z())}function de(oe,ye){H=O(function(){oe(e.unstable_now())},ye)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(oe){oe.callback=null},e.unstable_continueExecution=function(){I||P||(I=!0,re(B))},e.unstable_forceFrameRate=function(oe){0>oe||125<oe?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):te=0<oe?Math.floor(1e3/oe):5},e.unstable_getCurrentPriorityLevel=function(){return w},e.unstable_getFirstCallbackNode=function(){return n(h)},e.unstable_next=function(oe){switch(w){case 1:case 2:case 3:var ye=3;break;default:ye=w}var Re=w;w=ye;try{return oe()}finally{w=Re}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(oe,ye){switch(oe){case 1:case 2:case 3:case 4:case 5:break;default:oe=3}var Re=w;w=oe;try{return ye()}finally{w=Re}},e.unstable_scheduleCallback=function(oe,ye,Re){var Te=e.unstable_now();switch(typeof Re=="object"&&Re!==null?(Re=Re.delay,Re=typeof Re=="number"&&0<Re?Te+Re:Te):Re=Te,oe){case 1:var ke=-1;break;case 2:ke=250;break;case 5:ke=1073741823;break;case 4:ke=1e4;break;default:ke=5e3}return ke=Re+ke,oe={id:g++,callback:ye,priorityLevel:oe,startTime:Re,expirationTime:ke,sortIndex:-1},Re>Te?(oe.sortIndex=Re,t(p,oe),n(h)===null&&oe===n(p)&&(A?(M(H),H=-1):A=!0,de(z,Re-Te))):(oe.sortIndex=ke,t(h,oe),I||P||(I=!0,re(B))),oe},e.unstable_shouldYield=le,e.unstable_wrapCallback=function(oe){var ye=w;return function(){var Re=w;w=ye;try{return oe.apply(this,arguments)}finally{w=Re}}}})(PP);(function(e){e.exports=PP})(TP);/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var IP=C.exports,Xo=TP.exports;function Kt(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var MP=new Set,lp={};function wc(e,t){$d(e,t),$d(e+"Capture",t)}function $d(e,t){for(lp[e]=t,e=0;e<t.length;e++)MP.add(t[e])}var Zs=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Y_=Object.prototype.hasOwnProperty,AL=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,VS={},US={};function OL(e){return Y_.call(US,e)?!0:Y_.call(VS,e)?!1:AL.test(e)?US[e]=!0:(VS[e]=!0,!1)}function NL(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function DL(e,t,n,r){if(t===null||typeof t>"u"||NL(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function So(e,t,n,r,i,l,c){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=c}var Zi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Zi[e]=new So(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Zi[t]=new So(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Zi[e]=new So(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Zi[e]=new So(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Zi[e]=new So(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Zi[e]=new So(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Zi[e]=new So(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Zi[e]=new So(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Zi[e]=new So(e,5,!1,e.toLowerCase(),null,!1,!1)});var Nw=/[\-:]([a-z])/g;function Dw(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Nw,Dw);Zi[t]=new So(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Nw,Dw);Zi[t]=new So(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Nw,Dw);Zi[t]=new So(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Zi[e]=new So(e,1,!1,e.toLowerCase(),null,!1,!1)});Zi.xlinkHref=new So("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Zi[e]=new So(e,1,!1,e.toLowerCase(),null,!0,!0)});function Lw(e,t,n,r){var i=Zi.hasOwnProperty(t)?Zi[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(DL(t,n,i,r)&&(n=null),r||i===null?OL(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var il=IP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_v=Symbol.for("react.element"),pd=Symbol.for("react.portal"),md=Symbol.for("react.fragment"),zw=Symbol.for("react.strict_mode"),Q_=Symbol.for("react.profiler"),RP=Symbol.for("react.provider"),AP=Symbol.for("react.context"),Fw=Symbol.for("react.forward_ref"),J_=Symbol.for("react.suspense"),eb=Symbol.for("react.suspense_list"),$w=Symbol.for("react.memo"),Al=Symbol.for("react.lazy"),OP=Symbol.for("react.offscreen"),jS=Symbol.iterator;function gh(e){return e===null||typeof e!="object"?null:(e=jS&&e[jS]||e["@@iterator"],typeof e=="function"?e:null)}var ti=Object.assign,yx;function Nh(e){if(yx===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);yx=t&&t[1]||""}return`
`+yx+e}var xx=!1;function _x(e,t){if(!e||xx)return"";xx=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(p){var r=p}Reflect.construct(e,[],t)}else{try{t.call()}catch(p){r=p}e.call(t.prototype)}else{try{throw Error()}catch(p){r=p}e()}}catch(p){if(p&&r&&typeof p.stack=="string"){for(var i=p.stack.split(`
`),l=r.stack.split(`
`),c=i.length-1,o=l.length-1;1<=c&&0<=o&&i[c]!==l[o];)o--;for(;1<=c&&0<=o;c--,o--)if(i[c]!==l[o]){if(c!==1||o!==1)do if(c--,o--,0>o||i[c]!==l[o]){var h=`
`+i[c].replace(" at new "," at ");return e.displayName&&h.includes("<anonymous>")&&(h=h.replace("<anonymous>",e.displayName)),h}while(1<=c&&0<=o);break}}}finally{xx=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Nh(e):""}function LL(e){switch(e.tag){case 5:return Nh(e.type);case 16:return Nh("Lazy");case 13:return Nh("Suspense");case 19:return Nh("SuspenseList");case 0:case 2:case 15:return e=_x(e.type,!1),e;case 11:return e=_x(e.type.render,!1),e;case 1:return e=_x(e.type,!0),e;default:return""}}function tb(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 md:return"Fragment";case pd:return"Portal";case Q_:return"Profiler";case zw:return"StrictMode";case J_:return"Suspense";case eb:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case AP:return(e.displayName||"Context")+".Consumer";case RP:return(e._context.displayName||"Context")+".Provider";case Fw:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $w:return t=e.displayName||null,t!==null?t:tb(e.type)||"Memo";case Al:t=e._payload,e=e._init;try{return tb(e(t))}catch{}}return null}function zL(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 tb(t);case 8:return t===zw?"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 ru(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function NP(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function FL(e){var t=NP(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 i=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(c){r=""+c,l.call(this,c)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(c){r=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function bv(e){e._valueTracker||(e._valueTracker=FL(e))}function DP(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=NP(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Lg(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 nb(e,t){var n=t.checked;return ti({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function KS(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ru(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 LP(e,t){t=t.checked,t!=null&&Lw(e,"checked",t,!1)}function rb(e,t){LP(e,t);var n=ru(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")?ib(e,t.type,n):t.hasOwnProperty("defaultValue")&&ib(e,t.type,ru(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function HS(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 ib(e,t,n){(t!=="number"||Lg(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Dh=Array.isArray;function Md(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ru(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function ob(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Kt(91));return ti({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function WS(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Kt(92));if(Dh(n)){if(1<n.length)throw Error(Kt(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ru(n)}}function zP(e,t){var n=ru(t.value),r=ru(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function GS(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function FP(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ab(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?FP(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var wv,$P=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(wv=wv||document.createElement("div"),wv.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=wv.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function up(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var jh={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},$L=["Webkit","ms","Moz","O"];Object.keys(jh).forEach(function(e){$L.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),jh[t]=jh[e]})});function BP(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||jh.hasOwnProperty(e)&&jh[e]?(""+t).trim():t+"px"}function VP(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=BP(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var BL=ti({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 sb(e,t){if(t){if(BL[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Kt(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Kt(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Kt(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Kt(62))}}function lb(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 ub=null;function Bw(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var cb=null,Rd=null,Ad=null;function qS(e){if(e=Vp(e)){if(typeof cb!="function")throw Error(Kt(280));var t=e.stateNode;t&&(t=qy(t),cb(e.stateNode,e.type,t))}}function UP(e){Rd?Ad?Ad.push(e):Ad=[e]:Rd=e}function jP(){if(Rd){var e=Rd,t=Ad;if(Ad=Rd=null,qS(e),t)for(e=0;e<t.length;e++)qS(t[e])}}function KP(e,t){return e(t)}function HP(){}var bx=!1;function WP(e,t,n){if(bx)return e(t,n);bx=!0;try{return KP(e,t,n)}finally{bx=!1,(Rd!==null||Ad!==null)&&(HP(),jP())}}function cp(e,t){var n=e.stateNode;if(n===null)return null;var r=qy(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Kt(231,t,typeof n));return n}var db=!1;if(Zs)try{var yh={};Object.defineProperty(yh,"passive",{get:function(){db=!0}}),window.addEventListener("test",yh,yh),window.removeEventListener("test",yh,yh)}catch{db=!1}function VL(e,t,n,r,i,l,c,o,h){var p=Array.prototype.slice.call(arguments,3);try{t.apply(n,p)}catch(g){this.onError(g)}}var Kh=!1,zg=null,Fg=!1,fb=null,UL={onError:function(e){Kh=!0,zg=e}};function jL(e,t,n,r,i,l,c,o,h){Kh=!1,zg=null,VL.apply(UL,arguments)}function KL(e,t,n,r,i,l,c,o,h){if(jL.apply(this,arguments),Kh){if(Kh){var p=zg;Kh=!1,zg=null}else throw Error(Kt(198));Fg||(Fg=!0,fb=p)}}function Cc(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function GP(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ZS(e){if(Cc(e)!==e)throw Error(Kt(188))}function HL(e){var t=e.alternate;if(!t){if(t=Cc(e),t===null)throw Error(Kt(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var l=i.alternate;if(l===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===l.child){for(l=i.child;l;){if(l===n)return ZS(i),e;if(l===r)return ZS(i),t;l=l.sibling}throw Error(Kt(188))}if(n.return!==r.return)n=i,r=l;else{for(var c=!1,o=i.child;o;){if(o===n){c=!0,n=i,r=l;break}if(o===r){c=!0,r=i,n=l;break}o=o.sibling}if(!c){for(o=l.child;o;){if(o===n){c=!0,n=l,r=i;break}if(o===r){c=!0,r=l,n=i;break}o=o.sibling}if(!c)throw Error(Kt(189))}}if(n.alternate!==r)throw Error(Kt(190))}if(n.tag!==3)throw Error(Kt(188));return n.stateNode.current===n?e:t}function qP(e){return e=HL(e),e!==null?ZP(e):null}function ZP(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ZP(e);if(t!==null)return t;e=e.sibling}return null}var XP=Xo.unstable_scheduleCallback,XS=Xo.unstable_cancelCallback,WL=Xo.unstable_shouldYield,GL=Xo.unstable_requestPaint,pi=Xo.unstable_now,qL=Xo.unstable_getCurrentPriorityLevel,Vw=Xo.unstable_ImmediatePriority,YP=Xo.unstable_UserBlockingPriority,$g=Xo.unstable_NormalPriority,ZL=Xo.unstable_LowPriority,QP=Xo.unstable_IdlePriority,Ky=null,cs=null;function XL(e){if(cs&&typeof cs.onCommitFiberRoot=="function")try{cs.onCommitFiberRoot(Ky,e,void 0,(e.current.flags&128)===128)}catch{}}var ja=Math.clz32?Math.clz32:JL,YL=Math.log,QL=Math.LN2;function JL(e){return e>>>=0,e===0?32:31-(YL(e)/QL|0)|0}var Cv=64,Sv=4194304;function Lh(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 Bg(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,l=e.pingedLanes,c=n&268435455;if(c!==0){var o=c&~i;o!==0?r=Lh(o):(l&=c,l!==0&&(r=Lh(l)))}else c=n&~i,c!==0?r=Lh(c):l!==0&&(r=Lh(l));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,l=t&-t,i>=l||i===16&&(l&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-ja(t),i=1<<n,r|=e[n],t&=~i;return r}function ez(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function tz(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,l=e.pendingLanes;0<l;){var c=31-ja(l),o=1<<c,h=i[c];h===-1?((o&n)===0||(o&r)!==0)&&(i[c]=ez(o,t)):h<=t&&(e.expiredLanes|=o),l&=~o}}function hb(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function JP(){var e=Cv;return Cv<<=1,(Cv&4194240)===0&&(Cv=64),e}function wx(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function $p(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ja(t),e[t]=n}function nz(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<n;){var i=31-ja(n),l=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~l}}function Uw(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ja(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Cr=0;function e8(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var t8,jw,n8,r8,i8,pb=!1,Ev=[],Hl=null,Wl=null,Gl=null,dp=new Map,fp=new Map,Dl=[],rz="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function YS(e,t){switch(e){case"focusin":case"focusout":Hl=null;break;case"dragenter":case"dragleave":Wl=null;break;case"mouseover":case"mouseout":Gl=null;break;case"pointerover":case"pointerout":dp.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":fp.delete(t.pointerId)}}function xh(e,t,n,r,i,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:l,targetContainers:[i]},t!==null&&(t=Vp(t),t!==null&&jw(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function iz(e,t,n,r,i){switch(t){case"focusin":return Hl=xh(Hl,e,t,n,r,i),!0;case"dragenter":return Wl=xh(Wl,e,t,n,r,i),!0;case"mouseover":return Gl=xh(Gl,e,t,n,r,i),!0;case"pointerover":var l=i.pointerId;return dp.set(l,xh(dp.get(l)||null,e,t,n,r,i)),!0;case"gotpointercapture":return l=i.pointerId,fp.set(l,xh(fp.get(l)||null,e,t,n,r,i)),!0}return!1}function o8(e){var t=ec(e.target);if(t!==null){var n=Cc(t);if(n!==null){if(t=n.tag,t===13){if(t=GP(n),t!==null){e.blockedOn=t,i8(e.priority,function(){n8(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function cg(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=mb(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ub=r,n.target.dispatchEvent(r),ub=null}else return t=Vp(n),t!==null&&jw(t),e.blockedOn=n,!1;t.shift()}return!0}function QS(e,t,n){cg(e)&&n.delete(t)}function oz(){pb=!1,Hl!==null&&cg(Hl)&&(Hl=null),Wl!==null&&cg(Wl)&&(Wl=null),Gl!==null&&cg(Gl)&&(Gl=null),dp.forEach(QS),fp.forEach(QS)}function _h(e,t){e.blockedOn===t&&(e.blockedOn=null,pb||(pb=!0,Xo.unstable_scheduleCallback(Xo.unstable_NormalPriority,oz)))}function hp(e){function t(i){return _h(i,e)}if(0<Ev.length){_h(Ev[0],e);for(var n=1;n<Ev.length;n++){var r=Ev[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Hl!==null&&_h(Hl,e),Wl!==null&&_h(Wl,e),Gl!==null&&_h(Gl,e),dp.forEach(t),fp.forEach(t),n=0;n<Dl.length;n++)r=Dl[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Dl.length&&(n=Dl[0],n.blockedOn===null);)o8(n),n.blockedOn===null&&Dl.shift()}var Od=il.ReactCurrentBatchConfig,Vg=!0;function az(e,t,n,r){var i=Cr,l=Od.transition;Od.transition=null;try{Cr=1,Kw(e,t,n,r)}finally{Cr=i,Od.transition=l}}function sz(e,t,n,r){var i=Cr,l=Od.transition;Od.transition=null;try{Cr=4,Kw(e,t,n,r)}finally{Cr=i,Od.transition=l}}function Kw(e,t,n,r){if(Vg){var i=mb(e,t,n,r);if(i===null)Ax(e,t,r,Ug,n),YS(e,r);else if(iz(i,e,t,n,r))r.stopPropagation();else if(YS(e,r),t&4&&-1<rz.indexOf(e)){for(;i!==null;){var l=Vp(i);if(l!==null&&t8(l),l=mb(e,t,n,r),l===null&&Ax(e,t,r,Ug,n),l===i)break;i=l}i!==null&&r.stopPropagation()}else Ax(e,t,r,null,n)}}var Ug=null;function mb(e,t,n,r){if(Ug=null,e=Bw(r),e=ec(e),e!==null)if(t=Cc(e),t===null)e=null;else if(n=t.tag,n===13){if(e=GP(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ug=e,null}function a8(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(qL()){case Vw:return 1;case YP:return 4;case $g:case ZL:return 16;case QP:return 536870912;default:return 16}default:return 16}}var zl=null,Hw=null,dg=null;function s8(){if(dg)return dg;var e,t=Hw,n=t.length,r,i="value"in zl?zl.value:zl.textContent,l=i.length;for(e=0;e<n&&t[e]===i[e];e++);var c=n-e;for(r=1;r<=c&&t[n-r]===i[l-r];r++);return dg=i.slice(e,1<r?1-r:void 0)}function fg(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function kv(){return!0}function JS(){return!1}function ta(e){function t(n,r,i,l,c){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=l,this.target=c,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(l):l[o]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?kv:JS,this.isPropagationStopped=JS,this}return ti(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=kv)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=kv)},persist:function(){},isPersistent:kv}),t}var rf={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ww=ta(rf),Bp=ti({},rf,{view:0,detail:0}),lz=ta(Bp),Cx,Sx,bh,Hy=ti({},Bp,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gw,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==bh&&(bh&&e.type==="mousemove"?(Cx=e.screenX-bh.screenX,Sx=e.screenY-bh.screenY):Sx=Cx=0,bh=e),Cx)},movementY:function(e){return"movementY"in e?e.movementY:Sx}}),eE=ta(Hy),uz=ti({},Hy,{dataTransfer:0}),cz=ta(uz),dz=ti({},Bp,{relatedTarget:0}),Ex=ta(dz),fz=ti({},rf,{animationName:0,elapsedTime:0,pseudoElement:0}),hz=ta(fz),pz=ti({},rf,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),mz=ta(pz),vz=ti({},rf,{data:0}),tE=ta(vz),gz={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yz={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},xz={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _z(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=xz[e])?!!t[e]:!1}function Gw(){return _z}var bz=ti({},Bp,{key:function(e){if(e.key){var t=gz[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=fg(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?yz[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gw,charCode:function(e){return e.type==="keypress"?fg(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?fg(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),wz=ta(bz),Cz=ti({},Hy,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),nE=ta(Cz),Sz=ti({},Bp,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gw}),Ez=ta(Sz),kz=ti({},rf,{propertyName:0,elapsedTime:0,pseudoElement:0}),Tz=ta(kz),Pz=ti({},Hy,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Iz=ta(Pz),Mz=[9,13,27,32],qw=Zs&&"CompositionEvent"in window,Hh=null;Zs&&"documentMode"in document&&(Hh=document.documentMode);var Rz=Zs&&"TextEvent"in window&&!Hh,l8=Zs&&(!qw||Hh&&8<Hh&&11>=Hh),rE=String.fromCharCode(32),iE=!1;function u8(e,t){switch(e){case"keyup":return Mz.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function c8(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var vd=!1;function Az(e,t){switch(e){case"compositionend":return c8(t);case"keypress":return t.which!==32?null:(iE=!0,rE);case"textInput":return e=t.data,e===rE&&iE?null:e;default:return null}}function Oz(e,t){if(vd)return e==="compositionend"||!qw&&u8(e,t)?(e=s8(),dg=Hw=zl=null,vd=!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.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return l8&&t.locale!=="ko"?null:t.data;default:return null}}var Nz={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function oE(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Nz[e.type]:t==="textarea"}function d8(e,t,n,r){UP(r),t=jg(t,"onChange"),0<t.length&&(n=new Ww("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Wh=null,pp=null;function Dz(e){w8(e,0)}function Wy(e){var t=xd(e);if(DP(t))return e}function Lz(e,t){if(e==="change")return t}var f8=!1;if(Zs){var kx;if(Zs){var Tx="oninput"in document;if(!Tx){var aE=document.createElement("div");aE.setAttribute("oninput","return;"),Tx=typeof aE.oninput=="function"}kx=Tx}else kx=!1;f8=kx&&(!document.documentMode||9<document.documentMode)}function sE(){Wh&&(Wh.detachEvent("onpropertychange",h8),pp=Wh=null)}function h8(e){if(e.propertyName==="value"&&Wy(pp)){var t=[];d8(t,pp,e,Bw(e)),WP(Dz,t)}}function zz(e,t,n){e==="focusin"?(sE(),Wh=t,pp=n,Wh.attachEvent("onpropertychange",h8)):e==="focusout"&&sE()}function Fz(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Wy(pp)}function $z(e,t){if(e==="click")return Wy(t)}function Bz(e,t){if(e==="input"||e==="change")return Wy(t)}function Vz(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ha=typeof Object.is=="function"?Object.is:Vz;function mp(e,t){if(Ha(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Y_.call(t,i)||!Ha(e[i],t[i]))return!1}return!0}function lE(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function uE(e,t){var n=lE(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=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=lE(n)}}function p8(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?p8(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function m8(){for(var e=window,t=Lg();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lg(e.document)}return t}function Zw(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 Uz(e){var t=m8(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&p8(n.ownerDocument.documentElement,n)){if(r!==null&&Zw(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 i=n.textContent.length,l=Math.min(r.start,i);r=r.end===void 0?l:Math.min(r.end,i),!e.extend&&l>r&&(i=r,r=l,l=i),i=uE(n,l);var c=uE(n,r);i&&c&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==c.node||e.focusOffset!==c.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(c.node,c.offset)):(t.setEnd(c.node,c.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<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var jz=Zs&&"documentMode"in document&&11>=document.documentMode,gd=null,vb=null,Gh=null,gb=!1;function cE(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;gb||gd==null||gd!==Lg(r)||(r=gd,"selectionStart"in r&&Zw(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}),Gh&&mp(Gh,r)||(Gh=r,r=jg(vb,"onSelect"),0<r.length&&(t=new Ww("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gd)))}function Tv(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var yd={animationend:Tv("Animation","AnimationEnd"),animationiteration:Tv("Animation","AnimationIteration"),animationstart:Tv("Animation","AnimationStart"),transitionend:Tv("Transition","TransitionEnd")},Px={},v8={};Zs&&(v8=document.createElement("div").style,"AnimationEvent"in window||(delete yd.animationend.animation,delete yd.animationiteration.animation,delete yd.animationstart.animation),"TransitionEvent"in window||delete yd.transitionend.transition);function Gy(e){if(Px[e])return Px[e];if(!yd[e])return e;var t=yd[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in v8)return Px[e]=t[n];return e}var g8=Gy("animationend"),y8=Gy("animationiteration"),x8=Gy("animationstart"),_8=Gy("transitionend"),b8=new Map,dE="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function cu(e,t){b8.set(e,t),wc(t,[e])}for(var Ix=0;Ix<dE.length;Ix++){var Mx=dE[Ix],Kz=Mx.toLowerCase(),Hz=Mx[0].toUpperCase()+Mx.slice(1);cu(Kz,"on"+Hz)}cu(g8,"onAnimationEnd");cu(y8,"onAnimationIteration");cu(x8,"onAnimationStart");cu("dblclick","onDoubleClick");cu("focusin","onFocus");cu("focusout","onBlur");cu(_8,"onTransitionEnd");$d("onMouseEnter",["mouseout","mouseover"]);$d("onMouseLeave",["mouseout","mouseover"]);$d("onPointerEnter",["pointerout","pointerover"]);$d("onPointerLeave",["pointerout","pointerover"]);wc("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));wc("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));wc("onBeforeInput",["compositionend","keypress","textInput","paste"]);wc("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));wc("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));wc("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zh="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Wz=new Set("cancel close invalid load scroll toggle".split(" ").concat(zh));function fE(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,KL(r,t,void 0,e),e.currentTarget=null}function w8(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var l=void 0;if(t)for(var c=r.length-1;0<=c;c--){var o=r[c],h=o.instance,p=o.currentTarget;if(o=o.listener,h!==l&&i.isPropagationStopped())break e;fE(i,o,p),l=h}else for(c=0;c<r.length;c++){if(o=r[c],h=o.instance,p=o.currentTarget,o=o.listener,h!==l&&i.isPropagationStopped())break e;fE(i,o,p),l=h}}}if(Fg)throw e=fb,Fg=!1,fb=null,e}function Vr(e,t){var n=t[wb];n===void 0&&(n=t[wb]=new Set);var r=e+"__bubble";n.has(r)||(C8(t,e,2,!1),n.add(r))}function Rx(e,t,n){var r=0;t&&(r|=4),C8(n,e,r,t)}var Pv="_reactListening"+Math.random().toString(36).slice(2);function vp(e){if(!e[Pv]){e[Pv]=!0,MP.forEach(function(n){n!=="selectionchange"&&(Wz.has(n)||Rx(n,!1,e),Rx(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Pv]||(t[Pv]=!0,Rx("selectionchange",!1,t))}}function C8(e,t,n,r){switch(a8(t)){case 1:var i=az;break;case 4:i=sz;break;default:i=Kw}n=i.bind(null,t,n,e),i=void 0,!db||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Ax(e,t,n,r,i){var l=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var c=r.tag;if(c===3||c===4){var o=r.stateNode.containerInfo;if(o===i||o.nodeType===8&&o.parentNode===i)break;if(c===4)for(c=r.return;c!==null;){var h=c.tag;if((h===3||h===4)&&(h=c.stateNode.containerInfo,h===i||h.nodeType===8&&h.parentNode===i))return;c=c.return}for(;o!==null;){if(c=ec(o),c===null)return;if(h=c.tag,h===5||h===6){r=l=c;continue e}o=o.parentNode}}r=r.return}WP(function(){var p=l,g=Bw(n),b=[];e:{var w=b8.get(e);if(w!==void 0){var P=Ww,I=e;switch(e){case"keypress":if(fg(n)===0)break e;case"keydown":case"keyup":P=wz;break;case"focusin":I="focus",P=Ex;break;case"focusout":I="blur",P=Ex;break;case"beforeblur":case"afterblur":P=Ex;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":P=eE;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=cz;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=Ez;break;case g8:case y8:case x8:P=hz;break;case _8:P=Tz;break;case"scroll":P=lz;break;case"wheel":P=Iz;break;case"copy":case"cut":case"paste":P=mz;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=nE}var A=(t&4)!==0,O=!A&&e==="scroll",M=A?w!==null?w+"Capture":null:w;A=[];for(var R=p,N;R!==null;){N=R;var z=N.stateNode;if(N.tag===5&&z!==null&&(N=z,M!==null&&(z=cp(R,M),z!=null&&A.push(gp(R,z,N)))),O)break;R=R.return}0<A.length&&(w=new P(w,I,null,n,g),b.push({event:w,listeners:A}))}}if((t&7)===0){e:{if(w=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",w&&n!==ub&&(I=n.relatedTarget||n.fromElement)&&(ec(I)||I[Xs]))break e;if((P||w)&&(w=g.window===g?g:(w=g.ownerDocument)?w.defaultView||w.parentWindow:window,P?(I=n.relatedTarget||n.toElement,P=p,I=I?ec(I):null,I!==null&&(O=Cc(I),I!==O||I.tag!==5&&I.tag!==6)&&(I=null)):(P=null,I=p),P!==I)){if(A=eE,z="onMouseLeave",M="onMouseEnter",R="mouse",(e==="pointerout"||e==="pointerover")&&(A=nE,z="onPointerLeave",M="onPointerEnter",R="pointer"),O=P==null?w:xd(P),N=I==null?w:xd(I),w=new A(z,R+"leave",P,n,g),w.target=O,w.relatedTarget=N,z=null,ec(g)===p&&(A=new A(M,R+"enter",I,n,g),A.target=N,A.relatedTarget=O,z=A),O=z,P&&I)t:{for(A=P,M=I,R=0,N=A;N;N=od(N))R++;for(N=0,z=M;z;z=od(z))N++;for(;0<R-N;)A=od(A),R--;for(;0<N-R;)M=od(M),N--;for(;R--;){if(A===M||M!==null&&A===M.alternate)break t;A=od(A),M=od(M)}A=null}else A=null;P!==null&&hE(b,w,P,A,!1),I!==null&&O!==null&&hE(b,O,I,A,!0)}}e:{if(w=p?xd(p):window,P=w.nodeName&&w.nodeName.toLowerCase(),P==="select"||P==="input"&&w.type==="file")var B=Lz;else if(oE(w))if(f8)B=Bz;else{B=Fz;var U=zz}else(P=w.nodeName)&&P.toLowerCase()==="input"&&(w.type==="checkbox"||w.type==="radio")&&(B=$z);if(B&&(B=B(e,p))){d8(b,B,n,g);break e}U&&U(e,w,p),e==="focusout"&&(U=w._wrapperState)&&U.controlled&&w.type==="number"&&ib(w,"number",w.value)}switch(U=p?xd(p):window,e){case"focusin":(oE(U)||U.contentEditable==="true")&&(gd=U,vb=p,Gh=null);break;case"focusout":Gh=vb=gd=null;break;case"mousedown":gb=!0;break;case"contextmenu":case"mouseup":case"dragend":gb=!1,cE(b,n,g);break;case"selectionchange":if(jz)break;case"keydown":case"keyup":cE(b,n,g)}var q;if(qw)e:{switch(e){case"compositionstart":var H="onCompositionStart";break e;case"compositionend":H="onCompositionEnd";break e;case"compositionupdate":H="onCompositionUpdate";break e}H=void 0}else vd?u8(e,n)&&(H="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(H="onCompositionStart");H&&(l8&&n.locale!=="ko"&&(vd||H!=="onCompositionStart"?H==="onCompositionEnd"&&vd&&(q=s8()):(zl=g,Hw="value"in zl?zl.value:zl.textContent,vd=!0)),U=jg(p,H),0<U.length&&(H=new tE(H,e,null,n,g),b.push({event:H,listeners:U}),q?H.data=q:(q=c8(n),q!==null&&(H.data=q)))),(q=Rz?Az(e,n):Oz(e,n))&&(p=jg(p,"onBeforeInput"),0<p.length&&(g=new tE("onBeforeInput","beforeinput",null,n,g),b.push({event:g,listeners:p}),g.data=q))}w8(b,t)})}function gp(e,t,n){return{instance:e,listener:t,currentTarget:n}}function jg(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,l=i.stateNode;i.tag===5&&l!==null&&(i=l,l=cp(e,n),l!=null&&r.unshift(gp(e,l,i)),l=cp(e,t),l!=null&&r.push(gp(e,l,i))),e=e.return}return r}function od(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function hE(e,t,n,r,i){for(var l=t._reactName,c=[];n!==null&&n!==r;){var o=n,h=o.alternate,p=o.stateNode;if(h!==null&&h===r)break;o.tag===5&&p!==null&&(o=p,i?(h=cp(n,l),h!=null&&c.unshift(gp(n,h,o))):i||(h=cp(n,l),h!=null&&c.push(gp(n,h,o)))),n=n.return}c.length!==0&&e.push({event:t,listeners:c})}var Gz=/\r\n?/g,qz=/\u0000|\uFFFD/g;function pE(e){return(typeof e=="string"?e:""+e).replace(Gz,`
`).replace(qz,"")}function Iv(e,t,n){if(t=pE(t),pE(e)!==t&&n)throw Error(Kt(425))}function Kg(){}var yb=null,xb=null;function _b(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var bb=typeof setTimeout=="function"?setTimeout:void 0,Zz=typeof clearTimeout=="function"?clearTimeout:void 0,mE=typeof Promise=="function"?Promise:void 0,Xz=typeof queueMicrotask=="function"?queueMicrotask:typeof mE<"u"?function(e){return mE.resolve(null).then(e).catch(Yz)}:bb;function Yz(e){setTimeout(function(){throw e})}function Ox(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),hp(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);hp(t)}function ql(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function vE(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var of=Math.random().toString(36).slice(2),as="__reactFiber$"+of,yp="__reactProps$"+of,Xs="__reactContainer$"+of,wb="__reactEvents$"+of,Qz="__reactListeners$"+of,Jz="__reactHandles$"+of;function ec(e){var t=e[as];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Xs]||n[as]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=vE(e);e!==null;){if(n=e[as])return n;e=vE(e)}return t}e=n,n=e.parentNode}return null}function Vp(e){return e=e[as]||e[Xs],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function xd(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Kt(33))}function qy(e){return e[yp]||null}var Cb=[],_d=-1;function du(e){return{current:e}}function jr(e){0>_d||(e.current=Cb[_d],Cb[_d]=null,_d--)}function $r(e,t){_d++,Cb[_d]=e.current,e.current=t}var iu={},ao=du(iu),Ao=du(!1),cc=iu;function Bd(e,t){var n=e.type.contextTypes;if(!n)return iu;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},l;for(l in n)i[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Oo(e){return e=e.childContextTypes,e!=null}function Hg(){jr(Ao),jr(ao)}function gE(e,t,n){if(ao.current!==iu)throw Error(Kt(168));$r(ao,t),$r(Ao,n)}function S8(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Kt(108,zL(e)||"Unknown",i));return ti({},n,r)}function Wg(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||iu,cc=ao.current,$r(ao,e),$r(Ao,Ao.current),!0}function yE(e,t,n){var r=e.stateNode;if(!r)throw Error(Kt(169));n?(e=S8(e,t,cc),r.__reactInternalMemoizedMergedChildContext=e,jr(Ao),jr(ao),$r(ao,e)):jr(Ao),$r(Ao,n)}var Fs=null,Zy=!1,Nx=!1;function E8(e){Fs===null?Fs=[e]:Fs.push(e)}function eF(e){Zy=!0,E8(e)}function fu(){if(!Nx&&Fs!==null){Nx=!0;var e=0,t=Cr;try{var n=Fs;for(Cr=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Fs=null,Zy=!1}catch(i){throw Fs!==null&&(Fs=Fs.slice(e+1)),XP(Vw,fu),i}finally{Cr=t,Nx=!1}}return null}var bd=[],wd=0,Gg=null,qg=0,ma=[],va=0,dc=null,js=1,Ks="";function Gu(e,t){bd[wd++]=qg,bd[wd++]=Gg,Gg=e,qg=t}function k8(e,t,n){ma[va++]=js,ma[va++]=Ks,ma[va++]=dc,dc=e;var r=js;e=Ks;var i=32-ja(r)-1;r&=~(1<<i),n+=1;var l=32-ja(t)+i;if(30<l){var c=i-i%5;l=(r&(1<<c)-1).toString(32),r>>=c,i-=c,js=1<<32-ja(t)+i|n<<i|r,Ks=l+e}else js=1<<l|n<<i|r,Ks=e}function Xw(e){e.return!==null&&(Gu(e,1),k8(e,1,0))}function Yw(e){for(;e===Gg;)Gg=bd[--wd],bd[wd]=null,qg=bd[--wd],bd[wd]=null;for(;e===dc;)dc=ma[--va],ma[va]=null,Ks=ma[--va],ma[va]=null,js=ma[--va],ma[va]=null}var Zo=null,Go=null,Xr=!1,Va=null;function T8(e,t){var n=xa(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function xE(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Zo=e,Go=ql(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Zo=e,Go=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=dc!==null?{id:js,overflow:Ks}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=xa(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Zo=e,Go=null,!0):!1;default:return!1}}function Sb(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Eb(e){if(Xr){var t=Go;if(t){var n=t;if(!xE(e,t)){if(Sb(e))throw Error(Kt(418));t=ql(n.nextSibling);var r=Zo;t&&xE(e,t)?T8(r,n):(e.flags=e.flags&-4097|2,Xr=!1,Zo=e)}}else{if(Sb(e))throw Error(Kt(418));e.flags=e.flags&-4097|2,Xr=!1,Zo=e}}}function _E(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Zo=e}function Mv(e){if(e!==Zo)return!1;if(!Xr)return _E(e),Xr=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!_b(e.type,e.memoizedProps)),t&&(t=Go)){if(Sb(e))throw P8(),Error(Kt(418));for(;t;)T8(e,t),t=ql(t.nextSibling)}if(_E(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Kt(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Go=ql(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Go=null}}else Go=Zo?ql(e.stateNode.nextSibling):null;return!0}function P8(){for(var e=Go;e;)e=ql(e.nextSibling)}function Vd(){Go=Zo=null,Xr=!1}function Qw(e){Va===null?Va=[e]:Va.push(e)}var tF=il.ReactCurrentBatchConfig;function Fa(e,t){if(e&&e.defaultProps){t=ti({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var Zg=du(null),Xg=null,Cd=null,Jw=null;function eC(){Jw=Cd=Xg=null}function tC(e){var t=Zg.current;jr(Zg),e._currentValue=t}function kb(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 Nd(e,t){Xg=e,Jw=Cd=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Ro=!0),e.firstContext=null)}function ba(e){var t=e._currentValue;if(Jw!==e)if(e={context:e,memoizedValue:t,next:null},Cd===null){if(Xg===null)throw Error(Kt(308));Cd=e,Xg.dependencies={lanes:0,firstContext:e}}else Cd=Cd.next=e;return t}var tc=null;function nC(e){tc===null?tc=[e]:tc.push(e)}function I8(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,nC(t)):(n.next=i.next,i.next=n),t.interleaved=n,Ys(e,r)}function Ys(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 Ol=!1;function rC(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function M8(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 Ws(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Zl(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(hr&2)!==0){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Ys(e,n)}return i=r.interleaved,i===null?(t.next=t,nC(r)):(t.next=i.next,i.next=t),r.interleaved=t,Ys(e,n)}function hg(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,Uw(e,n)}}function bE(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var c={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?i=l=c:l=l.next=c,n=n.next}while(n!==null);l===null?i=l=t:l=l.next=t}else i=l=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:l,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 Yg(e,t,n,r){var i=e.updateQueue;Ol=!1;var l=i.firstBaseUpdate,c=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var h=o,p=h.next;h.next=null,c===null?l=p:c.next=p,c=h;var g=e.alternate;g!==null&&(g=g.updateQueue,o=g.lastBaseUpdate,o!==c&&(o===null?g.firstBaseUpdate=p:o.next=p,g.lastBaseUpdate=h))}if(l!==null){var b=i.baseState;c=0,g=p=h=null,o=l;do{var w=o.lane,P=o.eventTime;if((r&w)===w){g!==null&&(g=g.next={eventTime:P,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var I=e,A=o;switch(w=t,P=n,A.tag){case 1:if(I=A.payload,typeof I=="function"){b=I.call(P,b,w);break e}b=I;break e;case 3:I.flags=I.flags&-65537|128;case 0:if(I=A.payload,w=typeof I=="function"?I.call(P,b,w):I,w==null)break e;b=ti({},b,w);break e;case 2:Ol=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,w=i.effects,w===null?i.effects=[o]:w.push(o))}else P={eventTime:P,lane:w,tag:o.tag,payload:o.payload,callback:o.callback,next:null},g===null?(p=g=P,h=b):g=g.next=P,c|=w;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;w=o,o=w.next,w.next=null,i.lastBaseUpdate=w,i.shared.pending=null}}while(1);if(g===null&&(h=b),i.baseState=h,i.firstBaseUpdate=p,i.lastBaseUpdate=g,t=i.shared.interleaved,t!==null){i=t;do c|=i.lane,i=i.next;while(i!==t)}else l===null&&(i.shared.lanes=0);hc|=c,e.lanes=c,e.memoizedState=b}}function wE(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(Kt(191,i));i.call(r)}}}var R8=new IP.Component().refs;function Tb(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ti({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Xy={isMounted:function(e){return(e=e._reactInternals)?Cc(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=_o(),i=Yl(e),l=Ws(r,i);l.payload=t,n!=null&&(l.callback=n),t=Zl(e,l,i),t!==null&&(Ka(t,e,i,r),hg(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=_o(),i=Yl(e),l=Ws(r,i);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=Zl(e,l,i),t!==null&&(Ka(t,e,i,r),hg(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=_o(),r=Yl(e),i=Ws(n,r);i.tag=2,t!=null&&(i.callback=t),t=Zl(e,i,r),t!==null&&(Ka(t,e,r,n),hg(t,e,r))}};function CE(e,t,n,r,i,l,c){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,l,c):t.prototype&&t.prototype.isPureReactComponent?!mp(n,r)||!mp(i,l):!0}function A8(e,t,n){var r=!1,i=iu,l=t.contextType;return typeof l=="object"&&l!==null?l=ba(l):(i=Oo(t)?cc:ao.current,r=t.contextTypes,l=(r=r!=null)?Bd(e,i):iu),t=new t(n,l),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Xy,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=l),t}function SE(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Xy.enqueueReplaceState(t,t.state,null)}function Pb(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=R8,rC(e);var l=t.contextType;typeof l=="object"&&l!==null?i.context=ba(l):(l=Oo(t)?cc:ao.current,i.context=Bd(e,l)),i.state=e.memoizedState,l=t.getDerivedStateFromProps,typeof l=="function"&&(Tb(e,t,l,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Xy.enqueueReplaceState(i,i.state,null),Yg(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function wh(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Kt(309));var r=n.stateNode}if(!r)throw Error(Kt(147,e));var i=r,l=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===l?t.ref:(t=function(c){var o=i.refs;o===R8&&(o=i.refs={}),c===null?delete o[l]:o[l]=c},t._stringRef=l,t)}if(typeof e!="string")throw Error(Kt(284));if(!n._owner)throw Error(Kt(290,e))}return e}function Rv(e,t){throw e=Object.prototype.toString.call(t),Error(Kt(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function EE(e){var t=e._init;return t(e._payload)}function O8(e){function t(M,R){if(e){var N=M.deletions;N===null?(M.deletions=[R],M.flags|=16):N.push(R)}}function n(M,R){if(!e)return null;for(;R!==null;)t(M,R),R=R.sibling;return null}function r(M,R){for(M=new Map;R!==null;)R.key!==null?M.set(R.key,R):M.set(R.index,R),R=R.sibling;return M}function i(M,R){return M=Ql(M,R),M.index=0,M.sibling=null,M}function l(M,R,N){return M.index=N,e?(N=M.alternate,N!==null?(N=N.index,N<R?(M.flags|=2,R):N):(M.flags|=2,R)):(M.flags|=1048576,R)}function c(M){return e&&M.alternate===null&&(M.flags|=2),M}function o(M,R,N,z){return R===null||R.tag!==6?(R=Vx(N,M.mode,z),R.return=M,R):(R=i(R,N),R.return=M,R)}function h(M,R,N,z){var B=N.type;return B===md?g(M,R,N.props.children,z,N.key):R!==null&&(R.elementType===B||typeof B=="object"&&B!==null&&B.$$typeof===Al&&EE(B)===R.type)?(z=i(R,N.props),z.ref=wh(M,R,N),z.return=M,z):(z=xg(N.type,N.key,N.props,null,M.mode,z),z.ref=wh(M,R,N),z.return=M,z)}function p(M,R,N,z){return R===null||R.tag!==4||R.stateNode.containerInfo!==N.containerInfo||R.stateNode.implementation!==N.implementation?(R=Ux(N,M.mode,z),R.return=M,R):(R=i(R,N.children||[]),R.return=M,R)}function g(M,R,N,z,B){return R===null||R.tag!==7?(R=lc(N,M.mode,z,B),R.return=M,R):(R=i(R,N),R.return=M,R)}function b(M,R,N){if(typeof R=="string"&&R!==""||typeof R=="number")return R=Vx(""+R,M.mode,N),R.return=M,R;if(typeof R=="object"&&R!==null){switch(R.$$typeof){case _v:return N=xg(R.type,R.key,R.props,null,M.mode,N),N.ref=wh(M,null,R),N.return=M,N;case pd:return R=Ux(R,M.mode,N),R.return=M,R;case Al:var z=R._init;return b(M,z(R._payload),N)}if(Dh(R)||gh(R))return R=lc(R,M.mode,N,null),R.return=M,R;Rv(M,R)}return null}function w(M,R,N,z){var B=R!==null?R.key:null;if(typeof N=="string"&&N!==""||typeof N=="number")return B!==null?null:o(M,R,""+N,z);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case _v:return N.key===B?h(M,R,N,z):null;case pd:return N.key===B?p(M,R,N,z):null;case Al:return B=N._init,w(M,R,B(N._payload),z)}if(Dh(N)||gh(N))return B!==null?null:g(M,R,N,z,null);Rv(M,N)}return null}function P(M,R,N,z,B){if(typeof z=="string"&&z!==""||typeof z=="number")return M=M.get(N)||null,o(R,M,""+z,B);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case _v:return M=M.get(z.key===null?N:z.key)||null,h(R,M,z,B);case pd:return M=M.get(z.key===null?N:z.key)||null,p(R,M,z,B);case Al:var U=z._init;return P(M,R,N,U(z._payload),B)}if(Dh(z)||gh(z))return M=M.get(N)||null,g(R,M,z,B,null);Rv(R,z)}return null}function I(M,R,N,z){for(var B=null,U=null,q=R,H=R=0,te=null;q!==null&&H<N.length;H++){q.index>H?(te=q,q=null):te=q.sibling;var Y=w(M,q,N[H],z);if(Y===null){q===null&&(q=te);break}e&&q&&Y.alternate===null&&t(M,q),R=l(Y,R,H),U===null?B=Y:U.sibling=Y,U=Y,q=te}if(H===N.length)return n(M,q),Xr&&Gu(M,H),B;if(q===null){for(;H<N.length;H++)q=b(M,N[H],z),q!==null&&(R=l(q,R,H),U===null?B=q:U.sibling=q,U=q);return Xr&&Gu(M,H),B}for(q=r(M,q);H<N.length;H++)te=P(q,M,H,N[H],z),te!==null&&(e&&te.alternate!==null&&q.delete(te.key===null?H:te.key),R=l(te,R,H),U===null?B=te:U.sibling=te,U=te);return e&&q.forEach(function(le){return t(M,le)}),Xr&&Gu(M,H),B}function A(M,R,N,z){var B=gh(N);if(typeof B!="function")throw Error(Kt(150));if(N=B.call(N),N==null)throw Error(Kt(151));for(var U=B=null,q=R,H=R=0,te=null,Y=N.next();q!==null&&!Y.done;H++,Y=N.next()){q.index>H?(te=q,q=null):te=q.sibling;var le=w(M,q,Y.value,z);if(le===null){q===null&&(q=te);break}e&&q&&le.alternate===null&&t(M,q),R=l(le,R,H),U===null?B=le:U.sibling=le,U=le,q=te}if(Y.done)return n(M,q),Xr&&Gu(M,H),B;if(q===null){for(;!Y.done;H++,Y=N.next())Y=b(M,Y.value,z),Y!==null&&(R=l(Y,R,H),U===null?B=Y:U.sibling=Y,U=Y);return Xr&&Gu(M,H),B}for(q=r(M,q);!Y.done;H++,Y=N.next())Y=P(q,M,H,Y.value,z),Y!==null&&(e&&Y.alternate!==null&&q.delete(Y.key===null?H:Y.key),R=l(Y,R,H),U===null?B=Y:U.sibling=Y,U=Y);return e&&q.forEach(function(J){return t(M,J)}),Xr&&Gu(M,H),B}function O(M,R,N,z){if(typeof N=="object"&&N!==null&&N.type===md&&N.key===null&&(N=N.props.children),typeof N=="object"&&N!==null){switch(N.$$typeof){case _v:e:{for(var B=N.key,U=R;U!==null;){if(U.key===B){if(B=N.type,B===md){if(U.tag===7){n(M,U.sibling),R=i(U,N.props.children),R.return=M,M=R;break e}}else if(U.elementType===B||typeof B=="object"&&B!==null&&B.$$typeof===Al&&EE(B)===U.type){n(M,U.sibling),R=i(U,N.props),R.ref=wh(M,U,N),R.return=M,M=R;break e}n(M,U);break}else t(M,U);U=U.sibling}N.type===md?(R=lc(N.props.children,M.mode,z,N.key),R.return=M,M=R):(z=xg(N.type,N.key,N.props,null,M.mode,z),z.ref=wh(M,R,N),z.return=M,M=z)}return c(M);case pd:e:{for(U=N.key;R!==null;){if(R.key===U)if(R.tag===4&&R.stateNode.containerInfo===N.containerInfo&&R.stateNode.implementation===N.implementation){n(M,R.sibling),R=i(R,N.children||[]),R.return=M,M=R;break e}else{n(M,R);break}else t(M,R);R=R.sibling}R=Ux(N,M.mode,z),R.return=M,M=R}return c(M);case Al:return U=N._init,O(M,R,U(N._payload),z)}if(Dh(N))return I(M,R,N,z);if(gh(N))return A(M,R,N,z);Rv(M,N)}return typeof N=="string"&&N!==""||typeof N=="number"?(N=""+N,R!==null&&R.tag===6?(n(M,R.sibling),R=i(R,N),R.return=M,M=R):(n(M,R),R=Vx(N,M.mode,z),R.return=M,M=R),c(M)):n(M,R)}return O}var Ud=O8(!0),N8=O8(!1),Up={},ds=du(Up),xp=du(Up),_p=du(Up);function nc(e){if(e===Up)throw Error(Kt(174));return e}function iC(e,t){switch($r(_p,t),$r(xp,e),$r(ds,Up),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ab(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ab(t,e)}jr(ds),$r(ds,t)}function jd(){jr(ds),jr(xp),jr(_p)}function D8(e){nc(_p.current);var t=nc(ds.current),n=ab(t,e.type);t!==n&&($r(xp,e),$r(ds,n))}function oC(e){xp.current===e&&(jr(ds),jr(xp))}var Jr=du(0);function Qg(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Dx=[];function aC(){for(var e=0;e<Dx.length;e++)Dx[e]._workInProgressVersionPrimary=null;Dx.length=0}var pg=il.ReactCurrentDispatcher,Lx=il.ReactCurrentBatchConfig,fc=0,ei=null,Ii=null,$i=null,Jg=!1,qh=!1,bp=0,nF=0;function no(){throw Error(Kt(321))}function sC(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ha(e[n],t[n]))return!1;return!0}function lC(e,t,n,r,i,l){if(fc=l,ei=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,pg.current=e===null||e.memoizedState===null?aF:sF,e=n(r,i),qh){l=0;do{if(qh=!1,bp=0,25<=l)throw Error(Kt(301));l+=1,$i=Ii=null,t.updateQueue=null,pg.current=lF,e=n(r,i)}while(qh)}if(pg.current=ey,t=Ii!==null&&Ii.next!==null,fc=0,$i=Ii=ei=null,Jg=!1,t)throw Error(Kt(300));return e}function uC(){var e=bp!==0;return bp=0,e}function os(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $i===null?ei.memoizedState=$i=e:$i=$i.next=e,$i}function wa(){if(Ii===null){var e=ei.alternate;e=e!==null?e.memoizedState:null}else e=Ii.next;var t=$i===null?ei.memoizedState:$i.next;if(t!==null)$i=t,Ii=e;else{if(e===null)throw Error(Kt(310));Ii=e,e={memoizedState:Ii.memoizedState,baseState:Ii.baseState,baseQueue:Ii.baseQueue,queue:Ii.queue,next:null},$i===null?ei.memoizedState=$i=e:$i=$i.next=e}return $i}function wp(e,t){return typeof t=="function"?t(e):t}function zx(e){var t=wa(),n=t.queue;if(n===null)throw Error(Kt(311));n.lastRenderedReducer=e;var r=Ii,i=r.baseQueue,l=n.pending;if(l!==null){if(i!==null){var c=i.next;i.next=l.next,l.next=c}r.baseQueue=i=l,n.pending=null}if(i!==null){l=i.next,r=r.baseState;var o=c=null,h=null,p=l;do{var g=p.lane;if((fc&g)===g)h!==null&&(h=h.next={lane:0,action:p.action,hasEagerState:p.hasEagerState,eagerState:p.eagerState,next:null}),r=p.hasEagerState?p.eagerState:e(r,p.action);else{var b={lane:g,action:p.action,hasEagerState:p.hasEagerState,eagerState:p.eagerState,next:null};h===null?(o=h=b,c=r):h=h.next=b,ei.lanes|=g,hc|=g}p=p.next}while(p!==null&&p!==l);h===null?c=r:h.next=o,Ha(r,t.memoizedState)||(Ro=!0),t.memoizedState=r,t.baseState=c,t.baseQueue=h,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do l=i.lane,ei.lanes|=l,hc|=l,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Fx(e){var t=wa(),n=t.queue;if(n===null)throw Error(Kt(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,l=t.memoizedState;if(i!==null){n.pending=null;var c=i=i.next;do l=e(l,c.action),c=c.next;while(c!==i);Ha(l,t.memoizedState)||(Ro=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,r]}function L8(){}function z8(e,t){var n=ei,r=wa(),i=t(),l=!Ha(r.memoizedState,i);if(l&&(r.memoizedState=i,Ro=!0),r=r.queue,cC(B8.bind(null,n,r,e),[e]),r.getSnapshot!==t||l||$i!==null&&$i.memoizedState.tag&1){if(n.flags|=2048,Cp(9,$8.bind(null,n,r,i,t),void 0,null),Bi===null)throw Error(Kt(349));(fc&30)!==0||F8(n,t,i)}return i}function F8(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ei.updateQueue,t===null?(t={lastEffect:null,stores:null},ei.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function $8(e,t,n,r){t.value=n,t.getSnapshot=r,V8(t)&&U8(e)}function B8(e,t,n){return n(function(){V8(t)&&U8(e)})}function V8(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ha(e,n)}catch{return!0}}function U8(e){var t=Ys(e,1);t!==null&&Ka(t,e,1,-1)}function kE(e){var t=os();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:wp,lastRenderedState:e},t.queue=e,e=e.dispatch=oF.bind(null,ei,e),[t.memoizedState,e]}function Cp(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ei.updateQueue,t===null?(t={lastEffect:null,stores:null},ei.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function j8(){return wa().memoizedState}function mg(e,t,n,r){var i=os();ei.flags|=e,i.memoizedState=Cp(1|t,n,void 0,r===void 0?null:r)}function Yy(e,t,n,r){var i=wa();r=r===void 0?null:r;var l=void 0;if(Ii!==null){var c=Ii.memoizedState;if(l=c.destroy,r!==null&&sC(r,c.deps)){i.memoizedState=Cp(t,n,l,r);return}}ei.flags|=e,i.memoizedState=Cp(1|t,n,l,r)}function TE(e,t){return mg(8390656,8,e,t)}function cC(e,t){return Yy(2048,8,e,t)}function K8(e,t){return Yy(4,2,e,t)}function H8(e,t){return Yy(4,4,e,t)}function W8(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function G8(e,t,n){return n=n!=null?n.concat([e]):null,Yy(4,4,W8.bind(null,t,e),n)}function dC(){}function q8(e,t){var n=wa();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&sC(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Z8(e,t){var n=wa();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&sC(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function X8(e,t,n){return(fc&21)===0?(e.baseState&&(e.baseState=!1,Ro=!0),e.memoizedState=n):(Ha(n,t)||(n=JP(),ei.lanes|=n,hc|=n,e.baseState=!0),t)}function rF(e,t){var n=Cr;Cr=n!==0&&4>n?n:4,e(!0);var r=Lx.transition;Lx.transition={};try{e(!1),t()}finally{Cr=n,Lx.transition=r}}function Y8(){return wa().memoizedState}function iF(e,t,n){var r=Yl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Q8(e))J8(t,n);else if(n=I8(e,t,n,r),n!==null){var i=_o();Ka(n,e,r,i),eI(n,t,r)}}function oF(e,t,n){var r=Yl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Q8(e))J8(t,i);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var c=t.lastRenderedState,o=l(c,n);if(i.hasEagerState=!0,i.eagerState=o,Ha(o,c)){var h=t.interleaved;h===null?(i.next=i,nC(t)):(i.next=h.next,h.next=i),t.interleaved=i;return}}catch{}finally{}n=I8(e,t,i,r),n!==null&&(i=_o(),Ka(n,e,r,i),eI(n,t,r))}}function Q8(e){var t=e.alternate;return e===ei||t!==null&&t===ei}function J8(e,t){qh=Jg=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function eI(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Uw(e,n)}}var ey={readContext:ba,useCallback:no,useContext:no,useEffect:no,useImperativeHandle:no,useInsertionEffect:no,useLayoutEffect:no,useMemo:no,useReducer:no,useRef:no,useState:no,useDebugValue:no,useDeferredValue:no,useTransition:no,useMutableSource:no,useSyncExternalStore:no,useId:no,unstable_isNewReconciler:!1},aF={readContext:ba,useCallback:function(e,t){return os().memoizedState=[e,t===void 0?null:t],e},useContext:ba,useEffect:TE,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,mg(4194308,4,W8.bind(null,t,e),n)},useLayoutEffect:function(e,t){return mg(4194308,4,e,t)},useInsertionEffect:function(e,t){return mg(4,2,e,t)},useMemo:function(e,t){var n=os();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=os();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=iF.bind(null,ei,e),[r.memoizedState,e]},useRef:function(e){var t=os();return e={current:e},t.memoizedState=e},useState:kE,useDebugValue:dC,useDeferredValue:function(e){return os().memoizedState=e},useTransition:function(){var e=kE(!1),t=e[0];return e=rF.bind(null,e[1]),os().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ei,i=os();if(Xr){if(n===void 0)throw Error(Kt(407));n=n()}else{if(n=t(),Bi===null)throw Error(Kt(349));(fc&30)!==0||F8(r,t,n)}i.memoizedState=n;var l={value:n,getSnapshot:t};return i.queue=l,TE(B8.bind(null,r,l,e),[e]),r.flags|=2048,Cp(9,$8.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=os(),t=Bi.identifierPrefix;if(Xr){var n=Ks,r=js;n=(r&~(1<<32-ja(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=bp++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=nF++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},sF={readContext:ba,useCallback:q8,useContext:ba,useEffect:cC,useImperativeHandle:G8,useInsertionEffect:K8,useLayoutEffect:H8,useMemo:Z8,useReducer:zx,useRef:j8,useState:function(){return zx(wp)},useDebugValue:dC,useDeferredValue:function(e){var t=wa();return X8(t,Ii.memoizedState,e)},useTransition:function(){var e=zx(wp)[0],t=wa().memoizedState;return[e,t]},useMutableSource:L8,useSyncExternalStore:z8,useId:Y8,unstable_isNewReconciler:!1},lF={readContext:ba,useCallback:q8,useContext:ba,useEffect:cC,useImperativeHandle:G8,useInsertionEffect:K8,useLayoutEffect:H8,useMemo:Z8,useReducer:Fx,useRef:j8,useState:function(){return Fx(wp)},useDebugValue:dC,useDeferredValue:function(e){var t=wa();return Ii===null?t.memoizedState=e:X8(t,Ii.memoizedState,e)},useTransition:function(){var e=Fx(wp)[0],t=wa().memoizedState;return[e,t]},useMutableSource:L8,useSyncExternalStore:z8,useId:Y8,unstable_isNewReconciler:!1};function Kd(e,t){try{var n="",r=t;do n+=LL(r),r=r.return;while(r);var i=n}catch(l){i=`
Error generating stack: `+l.message+`
`+l.stack}return{value:e,source:t,stack:i,digest:null}}function $x(e,t,n){return{value:e,source:null,stack:n!=null?n:null,digest:t!=null?t:null}}function Ib(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var uF=typeof WeakMap=="function"?WeakMap:Map;function tI(e,t,n){n=Ws(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ny||(ny=!0,$b=r),Ib(e,t)},n}function nI(e,t,n){n=Ws(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Ib(e,t)}}var l=e.stateNode;return l!==null&&typeof l.componentDidCatch=="function"&&(n.callback=function(){Ib(e,t),typeof r!="function"&&(Xl===null?Xl=new Set([this]):Xl.add(this));var c=t.stack;this.componentDidCatch(t.value,{componentStack:c!==null?c:""})}),n}function PE(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new uF;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=CF.bind(null,e,t,n),t.then(e,e))}function IE(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 ME(e,t,n,r,i){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ws(-1,1),t.tag=2,Zl(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var cF=il.ReactCurrentOwner,Ro=!1;function yo(e,t,n,r){t.child=e===null?N8(t,null,n,r):Ud(t,e.child,n,r)}function RE(e,t,n,r,i){n=n.render;var l=t.ref;return Nd(t,i),r=lC(e,t,n,r,l,i),n=uC(),e!==null&&!Ro?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Qs(e,t,i)):(Xr&&n&&Xw(t),t.flags|=1,yo(e,t,r,i),t.child)}function AE(e,t,n,r,i){if(e===null){var l=n.type;return typeof l=="function"&&!xC(l)&&l.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=l,rI(e,t,l,r,i)):(e=xg(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,(e.lanes&i)===0){var c=l.memoizedProps;if(n=n.compare,n=n!==null?n:mp,n(c,r)&&e.ref===t.ref)return Qs(e,t,i)}return t.flags|=1,e=Ql(l,r),e.ref=t.ref,e.return=t,t.child=e}function rI(e,t,n,r,i){if(e!==null){var l=e.memoizedProps;if(mp(l,r)&&e.ref===t.ref)if(Ro=!1,t.pendingProps=r=l,(e.lanes&i)!==0)(e.flags&131072)!==0&&(Ro=!0);else return t.lanes=e.lanes,Qs(e,t,i)}return Mb(e,t,n,r,i)}function iI(e,t,n){var r=t.pendingProps,i=r.children,l=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},$r(Ed,Wo),Wo|=n;else{if((n&1073741824)===0)return e=l!==null?l.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,$r(Ed,Wo),Wo|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=l!==null?l.baseLanes:n,$r(Ed,Wo),Wo|=r}else l!==null?(r=l.baseLanes|n,t.memoizedState=null):r=n,$r(Ed,Wo),Wo|=r;return yo(e,t,i,n),t.child}function oI(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Mb(e,t,n,r,i){var l=Oo(n)?cc:ao.current;return l=Bd(t,l),Nd(t,i),n=lC(e,t,n,r,l,i),r=uC(),e!==null&&!Ro?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Qs(e,t,i)):(Xr&&r&&Xw(t),t.flags|=1,yo(e,t,n,i),t.child)}function OE(e,t,n,r,i){if(Oo(n)){var l=!0;Wg(t)}else l=!1;if(Nd(t,i),t.stateNode===null)vg(e,t),A8(t,n,r),Pb(t,n,r,i),r=!0;else if(e===null){var c=t.stateNode,o=t.memoizedProps;c.props=o;var h=c.context,p=n.contextType;typeof p=="object"&&p!==null?p=ba(p):(p=Oo(n)?cc:ao.current,p=Bd(t,p));var g=n.getDerivedStateFromProps,b=typeof g=="function"||typeof c.getSnapshotBeforeUpdate=="function";b||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(o!==r||h!==p)&&SE(t,c,r,p),Ol=!1;var w=t.memoizedState;c.state=w,Yg(t,r,c,i),h=t.memoizedState,o!==r||w!==h||Ao.current||Ol?(typeof g=="function"&&(Tb(t,n,g,r),h=t.memoizedState),(o=Ol||CE(t,n,o,r,w,h,p))?(b||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=h),c.props=r,c.state=h,c.context=p,r=o):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{c=t.stateNode,M8(e,t),o=t.memoizedProps,p=t.type===t.elementType?o:Fa(t.type,o),c.props=p,b=t.pendingProps,w=c.context,h=n.contextType,typeof h=="object"&&h!==null?h=ba(h):(h=Oo(n)?cc:ao.current,h=Bd(t,h));var P=n.getDerivedStateFromProps;(g=typeof P=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(o!==b||w!==h)&&SE(t,c,r,h),Ol=!1,w=t.memoizedState,c.state=w,Yg(t,r,c,i);var I=t.memoizedState;o!==b||w!==I||Ao.current||Ol?(typeof P=="function"&&(Tb(t,n,P,r),I=t.memoizedState),(p=Ol||CE(t,n,p,r,w,I,h)||!1)?(g||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(r,I,h),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(r,I,h)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||o===e.memoizedProps&&w===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&w===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=I),c.props=r,c.state=I,c.context=h,r=p):(typeof c.componentDidUpdate!="function"||o===e.memoizedProps&&w===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&w===e.memoizedState||(t.flags|=1024),r=!1)}return Rb(e,t,n,r,l,i)}function Rb(e,t,n,r,i,l){oI(e,t);var c=(t.flags&128)!==0;if(!r&&!c)return i&&yE(t,n,!1),Qs(e,t,l);r=t.stateNode,cF.current=t;var o=c&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&c?(t.child=Ud(t,e.child,null,l),t.child=Ud(t,null,o,l)):yo(e,t,o,l),t.memoizedState=r.state,i&&yE(t,n,!0),t.child}function aI(e){var t=e.stateNode;t.pendingContext?gE(e,t.pendingContext,t.pendingContext!==t.context):t.context&&gE(e,t.context,!1),iC(e,t.containerInfo)}function NE(e,t,n,r,i){return Vd(),Qw(i),t.flags|=256,yo(e,t,n,r),t.child}var Ab={dehydrated:null,treeContext:null,retryLane:0};function Ob(e){return{baseLanes:e,cachePool:null,transitions:null}}function sI(e,t,n){var r=t.pendingProps,i=Jr.current,l=!1,c=(t.flags&128)!==0,o;if((o=c)||(o=e!==null&&e.memoizedState===null?!1:(i&2)!==0),o?(l=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),$r(Jr,i&1),e===null)return Eb(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(c=r.children,e=r.fallback,l?(r=t.mode,l=t.child,c={mode:"hidden",children:c},(r&1)===0&&l!==null?(l.childLanes=0,l.pendingProps=c):l=e0(c,r,0,null),e=lc(e,r,n,null),l.return=t,e.return=t,l.sibling=e,t.child=l,t.child.memoizedState=Ob(n),t.memoizedState=Ab,e):fC(t,c));if(i=e.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return dF(e,t,c,r,o,i,n);if(l){l=r.fallback,c=t.mode,i=e.child,o=i.sibling;var h={mode:"hidden",children:r.children};return(c&1)===0&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=h,t.deletions=null):(r=Ql(i,h),r.subtreeFlags=i.subtreeFlags&14680064),o!==null?l=Ql(o,l):(l=lc(l,c,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,r=l,l=t.child,c=e.child.memoizedState,c=c===null?Ob(n):{baseLanes:c.baseLanes|n,cachePool:null,transitions:c.transitions},l.memoizedState=c,l.childLanes=e.childLanes&~n,t.memoizedState=Ab,r}return l=e.child,e=l.sibling,r=Ql(l,{mode:"visible",children:r.children}),(t.mode&1)===0&&(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 fC(e,t){return t=e0({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Av(e,t,n,r){return r!==null&&Qw(r),Ud(t,e.child,null,n),e=fC(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function dF(e,t,n,r,i,l,c){if(n)return t.flags&256?(t.flags&=-257,r=$x(Error(Kt(422))),Av(e,t,c,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(l=r.fallback,i=t.mode,r=e0({mode:"visible",children:r.children},i,0,null),l=lc(l,i,c,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,(t.mode&1)!==0&&Ud(t,e.child,null,c),t.child.memoizedState=Ob(c),t.memoizedState=Ab,l);if((t.mode&1)===0)return Av(e,t,c,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var o=r.dgst;return r=o,l=Error(Kt(419)),r=$x(l,r,void 0),Av(e,t,c,r)}if(o=(c&e.childLanes)!==0,Ro||o){if(r=Bi,r!==null){switch(c&-c){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=(i&(r.suspendedLanes|c))!==0?0:i,i!==0&&i!==l.retryLane&&(l.retryLane=i,Ys(e,i),Ka(r,e,i,-1))}return yC(),r=$x(Error(Kt(421))),Av(e,t,c,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=SF.bind(null,e),i._reactRetry=t,null):(e=l.treeContext,Go=ql(i.nextSibling),Zo=t,Xr=!0,Va=null,e!==null&&(ma[va++]=js,ma[va++]=Ks,ma[va++]=dc,js=e.id,Ks=e.overflow,dc=t),t=fC(t,r.children),t.flags|=4096,t)}function DE(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),kb(e.return,t,n)}function Bx(e,t,n,r,i){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=i)}function lI(e,t,n){var r=t.pendingProps,i=r.revealOrder,l=r.tail;if(yo(e,t,r.children,n),r=Jr.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&DE(e,n,t);else if(e.tag===19)DE(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($r(Jr,r),(t.mode&1)===0)t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Qg(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Bx(t,!1,i,n,l);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Qg(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Bx(t,!0,n,null,l);break;case"together":Bx(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function vg(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Qs(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),hc|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(Kt(153));if(t.child!==null){for(e=t.child,n=Ql(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ql(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function fF(e,t,n){switch(t.tag){case 3:aI(t),Vd();break;case 5:D8(t);break;case 1:Oo(t.type)&&Wg(t);break;case 4:iC(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;$r(Zg,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?($r(Jr,Jr.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?sI(e,t,n):($r(Jr,Jr.current&1),e=Qs(e,t,n),e!==null?e.sibling:null);$r(Jr,Jr.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return lI(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),$r(Jr,Jr.current),r)break;return null;case 22:case 23:return t.lanes=0,iI(e,t,n)}return Qs(e,t,n)}var uI,Nb,cI,dI;uI=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}};Nb=function(){};cI=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,nc(ds.current);var l=null;switch(n){case"input":i=nb(e,i),r=nb(e,r),l=[];break;case"select":i=ti({},i,{value:void 0}),r=ti({},r,{value:void 0}),l=[];break;case"textarea":i=ob(e,i),r=ob(e,r),l=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Kg)}sb(n,r);var c;n=null;for(p in i)if(!r.hasOwnProperty(p)&&i.hasOwnProperty(p)&&i[p]!=null)if(p==="style"){var o=i[p];for(c in o)o.hasOwnProperty(c)&&(n||(n={}),n[c]="")}else p!=="dangerouslySetInnerHTML"&&p!=="children"&&p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&p!=="autoFocus"&&(lp.hasOwnProperty(p)?l||(l=[]):(l=l||[]).push(p,null));for(p in r){var h=r[p];if(o=i!=null?i[p]:void 0,r.hasOwnProperty(p)&&h!==o&&(h!=null||o!=null))if(p==="style")if(o){for(c in o)!o.hasOwnProperty(c)||h&&h.hasOwnProperty(c)||(n||(n={}),n[c]="");for(c in h)h.hasOwnProperty(c)&&o[c]!==h[c]&&(n||(n={}),n[c]=h[c])}else n||(l||(l=[]),l.push(p,n)),n=h;else p==="dangerouslySetInnerHTML"?(h=h?h.__html:void 0,o=o?o.__html:void 0,h!=null&&o!==h&&(l=l||[]).push(p,h)):p==="children"?typeof h!="string"&&typeof h!="number"||(l=l||[]).push(p,""+h):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&(lp.hasOwnProperty(p)?(h!=null&&p==="onScroll"&&Vr("scroll",e),l||o===h||(l=[])):(l=l||[]).push(p,h))}n&&(l=l||[]).push("style",n);var p=l;(t.updateQueue=p)&&(t.flags|=4)}};dI=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ch(e,t){if(!Xr)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 ro(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function hF(e,t,n){var r=t.pendingProps;switch(Yw(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ro(t),null;case 1:return Oo(t.type)&&Hg(),ro(t),null;case 3:return r=t.stateNode,jd(),jr(Ao),jr(ao),aC(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Mv(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Va!==null&&(Ub(Va),Va=null))),Nb(e,t),ro(t),null;case 5:oC(t);var i=nc(_p.current);if(n=t.type,e!==null&&t.stateNode!=null)cI(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Kt(166));return ro(t),null}if(e=nc(ds.current),Mv(t)){r=t.stateNode,n=t.type;var l=t.memoizedProps;switch(r[as]=t,r[yp]=l,e=(t.mode&1)!==0,n){case"dialog":Vr("cancel",r),Vr("close",r);break;case"iframe":case"object":case"embed":Vr("load",r);break;case"video":case"audio":for(i=0;i<zh.length;i++)Vr(zh[i],r);break;case"source":Vr("error",r);break;case"img":case"image":case"link":Vr("error",r),Vr("load",r);break;case"details":Vr("toggle",r);break;case"input":KS(r,l),Vr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!l.multiple},Vr("invalid",r);break;case"textarea":WS(r,l),Vr("invalid",r)}sb(n,l),i=null;for(var c in l)if(l.hasOwnProperty(c)){var o=l[c];c==="children"?typeof o=="string"?r.textContent!==o&&(l.suppressHydrationWarning!==!0&&Iv(r.textContent,o,e),i=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(l.suppressHydrationWarning!==!0&&Iv(r.textContent,o,e),i=["children",""+o]):lp.hasOwnProperty(c)&&o!=null&&c==="onScroll"&&Vr("scroll",r)}switch(n){case"input":bv(r),HS(r,l,!0);break;case"textarea":bv(r),GS(r);break;case"select":case"option":break;default:typeof l.onClick=="function"&&(r.onclick=Kg)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{c=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=FP(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=c.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),n==="select"&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[as]=t,e[yp]=r,uI(e,t,!1,!1),t.stateNode=e;e:{switch(c=lb(n,r),n){case"dialog":Vr("cancel",e),Vr("close",e),i=r;break;case"iframe":case"object":case"embed":Vr("load",e),i=r;break;case"video":case"audio":for(i=0;i<zh.length;i++)Vr(zh[i],e);i=r;break;case"source":Vr("error",e),i=r;break;case"img":case"image":case"link":Vr("error",e),Vr("load",e),i=r;break;case"details":Vr("toggle",e),i=r;break;case"input":KS(e,r),i=nb(e,r),Vr("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=ti({},r,{value:void 0}),Vr("invalid",e);break;case"textarea":WS(e,r),i=ob(e,r),Vr("invalid",e);break;default:i=r}sb(n,i),o=i;for(l in o)if(o.hasOwnProperty(l)){var h=o[l];l==="style"?VP(e,h):l==="dangerouslySetInnerHTML"?(h=h?h.__html:void 0,h!=null&&$P(e,h)):l==="children"?typeof h=="string"?(n!=="textarea"||h!=="")&&up(e,h):typeof h=="number"&&up(e,""+h):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(lp.hasOwnProperty(l)?h!=null&&l==="onScroll"&&Vr("scroll",e):h!=null&&Lw(e,l,h,c))}switch(n){case"input":bv(e),HS(e,r,!1);break;case"textarea":bv(e),GS(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ru(r.value));break;case"select":e.multiple=!!r.multiple,l=r.value,l!=null?Md(e,!!r.multiple,l,!1):r.defaultValue!=null&&Md(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Kg)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ro(t),null;case 6:if(e&&t.stateNode!=null)dI(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Kt(166));if(n=nc(_p.current),nc(ds.current),Mv(t)){if(r=t.stateNode,n=t.memoizedProps,r[as]=t,(l=r.nodeValue!==n)&&(e=Zo,e!==null))switch(e.tag){case 3:Iv(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Iv(r.nodeValue,n,(e.mode&1)!==0)}l&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[as]=t,t.stateNode=r}return ro(t),null;case 13:if(jr(Jr),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Xr&&Go!==null&&(t.mode&1)!==0&&(t.flags&128)===0)P8(),Vd(),t.flags|=98560,l=!1;else if(l=Mv(t),r!==null&&r.dehydrated!==null){if(e===null){if(!l)throw Error(Kt(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(Kt(317));l[as]=t}else Vd(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ro(t),l=!1}else Va!==null&&(Ub(Va),Va=null),l=!0;if(!l)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Jr.current&1)!==0?Mi===0&&(Mi=3):yC())),t.updateQueue!==null&&(t.flags|=4),ro(t),null);case 4:return jd(),Nb(e,t),e===null&&vp(t.stateNode.containerInfo),ro(t),null;case 10:return tC(t.type._context),ro(t),null;case 17:return Oo(t.type)&&Hg(),ro(t),null;case 19:if(jr(Jr),l=t.memoizedState,l===null)return ro(t),null;if(r=(t.flags&128)!==0,c=l.rendering,c===null)if(r)Ch(l,!1);else{if(Mi!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Qg(e),c!==null){for(t.flags|=128,Ch(l,!1),r=c.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)l=n,e=r,l.flags&=14680066,c=l.alternate,c===null?(l.childLanes=0,l.lanes=e,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=c.childLanes,l.lanes=c.lanes,l.child=c.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=c.memoizedProps,l.memoizedState=c.memoizedState,l.updateQueue=c.updateQueue,l.type=c.type,e=c.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return $r(Jr,Jr.current&1|2),t.child}e=e.sibling}l.tail!==null&&pi()>Hd&&(t.flags|=128,r=!0,Ch(l,!1),t.lanes=4194304)}else{if(!r)if(e=Qg(c),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ch(l,!0),l.tail===null&&l.tailMode==="hidden"&&!c.alternate&&!Xr)return ro(t),null}else 2*pi()-l.renderingStartTime>Hd&&n!==1073741824&&(t.flags|=128,r=!0,Ch(l,!1),t.lanes=4194304);l.isBackwards?(c.sibling=t.child,t.child=c):(n=l.last,n!==null?n.sibling=c:t.child=c,l.last=c)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=pi(),t.sibling=null,n=Jr.current,$r(Jr,r?n&1|2:n&1),t):(ro(t),null);case 22:case 23:return gC(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Wo&1073741824)!==0&&(ro(t),t.subtreeFlags&6&&(t.flags|=8192)):ro(t),null;case 24:return null;case 25:return null}throw Error(Kt(156,t.tag))}function pF(e,t){switch(Yw(t),t.tag){case 1:return Oo(t.type)&&Hg(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return jd(),jr(Ao),jr(ao),aC(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return oC(t),null;case 13:if(jr(Jr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Kt(340));Vd()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return jr(Jr),null;case 4:return jd(),null;case 10:return tC(t.type._context),null;case 22:case 23:return gC(),null;case 24:return null;default:return null}}var Ov=!1,io=!1,mF=typeof WeakSet=="function"?WeakSet:Set,xn=null;function Sd(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){oi(e,t,r)}else n.current=null}function Db(e,t,n){try{n()}catch(r){oi(e,t,r)}}var LE=!1;function vF(e,t){if(yb=Vg,e=m8(),Zw(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 i=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var c=0,o=-1,h=-1,p=0,g=0,b=e,w=null;t:for(;;){for(var P;b!==n||i!==0&&b.nodeType!==3||(o=c+i),b!==l||r!==0&&b.nodeType!==3||(h=c+r),b.nodeType===3&&(c+=b.nodeValue.length),(P=b.firstChild)!==null;)w=b,b=P;for(;;){if(b===e)break t;if(w===n&&++p===i&&(o=c),w===l&&++g===r&&(h=c),(P=b.nextSibling)!==null)break;b=w,w=b.parentNode}b=P}n=o===-1||h===-1?null:{start:o,end:h}}else n=null}n=n||{start:0,end:0}}else n=null;for(xb={focusedElem:e,selectionRange:n},Vg=!1,xn=t;xn!==null;)if(t=xn,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,xn=e;else for(;xn!==null;){t=xn;try{var I=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(I!==null){var A=I.memoizedProps,O=I.memoizedState,M=t.stateNode,R=M.getSnapshotBeforeUpdate(t.elementType===t.type?A:Fa(t.type,A),O);M.__reactInternalSnapshotBeforeUpdate=R}break;case 3:var N=t.stateNode.containerInfo;N.nodeType===1?N.textContent="":N.nodeType===9&&N.documentElement&&N.removeChild(N.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Kt(163))}}catch(z){oi(t,t.return,z)}if(e=t.sibling,e!==null){e.return=t.return,xn=e;break}xn=t.return}return I=LE,LE=!1,I}function Zh(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var l=i.destroy;i.destroy=void 0,l!==void 0&&Db(t,n,l)}i=i.next}while(i!==r)}}function Qy(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 Lb(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 fI(e){var t=e.alternate;t!==null&&(e.alternate=null,fI(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[as],delete t[yp],delete t[wb],delete t[Qz],delete t[Jz])),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 hI(e){return e.tag===5||e.tag===3||e.tag===4}function zE(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||hI(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 zb(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=Kg));else if(r!==4&&(e=e.child,e!==null))for(zb(e,t,n),e=e.sibling;e!==null;)zb(e,t,n),e=e.sibling}function Fb(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(Fb(e,t,n),e=e.sibling;e!==null;)Fb(e,t,n),e=e.sibling}var Wi=null,$a=!1;function kl(e,t,n){for(n=n.child;n!==null;)pI(e,t,n),n=n.sibling}function pI(e,t,n){if(cs&&typeof cs.onCommitFiberUnmount=="function")try{cs.onCommitFiberUnmount(Ky,n)}catch{}switch(n.tag){case 5:io||Sd(n,t);case 6:var r=Wi,i=$a;Wi=null,kl(e,t,n),Wi=r,$a=i,Wi!==null&&($a?(e=Wi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Wi.removeChild(n.stateNode));break;case 18:Wi!==null&&($a?(e=Wi,n=n.stateNode,e.nodeType===8?Ox(e.parentNode,n):e.nodeType===1&&Ox(e,n),hp(e)):Ox(Wi,n.stateNode));break;case 4:r=Wi,i=$a,Wi=n.stateNode.containerInfo,$a=!0,kl(e,t,n),Wi=r,$a=i;break;case 0:case 11:case 14:case 15:if(!io&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var l=i,c=l.destroy;l=l.tag,c!==void 0&&((l&2)!==0||(l&4)!==0)&&Db(n,t,c),i=i.next}while(i!==r)}kl(e,t,n);break;case 1:if(!io&&(Sd(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){oi(n,t,o)}kl(e,t,n);break;case 21:kl(e,t,n);break;case 22:n.mode&1?(io=(r=io)||n.memoizedState!==null,kl(e,t,n),io=r):kl(e,t,n);break;default:kl(e,t,n)}}function FE(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new mF),t.forEach(function(r){var i=EF.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Da(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var l=e,c=t,o=c;e:for(;o!==null;){switch(o.tag){case 5:Wi=o.stateNode,$a=!1;break e;case 3:Wi=o.stateNode.containerInfo,$a=!0;break e;case 4:Wi=o.stateNode.containerInfo,$a=!0;break e}o=o.return}if(Wi===null)throw Error(Kt(160));pI(l,c,i),Wi=null,$a=!1;var h=i.alternate;h!==null&&(h.return=null),i.return=null}catch(p){oi(i,t,p)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)mI(t,e),t=t.sibling}function mI(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Da(t,e),rs(e),r&4){try{Zh(3,e,e.return),Qy(3,e)}catch(A){oi(e,e.return,A)}try{Zh(5,e,e.return)}catch(A){oi(e,e.return,A)}}break;case 1:Da(t,e),rs(e),r&512&&n!==null&&Sd(n,n.return);break;case 5:if(Da(t,e),rs(e),r&512&&n!==null&&Sd(n,n.return),e.flags&32){var i=e.stateNode;try{up(i,"")}catch(A){oi(e,e.return,A)}}if(r&4&&(i=e.stateNode,i!=null)){var l=e.memoizedProps,c=n!==null?n.memoizedProps:l,o=e.type,h=e.updateQueue;if(e.updateQueue=null,h!==null)try{o==="input"&&l.type==="radio"&&l.name!=null&&LP(i,l),lb(o,c);var p=lb(o,l);for(c=0;c<h.length;c+=2){var g=h[c],b=h[c+1];g==="style"?VP(i,b):g==="dangerouslySetInnerHTML"?$P(i,b):g==="children"?up(i,b):Lw(i,g,b,p)}switch(o){case"input":rb(i,l);break;case"textarea":zP(i,l);break;case"select":var w=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!l.multiple;var P=l.value;P!=null?Md(i,!!l.multiple,P,!1):w!==!!l.multiple&&(l.defaultValue!=null?Md(i,!!l.multiple,l.defaultValue,!0):Md(i,!!l.multiple,l.multiple?[]:"",!1))}i[yp]=l}catch(A){oi(e,e.return,A)}}break;case 6:if(Da(t,e),rs(e),r&4){if(e.stateNode===null)throw Error(Kt(162));i=e.stateNode,l=e.memoizedProps;try{i.nodeValue=l}catch(A){oi(e,e.return,A)}}break;case 3:if(Da(t,e),rs(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{hp(t.containerInfo)}catch(A){oi(e,e.return,A)}break;case 4:Da(t,e),rs(e);break;case 13:Da(t,e),rs(e),i=e.child,i.flags&8192&&(l=i.memoizedState!==null,i.stateNode.isHidden=l,!l||i.alternate!==null&&i.alternate.memoizedState!==null||(mC=pi())),r&4&&FE(e);break;case 22:if(g=n!==null&&n.memoizedState!==null,e.mode&1?(io=(p=io)||g,Da(t,e),io=p):Da(t,e),rs(e),r&8192){if(p=e.memoizedState!==null,(e.stateNode.isHidden=p)&&!g&&(e.mode&1)!==0)for(xn=e,g=e.child;g!==null;){for(b=xn=g;xn!==null;){switch(w=xn,P=w.child,w.tag){case 0:case 11:case 14:case 15:Zh(4,w,w.return);break;case 1:Sd(w,w.return);var I=w.stateNode;if(typeof I.componentWillUnmount=="function"){r=w,n=w.return;try{t=r,I.props=t.memoizedProps,I.state=t.memoizedState,I.componentWillUnmount()}catch(A){oi(r,n,A)}}break;case 5:Sd(w,w.return);break;case 22:if(w.memoizedState!==null){BE(b);continue}}P!==null?(P.return=w,xn=P):BE(b)}g=g.sibling}e:for(g=null,b=e;;){if(b.tag===5){if(g===null){g=b;try{i=b.stateNode,p?(l=i.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"):(o=b.stateNode,h=b.memoizedProps.style,c=h!=null&&h.hasOwnProperty("display")?h.display:null,o.style.display=BP("display",c))}catch(A){oi(e,e.return,A)}}}else if(b.tag===6){if(g===null)try{b.stateNode.nodeValue=p?"":b.memoizedProps}catch(A){oi(e,e.return,A)}}else if((b.tag!==22&&b.tag!==23||b.memoizedState===null||b===e)&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===e)break e;for(;b.sibling===null;){if(b.return===null||b.return===e)break e;g===b&&(g=null),b=b.return}g===b&&(g=null),b.sibling.return=b.return,b=b.sibling}}break;case 19:Da(t,e),rs(e),r&4&&FE(e);break;case 21:break;default:Da(t,e),rs(e)}}function rs(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(hI(n)){var r=n;break e}n=n.return}throw Error(Kt(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(up(i,""),r.flags&=-33);var l=zE(e);Fb(e,l,i);break;case 3:case 4:var c=r.stateNode.containerInfo,o=zE(e);zb(e,o,c);break;default:throw Error(Kt(161))}}catch(h){oi(e,e.return,h)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function gF(e,t,n){xn=e,vI(e)}function vI(e,t,n){for(var r=(e.mode&1)!==0;xn!==null;){var i=xn,l=i.child;if(i.tag===22&&r){var c=i.memoizedState!==null||Ov;if(!c){var o=i.alternate,h=o!==null&&o.memoizedState!==null||io;o=Ov;var p=io;if(Ov=c,(io=h)&&!p)for(xn=i;xn!==null;)c=xn,h=c.child,c.tag===22&&c.memoizedState!==null?VE(i):h!==null?(h.return=c,xn=h):VE(i);for(;l!==null;)xn=l,vI(l),l=l.sibling;xn=i,Ov=o,io=p}$E(e)}else(i.subtreeFlags&8772)!==0&&l!==null?(l.return=i,xn=l):$E(e)}}function $E(e){for(;xn!==null;){var t=xn;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:io||Qy(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!io)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Fa(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var l=t.updateQueue;l!==null&&wE(t,l,r);break;case 3:var c=t.updateQueue;if(c!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}wE(t,c,n)}break;case 5:var o=t.stateNode;if(n===null&&t.flags&4){n=o;var h=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":h.autoFocus&&n.focus();break;case"img":h.src&&(n.src=h.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var p=t.alternate;if(p!==null){var g=p.memoizedState;if(g!==null){var b=g.dehydrated;b!==null&&hp(b)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Kt(163))}io||t.flags&512&&Lb(t)}catch(w){oi(t,t.return,w)}}if(t===e){xn=null;break}if(n=t.sibling,n!==null){n.return=t.return,xn=n;break}xn=t.return}}function BE(e){for(;xn!==null;){var t=xn;if(t===e){xn=null;break}var n=t.sibling;if(n!==null){n.return=t.return,xn=n;break}xn=t.return}}function VE(e){for(;xn!==null;){var t=xn;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Qy(4,t)}catch(h){oi(t,n,h)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(h){oi(t,i,h)}}var l=t.return;try{Lb(t)}catch(h){oi(t,l,h)}break;case 5:var c=t.return;try{Lb(t)}catch(h){oi(t,c,h)}}}catch(h){oi(t,t.return,h)}if(t===e){xn=null;break}var o=t.sibling;if(o!==null){o.return=t.return,xn=o;break}xn=t.return}}var yF=Math.ceil,ty=il.ReactCurrentDispatcher,hC=il.ReactCurrentOwner,_a=il.ReactCurrentBatchConfig,hr=0,Bi=null,Ci=null,Gi=0,Wo=0,Ed=du(0),Mi=0,Sp=null,hc=0,Jy=0,pC=0,Xh=null,Mo=null,mC=0,Hd=1/0,Ls=null,ny=!1,$b=null,Xl=null,Nv=!1,Fl=null,ry=0,Yh=0,Bb=null,gg=-1,yg=0;function _o(){return(hr&6)!==0?pi():gg!==-1?gg:gg=pi()}function Yl(e){return(e.mode&1)===0?1:(hr&2)!==0&&Gi!==0?Gi&-Gi:tF.transition!==null?(yg===0&&(yg=JP()),yg):(e=Cr,e!==0||(e=window.event,e=e===void 0?16:a8(e.type)),e)}function Ka(e,t,n,r){if(50<Yh)throw Yh=0,Bb=null,Error(Kt(185));$p(e,n,r),((hr&2)===0||e!==Bi)&&(e===Bi&&((hr&2)===0&&(Jy|=n),Mi===4&&Ll(e,Gi)),No(e,r),n===1&&hr===0&&(t.mode&1)===0&&(Hd=pi()+500,Zy&&fu()))}function No(e,t){var n=e.callbackNode;tz(e,t);var r=Bg(e,e===Bi?Gi:0);if(r===0)n!==null&&XS(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&XS(n),t===1)e.tag===0?eF(UE.bind(null,e)):E8(UE.bind(null,e)),Xz(function(){(hr&6)===0&&fu()}),n=null;else{switch(e8(r)){case 1:n=Vw;break;case 4:n=YP;break;case 16:n=$g;break;case 536870912:n=QP;break;default:n=$g}n=SI(n,gI.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function gI(e,t){if(gg=-1,yg=0,(hr&6)!==0)throw Error(Kt(327));var n=e.callbackNode;if(Dd()&&e.callbackNode!==n)return null;var r=Bg(e,e===Bi?Gi:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=iy(e,r);else{t=r;var i=hr;hr|=2;var l=xI();(Bi!==e||Gi!==t)&&(Ls=null,Hd=pi()+500,sc(e,t));do try{bF();break}catch(o){yI(e,o)}while(1);eC(),ty.current=l,hr=i,Ci!==null?t=0:(Bi=null,Gi=0,t=Mi)}if(t!==0){if(t===2&&(i=hb(e),i!==0&&(r=i,t=Vb(e,i))),t===1)throw n=Sp,sc(e,0),Ll(e,r),No(e,pi()),n;if(t===6)Ll(e,r);else{if(i=e.current.alternate,(r&30)===0&&!xF(i)&&(t=iy(e,r),t===2&&(l=hb(e),l!==0&&(r=l,t=Vb(e,l))),t===1))throw n=Sp,sc(e,0),Ll(e,r),No(e,pi()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Kt(345));case 2:qu(e,Mo,Ls);break;case 3:if(Ll(e,r),(r&130023424)===r&&(t=mC+500-pi(),10<t)){if(Bg(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){_o(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=bb(qu.bind(null,e,Mo,Ls),t);break}qu(e,Mo,Ls);break;case 4:if(Ll(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var c=31-ja(r);l=1<<c,c=t[c],c>i&&(i=c),r&=~l}if(r=i,r=pi()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*yF(r/1960))-r,10<r){e.timeoutHandle=bb(qu.bind(null,e,Mo,Ls),r);break}qu(e,Mo,Ls);break;case 5:qu(e,Mo,Ls);break;default:throw Error(Kt(329))}}}return No(e,pi()),e.callbackNode===n?gI.bind(null,e):null}function Vb(e,t){var n=Xh;return e.current.memoizedState.isDehydrated&&(sc(e,t).flags|=256),e=iy(e,t),e!==2&&(t=Mo,Mo=n,t!==null&&Ub(t)),e}function Ub(e){Mo===null?Mo=e:Mo.push.apply(Mo,e)}function xF(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],l=i.getSnapshot;i=i.value;try{if(!Ha(l(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ll(e,t){for(t&=~pC,t&=~Jy,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ja(t),r=1<<n;e[n]=-1,t&=~r}}function UE(e){if((hr&6)!==0)throw Error(Kt(327));Dd();var t=Bg(e,0);if((t&1)===0)return No(e,pi()),null;var n=iy(e,t);if(e.tag!==0&&n===2){var r=hb(e);r!==0&&(t=r,n=Vb(e,r))}if(n===1)throw n=Sp,sc(e,0),Ll(e,t),No(e,pi()),n;if(n===6)throw Error(Kt(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,qu(e,Mo,Ls),No(e,pi()),null}function vC(e,t){var n=hr;hr|=1;try{return e(t)}finally{hr=n,hr===0&&(Hd=pi()+500,Zy&&fu())}}function pc(e){Fl!==null&&Fl.tag===0&&(hr&6)===0&&Dd();var t=hr;hr|=1;var n=_a.transition,r=Cr;try{if(_a.transition=null,Cr=1,e)return e()}finally{Cr=r,_a.transition=n,hr=t,(hr&6)===0&&fu()}}function gC(){Wo=Ed.current,jr(Ed)}function sc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Zz(n)),Ci!==null)for(n=Ci.return;n!==null;){var r=n;switch(Yw(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Hg();break;case 3:jd(),jr(Ao),jr(ao),aC();break;case 5:oC(r);break;case 4:jd();break;case 13:jr(Jr);break;case 19:jr(Jr);break;case 10:tC(r.type._context);break;case 22:case 23:gC()}n=n.return}if(Bi=e,Ci=e=Ql(e.current,null),Gi=Wo=t,Mi=0,Sp=null,pC=Jy=hc=0,Mo=Xh=null,tc!==null){for(t=0;t<tc.length;t++)if(n=tc[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,l=n.pending;if(l!==null){var c=l.next;l.next=i,r.next=c}n.pending=r}tc=null}return e}function yI(e,t){do{var n=Ci;try{if(eC(),pg.current=ey,Jg){for(var r=ei.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Jg=!1}if(fc=0,$i=Ii=ei=null,qh=!1,bp=0,hC.current=null,n===null||n.return===null){Mi=1,Sp=t,Ci=null;break}e:{var l=e,c=n.return,o=n,h=t;if(t=Gi,o.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){var p=h,g=o,b=g.tag;if((g.mode&1)===0&&(b===0||b===11||b===15)){var w=g.alternate;w?(g.updateQueue=w.updateQueue,g.memoizedState=w.memoizedState,g.lanes=w.lanes):(g.updateQueue=null,g.memoizedState=null)}var P=IE(c);if(P!==null){P.flags&=-257,ME(P,c,o,l,t),P.mode&1&&PE(l,p,t),t=P,h=p;var I=t.updateQueue;if(I===null){var A=new Set;A.add(h),t.updateQueue=A}else I.add(h);break e}else{if((t&1)===0){PE(l,p,t),yC();break e}h=Error(Kt(426))}}else if(Xr&&o.mode&1){var O=IE(c);if(O!==null){(O.flags&65536)===0&&(O.flags|=256),ME(O,c,o,l,t),Qw(Kd(h,o));break e}}l=h=Kd(h,o),Mi!==4&&(Mi=2),Xh===null?Xh=[l]:Xh.push(l),l=c;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t;var M=tI(l,h,t);bE(l,M);break e;case 1:o=h;var R=l.type,N=l.stateNode;if((l.flags&128)===0&&(typeof R.getDerivedStateFromError=="function"||N!==null&&typeof N.componentDidCatch=="function"&&(Xl===null||!Xl.has(N)))){l.flags|=65536,t&=-t,l.lanes|=t;var z=nI(l,o,t);bE(l,z);break e}}l=l.return}while(l!==null)}bI(n)}catch(B){t=B,Ci===n&&n!==null&&(Ci=n=n.return);continue}break}while(1)}function xI(){var e=ty.current;return ty.current=ey,e===null?ey:e}function yC(){(Mi===0||Mi===3||Mi===2)&&(Mi=4),Bi===null||(hc&268435455)===0&&(Jy&268435455)===0||Ll(Bi,Gi)}function iy(e,t){var n=hr;hr|=2;var r=xI();(Bi!==e||Gi!==t)&&(Ls=null,sc(e,t));do try{_F();break}catch(i){yI(e,i)}while(1);if(eC(),hr=n,ty.current=r,Ci!==null)throw Error(Kt(261));return Bi=null,Gi=0,Mi}function _F(){for(;Ci!==null;)_I(Ci)}function bF(){for(;Ci!==null&&!WL();)_I(Ci)}function _I(e){var t=CI(e.alternate,e,Wo);e.memoizedProps=e.pendingProps,t===null?bI(e):Ci=t,hC.current=null}function bI(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=hF(n,t,Wo),n!==null){Ci=n;return}}else{if(n=pF(n,t),n!==null){n.flags&=32767,Ci=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Mi=6,Ci=null;return}}if(t=t.sibling,t!==null){Ci=t;return}Ci=t=e}while(t!==null);Mi===0&&(Mi=5)}function qu(e,t,n){var r=Cr,i=_a.transition;try{_a.transition=null,Cr=1,wF(e,t,n,r)}finally{_a.transition=i,Cr=r}return null}function wF(e,t,n,r){do Dd();while(Fl!==null);if((hr&6)!==0)throw Error(Kt(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Kt(177));e.callbackNode=null,e.callbackPriority=0;var l=n.lanes|n.childLanes;if(nz(e,l),e===Bi&&(Ci=Bi=null,Gi=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||Nv||(Nv=!0,SI($g,function(){return Dd(),null})),l=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||l){l=_a.transition,_a.transition=null;var c=Cr;Cr=1;var o=hr;hr|=4,hC.current=null,vF(e,n),mI(n,e),Uz(xb),Vg=!!yb,xb=yb=null,e.current=n,gF(n),GL(),hr=o,Cr=c,_a.transition=l}else e.current=n;if(Nv&&(Nv=!1,Fl=e,ry=i),l=e.pendingLanes,l===0&&(Xl=null),XL(n.stateNode),No(e,pi()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(ny)throw ny=!1,e=$b,$b=null,e;return(ry&1)!==0&&e.tag!==0&&Dd(),l=e.pendingLanes,(l&1)!==0?e===Bb?Yh++:(Yh=0,Bb=e):Yh=0,fu(),null}function Dd(){if(Fl!==null){var e=e8(ry),t=_a.transition,n=Cr;try{if(_a.transition=null,Cr=16>e?16:e,Fl===null)var r=!1;else{if(e=Fl,Fl=null,ry=0,(hr&6)!==0)throw Error(Kt(331));var i=hr;for(hr|=4,xn=e.current;xn!==null;){var l=xn,c=l.child;if((xn.flags&16)!==0){var o=l.deletions;if(o!==null){for(var h=0;h<o.length;h++){var p=o[h];for(xn=p;xn!==null;){var g=xn;switch(g.tag){case 0:case 11:case 15:Zh(8,g,l)}var b=g.child;if(b!==null)b.return=g,xn=b;else for(;xn!==null;){g=xn;var w=g.sibling,P=g.return;if(fI(g),g===p){xn=null;break}if(w!==null){w.return=P,xn=w;break}xn=P}}}var I=l.alternate;if(I!==null){var A=I.child;if(A!==null){I.child=null;do{var O=A.sibling;A.sibling=null,A=O}while(A!==null)}}xn=l}}if((l.subtreeFlags&2064)!==0&&c!==null)c.return=l,xn=c;else e:for(;xn!==null;){if(l=xn,(l.flags&2048)!==0)switch(l.tag){case 0:case 11:case 15:Zh(9,l,l.return)}var M=l.sibling;if(M!==null){M.return=l.return,xn=M;break e}xn=l.return}}var R=e.current;for(xn=R;xn!==null;){c=xn;var N=c.child;if((c.subtreeFlags&2064)!==0&&N!==null)N.return=c,xn=N;else e:for(c=R;xn!==null;){if(o=xn,(o.flags&2048)!==0)try{switch(o.tag){case 0:case 11:case 15:Qy(9,o)}}catch(B){oi(o,o.return,B)}if(o===c){xn=null;break e}var z=o.sibling;if(z!==null){z.return=o.return,xn=z;break e}xn=o.return}}if(hr=i,fu(),cs&&typeof cs.onPostCommitFiberRoot=="function")try{cs.onPostCommitFiberRoot(Ky,e)}catch{}r=!0}return r}finally{Cr=n,_a.transition=t}}return!1}function jE(e,t,n){t=Kd(n,t),t=tI(e,t,1),e=Zl(e,t,1),t=_o(),e!==null&&($p(e,1,t),No(e,t))}function oi(e,t,n){if(e.tag===3)jE(e,e,n);else for(;t!==null;){if(t.tag===3){jE(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Xl===null||!Xl.has(r))){e=Kd(n,e),e=nI(t,e,1),t=Zl(t,e,1),e=_o(),t!==null&&($p(t,1,e),No(t,e));break}}t=t.return}}function CF(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=_o(),e.pingedLanes|=e.suspendedLanes&n,Bi===e&&(Gi&n)===n&&(Mi===4||Mi===3&&(Gi&130023424)===Gi&&500>pi()-mC?sc(e,0):pC|=n),No(e,t)}function wI(e,t){t===0&&((e.mode&1)===0?t=1:(t=Sv,Sv<<=1,(Sv&130023424)===0&&(Sv=4194304)));var n=_o();e=Ys(e,t),e!==null&&($p(e,t,n),No(e,n))}function SF(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),wI(e,n)}function EF(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Kt(314))}r!==null&&r.delete(t),wI(e,n)}var CI;CI=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ao.current)Ro=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Ro=!1,fF(e,t,n);Ro=(e.flags&131072)!==0}else Ro=!1,Xr&&(t.flags&1048576)!==0&&k8(t,qg,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;vg(e,t),e=t.pendingProps;var i=Bd(t,ao.current);Nd(t,n),i=lC(null,t,r,e,i,n);var l=uC();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Oo(r)?(l=!0,Wg(t)):l=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,rC(t),i.updater=Xy,t.stateNode=i,i._reactInternals=t,Pb(t,r,e,n),t=Rb(null,t,r,!0,l,n)):(t.tag=0,Xr&&l&&Xw(t),yo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(vg(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=TF(r),e=Fa(r,e),i){case 0:t=Mb(null,t,r,e,n);break e;case 1:t=OE(null,t,r,e,n);break e;case 11:t=RE(null,t,r,e,n);break e;case 14:t=AE(null,t,r,Fa(r.type,e),n);break e}throw Error(Kt(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Fa(r,i),Mb(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Fa(r,i),OE(e,t,r,i,n);case 3:e:{if(aI(t),e===null)throw Error(Kt(387));r=t.pendingProps,l=t.memoizedState,i=l.element,M8(e,t),Yg(t,r,null,n);var c=t.memoizedState;if(r=c.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:c.cache,pendingSuspenseBoundaries:c.pendingSuspenseBoundaries,transitions:c.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){i=Kd(Error(Kt(423)),t),t=NE(e,t,r,n,i);break e}else if(r!==i){i=Kd(Error(Kt(424)),t),t=NE(e,t,r,n,i);break e}else for(Go=ql(t.stateNode.containerInfo.firstChild),Zo=t,Xr=!0,Va=null,n=N8(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Vd(),r===i){t=Qs(e,t,n);break e}yo(e,t,r,n)}t=t.child}return t;case 5:return D8(t),e===null&&Eb(t),r=t.type,i=t.pendingProps,l=e!==null?e.memoizedProps:null,c=i.children,_b(r,i)?c=null:l!==null&&_b(r,l)&&(t.flags|=32),oI(e,t),yo(e,t,c,n),t.child;case 6:return e===null&&Eb(t),null;case 13:return sI(e,t,n);case 4:return iC(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ud(t,null,r,n):yo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Fa(r,i),RE(e,t,r,i,n);case 7:return yo(e,t,t.pendingProps,n),t.child;case 8:return yo(e,t,t.pendingProps.children,n),t.child;case 12:return yo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,l=t.memoizedProps,c=i.value,$r(Zg,r._currentValue),r._currentValue=c,l!==null)if(Ha(l.value,c)){if(l.children===i.children&&!Ao.current){t=Qs(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var o=l.dependencies;if(o!==null){c=l.child;for(var h=o.firstContext;h!==null;){if(h.context===r){if(l.tag===1){h=Ws(-1,n&-n),h.tag=2;var p=l.updateQueue;if(p!==null){p=p.shared;var g=p.pending;g===null?h.next=h:(h.next=g.next,g.next=h),p.pending=h}}l.lanes|=n,h=l.alternate,h!==null&&(h.lanes|=n),kb(l.return,n,t),o.lanes|=n;break}h=h.next}}else if(l.tag===10)c=l.type===t.type?null:l.child;else if(l.tag===18){if(c=l.return,c===null)throw Error(Kt(341));c.lanes|=n,o=c.alternate,o!==null&&(o.lanes|=n),kb(c,n,t),c=l.sibling}else c=l.child;if(c!==null)c.return=l;else for(c=l;c!==null;){if(c===t){c=null;break}if(l=c.sibling,l!==null){l.return=c.return,c=l;break}c=c.return}l=c}yo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Nd(t,n),i=ba(i),r=r(i),t.flags|=1,yo(e,t,r,n),t.child;case 14:return r=t.type,i=Fa(r,t.pendingProps),i=Fa(r.type,i),AE(e,t,r,i,n);case 15:return rI(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Fa(r,i),vg(e,t),t.tag=1,Oo(r)?(e=!0,Wg(t)):e=!1,Nd(t,n),A8(t,r,i),Pb(t,r,i,n),Rb(null,t,r,!0,e,n);case 19:return lI(e,t,n);case 22:return iI(e,t,n)}throw Error(Kt(156,t.tag))};function SI(e,t){return XP(e,t)}function kF(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 xa(e,t,n,r){return new kF(e,t,n,r)}function xC(e){return e=e.prototype,!(!e||!e.isReactComponent)}function TF(e){if(typeof e=="function")return xC(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Fw)return 11;if(e===$w)return 14}return 2}function Ql(e,t){var n=e.alternate;return n===null?(n=xa(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 xg(e,t,n,r,i,l){var c=2;if(r=e,typeof e=="function")xC(e)&&(c=1);else if(typeof e=="string")c=5;else e:switch(e){case md:return lc(n.children,i,l,t);case zw:c=8,i|=8;break;case Q_:return e=xa(12,n,t,i|2),e.elementType=Q_,e.lanes=l,e;case J_:return e=xa(13,n,t,i),e.elementType=J_,e.lanes=l,e;case eb:return e=xa(19,n,t,i),e.elementType=eb,e.lanes=l,e;case OP:return e0(n,i,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case RP:c=10;break e;case AP:c=9;break e;case Fw:c=11;break e;case $w:c=14;break e;case Al:c=16,r=null;break e}throw Error(Kt(130,e==null?e:typeof e,""))}return t=xa(c,n,t,i),t.elementType=e,t.type=r,t.lanes=l,t}function lc(e,t,n,r){return e=xa(7,e,r,t),e.lanes=n,e}function e0(e,t,n,r){return e=xa(22,e,r,t),e.elementType=OP,e.lanes=n,e.stateNode={isHidden:!1},e}function Vx(e,t,n){return e=xa(6,e,null,t),e.lanes=n,e}function Ux(e,t,n){return t=xa(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function PF(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=wx(0),this.expirationTimes=wx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wx(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function _C(e,t,n,r,i,l,c,o,h){return e=new PF(e,t,n,o,h),t===1?(t=1,l===!0&&(t|=8)):t=0,l=xa(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},rC(l),e}function IF(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:pd,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function EI(e){if(!e)return iu;e=e._reactInternals;e:{if(Cc(e)!==e||e.tag!==1)throw Error(Kt(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Oo(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Kt(171))}if(e.tag===1){var n=e.type;if(Oo(n))return S8(e,n,t)}return t}function kI(e,t,n,r,i,l,c,o,h){return e=_C(n,r,!0,e,i,l,c,o,h),e.context=EI(null),n=e.current,r=_o(),i=Yl(n),l=Ws(r,i),l.callback=t!=null?t:null,Zl(n,l,i),e.current.lanes=i,$p(e,i,r),No(e,r),e}function t0(e,t,n,r){var i=t.current,l=_o(),c=Yl(i);return n=EI(n),t.context===null?t.context=n:t.pendingContext=n,t=Ws(l,c),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Zl(i,t,c),e!==null&&(Ka(e,i,c,l),hg(e,i,c)),c}function oy(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function KE(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function bC(e,t){KE(e,t),(e=e.alternate)&&KE(e,t)}function MF(){return null}var TI=typeof reportError=="function"?reportError:function(e){console.error(e)};function wC(e){this._internalRoot=e}n0.prototype.render=wC.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Kt(409));t0(e,t,null,null)};n0.prototype.unmount=wC.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;pc(function(){t0(null,e,null,null)}),t[Xs]=null}};function n0(e){this._internalRoot=e}n0.prototype.unstable_scheduleHydration=function(e){if(e){var t=r8();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Dl.length&&t!==0&&t<Dl[n].priority;n++);Dl.splice(n,0,e),n===0&&o8(e)}};function CC(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function r0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function HE(){}function RF(e,t,n,r,i){if(i){if(typeof r=="function"){var l=r;r=function(){var p=oy(c);l.call(p)}}var c=kI(t,r,e,0,null,!1,!1,"",HE);return e._reactRootContainer=c,e[Xs]=c.current,vp(e.nodeType===8?e.parentNode:e),pc(),c}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var o=r;r=function(){var p=oy(h);o.call(p)}}var h=_C(e,0,!1,null,null,!1,!1,"",HE);return e._reactRootContainer=h,e[Xs]=h.current,vp(e.nodeType===8?e.parentNode:e),pc(function(){t0(t,h,n,r)}),h}function i0(e,t,n,r,i){var l=n._reactRootContainer;if(l){var c=l;if(typeof i=="function"){var o=i;i=function(){var h=oy(c);o.call(h)}}t0(t,c,e,i)}else c=RF(n,t,e,i,r);return oy(c)}t8=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Lh(t.pendingLanes);n!==0&&(Uw(t,n|1),No(t,pi()),(hr&6)===0&&(Hd=pi()+500,fu()))}break;case 13:pc(function(){var r=Ys(e,1);if(r!==null){var i=_o();Ka(r,e,1,i)}}),bC(e,1)}};jw=function(e){if(e.tag===13){var t=Ys(e,134217728);if(t!==null){var n=_o();Ka(t,e,134217728,n)}bC(e,134217728)}};n8=function(e){if(e.tag===13){var t=Yl(e),n=Ys(e,t);if(n!==null){var r=_o();Ka(n,e,t,r)}bC(e,t)}};r8=function(){return Cr};i8=function(e,t){var n=Cr;try{return Cr=e,t()}finally{Cr=n}};cb=function(e,t,n){switch(t){case"input":if(rb(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=qy(r);if(!i)throw Error(Kt(90));DP(r),rb(r,i)}}}break;case"textarea":zP(e,n);break;case"select":t=n.value,t!=null&&Md(e,!!n.multiple,t,!1)}};KP=vC;HP=pc;var AF={usingClientEntryPoint:!1,Events:[Vp,xd,qy,UP,jP,vC]},Sh={findFiberByHostInstance:ec,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},OF={bundleType:Sh.bundleType,version:Sh.version,rendererPackageName:Sh.rendererPackageName,rendererConfig:Sh.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:il.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=qP(e),e===null?null:e.stateNode},findFiberByHostInstance:Sh.findFiberByHostInstance||MF,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Dv=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Dv.isDisabled&&Dv.supportsFiber)try{Ky=Dv.inject(OF),cs=Dv}catch{}}ea.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=AF;ea.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!CC(t))throw Error(Kt(200));return IF(e,t,null,n)};ea.createRoot=function(e,t){if(!CC(e))throw Error(Kt(299));var n=!1,r="",i=TI;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=_C(e,1,!1,null,null,n,!1,r,i),e[Xs]=t.current,vp(e.nodeType===8?e.parentNode:e),new wC(t)};ea.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Kt(188)):(e=Object.keys(e).join(","),Error(Kt(268,e)));return e=qP(t),e=e===null?null:e.stateNode,e};ea.flushSync=function(e){return pc(e)};ea.hydrate=function(e,t,n){if(!r0(t))throw Error(Kt(200));return i0(null,e,t,!0,n)};ea.hydrateRoot=function(e,t,n){if(!CC(e))throw Error(Kt(405));var r=n!=null&&n.hydratedSources||null,i=!1,l="",c=TI;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(c=n.onRecoverableError)),t=kI(t,null,e,1,n!=null?n:null,i,!1,l,c),e[Xs]=t.current,vp(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new n0(t)};ea.render=function(e,t,n){if(!r0(t))throw Error(Kt(200));return i0(null,e,t,!1,n)};ea.unmountComponentAtNode=function(e){if(!r0(e))throw Error(Kt(40));return e._reactRootContainer?(pc(function(){i0(null,null,e,!1,function(){e._reactRootContainer=null,e[Xs]=null})}),!0):!1};ea.unstable_batchedUpdates=vC;ea.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!r0(n))throw Error(Kt(200));if(e==null||e._reactInternals===void 0)throw Error(Kt(38));return i0(e,t,n,!1,r)};ea.version="18.2.0-next-9e3b772b8-20220608";(function(e){function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=ea})(uu);const mc=Iw(uu.exports),NF=xP({__proto__:null,default:mc},[uu.exports]);var WE=uu.exports;X_.createRoot=WE.createRoot,X_.hydrateRoot=WE.hydrateRoot;/**
* @remix-run/router v1.3.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Ep(){return Ep=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ep.apply(this,arguments)}var $l;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})($l||($l={}));const GE="popstate";function DF(e){e===void 0&&(e={});function t(r,i){let{pathname:l,search:c,hash:o}=r.location;return jb("",{pathname:l,search:c,hash:o},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:ay(i)}return zF(t,n,null,e)}function Si(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function LF(){return Math.random().toString(36).substr(2,8)}function qE(e,t){return{usr:e.state,key:e.key,idx:t}}function jb(e,t,n,r){return n===void 0&&(n=null),Ep({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?af(t):t,{state:n,key:t&&t.key||r||LF()})}function ay(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function af(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function zF(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:l=!1}=r,c=i.history,o=$l.Pop,h=null,p=g();p==null&&(p=0,c.replaceState(Ep({},c.state,{idx:p}),""));function g(){return(c.state||{idx:null}).idx}function b(){o=$l.Pop;let O=g(),M=O==null?null:O-p;p=O,h&&h({action:o,location:A.location,delta:M})}function w(O,M){o=$l.Push;let R=jb(A.location,O,M);n&&n(R,O),p=g()+1;let N=qE(R,p),z=A.createHref(R);try{c.pushState(N,"",z)}catch{i.location.assign(z)}l&&h&&h({action:o,location:A.location,delta:1})}function P(O,M){o=$l.Replace;let R=jb(A.location,O,M);n&&n(R,O),p=g();let N=qE(R,p),z=A.createHref(R);c.replaceState(N,"",z),l&&h&&h({action:o,location:A.location,delta:0})}function I(O){let M=i.location.origin!=="null"?i.location.origin:i.location.href,R=typeof O=="string"?O:ay(O);return Si(M,"No window.location.(origin|href) available to create URL for href: "+R),new URL(R,M)}let A={get action(){return o},get location(){return e(i,c)},listen(O){if(h)throw new Error("A history only accepts one active listener");return i.addEventListener(GE,b),h=O,()=>{i.removeEventListener(GE,b),h=null}},createHref(O){return t(i,O)},createURL:I,encodeLocation(O){let M=I(O);return{pathname:M.pathname,search:M.search,hash:M.hash}},push:w,replace:P,go(O){return c.go(O)}};return A}var ZE;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ZE||(ZE={}));function FF(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?af(t):t,i=MI(r.pathname||"/",n);if(i==null)return null;let l=PI(e);$F(l);let c=null;for(let o=0;c==null&&o<l.length;++o)c=qF(l[o],YF(i));return c}function PI(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(l,c,o)=>{let h={relativePath:o===void 0?l.path||"":o,caseSensitive:l.caseSensitive===!0,childrenIndex:c,route:l};h.relativePath.startsWith("/")&&(Si(h.relativePath.startsWith(r),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(r.length));let p=Jl([r,h.relativePath]),g=n.concat(h);l.children&&l.children.length>0&&(Si(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+p+'".')),PI(l.children,t,g,p)),!(l.path==null&&!l.index)&&t.push({path:p,score:WF(p,l.index),routesMeta:g})};return e.forEach((l,c)=>{var o;if(l.path===""||!((o=l.path)!=null&&o.includes("?")))i(l,c);else for(let h of II(l.path))i(l,c,h)}),t}function II(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),l=n.replace(/\?$/,"");if(r.length===0)return i?[l,""]:[l];let c=II(r.join("/")),o=[];return o.push(...c.map(h=>h===""?l:[l,h].join("/"))),i&&o.push(...c),o.map(h=>e.startsWith("/")&&h===""?"/":h)}function $F(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:GF(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const BF=/^:\w+$/,VF=3,UF=2,jF=1,KF=10,HF=-2,XE=e=>e==="*";function WF(e,t){let n=e.split("/"),r=n.length;return n.some(XE)&&(r+=HF),t&&(r+=UF),n.filter(i=>!XE(i)).reduce((i,l)=>i+(BF.test(l)?VF:l===""?jF:KF),r)}function GF(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function qF(e,t){let{routesMeta:n}=e,r={},i="/",l=[];for(let c=0;c<n.length;++c){let o=n[c],h=c===n.length-1,p=i==="/"?t:t.slice(i.length)||"/",g=ZF({path:o.relativePath,caseSensitive:o.caseSensitive,end:h},p);if(!g)return null;Object.assign(r,g.params);let b=o.route;l.push({params:r,pathname:Jl([i,g.pathname]),pathnameBase:t$(Jl([i,g.pathnameBase])),route:b}),g.pathnameBase!=="/"&&(i=Jl([i,g.pathnameBase]))}return l}function ZF(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=XF(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let l=i[0],c=l.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:r.reduce((p,g,b)=>{if(g==="*"){let w=o[b]||"";c=l.slice(0,l.length-w.length).replace(/(.)\/+$/,"$1")}return p[g]=QF(o[b]||"",g),p},{}),pathname:l,pathnameBase:c,pattern:e}}function XF(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),SC(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(c,o)=>(r.push(o),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function YF(e){try{return decodeURI(e)}catch(t){return SC(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function QF(e,t){try{return decodeURIComponent(e)}catch(n){return SC(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function MI(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function SC(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function JF(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?af(e):e;return{pathname:n?n.startsWith("/")?n:e$(n,t):t,search:n$(r),hash:r$(i)}}function e$(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function jx(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function RI(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function AI(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=af(e):(i=Ep({},e),Si(!i.pathname||!i.pathname.includes("?"),jx("?","pathname","search",i)),Si(!i.pathname||!i.pathname.includes("#"),jx("#","pathname","hash",i)),Si(!i.search||!i.search.includes("#"),jx("#","search","hash",i)));let l=e===""||i.pathname==="",c=l?"/":i.pathname,o;if(r||c==null)o=n;else{let b=t.length-1;if(c.startsWith("..")){let w=c.split("/");for(;w[0]==="..";)w.shift(),b-=1;i.pathname=w.join("/")}o=b>=0?t[b]:"/"}let h=JF(i,o),p=c&&c!=="/"&&c.endsWith("/"),g=(l||c===".")&&n.endsWith("/");return!h.pathname.endsWith("/")&&(p||g)&&(h.pathname+="/"),h}const Jl=e=>e.join("/").replace(/\/\/+/g,"/"),t$=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),n$=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,r$=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function i$(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const o$=["post","put","patch","delete"];[...o$];var o0={exports:{}},a0={};/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var a$=C.exports,s$=Symbol.for("react.element"),l$=Symbol.for("react.fragment"),u$=Object.prototype.hasOwnProperty,c$=a$.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d$={key:!0,ref:!0,__self:!0,__source:!0};function OI(e,t,n){var r,i={},l=null,c=null;n!==void 0&&(l=""+n),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(c=t.ref);for(r in t)u$.call(t,r)&&!d$.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:s$,type:e,key:l,ref:c,props:i,_owner:c$.current}}a0.Fragment=l$;a0.jsx=OI;a0.jsxs=OI;(function(e){e.exports=a0})(o0);const $n=o0.exports.Fragment,E=o0.exports.jsx,Qe=o0.exports.jsxs;/**
* React Router v6.8.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Kb(){return Kb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kb.apply(this,arguments)}function f$(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const h$=typeof Object.is=="function"?Object.is:f$,{useState:p$,useEffect:m$,useLayoutEffect:v$,useDebugValue:g$}=Dg;function y$(e,t,n){const r=t(),[{inst:i},l]=p$({inst:{value:r,getSnapshot:t}});return v$(()=>{i.value=r,i.getSnapshot=t,Kx(i)&&l({inst:i})},[e,r,t]),m$(()=>(Kx(i)&&l({inst:i}),e(()=>{Kx(i)&&l({inst:i})})),[e]),g$(r),r}function Kx(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!h$(n,r)}catch{return!0}}function x$(e,t,n){return t()}const _$=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",b$=!_$,w$=b$?x$:y$;"useSyncExternalStore"in Dg&&(e=>e.useSyncExternalStore)(Dg);const NI=C.exports.createContext(null),EC=C.exports.createContext(null),s0=C.exports.createContext(null),l0=C.exports.createContext(null),sf=C.exports.createContext({outlet:null,matches:[]}),DI=C.exports.createContext(null);function C$(e,t){let{relative:n}=t===void 0?{}:t;lf()||Si(!1);let{basename:r,navigator:i}=C.exports.useContext(s0),{hash:l,pathname:c,search:o}=LI(e,{relative:n}),h=c;return r!=="/"&&(h=c==="/"?r:Jl([r,c])),i.createHref({pathname:h,search:o,hash:l})}function lf(){return C.exports.useContext(l0)!=null}function jp(){return lf()||Si(!1),C.exports.useContext(l0).location}function kC(){lf()||Si(!1);let{basename:e,navigator:t}=C.exports.useContext(s0),{matches:n}=C.exports.useContext(sf),{pathname:r}=jp(),i=JSON.stringify(RI(n).map(o=>o.pathnameBase)),l=C.exports.useRef(!1);return C.exports.useEffect(()=>{l.current=!0}),C.exports.useCallback(function(o,h){if(h===void 0&&(h={}),!l.current)return;if(typeof o=="number"){t.go(o);return}let p=AI(o,JSON.parse(i),r,h.relative==="path");e!=="/"&&(p.pathname=p.pathname==="/"?e:Jl([e,p.pathname])),(h.replace?t.replace:t.push)(p,h.state,h)},[e,t,i,r])}function LI(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=C.exports.useContext(sf),{pathname:i}=jp(),l=JSON.stringify(RI(r).map(c=>c.pathnameBase));return C.exports.useMemo(()=>AI(e,JSON.parse(l),i,n==="path"),[e,l,i,n])}function S$(e,t){lf()||Si(!1);let{navigator:n}=C.exports.useContext(s0),r=C.exports.useContext(EC),{matches:i}=C.exports.useContext(sf),l=i[i.length-1],c=l?l.params:{};l&&l.pathname;let o=l?l.pathnameBase:"/";l&&l.route;let h=jp(),p;if(t){var g;let A=typeof t=="string"?af(t):t;o==="/"||((g=A.pathname)==null?void 0:g.startsWith(o))||Si(!1),p=A}else p=h;let b=p.pathname||"/",w=o==="/"?b:b.slice(o.length)||"/",P=FF(e,{pathname:w}),I=P$(P&&P.map(A=>Object.assign({},A,{params:Object.assign({},c,A.params),pathname:Jl([o,n.encodeLocation?n.encodeLocation(A.pathname).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?o:Jl([o,n.encodeLocation?n.encodeLocation(A.pathnameBase).pathname:A.pathnameBase])})),i,r||void 0);return t&&I?E(l0.Provider,{value:{location:Kb({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:$l.Pop},children:I}):I}function E$(){let e=A$(),t=i$(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return Qe($n,{children:[E("h2",{children:"Unexpected Application Error!"}),E("h3",{style:{fontStyle:"italic"},children:t}),n?E("pre",{style:{padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},children:n}):null,null]})}class k$ extends C.exports.Component{constructor(t){super(t),this.state={location:t.location,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location?{error:t.error,location:t.location}:{error:t.error||n.error,location:n.location}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?E(sf.Provider,{value:this.props.routeContext,children:E(DI.Provider,{value:this.state.error,children:this.props.component})}):this.props.children}}function T$(e){let{routeContext:t,match:n,children:r}=e,i=C.exports.useContext(NI);return i&&i.static&&i.staticContext&&n.route.errorElement&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),E(sf.Provider,{value:t,children:r})}function P$(e,t,n){if(t===void 0&&(t=[]),e==null)if(n!=null&&n.errors)e=n.matches;else return null;let r=e,i=n==null?void 0:n.errors;if(i!=null){let l=r.findIndex(c=>c.route.id&&(i==null?void 0:i[c.route.id]));l>=0||Si(!1),r=r.slice(0,Math.min(r.length,l+1))}return r.reduceRight((l,c,o)=>{let h=c.route.id?i==null?void 0:i[c.route.id]:null,p=n?c.route.errorElement||E(E$,{}):null,g=t.concat(r.slice(0,o+1)),b=()=>E(T$,{match:c,routeContext:{outlet:l,matches:g},children:h?p:c.route.element!==void 0?c.route.element:l});return n&&(c.route.errorElement||o===0)?E(k$,{location:n.location,component:p,error:h,children:b(),routeContext:{outlet:null,matches:g}}):b()},null)}var YE;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator"})(YE||(YE={}));var sy;(function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(sy||(sy={}));function I$(e){let t=C.exports.useContext(EC);return t||Si(!1),t}function M$(e){let t=C.exports.useContext(sf);return t||Si(!1),t}function R$(e){let t=M$(),n=t.matches[t.matches.length-1];return n.route.id||Si(!1),n.route.id}function A$(){var e;let t=C.exports.useContext(DI),n=I$(sy.UseRouteError),r=R$(sy.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function u0(e){let{to:t,replace:n,state:r,relative:i}=e;lf()||Si(!1);let l=C.exports.useContext(EC),c=kC();return C.exports.useEffect(()=>{l&&l.navigation.state!=="idle"||c(t,{replace:n,state:r,relative:i})}),null}function Fh(e){Si(!1)}function O$(e){let{basename:t="/",children:n=null,location:r,navigationType:i=$l.Pop,navigator:l,static:c=!1}=e;lf()&&Si(!1);let o=t.replace(/^\/*/,"/"),h=C.exports.useMemo(()=>({basename:o,navigator:l,static:c}),[o,l,c]);typeof r=="string"&&(r=af(r));let{pathname:p="/",search:g="",hash:b="",state:w=null,key:P="default"}=r,I=C.exports.useMemo(()=>{let A=MI(p,o);return A==null?null:{pathname:A,search:g,hash:b,state:w,key:P}},[o,p,g,b,w,P]);return I==null?null:E(s0.Provider,{value:h,children:E(l0.Provider,{children:n,value:{location:I,navigationType:i}})})}function N$(e){let{children:t,location:n}=e,r=C.exports.useContext(NI),i=r&&!t?r.router.routes:Hb(t);return S$(i,n)}var QE;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(QE||(QE={}));new Promise(()=>{});function Hb(e,t){t===void 0&&(t=[]);let n=[];return C.exports.Children.forEach(e,(r,i)=>{if(!C.exports.isValidElement(r))return;if(r.type===C.exports.Fragment){n.push.apply(n,Hb(r.props.children,t));return}r.type!==Fh&&Si(!1),!r.props.index||!r.props.children||Si(!1);let l=[...t,i],c={id:r.props.id||l.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,hasErrorBoundary:r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle};r.props.children&&(c.children=Hb(r.props.children,l)),n.push(c)}),n}/**
* React Router DOM v6.8.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function D$(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,l;for(l=0;l<r.length;l++)i=r[l],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function L$(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function z$(e,t){return e.button===0&&(!t||t==="_self")&&!L$(e)}function Wb(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function F$(e,t){let n=Wb(e);if(t)for(let r of t.keys())n.has(r)||t.getAll(r).forEach(i=>{n.append(r,i)});return n}const $$=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function B$(e){let{basename:t,children:n,window:r}=e,i=C.exports.useRef();i.current==null&&(i.current=DF({window:r,v5Compat:!0}));let l=i.current,[c,o]=C.exports.useState({action:l.action,location:l.location});return C.exports.useLayoutEffect(()=>l.listen(o),[l]),E(O$,{basename:t,children:n,location:c.location,navigationType:c.action,navigator:l})}const V$=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Gb=C.exports.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:l,replace:c,state:o,target:h,to:p,preventScrollReset:g}=t,b=D$(t,$$),w,P=!1;if(V$&&typeof p=="string"&&/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i.test(p)){w=p;let M=new URL(window.location.href),R=p.startsWith("//")?new URL(M.protocol+p):new URL(p);R.origin===M.origin?p=R.pathname+R.search+R.hash:P=!0}let I=C$(p,{relative:i}),A=U$(p,{replace:c,state:o,target:h,preventScrollReset:g,relative:i});function O(M){r&&r(M),M.defaultPrevented||A(M)}return E("a",{...b,href:w||I,onClick:P||l?r:O,ref:n,target:h})});var JE;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(JE||(JE={}));var e6;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(e6||(e6={}));function U$(e,t){let{target:n,replace:r,state:i,preventScrollReset:l,relative:c}=t===void 0?{}:t,o=kC(),h=jp(),p=LI(e,{relative:c});return C.exports.useCallback(g=>{if(z$(g,n)){g.preventDefault();let b=r!==void 0?r:ay(h)===ay(p);o(e,{replace:b,state:i,preventScrollReset:l,relative:c})}},[h,o,p,r,i,n,e,l,c])}function j$(e){let t=C.exports.useRef(Wb(e)),n=C.exports.useRef(!1),r=jp(),i=C.exports.useMemo(()=>F$(r.search,n.current?null:t.current),[r.search]),l=kC(),c=C.exports.useCallback((o,h)=>{const p=Wb(typeof o=="function"?o(i):o);n.current=!0,l("?"+p,h)},[l,i]);return[i,c]}let Hx=0,t6=[];function K$(){return Hx+=1,()=>{if(Hx-=1,Hx===0){let e=t6;t6=[];for(let t of e)t()}}}let Lv=Symbol(),H$=(e,t,n,r)=>{let i={...e};i.set=(...c)=>{e[Lv]=t,e.set(...c),delete e[Lv]},e.setKey&&(i.setKey=(...c)=>{e[Lv]=t,e.setKey(...c),delete e[Lv]});let l=n(i,...r);if(l instanceof Promise){let c=K$();return l.finally(c)}return l},W$=(e,t,n)=>(...r)=>H$(e,t,n,r),go=[],uf=(e,t)=>{let n,r=[],i={lc:0,l:t||0,value:e,set(l){i.value=l,i.notify()},get(){return i.lc||i.listen(()=>{})(),i.value},notify(l){n=r;let c=!go.length;for(let o=0;o<n.length;o+=2)go.push(n[o],i.value,l,n[o+1]);if(c){for(let o=0;o<go.length;o+=4){let h=!1;for(let p=o+7;p<go.length;p+=4)if(go[p]<go[o+3]){h=!0;break}h?go.push(go[o],go[o+1],go[o+2],go[o+3]):go[o](go[o+1],go[o+2])}go.length=0}},listen(l,c){return r===n&&(r=r.slice()),i.lc=r.push(l,c||i.l)/2,()=>{r===n&&(r=r.slice());let o=r.indexOf(l);~o&&(r.splice(o,2),i.lc--)}},subscribe(l,c){let o=i.listen(l,c);return l(i.value),o},off(){}};return i};function G$(e,t,n){let r=new Set([...t,void 0]);return e.listen((i,l)=>{r.has(l)&&n(i,l)})}var c0={exports:{}},zI={};/**
* @license React
* use-sync-external-store-shim.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Wd=C.exports;function q$(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Z$=typeof Object.is=="function"?Object.is:q$,X$=Wd.useState,Y$=Wd.useEffect,Q$=Wd.useLayoutEffect,J$=Wd.useDebugValue;function eB(e,t){var n=t(),r=X$({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return Q$(function(){i.value=n,i.getSnapshot=t,Wx(i)&&l({inst:i})},[e,n,t]),Y$(function(){return Wx(i)&&l({inst:i}),e(function(){Wx(i)&&l({inst:i})})},[e]),J$(n),n}function Wx(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Z$(e,n)}catch{return!0}}function tB(e,t){return t()}var nB=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?tB:eB;zI.useSyncExternalStore=Wd.useSyncExternalStore!==void 0?Wd.useSyncExternalStore:nB;(function(e){e.exports=zI})(c0);function ou(e,t={}){let n=C.exports.useCallback(i=>t.keys?G$(e,t.keys,i):e.listen(i),[t.keys,e]),r=e.get.bind(e);return c0.exports.useSyncExternalStore(n,r,r)}function tt(){return tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tt.apply(this,arguments)}function sn(e){return sn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sn(e)}function rB(e,t){if(sn(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(sn(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function FI(e){var t=rB(e,"string");return sn(t)==="symbol"?t:String(t)}function se(e,t,n){return t=FI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n6(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,FI(r.key),r)}}function Hr(e,t,n){return t&&n6(e.prototype,t),n&&n6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function qb(e,t){return qb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},qb(e,t)}function li(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qb(e,t)}function ly(e){return ly=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ly(e)}function iB(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function On(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oB(e,t){if(t&&(sn(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return On(e)}function ui(e){var t=iB();return function(){var r=ly(e),i;if(t){var l=ly(this).constructor;i=Reflect.construct(r,arguments,l)}else i=r.apply(this,arguments);return oB(this,i)}}var $I={exports:{}};/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var l=arguments[i];if(!!l){var c=typeof l;if(c==="string"||c==="number")r.push(l);else if(Array.isArray(l)){if(l.length){var o=n.apply(null,l);o&&r.push(o)}}else if(c==="object"){if(l.toString!==Object.prototype.toString&&!l.toString.toString().includes("[native code]")){r.push(l.toString());continue}for(var h in l)t.call(l,h)&&l[h]&&r.push(h)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})($I);const Ye=$I.exports;var TC={exports:{}},Sr={};/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Ui=typeof Symbol=="function"&&Symbol.for,PC=Ui?Symbol.for("react.element"):60103,IC=Ui?Symbol.for("react.portal"):60106,d0=Ui?Symbol.for("react.fragment"):60107,f0=Ui?Symbol.for("react.strict_mode"):60108,h0=Ui?Symbol.for("react.profiler"):60114,p0=Ui?Symbol.for("react.provider"):60109,m0=Ui?Symbol.for("react.context"):60110,MC=Ui?Symbol.for("react.async_mode"):60111,v0=Ui?Symbol.for("react.concurrent_mode"):60111,g0=Ui?Symbol.for("react.forward_ref"):60112,y0=Ui?Symbol.for("react.suspense"):60113,aB=Ui?Symbol.for("react.suspense_list"):60120,x0=Ui?Symbol.for("react.memo"):60115,_0=Ui?Symbol.for("react.lazy"):60116,sB=Ui?Symbol.for("react.block"):60121,lB=Ui?Symbol.for("react.fundamental"):60117,uB=Ui?Symbol.for("react.responder"):60118,cB=Ui?Symbol.for("react.scope"):60119;function na(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case PC:switch(e=e.type,e){case MC:case v0:case d0:case h0:case f0:case y0:return e;default:switch(e=e&&e.$$typeof,e){case m0:case g0:case _0:case x0:case p0:return e;default:return t}}case IC:return t}}}function BI(e){return na(e)===v0}Sr.AsyncMode=MC;Sr.ConcurrentMode=v0;Sr.ContextConsumer=m0;Sr.ContextProvider=p0;Sr.Element=PC;Sr.ForwardRef=g0;Sr.Fragment=d0;Sr.Lazy=_0;Sr.Memo=x0;Sr.Portal=IC;Sr.Profiler=h0;Sr.StrictMode=f0;Sr.Suspense=y0;Sr.isAsyncMode=function(e){return BI(e)||na(e)===MC};Sr.isConcurrentMode=BI;Sr.isContextConsumer=function(e){return na(e)===m0};Sr.isContextProvider=function(e){return na(e)===p0};Sr.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===PC};Sr.isForwardRef=function(e){return na(e)===g0};Sr.isFragment=function(e){return na(e)===d0};Sr.isLazy=function(e){return na(e)===_0};Sr.isMemo=function(e){return na(e)===x0};Sr.isPortal=function(e){return na(e)===IC};Sr.isProfiler=function(e){return na(e)===h0};Sr.isStrictMode=function(e){return na(e)===f0};Sr.isSuspense=function(e){return na(e)===y0};Sr.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===d0||e===v0||e===h0||e===f0||e===y0||e===aB||typeof e=="object"&&e!==null&&(e.$$typeof===_0||e.$$typeof===x0||e.$$typeof===p0||e.$$typeof===m0||e.$$typeof===g0||e.$$typeof===lB||e.$$typeof===uB||e.$$typeof===cB||e.$$typeof===sB)};Sr.typeOf=na;(function(e){e.exports=Sr})(TC);function Xi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[];return tr.Children.forEach(e,function(r){r==null&&!t.keepEmpty||(Array.isArray(r)?n=n.concat(Xi(r)):TC.exports.isFragment(r)&&r.props?n=n.concat(Xi(r.props.children,t)):n.push(r))}),n}var r6={};function dB(e,t){}function fB(e,t,n){!t&&!r6[n]&&(e(!1,n),r6[n]=!0)}function Nr(e,t){fB(dB,e,t)}function i6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?i6(Object(n),!0).forEach(function(r){se(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kp(e,t,n){var r=C.exports.useRef({});return(!("value"in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}function uy(e,t){typeof e=="function"?e(t):sn(e)==="object"&&e&&"current"in e&&(e.current=t)}function Lo(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter(function(i){return i});return r.length<=1?r[0]:function(i){t.forEach(function(l){uy(l,i)})}}function VI(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Kp(function(){return Lo.apply(void 0,t)},t,function(r,i){return r.length===i.length&&r.every(function(l,c){return l===i[c]})})}function Sc(e){var t,n,r=TC.exports.isMemo(e)?e.type.type:e.type;return!(typeof r=="function"&&!((t=r.prototype)!==null&&t!==void 0&&t.render)||typeof e=="function"&&!((n=e.prototype)!==null&&n!==void 0&&n.render))}function kp(e){return e instanceof HTMLElement?e:e instanceof tr.Component?mc.findDOMNode(e):null}var UI=function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(i,l){return i[0]===n?(r=l,!0):!1}),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var r=e(this.__entries__,n),i=this.__entries__[r];return i&&i[1]},t.prototype.set=function(n,r){var i=e(this.__entries__,n);~i?this.__entries__[i][1]=r:this.__entries__.push([n,r])},t.prototype.delete=function(n){var r=this.__entries__,i=e(r,n);~i&&r.splice(i,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var i=0,l=this.__entries__;i<l.length;i++){var c=l[i];n.call(r,c[1],c[0])}},t}()}(),Zb=typeof window<"u"&&typeof document<"u"&&window.document===document,cy=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),hB=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(cy):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),pB=2;function mB(e,t){var n=!1,r=!1,i=0;function l(){n&&(n=!1,e()),r&&o()}function c(){hB(l)}function o(){var h=Date.now();if(n){if(h-i<pB)return;r=!0}else n=!0,r=!1,setTimeout(c,t);i=h}return o}var vB=20,gB=["top","right","bottom","left","width","height","size","weight"],yB=typeof MutationObserver<"u",xB=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=mB(this.refresh.bind(this),vB)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var n=this.observers_,r=n.indexOf(t);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return t.forEach(function(n){return n.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!Zb||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),yB?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!Zb||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,r=n===void 0?"":n,i=gB.some(function(l){return!!~r.indexOf(l)});i&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),jI=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},Gd=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||cy},KI=b0(0,0,0,0);function dy(e){return parseFloat(e)||0}function o6(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,i){var l=e["border-"+i+"-width"];return r+dy(l)},0)}function _B(e){for(var t=["top","right","bottom","left"],n={},r=0,i=t;r<i.length;r++){var l=i[r],c=e["padding-"+l];n[l]=dy(c)}return n}function bB(e){var t=e.getBBox();return b0(0,0,t.width,t.height)}function wB(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return KI;var r=Gd(e).getComputedStyle(e),i=_B(r),l=i.left+i.right,c=i.top+i.bottom,o=dy(r.width),h=dy(r.height);if(r.boxSizing==="border-box"&&(Math.round(o+l)!==t&&(o-=o6(r,"left","right")+l),Math.round(h+c)!==n&&(h-=o6(r,"top","bottom")+c)),!SB(e)){var p=Math.round(o+l)-t,g=Math.round(h+c)-n;Math.abs(p)!==1&&(o-=p),Math.abs(g)!==1&&(h-=g)}return b0(i.left,i.top,o,h)}var CB=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof Gd(e).SVGGraphicsElement}:function(e){return e instanceof Gd(e).SVGElement&&typeof e.getBBox=="function"}}();function SB(e){return e===Gd(e).document.documentElement}function EB(e){return Zb?CB(e)?bB(e):wB(e):KI}function kB(e){var t=e.x,n=e.y,r=e.width,i=e.height,l=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,c=Object.create(l.prototype);return jI(c,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),c}function b0(e,t,n,r){return{x:e,y:t,width:n,height:r}}var TB=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=b0(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=EB(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e}(),PB=function(){function e(t,n){var r=kB(n);jI(this,{target:t,contentRect:r})}return e}(),IB=function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new UI,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Gd(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new TB(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Gd(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;!n.has(t)||(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(!!this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new PB(r.target,r.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),HI=typeof WeakMap<"u"?new WeakMap:new UI,WI=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=xB.getInstance(),r=new IB(t,n,this);HI.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){WI.prototype[e]=function(){var t;return(t=HI.get(this))[e].apply(t,arguments)}});var GI=function(){return typeof cy.ResizeObserver<"u"?cy.ResizeObserver:WI}(),Bl=new Map;function MB(e){e.forEach(function(t){var n,r=t.target;(n=Bl.get(r))===null||n===void 0||n.forEach(function(i){return i(r)})})}var qI=new GI(MB);function RB(e,t){Bl.has(e)||(Bl.set(e,new Set),qI.observe(e)),Bl.get(e).add(t)}function AB(e,t){Bl.has(e)&&(Bl.get(e).delete(t),Bl.get(e).size||(qI.unobserve(e),Bl.delete(e)))}var OB=function(e){li(n,e);var t=ui(n);function n(){return Kr(this,n),t.apply(this,arguments)}return Hr(n,[{key:"render",value:function(){return this.props.children}}]),n}(C.exports.Component),Xb=C.exports.createContext(null);function NB(e){var t=e.children,n=e.onBatchResize,r=C.exports.useRef(0),i=C.exports.useRef([]),l=C.exports.useContext(Xb),c=C.exports.useCallback(function(o,h,p){r.current+=1;var g=r.current;i.current.push({size:o,element:h,data:p}),Promise.resolve().then(function(){g===r.current&&(n==null||n(i.current),i.current=[])}),l==null||l(o,h,p)},[n,l]);return E(Xb.Provider,{value:c,children:t})}function DB(e,t){var n=e.children,r=e.disabled,i=C.exports.useRef(null),l=C.exports.useRef(null),c=C.exports.useContext(Xb),o=typeof n=="function",h=o?n(i):n,p=C.exports.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),g=!o&&C.exports.isValidElement(h)&&Sc(h),b=g?h.ref:null,w=C.exports.useMemo(function(){return Lo(b,i)},[b,i]),P=function(){return kp(i.current)||kp(l.current)};C.exports.useImperativeHandle(t,function(){return P()});var I=C.exports.useRef(e);I.current=e;var A=C.exports.useCallback(function(O){var M=I.current,R=M.onResize,N=M.data,z=O.getBoundingClientRect(),B=z.width,U=z.height,q=O.offsetWidth,H=O.offsetHeight,te=Math.floor(B),Y=Math.floor(U);if(p.current.width!==te||p.current.height!==Y||p.current.offsetWidth!==q||p.current.offsetHeight!==H){var le={width:te,height:Y,offsetWidth:q,offsetHeight:H};p.current=le;var J=q===Math.round(B)?B:q,Z=H===Math.round(U)?U:H,Q=ve(ve({},le),{},{offsetWidth:J,offsetHeight:Z});c==null||c(Q,O,N),R&&Promise.resolve().then(function(){R(Q,O)})}},[]);return C.exports.useEffect(function(){var O=P();return O&&!r&&RB(O,A),function(){return AB(O,A)}},[i.current,r]),E(OB,{ref:l,children:g?C.exports.cloneElement(h,{ref:w}):h})}var LB=C.exports.forwardRef(DB),zB="rc-observer-key";function FB(e,t){var n=e.children,r=typeof n=="function"?[n]:Xi(n);return r.map(function(i,l){var c=(i==null?void 0:i.key)||"".concat(zB,"-").concat(l);return C.exports.createElement(LB,{...e,key:c,ref:l===0?t:void 0},i)})}var ol=C.exports.forwardRef(FB);ol.Collection=NB;function mi(e,t){var n=ve({},e);return Array.isArray(t)&&t.forEach(function(r){delete n[r]}),n}var $B=C.exports.createContext({});const RC=$B;function BB(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,l;for(l=0;l<r.length;l++)i=r[l],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function In(e,t){if(e==null)return{};var n=BB(e,t),r,i;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function Yb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function VB(e){if(Array.isArray(e))return Yb(e)}function ZI(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function AC(e,t){if(!!e){if(typeof e=="string")return Yb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Yb(e,t)}}function UB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wt(e){return VB(e)||ZI(e)||AC(e)||UB()}var rc="RC_FORM_INTERNAL_HOOKS",Tr=function(){Nr(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},vc=C.exports.createContext({getFieldValue:Tr,getFieldsValue:Tr,getFieldError:Tr,getFieldWarning:Tr,getFieldsError:Tr,isFieldsTouched:Tr,isFieldTouched:Tr,isFieldValidating:Tr,isFieldsValidating:Tr,resetFields:Tr,setFields:Tr,setFieldValue:Tr,setFieldsValue:Tr,validateFields:Tr,submit:Tr,getInternalHooks:function(){return Tr(),{dispatch:Tr,initEntityValue:Tr,registerField:Tr,useSubscribe:Tr,setInitialValues:Tr,destroyForm:Tr,setCallbacks:Tr,registerWatch:Tr,getFields:Tr,setValidateMessages:Tr,setPreserve:Tr,getInitialValue:Tr}}});function Qb(e){return e==null?[]:Array.isArray(e)?e:[e]}function bo(){bo=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(J,Z,Q){J[Z]=Q.value},i=typeof Symbol=="function"?Symbol:{},l=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",o=i.toStringTag||"@@toStringTag";function h(J,Z,Q){return Object.defineProperty(J,Z,{value:Q,enumerable:!0,configurable:!0,writable:!0}),J[Z]}try{h({},"")}catch{h=function(Q,ge,re){return Q[ge]=re}}function p(J,Z,Q,ge){var re=Z&&Z.prototype instanceof w?Z:w,de=Object.create(re.prototype),oe=new te(ge||[]);return r(de,"_invoke",{value:B(J,Q,oe)}),de}function g(J,Z,Q){try{return{type:"normal",arg:J.call(Z,Q)}}catch(ge){return{type:"throw",arg:ge}}}e.wrap=p;var b={};function w(){}function P(){}function I(){}var A={};h(A,l,function(){return this});var O=Object.getPrototypeOf,M=O&&O(O(Y([])));M&&M!==t&&n.call(M,l)&&(A=M);var R=I.prototype=w.prototype=Object.create(A);function N(J){["next","throw","return"].forEach(function(Z){h(J,Z,function(Q){return this._invoke(Z,Q)})})}function z(J,Z){function Q(re,de,oe,ye){var Re=g(J[re],J,de);if(Re.type!=="throw"){var Te=Re.arg,ke=Te.value;return ke&&sn(ke)=="object"&&n.call(ke,"__await")?Z.resolve(ke.__await).then(function(De){Q("next",De,oe,ye)},function(De){Q("throw",De,oe,ye)}):Z.resolve(ke).then(function(De){Te.value=De,oe(Te)},function(De){return Q("throw",De,oe,ye)})}ye(Re.arg)}var ge;r(this,"_invoke",{value:function(de,oe){function ye(){return new Z(function(Re,Te){Q(de,oe,Re,Te)})}return ge=ge?ge.then(ye,ye):ye()}})}function B(J,Z,Q){var ge="suspendedStart";return function(re,de){if(ge==="executing")throw new Error("Generator is already running");if(ge==="completed"){if(re==="throw")throw de;return le()}for(Q.method=re,Q.arg=de;;){var oe=Q.delegate;if(oe){var ye=U(oe,Q);if(ye){if(ye===b)continue;return ye}}if(Q.method==="next")Q.sent=Q._sent=Q.arg;else if(Q.method==="throw"){if(ge==="suspendedStart")throw ge="completed",Q.arg;Q.dispatchException(Q.arg)}else Q.method==="return"&&Q.abrupt("return",Q.arg);ge="executing";var Re=g(J,Z,Q);if(Re.type==="normal"){if(ge=Q.done?"completed":"suspendedYield",Re.arg===b)continue;return{value:Re.arg,done:Q.done}}Re.type==="throw"&&(ge="completed",Q.method="throw",Q.arg=Re.arg)}}}function U(J,Z){var Q=Z.method,ge=J.iterator[Q];if(ge===void 0)return Z.delegate=null,Q==="throw"&&J.iterator.return&&(Z.method="return",Z.arg=void 0,U(J,Z),Z.method==="throw")||Q!=="return"&&(Z.method="throw",Z.arg=new TypeError("The iterator does not provide a '"+Q+"' method")),b;var re=g(ge,J.iterator,Z.arg);if(re.type==="throw")return Z.method="throw",Z.arg=re.arg,Z.delegate=null,b;var de=re.arg;return de?de.done?(Z[J.resultName]=de.value,Z.next=J.nextLoc,Z.method!=="return"&&(Z.method="next",Z.arg=void 0),Z.delegate=null,b):de:(Z.method="throw",Z.arg=new TypeError("iterator result is not an object"),Z.delegate=null,b)}function q(J){var Z={tryLoc:J[0]};1 in J&&(Z.catchLoc=J[1]),2 in J&&(Z.finallyLoc=J[2],Z.afterLoc=J[3]),this.tryEntries.push(Z)}function H(J){var Z=J.completion||{};Z.type="normal",delete Z.arg,J.completion=Z}function te(J){this.tryEntries=[{tryLoc:"root"}],J.forEach(q,this),this.reset(!0)}function Y(J){if(J){var Z=J[l];if(Z)return Z.call(J);if(typeof J.next=="function")return J;if(!isNaN(J.length)){var Q=-1,ge=function re(){for(;++Q<J.length;)if(n.call(J,Q))return re.value=J[Q],re.done=!1,re;return re.value=void 0,re.done=!0,re};return ge.next=ge}}return{next:le}}function le(){return{value:void 0,done:!0}}return P.prototype=I,r(R,"constructor",{value:I,configurable:!0}),r(I,"constructor",{value:P,configurable:!0}),P.displayName=h(I,o,"GeneratorFunction"),e.isGeneratorFunction=function(J){var Z=typeof J=="function"&&J.constructor;return!!Z&&(Z===P||(Z.displayName||Z.name)==="GeneratorFunction")},e.mark=function(J){return Object.setPrototypeOf?Object.setPrototypeOf(J,I):(J.__proto__=I,h(J,o,"GeneratorFunction")),J.prototype=Object.create(R),J},e.awrap=function(J){return{__await:J}},N(z.prototype),h(z.prototype,c,function(){return this}),e.AsyncIterator=z,e.async=function(J,Z,Q,ge,re){re===void 0&&(re=Promise);var de=new z(p(J,Z,Q,ge),re);return e.isGeneratorFunction(Z)?de:de.next().then(function(oe){return oe.done?oe.value:de.next()})},N(R),h(R,o,"Generator"),h(R,l,function(){return this}),h(R,"toString",function(){return"[object Generator]"}),e.keys=function(J){var Z=Object(J),Q=[];for(var ge in Z)Q.push(ge);return Q.reverse(),function re(){for(;Q.length;){var de=Q.pop();if(de in Z)return re.value=de,re.done=!1,re}return re.done=!0,re}},e.values=Y,te.prototype={constructor:te,reset:function(Z){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(H),!Z)for(var Q in this)Q.charAt(0)==="t"&&n.call(this,Q)&&!isNaN(+Q.slice(1))&&(this[Q]=void 0)},stop:function(){this.done=!0;var Z=this.tryEntries[0].completion;if(Z.type==="throw")throw Z.arg;return this.rval},dispatchException:function(Z){if(this.done)throw Z;var Q=this;function ge(Te,ke){return oe.type="throw",oe.arg=Z,Q.next=Te,ke&&(Q.method="next",Q.arg=void 0),!!ke}for(var re=this.tryEntries.length-1;re>=0;--re){var de=this.tryEntries[re],oe=de.completion;if(de.tryLoc==="root")return ge("end");if(de.tryLoc<=this.prev){var ye=n.call(de,"catchLoc"),Re=n.call(de,"finallyLoc");if(ye&&Re){if(this.prev<de.catchLoc)return ge(de.catchLoc,!0);if(this.prev<de.finallyLoc)return ge(de.finallyLoc)}else if(ye){if(this.prev<de.catchLoc)return ge(de.catchLoc,!0)}else{if(!Re)throw new Error("try statement without catch or finally");if(this.prev<de.finallyLoc)return ge(de.finallyLoc)}}}},abrupt:function(Z,Q){for(var ge=this.tryEntries.length-1;ge>=0;--ge){var re=this.tryEntries[ge];if(re.tryLoc<=this.prev&&n.call(re,"finallyLoc")&&this.prev<re.finallyLoc){var de=re;break}}de&&(Z==="break"||Z==="continue")&&de.tryLoc<=Q&&Q<=de.finallyLoc&&(de=null);var oe=de?de.completion:{};return oe.type=Z,oe.arg=Q,de?(this.method="next",this.next=de.finallyLoc,b):this.complete(oe)},complete:function(Z,Q){if(Z.type==="throw")throw Z.arg;return Z.type==="break"||Z.type==="continue"?this.next=Z.arg:Z.type==="return"?(this.rval=this.arg=Z.arg,this.method="return",this.next="end"):Z.type==="normal"&&Q&&(this.next=Q),b},finish:function(Z){for(var Q=this.tryEntries.length-1;Q>=0;--Q){var ge=this.tryEntries[Q];if(ge.finallyLoc===Z)return this.complete(ge.completion,ge.afterLoc),H(ge),b}},catch:function(Z){for(var Q=this.tryEntries.length-1;Q>=0;--Q){var ge=this.tryEntries[Q];if(ge.tryLoc===Z){var re=ge.completion;if(re.type==="throw"){var de=re.arg;H(ge)}return de}}throw new Error("illegal catch attempt")},delegateYield:function(Z,Q,ge){return this.delegate={iterator:Y(Z),resultName:Q,nextLoc:ge},this.method==="next"&&(this.arg=void 0),b}},e}function a6(e,t,n,r,i,l,c){try{var o=e[l](c),h=o.value}catch(p){n(p);return}o.done?t(h):Promise.resolve(h).then(r,i)}function Ec(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var l=e.apply(t,n);function c(h){a6(l,r,i,c,o,"next",h)}function o(h){a6(l,r,i,c,o,"throw",h)}c(void 0)})}}function ic(){return ic=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ic.apply(this,arguments)}function jB(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Tp(e,t)}function Jb(e){return Jb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Jb(e)}function Tp(e,t){return Tp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Tp(e,t)}function KB(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _g(e,t,n){return KB()?_g=Reflect.construct.bind():_g=function(i,l,c){var o=[null];o.push.apply(o,l);var h=Function.bind.apply(i,o),p=new h;return c&&Tp(p,c.prototype),p},_g.apply(null,arguments)}function HB(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function e2(e){var t=typeof Map=="function"?new Map:void 0;return e2=function(r){if(r===null||!HB(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,i)}function i(){return _g(r,arguments,Jb(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Tp(i,r)},e2(e)}var WB=/%[sdj%]/g,GB=function(){};typeof process<"u"&&process.env;function t2(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var r=n.field;t[r]=t[r]||[],t[r].push(n)}),t}function qo(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=0,l=n.length;if(typeof e=="function")return e.apply(null,n);if(typeof e=="string"){var c=e.replace(WB,function(o){if(o==="%%")return"%";if(i>=l)return o;switch(o){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}break;default:return o}});return c}return e}function qB(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function Ri(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||qB(t)&&typeof e=="string"&&!e)}function ZB(e,t,n){var r=[],i=0,l=e.length;function c(o){r.push.apply(r,o||[]),i++,i===l&&n(r)}e.forEach(function(o){t(o,c)})}function s6(e,t,n){var r=0,i=e.length;function l(c){if(c&&c.length){n(c);return}var o=r;r=r+1,o<i?t(e[o],l):n([])}l([])}function XB(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n]||[])}),t}var l6=function(e){jB(t,e);function t(n,r){var i;return i=e.call(this,"Async Validation Error")||this,i.errors=n,i.fields=r,i}return t}(e2(Error));function YB(e,t,n,r,i){if(t.first){var l=new Promise(function(w,P){var I=function(M){return r(M),M.length?P(new l6(M,t2(M))):w(i)},A=XB(e);s6(A,n,I)});return l.catch(function(w){return w}),l}var c=t.firstFields===!0?Object.keys(e):t.firstFields||[],o=Object.keys(e),h=o.length,p=0,g=[],b=new Promise(function(w,P){var I=function(O){if(g.push.apply(g,O),p++,p===h)return r(g),g.length?P(new l6(g,t2(g))):w(i)};o.length||(r(g),w(i)),o.forEach(function(A){var O=e[A];c.indexOf(A)!==-1?s6(O,n,I):ZB(O,n,I)})});return b.catch(function(w){return w}),b}function QB(e){return!!(e&&e.message!==void 0)}function JB(e,t){for(var n=e,r=0;r<t.length;r++){if(n==null)return n;n=n[t[r]]}return n}function u6(e,t){return function(n){var r;return e.fullFields?r=JB(t,e.fullFields):r=t[n.field||e.fullField],QB(n)?(n.field=n.field||e.fullField,n.fieldValue=r,n):{message:typeof n=="function"?n():n,fieldValue:r,field:n.field||e.fullField}}}function c6(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];typeof r=="object"&&typeof e[n]=="object"?e[n]=ic({},e[n],r):e[n]=r}}return e}var XI=function(t,n,r,i,l,c){t.required&&(!r.hasOwnProperty(t.field)||Ri(n,c||t.type))&&i.push(qo(l.messages.required,t.fullField))},eV=function(t,n,r,i,l){(/^\s+$/.test(n)||n==="")&&i.push(qo(l.messages.whitespace,t.fullField))},zv,tV=function(){if(zv)return zv;var e="[a-fA-F\\d:]",t=function(z){return z&&z.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",i=(`
(?:
(?:`+r+":){7}(?:"+r+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
(?:`+r+":){6}(?:"+n+"|:"+r+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
(?:`+r+":){5}(?::"+n+"|(?::"+r+`){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
(?:`+r+":){4}(?:(?::"+r+"){0,1}:"+n+"|(?::"+r+`){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
(?:`+r+":){3}(?:(?::"+r+"){0,2}:"+n+"|(?::"+r+`){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
(?:`+r+":){2}(?:(?::"+r+"){0,3}:"+n+"|(?::"+r+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
(?:`+r+":){1}(?:(?::"+r+"){0,4}:"+n+"|(?::"+r+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
(?::(?:(?::`+r+"){0,5}:"+n+"|(?::"+r+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),l=new RegExp("(?:^"+n+"$)|(?:^"+i+"$)"),c=new RegExp("^"+n+"$"),o=new RegExp("^"+i+"$"),h=function(z){return z&&z.exact?l:new RegExp("(?:"+t(z)+n+t(z)+")|(?:"+t(z)+i+t(z)+")","g")};h.v4=function(N){return N&&N.exact?c:new RegExp(""+t(N)+n+t(N),"g")},h.v6=function(N){return N&&N.exact?o:new RegExp(""+t(N)+i+t(N),"g")};var p="(?:(?:[a-z]+:)?//)",g="(?:\\S+(?::\\S*)?@)?",b=h.v4().source,w=h.v6().source,P="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",I="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",A="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",O="(?::\\d{2,5})?",M='(?:[/?#][^\\s"]*)?',R="(?:"+p+"|www\\.)"+g+"(?:localhost|"+b+"|"+w+"|"+P+I+A+")"+O+M;return zv=new RegExp("(?:^"+R+"$)","i"),zv},d6={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},$h={integer:function(t){return $h.number(t)&&parseInt(t,10)===t},float:function(t){return $h.number(t)&&!$h.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!$h.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(d6.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(tV())},hex:function(t){return typeof t=="string"&&!!t.match(d6.hex)}},nV=function(t,n,r,i,l){if(t.required&&n===void 0){XI(t,n,r,i,l);return}var c=["integer","float","array","regexp","object","method","email","number","date","url","hex"],o=t.type;c.indexOf(o)>-1?$h[o](n)||i.push(qo(l.messages.types[o],t.fullField,t.type)):o&&typeof n!==t.type&&i.push(qo(l.messages.types[o],t.fullField,t.type))},rV=function(t,n,r,i,l){var c=typeof t.len=="number",o=typeof t.min=="number",h=typeof t.max=="number",p=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=n,b=null,w=typeof n=="number",P=typeof n=="string",I=Array.isArray(n);if(w?b="number":P?b="string":I&&(b="array"),!b)return!1;I&&(g=n.length),P&&(g=n.replace(p,"_").length),c?g!==t.len&&i.push(qo(l.messages[b].len,t.fullField,t.len)):o&&!h&&g<t.min?i.push(qo(l.messages[b].min,t.fullField,t.min)):h&&!o&&g>t.max?i.push(qo(l.messages[b].max,t.fullField,t.max)):o&&h&&(g<t.min||g>t.max)&&i.push(qo(l.messages[b].range,t.fullField,t.min,t.max))},ad="enum",iV=function(t,n,r,i,l){t[ad]=Array.isArray(t[ad])?t[ad]:[],t[ad].indexOf(n)===-1&&i.push(qo(l.messages[ad],t.fullField,t[ad].join(", ")))},oV=function(t,n,r,i,l){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||i.push(qo(l.messages.pattern.mismatch,t.fullField,n,t.pattern));else if(typeof t.pattern=="string"){var c=new RegExp(t.pattern);c.test(n)||i.push(qo(l.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},rr={required:XI,whitespace:eV,type:nV,range:rV,enum:iV,pattern:oV},aV=function(t,n,r,i,l){var c=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Ri(n,"string")&&!t.required)return r();rr.required(t,n,i,c,l,"string"),Ri(n,"string")||(rr.type(t,n,i,c,l),rr.range(t,n,i,c,l),rr.pattern(t,n,i,c,l),t.whitespace===!0&&rr.whitespace(t,n,i,c,l))}r(c)},sV=function(t,n,r,i,l){var c=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Ri(n)&&!t.required)return r();rr.required(t,n,i,c,l),n!==void 0&&rr.type(t,n,i,c,l)}r(c)},lV=function(t,n,r,i,l){var c=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(n===""&&(n=void 0),Ri(n)&&!t.required)return r();rr.required(t,n,i,c,l),n!==void 0&&(rr.type(t,n,i,c,l),rr.range(t,n,i,c,l))}r(c)},uV=function(t,n,r,i,l){var c=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Ri(n)&&!t.required)return r();rr.required(t,n,i,c,l),n!==void 0&&rr.type(t,n,i,c,l)}r(c)},cV=function(t,n,r,i,l){var c=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Ri(n)&&!t.required)return r();rr.required(t,n,i,c,l),Ri(n)||rr.type(t,n,i,c,l)}r(c)},dV=function(t,n,r,i,l){var c=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Ri(n)&&!t.required)return r();rr.required(t,n,i,c,l),n!==void 0&&(rr.type(t,n,i,c,l),rr.range(t,n,i,c,l))}r(c)},fV=function(t,n,r,i,l){var c=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Ri(n)&&!t.required)return r();rr.required(t,n,i,c,l),n!==void 0&&(rr.type(t,n,i,c,l),rr.range(t,n,i,c,l))}r(c)},hV=function(t,n,r,i,l){var c=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(n==null&&!t.required)return r();rr.required(t,n,i,c,l,"array"),n!=null&&(rr.type(t,n,i,c,l),rr.range(t,n,i,c,l))}r(c)},pV=function(t,n,r,i,l){var c=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Ri(n)&&!t.required)return r();rr.required(t,n,i,c,l),n!==void 0&&rr.type(t,n,i,c,l)}r(c)},mV="enum",vV=function(t,n,r,i,l){var c=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Ri(n)&&!t.required)return r();rr.required(t,n,i,c,l),n!==void 0&&rr[mV](t,n,i,c,l)}r(c)},gV=function(t,n,r,i,l){var c=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Ri(n,"string")&&!t.required)return r();rr.required(t,n,i,c,l),Ri(n,"string")||rr.pattern(t,n,i,c,l)}r(c)},yV=function(t,n,r,i,l){var c=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Ri(n,"date")&&!t.required)return r();if(rr.required(t,n,i,c,l),!Ri(n,"date")){var h;n instanceof Date?h=n:h=new Date(n),rr.type(t,h,i,c,l),h&&rr.range(t,h.getTime(),i,c,l)}}r(c)},xV=function(t,n,r,i,l){var c=[],o=Array.isArray(n)?"array":typeof n;rr.required(t,n,i,c,l,o),r(c)},Gx=function(t,n,r,i,l){var c=t.type,o=[],h=t.required||!t.required&&i.hasOwnProperty(t.field);if(h){if(Ri(n,c)&&!t.required)return r();rr.required(t,n,i,o,l,c),Ri(n,c)||rr.type(t,n,i,o,l)}r(o)},_V=function(t,n,r,i,l){var c=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Ri(n)&&!t.required)return r();rr.required(t,n,i,c,l)}r(c)},Qh={string:aV,method:sV,number:lV,boolean:uV,regexp:cV,integer:dV,float:fV,array:hV,object:pV,enum:vV,pattern:gV,date:yV,url:Gx,hex:Gx,email:Gx,required:xV,any:_V};function n2(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var r2=n2(),Hp=function(){function e(n){this.rules=null,this._messages=r2,this.define(n)}var t=e.prototype;return t.define=function(r){var i=this;if(!r)throw new Error("Cannot configure a schema with no rules");if(typeof r!="object"||Array.isArray(r))throw new Error("Rules must be an object");this.rules={},Object.keys(r).forEach(function(l){var c=r[l];i.rules[l]=Array.isArray(c)?c:[c]})},t.messages=function(r){return r&&(this._messages=c6(n2(),r)),this._messages},t.validate=function(r,i,l){var c=this;i===void 0&&(i={}),l===void 0&&(l=function(){});var o=r,h=i,p=l;if(typeof h=="function"&&(p=h,h={}),!this.rules||Object.keys(this.rules).length===0)return p&&p(null,o),Promise.resolve(o);function g(A){var O=[],M={};function R(z){if(Array.isArray(z)){var B;O=(B=O).concat.apply(B,z)}else O.push(z)}for(var N=0;N<A.length;N++)R(A[N]);O.length?(M=t2(O),p(O,M)):p(null,o)}if(h.messages){var b=this.messages();b===r2&&(b=n2()),c6(b,h.messages),h.messages=b}else h.messages=this.messages();var w={},P=h.keys||Object.keys(this.rules);P.forEach(function(A){var O=c.rules[A],M=o[A];O.forEach(function(R){var N=R;typeof N.transform=="function"&&(o===r&&(o=ic({},o)),M=o[A]=N.transform(M)),typeof N=="function"?N={validator:N}:N=ic({},N),N.validator=c.getValidationMethod(N),N.validator&&(N.field=A,N.fullField=N.fullField||A,N.type=c.getType(N),w[A]=w[A]||[],w[A].push({rule:N,value:M,source:o,field:A}))})});var I={};return YB(w,h,function(A,O){var M=A.rule,R=(M.type==="object"||M.type==="array")&&(typeof M.fields=="object"||typeof M.defaultField=="object");R=R&&(M.required||!M.required&&A.value),M.field=A.field;function N(U,q){return ic({},q,{fullField:M.fullField+"."+U,fullFields:M.fullFields?[].concat(M.fullFields,[U]):[U]})}function z(U){U===void 0&&(U=[]);var q=Array.isArray(U)?U:[U];!h.suppressWarning&&q.length&&e.warning("async-validator:",q),q.length&&M.message!==void 0&&(q=[].concat(M.message));var H=q.map(u6(M,o));if(h.first&&H.length)return I[M.field]=1,O(H);if(!R)O(H);else{if(M.required&&!A.value)return M.message!==void 0?H=[].concat(M.message).map(u6(M,o)):h.error&&(H=[h.error(M,qo(h.messages.required,M.field))]),O(H);var te={};M.defaultField&&Object.keys(A.value).map(function(J){te[J]=M.defaultField}),te=ic({},te,A.rule.fields);var Y={};Object.keys(te).forEach(function(J){var Z=te[J],Q=Array.isArray(Z)?Z:[Z];Y[J]=Q.map(N.bind(null,J))});var le=new e(Y);le.messages(h.messages),A.rule.options&&(A.rule.options.messages=h.messages,A.rule.options.error=h.error),le.validate(A.value,A.rule.options||h,function(J){var Z=[];H&&H.length&&Z.push.apply(Z,H),J&&J.length&&Z.push.apply(Z,J),O(Z.length?Z:null)})}}var B;if(M.asyncValidator)B=M.asyncValidator(M,A.value,z,A.source,h);else if(M.validator){try{B=M.validator(M,A.value,z,A.source,h)}catch(U){console.error==null||console.error(U),h.suppressValidatorError||setTimeout(function(){throw U},0),z(U.message)}B===!0?z():B===!1?z(typeof M.message=="function"?M.message(M.fullField||M.field):M.message||(M.fullField||M.field)+" fails"):B instanceof Array?z(B):B instanceof Error&&z(B.message)}B&&B.then&&B.then(function(){return z()},function(U){return z(U)})},function(A){g(A)},o)},t.getType=function(r){if(r.type===void 0&&r.pattern instanceof RegExp&&(r.type="pattern"),typeof r.validator!="function"&&r.type&&!Qh.hasOwnProperty(r.type))throw new Error(qo("Unknown rule type %s",r.type));return r.type||"string"},t.getValidationMethod=function(r){if(typeof r.validator=="function")return r.validator;var i=Object.keys(r),l=i.indexOf("message");return l!==-1&&i.splice(l,1),i.length===1&&i[0]==="required"?Qh.required:Qh[this.getType(r)]||void 0},e}();Hp.register=function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");Qh[t]=n};Hp.warning=GB;Hp.messages=r2;Hp.validators=Qh;var jo="'${name}' is not a valid ${type}",YI={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:jo,method:jo,array:jo,object:jo,number:jo,date:jo,boolean:jo,integer:jo,float:jo,regexp:jo,email:jo,url:jo,hex:jo},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}};function QI(e,t){for(var n=e,r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}function JI(e){if(Array.isArray(e))return e}function eM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OC(e){return JI(e)||ZI(e)||AC(e)||eM()}function tM(e,t,n,r){if(!t.length)return n;var i=OC(t),l=i[0],c=i.slice(1),o;return!e&&typeof l=="number"?o=[]:Array.isArray(e)?o=wt(e):o=ve({},e),r&&n===void 0&&c.length===1?delete o[l][c[0]]:o[l]=tM(o[l],c,n,r),o}function bV(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&r&&n===void 0&&!QI(e,t.slice(0,-1))?e:tM(e,t,n,r)}function w0(e){return Array.isArray(e)?CV(e):sn(e)==="object"&&e!==null?wV(e):e}function wV(e){if(Object.getPrototypeOf(e)===Object.prototype){var t={};for(var n in e)t[n]=w0(e[n]);return t}return e}function CV(e){return e.map(function(t){return w0(t)})}function hi(e){return Qb(e)}function Vl(e,t){var n=QI(e,t);return n}function Ml(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=bV(e,t,n,r);return i}function f6(e,t){var n={};return t.forEach(function(r){var i=Vl(e,r);n=Ml(n,r,i)}),n}function Jh(e,t){return e&&e.some(function(n){return rM(n,t)})}function h6(e){return sn(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function nM(e,t){var n=Array.isArray(e)?wt(e):ve({},e);return t&&Object.keys(t).forEach(function(r){var i=n[r],l=t[r],c=h6(i)&&h6(l);n[r]=c?nM(i,l||{}):w0(l)}),n}function bg(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce(function(i,l){return nM(i,l)},e)}function rM(e,t){return!e||!t||e.length!==t.length?!1:e.every(function(n,r){return t[r]===n})}function SV(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||sn(e)!=="object"||sn(t)!=="object")return!1;var n=Object.keys(e),r=Object.keys(t),i=new Set([].concat(n,r));return wt(i).every(function(l){var c=e[l],o=t[l];return typeof c=="function"&&typeof o=="function"?!0:c===o})}function EV(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&sn(t.target)==="object"&&e in t.target?t.target[e]:t}function p6(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var i=e[t],l=t-n;return l>0?[].concat(wt(e.slice(0,n)),[i],wt(e.slice(n,t)),wt(e.slice(t+1,r))):l<0?[].concat(wt(e.slice(0,t)),wt(e.slice(t+1,n+1)),[i],wt(e.slice(n+1,r))):e}var kV=Hp;function TV(e,t){return e.replace(/\$\{\w+\}/g,function(n){var r=n.slice(2,-1);return t[r]})}var m6="CODE_LOGIC_ERROR";function i2(e,t,n,r,i){return o2.apply(this,arguments)}function o2(){return o2=Ec(bo().mark(function e(t,n,r,i,l){var c,o,h,p,g,b,w,P,I;return bo().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return c=ve({},r),delete c.ruleIndex,c.validator&&(o=c.validator,c.validator=function(){try{return o.apply(void 0,arguments)}catch(M){return console.error(M),Promise.reject(m6)}}),h=null,c&&c.type==="array"&&c.defaultField&&(h=c.defaultField,delete c.defaultField),p=new kV(se({},t,[c])),g=bg({},YI,i.validateMessages),p.messages(g),b=[],O.prev=9,O.next=12,Promise.resolve(p.validate(se({},t,n),ve({},i)));case 12:O.next=17;break;case 14:O.prev=14,O.t0=O.catch(9),O.t0.errors&&(b=O.t0.errors.map(function(M,R){var N=M.message,z=N===m6?g.default:N;return C.exports.isValidElement(z)?C.exports.cloneElement(z,{key:"error_".concat(R)}):z}));case 17:if(!(!b.length&&h)){O.next=22;break}return O.next=20,Promise.all(n.map(function(M,R){return i2("".concat(t,".").concat(R),M,h,i,l)}));case 20:return w=O.sent,O.abrupt("return",w.reduce(function(M,R){return[].concat(wt(M),wt(R))},[]));case 22:return P=ve(ve({},r),{},{name:t,enum:(r.enum||[]).join(", ")},l),I=b.map(function(M){return typeof M=="string"?TV(M,P):M}),O.abrupt("return",I);case 25:case"end":return O.stop()}},e,null,[[9,14]])})),o2.apply(this,arguments)}function PV(e,t,n,r,i,l){var c=e.join("."),o=n.map(function(g,b){var w=g.validator,P=ve(ve({},g),{},{ruleIndex:b});return w&&(P.validator=function(I,A,O){var M=!1,R=function(){for(var B=arguments.length,U=new Array(B),q=0;q<B;q++)U[q]=arguments[q];Promise.resolve().then(function(){Nr(!M,"Your validator function has already return a promise. `callback` will be ignored."),M||O.apply(void 0,U)})},N=w(I,A,R);M=N&&typeof N.then=="function"&&typeof N.catch=="function",Nr(M,"`callback` is deprecated. Please return a promise instead."),M&&N.then(function(){O()}).catch(function(z){O(z||" ")})}),P}).sort(function(g,b){var w=g.warningOnly,P=g.ruleIndex,I=b.warningOnly,A=b.ruleIndex;return!!w==!!I?P-A:w?1:-1}),h;if(i===!0)h=new Promise(function(){var g=Ec(bo().mark(function b(w,P){var I,A,O;return bo().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:I=0;case 1:if(!(I<o.length)){R.next=12;break}return A=o[I],R.next=5,i2(c,t,A,r,l);case 5:if(O=R.sent,!O.length){R.next=9;break}return P([{errors:O,rule:A}]),R.abrupt("return");case 9:I+=1,R.next=1;break;case 12:w([]);case 13:case"end":return R.stop()}},b)}));return function(b,w){return g.apply(this,arguments)}}());else{var p=o.map(function(g){return i2(c,t,g,r,l).then(function(b){return{errors:b,rule:g}})});h=(i?MV(p):IV(p)).then(function(g){return Promise.reject(g)})}return h.catch(function(g){return g}),h}function IV(e){return a2.apply(this,arguments)}function a2(){return a2=Ec(bo().mark(function e(t){return bo().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.all(t).then(function(i){var l,c=(l=[]).concat.apply(l,wt(i));return c}));case 1:case"end":return r.stop()}},e)})),a2.apply(this,arguments)}function MV(e){return s2.apply(this,arguments)}function s2(){return s2=Ec(bo().mark(function e(t){var n;return bo().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return n=0,i.abrupt("return",new Promise(function(l){t.forEach(function(c){c.then(function(o){o.errors.length&&l([o]),n+=1,n===t.length&&l([])})})}));case 2:case"end":return i.stop()}},e)})),s2.apply(this,arguments)}var RV=["name"],ca=[];function v6(e,t,n,r,i,l){return typeof e=="function"?e(t,n,"source"in l?{source:l.source}:{}):r!==i}var NC=function(e){li(n,e);var t=ui(n);function n(r){var i;if(Kr(this,n),i=t.call(this,r),i.state={resetCount:0},i.cancelRegisterFunc=null,i.mounted=!1,i.touched=!1,i.dirty=!1,i.validatePromise=null,i.prevValidating=void 0,i.errors=ca,i.warnings=ca,i.cancelRegister=function(){var h=i.props,p=h.preserve,g=h.isListField,b=h.name;i.cancelRegisterFunc&&i.cancelRegisterFunc(g,p,hi(b)),i.cancelRegisterFunc=null},i.getNamePath=function(){var h=i.props,p=h.name,g=h.fieldContext,b=g.prefixName,w=b===void 0?[]:b;return p!==void 0?[].concat(wt(w),wt(p)):[]},i.getRules=function(){var h=i.props,p=h.rules,g=p===void 0?[]:p,b=h.fieldContext;return g.map(function(w){return typeof w=="function"?w(b):w})},i.refresh=function(){!i.mounted||i.setState(function(h){var p=h.resetCount;return{resetCount:p+1}})},i.triggerMetaEvent=function(h){var p=i.props.onMetaChange;p==null||p(ve(ve({},i.getMeta()),{},{destroy:h}))},i.onStoreChange=function(h,p,g){var b=i.props,w=b.shouldUpdate,P=b.dependencies,I=P===void 0?[]:P,A=b.onReset,O=g.store,M=i.getNamePath(),R=i.getValue(h),N=i.getValue(O),z=p&&Jh(p,M);switch(g.type==="valueUpdate"&&g.source==="external"&&R!==N&&(i.touched=!0,i.dirty=!0,i.validatePromise=null,i.errors=ca,i.warnings=ca,i.triggerMetaEvent()),g.type){case"reset":if(!p||z){i.touched=!1,i.dirty=!1,i.validatePromise=null,i.errors=ca,i.warnings=ca,i.triggerMetaEvent(),A==null||A(),i.refresh();return}break;case"remove":{if(w){i.reRender();return}break}case"setField":{if(z){var B=g.data;"touched"in B&&(i.touched=B.touched),"validating"in B&&!("originRCField"in B)&&(i.validatePromise=B.validating?Promise.resolve([]):null),"errors"in B&&(i.errors=B.errors||ca),"warnings"in B&&(i.warnings=B.warnings||ca),i.dirty=!0,i.triggerMetaEvent(),i.reRender();return}if(w&&!M.length&&v6(w,h,O,R,N,g)){i.reRender();return}break}case"dependenciesUpdate":{var U=I.map(hi);if(U.some(function(q){return Jh(g.relatedFields,q)})){i.reRender();return}break}default:if(z||(!I.length||M.length||w)&&v6(w,h,O,R,N,g)){i.reRender();return}break}w===!0&&i.reRender()},i.validateRules=function(h){var p=i.getNamePath(),g=i.getValue(),b=Promise.resolve().then(function(){if(!i.mounted)return[];var w=i.props,P=w.validateFirst,I=P===void 0?!1:P,A=w.messageVariables,O=h||{},M=O.triggerName,R=i.getRules();M&&(R=R.filter(function(z){return z}).filter(function(z){var B=z.validateTrigger;if(!B)return!0;var U=Qb(B);return U.includes(M)}));var N=PV(p,g,R,h,I,A);return N.catch(function(z){return z}).then(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ca;if(i.validatePromise===b){var B;i.validatePromise=null;var U=[],q=[];(B=z.forEach)===null||B===void 0||B.call(z,function(H){var te=H.rule.warningOnly,Y=H.errors,le=Y===void 0?ca:Y;te?q.push.apply(q,wt(le)):U.push.apply(U,wt(le))}),i.errors=U,i.warnings=q,i.triggerMetaEvent(),i.reRender()}}),N});return i.validatePromise=b,i.dirty=!0,i.errors=ca,i.warnings=ca,i.triggerMetaEvent(),i.reRender(),b},i.isFieldValidating=function(){return!!i.validatePromise},i.isFieldTouched=function(){return i.touched},i.isFieldDirty=function(){if(i.dirty||i.props.initialValue!==void 0)return!0;var h=i.props.fieldContext,p=h.getInternalHooks(rc),g=p.getInitialValue;return g(i.getNamePath())!==void 0},i.getErrors=function(){return i.errors},i.getWarnings=function(){return i.warnings},i.isListField=function(){return i.props.isListField},i.isList=function(){return i.props.isList},i.isPreserve=function(){return i.props.preserve},i.getMeta=function(){i.prevValidating=i.isFieldValidating();var h={touched:i.isFieldTouched(),validating:i.prevValidating,errors:i.errors,warnings:i.warnings,name:i.getNamePath()};return h},i.getOnlyChild=function(h){if(typeof h=="function"){var p=i.getMeta();return ve(ve({},i.getOnlyChild(h(i.getControlled(),p,i.props.fieldContext))),{},{isFunction:!0})}var g=Xi(h);return g.length!==1||!C.exports.isValidElement(g[0])?{child:g,isFunction:!1}:{child:g[0],isFunction:!1}},i.getValue=function(h){var p=i.props.fieldContext.getFieldsValue,g=i.getNamePath();return Vl(h||p(!0),g)},i.getControlled=function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=i.props,g=p.trigger,b=p.validateTrigger,w=p.getValueFromEvent,P=p.normalize,I=p.valuePropName,A=p.getValueProps,O=p.fieldContext,M=b!==void 0?b:O.validateTrigger,R=i.getNamePath(),N=O.getInternalHooks,z=O.getFieldsValue,B=N(rc),U=B.dispatch,q=i.getValue(),H=A||function(J){return se({},I,J)},te=h[g],Y=ve(ve({},h),H(q));Y[g]=function(){i.touched=!0,i.dirty=!0,i.triggerMetaEvent();for(var J,Z=arguments.length,Q=new Array(Z),ge=0;ge<Z;ge++)Q[ge]=arguments[ge];w?J=w.apply(void 0,Q):J=EV.apply(void 0,[I].concat(Q)),P&&(J=P(J,q,z(!0))),U({type:"updateValue",namePath:R,value:J}),te&&te.apply(void 0,Q)};var le=Qb(M||[]);return le.forEach(function(J){var Z=Y[J];Y[J]=function(){Z&&Z.apply(void 0,arguments);var Q=i.props.rules;Q&&Q.length&&U({type:"validateField",namePath:R,triggerName:J})}}),Y},r.fieldContext){var l=r.fieldContext.getInternalHooks,c=l(rc),o=c.initEntityValue;o(On(i))}return i}return Hr(n,[{key:"componentDidMount",value:function(){var i=this.props,l=i.shouldUpdate,c=i.fieldContext;if(this.mounted=!0,c){var o=c.getInternalHooks,h=o(rc),p=h.registerField;this.cancelRegisterFunc=p(this)}l===!0&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){!this.mounted||this.forceUpdate()}},{key:"render",value:function(){this.state.resetCount;var i=this.props.children,l=this.getOnlyChild(i),c=l.child,o=l.isFunction,h;return o?h=c:C.exports.isValidElement(c)?h=C.exports.cloneElement(c,this.getControlled(c.props)):(Nr(!c,"`children` of Field is not validate ReactElement."),h=c),E($n,{children:h})}}]),n}(C.exports.Component);NC.contextType=vc;NC.defaultProps={trigger:"onChange",valuePropName:"value"};function DC(e){var t=e.name,n=In(e,RV),r=C.exports.useContext(vc),i=t!==void 0?hi(t):void 0,l="keep";return n.isListField||(l="_".concat((i||[]).join("_"))),E(NC,{name:i,...n,fieldContext:r},l)}var iM=C.exports.createContext(null),oM=function(t){var n=t.name,r=t.initialValue,i=t.children,l=t.rules,c=t.validateTrigger,o=C.exports.useContext(vc),h=C.exports.useRef({keys:[],id:0}),p=h.current,g=C.exports.useMemo(function(){var I=hi(o.prefixName)||[];return[].concat(wt(I),wt(hi(n)))},[o.prefixName,n]),b=C.exports.useMemo(function(){return ve(ve({},o),{},{prefixName:g})},[o,g]),w=C.exports.useMemo(function(){return{getKey:function(A){var O=g.length,M=A[O];return[p.keys[M],A.slice(O+1)]}}},[g]);if(typeof i!="function")return Nr(!1,"Form.List only accepts function as children."),null;var P=function(A,O,M){var R=M.source;return R==="internal"?!1:A!==O};return E(iM.Provider,{value:w,children:E(vc.Provider,{value:b,children:E(DC,{name:[],shouldUpdate:P,rules:l,validateTrigger:c,initialValue:r,isList:!0,children:function(I,A){var O=I.value,M=O===void 0?[]:O,R=I.onChange,N=o.getFieldValue,z=function(){var H=N(g||[]);return H||[]},B={add:function(H,te){var Y=z();te>=0&&te<=Y.length?(p.keys=[].concat(wt(p.keys.slice(0,te)),[p.id],wt(p.keys.slice(te))),R([].concat(wt(Y.slice(0,te)),[H],wt(Y.slice(te))))):(p.keys=[].concat(wt(p.keys),[p.id]),R([].concat(wt(Y),[H]))),p.id+=1},remove:function(H){var te=z(),Y=new Set(Array.isArray(H)?H:[H]);Y.size<=0||(p.keys=p.keys.filter(function(le,J){return!Y.has(J)}),R(te.filter(function(le,J){return!Y.has(J)})))},move:function(H,te){if(H!==te){var Y=z();H<0||H>=Y.length||te<0||te>=Y.length||(p.keys=p6(p.keys,H,te),R(p6(Y,H,te)))}}},U=M||[];return Array.isArray(U)||(U=[]),i(U.map(function(q,H){var te=p.keys[H];return te===void 0&&(p.keys[H]=p.id,te=p.keys[H],p.id+=1),{name:H,key:te,isListField:!0}}),B,A)}})})})};function AV(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,l,c,o=[],h=!0,p=!1;try{if(l=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;h=!1}else for(;!(h=(r=l.call(n)).done)&&(o.push(r.value),o.length!==t);h=!0);}catch(g){p=!0,i=g}finally{try{if(!h&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(p)throw i}}return o}}function ze(e,t){return JI(e)||AV(e,t)||AC(e,t)||eM()}function OV(e){var t=!1,n=e.length,r=[];return e.length?new Promise(function(i,l){e.forEach(function(c,o){c.catch(function(h){return t=!0,h}).then(function(h){n-=1,r[o]=h,!(n>0)&&(t&&l(r),i(r))})})}):Promise.resolve([])}var aM="__@field_split__";function qx(e){return e.map(function(t){return"".concat(sn(t),":").concat(t)}).join(aM)}var sd=function(){function e(){Kr(this,e),this.kvs=new Map}return Hr(e,[{key:"set",value:function(n,r){this.kvs.set(qx(n),r)}},{key:"get",value:function(n){return this.kvs.get(qx(n))}},{key:"update",value:function(n,r){var i=this.get(n),l=r(i);l?this.set(n,l):this.delete(n)}},{key:"delete",value:function(n){this.kvs.delete(qx(n))}},{key:"map",value:function(n){return wt(this.kvs.entries()).map(function(r){var i=ze(r,2),l=i[0],c=i[1],o=l.split(aM);return n({key:o.map(function(h){var p=h.match(/^([^:]*):(.*)$/),g=ze(p,3),b=g[1],w=g[2];return b==="number"?Number(w):w}),value:c})})}},{key:"toJSON",value:function(){var n={};return this.map(function(r){var i=r.key,l=r.value;return n[i.join(".")]=l,null}),n}}]),e}(),NV=["name","errors"],DV=Hr(function e(t){var n=this;Kr(this,e),this.formHooked=!1,this.forceRootUpdate=void 0,this.subscribable=!0,this.store={},this.fieldEntities=[],this.initialValues={},this.callbacks={},this.validateMessages=null,this.preserve=null,this.lastValidatePromise=null,this.getForm=function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}},this.getInternalHooks=function(r){return r===rc?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):(Nr(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)},this.useSubscribe=function(r){n.subscribable=r},this.prevWithoutPreserves=null,this.setInitialValues=function(r,i){if(n.initialValues=r||{},i){var l,c=bg({},r,n.store);(l=n.prevWithoutPreserves)===null||l===void 0||l.map(function(o){var h=o.key;c=Ml(c,h,Vl(r,h))}),n.prevWithoutPreserves=null,n.updateStore(c)}},this.destroyForm=function(){var r=new sd;n.getFieldEntities(!0).forEach(function(i){n.isMergedPreserve(i.isPreserve())||r.set(i.getNamePath(),!0)}),n.prevWithoutPreserves=r},this.getInitialValue=function(r){var i=Vl(n.initialValues,r);return r.length?w0(i):i},this.setCallbacks=function(r){n.callbacks=r},this.setValidateMessages=function(r){n.validateMessages=r},this.setPreserve=function(r){n.preserve=r},this.watchList=[],this.registerWatch=function(r){return n.watchList.push(r),function(){n.watchList=n.watchList.filter(function(i){return i!==r})}},this.notifyWatch=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(n.watchList.length){var i=n.getFieldsValue();n.watchList.forEach(function(l){l(i,r)})}},this.timeoutId=null,this.warningUnhooked=function(){},this.updateStore=function(r){n.store=r},this.getFieldEntities=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return r?n.fieldEntities.filter(function(i){return i.getNamePath().length}):n.fieldEntities},this.getFieldsMap=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=new sd;return n.getFieldEntities(r).forEach(function(l){var c=l.getNamePath();i.set(c,l)}),i},this.getFieldEntitiesForNamePathList=function(r){if(!r)return n.getFieldEntities(!0);var i=n.getFieldsMap(!0);return r.map(function(l){var c=hi(l);return i.get(c)||{INVALIDATE_NAME_PATH:hi(l)}})},this.getFieldsValue=function(r,i){if(n.warningUnhooked(),r===!0&&!i)return n.store;var l=n.getFieldEntitiesForNamePathList(Array.isArray(r)?r:null),c=[];return l.forEach(function(o){var h,p="INVALIDATE_NAME_PATH"in o?o.INVALIDATE_NAME_PATH:o.getNamePath();if(!(!r&&((h=o.isListField)===null||h===void 0?void 0:h.call(o))))if(!i)c.push(p);else{var g="getMeta"in o?o.getMeta():null;i(g)&&c.push(p)}}),f6(n.store,c.map(hi))},this.getFieldValue=function(r){n.warningUnhooked();var i=hi(r);return Vl(n.store,i)},this.getFieldsError=function(r){n.warningUnhooked();var i=n.getFieldEntitiesForNamePathList(r);return i.map(function(l,c){return l&&!("INVALIDATE_NAME_PATH"in l)?{name:l.getNamePath(),errors:l.getErrors(),warnings:l.getWarnings()}:{name:hi(r[c]),errors:[],warnings:[]}})},this.getFieldError=function(r){n.warningUnhooked();var i=hi(r),l=n.getFieldsError([i])[0];return l.errors},this.getFieldWarning=function(r){n.warningUnhooked();var i=hi(r),l=n.getFieldsError([i])[0];return l.warnings},this.isFieldsTouched=function(){n.warningUnhooked();for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];var c=i[0],o=i[1],h,p=!1;i.length===0?h=null:i.length===1?Array.isArray(c)?(h=c.map(hi),p=!1):(h=null,p=c):(h=c.map(hi),p=o);var g=n.getFieldEntities(!0),b=function(O){return O.isFieldTouched()};if(!h)return p?g.every(b):g.some(b);var w=new sd;h.forEach(function(A){w.set(A,[])}),g.forEach(function(A){var O=A.getNamePath();h.forEach(function(M){M.every(function(R,N){return O[N]===R})&&w.update(M,function(R){return[].concat(wt(R),[A])})})});var P=function(O){return O.some(b)},I=w.map(function(A){var O=A.value;return O});return p?I.every(P):I.some(P)},this.isFieldTouched=function(r){return n.warningUnhooked(),n.isFieldsTouched([r])},this.isFieldsValidating=function(r){n.warningUnhooked();var i=n.getFieldEntities();if(!r)return i.some(function(c){return c.isFieldValidating()});var l=r.map(hi);return i.some(function(c){var o=c.getNamePath();return Jh(l,o)&&c.isFieldValidating()})},this.isFieldValidating=function(r){return n.warningUnhooked(),n.isFieldsValidating([r])},this.resetWithFieldInitialValue=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=new sd,l=n.getFieldEntities(!0);l.forEach(function(h){var p=h.props.initialValue,g=h.getNamePath();if(p!==void 0){var b=i.get(g)||new Set;b.add({entity:h,value:p}),i.set(g,b)}});var c=function(p){p.forEach(function(g){var b=g.props.initialValue;if(b!==void 0){var w=g.getNamePath(),P=n.getInitialValue(w);if(P!==void 0)Nr(!1,"Form already set 'initialValues' with path '".concat(w.join("."),"'. Field can not overwrite it."));else{var I=i.get(w);if(I&&I.size>1)Nr(!1,"Multiple Field with path '".concat(w.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(I){var A=n.getFieldValue(w);(!r.skipExist||A===void 0)&&n.updateStore(Ml(n.store,w,wt(I)[0].value))}}}})},o;r.entities?o=r.entities:r.namePathList?(o=[],r.namePathList.forEach(function(h){var p=i.get(h);if(p){var g;(g=o).push.apply(g,wt(wt(p).map(function(b){return b.entity})))}})):o=l,c(o)},this.resetFields=function(r){n.warningUnhooked();var i=n.store;if(!r){n.updateStore(bg({},n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(i,null,{type:"reset"}),n.notifyWatch();return}var l=r.map(hi);l.forEach(function(c){var o=n.getInitialValue(c);n.updateStore(Ml(n.store,c,o))}),n.resetWithFieldInitialValue({namePathList:l}),n.notifyObservers(i,l,{type:"reset"}),n.notifyWatch(l)},this.setFields=function(r){n.warningUnhooked();var i=n.store,l=[];r.forEach(function(c){var o=c.name;c.errors;var h=In(c,NV),p=hi(o);l.push(p),"value"in h&&n.updateStore(Ml(n.store,p,h.value)),n.notifyObservers(i,[p],{type:"setField",data:c})}),n.notifyWatch(l)},this.getFields=function(){var r=n.getFieldEntities(!0),i=r.map(function(l){var c=l.getNamePath(),o=l.getMeta(),h=ve(ve({},o),{},{name:c,value:n.getFieldValue(c)});return Object.defineProperty(h,"originRCField",{value:!0}),h});return i},this.initEntityValue=function(r){var i=r.props.initialValue;if(i!==void 0){var l=r.getNamePath(),c=Vl(n.store,l);c===void 0&&n.updateStore(Ml(n.store,l,i))}},this.isMergedPreserve=function(r){var i=r!==void 0?r:n.preserve;return i!=null?i:!0},this.registerField=function(r){n.fieldEntities.push(r);var i=r.getNamePath();if(n.notifyWatch([i]),r.props.initialValue!==void 0){var l=n.store;n.resetWithFieldInitialValue({entities:[r],skipExist:!0}),n.notifyObservers(l,[r.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(c,o){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter(function(b){return b!==r}),!n.isMergedPreserve(o)&&(!c||h.length>1)){var p=c?void 0:n.getInitialValue(i);if(i.length&&n.getFieldValue(i)!==p&&n.fieldEntities.every(function(b){return!rM(b.getNamePath(),i)})){var g=n.store;n.updateStore(Ml(g,i,p,!0)),n.notifyObservers(g,[i],{type:"remove"}),n.triggerDependenciesUpdate(g,i)}}n.notifyWatch([i])}},this.dispatch=function(r){switch(r.type){case"updateValue":{var i=r.namePath,l=r.value;n.updateValue(i,l);break}case"validateField":{var c=r.namePath,o=r.triggerName;n.validateFields([c],{triggerName:o});break}}},this.notifyObservers=function(r,i,l){if(n.subscribable){var c=ve(ve({},l),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach(function(o){var h=o.onStoreChange;h(r,i,c)})}else n.forceRootUpdate()},this.triggerDependenciesUpdate=function(r,i){var l=n.getDependencyChildrenFields(i);return l.length&&n.validateFields(l),n.notifyObservers(r,l,{type:"dependenciesUpdate",relatedFields:[i].concat(wt(l))}),l},this.updateValue=function(r,i){var l=hi(r),c=n.store;n.updateStore(Ml(n.store,l,i)),n.notifyObservers(c,[l],{type:"valueUpdate",source:"internal"}),n.notifyWatch([l]);var o=n.triggerDependenciesUpdate(c,l),h=n.callbacks.onValuesChange;if(h){var p=f6(n.store,[l]);h(p,n.getFieldsValue())}n.triggerOnFieldsChange([l].concat(wt(o)))},this.setFieldsValue=function(r){n.warningUnhooked();var i=n.store;if(r){var l=bg(n.store,r);n.updateStore(l)}n.notifyObservers(i,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()},this.setFieldValue=function(r,i){n.setFields([{name:r,value:i}])},this.getDependencyChildrenFields=function(r){var i=new Set,l=[],c=new sd;n.getFieldEntities().forEach(function(h){var p=h.props.dependencies;(p||[]).forEach(function(g){var b=hi(g);c.update(b,function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return w.add(h),w})})});var o=function h(p){var g=c.get(p)||new Set;g.forEach(function(b){if(!i.has(b)){i.add(b);var w=b.getNamePath();b.isFieldDirty()&&w.length&&(l.push(w),h(w))}})};return o(r),l},this.triggerOnFieldsChange=function(r,i){var l=n.callbacks.onFieldsChange;if(l){var c=n.getFields();if(i){var o=new sd;i.forEach(function(p){var g=p.name,b=p.errors;o.set(g,b)}),c.forEach(function(p){p.errors=o.get(p.name)||p.errors})}var h=c.filter(function(p){var g=p.name;return Jh(r,g)});l(h,c)}},this.validateFields=function(r,i){n.warningUnhooked();var l=!!r,c=l?r.map(hi):[],o=[];n.getFieldEntities(!0).forEach(function(g){if(l||c.push(g.getNamePath()),(i==null?void 0:i.recursive)&&l){var b=g.getNamePath();b.every(function(I,A){return r[A]===I||r[A]===void 0})&&c.push(b)}if(!(!g.props.rules||!g.props.rules.length)){var w=g.getNamePath();if(!l||Jh(c,w)){var P=g.validateRules(ve({validateMessages:ve(ve({},YI),n.validateMessages)},i));o.push(P.then(function(){return{name:w,errors:[],warnings:[]}}).catch(function(I){var A,O=[],M=[];return(A=I.forEach)===null||A===void 0||A.call(I,function(R){var N=R.rule.warningOnly,z=R.errors;N?M.push.apply(M,wt(z)):O.push.apply(O,wt(z))}),O.length?Promise.reject({name:w,errors:O,warnings:M}):{name:w,errors:O,warnings:M}}))}}});var h=OV(o);n.lastValidatePromise=h,h.catch(function(g){return g}).then(function(g){var b=g.map(function(w){var P=w.name;return P});n.notifyObservers(n.store,b,{type:"validateFinish"}),n.triggerOnFieldsChange(b,g)});var p=h.then(function(){return n.lastValidatePromise===h?Promise.resolve(n.getFieldsValue(c)):Promise.reject([])}).catch(function(g){var b=g.filter(function(w){return w&&w.errors.length});return Promise.reject({values:n.getFieldsValue(c),errorFields:b,outOfDate:n.lastValidatePromise!==h})});return p.catch(function(g){return g}),p},this.submit=function(){n.warningUnhooked(),n.validateFields().then(function(r){var i=n.callbacks.onFinish;if(i)try{i(r)}catch(l){console.error(l)}}).catch(function(r){var i=n.callbacks.onFinishFailed;i&&i(r)})},this.forceRootUpdate=t});function LC(e){var t=C.exports.useRef(),n=C.exports.useState({}),r=ze(n,2),i=r[1];if(!t.current)if(e)t.current=e;else{var l=function(){i({})},c=new DV(l);t.current=c.getForm()}return[t.current]}var l2=C.exports.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),zC=function(t){var n=t.validateMessages,r=t.onFormChange,i=t.onFormFinish,l=t.children,c=C.exports.useContext(l2),o=C.exports.useRef({});return E(l2.Provider,{value:ve(ve({},c),{},{validateMessages:ve(ve({},c.validateMessages),n),triggerFormChange:function(p,g){r&&r(p,{changedFields:g,forms:o.current}),c.triggerFormChange(p,g)},triggerFormFinish:function(p,g){i&&i(p,{values:g,forms:o.current}),c.triggerFormFinish(p,g)},registerForm:function(p,g){p&&(o.current=ve(ve({},o.current),{},se({},p,g))),c.registerForm(p,g)},unregisterForm:function(p){var g=ve({},o.current);delete g[p],o.current=g,c.unregisterForm(p)}}),children:l})},LV=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed"],zV=function(t,n){var r=t.name,i=t.initialValues,l=t.fields,c=t.form,o=t.preserve,h=t.children,p=t.component,g=p===void 0?"form":p,b=t.validateMessages,w=t.validateTrigger,P=w===void 0?"onChange":w,I=t.onValuesChange,A=t.onFieldsChange,O=t.onFinish,M=t.onFinishFailed,R=In(t,LV),N=C.exports.useContext(l2),z=LC(c),B=ze(z,1),U=B[0],q=U.getInternalHooks(rc),H=q.useSubscribe,te=q.setInitialValues,Y=q.setCallbacks,le=q.setValidateMessages,J=q.setPreserve,Z=q.destroyForm;C.exports.useImperativeHandle(n,function(){return U}),C.exports.useEffect(function(){return N.registerForm(r,U),function(){N.unregisterForm(r)}},[N,U,r]),le(ve(ve({},N.validateMessages),b)),Y({onValuesChange:I,onFieldsChange:function(ke){if(N.triggerFormChange(r,ke),A){for(var De=arguments.length,Me=new Array(De>1?De-1:0),Ne=1;Ne<De;Ne++)Me[Ne-1]=arguments[Ne];A.apply(void 0,[ke].concat(Me))}},onFinish:function(ke){N.triggerFormFinish(r,ke),O&&O(ke)},onFinishFailed:M}),J(o);var Q=C.exports.useRef(null);te(i,!Q.current),Q.current||(Q.current=!0),C.exports.useEffect(function(){return Z},[]);var ge,re=typeof h=="function";if(re){var de=U.getFieldsValue(!0);ge=h(de,U)}else ge=h;H(!re);var oe=C.exports.useRef();C.exports.useEffect(function(){SV(oe.current||[],l||[])||U.setFields(l||[]),oe.current=l},[l,U]);var ye=C.exports.useMemo(function(){return ve(ve({},U),{},{validateTrigger:P})},[U,P]),Re=E(vc.Provider,{value:ye,children:ge});return g===!1?Re:E(g,{...R,onSubmit:function(ke){ke.preventDefault(),ke.stopPropagation(),U.submit()},onReset:function(ke){var De;ke.preventDefault(),U.resetFields(),(De=R.onReset)===null||De===void 0||De.call(R,ke)},children:Re})};function g6(e){try{return JSON.stringify(e)}catch{return Math.random()}}function sM(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],i=r===void 0?[]:r,l=t[1],c=C.exports.useState(),o=ze(c,2),h=o[0],p=o[1],g=C.exports.useMemo(function(){return g6(h)},[h]),b=C.exports.useRef(g);b.current=g;var w=C.exports.useContext(vc),P=l||w,I=P&&P._init,A=hi(i),O=C.exports.useRef(A);return O.current=A,C.exports.useEffect(function(){if(!!I){var M=P.getFieldsValue,R=P.getInternalHooks,N=R(rc),z=N.registerWatch,B=z(function(q){var H=Vl(q,O.current),te=g6(H);b.current!==te&&(b.current=te,p(H))}),U=Vl(M(),O.current);return p(U),B}},[I]),h}var FV=C.exports.forwardRef(zV),cf=FV;cf.FormProvider=zC;cf.Field=DC;cf.List=oM;cf.useForm=LC;cf.useWatch=sM;const lM={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};var $V={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},BV={placeholder:"Select time",rangePlaceholder:["Start time","End time"]};const uM=BV;var VV={lang:tt({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},$V),timePickerLocale:tt({},uM)};const y6=VV;var Ko="${label} is not a valid ${type}",UV={locale:"en",Pagination:lM,DatePicker:y6,TimePicker:uM,Calendar:y6,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:Ko,method:Ko,array:Ko,object:Ko,number:Ko,date:Ko,boolean:Ko,integer:Ko,float:Ko,regexp:Ko,email:Ko,url:Ko,hex:Ko},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"}};const Js=UV;var wg=tt({},Js.Modal);function x6(e){e?wg=tt(tt({},wg),e):wg=tt({},Js.Modal)}function cM(){return wg}var jV=C.exports.createContext(void 0);const FC=jV;var KV="internalMark",HV=function(t){var n=t.locale,r=n===void 0?{}:n,i=t.children;t._ANT_MARK__,C.exports.useEffect(function(){return x6(r&&r.Modal),function(){x6()}},[r]);var l=C.exports.useMemo(function(){return tt(tt({},r),{exist:!0})},[r]);return E(FC.Provider,{value:l,children:i})};const WV=HV;var GV=function(t){var n=t.componentName,r=n===void 0?"global":n,i=t.defaultLocale,l=t.children,c=C.exports.useContext(FC),o=C.exports.useMemo(function(){var p,g=i||Js[r],b=(p=c==null?void 0:c[r])!==null&&p!==void 0?p:{};return tt(tt({},g instanceof Function?g():g),b||{})},[r,i,c]),h=C.exports.useMemo(function(){var p=c&&c.locale;return c&&c.exist&&!p?Js.locale:p},[c]);return l(o,h,c)};const Wp=GV;var dM=function(t,n){var r=C.exports.useContext(FC),i=C.exports.useMemo(function(){var l,c=n||Js[t],o=(l=r==null?void 0:r[t])!==null&&l!==void 0?l:{};return tt(tt({},typeof c=="function"?c():c),o||{})},[t,n,r]);return[i]},qV={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};const ZV=qV;function qi(e,t){XV(e)&&(e="100%");var n=YV(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Fv(e){return Math.min(1,Math.max(0,e))}function XV(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function YV(e){return typeof e=="string"&&e.indexOf("%")!==-1}function fM(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function $v(e){return e<=1?"".concat(Number(e)*100,"%"):e}function oc(e){return e.length===1?"0"+e:String(e)}function QV(e,t,n){return{r:qi(e,255)*255,g:qi(t,255)*255,b:qi(n,255)*255}}function _6(e,t,n){e=qi(e,255),t=qi(t,255),n=qi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),l=0,c=0,o=(r+i)/2;if(r===i)c=0,l=0;else{var h=r-i;switch(c=o>.5?h/(2-r-i):h/(r+i),r){case e:l=(t-n)/h+(t<n?6:0);break;case t:l=(n-e)/h+2;break;case n:l=(e-t)/h+4;break}l/=6}return{h:l,s:c,l:o}}function Zx(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function JV(e,t,n){var r,i,l;if(e=qi(e,360),t=qi(t,100),n=qi(n,100),t===0)i=n,l=n,r=n;else{var c=n<.5?n*(1+t):n+t-n*t,o=2*n-c;r=Zx(o,c,e+1/3),i=Zx(o,c,e),l=Zx(o,c,e-1/3)}return{r:r*255,g:i*255,b:l*255}}function fy(e,t,n){e=qi(e,255),t=qi(t,255),n=qi(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),l=0,c=r,o=r-i,h=r===0?0:o/r;if(r===i)l=0;else{switch(r){case e:l=(t-n)/o+(t<n?6:0);break;case t:l=(n-e)/o+2;break;case n:l=(e-t)/o+4;break}l/=6}return{h:l,s:h,v:c}}function eU(e,t,n){e=qi(e,360)*6,t=qi(t,100),n=qi(n,100);var r=Math.floor(e),i=e-r,l=n*(1-t),c=n*(1-i*t),o=n*(1-(1-i)*t),h=r%6,p=[n,c,l,l,o,n][h],g=[o,n,n,c,l,l][h],b=[l,l,o,n,n,c][h];return{r:p*255,g:g*255,b:b*255}}function hy(e,t,n,r){var i=[oc(Math.round(e).toString(16)),oc(Math.round(t).toString(16)),oc(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function tU(e,t,n,r,i){var l=[oc(Math.round(e).toString(16)),oc(Math.round(t).toString(16)),oc(Math.round(n).toString(16)),oc(nU(r))];return i&&l[0].startsWith(l[0].charAt(1))&&l[1].startsWith(l[1].charAt(1))&&l[2].startsWith(l[2].charAt(1))&&l[3].startsWith(l[3].charAt(1))?l[0].charAt(0)+l[1].charAt(0)+l[2].charAt(0)+l[3].charAt(0):l.join("")}function nU(e){return Math.round(parseFloat(e)*255).toString(16)}function b6(e){return Ho(e)/255}function Ho(e){return parseInt(e,16)}function rU(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var u2={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Ua(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,l=null,c=!1,o=!1;return typeof e=="string"&&(e=aU(e)),typeof e=="object"&&(Ns(e.r)&&Ns(e.g)&&Ns(e.b)?(t=QV(e.r,e.g,e.b),c=!0,o=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Ns(e.h)&&Ns(e.s)&&Ns(e.v)?(r=$v(e.s),i=$v(e.v),t=eU(e.h,r,i),c=!0,o="hsv"):Ns(e.h)&&Ns(e.s)&&Ns(e.l)&&(r=$v(e.s),l=$v(e.l),t=JV(e.h,r,l),c=!0,o="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=fM(n),{ok:c,format:e.format||o,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var iU="[-\\+]?\\d+%?",oU="[-\\+]?\\d*\\.\\d+%?",Ul="(?:".concat(oU,")|(?:").concat(iU,")"),Xx="[\\s|\\(]+(".concat(Ul,")[,|\\s]+(").concat(Ul,")[,|\\s]+(").concat(Ul,")\\s*\\)?"),Yx="[\\s|\\(]+(".concat(Ul,")[,|\\s]+(").concat(Ul,")[,|\\s]+(").concat(Ul,")[,|\\s]+(").concat(Ul,")\\s*\\)?"),za={CSS_UNIT:new RegExp(Ul),rgb:new RegExp("rgb"+Xx),rgba:new RegExp("rgba"+Yx),hsl:new RegExp("hsl"+Xx),hsla:new RegExp("hsla"+Yx),hsv:new RegExp("hsv"+Xx),hsva:new RegExp("hsva"+Yx),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function aU(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(u2[e])e=u2[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=za.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=za.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=za.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=za.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=za.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=za.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=za.hex8.exec(e),n?{r:Ho(n[1]),g:Ho(n[2]),b:Ho(n[3]),a:b6(n[4]),format:t?"name":"hex8"}:(n=za.hex6.exec(e),n?{r:Ho(n[1]),g:Ho(n[2]),b:Ho(n[3]),format:t?"name":"hex"}:(n=za.hex4.exec(e),n?{r:Ho(n[1]+n[1]),g:Ho(n[2]+n[2]),b:Ho(n[3]+n[3]),a:b6(n[4]+n[4]),format:t?"name":"hex8"}:(n=za.hex3.exec(e),n?{r:Ho(n[1]+n[1]),g:Ho(n[2]+n[2]),b:Ho(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function Ns(e){return Boolean(za.CSS_UNIT.exec(String(e)))}var Qx=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=rU(t)),this.originalInput=t;var i=Ua(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,l=t.r/255,c=t.g/255,o=t.b/255;return l<=.03928?n=l/12.92:n=Math.pow((l+.055)/1.055,2.4),c<=.03928?r=c/12.92:r=Math.pow((c+.055)/1.055,2.4),o<=.03928?i=o/12.92:i=Math.pow((o+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=fM(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=fy(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=fy(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=_6(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=_6(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),hy(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),tU(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(qi(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(qi(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+hy(this.r,this.g,this.b,!1),n=0,r=Object.entries(u2);n<r.length;n++){var i=r[n],l=i[0],c=i[1];if(t===c)return l}return!1},e.prototype.toString=function(t){var n=Boolean(t);t=t!=null?t:this.format;var r=!1,i=this.a<1&&this.a>=0,l=!n&&i&&(t.startsWith("hex")||t==="name");return l?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=Fv(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=Fv(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=Fv(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=Fv(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),l=n/100,c={r:(i.r-r.r)*l+r.r,g:(i.g-r.g)*l+r.g,b:(i.b-r.b)*l+r.b,a:(i.a-r.a)*l+r.a};return new e(c)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,l=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,l.push(new e(r));return l},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,l=n.v,c=[],o=1/t;t--;)c.push(new e({h:r,s:i,v:l})),l=(l+o)%1;return c},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb(),i=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/i,g:(n.g*n.a+r.g*r.a*(1-n.a))/i,b:(n.b*n.a+r.b*r.a*(1-n.a))/i,a:i})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],l=360/t,c=1;c<t;c++)i.push(new e({h:(r+c*l)%360,s:n.s,l:n.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}(),Bv=2,w6=.16,sU=.05,lU=.05,uU=.15,hM=5,pM=4,cU=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function C6(e){var t=e.r,n=e.g,r=e.b,i=fy(t,n,r);return{h:i.h*360,s:i.s,v:i.v}}function Vv(e){var t=e.r,n=e.g,r=e.b;return"#".concat(hy(t,n,r,!1))}function dU(e,t,n){var r=n/100,i={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return i}function S6(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-Bv*t:Math.round(e.h)+Bv*t:r=n?Math.round(e.h)+Bv*t:Math.round(e.h)-Bv*t,r<0?r+=360:r>=360&&(r-=360),r}function E6(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-w6*t:t===pM?r=e.s+w6:r=e.s+sU*t,r>1&&(r=1),n&&t===hM&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function k6(e,t,n){var r;return n?r=e.v+lU*t:r=e.v-uU*t,r>1&&(r=1),Number(r.toFixed(2))}function Pp(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=Ua(e),i=hM;i>0;i-=1){var l=C6(r),c=Vv(Ua({h:S6(l,i,!0),s:E6(l,i,!0),v:k6(l,i,!0)}));n.push(c)}n.push(Vv(r));for(var o=1;o<=pM;o+=1){var h=C6(r),p=Vv(Ua({h:S6(h,o),s:E6(h,o),v:k6(h,o)}));n.push(p)}return t.theme==="dark"?cU.map(function(g){var b=g.index,w=g.opacity,P=Vv(dU(Ua(t.backgroundColor||"#141414"),Ua(n[b]),w*100));return P}):n}var Jx={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},e_={},t_={};Object.keys(Jx).forEach(function(e){e_[e]=Pp(Jx[e]),e_[e].primary=e_[e][5],t_[e]=Pp(Jx[e],{theme:"dark",backgroundColor:"#141414"}),t_[e].primary=t_[e][5]});function wo(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function uc(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}var T6="data-rc-order",fU="rc-util-key",c2=new Map;function mM(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):fU}function C0(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function hU(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function vM(e){return Array.from((c2.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function gM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!wo())return null;var n=t.csp,r=t.prepend,i=document.createElement("style");i.setAttribute(T6,hU(r)),n!=null&&n.nonce&&(i.nonce=n==null?void 0:n.nonce),i.innerHTML=e;var l=C0(t),c=l.firstChild;if(r){if(r==="queue"){var o=vM(l).filter(function(h){return["prepend","prependQueue"].includes(h.getAttribute(T6))});if(o.length)return l.insertBefore(i,o[o.length-1].nextSibling),i}l.insertBefore(i,c)}else l.appendChild(i);return i}function yM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=C0(t);return vM(n).find(function(r){return r.getAttribute(mM(t))===e})}function P6(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=yM(e,t);if(n){var r=C0(t);r.removeChild(n)}}function pU(e,t){var n=c2.get(e);if(!n||!uc(document,n)){var r=gM("",t),i=r.parentNode;c2.set(e,i),e.removeChild(r)}}function Gp(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=C0(n);pU(r,n);var i=yM(t,n);if(i){var l,c;if((l=n.csp)!==null&&l!==void 0&&l.nonce&&i.nonce!==((c=n.csp)===null||c===void 0?void 0:c.nonce)){var o;i.nonce=(o=n.csp)===null||o===void 0?void 0:o.nonce}return i.innerHTML!==e&&(i.innerHTML=e),i}var h=gM(e,n);return h.setAttribute(mM(n),t),h}function mU(e,t){Nr(e,"[@ant-design/icons] ".concat(t))}function I6(e){return sn(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(sn(e.icon)==="object"||typeof e.icon=="function")}function M6(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:t[n]=r}return t},{})}function d2(e,t,n){return n?tr.createElement(e.tag,ve(ve({key:t},M6(e.attrs)),n),(e.children||[]).map(function(r,i){return d2(r,"".concat(t,"-").concat(e.tag,"-").concat(i))})):tr.createElement(e.tag,ve({key:t},M6(e.attrs)),(e.children||[]).map(function(r,i){return d2(r,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function xM(e){return Pp(e)[0]}function _M(e){return e?Array.isArray(e)?e:[e]:[]}var vU=`
.anticon {
display: inline-block;
color: inherit;
font-style: normal;
line-height: 0;
text-align: center;
text-transform: none;
vertical-align: -0.125em;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.anticon > * {
line-height: 1;
}
.anticon svg {
display: inline-block;
}
.anticon::before {
display: none;
}
.anticon .anticon-icon {
display: block;
}
.anticon[tabindex] {
cursor: pointer;
}
.anticon-spin::before,
.anticon-spin {
display: inline-block;
-webkit-animation: loadingCircle 1s infinite linear;
animation: loadingCircle 1s infinite linear;
}
@-webkit-keyframes loadingCircle {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes loadingCircle {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
`,gU=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:vU,n=C.exports.useContext(RC),r=n.csp;C.exports.useEffect(function(){Gp(t,"@ant-design-icons",{prepend:!0,csp:r})},[])},yU=["icon","className","onClick","style","primaryColor","secondaryColor"],ep={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function xU(e){var t=e.primaryColor,n=e.secondaryColor;ep.primaryColor=t,ep.secondaryColor=n||xM(t),ep.calculated=!!n}function _U(){return ve({},ep)}var S0=function(t){var n=t.icon,r=t.className,i=t.onClick,l=t.style,c=t.primaryColor,o=t.secondaryColor,h=In(t,yU),p=ep;if(c&&(p={primaryColor:c,secondaryColor:o||xM(c)}),gU(),mU(I6(n),"icon should be icon definiton, but got ".concat(n)),!I6(n))return null;var g=n;return g&&typeof g.icon=="function"&&(g=ve(ve({},g),{},{icon:g.icon(p.primaryColor,p.secondaryColor)})),d2(g.icon,"svg-".concat(g.name),ve({className:r,onClick:i,style:l,"data-icon":g.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},h))};S0.displayName="IconReact";S0.getTwoToneColors=_U;S0.setTwoToneColors=xU;const $C=S0;function bM(e){var t=_M(e),n=ze(t,2),r=n[0],i=n[1];return $C.setTwoToneColors({primaryColor:r,secondaryColor:i})}function bU(){var e=$C.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var wU=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];bM("#1890ff");var E0=C.exports.forwardRef(function(e,t){var n,r=e.className,i=e.icon,l=e.spin,c=e.rotate,o=e.tabIndex,h=e.onClick,p=e.twoToneColor,g=In(e,wU),b=C.exports.useContext(RC),w=b.prefixCls,P=w===void 0?"anticon":w,I=b.rootClassName,A=Ye(I,P,(n={},se(n,"".concat(P,"-").concat(i.name),!!i.name),se(n,"".concat(P,"-spin"),!!l||i.name==="loading"),n),r),O=o;O===void 0&&h&&(O=-1);var M=c?{msTransform:"rotate(".concat(c,"deg)"),transform:"rotate(".concat(c,"deg)")}:void 0,R=_M(p),N=ze(R,2),z=N[0],B=N[1];return E("span",{...ve(ve({role:"img","aria-label":i.name},g),{},{ref:t,tabIndex:O,onClick:h,className:A}),children:E($C,{icon:i,primaryColor:z,secondaryColor:B,style:M})})});E0.displayName="AntdIcon";E0.getTwoToneColor=bU;E0.setTwoToneColor=bM;const lr=E0;var wM=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:ZV})})};wM.displayName="CheckCircleFilled";const k0=C.exports.forwardRef(wM);var CU={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"}}]},name:"close-circle",theme:"filled"};const SU=CU;var CM=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:SU})})};CM.displayName="CloseCircleFilled";const kc=C.exports.forwardRef(CM);var EU={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"};const kU=EU;var SM=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:kU})})};SM.displayName="ExclamationCircleFilled";const T0=C.exports.forwardRef(SM);var TU={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"};const PU=TU;var EM=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:PU})})};EM.displayName="InfoCircleFilled";const kM=C.exports.forwardRef(EM);var IU={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};const MU=IU;var TM=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:MU})})};TM.displayName="LoadingOutlined";const qd=C.exports.forwardRef(TM);var qp=ve({},NF),RU=qp.version,AU=qp.render,OU=qp.unmountComponentAtNode,P0;try{var NU=Number((RU||"").split(".")[0]);NU>=18&&(P0=qp.createRoot)}catch{}function R6(e){var t=qp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&sn(t)==="object"&&(t.usingClientEntryPoint=e)}var py="__rc_react_root__";function DU(e,t){R6(!0);var n=t[py]||P0(t);R6(!1),n.render(e),t[py]=n}function LU(e,t){AU(e,t)}function PM(e,t){if(P0){DU(e,t);return}LU(e,t)}function zU(e){return f2.apply(this,arguments)}function f2(){return f2=Ec(bo().mark(function e(t){return bo().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.resolve().then(function(){var i;(i=t[py])===null||i===void 0||i.unmount(),delete t[py]}));case 1:case"end":return r.stop()}},e)})),f2.apply(this,arguments)}function FU(e){OU(e)}function IM(e){return h2.apply(this,arguments)}function h2(){return h2=Ec(bo().mark(function e(t){return bo().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(P0===void 0){r.next=2;break}return r.abrupt("return",zU(t));case 2:FU(t);case 3:case"end":return r.stop()}},e)})),h2.apply(this,arguments)}function A6(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}function $U(e,t){var n={animationend:A6("Animation","AnimationEnd"),transitionend:A6("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}var BU=$U(wo(),typeof window<"u"?window:{}),MM={};if(wo()){var VU=document.createElement("div");MM=VU.style}var Uv={};function RM(e){if(Uv[e])return Uv[e];var t=BU[e];if(t)for(var n=Object.keys(t),r=n.length,i=0;i<r;i+=1){var l=n[i];if(Object.prototype.hasOwnProperty.call(t,l)&&l in MM)return Uv[e]=t[l],Uv[e]}return""}var AM=RM("animationend"),OM=RM("transitionend"),NM=!!(AM&&OM),O6=AM||"animationend",N6=OM||"transitionend";function D6(e,t){if(!e)return null;if(sn(e)==="object"){var n=t.replace(/-\w/g,function(r){return r[1].toUpperCase()});return e[n]}return"".concat(e,"-").concat(t)}var fd="none",jv="appear",Kv="enter",Hv="leave",L6="none",$s="prepare",kd="start",Td="active",BC="end";function fs(e){var t=C.exports.useRef(!1),n=C.exports.useState(e),r=ze(n,2),i=r[0],l=r[1];C.exports.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]);function c(o,h){h&&t.current||l(o)}return[i,c]}var DM=function(t){return+setTimeout(t,16)},LM=function(t){return clearTimeout(t)};typeof window<"u"&&"requestAnimationFrame"in window&&(DM=function(t){return window.requestAnimationFrame(t)},LM=function(t){return window.cancelAnimationFrame(t)});var z6=0,VC=new Map;function zM(e){VC.delete(e)}var nr=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;z6+=1;var r=z6;function i(l){if(l===0)zM(r),t();else{var c=DM(function(){i(l-1)});VC.set(r,c)}}return i(n),r};nr.cancel=function(e){var t=VC.get(e);return zM(t),LM(t)};const UU=function(){var e=C.exports.useRef(null);function t(){nr.cancel(e.current)}function n(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var l=nr(function(){i<=1?r({isCanceled:function(){return l!==e.current}}):n(r,i-1)});e.current=l}return C.exports.useEffect(function(){return function(){t()}},[]),[n,t]};var FM=wo()?C.exports.useLayoutEffect:C.exports.useEffect,F6=[$s,kd,Td,BC],$M=!1,jU=!0;function BM(e){return e===Td||e===BC}const KU=function(e,t){var n=fs(L6),r=ze(n,2),i=r[0],l=r[1],c=UU(),o=ze(c,2),h=o[0],p=o[1];function g(){l($s,!0)}return FM(function(){if(i!==L6&&i!==BC){var b=F6.indexOf(i),w=F6[b+1],P=t(i);P===$M?l(w,!0):h(function(I){function A(){I.isCanceled()||l(w,!0)}P===!0?A():Promise.resolve(P).then(A)})}},[e,i]),C.exports.useEffect(function(){return function(){p()}},[]),[g,i]},HU=function(e){var t=C.exports.useRef(),n=C.exports.useRef(e);n.current=e;var r=C.exports.useCallback(function(c){n.current(c)},[]);function i(c){c&&(c.removeEventListener(N6,r),c.removeEventListener(O6,r))}function l(c){t.current&&t.current!==c&&i(t.current),c&&c!==t.current&&(c.addEventListener(N6,r),c.addEventListener(O6,r),t.current=c)}return C.exports.useEffect(function(){return function(){i(t.current)}},[]),[l,i]};function WU(e,t,n,r){var i=r.motionEnter,l=i===void 0?!0:i,c=r.motionAppear,o=c===void 0?!0:c,h=r.motionLeave,p=h===void 0?!0:h,g=r.motionDeadline,b=r.motionLeaveImmediately,w=r.onAppearPrepare,P=r.onEnterPrepare,I=r.onLeavePrepare,A=r.onAppearStart,O=r.onEnterStart,M=r.onLeaveStart,R=r.onAppearActive,N=r.onEnterActive,z=r.onLeaveActive,B=r.onAppearEnd,U=r.onEnterEnd,q=r.onLeaveEnd,H=r.onVisibleChanged,te=fs(),Y=ze(te,2),le=Y[0],J=Y[1],Z=fs(fd),Q=ze(Z,2),ge=Q[0],re=Q[1],de=fs(null),oe=ze(de,2),ye=oe[0],Re=oe[1],Te=C.exports.useRef(!1),ke=C.exports.useRef(null);function De(){return n()}var Me=C.exports.useRef(!1);function Ne(Ct){var Lt=De();if(!(Ct&&!Ct.deadline&&Ct.target!==Lt)){var lt=Me.current,dt;ge===jv&&lt?dt=B==null?void 0:B(Lt,Ct):ge===Kv&&lt?dt=U==null?void 0:U(Lt,Ct):ge===Hv&&lt&&(dt=q==null?void 0:q(Lt,Ct)),ge!==fd&&lt&&dt!==!1&&(re(fd,!0),Re(null,!0))}}var Le=HU(Ne),Ve=ze(Le,1),qe=Ve[0],Ue=C.exports.useMemo(function(){var Ct,Lt,lt;switch(ge){case jv:return Ct={},se(Ct,$s,w),se(Ct,kd,A),se(Ct,Td,R),Ct;case Kv:return Lt={},se(Lt,$s,P),se(Lt,kd,O),se(Lt,Td,N),Lt;case Hv:return lt={},se(lt,$s,I),se(lt,kd,M),se(lt,Td,z),lt;default:return{}}},[ge]),ct=KU(ge,function(Ct){if(Ct===$s){var Lt=Ue[$s];return Lt?Lt(De()):$M}if(Xe in Ue){var lt;Re(((lt=Ue[Xe])===null||lt===void 0?void 0:lt.call(Ue,De(),null))||null)}return Xe===Td&&(qe(De()),g>0&&(clearTimeout(ke.current),ke.current=setTimeout(function(){Ne({deadline:!0})},g))),jU}),pt=ze(ct,2),Tt=pt[0],Xe=pt[1],Pt=BM(Xe);Me.current=Pt,FM(function(){J(t);var Ct=Te.current;if(Te.current=!0,!!e){var Lt;!Ct&&t&&o&&(Lt=jv),Ct&&t&&l&&(Lt=Kv),(Ct&&!t&&p||!Ct&&b&&!t&&p)&&(Lt=Hv),Lt&&(re(Lt),Tt())}},[t]),C.exports.useEffect(function(){(ge===jv&&!o||ge===Kv&&!l||ge===Hv&&!p)&&re(fd)},[o,l,p]),C.exports.useEffect(function(){return function(){Te.current=!1,clearTimeout(ke.current)}},[]);var mt=C.exports.useRef(!1);C.exports.useEffect(function(){le&&(mt.current=!0),le!==void 0&&ge===fd&&((mt.current||le)&&(H==null||H(le)),mt.current=!0)},[le,ge]);var Mt=ye;return Ue[$s]&&Xe===kd&&(Mt=ve({transition:"none"},Mt)),[ge,Xe,Mt,le!=null?le:t]}var GU=function(e){li(n,e);var t=ui(n);function n(){return Kr(this,n),t.apply(this,arguments)}return Hr(n,[{key:"render",value:function(){return this.props.children}}]),n}(C.exports.Component);function qU(e){var t=e;sn(e)==="object"&&(t=e.transitionSupport);function n(i){return!!(i.motionName&&t)}var r=C.exports.forwardRef(function(i,l){var c=i.visible,o=c===void 0?!0:c,h=i.removeOnLeave,p=h===void 0?!0:h,g=i.forceRender,b=i.children,w=i.motionName,P=i.leavedClassName,I=i.eventProps,A=n(i),O=C.exports.useRef(),M=C.exports.useRef();function R(){try{return O.current instanceof HTMLElement?O.current:kp(M.current)}catch{return null}}var N=WU(A,o,R,i),z=ze(N,4),B=z[0],U=z[1],q=z[2],H=z[3],te=C.exports.useRef(H);H&&(te.current=!0);var Y=C.exports.useCallback(function(de){O.current=de,uy(l,de)},[l]),le,J=ve(ve({},I),{},{visible:o});if(!b)le=null;else if(B===fd||!n(i))H?le=b(ve({},J),Y):!p&&te.current&&P?le=b(ve(ve({},J),{},{className:P}),Y):g||!p&&!P?le=b(ve(ve({},J),{},{style:{display:"none"}}),Y):le=null;else{var Z,Q;U===$s?Q="prepare":BM(U)?Q="active":U===kd&&(Q="start"),le=b(ve(ve({},J),{},{className:Ye(D6(w,B),(Z={},se(Z,D6(w,"".concat(B,"-").concat(Q)),Q),se(Z,w,typeof w=="string"),Z)),style:q}),Y)}if(C.exports.isValidElement(le)&&Sc(le)){var ge=le,re=ge.ref;re||(le=C.exports.cloneElement(le,{ref:Y}))}return E(GU,{ref:M,children:le})});return r.displayName="CSSMotion",r}const Ca=qU(NM);var p2="add",m2="keep",v2="remove",n_="removed";function ZU(e){var t;return e&&sn(e)==="object"&&"key"in e?t=e:t={key:e},ve(ve({},t),{},{key:String(t.key)})}function g2(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(ZU)}function XU(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,i=t.length,l=g2(e),c=g2(t);l.forEach(function(p){for(var g=!1,b=r;b<i;b+=1){var w=c[b];if(w.key===p.key){r<b&&(n=n.concat(c.slice(r,b).map(function(P){return ve(ve({},P),{},{status:p2})})),r=b),n.push(ve(ve({},w),{},{status:m2})),r+=1,g=!0;break}}g||n.push(ve(ve({},p),{},{status:v2}))}),r<i&&(n=n.concat(c.slice(r).map(function(p){return ve(ve({},p),{},{status:p2})})));var o={};n.forEach(function(p){var g=p.key;o[g]=(o[g]||0)+1});var h=Object.keys(o).filter(function(p){return o[p]>1});return h.forEach(function(p){n=n.filter(function(g){var b=g.key,w=g.status;return b!==p||w!==v2}),n.forEach(function(g){g.key===p&&(g.status=m2)})}),n}var YU=["component","children","onVisibleChanged","onAllRemoved"],QU=["status"],JU=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function ej(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ca,n=function(r){li(l,r);var i=ui(l);function l(){var c;Kr(this,l);for(var o=arguments.length,h=new Array(o),p=0;p<o;p++)h[p]=arguments[p];return c=i.call.apply(i,[this].concat(h)),se(On(c),"state",{keyEntities:[]}),se(On(c),"removeKey",function(g){var b=c.state.keyEntities,w=b.map(function(P){return P.key!==g?P:ve(ve({},P),{},{status:n_})});return c.setState({keyEntities:w}),w.filter(function(P){var I=P.status;return I!==n_}).length}),c}return Hr(l,[{key:"render",value:function(){var o=this,h=this.state.keyEntities,p=this.props,g=p.component,b=p.children,w=p.onVisibleChanged,P=p.onAllRemoved,I=In(p,YU),A=g||C.exports.Fragment,O={};return JU.forEach(function(M){O[M]=I[M],delete I[M]}),delete I.keys,E(A,{...I,children:h.map(function(M){var R=M.status,N=In(M,QU),z=R===p2||R===m2;return C.exports.createElement(t,{...O,key:N.key,visible:z,eventProps:N,onVisibleChanged:function(U){if(w==null||w(U,{key:N.key}),!U){var q=o.removeKey(N.key);q===0&&P&&P()}}},b)})})}}],[{key:"getDerivedStateFromProps",value:function(o,h){var p=o.keys,g=h.keyEntities,b=g2(p),w=XU(g,b);return{keyEntities:w.filter(function(P){var I=g.find(function(A){var O=A.key;return P.key===O});return!(I&&I.status===n_&&P.status===v2)})}}}]),l}(C.exports.Component);return se(n,"defaultProps",{component:"div"}),n}const VM=ej(NM);var UC=function(e){li(n,e);var t=ui(n);function n(){var r;Kr(this,n);for(var i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];return r=t.call.apply(t,[this].concat(l)),r.closeTimer=null,r.close=function(o){o&&o.stopPropagation(),r.clearCloseTimer();var h=r.props,p=h.onClose,g=h.noticeKey;p&&p(g)},r.startCloseTimer=function(){r.props.duration&&(r.closeTimer=window.setTimeout(function(){r.close()},r.props.duration*1e3))},r.clearCloseTimer=function(){r.closeTimer&&(clearTimeout(r.closeTimer),r.closeTimer=null)},r}return Hr(n,[{key:"componentDidMount",value:function(){this.startCloseTimer()}},{key:"componentDidUpdate",value:function(i){(this.props.duration!==i.duration||this.props.updateMark!==i.updateMark||this.props.visible!==i.visible&&this.props.visible)&&this.restartCloseTimer()}},{key:"componentWillUnmount",value:function(){this.clearCloseTimer()}},{key:"restartCloseTimer",value:function(){this.clearCloseTimer(),this.startCloseTimer()}},{key:"render",value:function(){var i=this,l=this.props,c=l.prefixCls,o=l.className,h=l.closable,p=l.closeIcon,g=l.style,b=l.onClick,w=l.children,P=l.holder,I="".concat(c,"-notice"),A=Object.keys(this.props).reduce(function(M,R){return(R.substr(0,5)==="data-"||R.substr(0,5)==="aria-"||R==="role")&&(M[R]=i.props[R]),M},{}),O=Qe("div",{className:Ye(I,o,se({},"".concat(I,"-closable"),h)),style:g,onMouseEnter:this.clearCloseTimer,onMouseLeave:this.startCloseTimer,onClick:b,...A,children:[E("div",{className:"".concat(I,"-content"),children:w}),h?E("a",{tabIndex:0,onClick:this.close,className:"".concat(I,"-close"),children:p||E("span",{className:"".concat(I,"-close-x")})}):null]});return P?mc.createPortal(O,P):O}}]),n}(C.exports.Component);UC.defaultProps={onClose:function(){},duration:1.5};function jC(e){var t=C.exports.useRef({}),n=C.exports.useState([]),r=ze(n,2),i=r[0],l=r[1];function c(o){var h=!0;e.add(o,function(p,g){var b=g.key;if(p&&(!t.current[b]||h)){var w=E(UC,{...g,holder:p});t.current[b]=w,l(function(P){var I=P.findIndex(function(O){return O.key===g.key});if(I===-1)return[].concat(wt(P),[w]);var A=wt(P);return A[I]=w,A})}h=!1})}return[c,E($n,{children:i})]}var tj=["getContainer"],$6=0,nj=Date.now();function B6(){var e=$6;return $6+=1,"rcNotification_".concat(nj,"_").concat(e)}var Zd=function(e){li(n,e);var t=ui(n);function n(){var r;Kr(this,n);for(var i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];return r=t.call.apply(t,[this].concat(l)),r.state={notices:[]},r.hookRefs=new Map,r.add=function(o,h){var p,g=(p=o.key)!==null&&p!==void 0?p:B6(),b=ve(ve({},o),{},{key:g}),w=r.props.maxCount;r.setState(function(P){var I=P.notices,A=I.map(function(M){return M.notice.key}).indexOf(g),O=I.concat();return A!==-1?O.splice(A,1,{notice:b,holderCallback:h}):(w&&I.length>=w&&(b.key=O[0].notice.key,b.updateMark=B6(),b.userPassKey=g,O.shift()),O.push({notice:b,holderCallback:h})),{notices:O}})},r.remove=function(o){r.setState(function(h){var p=h.notices;return{notices:p.filter(function(g){var b=g.notice,w=b.key,P=b.userPassKey,I=P!=null?P:w;return I!==o})}})},r.noticePropsMap={},r}return Hr(n,[{key:"getTransitionName",value:function(){var i=this.props,l=i.prefixCls,c=i.animation,o=this.props.transitionName;return!o&&c&&(o="".concat(l,"-").concat(c)),o}},{key:"render",value:function(){var i=this,l=this.state.notices,c=this.props,o=c.prefixCls,h=c.className,p=c.closeIcon,g=c.style,b=[];return l.forEach(function(w,P){var I=w.notice,A=w.holderCallback,O=P===l.length-1?I.updateMark:void 0,M=I.key,R=I.userPassKey,N=ve(ve(ve({prefixCls:o,closeIcon:p},I),I.props),{},{key:M,noticeKey:R||M,updateMark:O,onClose:function(B){var U;i.remove(B),(U=I.onClose)===null||U===void 0||U.call(I)},onClick:I.onClick,children:I.content});b.push(M),i.noticePropsMap[M]={props:N,holderCallback:A}}),E("div",{className:Ye(o,h),style:g,children:E(VM,{keys:b,motionName:this.getTransitionName(),onVisibleChanged:function(P,I){var A=I.key;P||delete i.noticePropsMap[A]},children:function(w){var P=w.key,I=w.className,A=w.style,O=w.visible,M=i.noticePropsMap[P],R=M.props,N=M.holderCallback;return N?E("div",{className:Ye(I,"".concat(o,"-hook-holder")),style:ve({},A),ref:function(B){typeof P>"u"||(B?(i.hookRefs.set(P,B),N(B,R)):i.hookRefs.delete(P))}},P):E(UC,{...R,className:Ye(I,R==null?void 0:R.className),style:ve(ve({},A),R==null?void 0:R.style),visible:O})}})})}}]),n}(C.exports.Component);Zd.newInstance=void 0;Zd.defaultProps={prefixCls:"rc-notification",animation:"fade",style:{top:65,left:"50%"}};Zd.newInstance=function(t,n){var r=t||{},i=r.getContainer,l=In(r,tj),c=document.createElement("div");if(i){var o=i();o.appendChild(c)}else document.body.appendChild(c);var h=!1;function p(g){h||(h=!0,n({notice:function(w){g.add(w)},removeNotice:function(w){g.remove(w)},component:g,destroy:function(){IM(c),c.parentNode&&c.parentNode.removeChild(c)},useNotification:function(){return jC(g)}}))}PM(E(Zd,{...l,ref:p}),c)};function rj(e,t){var n=function(){var i,l,c=null,o={add:function(A,O){c==null||c.component.add(A,O)}},h=jC(o),p=ze(h,2),g=p[0],b=p[1];function w(I){var A=I.prefixCls,O=i("message",A),M=i(),R=I.key||ZM(),N=new Promise(function(B){var U=function(){return typeof I.onClose=="function"&&I.onClose(),B(!0)};e(tt(tt({},I),{prefixCls:O,rootPrefixCls:M,getPopupContainer:l}),function(q){var H=q.prefixCls,te=q.instance;c=te,g(t(tt(tt({},I),{key:R,onClose:U}),H))})}),z=function(){c&&c.removeNotice(R)};return z.then=function(B,U){return N.then(B,U)},z.promise=N,z}var P=C.exports.useRef({});return P.current.open=w,QM.forEach(function(I){return eR(P.current,I)}),[P.current,E(hu,{children:function(I){return i=I.getPrefixCls,l=I.getPopupContainer,b}},"holder")]};return n}var xo,UM=3,jM,ij=1,KM="",y2="move-up",HM=!1,WM,GM,qM=!1;function ZM(){return ij++}function oj(e){e.top!==void 0&&(jM=e.top,xo=null),e.duration!==void 0&&(UM=e.duration),e.prefixCls!==void 0&&(KM=e.prefixCls),e.getContainer!==void 0&&(WM=e.getContainer,xo=null),e.transitionName!==void 0&&(y2=e.transitionName,xo=null,HM=!0),e.maxCount!==void 0&&(GM=e.maxCount,xo=null),e.rtl!==void 0&&(qM=e.rtl)}function XM(e,t){var n=e.prefixCls,r=e.getPopupContainer,i=GC(),l=i.getPrefixCls,c=i.getRootPrefixCls,o=i.getIconPrefixCls,h=l("message",n||KM),p=c(e.rootPrefixCls,h),g=o();if(xo){t({prefixCls:h,rootPrefixCls:p,iconPrefixCls:g,instance:xo});return}var b={prefixCls:h,transitionName:HM?y2:"".concat(p,"-").concat(y2),style:{top:jM},getContainer:WM||r,maxCount:GM};Zd.newInstance(b,function(w){if(xo){t({prefixCls:h,rootPrefixCls:p,iconPrefixCls:g,instance:xo});return}xo=w,t({prefixCls:h,rootPrefixCls:p,iconPrefixCls:g,instance:w})})}var YM={info:kM,success:k0,error:kc,warning:T0,loading:qd},QM=Object.keys(YM);function JM(e,t,n){var r,i=e.duration!==void 0?e.duration:UM,l=YM[e.type],c=Ye("".concat(t,"-custom-content"),(r={},se(r,"".concat(t,"-").concat(e.type),e.type),se(r,"".concat(t,"-rtl"),qM===!0),r));return{key:e.key,duration:i,style:e.style||{},className:e.className,content:E(df,{iconPrefixCls:n,children:Qe("div",{className:c,children:[e.icon||l&&E(l,{}),E("span",{children:e.content})]})}),onClose:e.onClose,onClick:e.onClick}}function aj(e){var t=e.key||ZM(),n=new Promise(function(i){var l=function(){return typeof e.onClose=="function"&&e.onClose(),i(!0)};XM(e,function(c){var o=c.prefixCls,h=c.iconPrefixCls,p=c.instance;p.notice(JM(tt(tt({},e),{key:t,onClose:l}),o,h))})}),r=function(){var l;xo&&(xo.removeNotice(t),(l=e.onClose)===null||l===void 0||l.call(e))};return r.then=function(i,l){return n.then(i,l)},r.promise=n,r}function sj(e){return Object.prototype.toString.call(e)==="[object Object]"&&!!e.content}var Ip={open:aj,config:oj,destroy:function(t){if(xo)if(t){var n=xo,r=n.removeNotice;r(t)}else{var i=xo,l=i.destroy;l(),xo=null}}};function eR(e,t){e[t]=function(n,r,i){return sj(n)?e.open(tt(tt({},n),{type:t})):(typeof r=="function"&&(i=r,r=void 0),e.open({content:n,duration:r,type:t,onClose:i}))}}QM.forEach(function(e){return eR(Ip,e)});Ip.warn=Ip.warning;Ip.useMessage=rj(XM,JM);const lj=Ip;var uj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"};const cj=uj;var tR=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:cj})})};tR.displayName="CheckCircleOutlined";const KC=C.exports.forwardRef(tR);var dj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M685.4 354.8c0-4.4-3.6-8-8-8l-66 .3L512 465.6l-99.3-118.4-66.1-.3c-4.4 0-8 3.5-8 8 0 1.9.7 3.7 1.9 5.2l130.1 155L340.5 670a8.32 8.32 0 00-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3L512 564.4l99.3 118.4 66 .3c4.4 0 8-3.5 8-8 0-1.9-.7-3.7-1.9-5.2L553.5 515l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z"}},{tag:"path",attrs:{d:"M512 65C264.6 65 64 265.6 64 513s200.6 448 448 448 448-200.6 448-448S759.4 65 512 65zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"close-circle",theme:"outlined"};const fj=dj;var nR=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:fj})})};nR.displayName="CloseCircleOutlined";const HC=C.exports.forwardRef(nR);var hj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}}]},name:"close",theme:"outlined"};const pj=hj;var rR=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:pj})})};rR.displayName="CloseOutlined";const I0=C.exports.forwardRef(rR);var mj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"};const vj=mj;var iR=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:vj})})};iR.displayName="ExclamationCircleOutlined";const M0=C.exports.forwardRef(iR);var gj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"};const yj=gj;var oR=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:yj})})};oR.displayName="InfoCircleOutlined";const WC=C.exports.forwardRef(oR);function xj(e,t){var n=function(){var i,l=null,c={add:function(I,A){l==null||l.component.add(I,A)}},o=jC(c),h=ze(o,2),p=h[0],g=h[1];function b(P){var I=P.prefixCls,A=i("notification",I);e(tt(tt({},P),{prefixCls:A}),function(O){var M=O.prefixCls,R=O.instance;l=R,p(t(P,M))})}var w=C.exports.useRef({});return w.current.open=b,["success","info","warning","error"].forEach(function(P){w.current[P]=function(I){return w.current.open(tt(tt({},I),{type:P}))}}),[w.current,E(hu,{children:function(P){return i=P.getPrefixCls,g}},"holder")]};return n}globalThis&&globalThis.__awaiter;var Ju={},aR=4.5,sR=24,lR=24,uR="",x2="topRight",cR,dR,fR=!1,hR;function _j(e){var t=e.duration,n=e.placement,r=e.bottom,i=e.top,l=e.getContainer,c=e.closeIcon,o=e.prefixCls;o!==void 0&&(uR=o),t!==void 0&&(aR=t),n!==void 0?x2=n:e.rtl&&(x2="topLeft"),r!==void 0&&(lR=r),i!==void 0&&(sR=i),l!==void 0&&(cR=l),c!==void 0&&(dR=c),e.rtl!==void 0&&(fR=e.rtl),e.maxCount!==void 0&&(hR=e.maxCount)}function bj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:sR,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:lR,r;switch(e){case"top":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:t,bottom:"auto"};break;case"topLeft":r={left:0,top:t,bottom:"auto"};break;case"topRight":r={right:0,top:t,bottom:"auto"};break;case"bottom":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:n};break;case"bottomLeft":r={left:0,top:"auto",bottom:n};break;default:r={right:0,top:"auto",bottom:n};break}return r}function pR(e,t){var n=e.placement,r=n===void 0?x2:n,i=e.top,l=e.bottom,c=e.getContainer,o=c===void 0?cR:c,h=e.prefixCls,p=GC(),g=p.getPrefixCls,b=p.getIconPrefixCls,w=g("notification",h||uR),P=b(),I="".concat(w,"-").concat(r),A=Ju[I];if(A){Promise.resolve(A).then(function(M){t({prefixCls:"".concat(w,"-notice"),iconPrefixCls:P,instance:M})});return}var O=Ye("".concat(w,"-").concat(r),se({},"".concat(w,"-rtl"),fR===!0));Ju[I]=new Promise(function(M){Zd.newInstance({prefixCls:w,className:O,style:bj(r,i,l),getContainer:o,maxCount:hR},function(R){M(R),t({prefixCls:"".concat(w,"-notice"),iconPrefixCls:P,instance:R})})})}var wj={success:KC,info:WC,error:HC,warning:M0};function mR(e,t,n){var r=e.duration,i=e.icon,l=e.type,c=e.description,o=e.message,h=e.btn,p=e.onClose,g=e.onClick,b=e.key,w=e.style,P=e.className,I=e.closeIcon,A=I===void 0?dR:I,O=e.props,M=r===void 0?aR:r,R=null;i?R=E("span",{className:"".concat(t,"-icon"),children:e.icon}):l&&(R=C.exports.createElement(wj[l]||null,{className:"".concat(t,"-icon ").concat(t,"-icon-").concat(l)}));var N=E("span",{className:"".concat(t,"-close-x"),children:A||E(I0,{className:"".concat(t,"-close-icon")})}),z=!c&&R?E("span",{className:"".concat(t,"-message-single-line-auto-margin")}):null;return{content:E(df,{iconPrefixCls:n,children:Qe("div",{className:R?"".concat(t,"-with-icon"):"",role:"alert",children:[R,Qe("div",{className:"".concat(t,"-message"),children:[z,o]}),E("div",{className:"".concat(t,"-description"),children:c}),h?E("span",{className:"".concat(t,"-btn"),children:h}):null]})}),duration:M,closable:!0,closeIcon:N,onClose:p,onClick:g,key:b,style:w||{},className:Ye(P,se({},"".concat(t,"-").concat(l),!!l)),props:O}}function Cj(e){pR(e,function(t){var n=t.prefixCls,r=t.iconPrefixCls,i=t.instance;i.notice(mR(e,n,r))})}var Xd={open:Cj,close:function(t){Object.keys(Ju).forEach(function(n){return Promise.resolve(Ju[n]).then(function(r){r.removeNotice(t)})})},config:_j,destroy:function(){Object.keys(Ju).forEach(function(t){Promise.resolve(Ju[t]).then(function(n){n.destroy()}),delete Ju[t]})}};["success","info","warning","error"].forEach(function(e){Xd[e]=function(t){return Xd.open(tt(tt({},t),{type:e}))}});Xd.warn=Xd.warning;Xd.useNotification=xj(pR,mR);const Sj=Xd;var Ej=function(t,n){return n||(t?"ant-".concat(t):"ant")},Nn=C.exports.createContext({getPrefixCls:Ej}),hu=Nn.Consumer,kj="-ant-".concat(Date.now(),"-").concat(Math.random());function Tj(e,t){var n={},r=function(g,b){var w=g.clone();return w=(b==null?void 0:b(w))||w,w.toRgbString()},i=function(g,b){var w=new Qx(g),P=Pp(w.toRgbString());n["".concat(b,"-color")]=r(w),n["".concat(b,"-color-disabled")]=P[1],n["".concat(b,"-color-hover")]=P[4],n["".concat(b,"-color-active")]=P[6],n["".concat(b,"-color-outline")]=w.clone().setAlpha(.2).toRgbString(),n["".concat(b,"-color-deprecated-bg")]=P[0],n["".concat(b,"-color-deprecated-border")]=P[2]};if(t.primaryColor){i(t.primaryColor,"primary");var l=new Qx(t.primaryColor),c=Pp(l.toRgbString());c.forEach(function(p,g){n["primary-".concat(g+1)]=p}),n["primary-color-deprecated-l-35"]=r(l,function(p){return p.lighten(35)}),n["primary-color-deprecated-l-20"]=r(l,function(p){return p.lighten(20)}),n["primary-color-deprecated-t-20"]=r(l,function(p){return p.tint(20)}),n["primary-color-deprecated-t-50"]=r(l,function(p){return p.tint(50)}),n["primary-color-deprecated-f-12"]=r(l,function(p){return p.setAlpha(p.getAlpha()*.12)});var o=new Qx(c[0]);n["primary-color-active-deprecated-f-30"]=r(o,function(p){return p.setAlpha(p.getAlpha()*.3)}),n["primary-color-active-deprecated-d-02"]=r(o,function(p){return p.darken(2)})}t.successColor&&i(t.successColor,"success"),t.warningColor&&i(t.warningColor,"warning"),t.errorColor&&i(t.errorColor,"error"),t.infoColor&&i(t.infoColor,"info");var h=Object.keys(n).map(function(p){return"--".concat(e,"-").concat(p,": ").concat(n[p],";")});return`
:root {
`.concat(h.join(`
`),`
}
`).trim()}function Pj(e,t){var n=Tj(e,t);wo()&&Gp(n,"".concat(kj,"-dynamic-theme"))}var _2=C.exports.createContext(!1),vR=function(t){var n=t.children,r=t.disabled,i=C.exports.useContext(_2);return E(_2.Provider,{value:r!=null?r:i,children:n})};const pu=_2;var b2=C.exports.createContext(void 0),gR=function(t){var n=t.children,r=t.size;return E(b2.Consumer,{children:function(i){return E(b2.Provider,{value:r||i,children:n})}})};const ms=b2;var Ij=["getTargetContainer","getPopupContainer","renderEmpty","pageHeader","input","pagination","form"],Mj="ant",Rj="anticon",my,yR;function Cg(){return my||Mj}function Aj(){return yR||Rj}var Oj=function(t){var n=t.prefixCls,r=t.iconPrefixCls,i=t.theme;n!==void 0&&(my=n),r!==void 0&&(yR=r),i&&Pj(Cg(),i)},GC=function(){return{getPrefixCls:function(n,r){return r||(n?"".concat(Cg(),"-").concat(n):Cg())},getIconPrefixCls:Aj,getRootPrefixCls:function(n,r){return n||my||(r&&r.includes("-")?r.replace(/^(.*)-[^-]*$/,"$1"):Cg())}}},Nj=function(t){var n,r,i=t.children,l=t.csp,c=t.autoInsertSpaceInButton,o=t.form,h=t.locale,p=t.componentSize,g=t.direction,b=t.space,w=t.virtual,P=t.dropdownMatchSelectWidth,I=t.legacyLocale,A=t.parentContext,O=t.iconPrefixCls,M=t.componentDisabled,R=C.exports.useCallback(function(H,te){var Y=t.prefixCls;if(te)return te;var le=Y||A.getPrefixCls("");return H?"".concat(le,"-").concat(H):le},[A.getPrefixCls,t.prefixCls]),N=tt(tt({},A),{csp:l,autoInsertSpaceInButton:c,locale:h||I,direction:g,space:b,virtual:w,dropdownMatchSelectWidth:P,getPrefixCls:R});Ij.forEach(function(H){var te=t[H];te&&(N[H]=te)});var z=Kp(function(){return N},N,function(H,te){var Y=Object.keys(H),le=Object.keys(te);return Y.length!==le.length||Y.some(function(J){return H[J]!==te[J]})}),B=C.exports.useMemo(function(){return{prefixCls:O,csp:l}},[O,l]),U=i,q={};return h&&(q=((n=h.Form)===null||n===void 0?void 0:n.defaultValidateMessages)||((r=Js.Form)===null||r===void 0?void 0:r.defaultValidateMessages)||{}),o&&o.validateMessages&&(q=tt(tt({},q),o.validateMessages)),Object.keys(q).length>0&&(U=E(zC,{validateMessages:q,children:i})),h&&(U=E(WV,{locale:h,_ANT_MARK__:KV,children:U})),(O||l)&&(U=E(RC.Provider,{value:B,children:U})),p&&(U=E(gR,{size:p,children:U})),M!==void 0&&(U=E(vR,{disabled:M,children:U})),E(Nn.Provider,{value:z,children:U})},df=function(t){return C.exports.useEffect(function(){t.direction&&(lj.config({rtl:t.direction==="rtl"}),Sj.config({rtl:t.direction==="rtl"}))},[t.direction]),E(Wp,{children:function(n,r,i){return E(hu,{children:function(l){return E(Nj,{parentContext:l,legacyLocale:i,...t})}})}})};df.ConfigContext=Nn;df.SizeContext=ms;df.config=Oj;function Hs(e,t,n,r){var i=mc.unstable_batchedUpdates?function(c){mc.unstable_batchedUpdates(n,c)}:n;return e.addEventListener&&e.addEventListener(t,i,r),{remove:function(){e.removeEventListener&&e.removeEventListener(t,i,r)}}}function xR(e){return Object.keys(e).reduce(function(t,n){return(n.startsWith("data-")||n.startsWith("aria-")||n==="role")&&!n.startsWith("data-__")&&(t[n]=e[n]),t},{})}var Do=C.exports.isValidElement;function _R(e){return e&&Do(e)&&e.type===C.exports.Fragment}function bR(e,t,n){return Do(e)?C.exports.cloneElement(e,typeof n=="function"?n(e.props||{}):n):t}function Ei(e,t){return bR(e,e,t)}var Dj=function(e){li(n,e);var t=ui(n);function n(){var r;return Kr(this,n),r=t.apply(this,arguments),r.state={error:void 0,info:{componentStack:""}},r}return Hr(n,[{key:"componentDidCatch",value:function(i,l){this.setState({error:i,info:l})}},{key:"render",value:function(){var i=this.props,l=i.message,c=i.description,o=i.children,h=this.state,p=h.error,g=h.info,b=g&&g.componentStack?g.componentStack:null,w=typeof l>"u"?(p||"").toString():l,P=typeof c>"u"?b:c;return p?E(R0,{type:"error",message:w,description:E("pre",{children:P})}):o}}]),n}(C.exports.Component);const Lj=Dj;var zj=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Fj={success:k0,info:kM,error:kc,warning:T0},$j={success:KC,info:WC,error:HC,warning:M0},Bj=function(t){var n=t.description,r=t.icon,i=t.prefixCls,l=t.type,c=(n?$j:Fj)[l]||null;return r?bR(r,E("span",{className:"".concat(i,"-icon"),children:r}),function(){return{className:Ye("".concat(i,"-icon"),se({},r.props.className,r.props.className))}}):C.exports.createElement(c,{className:"".concat(i,"-icon")})},Vj=function(t){var n=t.isClosable,r=t.closeText,i=t.prefixCls,l=t.closeIcon,c=t.handleClose;return n?E("button",{type:"button",onClick:c,className:"".concat(i,"-close-icon"),tabIndex:0,children:r?E("span",{className:"".concat(i,"-close-text"),children:r}):l}):null},wR=function(t){var n,r=t.description,i=t.prefixCls,l=t.message,c=t.banner,o=t.className,h=o===void 0?"":o,p=t.style,g=t.onMouseEnter,b=t.onMouseLeave,w=t.onClick,P=t.afterClose,I=t.showIcon,A=t.closable,O=t.closeText,M=t.closeIcon,R=M===void 0?E(I0,{}):M,N=t.action,z=zj(t,["description","prefixCls","message","banner","className","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action"]),B=C.exports.useState(!1),U=ze(B,2),q=U[0],H=U[1],te=C.exports.useRef(),Y=C.exports.useContext(Nn),le=Y.getPrefixCls,J=Y.direction,Z=le("alert",i),Q=function(ke){var De;H(!0),(De=z.onClose)===null||De===void 0||De.call(z,ke)},ge=function(){var ke=z.type;return ke!==void 0?ke:c?"warning":"info"},re=O?!0:A,de=ge(),oe=c&&I===void 0?!0:I,ye=Ye(Z,"".concat(Z,"-").concat(de),(n={},se(n,"".concat(Z,"-with-description"),!!r),se(n,"".concat(Z,"-no-icon"),!oe),se(n,"".concat(Z,"-banner"),!!c),se(n,"".concat(Z,"-rtl"),J==="rtl"),n),h),Re=xR(z);return E(Ca,{visible:!q,motionName:"".concat(Z,"-motion"),motionAppear:!1,motionEnter:!1,onLeaveStart:function(ke){return{maxHeight:ke.offsetHeight}},onLeaveEnd:P,children:function(Te){var ke=Te.className,De=Te.style;return Qe("div",{ref:te,"data-show":!q,className:Ye(ye,ke),style:tt(tt({},p),De),onMouseEnter:g,onMouseLeave:b,onClick:w,role:"alert",...Re,children:[oe?E(Bj,{description:r,icon:z.icon,prefixCls:Z,type:de}):null,Qe("div",{className:"".concat(Z,"-content"),children:[l?E("div",{className:"".concat(Z,"-message"),children:l}):null,r?E("div",{className:"".concat(Z,"-description"),children:r}):null]}),N?E("div",{className:"".concat(Z,"-action"),children:N}):null,E(Vj,{isClosable:!!re,closeText:O,prefixCls:Z,closeIcon:R,handleClose:Q})]})}})};wR.ErrorBoundary=Lj;const R0=wR;function w2(e){return e!=null&&e===e.window}function Uj(e,t){var n,r;if(typeof window>"u")return 0;var i=t?"scrollTop":"scrollLeft",l=0;return w2(e)?l=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?l=e.documentElement[i]:(e instanceof HTMLElement||e)&&(l=e[i]),e&&!w2(e)&&typeof l!="number"&&(l=(r=((n=e.ownerDocument)!==null&&n!==void 0?n:e).documentElement)===null||r===void 0?void 0:r[i]),l}function jj(e,t,n,r){var i=n-t;return e/=r/2,e<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t}function Kj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.getContainer,r=n===void 0?function(){return window}:n,i=t.callback,l=t.duration,c=l===void 0?450:l,o=r(),h=Uj(o,!0),p=Date.now(),g=function b(){var w=Date.now(),P=w-p,I=jj(P>c?c:P,h,e,c);w2(o)?o.scrollTo(window.pageXOffset,I):o instanceof Document||o.constructor.name==="HTMLDocument"?o.documentElement.scrollTop=I:o.scrollTop=I,P<c?nr(b):typeof i=="function"&&i()};nr(g)}function Mp(e){var t=C.exports.useRef();t.current=e;var n=C.exports.useCallback(function(){for(var r,i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];return(r=t.current)===null||r===void 0?void 0:r.call.apply(r,[t].concat(l))},[]);return n}var si=wo()?C.exports.useLayoutEffect:C.exports.useEffect,V6=function(t,n){var r=C.exports.useRef(!0);si(function(){if(!r.current)return t()},n),si(function(){return r.current=!1,function(){r.current=!0}},[])};function r_(e){return e!==void 0}function Vi(e,t){var n=t||{},r=n.defaultValue,i=n.value,l=n.onChange,c=n.postState,o=fs(function(){return r_(i)?i:r_(r)?typeof r=="function"?r():r:typeof e=="function"?e():e}),h=ze(o,2),p=h[0],g=h[1],b=i!==void 0?i:p,w=c?c(b):b,P=Mp(l),I=fs([b]),A=ze(I,2),O=A[0],M=A[1];V6(function(){var N=O[0];p!==N&&P(p,N)},[O]),V6(function(){r_(i)||g(i)},[i]);var R=Mp(function(N,z){g(N,z),M([b],z)});return[w,R]}const CR=function(){if(typeof navigator>"u"||typeof window>"u")return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e==null?void 0:e.substr(0,4))};var Et={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(t){var n=t.keyCode;if(t.altKey&&!t.ctrlKey||t.metaKey||n>=Et.F1&&n<=Et.F12)return!1;switch(n){case Et.ALT:case Et.CAPS_LOCK:case Et.CONTEXT_MENU:case Et.CTRL:case Et.DOWN:case Et.END:case Et.ESC:case Et.HOME:case Et.INSERT:case Et.LEFT:case Et.MAC_FF_META:case Et.META:case Et.NUMLOCK:case Et.NUM_CENTER:case Et.PAGE_DOWN:case Et.PAGE_UP:case Et.PAUSE:case Et.PRINT_SCREEN:case Et.RIGHT:case Et.SHIFT:case Et.UP:case Et.WIN_KEY:case Et.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(t){if(t>=Et.ZERO&&t<=Et.NINE||t>=Et.NUM_ZERO&&t<=Et.NUM_MULTIPLY||t>=Et.A&&t<=Et.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&t===0)return!0;switch(t){case Et.SPACE:case Et.QUESTION_MARK:case Et.NUM_PLUS:case Et.NUM_MINUS:case Et.NUM_PERIOD:case Et.NUM_DIVISION:case Et.SEMICOLON:case Et.DASH:case Et.EQUALS:case Et.COMMA:case Et.PERIOD:case Et.SLASH:case Et.APOSTROPHE:case Et.SINGLE_QUOTE:case Et.OPEN_SQUARE_BRACKET:case Et.BACKSLASH:case Et.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},SR=C.exports.createContext(null);function ER(){return C.exports.useContext(SR)}function Hj(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,t=C.exports.useState(!1),n=ze(t,2),r=n[0],i=n[1],l=C.exports.useRef(null),c=function(){window.clearTimeout(l.current)};C.exports.useEffect(function(){return c},[]);var o=function(p,g){c(),l.current=window.setTimeout(function(){i(p),g&&g()},e)};return[r,o,c]}function kR(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=C.exports.useRef(null),n=C.exports.useRef(null);C.exports.useEffect(function(){return function(){window.clearTimeout(n.current)}},[]);function r(i){(i||t.current===null)&&(t.current=i),window.clearTimeout(n.current),n.current=window.setTimeout(function(){t.current=null},e)}return[function(){return t.current},r]}function Wj(e,t,n,r){var i=C.exports.useRef(null);i.current={open:t,triggerOpen:n,customizedTrigger:r},C.exports.useEffect(function(){function l(c){var o;if(!((o=i.current)!==null&&o!==void 0&&o.customizedTrigger)){var h=c.target;h.shadowRoot&&c.composed&&(h=c.composedPath()[0]||h),i.current.open&&e().filter(function(p){return p}).every(function(p){return!p.contains(h)&&p!==h})&&i.current.triggerOpen(!1)}}return window.addEventListener("mousedown",l),function(){return window.removeEventListener("mousedown",l)}},[])}var Gj=`accept acceptCharset accessKey action allowFullScreen allowTransparency
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
charSet checked classID className colSpan cols content contentEditable contextMenu
controls coords crossOrigin data dateTime default defer dir disabled download draggable
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
mediaGroup method min minLength multiple muted name noValidate nonce open
optimum pattern placeholder poster preload radioGroup readOnly rel required
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
summary tabIndex target title type useMap value width wmode wrap`,qj=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,Zj="".concat(Gj," ").concat(qj).split(/[\s\n]+/),Xj="aria-",Yj="data-";function U6(e,t){return e.indexOf(t)===0}function au(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;t===!1?n={aria:!0,data:!0,attr:!0}:t===!0?n={aria:!0}:n=ve({},t);var r={};return Object.keys(e).forEach(function(i){(n.aria&&(i==="role"||U6(i,Xj))||n.data&&U6(i,Yj)||n.attr&&Zj.includes(i))&&(r[i]=e[i])}),r}var Qj=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],ld=void 0;function Jj(e,t){var n=e.prefixCls,r=e.invalidate,i=e.item,l=e.renderItem,c=e.responsive,o=e.responsiveDisabled,h=e.registerSize,p=e.itemKey,g=e.className,b=e.style,w=e.children,P=e.display,I=e.order,A=e.component,O=A===void 0?"div":A,M=In(e,Qj),R=c&&!P;function N(H){h(p,H)}C.exports.useEffect(function(){return function(){N(null)}},[]);var z=l&&i!==ld?l(i):w,B;r||(B={opacity:R?0:1,height:R?0:ld,overflowY:R?"hidden":ld,order:c?I:ld,pointerEvents:R?"none":ld,position:R?"absolute":ld});var U={};R&&(U["aria-hidden"]=!0);var q=E(O,{className:Ye(!r&&n,g),style:ve(ve({},B),b),...U,...M,ref:t,children:z});return c&&(q=E(ol,{onResize:function(te){var Y=te.offsetWidth;N(Y)},disabled:o,children:q})),q}var tp=C.exports.forwardRef(Jj);tp.displayName="Item";function eK(){var e=fs({}),t=ze(e,2),n=t[1],r=C.exports.useRef([]),i=0,l=0;function c(o){var h=i;i+=1,r.current.length<h+1&&(r.current[h]=o);var p=r.current[h];function g(b){r.current[h]=typeof b=="function"?b(r.current[h]):b,nr.cancel(l),l=nr(function(){n({},!0)})}return[p,g]}return c}var tK=["component"],nK=["className"],rK=["className"],iK=function(t,n){var r=C.exports.useContext(vy);if(!r){var i=t.component,l=i===void 0?"div":i,c=In(t,tK);return E(l,{...c,ref:n})}var o=r.className,h=In(r,nK),p=t.className,g=In(t,rK);return E(vy.Provider,{value:null,children:E(tp,{ref:n,className:Ye(o,p),...h,...g})})},TR=C.exports.forwardRef(iK);TR.displayName="RawItem";var oK=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],vy=C.exports.createContext(null),PR="responsive",IR="invalidate";function aK(e){return"+ ".concat(e.length," ...")}function sK(e,t){var n=e.prefixCls,r=n===void 0?"rc-overflow":n,i=e.data,l=i===void 0?[]:i,c=e.renderItem,o=e.renderRawItem,h=e.itemKey,p=e.itemWidth,g=p===void 0?10:p,b=e.ssr,w=e.style,P=e.className,I=e.maxCount,A=e.renderRest,O=e.renderRawRest,M=e.suffix,R=e.component,N=R===void 0?"div":R,z=e.itemComponent,B=e.onVisibleChange,U=In(e,oK),q=eK(),H=b==="full",te=q(null),Y=ze(te,2),le=Y[0],J=Y[1],Z=le||0,Q=q(new Map),ge=ze(Q,2),re=ge[0],de=ge[1],oe=q(0),ye=ze(oe,2),Re=ye[0],Te=ye[1],ke=q(0),De=ze(ke,2),Me=De[0],Ne=De[1],Le=q(0),Ve=ze(Le,2),qe=Ve[0],Ue=Ve[1],ct=C.exports.useState(null),pt=ze(ct,2),Tt=pt[0],Xe=pt[1],Pt=C.exports.useState(null),mt=ze(Pt,2),Mt=mt[0],Ct=mt[1],Lt=C.exports.useMemo(function(){return Mt===null&&H?Number.MAX_SAFE_INTEGER:Mt||0},[Mt,le]),lt=C.exports.useState(!1),dt=ze(lt,2),ut=dt[0],it=dt[1],ft="".concat(r,"-item"),xt=Math.max(Re,Me),Wt=I===PR,Ut=l.length&&Wt,Qt=I===IR,Fe=Ut||typeof I=="number"&&l.length>I,Ge=C.exports.useMemo(function(){var ot=l;return Ut?le===null&&H?ot=l:ot=l.slice(0,Math.min(l.length,Z/g)):typeof I=="number"&&(ot=l.slice(0,I)),ot},[l,g,le,I,Ut]),Xt=C.exports.useMemo(function(){return Ut?l.slice(Lt+1):l.slice(Ge.length)},[l,Ge,Ut,Lt]),dn=C.exports.useCallback(function(ot,ht){var At;return typeof h=="function"?h(ot):(At=h&&(ot==null?void 0:ot[h]))!==null&&At!==void 0?At:ht},[h]),Vt=C.exports.useCallback(c||function(ot){return ot},[c]);function jt(ot,ht,At){Mt===ot&&(ht===void 0||ht===Tt)||(Ct(ot),At||(it(ot<l.length-1),B==null||B(ot)),ht!==void 0&&Xe(ht))}function nn(ot,ht){J(ht.clientWidth)}function _n(ot,ht){de(function(At){var $t=new Map(At);return ht===null?$t.delete(ot):$t.set(ot,ht),$t})}function An(ot,ht){Ne(ht),Te(Me)}function _t(ot,ht){Ue(ht)}function Gt(ot){return re.get(dn(Ge[ot],ot))}si(function(){if(Z&&xt&&Ge){var ot=qe,ht=Ge.length,At=ht-1;if(!ht){jt(0,null);return}for(var $t=0;$t<ht;$t+=1){var cn=Gt($t);if(H&&(cn=cn||0),cn===void 0){jt($t-1,void 0,!0);break}if(ot+=cn,At===0&&ot<=Z||$t===At-1&&ot+Gt(At)<=Z){jt(At,null);break}else if(ot+xt>Z){jt($t-1,ot-cn-qe+Me);break}}M&&Gt(0)+qe>Z&&Xe(null)}},[Z,re,Me,qe,dn,Ge]);var an=ut&&!!Xt.length,Fn={};Tt!==null&&Ut&&(Fn={position:"absolute",left:Tt,top:0});var kn={prefixCls:ft,responsive:Ut,component:z,invalidate:Qt},zt=o?function(ot,ht){var At=dn(ot,ht);return E(vy.Provider,{value:ve(ve({},kn),{},{order:ht,item:ot,itemKey:At,registerSize:_n,display:ht<=Lt}),children:o(ot,ht)},At)}:function(ot,ht){var At=dn(ot,ht);return C.exports.createElement(tp,{...kn,order:ht,key:At,item:ot,renderItem:Vt,itemKey:At,registerSize:_n,display:ht<=Lt})},Tn,Cn={order:an?Lt:Number.MAX_SAFE_INTEGER,className:"".concat(ft,"-rest"),registerSize:An,display:an};if(O)O&&(Tn=E(vy.Provider,{value:ve(ve({},kn),Cn),children:O(Xt)}));else{var hn=A||aK;Tn=E(tp,{...kn,...Cn,children:typeof hn=="function"?hn(Xt):hn})}var Nt=Qe(N,{className:Ye(!Qt&&r,P),style:w,ref:t,...U,children:[Ge.map(zt),Fe?Tn:null,M&&E(tp,{...kn,responsive:Wt,responsiveDisabled:!Ut,order:Lt,className:"".concat(ft,"-suffix"),registerSize:_t,display:!0,style:Fn,children:M})]});return Wt&&(Nt=E(ol,{onResize:nn,disabled:!Ut,children:Nt})),Nt}var hs=C.exports.forwardRef(sK);hs.displayName="Overflow";hs.Item=TR;hs.RESPONSIVE=PR;hs.INVALIDATE=IR;var gy=function(t){var n=t.className,r=t.customizeIcon,i=t.customizeIconProps,l=t.onMouseDown,c=t.onClick,o=t.children,h;return typeof r=="function"?h=r(i):h=r,E("span",{className:n,onMouseDown:function(g){g.preventDefault(),l&&l(g)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:c,"aria-hidden":!0,children:h!==void 0?h:E("span",{className:Ye(n.split(/\s+/).map(function(p){return"".concat(p,"-icon")})),children:o})})},lK=function(t,n){var r,i,l=t.prefixCls,c=t.id,o=t.inputElement,h=t.disabled,p=t.tabIndex,g=t.autoFocus,b=t.autoComplete,w=t.editable,P=t.activeDescendantId,I=t.value,A=t.maxLength,O=t.onKeyDown,M=t.onMouseDown,R=t.onChange,N=t.onPaste,z=t.onCompositionStart,B=t.onCompositionEnd,U=t.open,q=t.attrs,H=o||E("input",{}),te=H,Y=te.ref,le=te.props,J=le.onKeyDown,Z=le.onChange,Q=le.onMouseDown,ge=le.onCompositionStart,re=le.onCompositionEnd,de=le.style;return"maxLength"in H.props,H=C.exports.cloneElement(H,ve(ve(ve({type:"search"},le),{},{id:c,ref:Lo(n,Y),disabled:h,tabIndex:p,autoComplete:b||"off",autoFocus:g,className:Ye("".concat(l,"-selection-search-input"),(r=H)===null||r===void 0||(i=r.props)===null||i===void 0?void 0:i.className),role:"combobox","aria-expanded":U,"aria-haspopup":"listbox","aria-owns":"".concat(c,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(c,"_list"),"aria-activedescendant":P},q),{},{value:w?I:"",maxLength:A,readOnly:!w,unselectable:w?null:"on",style:ve(ve({},de),{},{opacity:w?null:0}),onKeyDown:function(ye){O(ye),J&&J(ye)},onMouseDown:function(ye){M(ye),Q&&Q(ye)},onChange:function(ye){R(ye),Z&&Z(ye)},onCompositionStart:function(ye){z(ye),ge&&ge(ye)},onCompositionEnd:function(ye){B(ye),re&&re(ye)},onPaste:N})),H},qC=C.exports.forwardRef(lK);qC.displayName="Input";function MR(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}var uK=typeof window<"u"&&window.document&&window.document.documentElement,cK=uK;function dK(e){return e!=null}function j6(e){return["string","number"].includes(sn(e))}function RR(e){var t=void 0;return e&&(j6(e.title)?t=e.title.toString():j6(e.label)&&(t=e.label.toString())),t}function fK(e,t){cK?C.exports.useLayoutEffect(e,t):C.exports.useEffect(e,t)}function hK(e){var t;return(t=e.key)!==null&&t!==void 0?t:e.value}var K6=function(t){t.preventDefault(),t.stopPropagation()},pK=function(t){var n=t.id,r=t.prefixCls,i=t.values,l=t.open,c=t.searchValue,o=t.autoClearSearchValue,h=t.inputRef,p=t.placeholder,g=t.disabled,b=t.mode,w=t.showSearch,P=t.autoFocus,I=t.autoComplete,A=t.activeDescendantId,O=t.tabIndex,M=t.removeIcon,R=t.maxTagCount,N=t.maxTagTextLength,z=t.maxTagPlaceholder,B=z===void 0?function(Xe){return"+ ".concat(Xe.length," ...")}:z,U=t.tagRender,q=t.onToggleOpen,H=t.onRemove,te=t.onInputChange,Y=t.onInputPaste,le=t.onInputKeyDown,J=t.onInputMouseDown,Z=t.onInputCompositionStart,Q=t.onInputCompositionEnd,ge=C.exports.useRef(null),re=C.exports.useState(0),de=ze(re,2),oe=de[0],ye=de[1],Re=C.exports.useState(!1),Te=ze(Re,2),ke=Te[0],De=Te[1],Me="".concat(r,"-selection"),Ne=l||b==="multiple"&&o===!1||b==="tags"?c:"",Le=b==="tags"||b==="multiple"&&o===!1||w&&(l||ke);fK(function(){ye(ge.current.scrollWidth)},[Ne]);function Ve(Xe,Pt,mt,Mt,Ct){return Qe("span",{className:Ye("".concat(Me,"-item"),se({},"".concat(Me,"-item-disabled"),mt)),title:RR(Xe),children:[E("span",{className:"".concat(Me,"-item-content"),children:Pt}),Mt&&E(gy,{className:"".concat(Me,"-item-remove"),onMouseDown:K6,onClick:Ct,customizeIcon:M,children:"\xD7"})]})}function qe(Xe,Pt,mt,Mt,Ct){var Lt=function(dt){K6(dt),q(!l)};return E("span",{onMouseDown:Lt,children:U({label:Pt,value:Xe,disabled:mt,closable:Mt,onClose:Ct})})}function Ue(Xe){var Pt=Xe.disabled,mt=Xe.label,Mt=Xe.value,Ct=!g&&!Pt,Lt=mt;if(typeof N=="number"&&(typeof mt=="string"||typeof mt=="number")){var lt=String(Lt);lt.length>N&&(Lt="".concat(lt.slice(0,N),"..."))}var dt=function(it){it&&it.stopPropagation(),H(Xe)};return typeof U=="function"?qe(Mt,Lt,Pt,Ct,dt):Ve(Xe,Lt,Pt,Ct,dt)}function ct(Xe){var Pt=typeof B=="function"?B(Xe):B;return Ve({title:Pt},Pt,!1)}var pt=Qe("div",{className:"".concat(Me,"-search"),style:{width:oe},onFocus:function(){De(!0)},onBlur:function(){De(!1)},children:[E(qC,{ref:h,open:l,prefixCls:r,id:n,inputElement:null,disabled:g,autoFocus:P,autoComplete:I,editable:Le,activeDescendantId:A,value:Ne,onKeyDown:le,onMouseDown:J,onChange:te,onPaste:Y,onCompositionStart:Z,onCompositionEnd:Q,tabIndex:O,attrs:au(t,!0)}),Qe("span",{ref:ge,className:"".concat(Me,"-search-mirror"),"aria-hidden":!0,children:[Ne,"\xA0"]})]}),Tt=E(hs,{prefixCls:"".concat(Me,"-overflow"),data:i,renderItem:Ue,renderRest:ct,suffix:pt,itemKey:hK,maxCount:R});return Qe($n,{children:[Tt,!i.length&&!Ne&&E("span",{className:"".concat(Me,"-placeholder"),children:p})]})},mK=function(t){var n=t.inputElement,r=t.prefixCls,i=t.id,l=t.inputRef,c=t.disabled,o=t.autoFocus,h=t.autoComplete,p=t.activeDescendantId,g=t.mode,b=t.open,w=t.values,P=t.placeholder,I=t.tabIndex,A=t.showSearch,O=t.searchValue,M=t.activeValue,R=t.maxLength,N=t.onInputKeyDown,z=t.onInputMouseDown,B=t.onInputChange,U=t.onInputPaste,q=t.onInputCompositionStart,H=t.onInputCompositionEnd,te=C.exports.useState(!1),Y=ze(te,2),le=Y[0],J=Y[1],Z=g==="combobox",Q=Z||A,ge=w[0],re=O||"";Z&&M&&!le&&(re=M),C.exports.useEffect(function(){Z&&J(!1)},[Z,M]);var de=g!=="combobox"&&!b&&!A?!1:!!re,oe=RR(ge),ye=function(){if(ge)return null;var Te=de?{visibility:"hidden"}:void 0;return E("span",{className:"".concat(r,"-selection-placeholder"),style:Te,children:P})};return Qe($n,{children:[E("span",{className:"".concat(r,"-selection-search"),children:E(qC,{ref:l,prefixCls:r,id:i,open:b,inputElement:n,disabled:c,autoFocus:o,autoComplete:h,editable:Q,activeDescendantId:p,value:re,onKeyDown:N,onMouseDown:z,onChange:function(Te){J(!0),B(Te)},onPaste:U,onCompositionStart:q,onCompositionEnd:H,tabIndex:I,attrs:au(t,!0),maxLength:Z?R:void 0})}),!Z&&ge&&!de&&E("span",{className:"".concat(r,"-selection-item"),title:oe,children:ge.label}),ye()]})};function vK(e){return![Et.ESC,Et.SHIFT,Et.BACKSPACE,Et.TAB,Et.WIN_KEY,Et.ALT,Et.META,Et.WIN_KEY_RIGHT,Et.CTRL,Et.SEMICOLON,Et.EQUALS,Et.CAPS_LOCK,Et.CONTEXT_MENU,Et.F1,Et.F2,Et.F3,Et.F4,Et.F5,Et.F6,Et.F7,Et.F8,Et.F9,Et.F10,Et.F11,Et.F12].includes(e)}var gK=function(t,n){var r=C.exports.useRef(null),i=C.exports.useRef(!1),l=t.prefixCls,c=t.open,o=t.mode,h=t.showSearch,p=t.tokenWithEnter,g=t.autoClearSearchValue,b=t.onSearch,w=t.onSearchSubmit,P=t.onToggleOpen,I=t.onInputKeyDown,A=t.domRef;C.exports.useImperativeHandle(n,function(){return{focus:function(){r.current.focus()},blur:function(){r.current.blur()}}});var O=kR(0),M=ze(O,2),R=M[0],N=M[1],z=function(de){var oe=de.which;(oe===Et.UP||oe===Et.DOWN)&&de.preventDefault(),I&&I(de),oe===Et.ENTER&&o==="tags"&&!i.current&&!c&&(w==null||w(de.target.value)),vK(oe)&&P(!0)},B=function(){N(!0)},U=C.exports.useRef(null),q=function(de){b(de,!0,i.current)!==!1&&P(!0)},H=function(){i.current=!0},te=function(de){i.current=!1,o!=="combobox"&&q(de.target.value)},Y=function(de){var oe=de.target.value;if(p&&U.current&&/[\r\n]/.test(U.current)){var ye=U.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");oe=oe.replace(ye,U.current)}U.current=null,q(oe)},le=function(de){var oe=de.clipboardData,ye=oe.getData("text");U.current=ye},J=function(de){var oe=de.target;if(oe!==r.current){var ye=document.body.style.msTouchAction!==void 0;ye?setTimeout(function(){r.current.focus()}):r.current.focus()}},Z=function(de){var oe=R();de.target!==r.current&&!oe&&o!=="combobox"&&de.preventDefault(),(o!=="combobox"&&(!h||!oe)||!c)&&(c&&g!==!1&&b("",!0,!1),P())},Q={inputRef:r,onInputKeyDown:z,onInputMouseDown:B,onInputChange:Y,onInputPaste:le,onInputCompositionStart:H,onInputCompositionEnd:te},ge=o==="multiple"||o==="tags"?E(pK,{...t,...Q}):E(mK,{...t,...Q});return E("div",{ref:A,className:"".concat(l,"-selector"),onClick:J,onMouseDown:Z,children:ge})},AR=C.exports.forwardRef(gK);AR.displayName="Selector";var yK=C.exports.forwardRef(function(e,t){var n=e.didUpdate,r=e.getContainer,i=e.children,l=C.exports.useRef(),c=C.exports.useRef();C.exports.useImperativeHandle(t,function(){return{}});var o=C.exports.useRef(!1);return!o.current&&wo()&&(c.current=r(),l.current=c.current.parentNode,o.current=!0),C.exports.useEffect(function(){n==null||n(e)}),C.exports.useEffect(function(){return c.current.parentNode===null&&l.current!==null&&l.current.appendChild(c.current),function(){var h,p;(h=c.current)===null||h===void 0||(p=h.parentNode)===null||p===void 0||p.removeChild(c.current)}},[]),c.current?mc.createPortal(i,c.current):null});function xK(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function _K(e,t,n){var r=e[t]||{};return ve(ve({},r),n)}function bK(e,t,n,r){for(var i=n.points,l=Object.keys(e),c=0;c<l.length;c+=1){var o=l[c];if(xK(e[o].points,i,r))return"".concat(t,"-placement-").concat(o)}return""}function OR(e){var t=e.prefixCls,n=e.motion,r=e.animation,i=e.transitionName;return n||(r?{motionName:"".concat(t,"-").concat(r)}:i?{motionName:i}:null)}function wK(e){var t=e.prefixCls,n=e.visible,r=e.zIndex,i=e.mask,l=e.maskMotion,c=e.maskAnimation,o=e.maskTransitionName;if(!i)return null;var h={};return(l||o||c)&&(h=ve({motionAppear:!0},OR({motion:l,prefixCls:t,transitionName:o,animation:c}))),E(Ca,{...h,visible:n,removeOnLeave:!0,children:function(p){var g=p.className;return E("div",{style:{zIndex:r},className:Ye("".concat(t,"-mask"),g)})}})}function H6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function W6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?H6(Object(n),!0).forEach(function(r){CK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function C2(e){return C2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},C2(e)}function CK(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Eh,SK={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-",O:"-o-"};function yy(){if(Eh!==void 0)return Eh;Eh="";var e=document.createElement("p").style,t="Transform";for(var n in SK)n+t in e&&(Eh=n);return Eh}function NR(){return yy()?"".concat(yy(),"TransitionProperty"):"transitionProperty"}function A0(){return yy()?"".concat(yy(),"Transform"):"transform"}function G6(e,t){var n=NR();n&&(e.style[n]=t,n!=="transitionProperty"&&(e.style.transitionProperty=t))}function i_(e,t){var n=A0();n&&(e.style[n]=t,n!=="transform"&&(e.style.transform=t))}function EK(e){return e.style.transitionProperty||e.style[NR()]}function kK(e){var t=window.getComputedStyle(e,null),n=t.getPropertyValue("transform")||t.getPropertyValue(A0());if(n&&n!=="none"){var r=n.replace(/[^0-9\-.,]/g,"").split(",");return{x:parseFloat(r[12]||r[4],0),y:parseFloat(r[13]||r[5],0)}}return{x:0,y:0}}var TK=/matrix\((.*)\)/,PK=/matrix3d\((.*)\)/;function IK(e,t){var n=window.getComputedStyle(e,null),r=n.getPropertyValue("transform")||n.getPropertyValue(A0());if(r&&r!=="none"){var i,l=r.match(TK);if(l)l=l[1],i=l.split(",").map(function(o){return parseFloat(o,10)}),i[4]=t.x,i[5]=t.y,i_(e,"matrix(".concat(i.join(","),")"));else{var c=r.match(PK)[1];i=c.split(",").map(function(o){return parseFloat(o,10)}),i[12]=t.x,i[13]=t.y,i_(e,"matrix3d(".concat(i.join(","),")"))}}else i_(e,"translateX(".concat(t.x,"px) translateY(").concat(t.y,"px) translateZ(0)"))}var MK=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,Zp;function q6(e){var t=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=t}function Ld(e,t,n){var r=n;if(C2(t)==="object"){for(var i in t)t.hasOwnProperty(i)&&Ld(e,i,t[i]);return}if(typeof r<"u"){typeof r=="number"&&(r="".concat(r,"px")),e.style[t]=r;return}return Zp(e,t)}function RK(e){var t,n,r,i=e.ownerDocument,l=i.body,c=i&&i.documentElement;return t=e.getBoundingClientRect(),n=Math.floor(t.left),r=Math.floor(t.top),n-=c.clientLeft||l.clientLeft||0,r-=c.clientTop||l.clientTop||0,{left:n,top:r}}function DR(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if(typeof n!="number"){var i=e.document;n=i.documentElement[r],typeof n!="number"&&(n=i.body[r])}return n}function LR(e){return DR(e)}function zR(e){return DR(e,!0)}function Rp(e){var t=RK(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=LR(r),t.top+=zR(r),t}function ZC(e){return e!=null&&e==e.window}function FR(e){return ZC(e)?e.document:e.nodeType===9?e:e.ownerDocument}function AK(e,t,n){var r=n,i="",l=FR(e);return r=r||l.defaultView.getComputedStyle(e,null),r&&(i=r.getPropertyValue(t)||r[t]),i}var OK=new RegExp("^(".concat(MK,")(?!px)[a-z%]+$"),"i"),NK=/^(top|right|bottom|left)$/,o_="currentStyle",a_="runtimeStyle",Hu="left",DK="px";function LK(e,t){var n=e[o_]&&e[o_][t];if(OK.test(n)&&!NK.test(t)){var r=e.style,i=r[Hu],l=e[a_][Hu];e[a_][Hu]=e[o_][Hu],r[Hu]=t==="fontSize"?"1em":n||0,n=r.pixelLeft+DK,r[Hu]=i,e[a_][Hu]=l}return n===""?"auto":n}typeof window<"u"&&(Zp=window.getComputedStyle?AK:LK);function Wv(e,t){return e==="left"?t.useCssRight?"right":e:t.useCssBottom?"bottom":e}function Z6(e){if(e==="left")return"right";if(e==="right")return"left";if(e==="top")return"bottom";if(e==="bottom")return"top"}function X6(e,t,n){Ld(e,"position")==="static"&&(e.style.position="relative");var r=-999,i=-999,l=Wv("left",n),c=Wv("top",n),o=Z6(l),h=Z6(c);l!=="left"&&(r=999),c!=="top"&&(i=999);var p="",g=Rp(e);("left"in t||"top"in t)&&(p=EK(e)||"",G6(e,"none")),"left"in t&&(e.style[o]="",e.style[l]="".concat(r,"px")),"top"in t&&(e.style[h]="",e.style[c]="".concat(i,"px")),q6(e);var b=Rp(e),w={};for(var P in t)if(t.hasOwnProperty(P)){var I=Wv(P,n),A=P==="left"?r:i,O=g[P]-b[P];I===P?w[I]=A+O:w[I]=A-O}Ld(e,w),q6(e),("left"in t||"top"in t)&&G6(e,p);var M={};for(var R in t)if(t.hasOwnProperty(R)){var N=Wv(R,n),z=t[R]-g[R];R===N?M[N]=w[N]+z:M[N]=w[N]-z}Ld(e,M)}function zK(e,t){var n=Rp(e),r=kK(e),i={x:r.x,y:r.y};"left"in t&&(i.x=r.x+t.left-n.left),"top"in t&&(i.y=r.y+t.top-n.top),IK(e,i)}function FK(e,t,n){if(n.ignoreShake){var r=Rp(e),i=r.left.toFixed(0),l=r.top.toFixed(0),c=t.left.toFixed(0),o=t.top.toFixed(0);if(i===c&&l===o)return}n.useCssRight||n.useCssBottom?X6(e,t,n):n.useCssTransform&&A0()in document.body.style?zK(e,t):X6(e,t,n)}function XC(e,t){for(var n=0;n<e.length;n++)t(e[n])}function $R(e){return Zp(e,"boxSizing")==="border-box"}var $K=["margin","border","padding"],S2=-1,BK=2,E2=1,VK=0;function UK(e,t,n){var r={},i=e.style,l;for(l in t)t.hasOwnProperty(l)&&(r[l]=i[l],i[l]=t[l]);n.call(e);for(l in t)t.hasOwnProperty(l)&&(i[l]=r[l])}function Bh(e,t,n){var r=0,i,l,c;for(l=0;l<t.length;l++)if(i=t[l],i)for(c=0;c<n.length;c++){var o=void 0;i==="border"?o="".concat(i).concat(n[c],"Width"):o=i+n[c],r+=parseFloat(Zp(e,o))||0}return r}var ls={getParent:function(t){var n=t;do n.nodeType===11&&n.host?n=n.host:n=n.parentNode;while(n&&n.nodeType!==1&&n.nodeType!==9);return n}};XC(["Width","Height"],function(e){ls["doc".concat(e)]=function(t){var n=t.document;return Math.max(n.documentElement["scroll".concat(e)],n.body["scroll".concat(e)],ls["viewport".concat(e)](n))},ls["viewport".concat(e)]=function(t){var n="client".concat(e),r=t.document,i=r.body,l=r.documentElement,c=l[n];return r.compatMode==="CSS1Compat"&&c||i&&i[n]||c}});function Y6(e,t,n){var r=n;if(ZC(e))return t==="width"?ls.viewportWidth(e):ls.viewportHeight(e);if(e.nodeType===9)return t==="width"?ls.docWidth(e):ls.docHeight(e);var i=t==="width"?["Left","Right"]:["Top","Bottom"],l=Math.floor(t==="width"?e.getBoundingClientRect().width:e.getBoundingClientRect().height),c=$R(e),o=0;(l==null||l<=0)&&(l=void 0,o=Zp(e,t),(o==null||Number(o)<0)&&(o=e.style[t]||0),o=Math.floor(parseFloat(o))||0),r===void 0&&(r=c?E2:S2);var h=l!==void 0||c,p=l||o;return r===S2?h?p-Bh(e,["border","padding"],i):o:h?r===E2?p:p+(r===BK?-Bh(e,["border"],i):Bh(e,["margin"],i)):o+Bh(e,$K.slice(r),i)}var jK={position:"absolute",visibility:"hidden",display:"block"};function Q6(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=t[0];return i.offsetWidth!==0?r=Y6.apply(void 0,t):UK(i,jK,function(){r=Y6.apply(void 0,t)}),r}XC(["width","height"],function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);ls["outer".concat(t)]=function(r,i){return r&&Q6(r,e,i?VK:E2)};var n=e==="width"?["Left","Right"]:["Top","Bottom"];ls[e]=function(r,i){var l=i;if(l!==void 0){if(r){var c=$R(r);return c&&(l+=Bh(r,["padding","border"],n)),Ld(r,e,l)}return}return r&&Q6(r,e,S2)}});function BR(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var Kn={getWindow:function(t){if(t&&t.document&&t.setTimeout)return t;var n=t.ownerDocument||t;return n.defaultView||n.parentWindow},getDocument:FR,offset:function(t,n,r){if(typeof n<"u")FK(t,n,r||{});else return Rp(t)},isWindow:ZC,each:XC,css:Ld,clone:function(t){var n,r={};for(n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);var i=t.overflow;if(i)for(n in t)t.hasOwnProperty(n)&&(r.overflow[n]=t.overflow[n]);return r},mix:BR,getWindowScrollLeft:function(t){return LR(t)},getWindowScrollTop:function(t){return zR(t)},merge:function(){for(var t={},n=0;n<arguments.length;n++)Kn.mix(t,n<0||arguments.length<=n?void 0:arguments[n]);return t},viewportWidth:0,viewportHeight:0};BR(Kn,ls);var s_=Kn.getParent;function k2(e){if(Kn.isWindow(e)||e.nodeType===9)return null;var t=Kn.getDocument(e),n=t.body,r,i=Kn.css(e,"position"),l=i==="fixed"||i==="absolute";if(!l)return e.nodeName.toLowerCase()==="html"?null:s_(e);for(r=s_(e);r&&r!==n&&r.nodeType!==9;r=s_(r))if(i=Kn.css(r,"position"),i!=="static")return r;return null}var J6=Kn.getParent;function KK(e){if(Kn.isWindow(e)||e.nodeType===9)return!1;var t=Kn.getDocument(e),n=t.body,r=null;for(r=J6(e);r&&r!==n&&r!==t;r=J6(r)){var i=Kn.css(r,"position");if(i==="fixed")return!0}return!1}function YC(e,t){for(var n={left:0,right:1/0,top:0,bottom:1/0},r=k2(e),i=Kn.getDocument(e),l=i.defaultView||i.parentWindow,c=i.body,o=i.documentElement;r;){if((navigator.userAgent.indexOf("MSIE")===-1||r.clientWidth!==0)&&r!==c&&r!==o&&Kn.css(r,"overflow")!=="visible"){var h=Kn.offset(r);h.left+=r.clientLeft,h.top+=r.clientTop,n.top=Math.max(n.top,h.top),n.right=Math.min(n.right,h.left+r.clientWidth),n.bottom=Math.min(n.bottom,h.top+r.clientHeight),n.left=Math.max(n.left,h.left)}else if(r===c||r===o)break;r=k2(r)}var p=null;if(!Kn.isWindow(e)&&e.nodeType!==9){p=e.style.position;var g=Kn.css(e,"position");g==="absolute"&&(e.style.position="fixed")}var b=Kn.getWindowScrollLeft(l),w=Kn.getWindowScrollTop(l),P=Kn.viewportWidth(l),I=Kn.viewportHeight(l),A=o.scrollWidth,O=o.scrollHeight,M=window.getComputedStyle(c);if(M.overflowX==="hidden"&&(A=l.innerWidth),M.overflowY==="hidden"&&(O=l.innerHeight),e.style&&(e.style.position=p),t||KK(e))n.left=Math.max(n.left,b),n.top=Math.max(n.top,w),n.right=Math.min(n.right,b+P),n.bottom=Math.min(n.bottom,w+I);else{var R=Math.max(A,b+P);n.right=Math.min(n.right,R);var N=Math.max(O,w+I);n.bottom=Math.min(n.bottom,N)}return n.top>=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function HK(e,t,n,r){var i=Kn.clone(e),l={width:t.width,height:t.height};return r.adjustX&&i.left<n.left&&(i.left=n.left),r.resizeWidth&&i.left>=n.left&&i.left+l.width>n.right&&(l.width-=i.left+l.width-n.right),r.adjustX&&i.left+l.width>n.right&&(i.left=Math.max(n.right-l.width,n.left)),r.adjustY&&i.top<n.top&&(i.top=n.top),r.resizeHeight&&i.top>=n.top&&i.top+l.height>n.bottom&&(l.height-=i.top+l.height-n.bottom),r.adjustY&&i.top+l.height>n.bottom&&(i.top=Math.max(n.bottom-l.height,n.top)),Kn.mix(i,l)}function QC(e){var t,n,r;if(!Kn.isWindow(e)&&e.nodeType!==9)t=Kn.offset(e),n=Kn.outerWidth(e),r=Kn.outerHeight(e);else{var i=Kn.getWindow(e);t={left:Kn.getWindowScrollLeft(i),top:Kn.getWindowScrollTop(i)},n=Kn.viewportWidth(i),r=Kn.viewportHeight(i)}return t.width=n,t.height=r,t}function e5(e,t){var n=t.charAt(0),r=t.charAt(1),i=e.width,l=e.height,c=e.left,o=e.top;return n==="c"?o+=l/2:n==="b"&&(o+=l),r==="c"?c+=i/2:r==="r"&&(c+=i),{left:c,top:o}}function Gv(e,t,n,r,i){var l=e5(t,n[1]),c=e5(e,n[0]),o=[c.left-l.left,c.top-l.top];return{left:Math.round(e.left-o[0]+r[0]-i[0]),top:Math.round(e.top-o[1]+r[1]-i[1])}}function t5(e,t,n){return e.left<n.left||e.left+t.width>n.right}function n5(e,t,n){return e.top<n.top||e.top+t.height>n.bottom}function WK(e,t,n){return e.left>n.right||e.left+t.width<n.left}function GK(e,t,n){return e.top>n.bottom||e.top+t.height<n.top}function qv(e,t,n){var r=[];return Kn.each(e,function(i){r.push(i.replace(t,function(l){return n[l]}))}),r}function Zv(e,t){return e[t]=-e[t],e}function r5(e,t){var n;return/%$/.test(e)?n=parseInt(e.substring(0,e.length-1),10)/100*t:n=parseInt(e,10),n||0}function i5(e,t){e[0]=r5(e[0],t.width),e[1]=r5(e[1],t.height)}function VR(e,t,n,r){var i=n.points,l=n.offset||[0,0],c=n.targetOffset||[0,0],o=n.overflow,h=n.source||e;l=[].concat(l),c=[].concat(c),o=o||{};var p={},g=0,b=!!(o&&o.alwaysByViewport),w=YC(h,b),P=QC(h);i5(l,P),i5(c,t);var I=Gv(P,t,i,l,c),A=Kn.merge(P,I);if(w&&(o.adjustX||o.adjustY)&&r){if(o.adjustX&&t5(I,P,w)){var O=qv(i,/[lr]/gi,{l:"r",r:"l"}),M=Zv(l,0),R=Zv(c,0),N=Gv(P,t,O,M,R);WK(N,P,w)||(g=1,i=O,l=M,c=R)}if(o.adjustY&&n5(I,P,w)){var z=qv(i,/[tb]/gi,{t:"b",b:"t"}),B=Zv(l,1),U=Zv(c,1),q=Gv(P,t,z,B,U);GK(q,P,w)||(g=1,i=z,l=B,c=U)}g&&(I=Gv(P,t,i,l,c),Kn.mix(A,I));var H=t5(I,P,w),te=n5(I,P,w);if(H||te){var Y=i;H&&(Y=qv(i,/[lr]/gi,{l:"r",r:"l"})),te&&(Y=qv(i,/[tb]/gi,{t:"b",b:"t"})),i=Y,l=n.offset||[0,0],c=n.targetOffset||[0,0]}p.adjustX=o.adjustX&&H,p.adjustY=o.adjustY&&te,(p.adjustX||p.adjustY)&&(A=HK(I,P,w,p))}return A.width!==P.width&&Kn.css(h,"width",Kn.width(h)+A.width-P.width),A.height!==P.height&&Kn.css(h,"height",Kn.height(h)+A.height-P.height),Kn.offset(h,{left:A.left,top:A.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:i,offset:l,targetOffset:c,overflow:p}}function qK(e,t){var n=YC(e,t),r=QC(e);return!n||r.left+r.width<=n.left||r.top+r.height<=n.top||r.left>=n.right||r.top>=n.bottom}function JC(e,t,n){var r=n.target||t,i=QC(r),l=!qK(r,n.overflow&&n.overflow.alwaysByViewport);return VR(e,i,n,l)}JC.__getOffsetParent=k2;JC.__getVisibleRectForElement=YC;function ZK(e,t,n){var r,i,l=Kn.getDocument(e),c=l.defaultView||l.parentWindow,o=Kn.getWindowScrollLeft(c),h=Kn.getWindowScrollTop(c),p=Kn.viewportWidth(c),g=Kn.viewportHeight(c);"pageX"in t?r=t.pageX:r=o+t.clientX,"pageY"in t?i=t.pageY:i=h+t.clientY;var b={left:r,top:i,width:0,height:0},w=r>=0&&r<=o+p&&i>=0&&i<=h+g,P=[n.points[0],"cc"];return VR(e,b,W6(W6({},n),{},{points:P}),w)}function e4(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=new Set;function i(l,c){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,h=r.has(l);if(Nr(!h,"Warning: There may be circular references"),h)return!1;if(l===c)return!0;if(n&&o>1)return!1;r.add(l);var p=o+1;if(Array.isArray(l)){if(!Array.isArray(c)||l.length!==c.length)return!1;for(var g=0;g<l.length;g++)if(!i(l[g],c[g],p))return!1;return!0}if(l&&c&&sn(l)==="object"&&sn(c)==="object"){var b=Object.keys(l);return b.length!==Object.keys(c).length?!1:b.every(function(w){return i(l[w],c[w],p)})}return!1}return i(e,t)}const t4=function(e){if(!e)return!1;if(e instanceof HTMLElement&&e.offsetParent)return!0;if(e instanceof SVGGraphicsElement&&e.getBBox){var t=e.getBBox(),n=t.width,r=t.height;if(n||r)return!0}if(e instanceof HTMLElement&&e.getBoundingClientRect){var i=e.getBoundingClientRect(),l=i.width,c=i.height;if(l||c)return!0}return!1},XK=function(e,t){var n=tr.useRef(!1),r=tr.useRef(null);function i(){window.clearTimeout(r.current)}function l(c){if(i(),!n.current||c===!0){if(e(c)===!1)return;n.current=!0,r.current=window.setTimeout(function(){n.current=!1},t)}else r.current=window.setTimeout(function(){n.current=!1,l()},t)}return[l,function(){n.current=!1,i()}]};function YK(e,t){return e===t?!0:!e||!t?!1:"pageX"in t&&"pageY"in t?e.pageX===t.pageX&&e.pageY===t.pageY:"clientX"in t&&"clientY"in t?e.clientX===t.clientX&&e.clientY===t.clientY:!1}function QK(e,t){e!==document.activeElement&&uc(t,e)&&typeof e.focus=="function"&&e.focus()}function o5(e,t){var n=null,r=null;function i(c){var o=ze(c,1),h=o[0].target;if(!!document.documentElement.contains(h)){var p=h.getBoundingClientRect(),g=p.width,b=p.height,w=Math.floor(g),P=Math.floor(b);(n!==w||r!==P)&&Promise.resolve().then(function(){t({width:w,height:P})}),n=w,r=P}}var l=new GI(i);return e&&l.observe(e),function(){l.disconnect()}}function a5(e){return typeof e!="function"?null:e()}function s5(e){return sn(e)!=="object"||!e?null:e}var JK=function(t,n){var r=t.children,i=t.disabled,l=t.target,c=t.align,o=t.onAlign,h=t.monitorWindowResize,p=t.monitorBufferTime,g=p===void 0?0:p,b=tr.useRef({}),w=tr.useRef(),P=tr.Children.only(r),I=tr.useRef({});I.current.disabled=i,I.current.target=l,I.current.align=c,I.current.onAlign=o;var A=XK(function(){var le=I.current,J=le.disabled,Z=le.target,Q=le.align,ge=le.onAlign,re=w.current;if(!J&&Z&&re){var de,oe=a5(Z),ye=s5(Z);b.current.element=oe,b.current.point=ye,b.current.align=Q;var Re=document,Te=Re.activeElement;return oe&&t4(oe)?de=JC(re,oe,Q):ye&&(de=ZK(re,ye,Q)),QK(Te,re),ge&&de&&ge(re,de),!0}return!1},g),O=ze(A,2),M=O[0],R=O[1],N=tr.useState(),z=ze(N,2),B=z[0],U=z[1],q=tr.useState(),H=ze(q,2),te=H[0],Y=H[1];return si(function(){U(a5(l)),Y(s5(l))}),tr.useEffect(function(){(b.current.element!==B||!YK(b.current.point,te)||!e4(b.current.align,c))&&M()}),tr.useEffect(function(){var le=o5(w.current,M);return le},[w.current]),tr.useEffect(function(){var le=o5(B,M);return le},[B]),tr.useEffect(function(){i?R():M()},[i]),tr.useEffect(function(){if(h){var le=Hs(window,"resize",M);return le.remove}},[h]),tr.useEffect(function(){return function(){R()}},[]),tr.useImperativeHandle(n,function(){return{forceAlign:function(){return M(!0)}}}),tr.isValidElement(P)&&(P=tr.cloneElement(P,{ref:Lo(P.ref,w)})),P},UR=tr.forwardRef(JK);UR.displayName="Align";var l5=["measure","alignPre","align",null,"motion"];const eH=function(e,t){var n=fs(null),r=ze(n,2),i=r[0],l=r[1],c=C.exports.useRef();function o(g){l(g,!0)}function h(){nr.cancel(c.current)}function p(g){h(),c.current=nr(function(){o(function(b){switch(i){case"align":return"motion";case"motion":return"stable"}return b}),g==null||g()})}return C.exports.useEffect(function(){o("measure")},[e]),C.exports.useEffect(function(){switch(i){case"measure":t();break}i&&(c.current=nr(Ec(bo().mark(function g(){var b,w;return bo().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:b=l5.indexOf(i),w=l5[b+1],w&&b!==-1&&o(w);case 3:case"end":return I.stop()}},g)}))))},[i]),C.exports.useEffect(function(){return function(){h()}},[]),[i,p]},tH=function(e){var t=C.exports.useState({width:0,height:0}),n=ze(t,2),r=n[0],i=n[1];function l(o){var h=o.offsetWidth,p=o.offsetHeight,g=o.getBoundingClientRect(),b=g.width,w=g.height;Math.abs(h-b)<1&&Math.abs(p-w)<1&&(h=b,p=w),i({width:h,height:p})}var c=C.exports.useMemo(function(){var o={};if(e){var h=r.width,p=r.height;e.indexOf("height")!==-1&&p?o.height=p:e.indexOf("minHeight")!==-1&&p&&(o.minHeight=p),e.indexOf("width")!==-1&&h?o.width=h:e.indexOf("minWidth")!==-1&&h&&(o.minWidth=h)}return o},[e,r]);return[c,l]};var jR=C.exports.forwardRef(function(e,t){var n=e.visible,r=e.prefixCls,i=e.className,l=e.style,c=e.children,o=e.zIndex,h=e.stretch,p=e.destroyPopupOnHide,g=e.forceRender,b=e.align,w=e.point,P=e.getRootDomNode,I=e.getClassNameFromAlign,A=e.onAlign,O=e.onMouseEnter,M=e.onMouseLeave,R=e.onMouseDown,N=e.onTouchStart,z=e.onClick,B=C.exports.useRef(),U=C.exports.useRef(),q=C.exports.useState(),H=ze(q,2),te=H[0],Y=H[1],le=tH(h),J=ze(le,2),Z=J[0],Q=J[1];function ge(){h&&Q(P())}var re=eH(n,ge),de=ze(re,2),oe=de[0],ye=de[1],Re=C.exports.useState(0),Te=ze(Re,2),ke=Te[0],De=Te[1],Me=C.exports.useRef();si(function(){oe==="alignPre"&&De(0)},[oe]);function Ne(){return w||P}function Le(){var Xe;(Xe=B.current)===null||Xe===void 0||Xe.forceAlign()}function Ve(Xe,Pt){var mt=I(Pt);te!==mt&&Y(mt),De(function(Mt){return Mt+1}),oe==="align"&&(A==null||A(Xe,Pt))}si(function(){oe==="align"&&(ke<3?Le():ye(function(){var Xe;(Xe=Me.current)===null||Xe===void 0||Xe.call(Me)}))},[ke]);var qe=ve({},OR(e));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(Xe){var Pt=qe[Xe];qe[Xe]=function(mt,Mt){return ye(),Pt==null?void 0:Pt(mt,Mt)}});function Ue(){return new Promise(function(Xe){Me.current=Xe})}C.exports.useEffect(function(){!qe.motionName&&oe==="motion"&&ye()},[qe.motionName,oe]),C.exports.useImperativeHandle(t,function(){return{forceAlign:Le,getElement:function(){return U.current}}});var ct=ve(ve({},Z),{},{zIndex:o,opacity:oe==="motion"||oe==="stable"||!n?void 0:0,pointerEvents:!n&&oe!=="stable"?"none":void 0},l),pt=!0;b!=null&&b.points&&(oe==="align"||oe==="stable")&&(pt=!1);var Tt=c;return C.exports.Children.count(c)>1&&(Tt=E("div",{className:"".concat(r,"-content"),children:c})),E(Ca,{visible:n,ref:U,leavedClassName:"".concat(r,"-hidden"),...qe,onAppearPrepare:Ue,onEnterPrepare:Ue,removeOnLeave:p,forceRender:g,children:function(Xe,Pt){var mt=Xe.className,Mt=Xe.style,Ct=Ye(r,i,te,mt);return E(UR,{target:Ne(),ref:B,monitorWindowResize:!0,disabled:pt,align:b,onAlign:Ve,children:E("div",{ref:Pt,className:Ct,onMouseEnter:O,onMouseLeave:M,onMouseDownCapture:R,onTouchStartCapture:N,onClick:z,style:ve(ve({},Mt),ct),children:Tt})},"popup")}})});jR.displayName="PopupInner";var KR=C.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.visible,i=e.zIndex,l=e.children,c=e.mobile;c=c===void 0?{}:c;var o=c.popupClassName,h=c.popupStyle,p=c.popupMotion,g=p===void 0?{}:p,b=c.popupRender,w=e.onClick,P=C.exports.useRef();C.exports.useImperativeHandle(t,function(){return{forceAlign:function(){},getElement:function(){return P.current}}});var I=ve({zIndex:i},h),A=l;return C.exports.Children.count(l)>1&&(A=E("div",{className:"".concat(n,"-content"),children:l})),b&&(A=b(A)),E(Ca,{visible:r,ref:P,removeOnLeave:!0,...g,children:function(O,M){var R=O.className,N=O.style,z=Ye(n,o,R);return E("div",{ref:M,className:z,onClick:w,style:ve(ve({},N),I),children:A})}})});KR.displayName="MobilePopupInner";var nH=["visible","mobile"],HR=C.exports.forwardRef(function(e,t){var n=e.visible,r=e.mobile,i=In(e,nH),l=C.exports.useState(n),c=ze(l,2),o=c[0],h=c[1],p=C.exports.useState(!1),g=ze(p,2),b=g[0],w=g[1],P=ve(ve({},i),{},{visible:o});C.exports.useEffect(function(){h(n),n&&r&&w(CR())},[n,r]);var I=b?E(KR,{...P,mobile:r,ref:t}):E(jR,{...P,ref:t});return Qe("div",{children:[E(wK,{...P}),I]})});HR.displayName="Popup";var u5=C.exports.createContext(null);function l_(){}function rH(){return""}function iH(e){return e?e.ownerDocument:window.document}var oH=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function aH(e){var t=function(n){li(i,n);var r=ui(i);function i(l){var c;Kr(this,i),c=r.call(this,l),se(On(c),"popupRef",C.exports.createRef()),se(On(c),"triggerRef",C.exports.createRef()),se(On(c),"portalContainer",void 0),se(On(c),"attachId",void 0),se(On(c),"clickOutsideHandler",void 0),se(On(c),"touchOutsideHandler",void 0),se(On(c),"contextMenuOutsideHandler1",void 0),se(On(c),"contextMenuOutsideHandler2",void 0),se(On(c),"mouseDownTimeout",void 0),se(On(c),"focusTime",void 0),se(On(c),"preClickTime",void 0),se(On(c),"preTouchTime",void 0),se(On(c),"delayTimer",void 0),se(On(c),"hasPopupMouseDown",void 0),se(On(c),"onMouseEnter",function(h){var p=c.props.mouseEnterDelay;c.fireEvents("onMouseEnter",h),c.delaySetPopupVisible(!0,p,p?null:h)}),se(On(c),"onMouseMove",function(h){c.fireEvents("onMouseMove",h),c.setPoint(h)}),se(On(c),"onMouseLeave",function(h){c.fireEvents("onMouseLeave",h),c.delaySetPopupVisible(!1,c.props.mouseLeaveDelay)}),se(On(c),"onPopupMouseEnter",function(){c.clearDelayTimer()}),se(On(c),"onPopupMouseLeave",function(h){var p;h.relatedTarget&&!h.relatedTarget.setTimeout&&uc((p=c.popupRef.current)===null||p===void 0?void 0:p.getElement(),h.relatedTarget)||c.delaySetPopupVisible(!1,c.props.mouseLeaveDelay)}),se(On(c),"onFocus",function(h){c.fireEvents("onFocus",h),c.clearDelayTimer(),c.isFocusToShow()&&(c.focusTime=Date.now(),c.delaySetPopupVisible(!0,c.props.focusDelay))}),se(On(c),"onMouseDown",function(h){c.fireEvents("onMouseDown",h),c.preClickTime=Date.now()}),se(On(c),"onTouchStart",function(h){c.fireEvents("onTouchStart",h),c.preTouchTime=Date.now()}),se(On(c),"onBlur",function(h){c.fireEvents("onBlur",h),c.clearDelayTimer(),c.isBlurToHide()&&c.delaySetPopupVisible(!1,c.props.blurDelay)}),se(On(c),"onContextMenu",function(h){h.preventDefault(),c.fireEvents("onContextMenu",h),c.setPopupVisible(!0,h)}),se(On(c),"onContextMenuClose",function(){c.isContextMenuToShow()&&c.close()}),se(On(c),"onClick",function(h){if(c.fireEvents("onClick",h),c.focusTime){var p;if(c.preClickTime&&c.preTouchTime?p=Math.min(c.preClickTime,c.preTouchTime):c.preClickTime?p=c.preClickTime:c.preTouchTime&&(p=c.preTouchTime),Math.abs(p-c.focusTime)<20)return;c.focusTime=0}c.preClickTime=0,c.preTouchTime=0,c.isClickToShow()&&(c.isClickToHide()||c.isBlurToHide())&&h&&h.preventDefault&&h.preventDefault();var g=!c.state.popupVisible;(c.isClickToHide()&&!g||g&&c.isClickToShow())&&c.setPopupVisible(!c.state.popupVisible,h)}),se(On(c),"onPopupMouseDown",function(){if(c.hasPopupMouseDown=!0,clearTimeout(c.mouseDownTimeout),c.mouseDownTimeout=window.setTimeout(function(){c.hasPopupMouseDown=!1},0),c.context){var h;(h=c.context).onPopupMouseDown.apply(h,arguments)}}),se(On(c),"onDocumentClick",function(h){if(!(c.props.mask&&!c.props.maskClosable)){var p=h.target,g=c.getRootDomNode(),b=c.getPopupDomNode();(!uc(g,p)||c.isContextMenuOnly())&&!uc(b,p)&&!c.hasPopupMouseDown&&c.close()}}),se(On(c),"getRootDomNode",function(){var h=c.props.getTriggerDOMNode;if(h)return h(c.triggerRef.current);try{var p=kp(c.triggerRef.current);if(p)return p}catch{}return mc.findDOMNode(On(c))}),se(On(c),"getPopupClassNameFromAlign",function(h){var p=[],g=c.props,b=g.popupPlacement,w=g.builtinPlacements,P=g.prefixCls,I=g.alignPoint,A=g.getPopupClassNameFromAlign;return b&&w&&p.push(bK(w,P,h,I)),A&&p.push(A(h)),p.join(" ")}),se(On(c),"getComponent",function(){var h=c.props,p=h.prefixCls,g=h.destroyPopupOnHide,b=h.popupClassName,w=h.onPopupAlign,P=h.popupMotion,I=h.popupAnimation,A=h.popupTransitionName,O=h.popupStyle,M=h.mask,R=h.maskAnimation,N=h.maskTransitionName,z=h.maskMotion,B=h.zIndex,U=h.popup,q=h.stretch,H=h.alignPoint,te=h.mobile,Y=h.forceRender,le=h.onPopupClick,J=c.state,Z=J.popupVisible,Q=J.point,ge=c.getPopupAlign(),re={};return c.isMouseEnterToShow()&&(re.onMouseEnter=c.onPopupMouseEnter),c.isMouseLeaveToHide()&&(re.onMouseLeave=c.onPopupMouseLeave),re.onMouseDown=c.onPopupMouseDown,re.onTouchStart=c.onPopupMouseDown,E(HR,{prefixCls:p,destroyPopupOnHide:g,visible:Z,point:H&&Q,className:b,align:ge,onAlign:w,animation:I,getClassNameFromAlign:c.getPopupClassNameFromAlign,...re,stretch:q,getRootDomNode:c.getRootDomNode,style:O,mask:M,zIndex:B,transitionName:A,maskAnimation:R,maskTransitionName:N,maskMotion:z,ref:c.popupRef,motion:P,mobile:te,forceRender:Y,onClick:le,children:typeof U=="function"?U():U})}),se(On(c),"attachParent",function(h){nr.cancel(c.attachId);var p=c.props,g=p.getPopupContainer,b=p.getDocument,w=c.getRootDomNode(),P;g?(w||g.length===0)&&(P=g(w)):P=b(c.getRootDomNode()).body,P?P.appendChild(h):c.attachId=nr(function(){c.attachParent(h)})}),se(On(c),"getContainer",function(){if(!c.portalContainer){var h=c.props.getDocument,p=h(c.getRootDomNode()).createElement("div");p.style.position="absolute",p.style.top="0",p.style.left="0",p.style.width="100%",c.portalContainer=p}return c.attachParent(c.portalContainer),c.portalContainer}),se(On(c),"setPoint",function(h){var p=c.props.alignPoint;!p||!h||c.setState({point:{pageX:h.pageX,pageY:h.pageY}})}),se(On(c),"handlePortalUpdate",function(){c.state.prevPopupVisible!==c.state.popupVisible&&c.props.afterPopupVisibleChange(c.state.popupVisible)}),se(On(c),"triggerContextValue",{onPopupMouseDown:c.onPopupMouseDown});var o;return"popupVisible"in l?o=!!l.popupVisible:o=!!l.defaultPopupVisible,c.state={prevPopupVisible:o,popupVisible:o},oH.forEach(function(h){c["fire".concat(h)]=function(p){c.fireEvents(h,p)}}),c}return Hr(i,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var c=this.props,o=this.state;if(o.popupVisible){var h;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(h=c.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Hs(h,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(h=h||c.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Hs(h,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(h=h||c.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Hs(h,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Hs(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),nr.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var c;return((c=this.popupRef.current)===null||c===void 0?void 0:c.getElement())||null}},{key:"getPopupAlign",value:function(){var c=this.props,o=c.popupPlacement,h=c.popupAlign,p=c.builtinPlacements;return o&&p?_K(p,o,h):h}},{key:"setPopupVisible",value:function(c,o){var h=this.props.alignPoint,p=this.state.popupVisible;this.clearDelayTimer(),p!==c&&("popupVisible"in this.props||this.setState({popupVisible:c,prevPopupVisible:p}),this.props.onPopupVisibleChange(c)),h&&o&&c&&this.setPoint(o)}},{key:"delaySetPopupVisible",value:function(c,o,h){var p=this,g=o*1e3;if(this.clearDelayTimer(),g){var b=h?{pageX:h.pageX,pageY:h.pageY}:null;this.delayTimer=window.setTimeout(function(){p.setPopupVisible(c,b),p.clearDelayTimer()},g)}else this.setPopupVisible(c,h)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(c){var o=this.props.children.props,h=this.props;return o[c]&&h[c]?this["fire".concat(c)]:o[c]||h[c]}},{key:"isClickToShow",value:function(){var c=this.props,o=c.action,h=c.showAction;return o.indexOf("click")!==-1||h.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var c=this.props.action;return c==="contextMenu"||c.length===1&&c[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var c=this.props,o=c.action,h=c.showAction;return o.indexOf("contextMenu")!==-1||h.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var c=this.props,o=c.action,h=c.hideAction;return o.indexOf("click")!==-1||h.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var c=this.props,o=c.action,h=c.showAction;return o.indexOf("hover")!==-1||h.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var c=this.props,o=c.action,h=c.hideAction;return o.indexOf("hover")!==-1||h.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var c=this.props,o=c.action,h=c.showAction;return o.indexOf("focus")!==-1||h.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var c=this.props,o=c.action,h=c.hideAction;return o.indexOf("focus")!==-1||h.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var c;(c=this.popupRef.current)===null||c===void 0||c.forceAlign()}}},{key:"fireEvents",value:function(c,o){var h=this.props.children.props[c];h&&h(o);var p=this.props[c];p&&p(o)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var c=this.state.popupVisible,o=this.props,h=o.children,p=o.forceRender,g=o.alignPoint,b=o.className,w=o.autoDestroy,P=C.exports.Children.only(h),I={key:"trigger"};this.isContextMenuToShow()?I.onContextMenu=this.onContextMenu:I.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(I.onClick=this.onClick,I.onMouseDown=this.onMouseDown,I.onTouchStart=this.onTouchStart):(I.onClick=this.createTwoChains("onClick"),I.onMouseDown=this.createTwoChains("onMouseDown"),I.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(I.onMouseEnter=this.onMouseEnter,g&&(I.onMouseMove=this.onMouseMove)):I.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?I.onMouseLeave=this.onMouseLeave:I.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(I.onFocus=this.onFocus,I.onBlur=this.onBlur):(I.onFocus=this.createTwoChains("onFocus"),I.onBlur=this.createTwoChains("onBlur"));var A=Ye(P&&P.props&&P.props.className,b);A&&(I.className=A);var O=ve({},I);Sc(P)&&(O.ref=Lo(this.triggerRef,P.ref));var M=C.exports.cloneElement(P,O),R;return(c||this.popupRef.current||p)&&(R=E(e,{getContainer:this.getContainer,didUpdate:this.handlePortalUpdate,children:this.getComponent()},"portal")),!c&&w&&(R=null),Qe(u5.Provider,{value:this.triggerContextValue,children:[M,R]})}}],[{key:"getDerivedStateFromProps",value:function(c,o){var h=c.popupVisible,p={};return h!==void 0&&o.popupVisible!==h&&(p.popupVisible=h,p.prevPopupVisible=o.popupVisible),p}}]),i}(C.exports.Component);return se(t,"contextType",u5),se(t,"defaultProps",{prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:rH,getDocument:iH,onPopupVisibleChange:l_,afterPopupVisibleChange:l_,onPopupAlign:l_,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1}),t}const O0=aH(yK);var sH=["prefixCls","disabled","visible","children","popupElement","containerWidth","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],lH=function(t){var n=t===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:n,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:n,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:n,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:n,adjustY:1}}}},uH=function(t,n){var r=t.prefixCls;t.disabled;var i=t.visible,l=t.children,c=t.popupElement,o=t.containerWidth,h=t.animation,p=t.transitionName,g=t.dropdownStyle,b=t.dropdownClassName,w=t.direction,P=w===void 0?"ltr":w,I=t.placement,A=t.dropdownMatchSelectWidth,O=t.dropdownRender,M=t.dropdownAlign,R=t.getPopupContainer,N=t.empty,z=t.getTriggerDOMNode,B=t.onPopupVisibleChange,U=t.onPopupMouseEnter,q=In(t,sH),H="".concat(r,"-dropdown"),te=c;O&&(te=O(c));var Y=C.exports.useMemo(function(){return lH(A)},[A]),le=h?"".concat(H,"-").concat(h):p,J=C.exports.useRef(null);C.exports.useImperativeHandle(n,function(){return{getPopupElement:function(){return J.current}}});var Z=ve({minWidth:o},g);return typeof A=="number"?Z.width=A:A&&(Z.width=o),E(O0,{...q,showAction:B?["click"]:[],hideAction:B?["click"]:[],popupPlacement:I||(P==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Y,prefixCls:H,popupTransitionName:le,popup:E("div",{ref:J,onMouseEnter:U,children:te}),popupAlign:M,popupVisible:i,getPopupContainer:R,popupClassName:Ye(b,se({},"".concat(H,"-empty"),N)),popupStyle:Z,getTriggerDOMNode:z,onPopupVisibleChange:B,children:l})},WR=C.exports.forwardRef(uH);WR.displayName="SelectTrigger";function c5(e,t){var n=e.key,r;return"value"in e&&(r=e.value),n!=null?n:r!==void 0?r:"rc-index-key-".concat(t)}function GR(e,t){var n=e||{},r=n.label,i=n.value,l=n.options;return{label:r||(t?"children":"label"),value:i||"value",options:l||"options"}}function cH(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.fieldNames,r=t.childrenAsData,i=[],l=GR(n,!1),c=l.label,o=l.value,h=l.options;function p(g,b){g.forEach(function(w){var P=w[c];if(b||!(h in w)){var I=w[o];i.push({key:c5(w,i.length),groupOption:b,data:w,label:P,value:I})}else{var A=P;A===void 0&&r&&(A=w.label),i.push({key:c5(w,i.length),group:!0,data:w,label:A}),p(w[h],!0)}})}return p(e,!1),i}function T2(e){var t=ve({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Nr(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}function dH(e,t){if(!t||!t.length)return null;var n=!1;function r(l,c){var o=OC(c),h=o[0],p=o.slice(1);if(!h)return[l];var g=l.split(h);return n=n||g.length>1,g.reduce(function(b,w){return[].concat(wt(b),wt(r(w,p)))},[]).filter(function(b){return b})}var i=r(e,t);return n?i:null}var fH=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","showArrow","inputIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],hH=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function P2(e){return e==="tags"||e==="multiple"}var qR=C.exports.forwardRef(function(e,t){var n,r,i=e.id,l=e.prefixCls,c=e.className,o=e.showSearch,h=e.tagRender,p=e.direction,g=e.omitDomProps,b=e.displayValues,w=e.onDisplayValuesChange,P=e.emptyOptions,I=e.notFoundContent,A=I===void 0?"Not Found":I,O=e.onClear,M=e.mode,R=e.disabled,N=e.loading,z=e.getInputElement,B=e.getRawInputElement,U=e.open,q=e.defaultOpen,H=e.onDropdownVisibleChange,te=e.activeValue,Y=e.onActiveValueChange,le=e.activeDescendantId,J=e.searchValue,Z=e.autoClearSearchValue,Q=e.onSearch,ge=e.onSearchSplit,re=e.tokenSeparators,de=e.allowClear,oe=e.showArrow,ye=e.inputIcon,Re=e.clearIcon,Te=e.OptionList,ke=e.animation,De=e.transitionName,Me=e.dropdownStyle,Ne=e.dropdownClassName,Le=e.dropdownMatchSelectWidth,Ve=e.dropdownRender,qe=e.dropdownAlign,Ue=e.placement,ct=e.getPopupContainer,pt=e.showAction,Tt=pt===void 0?[]:pt,Xe=e.onFocus,Pt=e.onBlur,mt=e.onKeyUp,Mt=e.onKeyDown,Ct=e.onMouseDown,Lt=In(e,fH),lt=P2(M),dt=(o!==void 0?o:lt)||M==="combobox",ut=ve({},Lt);hH.forEach(function(Pn){delete ut[Pn]}),g==null||g.forEach(function(Pn){delete ut[Pn]});var it=C.exports.useState(!1),ft=ze(it,2),xt=ft[0],Wt=ft[1];C.exports.useEffect(function(){Wt(CR())},[]);var Ut=C.exports.useRef(null),Qt=C.exports.useRef(null),Fe=C.exports.useRef(null),Ge=C.exports.useRef(null),Xt=C.exports.useRef(null),dn=Hj(),Vt=ze(dn,3),jt=Vt[0],nn=Vt[1],_n=Vt[2];C.exports.useImperativeHandle(t,function(){var Pn,Sn;return{focus:(Pn=Ge.current)===null||Pn===void 0?void 0:Pn.focus,blur:(Sn=Ge.current)===null||Sn===void 0?void 0:Sn.blur,scrollTo:function(Wr){var vr;return(vr=Xt.current)===null||vr===void 0?void 0:vr.scrollTo(Wr)}}});var An=C.exports.useMemo(function(){var Pn;if(M!=="combobox")return J;var Sn=(Pn=b[0])===null||Pn===void 0?void 0:Pn.value;return typeof Sn=="string"||typeof Sn=="number"?String(Sn):""},[J,M,b]),_t=M==="combobox"&&typeof z=="function"&&z()||null,Gt=typeof B=="function"&&B(),an=VI(Qt,Gt==null||(n=Gt.props)===null||n===void 0?void 0:n.ref),Fn=Vi(void 0,{defaultValue:q,value:U}),kn=ze(Fn,2),zt=kn[0],Tn=kn[1],Cn=zt,hn=!A&&P;(R||hn&&Cn&&M==="combobox")&&(Cn=!1);var Nt=hn?!1:Cn,ot=C.exports.useCallback(function(Pn){var Sn=Pn!==void 0?Pn:!Cn;R||(Tn(Sn),Cn!==Sn&&(H==null||H(Sn)))},[R,Cn,Tn,H]),ht=C.exports.useMemo(function(){return(re||[]).some(function(Pn){return[`
`,`\r
`].includes(Pn)})},[re]),At=function(Sn,Rn,Wr){var vr=!0,jn=Sn;Y==null||Y(null);var Ln=Wr?null:dH(Sn,re);return M!=="combobox"&&Ln&&(jn="",ge==null||ge(Ln),ot(!1),vr=!1),Q&&An!==jn&&Q(jn,{source:Rn?"typing":"effect"}),vr},$t=function(Sn){!Sn||!Sn.trim()||Q(Sn,{source:"submit"})};C.exports.useEffect(function(){!Cn&&!lt&&M!=="combobox"&&At("",!1,!1)},[Cn]),C.exports.useEffect(function(){zt&&R&&Tn(!1),R&&nn(!1)},[R]);var cn=kR(),Mn=ze(cn,2),Gn=Mn[0],qn=Mn[1],me=function(Sn){var Rn=Gn(),Wr=Sn.which;if(Wr===Et.ENTER&&(M!=="combobox"&&Sn.preventDefault(),Cn||ot(!0)),qn(!!An),Wr===Et.BACKSPACE&&!Rn&&lt&&!An&&b.length){for(var vr=wt(b),jn=null,Ln=vr.length-1;Ln>=0;Ln-=1){var Yn=vr[Ln];if(!Yn.disabled){vr.splice(Ln,1),jn=Yn;break}}jn&&w(vr,{type:"remove",values:[jn]})}for(var xr=arguments.length,br=new Array(xr>1?xr-1:0),Lr=1;Lr<xr;Lr++)br[Lr-1]=arguments[Lr];if(Cn&&Xt.current){var so;(so=Xt.current).onKeyDown.apply(so,[Sn].concat(br))}Mt==null||Mt.apply(void 0,[Sn].concat(br))},K=function(Sn){for(var Rn=arguments.length,Wr=new Array(Rn>1?Rn-1:0),vr=1;vr<Rn;vr++)Wr[vr-1]=arguments[vr];if(Cn&&Xt.current){var jn;(jn=Xt.current).onKeyUp.apply(jn,[Sn].concat(Wr))}mt==null||mt.apply(void 0,[Sn].concat(Wr))},G=function(Sn){var Rn=b.filter(function(Wr){return Wr!==Sn});w(Rn,{type:"remove",values:[Sn]})},ce=C.exports.useRef(!1),ae=function(){nn(!0),R||(Xe&&!ce.current&&Xe.apply(void 0,arguments),Tt.includes("focus")&&ot(!0)),ce.current=!0},xe=function(){nn(!1,function(){ce.current=!1,ot(!1)}),!R&&(An&&(M==="tags"?Q(An,{source:"submit"}):M==="multiple"&&Q("",{source:"blur"})),Pt&&Pt.apply(void 0,arguments))},Ee=[];C.exports.useEffect(function(){return function(){Ee.forEach(function(Pn){return clearTimeout(Pn)}),Ee.splice(0,Ee.length)}},[]);var be=function(Sn){var Rn,Wr=Sn.target,vr=(Rn=Fe.current)===null||Rn===void 0?void 0:Rn.getPopupElement();if(vr&&vr.contains(Wr)){var jn=setTimeout(function(){var br=Ee.indexOf(jn);if(br!==-1&&Ee.splice(br,1),_n(),!xt&&!vr.contains(document.activeElement)){var Lr;(Lr=Ge.current)===null||Lr===void 0||Lr.focus()}});Ee.push(jn)}for(var Ln=arguments.length,Yn=new Array(Ln>1?Ln-1:0),xr=1;xr<Ln;xr++)Yn[xr-1]=arguments[xr];Ct==null||Ct.apply(void 0,[Sn].concat(Yn))},Ce=C.exports.useState(null),Oe=ze(Ce,2),He=Oe[0],We=Oe[1],Be=C.exports.useState({}),Ot=ze(Be,2),bt=Ot[1];function Je(){bt({})}si(function(){if(Nt){var Pn,Sn=Math.ceil((Pn=Ut.current)===null||Pn===void 0?void 0:Pn.offsetWidth);He!==Sn&&!Number.isNaN(Sn)&&We(Sn)}},[Nt]);var Rt;Gt&&(Rt=function(Sn){ot(Sn)}),Wj(function(){var Pn;return[Ut.current,(Pn=Fe.current)===null||Pn===void 0?void 0:Pn.getPopupElement()]},Nt,ot,!!Gt);var Bt=C.exports.useMemo(function(){return ve(ve({},e),{},{notFoundContent:A,open:Cn,triggerOpen:Nt,id:i,showSearch:dt,multiple:lt,toggleOpen:ot})},[e,A,Nt,Cn,i,dt,lt,ot]),gn=oe!==void 0?oe:N||!lt&&M!=="combobox",on;gn&&(on=E(gy,{className:Ye("".concat(l,"-arrow"),se({},"".concat(l,"-arrow-loading"),N)),customizeIcon:ye,customizeIconProps:{loading:N,searchValue:An,open:Cn,focused:jt,showSearch:dt}}));var yn,Bn=function(){var Sn;O==null||O(),(Sn=Ge.current)===null||Sn===void 0||Sn.focus(),w([],{type:"clear",values:b}),At("",!1,!1)};!R&&de&&(b.length||An)&&!(M==="combobox"&&An==="")&&(yn=E(gy,{className:"".concat(l,"-clear"),onMouseDown:Bn,customizeIcon:Re,children:"\xD7"}));var Jn=E(Te,{ref:Xt}),Dr=Ye(l,c,(r={},se(r,"".concat(l,"-focused"),jt),se(r,"".concat(l,"-multiple"),lt),se(r,"".concat(l,"-single"),!lt),se(r,"".concat(l,"-allow-clear"),de),se(r,"".concat(l,"-show-arrow"),gn),se(r,"".concat(l,"-disabled"),R),se(r,"".concat(l,"-loading"),N),se(r,"".concat(l,"-open"),Cn),se(r,"".concat(l,"-customize-input"),_t),se(r,"".concat(l,"-show-search"),dt),r)),or=E(WR,{ref:Fe,disabled:R,prefixCls:l,visible:Nt,popupElement:Jn,containerWidth:He,animation:ke,transitionName:De,dropdownStyle:Me,dropdownClassName:Ne,direction:p,dropdownMatchSelectWidth:Le,dropdownRender:Ve,dropdownAlign:qe,placement:Ue,getPopupContainer:ct,empty:P,getTriggerDOMNode:function(){return Qt.current},onPopupVisibleChange:Rt,onPopupMouseEnter:Je,children:Gt?C.exports.cloneElement(Gt,{ref:an}):E(AR,{...e,domRef:Qt,prefixCls:l,inputElement:_t,ref:Ge,id:i,showSearch:dt,autoClearSearchValue:Z,mode:M,activeDescendantId:le,tagRender:h,values:b,open:Cn,onToggleOpen:ot,activeValue:te,searchValue:An,onSearch:At,onSearchSubmit:$t,onRemove:G,tokenWithEnter:ht})}),Pr;return Gt?Pr=or:Pr=Qe("div",{className:Dr,...ut,ref:Ut,onMouseDown:be,onKeyDown:me,onKeyUp:K,onFocus:ae,onBlur:xe,children:[jt&&!Cn&&E("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite",children:"".concat(b.map(function(Pn){var Sn=Pn.label,Rn=Pn.value;return["number","string"].includes(sn(Sn))?Sn:Rn}).join(", "))}),or,on,yn]}),E(SR.Provider,{value:Bt,children:Pr})});const pH=function(e,t){var n=C.exports.useRef({values:new Map,options:new Map}),r=C.exports.useMemo(function(){var l=n.current,c=l.values,o=l.options,h=e.map(function(b){if(b.label===void 0){var w;return ve(ve({},b),{},{label:(w=c.get(b.value))===null||w===void 0?void 0:w.label})}return b}),p=new Map,g=new Map;return h.forEach(function(b){p.set(b.value,b),g.set(b.value,t.get(b.value)||o.get(b.value))}),n.current.values=p,n.current.options=g,h},[e,t]),i=C.exports.useCallback(function(l){return t.get(l)||n.current.options.get(l)},[t]);return[r,i]};function u_(e,t){return MR(e).join("").toUpperCase().includes(t)}const mH=function(e,t,n,r,i){return C.exports.useMemo(function(){if(!n||r===!1)return e;var l=t.options,c=t.label,o=t.value,h=[],p=typeof r=="function",g=n.toUpperCase(),b=p?r:function(P,I){return i?u_(I[i],g):I[l]?u_(I[c!=="children"?c:"label"],g):u_(I[o],g)},w=p?function(P){return T2(P)}:function(P){return P};return e.forEach(function(P){if(P[l]){var I=b(n,w(P));if(I)h.push(P);else{var A=P[l].filter(function(O){return b(n,w(O))});A.length&&h.push(ve(ve({},P),{},se({},l,A)))}return}b(n,w(P))&&h.push(P)}),h},[e,r,i,n,t])};var d5=0,vH=wo();function gH(){var e;return vH?(e=d5,d5+=1):e="TEST_OR_SSR",e}function ZR(e){var t=C.exports.useState(),n=ze(t,2),r=n[0],i=n[1];return C.exports.useEffect(function(){i("rc_select_".concat(gH()))},[]),e||r}var yH=["children","value"],xH=["children"];function _H(e){var t=e,n=t.key,r=t.props,i=r.children,l=r.value,c=In(r,yH);return ve({key:n,value:l!==void 0?l:n,children:i},c)}function XR(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Xi(e).map(function(n,r){if(!C.exports.isValidElement(n)||!n.type)return null;var i=n,l=i.type.isSelectOptGroup,c=i.key,o=i.props,h=o.children,p=In(o,xH);return t||!l?_H(n):ve(ve({key:"__RC_SELECT_GRP__".concat(c===null?r:c,"__"),label:c},p),{},{options:XR(h)})}).filter(function(n){return n})}function bH(e,t,n,r,i){return C.exports.useMemo(function(){var l=e,c=!e;c&&(l=XR(t));var o=new Map,h=new Map,p=function(w,P,I){I&&typeof I=="string"&&w.set(P[I],P)};function g(b){for(var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,P=0;P<b.length;P+=1){var I=b[P];!I[n.options]||w?(o.set(I[n.value],I),p(h,I,n.label),p(h,I,r),p(h,I,i)):g(I[n.options],!0)}}return g(l),{options:l,valueOptions:o,labelOptions:h}},[e,t,n,r,i])}function f5(e){var t=C.exports.useRef();t.current=e;var n=C.exports.useCallback(function(){return t.current.apply(t,arguments)},[]);return n}var n4=function(){return null};n4.isSelectOptGroup=!0;var r4=function(){return null};r4.isSelectOption=!0;var YR=C.exports.forwardRef(function(e,t){var n=e.height,r=e.offset,i=e.children,l=e.prefixCls,c=e.onInnerResize,o=e.innerProps,h={},p={display:"flex",flexDirection:"column"};return r!==void 0&&(h={height:n,position:"relative",overflow:"hidden"},p=ve(ve({},p),{},{transform:"translateY(".concat(r,"px)"),position:"absolute",left:0,right:0,top:0})),E("div",{style:h,children:E(ol,{onResize:function(b){var w=b.offsetHeight;w&&c&&c()},children:E("div",{style:p,className:Ye(se({},"".concat(l,"-holder-inner"),l)),ref:t,...o,children:i})})})});YR.displayName="Filler";var wH=20;function h5(e){return"touches"in e?e.touches[0].pageY:e.pageY}var CH=function(e){li(n,e);var t=ui(n);function n(){var r;Kr(this,n);for(var i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];return r=t.call.apply(t,[this].concat(l)),r.moveRaf=null,r.scrollbarRef=C.exports.createRef(),r.thumbRef=C.exports.createRef(),r.visibleTimeout=null,r.state={dragging:!1,pageY:null,startTop:null,visible:!1},r.delayHidden=function(){clearTimeout(r.visibleTimeout),r.setState({visible:!0}),r.visibleTimeout=setTimeout(function(){r.setState({visible:!1})},2e3)},r.onScrollbarTouchStart=function(o){o.preventDefault()},r.onContainerMouseDown=function(o){o.stopPropagation(),o.preventDefault()},r.patchEvents=function(){window.addEventListener("mousemove",r.onMouseMove),window.addEventListener("mouseup",r.onMouseUp),r.thumbRef.current.addEventListener("touchmove",r.onMouseMove),r.thumbRef.current.addEventListener("touchend",r.onMouseUp)},r.removeEvents=function(){var o;window.removeEventListener("mousemove",r.onMouseMove),window.removeEventListener("mouseup",r.onMouseUp),(o=r.scrollbarRef.current)===null||o===void 0||o.removeEventListener("touchstart",r.onScrollbarTouchStart),r.thumbRef.current&&(r.thumbRef.current.removeEventListener("touchstart",r.onMouseDown),r.thumbRef.current.removeEventListener("touchmove",r.onMouseMove),r.thumbRef.current.removeEventListener("touchend",r.onMouseUp)),nr.cancel(r.moveRaf)},r.onMouseDown=function(o){var h=r.props.onStartMove;r.setState({dragging:!0,pageY:h5(o),startTop:r.getTop()}),h(),r.patchEvents(),o.stopPropagation(),o.preventDefault()},r.onMouseMove=function(o){var h=r.state,p=h.dragging,g=h.pageY,b=h.startTop,w=r.props.onScroll;if(nr.cancel(r.moveRaf),p){var P=h5(o)-g,I=b+P,A=r.getEnableScrollRange(),O=r.getEnableHeightRange(),M=O?I/O:0,R=Math.ceil(M*A);r.moveRaf=nr(function(){w(R)})}},r.onMouseUp=function(){var o=r.props.onStopMove;r.setState({dragging:!1}),o(),r.removeEvents()},r.getSpinHeight=function(){var o=r.props,h=o.height,p=o.count,g=h/p*10;return g=Math.max(g,wH),g=Math.min(g,h/2),Math.floor(g)},r.getEnableScrollRange=function(){var o=r.props,h=o.scrollHeight,p=o.height;return h-p||0},r.getEnableHeightRange=function(){var o=r.props.height,h=r.getSpinHeight();return o-h||0},r.getTop=function(){var o=r.props.scrollTop,h=r.getEnableScrollRange(),p=r.getEnableHeightRange();if(o===0||h===0)return 0;var g=o/h;return g*p},r.showScroll=function(){var o=r.props,h=o.height,p=o.scrollHeight;return p>h},r}return Hr(n,[{key:"componentDidMount",value:function(){this.scrollbarRef.current.addEventListener("touchstart",this.onScrollbarTouchStart),this.thumbRef.current.addEventListener("touchstart",this.onMouseDown)}},{key:"componentDidUpdate",value:function(i){i.scrollTop!==this.props.scrollTop&&this.delayHidden()}},{key:"componentWillUnmount",value:function(){this.removeEvents(),clearTimeout(this.visibleTimeout)}},{key:"render",value:function(){var i=this.state,l=i.dragging,c=i.visible,o=this.props.prefixCls,h=this.getSpinHeight(),p=this.getTop(),g=this.showScroll(),b=g&&c;return E("div",{ref:this.scrollbarRef,className:Ye("".concat(o,"-scrollbar"),se({},"".concat(o,"-scrollbar-show"),g)),style:{width:8,top:0,bottom:0,right:0,position:"absolute",display:b?null:"none"},onMouseDown:this.onContainerMouseDown,onMouseMove:this.delayHidden,children:E("div",{ref:this.thumbRef,className:Ye("".concat(o,"-scrollbar-thumb"),se({},"".concat(o,"-scrollbar-thumb-moving"),l)),style:{width:"100%",height:h,top:p,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"},onMouseDown:this.onMouseDown})})}}]),n}(C.exports.Component);function SH(e){var t=e.children,n=e.setRef,r=C.exports.useCallback(function(i){n(i)},[]);return C.exports.cloneElement(t,{ref:r})}function EH(e,t,n,r,i,l){var c=l.getKey;return e.slice(t,n+1).map(function(o,h){var p=t+h,g=i(o,p,{}),b=c(o);return E(SH,{setRef:function(P){return r(o,P)},children:g},b)})}var kH=function(){function e(){Kr(this,e),this.maps=void 0,this.maps=Object.create(null)}return Hr(e,[{key:"set",value:function(n,r){this.maps[n]=r}},{key:"get",value:function(n){return this.maps[n]}}]),e}();function TH(e,t,n){var r=C.exports.useState(0),i=ze(r,2),l=i[0],c=i[1],o=C.exports.useRef(new Map),h=C.exports.useRef(new kH),p=C.exports.useRef();function g(){nr.cancel(p.current)}function b(){g(),p.current=nr(function(){o.current.forEach(function(P,I){if(P&&P.offsetParent){var A=kp(P),O=A.offsetHeight;h.current.get(I)!==O&&h.current.set(I,A.offsetHeight)}}),c(function(P){return P+1})})}function w(P,I){var A=e(P),O=o.current.get(A);I?(o.current.set(A,I),b()):o.current.delete(A),!O!=!I&&(I?t==null||t(P):n==null||n(P))}return C.exports.useEffect(function(){return g},[]),[w,b,h.current,l]}function PH(e,t,n,r,i,l,c,o){var h=C.exports.useRef();return function(p){if(p==null){o();return}if(nr.cancel(h.current),typeof p=="number")c(p);else if(p&&sn(p)==="object"){var g,b=p.align;"index"in p?g=p.index:g=t.findIndex(function(A){return i(A)===p.key});var w=p.offset,P=w===void 0?0:w,I=function A(O,M){if(!(O<0||!e.current)){var R=e.current.clientHeight,N=!1,z=M;if(R){for(var B=M||b,U=0,q=0,H=0,te=Math.min(t.length,g),Y=0;Y<=te;Y+=1){var le=i(t[Y]);q=U;var J=n.get(le);H=q+(J===void 0?r:J),U=H,Y===g&&J===void 0&&(N=!0)}var Z=null;switch(B){case"top":Z=q-P;break;case"bottom":Z=H-R+P;break;default:{var Q=e.current.scrollTop,ge=Q+R;q<Q?z="top":H>ge&&(z="bottom")}}Z!==null&&Z!==e.current.scrollTop&&c(Z)}h.current=nr(function(){N&&l(),A(O-1,z)},2)}};I(3)}}}function IH(e,t,n){var r=e.length,i=t.length,l,c;if(r===0&&i===0)return null;r<i?(l=e,c=t):(l=t,c=e);var o={__EMPTY_ITEM__:!0};function h(I){return I!==void 0?n(I):o}for(var p=null,g=Math.abs(r-i)!==1,b=0;b<c.length;b+=1){var w=h(l[b]),P=h(c[b]);if(w!==P){p=b,g=g||w!==h(c[b+1]);break}}return p===null?null:{index:p,multiple:g}}function MH(e,t,n){var r=C.exports.useState(e),i=ze(r,2),l=i[0],c=i[1],o=C.exports.useState(null),h=ze(o,2),p=h[0],g=h[1];return C.exports.useEffect(function(){var b=IH(l||[],e||[],t);(b==null?void 0:b.index)!==void 0&&(n==null||n(b.index),g(e[b.index])),c(e)},[e]),[p]}var RH=(typeof navigator>"u"?"undefined":sn(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const QR=function(e,t){var n=C.exports.useRef(!1),r=C.exports.useRef(null);function i(){clearTimeout(r.current),n.current=!0,r.current=setTimeout(function(){n.current=!1},50)}var l=C.exports.useRef({top:e,bottom:t});return l.current.top=e,l.current.bottom=t,function(c){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,h=c<0&&l.current.top||c>0&&l.current.bottom;return o&&h?(clearTimeout(r.current),n.current=!1):(!h||n.current)&&i(),!n.current&&h}};function AH(e,t,n,r){var i=C.exports.useRef(0),l=C.exports.useRef(null),c=C.exports.useRef(null),o=C.exports.useRef(!1),h=QR(t,n);function p(b){if(!!e){nr.cancel(l.current);var w=b.deltaY;i.current+=w,c.current=w,!h(w)&&(RH||b.preventDefault(),l.current=nr(function(){var P=o.current?10:1;r(i.current*P),i.current=0}))}}function g(b){!e||(o.current=b.detail===c.current)}return[p,g]}var OH=14/15;function NH(e,t,n){var r=C.exports.useRef(!1),i=C.exports.useRef(0),l=C.exports.useRef(null),c=C.exports.useRef(null),o,h=function(w){if(r.current){var P=Math.ceil(w.touches[0].pageY),I=i.current-P;i.current=P,n(I)&&w.preventDefault(),clearInterval(c.current),c.current=setInterval(function(){I*=OH,(!n(I,!0)||Math.abs(I)<=.1)&&clearInterval(c.current)},16)}},p=function(){r.current=!1,o()},g=function(w){o(),w.touches.length===1&&!r.current&&(r.current=!0,i.current=Math.ceil(w.touches[0].pageY),l.current=w.target,l.current.addEventListener("touchmove",h),l.current.addEventListener("touchend",p))};o=function(){l.current&&(l.current.removeEventListener("touchmove",h),l.current.removeEventListener("touchend",p))},si(function(){return e&&t.current.addEventListener("touchstart",g),function(){var b;(b=t.current)===null||b===void 0||b.removeEventListener("touchstart",g),o(),clearInterval(c.current)}},[e])}var DH=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","component","onScroll","onVisibleChange","innerProps"],LH=[],zH={overflowY:"auto",overflowAnchor:"none"};function FH(e,t){var n=e.prefixCls,r=n===void 0?"rc-virtual-list":n,i=e.className,l=e.height,c=e.itemHeight,o=e.fullHeight,h=o===void 0?!0:o,p=e.style,g=e.data,b=e.children,w=e.itemKey,P=e.virtual,I=e.component,A=I===void 0?"div":I,O=e.onScroll,M=e.onVisibleChange,R=e.innerProps,N=In(e,DH),z=!!(P!==!1&&l&&c),B=z&&g&&c*g.length>l,U=C.exports.useState(0),q=ze(U,2),H=q[0],te=q[1],Y=C.exports.useState(!1),le=ze(Y,2),J=le[0],Z=le[1],Q=Ye(r,i),ge=g||LH,re=C.exports.useRef(),de=C.exports.useRef(),oe=C.exports.useRef(),ye=C.exports.useCallback(function(jt){return typeof w=="function"?w(jt):jt==null?void 0:jt[w]},[w]),Re={getKey:ye};function Te(jt){te(function(nn){var _n;typeof jt=="function"?_n=jt(nn):_n=jt;var An=dt(_n);return re.current.scrollTop=An,An})}var ke=C.exports.useRef({start:0,end:ge.length}),De=C.exports.useRef(),Me=MH(ge,ye),Ne=ze(Me,1),Le=Ne[0];De.current=Le;var Ve=TH(ye,null,null),qe=ze(Ve,4),Ue=qe[0],ct=qe[1],pt=qe[2],Tt=qe[3],Xe=C.exports.useMemo(function(){if(!z)return{scrollHeight:void 0,start:0,end:ge.length-1,offset:void 0};if(!B){var jt;return{scrollHeight:((jt=de.current)===null||jt===void 0?void 0:jt.offsetHeight)||0,start:0,end:ge.length-1,offset:void 0}}for(var nn=0,_n,An,_t,Gt=ge.length,an=0;an<Gt;an+=1){var Fn=ge[an],kn=ye(Fn),zt=pt.get(kn),Tn=nn+(zt===void 0?c:zt);Tn>=H&&_n===void 0&&(_n=an,An=nn),Tn>H+l&&_t===void 0&&(_t=an),nn=Tn}return _n===void 0&&(_n=0,An=0,_t=Math.ceil(l/c)),_t===void 0&&(_t=ge.length-1),_t=Math.min(_t+1,ge.length),{scrollHeight:nn,start:_n,end:_t,offset:An}},[B,z,H,ge,Tt,l]),Pt=Xe.scrollHeight,mt=Xe.start,Mt=Xe.end,Ct=Xe.offset;ke.current.start=mt,ke.current.end=Mt;var Lt=Pt-l,lt=C.exports.useRef(Lt);lt.current=Lt;function dt(jt){var nn=jt;return Number.isNaN(lt.current)||(nn=Math.min(nn,lt.current)),nn=Math.max(nn,0),nn}var ut=H<=0,it=H>=Lt,ft=QR(ut,it);function xt(jt){var nn=jt;Te(nn)}function Wt(jt){var nn=jt.currentTarget.scrollTop;nn!==H&&Te(nn),O==null||O(jt)}var Ut=AH(z,ut,it,function(jt){Te(function(nn){var _n=nn+jt;return _n})}),Qt=ze(Ut,2),Fe=Qt[0],Ge=Qt[1];NH(z,re,function(jt,nn){return ft(jt,nn)?!1:(Fe({preventDefault:function(){},deltaY:jt}),!0)}),si(function(){function jt(nn){z&&nn.preventDefault()}return re.current.addEventListener("wheel",Fe),re.current.addEventListener("DOMMouseScroll",Ge),re.current.addEventListener("MozMousePixelScroll",jt),function(){re.current&&(re.current.removeEventListener("wheel",Fe),re.current.removeEventListener("DOMMouseScroll",Ge),re.current.removeEventListener("MozMousePixelScroll",jt))}},[z]);var Xt=PH(re,ge,pt,c,ye,ct,Te,function(){var jt;(jt=oe.current)===null||jt===void 0||jt.delayHidden()});C.exports.useImperativeHandle(t,function(){return{scrollTo:Xt}}),si(function(){if(M){var jt=ge.slice(mt,Mt+1);M(jt,ge)}},[mt,Mt,ge]);var dn=EH(ge,mt,Mt,Ue,b,Re),Vt=null;return l&&(Vt=ve(se({},h?"height":"maxHeight",l),zH),z&&(Vt.overflowY="hidden",J&&(Vt.pointerEvents="none"))),Qe("div",{style:ve(ve({},p),{},{position:"relative"}),className:Q,...N,children:[E(A,{className:"".concat(r,"-holder"),style:Vt,ref:re,onScroll:Wt,children:E(YR,{prefixCls:r,height:Pt,offset:Ct,onInnerResize:ct,ref:de,innerProps:R,children:dn})}),z&&E(CH,{ref:oe,prefixCls:r,scrollTop:H,height:l,scrollHeight:Pt,count:ge.length,onScroll:xt,onStartMove:function(){Z(!0)},onStopMove:function(){Z(!1)}})]})}var i4=C.exports.forwardRef(FH);i4.displayName="List";function $H(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var JR=C.exports.createContext(null),BH=["disabled","title","children","style","className"];function p5(e){return typeof e=="string"||typeof e=="number"}var VH=function(t,n){var r=ER(),i=r.prefixCls,l=r.id,c=r.open,o=r.multiple,h=r.mode,p=r.searchValue,g=r.toggleOpen,b=r.notFoundContent,w=r.onPopupScroll,P=C.exports.useContext(JR),I=P.flattenOptions,A=P.onActiveValue,O=P.defaultActiveFirstOption,M=P.onSelect,R=P.menuItemSelectedIcon,N=P.rawValues,z=P.fieldNames,B=P.virtual,U=P.listHeight,q=P.listItemHeight,H="".concat(i,"-item"),te=Kp(function(){return I},[c,I],function(Me,Ne){return Ne[0]&&Me[1]!==Ne[1]}),Y=C.exports.useRef(null),le=function(Ne){Ne.preventDefault()},J=function(Ne){Y.current&&Y.current.scrollTo(typeof Ne=="number"?{index:Ne}:Ne)},Z=function(Ne){for(var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ve=te.length,qe=0;qe<Ve;qe+=1){var Ue=(Ne+qe*Le+Ve)%Ve,ct=te[Ue],pt=ct.group,Tt=ct.data;if(!pt&&!Tt.disabled)return Ue}return-1},Q=C.exports.useState(function(){return Z(0)}),ge=ze(Q,2),re=ge[0],de=ge[1],oe=function(Ne){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;de(Ne);var Ve={source:Le?"keyboard":"mouse"},qe=te[Ne];if(!qe){A(null,-1,Ve);return}A(qe.value,Ne,Ve)};C.exports.useEffect(function(){oe(O!==!1?Z(0):-1)},[te.length,p]);var ye=C.exports.useCallback(function(Me){return N.has(Me)&&h!=="combobox"},[h,wt(N).toString(),N.size]);C.exports.useEffect(function(){var Me=setTimeout(function(){if(!o&&c&&N.size===1){var Le=Array.from(N)[0],Ve=te.findIndex(function(qe){var Ue=qe.data;return Ue.value===Le});Ve!==-1&&(oe(Ve),J(Ve))}});if(c){var Ne;(Ne=Y.current)===null||Ne===void 0||Ne.scrollTo(void 0)}return function(){return clearTimeout(Me)}},[c,p]);var Re=function(Ne){Ne!==void 0&&M(Ne,{selected:!N.has(Ne)}),o||g(!1)};if(C.exports.useImperativeHandle(n,function(){return{onKeyDown:function(Ne){var Le=Ne.which,Ve=Ne.ctrlKey;switch(Le){case Et.N:case Et.P:case Et.UP:case Et.DOWN:{var qe=0;if(Le===Et.UP?qe=-1:Le===Et.DOWN?qe=1:$H()&&Ve&&(Le===Et.N?qe=1:Le===Et.P&&(qe=-1)),qe!==0){var Ue=Z(re+qe,qe);J(Ue),oe(Ue,!0)}break}case Et.ENTER:{var ct=te[re];ct&&!ct.data.disabled?Re(ct.value):Re(void 0),c&&Ne.preventDefault();break}case Et.ESC:g(!1),c&&Ne.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Ne){J(Ne)}}}),te.length===0)return E("div",{role:"listbox",id:"".concat(l,"_list"),className:"".concat(H,"-empty"),onMouseDown:le,children:b});var Te=Object.keys(z).map(function(Me){return z[Me]}),ke=function(Ne){return Ne.label},De=function(Ne){var Le=te[Ne];if(!Le)return null;var Ve=Le.data||{},qe=Ve.value,Ue=Le.group,ct=au(Ve,!0),pt=ke(Le);return Le?C.exports.createElement("div",{"aria-label":typeof pt=="string"&&!Ue?pt:null,...ct,key:Ne,role:Ue?"presentation":"option",id:"".concat(l,"_list_").concat(Ne),"aria-selected":ye(qe)},qe):null};return Qe($n,{children:[Qe("div",{role:"listbox",id:"".concat(l,"_list"),style:{height:0,width:0,overflow:"hidden"},children:[De(re-1),De(re),De(re+1)]}),E(i4,{itemKey:"key",ref:Y,data:te,height:U,itemHeight:q,fullHeight:!1,onMouseDown:le,onScroll:w,virtual:B,children:function(Me,Ne){var Le,Ve=Me.group,qe=Me.groupOption,Ue=Me.data,ct=Me.label,pt=Me.value,Tt=Ue.key;if(Ve){var Xe,Pt=(Xe=Ue.title)!==null&&Xe!==void 0?Xe:p5(ct)?ct.toString():void 0;return E("div",{className:Ye(H,"".concat(H,"-group")),title:Pt,children:ct!==void 0?ct:Tt})}var mt=Ue.disabled,Mt=Ue.title;Ue.children;var Ct=Ue.style,Lt=Ue.className,lt=In(Ue,BH),dt=mi(lt,Te),ut=ye(pt),it="".concat(H,"-option"),ft=Ye(H,it,Lt,(Le={},se(Le,"".concat(it,"-grouped"),qe),se(Le,"".concat(it,"-active"),re===Ne&&!mt),se(Le,"".concat(it,"-disabled"),mt),se(Le,"".concat(it,"-selected"),ut),Le)),xt=ke(Me),Wt=!R||typeof R=="function"||ut,Ut=typeof xt=="number"?xt:xt||pt,Qt=p5(Ut)?Ut.toString():void 0;return Mt!==void 0&&(Qt=Mt),Qe("div",{...au(dt),"aria-selected":ut,className:ft,title:Qt,onMouseMove:function(){re===Ne||mt||oe(Ne)},onClick:function(){mt||Re(pt)},style:Ct,children:[E("div",{className:"".concat(it,"-content"),children:Ut}),C.exports.isValidElement(R)||ut,Wt&&E(gy,{className:"".concat(H,"-option-state"),customizeIcon:R,customizeIconProps:{isSelected:ut},children:ut?"\u2713":null})]})}})]})},e7=C.exports.forwardRef(VH);e7.displayName="OptionList";var UH=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"],jH=["inputValue"];function KH(e){return!e||sn(e)!=="object"}var HH=C.exports.forwardRef(function(e,t){var n=e.id,r=e.mode,i=e.prefixCls,l=i===void 0?"rc-select":i,c=e.backfill,o=e.fieldNames,h=e.inputValue,p=e.searchValue,g=e.onSearch,b=e.autoClearSearchValue,w=b===void 0?!0:b,P=e.onSelect,I=e.onDeselect,A=e.dropdownMatchSelectWidth,O=A===void 0?!0:A,M=e.filterOption,R=e.filterSort,N=e.optionFilterProp,z=e.optionLabelProp,B=e.options,U=e.children,q=e.defaultActiveFirstOption,H=e.menuItemSelectedIcon,te=e.virtual,Y=e.listHeight,le=Y===void 0?200:Y,J=e.listItemHeight,Z=J===void 0?20:J,Q=e.value,ge=e.defaultValue,re=e.labelInValue,de=e.onChange,oe=In(e,UH),ye=ZR(n),Re=P2(r),Te=!!(!B&&U),ke=C.exports.useMemo(function(){return M===void 0&&r==="combobox"?!1:M},[M,r]),De=C.exports.useMemo(function(){return GR(o,Te)},[JSON.stringify(o),Te]),Me=Vi("",{value:p!==void 0?p:h,postState:function(ht){return ht||""}}),Ne=ze(Me,2),Le=Ne[0],Ve=Ne[1],qe=bH(B,U,De,N,z),Ue=qe.valueOptions,ct=qe.labelOptions,pt=qe.options,Tt=C.exports.useCallback(function(ot){var ht=MR(ot);return ht.map(function(At){var $t,cn,Mn,Gn,qn;if(KH(At))$t=At;else{var me;Mn=At.key,cn=At.label,$t=(me=At.value)!==null&&me!==void 0?me:Mn}var K=Ue.get($t);if(K){var G;cn===void 0&&(cn=K==null?void 0:K[z||De.label]),Mn===void 0&&(Mn=(G=K==null?void 0:K.key)!==null&&G!==void 0?G:$t),Gn=K==null?void 0:K.disabled,qn=K==null?void 0:K.title}return{label:cn,value:$t,key:Mn,disabled:Gn,title:qn}})},[De,z,Ue]),Xe=Vi(ge,{value:Q}),Pt=ze(Xe,2),mt=Pt[0],Mt=Pt[1],Ct=C.exports.useMemo(function(){var ot,ht=Tt(mt);return r==="combobox"&&!((ot=ht[0])!==null&&ot!==void 0&&ot.value)?[]:ht},[mt,Tt,r]),Lt=pH(Ct,Ue),lt=ze(Lt,2),dt=lt[0],ut=lt[1],it=C.exports.useMemo(function(){if(!r&&dt.length===1){var ot=dt[0];if(ot.value===null&&(ot.label===null||ot.label===void 0))return[]}return dt.map(function(ht){var At;return ve(ve({},ht),{},{label:(At=ht.label)!==null&&At!==void 0?At:ht.value})})},[r,dt]),ft=C.exports.useMemo(function(){return new Set(dt.map(function(ot){return ot.value}))},[dt]);C.exports.useEffect(function(){if(r==="combobox"){var ot,ht=(ot=dt[0])===null||ot===void 0?void 0:ot.value;Ve(dK(ht)?String(ht):"")}},[dt]);var xt=f5(function(ot,ht){var At,$t=ht!=null?ht:ot;return At={},se(At,De.value,ot),se(At,De.label,$t),At}),Wt=C.exports.useMemo(function(){if(r!=="tags")return pt;var ot=wt(pt),ht=function($t){return Ue.has($t)};return wt(dt).sort(function(At,$t){return At.value<$t.value?-1:1}).forEach(function(At){var $t=At.value;ht($t)||ot.push(xt($t,At.label))}),ot},[xt,pt,Ue,dt,r]),Ut=mH(Wt,De,Le,ke,N),Qt=C.exports.useMemo(function(){return r!=="tags"||!Le||Ut.some(function(ot){return ot[N||"value"]===Le})?Ut:[xt(Le)].concat(wt(Ut))},[xt,N,r,Ut,Le]),Fe=C.exports.useMemo(function(){return R?wt(Qt).sort(function(ot,ht){return R(ot,ht)}):Qt},[Qt,R]),Ge=C.exports.useMemo(function(){return cH(Fe,{fieldNames:De,childrenAsData:Te})},[Fe,De,Te]),Xt=function(ht){var At=Tt(ht);if(Mt(At),de&&(At.length!==dt.length||At.some(function(Mn,Gn){var qn;return((qn=dt[Gn])===null||qn===void 0?void 0:qn.value)!==(Mn==null?void 0:Mn.value)}))){var $t=re?At:At.map(function(Mn){return Mn.value}),cn=At.map(function(Mn){return T2(ut(Mn.value))});de(Re?$t:$t[0],Re?cn:cn[0])}},dn=C.exports.useState(null),Vt=ze(dn,2),jt=Vt[0],nn=Vt[1],_n=C.exports.useState(0),An=ze(_n,2),_t=An[0],Gt=An[1],an=q!==void 0?q:r!=="combobox",Fn=C.exports.useCallback(function(ot,ht){var At=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},$t=At.source,cn=$t===void 0?"keyboard":$t;Gt(ht),c&&r==="combobox"&&ot!==null&&cn==="keyboard"&&nn(String(ot))},[c,r]),kn=function(ht,At,$t){var cn=function(){var Ee,be=ut(ht);return[re?{label:be==null?void 0:be[De.label],value:ht,key:(Ee=be==null?void 0:be.key)!==null&&Ee!==void 0?Ee:ht}:ht,T2(be)]};if(At&&P){var Mn=cn(),Gn=ze(Mn,2),qn=Gn[0],me=Gn[1];P(qn,me)}else if(!At&&I&&$t!=="clear"){var K=cn(),G=ze(K,2),ce=G[0],ae=G[1];I(ce,ae)}},zt=f5(function(ot,ht){var At,$t=Re?ht.selected:!0;$t?At=Re?[].concat(wt(dt),[ot]):[ot]:At=dt.filter(function(cn){return cn.value!==ot}),Xt(At),kn(ot,$t),r==="combobox"?nn(""):(!P2||w)&&(Ve(""),nn(""))}),Tn=function(ht,At){Xt(ht);var $t=At.type,cn=At.values;($t==="remove"||$t==="clear")&&cn.forEach(function(Mn){kn(Mn.value,!1,$t)})},Cn=function(ht,At){if(Ve(ht),nn(null),At.source==="submit"){var $t=(ht||"").trim();if($t){var cn=Array.from(new Set([].concat(wt(ft),[$t])));Xt(cn),kn($t,!0),Ve("")}return}At.source!=="blur"&&(r==="combobox"&&Xt(ht),g==null||g(ht))},hn=function(ht){var At=ht;r!=="tags"&&(At=ht.map(function(cn){var Mn=ct.get(cn);return Mn==null?void 0:Mn.value}).filter(function(cn){return cn!==void 0}));var $t=Array.from(new Set([].concat(wt(ft),wt(At))));Xt($t),$t.forEach(function(cn){kn(cn,!0)})},Nt=C.exports.useMemo(function(){var ot=te!==!1&&O!==!1;return ve(ve({},qe),{},{flattenOptions:Ge,onActiveValue:Fn,defaultActiveFirstOption:an,onSelect:zt,menuItemSelectedIcon:H,rawValues:ft,fieldNames:De,virtual:ot,listHeight:le,listItemHeight:Z,childrenAsData:Te})},[qe,Ge,Fn,an,zt,H,ft,De,te,O,le,Z,Te]);return E(JR.Provider,{value:Nt,children:E(qR,{...oe,id:ye,prefixCls:l,ref:t,omitDomProps:jH,mode:r,displayValues:it,onDisplayValuesChange:Tn,searchValue:Le,onSearch:Cn,autoClearSearchValue:w,onSearchSplit:hn,dropdownMatchSelectWidth:O,OptionList:e7,emptyOptions:!Ge.length,activeValue:jt,activeDescendantId:"".concat(ye,"_list_").concat(_t)})})}),o4=HH;o4.Option=r4;o4.OptGroup=n4;var WH=function(){var t=C.exports.useContext(Nn),n=t.getPrefixCls,r=n("empty-img-default");return E("svg",{className:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg",children:Qe("g",{fill:"none",fillRule:"evenodd",children:[Qe("g",{transform:"translate(24 31.67)",children:[E("ellipse",{className:"".concat(r,"-ellipse"),cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),E("path",{className:"".concat(r,"-path-1"),d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"}),E("path",{className:"".concat(r,"-path-2"),d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",transform:"translate(13.56)"}),E("path",{className:"".concat(r,"-path-3"),d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"}),E("path",{className:"".concat(r,"-path-4"),d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"})]}),E("path",{className:"".concat(r,"-path-5"),d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"}),Qe("g",{className:"".concat(r,"-g"),transform:"translate(149.65 15.383)",children:[E("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),E("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"})]})]})})};const GH=WH;var qH=function(){var t=C.exports.useContext(Nn),n=t.getPrefixCls,r=n("empty-img-simple");return E("svg",{className:r,width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:Qe("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd",children:[E("ellipse",{className:"".concat(r,"-ellipse"),cx:"32",cy:"33",rx:"32",ry:"7"}),Qe("g",{className:"".concat(r,"-g"),fillRule:"nonzero",children:[E("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),E("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",className:"".concat(r,"-path")})]})]})})};const ZH=qH;var XH=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},t7=E(GH,{}),n7=E(ZH,{}),a4=function(t){var n=t.className,r=t.prefixCls,i=t.image,l=i===void 0?t7:i,c=t.description,o=t.children,h=t.imageStyle,p=XH(t,["className","prefixCls","image","description","children","imageStyle"]),g=C.exports.useContext(Nn),b=g.getPrefixCls,w=g.direction;return E(Wp,{componentName:"Empty",children:function(P){var I,A=b("empty",r),O=typeof c<"u"?c:P.description,M=typeof O=="string"?O:"empty",R=null;return typeof l=="string"?R=E("img",{alt:M,src:l}):R=l,Qe("div",{className:Ye(A,(I={},se(I,"".concat(A,"-normal"),l===n7),se(I,"".concat(A,"-rtl"),w==="rtl"),I),n),...p,children:[E("div",{className:"".concat(A,"-image"),style:h,children:R}),O&&E("div",{className:"".concat(A,"-description"),children:O}),o&&E("div",{className:"".concat(A,"-footer"),children:o})]})}})};a4.PRESENTED_IMAGE_DEFAULT=t7;a4.PRESENTED_IMAGE_SIMPLE=n7;const ss=a4;var YH=function(t){return E(hu,{children:function(n){var r=n.getPrefixCls,i=r("empty");switch(t){case"Table":case"List":return E(ss,{image:ss.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return E(ss,{image:ss.PRESENTED_IMAGE_SIMPLE,className:"".concat(i,"-small")});default:return E(ss,{})}}})};const s4=YH;var su=C.exports.createContext({labelAlign:"right",vertical:!1,itemRef:function(){}}),r7=C.exports.createContext(null),QH=function(t){var n=mi(t,["prefixCls"]);return E(zC,{...n})},l4=C.exports.createContext({prefixCls:""}),Yo=C.exports.createContext({}),I2=function(t){var n=t.children,r=t.status,i=t.override,l=C.exports.useContext(Yo),c=C.exports.useMemo(function(){var o=tt({},l);return i&&delete o.isFormItemInput,r&&(delete o.status,delete o.hasFeedback,delete o.feedbackIcon),o},[r,i,l]);return E(Yo.Provider,{value:c,children:n})},ra=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n},JH=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n},c_=function(){return{height:0,opacity:0}},m5=function(t){var n=t.scrollHeight;return{height:n,opacity:1}},eW=function(t){return{height:t?t.offsetHeight:0}},d_=function(t,n){return(n==null?void 0:n.deadline)===!0||n.propertyName==="height"},tW={motionName:"ant-motion-collapse",onAppearStart:c_,onEnterStart:c_,onAppearActive:m5,onEnterActive:m5,onLeaveStart:eW,onLeaveActive:c_,onAppearEnd:d_,onEnterEnd:d_,onLeaveEnd:d_,motionDeadline:500};ra("bottomLeft","bottomRight","topLeft","topRight");var i7=function(t){return t!==void 0&&(t==="topLeft"||t==="topRight")?"slide-down":"slide-up"},el=function(t,n,r){return r!==void 0?r:"".concat(t,"-").concat(n)};const Ap=tW;ra("warning","error","");function eu(e,t,n){var r;return Ye((r={},se(r,"".concat(e,"-status-success"),t==="success"),se(r,"".concat(e,"-status-warning"),t==="warning"),se(r,"".concat(e,"-status-error"),t==="error"),se(r,"".concat(e,"-status-validating"),t==="validating"),se(r,"".concat(e,"-has-feedback"),n),r))}var Xp=function(t,n){return n||t},nW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"};const rW=nW;var o7=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:rW})})};o7.displayName="CheckOutlined";const a7=C.exports.forwardRef(o7);var iW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};const oW=iW;var s7=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:oW})})};s7.displayName="DownOutlined";const l7=C.exports.forwardRef(s7);var aW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"};const u7=aW;var c7=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:u7})})};c7.displayName="SearchOutlined";const u4=C.exports.forwardRef(c7);function d7(e){var t=e.suffixIcon,n=e.clearIcon,r=e.menuItemSelectedIcon,i=e.removeIcon,l=e.loading,c=e.multiple,o=e.hasFeedback,h=e.prefixCls,p=e.showArrow,g=e.feedbackIcon,b=n!=null?n:E(kc,{}),w=function(R){return Qe($n,{children:[p!==!1&&R,o&&g]})},P=null;if(t!==void 0)P=w(t);else if(l)P=w(E(qd,{spin:!0}));else{var I="".concat(h,"-suffix");P=function(R){var N=R.open,z=R.showSearch;return w(N&&z?E(u4,{className:I}):E(l7,{className:I}))}}var A=null;r!==void 0?A=r:c?A=E(a7,{}):A=null;var O=null;return i!==void 0?O=i:O=E(I0,{}),{clearIcon:b,suffixIcon:P,itemIcon:A,removeIcon:O}}var f7=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},N0=C.exports.createContext(null),ff=function(t,n){var r=C.exports.useContext(N0),i=C.exports.useMemo(function(){var l;if(!r)return"";var c=r.compactDirection,o=r.isFirstItem,h=r.isLastItem,p=c==="vertical"?"-vertical-":"-";return Ye((l={},se(l,"".concat(t,"-compact").concat(p,"item"),!0),se(l,"".concat(t,"-compact").concat(p,"first-item"),o),se(l,"".concat(t,"-compact").concat(p,"last-item"),h),se(l,"".concat(t,"-compact").concat(p,"item-rtl"),n==="rtl"),l))},[t,n,r]);return{compactSize:r==null?void 0:r.compactSize,compactDirection:r==null?void 0:r.compactDirection,compactItemClassnames:i}},xy=function(t){var n=t.children;return E(N0.Provider,{value:null,children:n})},sW=function(t){var n=t.children,r=f7(t,["children"]);return E(N0.Provider,{value:r,children:n})},lW=function(t){var n,r=C.exports.useContext(Nn),i=r.getPrefixCls,l=r.direction,c=t.size,o=c===void 0?"middle":c,h=t.direction,p=t.block,g=t.prefixCls,b=t.className,w=t.children,P=f7(t,["size","direction","block","prefixCls","className","children"]),I=i("space-compact",g),A=Ye(I,(n={},se(n,"".concat(I,"-rtl"),l==="rtl"),se(n,"".concat(I,"-block"),p),se(n,"".concat(I,"-vertical"),h==="vertical"),n),b),O=C.exports.useContext(N0),M=Xi(w),R=C.exports.useMemo(function(){return M.map(function(N,z){var B=N&&N.key||"".concat(I,"-item-").concat(z);return E(sW,{compactSize:o,compactDirection:h,isFirstItem:z===0&&(!O||(O==null?void 0:O.isFirstItem)),isLastItem:z===M.length-1&&(!O||(O==null?void 0:O.isLastItem)),children:N},B)})},[o,M,O]);return M.length===0?null:E("div",{className:A,...P,children:R})},uW=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},h7="SECRET_COMBOBOX_MODE_DO_NOT_USE",cW=function(t,n){var r,i=t.prefixCls,l=t.bordered,c=l===void 0?!0:l,o=t.className,h=t.getPopupContainer,p=t.dropdownClassName,g=t.popupClassName,b=t.listHeight,w=b===void 0?256:b,P=t.placement,I=t.listItemHeight,A=I===void 0?24:I,O=t.size,M=t.disabled,R=t.notFoundContent,N=t.status,z=t.showArrow,B=uW(t,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","popupClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","showArrow"]),U=C.exports.useContext(Nn),q=U.getPopupContainer,H=U.getPrefixCls,te=U.renderEmpty,Y=U.direction,le=U.virtual,J=U.dropdownMatchSelectWidth,Z=C.exports.useContext(ms),Q=H("select",i),ge=H(),re=ff(Q,Y),de=re.compactSize,oe=re.compactItemClassnames,ye=C.exports.useMemo(function(){var ut=B.mode;if(ut!=="combobox")return ut===h7?"combobox":ut},[B.mode]),Re=ye==="multiple"||ye==="tags",Te=z!==void 0?z:B.loading||!(Re||ye==="combobox"),ke=C.exports.useContext(Yo),De=ke.status,Me=ke.hasFeedback,Ne=ke.isFormItemInput,Le=ke.feedbackIcon,Ve=Xp(De,N),qe;R!==void 0?qe=R:ye==="combobox"?qe=null:qe=(te||s4)("Select");var Ue=d7(tt(tt({},B),{multiple:Re,hasFeedback:Me,feedbackIcon:Le,showArrow:Te,prefixCls:Q})),ct=Ue.suffixIcon,pt=Ue.itemIcon,Tt=Ue.removeIcon,Xe=Ue.clearIcon,Pt=mi(B,["suffixIcon","itemIcon"]),mt=Ye(g||p,se({},"".concat(Q,"-dropdown-").concat(Y),Y==="rtl")),Mt=de||O||Z,Ct=C.exports.useContext(pu),Lt=M!=null?M:Ct,lt=Ye((r={},se(r,"".concat(Q,"-lg"),Mt==="large"),se(r,"".concat(Q,"-sm"),Mt==="small"),se(r,"".concat(Q,"-rtl"),Y==="rtl"),se(r,"".concat(Q,"-borderless"),!c),se(r,"".concat(Q,"-in-form-item"),Ne),r),eu(Q,Ve,Me),oe,o),dt=function(){return P!==void 0?P:Y==="rtl"?"bottomRight":"bottomLeft"};return E(o4,{ref:n,virtual:le,dropdownMatchSelectWidth:J,...Pt,transitionName:el(ge,i7(P),B.transitionName),listHeight:w,listItemHeight:A,mode:ye,prefixCls:Q,placement:dt(),direction:Y,inputIcon:ct,menuItemSelectedIcon:pt,removeIcon:Tt,clearIcon:Xe,notFoundContent:qe,className:lt,getPopupContainer:h||q,dropdownClassName:mt,showArrow:Me||z,disabled:Lt})},D0=C.exports.forwardRef(cW);D0.SECRET_COMBOBOX_MODE_DO_NOT_USE=h7;D0.Option=r4;D0.OptGroup=n4;const tl=D0;var M2=tl.Option;function v5(e){return e&&e.type&&(e.type.isSelectOption||e.type.isSelectOptGroup)}var dW=function(t,n){var r=t.prefixCls,i=t.className,l=t.popupClassName,c=t.dropdownClassName,o=t.children,h=t.dataSource,p=Xi(o),g;if(p.length===1&&Do(p[0])&&!v5(p[0])){var b=ze(p,1);g=b[0]}var w=g?function(){return g}:void 0,P;return p.length&&v5(p[0])?P=o:P=h?h.map(function(I){if(Do(I))return I;switch(sn(I)){case"string":return E(M2,{value:I,children:I},I);case"object":{var A=I.value;return E(M2,{value:A,children:I.text},A)}default:return}}):[],E(hu,{children:function(I){var A=I.getPrefixCls,O=A("select",r);return E(tl,{ref:n,...mi(t,["dataSource"]),prefixCls:O,popupClassName:l||c,className:Ye("".concat(O,"-auto-complete"),i),mode:tl.SECRET_COMBOBOX_MODE_DO_NOT_USE,getInputElement:w,children:P})}})},p7=C.exports.forwardRef(dW);p7.Option=M2;const fW=p7;function m7(){var e=C.exports.useReducer(function(r){return r+1},0),t=ze(e,2),n=t[1];return n}var _y=["xxl","xl","lg","md","sm","xs"],Xv={xs:"(max-width: 575px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)",xxl:"(min-width: 1600px)"},Wu=new Map,f_=-1,Yv={},hW={matchHandlers:{},dispatch:function(t){return Yv=t,Wu.forEach(function(n){return n(Yv)}),Wu.size>=1},subscribe:function(t){return Wu.size||this.register(),f_+=1,Wu.set(f_,t),t(Yv),f_},unsubscribe:function(t){Wu.delete(t),Wu.size||this.unregister()},unregister:function(){var t=this;Object.keys(Xv).forEach(function(n){var r=Xv[n],i=t.matchHandlers[r];i==null||i.mql.removeListener(i==null?void 0:i.listener)}),Wu.clear()},register:function(){var t=this;Object.keys(Xv).forEach(function(n){var r=Xv[n],i=function(o){var h=o.matches;t.dispatch(tt(tt({},Yv),se({},n,h)))},l=window.matchMedia(r);l.addListener(i),t.matchHandlers[r]={mql:l,listener:i},i(l)})}};const by=hW;function v7(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=C.exports.useRef({}),n=m7();return C.exports.useEffect(function(){var r=by.subscribe(function(i){t.current=i,e&&n()});return function(){return by.unsubscribe(r)}},[]),t.current}var da={adjustX:1,adjustY:1},fa=[0,0],g7={left:{points:["cr","cl"],overflow:da,offset:[-4,0],targetOffset:fa},right:{points:["cl","cr"],overflow:da,offset:[4,0],targetOffset:fa},top:{points:["bc","tc"],overflow:da,offset:[0,-4],targetOffset:fa},bottom:{points:["tc","bc"],overflow:da,offset:[0,4],targetOffset:fa},topLeft:{points:["bl","tl"],overflow:da,offset:[0,-4],targetOffset:fa},leftTop:{points:["tr","tl"],overflow:da,offset:[-4,0],targetOffset:fa},topRight:{points:["br","tr"],overflow:da,offset:[0,-4],targetOffset:fa},rightTop:{points:["tl","tr"],overflow:da,offset:[4,0],targetOffset:fa},bottomRight:{points:["tr","br"],overflow:da,offset:[0,4],targetOffset:fa},rightBottom:{points:["bl","br"],overflow:da,offset:[4,0],targetOffset:fa},bottomLeft:{points:["tl","bl"],overflow:da,offset:[0,4],targetOffset:fa},leftBottom:{points:["br","bl"],overflow:da,offset:[-4,0],targetOffset:fa}};function pW(e){var t=e.showArrow,n=e.arrowContent,r=e.children,i=e.prefixCls,l=e.id,c=e.overlayInnerStyle,o=e.className,h=e.style;return Qe("div",{className:Ye("".concat(i,"-content"),o),style:h,children:[t!==!1&&E("div",{className:"".concat(i,"-arrow"),children:n},"arrow"),E("div",{className:"".concat(i,"-inner"),id:l,role:"tooltip",style:c,children:typeof r=="function"?r():r})]})}var mW=function(t,n){var r=t.overlayClassName,i=t.trigger,l=i===void 0?["hover"]:i,c=t.mouseEnterDelay,o=c===void 0?0:c,h=t.mouseLeaveDelay,p=h===void 0?.1:h,g=t.overlayStyle,b=t.prefixCls,w=b===void 0?"rc-tooltip":b,P=t.children,I=t.onVisibleChange,A=t.afterVisibleChange,O=t.transitionName,M=t.animation,R=t.motion,N=t.placement,z=N===void 0?"right":N,B=t.align,U=B===void 0?{}:B,q=t.destroyTooltipOnHide,H=q===void 0?!1:q,te=t.defaultVisible,Y=t.getTooltipContainer,le=t.overlayInnerStyle,J=t.arrowContent,Z=t.overlay,Q=t.id,ge=t.showArrow,re=In(t,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"]),de=C.exports.useRef(null);C.exports.useImperativeHandle(n,function(){return de.current});var oe=ve({},re);"visible"in t&&(oe.popupVisible=t.visible);var ye=function(){return E(pW,{showArrow:ge,arrowContent:J,prefixCls:w,id:Q,overlayInnerStyle:le,children:Z},"content")},Re=!1,Te=!1;if(typeof H=="boolean")Re=H;else if(H&&sn(H)==="object"){var ke=H.keepParent;Re=ke===!0,Te=ke===!1}return E(O0,{popupClassName:r,prefixCls:w,popup:ye,action:l,builtinPlacements:g7,popupPlacement:z,ref:de,popupAlign:U,getPopupContainer:Y,onPopupVisibleChange:I,afterPopupVisibleChange:A,popupTransitionName:O,popupAnimation:M,popupMotion:R,defaultPopupVisible:te,destroyPopupOnHide:Re,autoDestroy:Te,mouseLeaveDelay:p,popupStyle:g,mouseEnterDelay:o,...oe,children:P})};const vW=C.exports.forwardRef(mW);ra("success","processing","error","default","warning");var gW=ra("pink","red","yellow","orange","cyan","green","blue","purple","geekblue","magenta","volcano","gold","lime"),yW={adjustX:1,adjustY:1},g5={adjustX:0,adjustY:0},xW=[0,0];function y5(e){return typeof e=="boolean"?e?yW:g5:tt(tt({},g5),e)}function y7(e){var t=e.arrowWidth,n=t===void 0?4:t,r=e.horizontalArrowShift,i=r===void 0?16:r,l=e.verticalArrowShift,c=l===void 0?8:l,o=e.autoAdjustOverflow,h=e.arrowPointAtCenter,p={left:{points:["cr","cl"],offset:[-4,0]},right:{points:["cl","cr"],offset:[4,0]},top:{points:["bc","tc"],offset:[0,-4]},bottom:{points:["tc","bc"],offset:[0,4]},topLeft:{points:["bl","tc"],offset:[-(i+n),-4]},leftTop:{points:["tr","cl"],offset:[-4,-(c+n)]},topRight:{points:["br","tc"],offset:[i+n,-4]},rightTop:{points:["tl","cr"],offset:[4,-(c+n)]},bottomRight:{points:["tr","bc"],offset:[i+n,4]},rightBottom:{points:["bl","cr"],offset:[4,c+n]},bottomLeft:{points:["tl","bc"],offset:[-(i+n),4]},leftBottom:{points:["br","cl"],offset:[-4,c+n]}};return Object.keys(p).forEach(function(g){p[g]=h?tt(tt({},p[g]),{overflow:y5(o),targetOffset:xW}):tt(tt({},g7[g]),{overflow:y5(o)}),p[g].ignoreShake=!0}),p}var _W=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},bW=function(t,n){var r={},i=tt({},t);return n.forEach(function(l){t&&l in t&&(r[l]=t[l],delete i[l])}),{picked:r,omitted:i}},x5=new RegExp("^(".concat(gW.join("|"),")(-inverse)?$"));function wW(e,t){var n=e.type;if((n.__ANT_BUTTON===!0||e.type==="button")&&e.props.disabled||n.__ANT_SWITCH===!0&&(e.props.disabled||e.props.loading)||n.__ANT_RADIO===!0&&e.props.disabled){var r=bW(e.props.style,["position","left","right","top","bottom","float","display","zIndex"]),i=r.picked,l=r.omitted,c=tt(tt({display:"inline-block"},i),{cursor:"not-allowed",width:e.props.block?"100%":void 0}),o=tt(tt({},l),{pointerEvents:"none"}),h=Ei(e,{style:o,className:null});return E("span",{style:c,className:Ye(e.props.className,"".concat(t,"-disabled-compatible-wrapper")),children:h})}return e}var CW=C.exports.forwardRef(function(e,t){var n,r=C.exports.useContext(Nn),i=r.getPopupContainer,l=r.getPrefixCls,c=r.direction,o=Vi(!1,{value:e.open!==void 0?e.open:e.visible,defaultValue:e.defaultOpen!==void 0?e.defaultOpen:e.defaultVisible}),h=ze(o,2),p=h[0],g=h[1],b=function(){var Ne=e.title,Le=e.overlay;return!Ne&&!Le&&Ne!==0},w=function(Ne){var Le,Ve;g(b()?!1:Ne),b()||((Le=e.onOpenChange)===null||Le===void 0||Le.call(e,Ne),(Ve=e.onVisibleChange)===null||Ve===void 0||Ve.call(e,Ne))},P=function(){var Ne=e.builtinPlacements,Le=e.arrowPointAtCenter,Ve=Le===void 0?!1:Le,qe=e.autoAdjustOverflow,Ue=qe===void 0?!0:qe;return Ne||y7({arrowPointAtCenter:Ve,autoAdjustOverflow:Ue})},I=function(Ne,Le){var Ve=P(),qe=Object.keys(Ve).find(function(pt){var Tt,Xe;return Ve[pt].points[0]===((Tt=Le.points)===null||Tt===void 0?void 0:Tt[0])&&Ve[pt].points[1]===((Xe=Le.points)===null||Xe===void 0?void 0:Xe[1])});if(!!qe){var Ue=Ne.getBoundingClientRect(),ct={top:"50%",left:"50%"};/top|Bottom/.test(qe)?ct.top="".concat(Ue.height-Le.offset[1],"px"):/Top|bottom/.test(qe)&&(ct.top="".concat(-Le.offset[1],"px")),/left|Right/.test(qe)?ct.left="".concat(Ue.width-Le.offset[0],"px"):/right|Left/.test(qe)&&(ct.left="".concat(-Le.offset[0],"px")),Ne.style.transformOrigin="".concat(ct.left," ").concat(ct.top)}},A=function(){var Ne=e.title,Le=e.overlay;return Ne===0?Ne:Le||Ne||""},O=e.getPopupContainer,M=e.placement,R=M===void 0?"top":M,N=e.mouseEnterDelay,z=N===void 0?.1:N,B=e.mouseLeaveDelay,U=B===void 0?.1:B,q=_W(e,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay"]),H=e.prefixCls,te=e.openClassName,Y=e.getTooltipContainer,le=e.overlayClassName,J=e.color,Z=e.overlayInnerStyle,Q=e.children,ge=l("tooltip",H),re=l(),de=p;!("open"in e)&&!("visible"in e)&&b()&&(de=!1);var oe=wW(Do(Q)&&!_R(Q)?Q:E("span",{children:Q}),ge),ye=oe.props,Re=!ye.className||typeof ye.className=="string"?Ye(ye.className,se({},te||"".concat(ge,"-open"),!0)):ye.className,Te=Ye(le,(n={},se(n,"".concat(ge,"-rtl"),c==="rtl"),se(n,"".concat(ge,"-").concat(J),J&&x5.test(J)),n)),ke=Z,De={};return J&&!x5.test(J)&&(ke=tt(tt({},Z),{background:J}),De={"--antd-arrow-background-color":J}),E(vW,{...q,placement:R,mouseEnterDelay:z,mouseLeaveDelay:U,prefixCls:ge,overlayClassName:Te,getTooltipContainer:O||Y||i,ref:t,builtinPlacements:P(),overlay:A(),visible:de,onVisibleChange:w,onPopupAlign:I,overlayInnerStyle:ke,arrowContent:E("span",{className:"".concat(ge,"-arrow-content"),style:De}),motion:{motionName:el(re,"zoom-big-fast",e.transitionName),motionDeadline:1e3},children:de?Ei(oe,{className:Re}):oe})});const oo=CW;var _5=function(t){return t?typeof t=="function"?t():t:null},SW=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},EW=function(t){var n=t.title,r=t.content,i=t.prefixCls;return!n&&!r?null:Qe($n,{children:[n&&E("div",{className:"".concat(i,"-title"),children:_5(n)}),E("div",{className:"".concat(i,"-inner-content"),children:_5(r)})]})},kW=C.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.title,i=e.content,l=e._overlay,c=e.placement,o=c===void 0?"top":c,h=e.trigger,p=h===void 0?"hover":h,g=e.mouseEnterDelay,b=g===void 0?.1:g,w=e.mouseLeaveDelay,P=w===void 0?.1:w,I=e.overlayStyle,A=I===void 0?{}:I,O=SW(e,["prefixCls","title","content","_overlay","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),M=C.exports.useContext(Nn),R=M.getPrefixCls,N=R("popover",n),z=R();return E(oo,{placement:o,trigger:p,mouseEnterDelay:b,mouseLeaveDelay:P,overlayStyle:A,...O,prefixCls:N,ref:t,overlay:l||E(EW,{prefixCls:N,title:r,content:i}),transitionName:el(z,"zoom-big",O.transitionName)})});const x7=kW;var TW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};const PW=TW;var _7=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:PW})})};_7.displayName="EllipsisOutlined";const b7=C.exports.forwardRef(_7);var w7=C.exports.createContext(null);function c4(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function C7(e){var t=C.exports.useContext(w7);return c4(t,e)}var IW=["children","locked"],Wa=C.exports.createContext(null);function MW(e,t){var n=ve({},e);return Object.keys(t).forEach(function(r){var i=t[r];i!==void 0&&(n[r]=i)}),n}function Op(e){var t=e.children,n=e.locked,r=In(e,IW),i=C.exports.useContext(Wa),l=Kp(function(){return MW(i,r)},[i,r],function(c,o){return!n&&(c[0]!==o[0]||!e4(c[1],o[1],!0))});return E(Wa.Provider,{value:l,children:t})}var RW=[],S7=C.exports.createContext(null);function L0(){return C.exports.useContext(S7)}var E7=C.exports.createContext(RW);function hf(e){var t=C.exports.useContext(E7);return C.exports.useMemo(function(){return e!==void 0?[].concat(wt(t),[e]):t},[t,e])}var k7=C.exports.createContext(null),d4=C.exports.createContext({});function b5(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(t4(e)){var n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||n==="a"&&!!e.getAttribute("href"),i=e.getAttribute("tabindex"),l=Number(i),c=null;return i&&!Number.isNaN(l)?c=l:r&&c===null&&(c=0),r&&e.disabled&&(c=null),c!==null&&(c>=0||t&&c<0)}return!1}function T7(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=wt(e.querySelectorAll("*")).filter(function(r){return b5(r,t)});return b5(e,t)&&n.unshift(e),n}var R2=Et.LEFT,A2=Et.RIGHT,O2=Et.UP,Sg=Et.DOWN,Eg=Et.ENTER,P7=Et.ESC,kh=Et.HOME,Th=Et.END,w5=[O2,Sg,R2,A2];function AW(e,t,n,r){var i,l,c,o,h="prev",p="next",g="children",b="parent";if(e==="inline"&&r===Eg)return{inlineTrigger:!0};var w=(i={},se(i,O2,h),se(i,Sg,p),i),P=(l={},se(l,R2,n?p:h),se(l,A2,n?h:p),se(l,Sg,g),se(l,Eg,g),l),I=(c={},se(c,O2,h),se(c,Sg,p),se(c,Eg,g),se(c,P7,b),se(c,R2,n?g:b),se(c,A2,n?b:g),c),A={inline:w,horizontal:P,vertical:I,inlineSub:w,horizontalSub:I,verticalSub:I},O=(o=A["".concat(e).concat(t?"":"Sub")])===null||o===void 0?void 0:o[r];switch(O){case h:return{offset:-1,sibling:!0};case p:return{offset:1,sibling:!0};case b:return{offset:-1,sibling:!1};case g:return{offset:1,sibling:!1};default:return null}}function OW(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function NW(e,t){for(var n=e||document.activeElement;n;){if(t.has(n))return n;n=n.parentElement}return null}function I7(e,t){var n=T7(e,!0);return n.filter(function(r){return t.has(r)})}function C5(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var i=I7(e,t),l=i.length,c=i.findIndex(function(o){return n===o});return r<0?c===-1?c=l-1:c-=1:r>0&&(c+=1),c=(c+l)%l,i[c]}function DW(e,t,n,r,i,l,c,o,h,p){var g=C.exports.useRef(),b=C.exports.useRef();b.current=t;var w=function(){nr.cancel(g.current)};return C.exports.useEffect(function(){return function(){w()}},[]),function(P){var I=P.which;if([].concat(w5,[Eg,P7,kh,Th]).includes(I)){var A,O,M,R=function(){A=new Set,O=new Map,M=new Map;var ge=l();return ge.forEach(function(re){var de=document.querySelector("[data-menu-id='".concat(c4(r,re),"']"));de&&(A.add(de),M.set(de,re),O.set(re,de))}),A};R();var N=O.get(t),z=NW(N,A),B=M.get(z),U=AW(e,c(B,!0).length===1,n,I);if(!U&&I!==kh&&I!==Th)return;(w5.includes(I)||[kh,Th].includes(I))&&P.preventDefault();var q=function(ge){if(ge){var re=ge,de=ge.querySelector("a");de!=null&&de.getAttribute("href")&&(re=de);var oe=M.get(ge);o(oe),w(),g.current=nr(function(){b.current===oe&&re.focus()})}};if([kh,Th].includes(I)||U.sibling||!z){var H;!z||e==="inline"?H=i.current:H=OW(z);var te,Y=I7(H,A);I===kh?te=Y[0]:I===Th?te=Y[Y.length-1]:te=C5(H,A,z,U.offset),q(te)}else if(U.inlineTrigger)h(B);else if(U.offset>0)h(B,!0),w(),g.current=nr(function(){R();var Q=z.getAttribute("aria-controls"),ge=document.getElementById(Q),re=C5(ge,A);q(re)},5);else if(U.offset<0){var le=c(B,!0),J=le[le.length-2],Z=O.get(J);h(J,!1),q(Z)}}p==null||p(P)}}function LW(e){Promise.resolve().then(e)}var f4="__RC_UTIL_PATH_SPLIT__",S5=function(t){return t.join(f4)},zW=function(t){return t.split(f4)},N2="rc-menu-more";function FW(){var e=C.exports.useState({}),t=ze(e,2),n=t[1],r=C.exports.useRef(new Map),i=C.exports.useRef(new Map),l=C.exports.useState([]),c=ze(l,2),o=c[0],h=c[1],p=C.exports.useRef(0),g=C.exports.useRef(!1),b=function(){g.current||n({})},w=C.exports.useCallback(function(N,z){var B=S5(z);i.current.set(B,N),r.current.set(N,B),p.current+=1;var U=p.current;LW(function(){U===p.current&&b()})},[]),P=C.exports.useCallback(function(N,z){var B=S5(z);i.current.delete(B),r.current.delete(N)},[]),I=C.exports.useCallback(function(N){h(N)},[]),A=C.exports.useCallback(function(N,z){var B=r.current.get(N)||"",U=zW(B);return z&&o.includes(U[0])&&U.unshift(N2),U},[o]),O=C.exports.useCallback(function(N,z){return N.some(function(B){var U=A(B,!0);return U.includes(z)})},[A]),M=function(){var z=wt(r.current.keys());return o.length&&z.push(N2),z},R=C.exports.useCallback(function(N){var z="".concat(r.current.get(N)).concat(f4),B=new Set;return wt(i.current.keys()).forEach(function(U){U.startsWith(z)&&B.add(i.current.get(U))}),B},[]);return C.exports.useEffect(function(){return function(){g.current=!0}},[]),{registerPath:w,unregisterPath:P,refreshOverflowKeys:I,isSubPathKey:O,getKeyPath:A,getKeys:M,getSubPathKeys:R}}function hd(e){var t=C.exports.useRef(e);t.current=e;var n=C.exports.useCallback(function(){for(var r,i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];return(r=t.current)===null||r===void 0?void 0:r.call.apply(r,[t].concat(l))},[]);return e?n:void 0}var $W=Math.random().toFixed(5).toString().slice(2),E5=0;function BW(e){var t=Vi(e,{value:e}),n=ze(t,2),r=n[0],i=n[1];return C.exports.useEffect(function(){E5+=1;var l="".concat($W,"-").concat(E5);i("rc-menu-uuid-".concat(l))},[]),r}function M7(e,t,n,r){var i=C.exports.useContext(Wa),l=i.activeKey,c=i.onActive,o=i.onInactive,h={active:l===e};return t||(h.onMouseEnter=function(p){n==null||n({key:e,domEvent:p}),c(e)},h.onMouseLeave=function(p){r==null||r({key:e,domEvent:p}),o(e)}),h}var VW=["item"];function wy(e){var t=e.item,n=In(e,VW);return Object.defineProperty(n,"item",{get:function(){return Nr(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),n}function R7(e){var t=e.icon,n=e.props,r=e.children,i;return typeof t=="function"?i=C.exports.createElement(t,ve({},n)):i=t,i||r||null}function A7(e){var t=C.exports.useContext(Wa),n=t.mode,r=t.rtl,i=t.inlineIndent;if(n!=="inline")return null;var l=e;return r?{paddingRight:l*i}:{paddingLeft:l*i}}var UW=["title","attribute","elementRef"],jW=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],KW=["active"],HW=function(e){li(n,e);var t=ui(n);function n(){return Kr(this,n),t.apply(this,arguments)}return Hr(n,[{key:"render",value:function(){var i=this.props,l=i.title,c=i.attribute,o=i.elementRef,h=In(i,UW),p=mi(h,["eventKey"]);return Nr(!c,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),E(hs.Item,{...c,title:typeof l=="string"?l:void 0,...p,ref:o})}}]),n}(C.exports.Component),WW=function(t){var n,r=t.style,i=t.className,l=t.eventKey;t.warnKey;var c=t.disabled,o=t.itemIcon,h=t.children,p=t.role,g=t.onMouseEnter,b=t.onMouseLeave,w=t.onClick,P=t.onKeyDown,I=t.onFocus,A=In(t,jW),O=C7(l),M=C.exports.useContext(Wa),R=M.prefixCls,N=M.onItemClick,z=M.disabled,B=M.overflowDisabled,U=M.itemIcon,q=M.selectedKeys,H=M.onActive,te=C.exports.useContext(d4),Y=te._internalRenderMenuItem,le="".concat(R,"-item"),J=C.exports.useRef(),Z=C.exports.useRef(),Q=z||c,ge=hf(l),re=function(Ue){return{key:l,keyPath:wt(ge).reverse(),item:J.current,domEvent:Ue}},de=o||U,oe=M7(l,Q,g,b),ye=oe.active,Re=In(oe,KW),Te=q.includes(l),ke=A7(ge.length),De=function(Ue){if(!Q){var ct=re(Ue);w==null||w(wy(ct)),N(ct)}},Me=function(Ue){if(P==null||P(Ue),Ue.which===Et.ENTER){var ct=re(Ue);w==null||w(wy(ct)),N(ct)}},Ne=function(Ue){H(l),I==null||I(Ue)},Le={};t.role==="option"&&(Le["aria-selected"]=Te);var Ve=Qe(HW,{ref:J,elementRef:Z,role:p===null?"none":p||"menuitem",tabIndex:c?null:-1,"data-menu-id":B&&O?null:O,...A,...Re,...Le,component:"li","aria-disabled":c,style:ve(ve({},ke),r),className:Ye(le,(n={},se(n,"".concat(le,"-active"),ye),se(n,"".concat(le,"-selected"),Te),se(n,"".concat(le,"-disabled"),Q),n),i),onClick:De,onKeyDown:Me,onFocus:Ne,children:[h,E(R7,{props:ve(ve({},t),{},{isSelected:Te}),icon:de})]});return Y&&(Ve=Y(Ve,t,{selected:Te})),Ve};function z0(e){var t=e.eventKey,n=L0(),r=hf(t);return C.exports.useEffect(function(){if(n)return n.registerPath(t,r),function(){n.unregisterPath(t,r)}},[r]),n?null:E(WW,{...e})}var GW=["className","children"],qW=function(t,n){var r=t.className,i=t.children,l=In(t,GW),c=C.exports.useContext(Wa),o=c.prefixCls,h=c.mode,p=c.rtl;return E("ul",{className:Ye(o,p&&"".concat(o,"-rtl"),"".concat(o,"-sub"),"".concat(o,"-").concat(h==="inline"?"inline":"vertical"),r),role:"menu",...l,"data-menu-list":!0,ref:n,children:i})},h4=C.exports.forwardRef(qW);h4.displayName="SubMenuList";var ZW=["label","children","key","type"];function p4(e,t){return Xi(e).map(function(n,r){if(C.exports.isValidElement(n)){var i,l,c=n.key,o=(i=(l=n.props)===null||l===void 0?void 0:l.eventKey)!==null&&i!==void 0?i:c,h=o==null;h&&(o="tmp_key-".concat([].concat(wt(t),[r]).join("-")));var p={key:o,eventKey:o};return C.exports.cloneElement(n,p)}return n})}function D2(e){return(e||[]).map(function(t,n){if(t&&sn(t)==="object"){var r=t,i=r.label,l=r.children,c=r.key,o=r.type,h=In(r,ZW),p=c!=null?c:"tmp-".concat(n);return l||o==="group"?o==="group"?E($0,{...h,title:i,children:D2(l)},p):E(F0,{...h,title:i,children:D2(l)},p):o==="divider"?E(m4,{...h},p):E(z0,{...h,children:i},p)}return null}).filter(function(t){return t})}function XW(e,t,n){var r=e;return t&&(r=D2(t)),p4(r,n)}var jl={adjustX:1,adjustY:1},YW={topLeft:{points:["bl","tl"],overflow:jl,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:jl,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:jl,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:jl,offset:[4,0]}},QW={topLeft:{points:["bl","tl"],overflow:jl,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:jl,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:jl,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:jl,offset:[4,0]}};function O7(e,t,n){if(t)return t;if(n)return n[e]||n.other}var JW={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function eG(e){var t=e.prefixCls,n=e.visible,r=e.children,i=e.popup,l=e.popupClassName,c=e.popupOffset,o=e.disabled,h=e.mode,p=e.onVisibleChange,g=C.exports.useContext(Wa),b=g.getPopupContainer,w=g.rtl,P=g.subMenuOpenDelay,I=g.subMenuCloseDelay,A=g.builtinPlacements,O=g.triggerSubMenuAction,M=g.forceSubMenuRender,R=g.rootClassName,N=g.motion,z=g.defaultMotions,B=C.exports.useState(!1),U=ze(B,2),q=U[0],H=U[1],te=ve(w?ve({},QW):ve({},YW),A),Y=JW[h],le=O7(h,N,z),J=C.exports.useRef(le);h!=="inline"&&(J.current=le);var Z=ve(ve({},J.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),Q=C.exports.useRef();return C.exports.useEffect(function(){return Q.current=nr(function(){H(n)}),function(){nr.cancel(Q.current)}},[n]),E(O0,{prefixCls:t,popupClassName:Ye("".concat(t,"-popup"),se({},"".concat(t,"-rtl"),w),l,R),stretch:h==="horizontal"?"minWidth":null,getPopupContainer:b,builtinPlacements:te,popupPlacement:Y,popupVisible:q,popup:i,popupAlign:c&&{offset:c},action:o?[]:[O],mouseEnterDelay:P,mouseLeaveDelay:I,onPopupVisibleChange:p,forceRender:M,popupMotion:Z,children:r})}function tG(e){var t=e.id,n=e.open,r=e.keyPath,i=e.children,l="inline",c=C.exports.useContext(Wa),o=c.prefixCls,h=c.forceSubMenuRender,p=c.motion,g=c.defaultMotions,b=c.mode,w=C.exports.useRef(!1);w.current=b===l;var P=C.exports.useState(!w.current),I=ze(P,2),A=I[0],O=I[1],M=w.current?n:!1;C.exports.useEffect(function(){w.current&&O(!1)},[b]);var R=ve({},O7(l,p,g));r.length>1&&(R.motionAppear=!1);var N=R.onVisibleChanged;return R.onVisibleChanged=function(z){return!w.current&&!z&&O(!0),N==null?void 0:N(z)},A?null:E(Op,{mode:l,locked:!w.current,children:E(Ca,{visible:M,...R,forceRender:h,removeOnLeave:!1,leavedClassName:"".concat(o,"-hidden"),children:function(z){var B=z.className,U=z.style;return E(h4,{id:t,className:B,style:U,children:i})}})})}var nG=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],rG=["active"],iG=function(t){var n,r=t.style,i=t.className,l=t.title,c=t.eventKey;t.warnKey;var o=t.disabled,h=t.internalPopupClose,p=t.children,g=t.itemIcon,b=t.expandIcon,w=t.popupClassName,P=t.popupOffset,I=t.onClick,A=t.onMouseEnter,O=t.onMouseLeave,M=t.onTitleClick,R=t.onTitleMouseEnter,N=t.onTitleMouseLeave,z=In(t,nG),B=C7(c),U=C.exports.useContext(Wa),q=U.prefixCls,H=U.mode,te=U.openKeys,Y=U.disabled,le=U.overflowDisabled,J=U.activeKey,Z=U.selectedKeys,Q=U.itemIcon,ge=U.expandIcon,re=U.onItemClick,de=U.onOpenChange,oe=U.onActive,ye=C.exports.useContext(d4),Re=ye._internalRenderSubMenuItem,Te=C.exports.useContext(k7),ke=Te.isSubPathKey,De=hf(),Me="".concat(q,"-submenu"),Ne=Y||o,Le=C.exports.useRef(),Ve=C.exports.useRef(),qe=g||Q,Ue=b||ge,ct=te.includes(c),pt=!le&&ct,Tt=ke(Z,c),Xe=M7(c,Ne,R,N),Pt=Xe.active,mt=In(Xe,rG),Mt=C.exports.useState(!1),Ct=ze(Mt,2),Lt=Ct[0],lt=Ct[1],dt=function(_n){Ne||lt(_n)},ut=function(_n){dt(!0),A==null||A({key:c,domEvent:_n})},it=function(_n){dt(!1),O==null||O({key:c,domEvent:_n})},ft=C.exports.useMemo(function(){return Pt||(H!=="inline"?Lt||ke([J],c):!1)},[H,Pt,J,Lt,c,ke]),xt=A7(De.length),Wt=function(_n){Ne||(M==null||M({key:c,domEvent:_n}),H==="inline"&&de(c,!ct))},Ut=hd(function(nn){I==null||I(wy(nn)),re(nn)}),Qt=function(_n){H!=="inline"&&de(c,_n)},Fe=function(){oe(c)},Ge=B&&"".concat(B,"-popup"),Xt=Qe("div",{role:"menuitem",style:xt,className:"".concat(Me,"-title"),tabIndex:Ne?null:-1,ref:Le,title:typeof l=="string"?l:null,"data-menu-id":le&&B?null:B,"aria-expanded":pt,"aria-haspopup":!0,"aria-controls":Ge,"aria-disabled":Ne,onClick:Wt,onFocus:Fe,...mt,children:[l,E(R7,{icon:H!=="horizontal"?Ue:null,props:ve(ve({},t),{},{isOpen:pt,isSubMenu:!0}),children:E("i",{className:"".concat(Me,"-arrow")})})]}),dn=C.exports.useRef(H);if(H!=="inline"&&De.length>1?dn.current="vertical":dn.current=H,!le){var Vt=dn.current;Xt=E(eG,{mode:Vt,prefixCls:Me,visible:!h&&pt&&H!=="inline",popupClassName:w,popupOffset:P,popup:E(Op,{mode:Vt==="horizontal"?"vertical":Vt,children:E(h4,{id:Ge,ref:Ve,children:p})}),disabled:Ne,onVisibleChange:Qt,children:Xt})}var jt=Qe(hs.Item,{role:"none",...z,component:"li",style:r,className:Ye(Me,"".concat(Me,"-").concat(H),i,(n={},se(n,"".concat(Me,"-open"),pt),se(n,"".concat(Me,"-active"),ft),se(n,"".concat(Me,"-selected"),Tt),se(n,"".concat(Me,"-disabled"),Ne),n)),onMouseEnter:ut,onMouseLeave:it,children:[Xt,!le&&E(tG,{id:Ge,open:pt,keyPath:De,children:p})]});return Re&&(jt=Re(jt,t,{selected:Tt,active:ft,open:pt,disabled:Ne})),E(Op,{onItemClick:Ut,mode:H==="horizontal"?"vertical":H,itemIcon:qe,expandIcon:Ue,children:jt})};function F0(e){var t=e.eventKey,n=e.children,r=hf(t),i=p4(n,r),l=L0();C.exports.useEffect(function(){if(l)return l.registerPath(t,r),function(){l.unregisterPath(t,r)}},[r]);var c;return l?c=i:c=E(iG,{...e,children:i}),E(E7.Provider,{value:r,children:c})}var oG=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem"],ud=[],aG=C.exports.forwardRef(function(e,t){var n,r,i=e,l=i.prefixCls,c=l===void 0?"rc-menu":l,o=i.rootClassName,h=i.style,p=i.className,g=i.tabIndex,b=g===void 0?0:g,w=i.items,P=i.children,I=i.direction,A=i.id,O=i.mode,M=O===void 0?"vertical":O,R=i.inlineCollapsed,N=i.disabled,z=i.disabledOverflow,B=i.subMenuOpenDelay,U=B===void 0?.1:B,q=i.subMenuCloseDelay,H=q===void 0?.1:q,te=i.forceSubMenuRender,Y=i.defaultOpenKeys,le=i.openKeys,J=i.activeKey,Z=i.defaultActiveFirst,Q=i.selectable,ge=Q===void 0?!0:Q,re=i.multiple,de=re===void 0?!1:re,oe=i.defaultSelectedKeys,ye=i.selectedKeys,Re=i.onSelect,Te=i.onDeselect,ke=i.inlineIndent,De=ke===void 0?24:ke,Me=i.motion,Ne=i.defaultMotions,Le=i.triggerSubMenuAction,Ve=Le===void 0?"hover":Le,qe=i.builtinPlacements,Ue=i.itemIcon,ct=i.expandIcon,pt=i.overflowedIndicator,Tt=pt===void 0?"...":pt,Xe=i.overflowedIndicatorPopupClassName,Pt=i.getPopupContainer,mt=i.onClick,Mt=i.onOpenChange,Ct=i.onKeyDown;i.openAnimation,i.openTransitionName;var Lt=i._internalRenderMenuItem,lt=i._internalRenderSubMenuItem,dt=In(i,oG),ut=C.exports.useMemo(function(){return XW(P,w,ud)},[P,w]),it=C.exports.useState(!1),ft=ze(it,2),xt=ft[0],Wt=ft[1],Ut=C.exports.useRef(),Qt=BW(A),Fe=I==="rtl",Ge=Vi(Y,{value:le,postState:function(Ln){return Ln||ud}}),Xt=ze(Ge,2),dn=Xt[0],Vt=Xt[1],jt=function(Ln){var Yn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function xr(){Vt(Ln),Mt==null||Mt(Ln)}Yn?uu.exports.flushSync(xr):xr()},nn=C.exports.useState(dn),_n=ze(nn,2),An=_n[0],_t=_n[1],Gt=C.exports.useRef(!1),an=C.exports.useMemo(function(){return(M==="inline"||M==="vertical")&&R?["vertical",R]:[M,!1]},[M,R]),Fn=ze(an,2),kn=Fn[0],zt=Fn[1],Tn=kn==="inline",Cn=C.exports.useState(kn),hn=ze(Cn,2),Nt=hn[0],ot=hn[1],ht=C.exports.useState(zt),At=ze(ht,2),$t=At[0],cn=At[1];C.exports.useEffect(function(){ot(kn),cn(zt),Gt.current&&(Tn?Vt(An):jt(ud))},[kn,zt]);var Mn=C.exports.useState(0),Gn=ze(Mn,2),qn=Gn[0],me=Gn[1],K=qn>=ut.length-1||Nt!=="horizontal"||z;C.exports.useEffect(function(){Tn&&_t(dn)},[dn]),C.exports.useEffect(function(){return Gt.current=!0,function(){Gt.current=!1}},[]);var G=FW(),ce=G.registerPath,ae=G.unregisterPath,xe=G.refreshOverflowKeys,Ee=G.isSubPathKey,be=G.getKeyPath,Ce=G.getKeys,Oe=G.getSubPathKeys,He=C.exports.useMemo(function(){return{registerPath:ce,unregisterPath:ae}},[ce,ae]),We=C.exports.useMemo(function(){return{isSubPathKey:Ee}},[Ee]);C.exports.useEffect(function(){xe(K?ud:ut.slice(qn+1).map(function(jn){return jn.key}))},[qn,K]);var Be=Vi(J||Z&&((n=ut[0])===null||n===void 0?void 0:n.key),{value:J}),Ot=ze(Be,2),bt=Ot[0],Je=Ot[1],Rt=hd(function(jn){Je(jn)}),Bt=hd(function(){Je(void 0)});C.exports.useImperativeHandle(t,function(){return{list:Ut.current,focus:function(Ln){var Yn,xr=bt!=null?bt:(Yn=ut.find(function(cl){return!cl.props.disabled}))===null||Yn===void 0?void 0:Yn.key;if(xr){var br,Lr,so;(br=Ut.current)===null||br===void 0||(Lr=br.querySelector("li[data-menu-id='".concat(c4(Qt,xr),"']")))===null||Lr===void 0||(so=Lr.focus)===null||so===void 0||so.call(Lr,Ln)}}}});var gn=Vi(oe||[],{value:ye,postState:function(Ln){return Array.isArray(Ln)?Ln:Ln==null?ud:[Ln]}}),on=ze(gn,2),yn=on[0],Bn=on[1],Jn=function(Ln){if(ge){var Yn=Ln.key,xr=yn.includes(Yn),br;de?xr?br=yn.filter(function(so){return so!==Yn}):br=[].concat(wt(yn),[Yn]):br=[Yn],Bn(br);var Lr=ve(ve({},Ln),{},{selectedKeys:br});xr?Te==null||Te(Lr):Re==null||Re(Lr)}!de&&dn.length&&Nt!=="inline"&&jt(ud)},Dr=hd(function(jn){mt==null||mt(wy(jn)),Jn(jn)}),or=hd(function(jn,Ln){var Yn=dn.filter(function(br){return br!==jn});if(Ln)Yn.push(jn);else if(Nt!=="inline"){var xr=Oe(jn);Yn=Yn.filter(function(br){return!xr.has(br)})}e4(dn,Yn,!0)||jt(Yn,!0)}),Pr=hd(Pt),Pn=function(Ln,Yn){var xr=Yn!=null?Yn:!dn.includes(Ln);or(Ln,xr)},Sn=DW(Nt,bt,Fe,Qt,Ut,Ce,be,Je,Pn,Ct);C.exports.useEffect(function(){Wt(!0)},[]);var Rn=C.exports.useMemo(function(){return{_internalRenderMenuItem:Lt,_internalRenderSubMenuItem:lt}},[Lt,lt]),Wr=Nt!=="horizontal"||z?ut:ut.map(function(jn,Ln){return E(Op,{overflowDisabled:Ln>qn,children:jn},jn.key)}),vr=E(hs,{id:A,ref:Ut,prefixCls:"".concat(c,"-overflow"),component:"ul",itemComponent:z0,className:Ye(c,"".concat(c,"-root"),"".concat(c,"-").concat(Nt),p,(r={},se(r,"".concat(c,"-inline-collapsed"),$t),se(r,"".concat(c,"-rtl"),Fe),r),o),dir:I,style:h,role:"menu",tabIndex:b,data:Wr,renderRawItem:function(Ln){return Ln},renderRawRest:function(Ln){var Yn=Ln.length,xr=Yn?ut.slice(-Yn):null;return E(F0,{eventKey:N2,title:Tt,disabled:K,internalPopupClose:Yn===0,popupClassName:Xe,children:xr})},maxCount:Nt!=="horizontal"||z?hs.INVALIDATE:hs.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Ln){me(Ln)},onKeyDown:Sn,...dt});return E(d4.Provider,{value:Rn,children:E(w7.Provider,{value:Qt,children:Qe(Op,{prefixCls:c,rootClassName:o,mode:Nt,openKeys:dn,rtl:Fe,disabled:N,motion:xt?Me:null,defaultMotions:xt?Ne:null,activeKey:bt,onActive:Rt,onInactive:Bt,selectedKeys:yn,inlineIndent:De,subMenuOpenDelay:U,subMenuCloseDelay:H,forceSubMenuRender:te,builtinPlacements:qe,triggerSubMenuAction:Ve,getPopupContainer:Pr,itemIcon:Ue,expandIcon:ct,onItemClick:Dr,onOpenChange:or,children:[E(k7.Provider,{value:We,children:vr}),E("div",{style:{display:"none"},"aria-hidden":!0,children:E(S7.Provider,{value:He,children:ut})})]})})})}),sG=["className","title","eventKey","children"],lG=["children"],uG=function(t){var n=t.className,r=t.title;t.eventKey;var i=t.children,l=In(t,sG),c=C.exports.useContext(Wa),o=c.prefixCls,h="".concat(o,"-item-group");return Qe("li",{role:"presentation",...l,onClick:function(g){return g.stopPropagation()},className:Ye(h,n),children:[E("div",{role:"presentation",className:"".concat(h,"-title"),title:typeof r=="string"?r:void 0,children:r}),E("ul",{role:"group",className:"".concat(h,"-list"),children:i})]})};function $0(e){var t=e.children,n=In(e,lG),r=hf(n.eventKey),i=p4(t,r),l=L0();return l?i:E(uG,{...mi(n,["warnKey"]),children:i})}function m4(e){var t=e.className,n=e.style,r=C.exports.useContext(Wa),i=r.prefixCls,l=L0();return l?null:E("li",{className:Ye("".concat(i,"-item-divider"),t),style:n})}var Yp=aG;Yp.Item=z0;Yp.SubMenu=F0;Yp.ItemGroup=$0;Yp.Divider=m4;var cG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};const dG=cG;var N7=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:dG})})};N7.displayName="LeftOutlined";const fG=C.exports.forwardRef(N7);var hG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};const pG=hG;var D7=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:pG})})};D7.displayName="RightOutlined";const v4=C.exports.forwardRef(D7);globalThis&&globalThis.__rest;var L7=C.exports.createContext({}),mG=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},vG=function(t){var n=t.prefixCls,r=t.className,i=t.dashed,l=mG(t,["prefixCls","className","dashed"]),c=C.exports.useContext(Nn),o=c.getPrefixCls,h=o("menu",n),p=Ye(se({},"".concat(h,"-item-divider-dashed"),!!i),r);return E(m4,{className:p,...l})};const z7=vG;var gG=C.exports.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});const Cy=gG;var yG=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},g4=function(e){li(n,e);var t=ui(n);function n(){var r;return Kr(this,n),r=t.apply(this,arguments),r.renderItem=function(i){var l,c=i.siderCollapsed,o,h=r.context,p=h.prefixCls,g=h.firstLevel,b=h.inlineCollapsed,w=h.direction,P=h.disableMenuItemTitleTooltip,I=r.props,A=I.className,O=I.children,M=r.props,R=M.title,N=M.icon,z=M.danger,B=yG(M,["title","icon","danger"]),U=R;typeof R>"u"?U=g?O:"":R===!1&&(U="");var q={title:U};!c&&!b&&(q.title=null,q.open=!1);var H=Xi(O).length,te=Qe(z0,{...B,className:Ye((l={},se(l,"".concat(p,"-item-danger"),z),se(l,"".concat(p,"-item-only-child"),(N?H+1:H)===1),l),A),title:typeof R=="string"?R:void 0,children:[Ei(N,{className:Ye(Do(N)?(o=N.props)===null||o===void 0?void 0:o.className:"","".concat(p,"-item-icon"))}),r.renderItemChildren(b)]});return P||(te=E(oo,{...q,placement:w==="rtl"?"left":"right",overlayClassName:"".concat(p,"-inline-collapsed-tooltip"),children:te})),te},r}return Hr(n,[{key:"renderItemChildren",value:function(i){var l=this.context,c=l.prefixCls,o=l.firstLevel,h=this.props,p=h.icon,g=h.children,b=E("span",{className:"".concat(c,"-title-content"),children:g});return(!p||Do(g)&&g.type==="span")&&g&&i&&o&&typeof g=="string"?E("div",{className:"".concat(c,"-inline-collapsed-noicon"),children:g.charAt(0)}):b}},{key:"render",value:function(){return E(L7.Consumer,{children:this.renderItem})}}]),n}(C.exports.Component);g4.contextType=Cy;function F7(e){var t,n=e.popupClassName,r=e.icon,i=e.title,l=e.theme,c=C.exports.useContext(Cy),o=c.prefixCls,h=c.inlineCollapsed,p=c.antdMenuTheme,g=hf(),b;if(!r)b=h&&!g.length&&i&&typeof i=="string"?E("div",{className:"".concat(o,"-inline-collapsed-noicon"),children:i.charAt(0)}):E("span",{className:"".concat(o,"-title-content"),children:i});else{var w=Do(i)&&i.type==="span";b=Qe($n,{children:[Ei(r,{className:Ye(Do(r)?(t=r.props)===null||t===void 0?void 0:t.className:"","".concat(o,"-item-icon"))}),w?i:E("span",{className:"".concat(o,"-title-content"),children:i})]})}var P=C.exports.useMemo(function(){return tt(tt({},c),{firstLevel:!1})},[c]);return E(Cy.Provider,{value:P,children:E(F0,{...mi(e,["icon"]),title:b,popupClassName:Ye(o,"".concat(o,"-").concat(l||p),n)})})}var xG=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function L2(e){return(e||[]).map(function(t,n){if(t&&sn(t)==="object"){var r=t,i=r.label,l=r.children,c=r.key,o=r.type,h=xG(r,["label","children","key","type"]),p=c!=null?c:"tmp-".concat(n);return l||o==="group"?o==="group"?E($0,{...h,title:i,children:L2(l)},p):E(F7,{...h,title:i,children:L2(l)},p):o==="divider"?E(z7,{...h},p):E(g4,{...h,children:i},p)}return null}).filter(function(t){return t})}function _G(e){return C.exports.useMemo(function(){return e&&L2(e)},[e])}var bG=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Sy=C.exports.createContext(null),$7=function(t){var n=t.children,r=bG(t,["children"]),i=C.exports.useContext(Sy),l=C.exports.useMemo(function(){return tt(tt({},i),r)},[i,r.prefixCls,r.mode,r.selectable]);return E(Sy.Provider,{value:l,children:n})},wG=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},CG=C.exports.forwardRef(function(e,t){var n,r=C.exports.useContext(Sy)||{},i=C.exports.useContext(Nn),l=i.getPrefixCls,c=i.getPopupContainer,o=i.direction,h=l(),p=e.prefixCls,g=e.className,b=e.theme,w=b===void 0?"light":b,P=e.expandIcon,I=e._internalDisableMenuItemTitleTooltip,A=e.inlineCollapsed,O=e.siderCollapsed,M=e.items,R=e.children,N=e.mode,z=e.selectable,B=e.onClick,U=wG(e,["prefixCls","className","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","mode","selectable","onClick"]),q=mi(U,["collapsedWidth"]),H=_G(M)||R;(n=r.validator)===null||n===void 0||n.call(r,{mode:N});var te=Mp(function(){var oe;B==null||B.apply(void 0,arguments),(oe=r==null?void 0:r.onClick)===null||oe===void 0||oe.call(r)}),Y=r.mode||N,le=z!=null?z:r.selectable,J=C.exports.useMemo(function(){return O!==void 0?O:A},[A,O]),Z={horizontal:{motionName:"".concat(h,"-slide-up")},inline:Ap,other:{motionName:"".concat(h,"-zoom-big")}},Q=l("menu",p||r.prefixCls),ge=Ye("".concat(Q,"-").concat(w),g),re;typeof P=="function"?re=P:re=Ei(P||r.expandIcon,{className:"".concat(Q,"-submenu-expand-icon")});var de=C.exports.useMemo(function(){return{prefixCls:Q,inlineCollapsed:J||!1,antdMenuTheme:w,direction:o,firstLevel:!0,disableMenuItemTitleTooltip:I}},[Q,J,w,o,I]);return E(Sy.Provider,{value:null,children:E(Cy.Provider,{value:de,children:E(Yp,{getPopupContainer:c,overflowedIndicator:E(b7,{}),overflowedIndicatorPopupClassName:"".concat(Q,"-").concat(w),mode:Y,selectable:le,onClick:te,...q,inlineCollapsed:J,className:ge,prefixCls:Q,direction:o,defaultMotions:Z,expandIcon:re,ref:t,children:H})})})}),Qp=function(e){li(n,e);var t=ui(n);function n(){var r;return Kr(this,n),r=t.apply(this,arguments),r.focus=function(i){var l;(l=r.menu)===null||l===void 0||l.focus(i)},r}return Hr(n,[{key:"render",value:function(){var i=this;return E(L7.Consumer,{children:function(l){return E(CG,{ref:function(o){i.menu=o},...i.props,...l})}})}}]),n}(C.exports.Component);Qp.Divider=z7;Qp.Item=g4;Qp.SubMenu=F7;Qp.ItemGroup=$0;const B7=Qp;var cd={adjustX:1,adjustY:1},dd=[0,0],SG={topLeft:{points:["bl","tl"],overflow:cd,offset:[0,-4],targetOffset:dd},topCenter:{points:["bc","tc"],overflow:cd,offset:[0,-4],targetOffset:dd},topRight:{points:["br","tr"],overflow:cd,offset:[0,-4],targetOffset:dd},bottomLeft:{points:["tl","bl"],overflow:cd,offset:[0,4],targetOffset:dd},bottomCenter:{points:["tc","bc"],overflow:cd,offset:[0,4],targetOffset:dd},bottomRight:{points:["tr","br"],overflow:cd,offset:[0,4],targetOffset:dd}},EG=Et.ESC,kG=Et.TAB;function TG(e){var t=e.visible,n=e.setTriggerVisible,r=e.triggerRef,i=e.onVisibleChange,l=e.autoFocus,c=C.exports.useRef(!1),o=function(){if(t&&r.current){var b,w,P,I;(b=r.current)===null||b===void 0||(w=b.triggerRef)===null||w===void 0||(P=w.current)===null||P===void 0||(I=P.focus)===null||I===void 0||I.call(P),n(!1),typeof i=="function"&&i(!1)}},h=function(){var b,w,P,I,A=T7((b=r.current)===null||b===void 0||(w=b.popupRef)===null||w===void 0||(P=w.current)===null||P===void 0||(I=P.getElement)===null||I===void 0?void 0:I.call(P)),O=A[0];return O!=null&&O.focus?(O.focus(),c.current=!0,!0):!1},p=function(b){switch(b.keyCode){case EG:o();break;case kG:{var w=!1;c.current||(w=h()),w?b.preventDefault():o();break}}};C.exports.useEffect(function(){return t?(window.addEventListener("keydown",p),l&&nr(h,3),function(){window.removeEventListener("keydown",p),c.current=!1}):function(){c.current=!1}},[t])}var PG=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus"];function IG(e,t){var n=e.arrow,r=n===void 0?!1:n,i=e.prefixCls,l=i===void 0?"rc-dropdown":i,c=e.transitionName,o=e.animation,h=e.align,p=e.placement,g=p===void 0?"bottomLeft":p,b=e.placements,w=b===void 0?SG:b,P=e.getPopupContainer,I=e.showAction,A=e.hideAction,O=e.overlayClassName,M=e.overlayStyle,R=e.visible,N=e.trigger,z=N===void 0?["hover"]:N,B=e.autoFocus,U=In(e,PG),q=C.exports.useState(),H=ze(q,2),te=H[0],Y=H[1],le="visible"in e?R:te,J=C.exports.useRef(null);C.exports.useImperativeHandle(t,function(){return J.current}),TG({visible:le,setTriggerVisible:Y,triggerRef:J,onVisibleChange:e.onVisibleChange,autoFocus:B});var Z=function(){var De=e.overlay,Me;return typeof De=="function"?Me=De():Me=De,Me},Q=function(De){var Me=e.onOverlayClick;Y(!1),Me&&Me(De)},ge=function(De){var Me=e.onVisibleChange;Y(De),typeof Me=="function"&&Me(De)},re=function(){var De=Z();return Qe($n,{children:[r&&E("div",{className:"".concat(l,"-arrow")}),De]})},de=function(){var De=e.overlay;return typeof De=="function"?re:re()},oe=function(){var De=e.minOverlayWidthMatchTrigger,Me=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?De:!Me},ye=function(){var De=e.openClassName;return De!==void 0?De:"".concat(l,"-open")},Re=function(){var De=e.children,Me=De.props?De.props:{},Ne=Ye(Me.className,ye());return le&&De?C.exports.cloneElement(De,{className:Ne}):De},Te=A;return!Te&&z.indexOf("contextMenu")!==-1&&(Te=["click"]),E(O0,{...ve(ve({builtinPlacements:w},U),{},{prefixCls:l,ref:J,popupClassName:Ye(O,se({},"".concat(l,"-show-arrow"),r)),popupStyle:M,action:z,showAction:I,hideAction:Te||[],popupPlacement:g,popupAlign:h,popupTransitionName:c,popupAnimation:o,popupVisible:le,stretch:oe()?"minWidth":"",popup:de(),onPopupVisibleChange:ge,onPopupClick:Q,getPopupContainer:P}),children:Re()})}const MG=C.exports.forwardRef(IG);var RG=0,zd={};function Ey(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,n=RG++,r=t;function i(){r-=1,r<=0?(e(),delete zd[n]):zd[n]=nr(i)}return zd[n]=nr(i),n}Ey.cancel=function(t){t!==void 0&&(nr.cancel(zd[t]),delete zd[t])};Ey.ids=zd;var h_;function k5(e){return!e||e.offsetParent===null||e.hidden}function AG(e){return e instanceof Document?e.body:Array.from(e.childNodes).find(function(t){return(t==null?void 0:t.nodeType)===Node.ELEMENT_NODE})}function OG(e){var t=(e||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return t&&t[1]&&t[2]&&t[3]?!(t[1]===t[2]&&t[2]===t[3]):!0}var V7=function(e){li(n,e);var t=ui(n);function n(){var r;return Kr(this,n),r=t.apply(this,arguments),r.containerRef=C.exports.createRef(),r.animationStart=!1,r.destroyed=!1,r.onClick=function(i,l){var c,o,h=r.props,p=h.insertExtraNode,g=h.disabled;if(!(g||!i||k5(i)||i.className.includes("-leave"))){r.extraNode=document.createElement("div");var b=On(r),w=b.extraNode,P=r.context.getPrefixCls;w.className="".concat(P(""),"-click-animating-node");var I=r.getAttributeName();if(i.setAttribute(I,"true"),l&&l!=="#fff"&&l!=="#ffffff"&&l!=="rgb(255, 255, 255)"&&l!=="rgba(255, 255, 255, 1)"&&OG(l)&&!/rgba\((?:\d*, ){3}0\)/.test(l)&&l!=="transparent"){w.style.borderColor=l;var A=((c=i.getRootNode)===null||c===void 0?void 0:c.call(i))||i.ownerDocument,O=(o=AG(A))!==null&&o!==void 0?o:A;h_=Gp(`
[`.concat(P(""),"-click-animating-without-extra-node='true']::after, .").concat(P(""),`-click-animating-node {
--antd-wave-shadow-color: `).concat(l,`;
}`),"antd-wave",{csp:r.csp,attachTo:O})}p&&i.appendChild(w),["transition","animation"].forEach(function(M){i.addEventListener("".concat(M,"start"),r.onTransitionStart),i.addEventListener("".concat(M,"end"),r.onTransitionEnd)})}},r.onTransitionStart=function(i){if(!r.destroyed){var l=r.containerRef.current;!i||i.target!==l||r.animationStart||r.resetEffect(l)}},r.onTransitionEnd=function(i){!i||i.animationName!=="fadeEffect"||r.resetEffect(i.target)},r.bindAnimationEvent=function(i){if(!(!i||!i.getAttribute||i.getAttribute("disabled")||i.className.includes("disabled"))){var l=function(o){if(!(o.target.tagName==="INPUT"||k5(o.target))){r.resetEffect(i);var h=getComputedStyle(i).getPropertyValue("border-top-color")||getComputedStyle(i).getPropertyValue("border-color")||getComputedStyle(i).getPropertyValue("background-color");r.clickWaveTimeoutId=window.setTimeout(function(){return r.onClick(i,h)},0),Ey.cancel(r.animationStartId),r.animationStart=!0,r.animationStartId=Ey(function(){r.animationStart=!1},10)}};return i.addEventListener("click",l,!0),{cancel:function(){i.removeEventListener("click",l,!0)}}}},r.renderWave=function(i){var l=i.csp,c=r.props.children;if(r.csp=l,!C.exports.isValidElement(c))return c;var o=r.containerRef;return Sc(c)&&(o=Lo(c.ref,r.containerRef)),Ei(c,{ref:o})},r}return Hr(n,[{key:"componentDidMount",value:function(){this.destroyed=!1;var i=this.containerRef.current;!i||i.nodeType!==1||(this.instance=this.bindAnimationEvent(i))}},{key:"componentWillUnmount",value:function(){this.instance&&this.instance.cancel(),this.clickWaveTimeoutId&&clearTimeout(this.clickWaveTimeoutId),this.destroyed=!0}},{key:"getAttributeName",value:function(){var i=this.context.getPrefixCls,l=this.props.insertExtraNode;return l?"".concat(i(""),"-click-animating"):"".concat(i(""),"-click-animating-without-extra-node")}},{key:"resetEffect",value:function(i){var l=this;if(!(!i||i===this.extraNode||!(i instanceof Element))){var c=this.props.insertExtraNode,o=this.getAttributeName();i.setAttribute(o,"false"),h_&&(h_.innerHTML=""),c&&this.extraNode&&i.contains(this.extraNode)&&i.removeChild(this.extraNode),["transition","animation"].forEach(function(h){i.removeEventListener("".concat(h,"start"),l.onTransitionStart),i.removeEventListener("".concat(h,"end"),l.onTransitionEnd)})}}},{key:"render",value:function(){return E(hu,{children:this.renderWave})}}]),n}(C.exports.Component);V7.contextType=Nn;const NG=V7;var DG=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},U7=C.exports.createContext(void 0),LG=function(t){var n,r=C.exports.useContext(Nn),i=r.getPrefixCls,l=r.direction,c=t.prefixCls,o=t.size,h=t.className,p=DG(t,["prefixCls","size","className"]),g=i("btn-group",c),b="";switch(o){case"large":b="lg";break;case"small":b="sm";break}var w=Ye(g,(n={},se(n,"".concat(g,"-").concat(b),b),se(n,"".concat(g,"-rtl"),l==="rtl"),n),h);return E(U7.Provider,{value:o,children:E("div",{...p,className:w})})};const zG=LG;var p_=function(){return{width:0,opacity:0,transform:"scale(0)"}},m_=function(t){return{width:t.scrollWidth,opacity:1,transform:"scale(1)"}},FG=function(t){var n=t.prefixCls,r=t.loading,i=t.existIcon,l=!!r;return i?E("span",{className:"".concat(n,"-loading-icon"),children:E(qd,{})}):E(Ca,{visible:l,motionName:"".concat(n,"-loading-icon-motion"),removeOnLeave:!0,onAppearStart:p_,onAppearActive:m_,onEnterStart:p_,onEnterActive:m_,onLeaveStart:m_,onLeaveActive:p_,children:function(c,o){var h=c.className,p=c.style;return E("span",{className:"".concat(n,"-loading-icon"),style:p,ref:o,children:E(qd,{className:h})})}})};const $G=FG;var BG=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},T5=/^[\u4e00-\u9fa5]{2}$/,z2=T5.test.bind(T5);function VG(e){return typeof e=="string"}function v_(e){return e==="text"||e==="link"}function UG(e,t){if(e!=null){var n=t?" ":"";return typeof e!="string"&&typeof e!="number"&&VG(e.type)&&z2(e.props.children)?Ei(e,{children:e.props.children.split("").join(n)}):typeof e=="string"?z2(e)?E("span",{children:e.split("").join(n)}):E("span",{children:e}):_R(e)?E("span",{children:e}):e}}function jG(e,t){var n=!1,r=[];return C.exports.Children.forEach(e,function(i){var l=sn(i),c=l==="string"||l==="number";if(n&&c){var o=r.length-1,h=r[o];r[o]="".concat(h).concat(i)}else r.push(i);n=c}),C.exports.Children.map(r,function(i){return UG(i,t)})}ra("default","primary","ghost","dashed","link","text");ra("default","circle","round");ra("submit","button","reset");function j7(e){return e==="danger"?{danger:!0}:{type:e}}var KG=function(t,n){var r,i=t.loading,l=i===void 0?!1:i,c=t.prefixCls,o=t.type,h=o===void 0?"default":o,p=t.danger,g=t.shape,b=g===void 0?"default":g,w=t.size,P=t.disabled,I=t.className,A=t.children,O=t.icon,M=t.ghost,R=M===void 0?!1:M,N=t.block,z=N===void 0?!1:N,B=t.htmlType,U=B===void 0?"button":B,q=BG(t,["loading","prefixCls","type","danger","shape","size","disabled","className","children","icon","ghost","block","htmlType"]),H=C.exports.useContext(ms),te=C.exports.useContext(pu),Y=P!=null?P:te,le=C.exports.useContext(U7),J=C.exports.useState(!!l),Z=ze(J,2),Q=Z[0],ge=Z[1],re=C.exports.useState(!1),de=ze(re,2),oe=de[0],ye=de[1],Re=C.exports.useContext(Nn),Te=Re.getPrefixCls,ke=Re.autoInsertSpaceInButton,De=Re.direction,Me=n||C.exports.createRef(),Ne=function(){return C.exports.Children.count(A)===1&&!O&&!v_(h)},Le=function(){if(!(!Me||!Me.current||ke===!1)){var xt=Me.current.textContent;Ne()&&z2(xt)?oe||ye(!0):oe&&ye(!1)}},Ve=typeof l=="boolean"?l:(l==null?void 0:l.delay)||!0;C.exports.useEffect(function(){var ft=null;return typeof Ve=="number"?ft=window.setTimeout(function(){ft=null,ge(Ve)},Ve):ge(Ve),function(){ft&&(window.clearTimeout(ft),ft=null)}},[Ve]),C.exports.useEffect(Le,[Me]);var qe=function(xt){var Wt=t.onClick;if(Q||Y){xt.preventDefault();return}Wt==null||Wt(xt)},Ue=Te("btn",c),ct=ke!==!1,pt=ff(Ue,De),Tt=pt.compactSize,Xe=pt.compactItemClassnames,Pt={large:"lg",small:"sm",middle:void 0},mt=Tt||le||w||H,Mt=mt&&Pt[mt]||"",Ct=Q?"loading":O,Lt=mi(q,["navigate"]),lt=Ye(Ue,(r={},se(r,"".concat(Ue,"-").concat(b),b!=="default"&&b),se(r,"".concat(Ue,"-").concat(h),h),se(r,"".concat(Ue,"-").concat(Mt),Mt),se(r,"".concat(Ue,"-icon-only"),!A&&A!==0&&!!Ct),se(r,"".concat(Ue,"-background-ghost"),R&&!v_(h)),se(r,"".concat(Ue,"-loading"),Q),se(r,"".concat(Ue,"-two-chinese-chars"),oe&&ct&&!Q),se(r,"".concat(Ue,"-block"),z),se(r,"".concat(Ue,"-dangerous"),!!p),se(r,"".concat(Ue,"-rtl"),De==="rtl"),se(r,"".concat(Ue,"-disabled"),Lt.href!==void 0&&Y),r),Xe,I),dt=O&&!Q?O:E($G,{existIcon:!!O,prefixCls:Ue,loading:!!Q}),ut=A||A===0?jG(A,Ne()&&ct):null;if(Lt.href!==void 0)return Qe("a",{...Lt,className:lt,onClick:qe,ref:Me,children:[dt,ut]});var it=Qe("button",{...q,type:U,className:lt,onClick:qe,disabled:Y,ref:Me,children:[dt,ut]});return v_(h)?it:E(NG,{disabled:!!Q,children:it})},y4=C.exports.forwardRef(KG);y4.Group=zG;y4.__ANT_BUTTON=!0;const Br=y4;var K7=function(t){if(wo()&&window.document.documentElement){var n=Array.isArray(t)?t:[t],r=window.document.documentElement;return n.some(function(i){return i in r.style})}return!1},HG=function(t,n){if(!K7(t))return!1;var r=document.createElement("div"),i=r.style[t];return r.style[t]=n,r.style[t]!==i};function F2(e,t){return!Array.isArray(e)&&t!==void 0?HG(e,t):K7(e)}var H7=function(){return wo()&&window.document.documentElement},Qv,WG=function(){if(!H7())return!1;if(Qv!==void 0)return Qv;var t=document.createElement("div");return t.style.display="flex",t.style.flexDirection="column",t.style.rowGap="1px",t.appendChild(document.createElement("div")),t.appendChild(document.createElement("div")),document.body.appendChild(t),Qv=t.scrollHeight===1,document.body.removeChild(t),Qv};const W7=function(){var e=C.exports.useState(!1),t=ze(e,2),n=t[0],r=t[1];return C.exports.useEffect(function(){r(WG())},[]),n};function GG(e){var t=e.className,n=e.direction,r=e.index,i=e.marginDirection,l=e.children,c=e.split,o=e.wrap,h=C.exports.useContext(G7),p=h.horizontalSize,g=h.verticalSize,b=h.latestIndex,w=h.supportFlexGap,P={};return w||(n==="vertical"?r<b&&(P={marginBottom:p/(c?2:1)}):P=tt(tt({},r<b&&se({},i,p/(c?2:1))),o&&{paddingBottom:g})),l==null?null:Qe($n,{children:[E("div",{className:t,style:P,children:l}),r<b&&c&&E("span",{className:"".concat(t,"-split"),style:P,children:c})]})}var qG=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},G7=C.exports.createContext({latestIndex:0,horizontalSize:0,verticalSize:0,supportFlexGap:!1}),ZG={small:8,middle:16,large:24};function XG(e){return typeof e=="string"?ZG[e]:e||0}var YG=function(t){var n,r=C.exports.useContext(Nn),i=r.getPrefixCls,l=r.space,c=r.direction,o=t.size,h=o===void 0?(l==null?void 0:l.size)||"small":o,p=t.align,g=t.className,b=t.children,w=t.direction,P=w===void 0?"horizontal":w,I=t.prefixCls,A=t.split,O=t.style,M=t.wrap,R=M===void 0?!1:M,N=qG(t,["size","align","className","children","direction","prefixCls","split","style","wrap"]),z=W7(),B=C.exports.useMemo(function(){return(Array.isArray(h)?h:[h,h]).map(function(ye){return XG(ye)})},[h]),U=ze(B,2),q=U[0],H=U[1],te=Xi(b,{keepEmpty:!0}),Y=p===void 0&&P==="horizontal"?"center":p,le=i("space",I),J=Ye(le,"".concat(le,"-").concat(P),(n={},se(n,"".concat(le,"-rtl"),c==="rtl"),se(n,"".concat(le,"-align-").concat(Y),Y),n),g),Z="".concat(le,"-item"),Q=c==="rtl"?"marginLeft":"marginRight",ge=0,re=te.map(function(ye,Re){ye!=null&&(ge=Re);var Te=ye&&ye.key||"".concat(Z,"-").concat(Re);return E(GG,{className:Z,direction:P,index:Re,marginDirection:Q,split:A,wrap:R,children:ye},Te)}),de=C.exports.useMemo(function(){return{horizontalSize:q,verticalSize:H,latestIndex:ge,supportFlexGap:z}},[q,H,ge,z]);if(te.length===0)return null;var oe={};return R&&(oe.flexWrap="wrap",z||(oe.marginBottom=-H)),z&&(oe.columnGap=q,oe.rowGap=H),E("div",{className:J,style:tt(tt({},oe),O),...N,children:E(G7.Provider,{value:de,children:re})})},q7=YG;q7.Compact=lW;const x4=q7;var QG=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Z7=function(t){var n=C.exports.useContext(Nn),r=n.getPopupContainer,i=n.getPrefixCls,l=n.direction,c=t.prefixCls,o=t.type,h=o===void 0?"default":o,p=t.danger,g=t.disabled,b=t.loading,w=t.onClick,P=t.htmlType,I=t.children,A=t.className,O=t.menu,M=t.arrow,R=t.autoFocus,N=t.overlay,z=t.trigger,B=t.align,U=t.visible,q=t.open,H=t.onVisibleChange,te=t.onOpenChange,Y=t.placement,le=t.getPopupContainer,J=t.href,Z=t.icon,Q=Z===void 0?E(b7,{}):Z,ge=t.title,re=t.buttonsRender,de=re===void 0?function(Mt){return Mt}:re,oe=t.mouseEnterDelay,ye=t.mouseLeaveDelay,Re=t.overlayClassName,Te=t.overlayStyle,ke=t.destroyPopupOnHide,De=QG(t,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","visible","open","onVisibleChange","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide"]),Me=i("dropdown-button",c),Ne={menu:O,arrow:M,autoFocus:R,align:B,disabled:g,trigger:g?[]:z,onOpenChange:te||H,getPopupContainer:le||r,mouseEnterDelay:oe,mouseLeaveDelay:ye,overlayClassName:Re,overlayStyle:Te,destroyPopupOnHide:ke},Le=ff(Me,l),Ve=Le.compactSize,qe=Le.compactItemClassnames,Ue=Ye(Me,qe,A);"overlay"in t&&(Ne.overlay=N),"open"in t?Ne.open=q:"visible"in t&&(Ne.open=U),"placement"in t?Ne.placement=Y:Ne.placement=l==="rtl"?"bottomLeft":"bottomRight";var ct=E(Br,{type:h,danger:p,disabled:g,loading:b,onClick:w,htmlType:P,href:J,title:ge,children:I}),pt=E(Br,{type:h,danger:p,icon:Q}),Tt=de([ct,pt]),Xe=ze(Tt,2),Pt=Xe[0],mt=Xe[1];return Qe(x4.Compact,{className:Ue,size:Ve,block:!0,...De,children:[Pt,E(_4,{...Ne,children:mt})]})};Z7.__ANT_BUTTON=!0;const JG=Z7;ra("topLeft","topCenter","topRight","bottomLeft","bottomCenter","bottomRight","top","bottom");var X7=function(t){var n=C.exports.useContext(Nn),r=n.getPopupContainer,i=n.getPrefixCls,l=n.direction,c=function(){var Le=i(),Ve=t.placement,qe=Ve===void 0?"":Ve,Ue=t.transitionName;return Ue!==void 0?Ue:qe.includes("top")?"".concat(Le,"-slide-down"):"".concat(Le,"-slide-up")},o=function(){var Le=t.placement;if(!Le)return l==="rtl"?"bottomRight":"bottomLeft";if(Le.includes("Center")){var Ve=Le.slice(0,Le.indexOf("Center"));return Ve}return Le},h=t.menu,p=t.arrow,g=t.prefixCls,b=t.children,w=t.trigger,P=t.disabled,I=t.dropdownRender,A=t.getPopupContainer,O=t.overlayClassName,M=t.visible,R=t.open,N=t.onVisibleChange,z=t.onOpenChange,B=t.mouseEnterDelay,U=B===void 0?.15:B,q=t.mouseLeaveDelay,H=q===void 0?.1:q,te=t.autoAdjustOverflow,Y=te===void 0?!0:te,le=i("dropdown",g),J=C.exports.Children.only(b),Z=Ei(J,{className:Ye("".concat(le,"-trigger"),se({},"".concat(le,"-rtl"),l==="rtl"),J.props.className),disabled:P}),Q=P?[]:w,ge;Q&&Q.includes("contextMenu")&&(ge=!0);var re=Vi(!1,{value:R!==void 0?R:M}),de=ze(re,2),oe=de[0],ye=de[1],Re=Mp(function(Ne){N==null||N(Ne),z==null||z(Ne),ye(Ne)}),Te=Ye(O,se({},"".concat(le,"-rtl"),l==="rtl")),ke=y7({arrowPointAtCenter:sn(p)==="object"&&p.pointAtCenter,autoAdjustOverflow:Y}),De=C.exports.useCallback(function(){ye(!1)},[]),Me=function(){var Le=t.overlay,Ve;return h!=null&&h.items?Ve=E(B7,{...h}):typeof Le=="function"?Ve=Le():Ve=Le,I&&(Ve=I(Ve)),Ve=C.exports.Children.only(typeof Ve=="string"?E("span",{children:Ve}):Ve),E($7,{prefixCls:"".concat(le,"-menu"),expandIcon:E("span",{className:"".concat(le,"-menu-submenu-arrow"),children:E(v4,{className:"".concat(le,"-menu-submenu-arrow-icon")})}),mode:"vertical",selectable:!1,onClick:De,validator:function(Ue){Ue.mode},children:E(xy,{children:Ve})})};return E(MG,{alignPoint:ge,...t,mouseEnterDelay:U,mouseLeaveDelay:H,visible:oe,builtinPlacements:ke,arrow:!!p,overlayClassName:Te,prefixCls:le,getPopupContainer:A||r,transitionName:c(),trigger:Q,overlay:Me,placement:o(),onVisibleChange:Re,children:Z})};X7.Button=JG;const _4=X7;var eq=typeof Us=="object"&&Us&&Us.Object===Object&&Us,Y7=eq,tq=Y7,nq=typeof self=="object"&&self&&self.Object===Object&&self,rq=tq||nq||Function("return this")(),vs=rq,iq=vs,oq=iq.Symbol,b4=oq,aq=Array.isArray,w4=aq,P5=b4,Q7=Object.prototype,sq=Q7.hasOwnProperty,lq=Q7.toString,Ph=P5?P5.toStringTag:void 0;function uq(e){var t=sq.call(e,Ph),n=e[Ph];try{e[Ph]=void 0;var r=!0}catch{}var i=lq.call(e);return r&&(t?e[Ph]=n:delete e[Ph]),i}var cq=uq,dq=Object.prototype,fq=dq.toString;function hq(e){return fq.call(e)}var pq=hq,I5=b4,mq=cq,vq=pq,gq="[object Null]",yq="[object Undefined]",M5=I5?I5.toStringTag:void 0;function xq(e){return e==null?e===void 0?yq:gq:M5&&M5 in Object(e)?mq(e):vq(e)}var Jp=xq;function _q(e){return e!=null&&typeof e=="object"}var em=_q,bq=Jp,wq=em,Cq="[object Symbol]";function Sq(e){return typeof e=="symbol"||wq(e)&&bq(e)==Cq}var Eq=Sq,kq=/\s/;function Tq(e){for(var t=e.length;t--&&kq.test(e.charAt(t)););return t}var Pq=Tq,Iq=Pq,Mq=/^\s+/;function Rq(e){return e&&e.slice(0,Iq(e)+1).replace(Mq,"")}var Aq=Rq;function Oq(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var B0=Oq,Nq=Aq,R5=B0,Dq=Eq,A5=0/0,Lq=/^[-+]0x[0-9a-f]+$/i,zq=/^0b[01]+$/i,Fq=/^0o[0-7]+$/i,$q=parseInt;function Bq(e){if(typeof e=="number")return e;if(Dq(e))return A5;if(R5(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=R5(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Nq(e);var n=zq.test(e);return n||Fq.test(e)?$q(e.slice(2),n?2:8):Lq.test(e)?A5:+e}var Vq=Bq,gc=function(t,n,r,i){var l=r?r.call(i,t,n):void 0;if(l!==void 0)return!!l;if(t===n)return!0;if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;var c=Object.keys(t),o=Object.keys(n);if(c.length!==o.length)return!1;for(var h=Object.prototype.hasOwnProperty.bind(n),p=0;p<c.length;p++){var g=c[p];if(!h(g))return!1;var b=t[g],w=n[g];if(l=r?r.call(i,b,w,g):void 0,l===!1||l===void 0&&b!==w)return!1}return!0},J7=C.exports.createContext(null),Uq=J7.Provider,eA=C.exports.createContext(null),jq=eA.Provider,C4=function(e){li(n,e);var t=ui(n);function n(r){var i;Kr(this,n),i=t.call(this,r),i.handleChange=function(c){var o=i.props,h=o.disabled,p=o.onChange;h||("checked"in i.props||i.setState({checked:c.target.checked}),p&&p({target:ve(ve({},i.props),{},{checked:c.target.checked}),stopPropagation:function(){c.stopPropagation()},preventDefault:function(){c.preventDefault()},nativeEvent:c.nativeEvent}))},i.saveInput=function(c){i.input=c};var l="checked"in r?r.checked:r.defaultChecked;return i.state={checked:l},i}return Hr(n,[{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"render",value:function(){var i,l=this.props,c=l.prefixCls,o=l.className,h=l.style,p=l.name,g=l.id,b=l.type,w=l.disabled,P=l.readOnly,I=l.tabIndex,A=l.onClick,O=l.onFocus,M=l.onBlur,R=l.onKeyDown,N=l.onKeyPress,z=l.onKeyUp,B=l.autoFocus,U=l.value,q=l.required,H=In(l,["prefixCls","className","style","name","id","type","disabled","readOnly","tabIndex","onClick","onFocus","onBlur","onKeyDown","onKeyPress","onKeyUp","autoFocus","value","required"]),te=Object.keys(H).reduce(function(J,Z){return(Z.substr(0,5)==="aria-"||Z.substr(0,5)==="data-"||Z==="role")&&(J[Z]=H[Z]),J},{}),Y=this.state.checked,le=Ye(c,o,(i={},se(i,"".concat(c,"-checked"),Y),se(i,"".concat(c,"-disabled"),w),i));return Qe("span",{className:le,style:h,children:[E("input",{name:p,id:g,type:b,required:q,readOnly:P,disabled:w,tabIndex:I,className:"".concat(c,"-input"),checked:!!Y,onClick:A,onFocus:O,onBlur:M,onKeyUp:z,onKeyDown:R,onKeyPress:N,onChange:this.handleChange,autoFocus:B,ref:this.saveInput,value:U,...te}),E("span",{className:"".concat(c,"-inner")})]})}}],[{key:"getDerivedStateFromProps",value:function(i,l){return"checked"in i?ve(ve({},l),{},{checked:i.checked}):null}}]),n}(C.exports.Component);C4.defaultProps={prefixCls:"rc-checkbox",className:"",style:{},type:"checkbox",defaultChecked:!1,onFocus:function(){},onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){}};var Kq=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Hq=function(t,n){var r,i=C.exports.useContext(J7),l=C.exports.useContext(eA),c=C.exports.useContext(Nn),o=c.getPrefixCls,h=c.direction,p=C.exports.useRef(),g=Lo(n,p),b=C.exports.useContext(Yo),w=b.isFormItemInput,P=function(Y){var le,J;(le=t.onChange)===null||le===void 0||le.call(t,Y),(J=i==null?void 0:i.onChange)===null||J===void 0||J.call(i,Y)},I=t.prefixCls,A=t.className,O=t.children,M=t.style,R=t.disabled,N=Kq(t,["prefixCls","className","children","style","disabled"]),z=o("radio",I),B=((i==null?void 0:i.optionType)||l)==="button"?"".concat(z,"-button"):z,U=tt({},N),q=C.exports.useContext(pu);U.disabled=R||q,i&&(U.name=i.name,U.onChange=P,U.checked=t.value===i.value,U.disabled=U.disabled||i.disabled);var H=Ye("".concat(B,"-wrapper"),(r={},se(r,"".concat(B,"-wrapper-checked"),U.checked),se(r,"".concat(B,"-wrapper-disabled"),U.disabled),se(r,"".concat(B,"-wrapper-rtl"),h==="rtl"),se(r,"".concat(B,"-wrapper-in-form-item"),w),r),A);return Qe("label",{className:H,style:M,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,children:[E(C4,{...U,type:"radio",prefixCls:B,ref:g}),O!==void 0?E("span",{children:O}):null]})},Wq=C.exports.forwardRef(Hq);const ky=Wq;var Gq=C.exports.forwardRef(function(e,t){var n,r=C.exports.useContext(Nn),i=r.getPrefixCls,l=r.direction,c=C.exports.useContext(ms),o=Vi(e.defaultValue,{value:e.value}),h=ze(o,2),p=h[0],g=h[1],b=function(de){var oe=p,ye=de.target.value;"value"in e||g(ye);var Re=e.onChange;Re&&ye!==oe&&Re(de)},w=e.prefixCls,P=e.className,I=P===void 0?"":P,A=e.options,O=e.buttonStyle,M=O===void 0?"outline":O,R=e.disabled,N=e.children,z=e.size,B=e.style,U=e.id,q=e.onMouseEnter,H=e.onMouseLeave,te=e.onFocus,Y=e.onBlur,le=i("radio",w),J="".concat(le,"-group"),Z=N;A&&A.length>0&&(Z=A.map(function(re){return typeof re=="string"||typeof re=="number"?E(ky,{prefixCls:le,disabled:R,value:re,checked:p===re,children:re},re.toString()):E(ky,{prefixCls:le,disabled:re.disabled||R,value:re.value,checked:p===re.value,style:re.style,children:re.label},"radio-group-value-options-".concat(re.value))}));var Q=z||c,ge=Ye(J,"".concat(J,"-").concat(M),(n={},se(n,"".concat(J,"-").concat(Q),Q),se(n,"".concat(J,"-rtl"),l==="rtl"),n),I);return E("div",{...xR(e),className:ge,style:B,onMouseEnter:q,onMouseLeave:H,onFocus:te,onBlur:Y,id:U,ref:t,children:E(Uq,{value:{onChange:b,value:p,disabled:e.disabled,name:e.name,optionType:e.optionType},children:Z})})});const qq=C.exports.memo(Gq);var Zq=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Xq=function(t,n){var r=C.exports.useContext(Nn),i=r.getPrefixCls,l=t.prefixCls,c=Zq(t,["prefixCls"]),o=i("radio",l);return E(jq,{value:"button",children:E(ky,{prefixCls:o,...c,type:"radio",ref:n})})};const Yq=C.exports.forwardRef(Xq);var V0=ky;V0.Button=Yq;V0.Group=qq;V0.__ANT_RADIO=!0;const tA=V0;var Qq=vs,Jq=function(){return Qq.Date.now()},eZ=Jq,tZ=B0,g_=eZ,O5=Vq,nZ="Expected a function",rZ=Math.max,iZ=Math.min;function oZ(e,t,n){var r,i,l,c,o,h,p=0,g=!1,b=!1,w=!0;if(typeof e!="function")throw new TypeError(nZ);t=O5(t)||0,tZ(n)&&(g=!!n.leading,b="maxWait"in n,l=b?rZ(O5(n.maxWait)||0,t):l,w="trailing"in n?!!n.trailing:w);function P(U){var q=r,H=i;return r=i=void 0,p=U,c=e.apply(H,q),c}function I(U){return p=U,o=setTimeout(M,t),g?P(U):c}function A(U){var q=U-h,H=U-p,te=t-q;return b?iZ(te,l-H):te}function O(U){var q=U-h,H=U-p;return h===void 0||q>=t||q<0||b&&H>=l}function M(){var U=g_();if(O(U))return R(U);o=setTimeout(M,A(U))}function R(U){return o=void 0,w&&r?P(U):(r=i=void 0,c)}function N(){o!==void 0&&clearTimeout(o),p=0,r=h=i=o=void 0}function z(){return o===void 0?c:R(g_())}function B(){var U=g_(),q=O(U);if(r=arguments,i=this,h=U,q){if(o===void 0)return I(h);if(b)return clearTimeout(o),o=setTimeout(M,t),P(h)}return o===void 0&&(o=setTimeout(M,t)),c}return B.cancel=N,B.flush=z,B}var aZ=oZ;function nA(e,t){var n=new Set;return e.forEach(function(r){t.has(r)||n.add(r)}),n}function sZ(e){var t=e||{},n=t.disabled,r=t.disableCheckbox,i=t.checkable;return!!(n||r)||i===!1}function lZ(e,t,n,r){for(var i=new Set(e),l=new Set,c=0;c<=n;c+=1){var o=t.get(c)||new Set;o.forEach(function(b){var w=b.key,P=b.node,I=b.children,A=I===void 0?[]:I;i.has(w)&&!r(P)&&A.filter(function(O){return!r(O.node)}).forEach(function(O){i.add(O.key)})})}for(var h=new Set,p=n;p>=0;p-=1){var g=t.get(p)||new Set;g.forEach(function(b){var w=b.parent,P=b.node;if(!(r(P)||!b.parent||h.has(b.parent.key))){if(r(b.parent.node)){h.add(w.key);return}var I=!0,A=!1;(w.children||[]).filter(function(O){return!r(O.node)}).forEach(function(O){var M=O.key,R=i.has(M);I&&!R&&(I=!1),!A&&(R||l.has(M))&&(A=!0)}),I&&i.add(w.key),A&&l.add(w.key),h.add(w.key)}})}return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(nA(l,i))}}function uZ(e,t,n,r,i){for(var l=new Set(e),c=new Set(t),o=0;o<=r;o+=1){var h=n.get(o)||new Set;h.forEach(function(w){var P=w.key,I=w.node,A=w.children,O=A===void 0?[]:A;!l.has(P)&&!c.has(P)&&!i(I)&&O.filter(function(M){return!i(M.node)}).forEach(function(M){l.delete(M.key)})})}c=new Set;for(var p=new Set,g=r;g>=0;g-=1){var b=n.get(g)||new Set;b.forEach(function(w){var P=w.parent,I=w.node;if(!(i(I)||!w.parent||p.has(w.parent.key))){if(i(w.parent.node)){p.add(P.key);return}var A=!0,O=!1;(P.children||[]).filter(function(M){return!i(M.node)}).forEach(function(M){var R=M.key,N=l.has(R);A&&!N&&(A=!1),!O&&(N||c.has(R))&&(O=!0)}),A||l.delete(P.key),O&&c.add(P.key),p.add(P.key)}})}return{checkedKeys:Array.from(l),halfCheckedKeys:Array.from(nA(c,l))}}function Gs(e,t,n,r){var i=[],l;r?l=r:l=sZ;var c=new Set(e.filter(function(g){var b=!!n[g];return b||i.push(g),b})),o=new Map,h=0;Object.keys(n).forEach(function(g){var b=n[g],w=b.level,P=o.get(w);P||(P=new Set,o.set(w,P)),P.add(b),h=Math.max(h,w)}),Nr(!i.length,"Tree missing follow keys: ".concat(i.slice(0,100).map(function(g){return"'".concat(g,"'")}).join(", ")));var p;return t===!0?p=lZ(c,o,h,l):p=uZ(c,t.halfCheckedKeys,o,h,l),p}var S4=C.exports.createContext(null),cZ=function(t){for(var n=t.prefixCls,r=t.level,i=t.isStart,l=t.isEnd,c="".concat(n,"-indent-unit"),o=[],h=0;h<r;h+=1){var p;o.push(E("span",{className:Ye(c,(p={},se(p,"".concat(c,"-start"),i[h]),se(p,"".concat(c,"-end"),l[h]),p))},h))}return E("span",{"aria-hidden":"true",className:"".concat(n,"-indent"),children:o})};const dZ=C.exports.memo(cZ);var fZ=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],N5="open",D5="close",hZ="---",pZ=function(e){li(n,e);var t=ui(n);function n(){var r;Kr(this,n);for(var i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];return r=t.call.apply(t,[this].concat(l)),r.state={dragNodeHighlight:!1},r.selectHandle=void 0,r.onSelectorClick=function(o){var h=r.props.context.onNodeClick;h(o,wi(r.props)),r.isSelectable()?r.onSelect(o):r.onCheck(o)},r.onSelectorDoubleClick=function(o){var h=r.props.context.onNodeDoubleClick;h(o,wi(r.props))},r.onSelect=function(o){if(!r.isDisabled()){var h=r.props.context.onNodeSelect;o.preventDefault(),h(o,wi(r.props))}},r.onCheck=function(o){if(!r.isDisabled()){var h=r.props,p=h.disableCheckbox,g=h.checked,b=r.props.context.onNodeCheck;if(!(!r.isCheckable()||p)){o.preventDefault();var w=!g;b(o,wi(r.props),w)}}},r.onMouseEnter=function(o){var h=r.props.context.onNodeMouseEnter;h(o,wi(r.props))},r.onMouseLeave=function(o){var h=r.props.context.onNodeMouseLeave;h(o,wi(r.props))},r.onContextMenu=function(o){var h=r.props.context.onNodeContextMenu;h(o,wi(r.props))},r.onDragStart=function(o){var h=r.props.context.onNodeDragStart;o.stopPropagation(),r.setState({dragNodeHighlight:!0}),h(o,On(r));try{o.dataTransfer.setData("text/plain","")}catch{}},r.onDragEnter=function(o){var h=r.props.context.onNodeDragEnter;o.preventDefault(),o.stopPropagation(),h(o,On(r))},r.onDragOver=function(o){var h=r.props.context.onNodeDragOver;o.preventDefault(),o.stopPropagation(),h(o,On(r))},r.onDragLeave=function(o){var h=r.props.context.onNodeDragLeave;o.stopPropagation(),h(o,On(r))},r.onDragEnd=function(o){var h=r.props.context.onNodeDragEnd;o.stopPropagation(),r.setState({dragNodeHighlight:!1}),h(o,On(r))},r.onDrop=function(o){var h=r.props.context.onNodeDrop;o.preventDefault(),o.stopPropagation(),r.setState({dragNodeHighlight:!1}),h(o,On(r))},r.onExpand=function(o){var h=r.props,p=h.loading,g=h.context.onNodeExpand;p||g(o,wi(r.props))},r.setSelectHandle=function(o){r.selectHandle=o},r.getNodeState=function(){var o=r.props.expanded;return r.isLeaf()?null:o?N5:D5},r.hasChildren=function(){var o=r.props.eventKey,h=r.props.context.keyEntities,p=h[o]||{},g=p.children;return!!(g||[]).length},r.isLeaf=function(){var o=r.props,h=o.isLeaf,p=o.loaded,g=r.props.context.loadData,b=r.hasChildren();return h===!1?!1:h||!g&&!b||g&&p&&!b},r.isDisabled=function(){var o=r.props.disabled,h=r.props.context.disabled;return!!(h||o)},r.isCheckable=function(){var o=r.props.checkable,h=r.props.context.checkable;return!h||o===!1?!1:h},r.syncLoadData=function(o){var h=o.expanded,p=o.loading,g=o.loaded,b=r.props.context,w=b.loadData,P=b.onNodeLoad;p||w&&h&&!r.isLeaf()&&!r.hasChildren()&&!g&&P(wi(r.props))},r.isDraggable=function(){var o=r.props,h=o.data,p=o.context.draggable;return!!(p&&(!p.nodeDraggable||p.nodeDraggable(h)))},r.renderDragHandler=function(){var o=r.props.context,h=o.draggable,p=o.prefixCls;return h!=null&&h.icon?E("span",{className:"".concat(p,"-draggable-icon"),children:h.icon}):null},r.renderSwitcherIconDom=function(o){var h=r.props.switcherIcon,p=r.props.context.switcherIcon,g=h||p;return typeof g=="function"?g(ve(ve({},r.props),{},{isLeaf:o})):g},r.renderSwitcher=function(){var o=r.props.expanded,h=r.props.context.prefixCls;if(r.isLeaf()){var p=r.renderSwitcherIconDom(!0);return p!==!1?E("span",{className:Ye("".concat(h,"-switcher"),"".concat(h,"-switcher-noop")),children:p}):null}var g=Ye("".concat(h,"-switcher"),"".concat(h,"-switcher_").concat(o?N5:D5)),b=r.renderSwitcherIconDom(!1);return b!==!1?E("span",{onClick:r.onExpand,className:g,children:b}):null},r.renderCheckbox=function(){var o=r.props,h=o.checked,p=o.halfChecked,g=o.disableCheckbox,b=r.props.context.prefixCls,w=r.isDisabled(),P=r.isCheckable();if(!P)return null;var I=typeof P!="boolean"?P:null;return E("span",{className:Ye("".concat(b,"-checkbox"),h&&"".concat(b,"-checkbox-checked"),!h&&p&&"".concat(b,"-checkbox-indeterminate"),(w||g)&&"".concat(b,"-checkbox-disabled")),onClick:r.onCheck,children:I})},r.renderIcon=function(){var o=r.props.loading,h=r.props.context.prefixCls;return E("span",{className:Ye("".concat(h,"-iconEle"),"".concat(h,"-icon__").concat(r.getNodeState()||"docu"),o&&"".concat(h,"-icon_loading"))})},r.renderSelector=function(){var o=r.state.dragNodeHighlight,h=r.props,p=h.title,g=h.selected,b=h.icon,w=h.loading,P=h.data,I=r.props.context,A=I.prefixCls,O=I.showIcon,M=I.icon,R=I.loadData,N=I.titleRender,z=r.isDisabled(),B="".concat(A,"-node-content-wrapper"),U;if(O){var q=b||M;U=q?E("span",{className:Ye("".concat(A,"-iconEle"),"".concat(A,"-icon__customize")),children:typeof q=="function"?q(r.props):q}):r.renderIcon()}else R&&w&&(U=r.renderIcon());var H;typeof p=="function"?H=p(P):N?H=N(P):H=p;var te=E("span",{className:"".concat(A,"-title"),children:H});return Qe("span",{ref:r.setSelectHandle,title:typeof p=="string"?p:"",className:Ye("".concat(B),"".concat(B,"-").concat(r.getNodeState()||"normal"),!z&&(g||o)&&"".concat(A,"-node-selected")),onMouseEnter:r.onMouseEnter,onMouseLeave:r.onMouseLeave,onContextMenu:r.onContextMenu,onClick:r.onSelectorClick,onDoubleClick:r.onSelectorDoubleClick,children:[U,te,r.renderDropIndicator()]})},r.renderDropIndicator=function(){var o=r.props,h=o.disabled,p=o.eventKey,g=r.props.context,b=g.draggable,w=g.dropLevelOffset,P=g.dropPosition,I=g.prefixCls,A=g.indent,O=g.dropIndicatorRender,M=g.dragOverNodeKey,R=g.direction,N=!!b,z=!h&&N&&M===p;return z?O({dropPosition:P,dropLevelOffset:w,indent:A,prefixCls:I,direction:R}):null},r}return Hr(n,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var i=this.props.selectable,l=this.props.context.selectable;return typeof i=="boolean"?i:l}},{key:"render",value:function(){var i,l=this.props,c=l.eventKey,o=l.className,h=l.style,p=l.dragOver,g=l.dragOverGapTop,b=l.dragOverGapBottom,w=l.isLeaf,P=l.isStart,I=l.isEnd,A=l.expanded,O=l.selected,M=l.checked,R=l.halfChecked,N=l.loading,z=l.domRef,B=l.active;l.data;var U=l.onMouseMove,q=l.selectable,H=In(l,fZ),te=this.props.context,Y=te.prefixCls,le=te.filterTreeNode,J=te.keyEntities,Z=te.dropContainerKey,Q=te.dropTargetKey,ge=te.draggingNodeKey,re=this.isDisabled(),de=au(H,{aria:!0,data:!0}),oe=J[c]||{},ye=oe.level,Re=I[I.length-1],Te=this.isDraggable(),ke=!re&&Te,De=ge===c,Me=q!==void 0?{"aria-selected":!!q}:void 0;return Qe("div",{ref:z,className:Ye(o,"".concat(Y,"-treenode"),(i={},se(i,"".concat(Y,"-treenode-disabled"),re),se(i,"".concat(Y,"-treenode-switcher-").concat(A?"open":"close"),!w),se(i,"".concat(Y,"-treenode-checkbox-checked"),M),se(i,"".concat(Y,"-treenode-checkbox-indeterminate"),R),se(i,"".concat(Y,"-treenode-selected"),O),se(i,"".concat(Y,"-treenode-loading"),N),se(i,"".concat(Y,"-treenode-active"),B),se(i,"".concat(Y,"-treenode-leaf-last"),Re),se(i,"".concat(Y,"-treenode-draggable"),Te),se(i,"dragging",De),se(i,"drop-target",Q===c),se(i,"drop-container",Z===c),se(i,"drag-over",!re&&p),se(i,"drag-over-gap-top",!re&&g),se(i,"drag-over-gap-bottom",!re&&b),se(i,"filter-node",le&&le(wi(this.props))),i)),style:h,draggable:ke,"aria-grabbed":De,onDragStart:ke?this.onDragStart:void 0,onDragEnter:Te?this.onDragEnter:void 0,onDragOver:Te?this.onDragOver:void 0,onDragLeave:Te?this.onDragLeave:void 0,onDrop:Te?this.onDrop:void 0,onDragEnd:Te?this.onDragEnd:void 0,onMouseMove:U,...Me,...de,children:[E(dZ,{prefixCls:Y,level:ye,isStart:P,isEnd:I}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector()]})}}]),n}(C.exports.Component),yc=function(t){return E(S4.Consumer,{children:function(n){return E(pZ,{...t,context:n})}})};yc.displayName="TreeNode";yc.defaultProps={title:hZ};yc.isTreeNode=1;function is(e,t){if(!e)return[];var n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function Ds(e,t){var n=(e||[]).slice();return n.indexOf(t)===-1&&n.push(t),n}function E4(e){return e.split("-")}function rA(e,t){return"".concat(e,"-").concat(t)}function mZ(e){return e&&e.type&&e.type.isTreeNode}function vZ(e,t){var n=[],r=t[e];function i(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];l.forEach(function(c){var o=c.key,h=c.children;n.push(o),i(h)})}return i(r.children),n}function gZ(e){if(e.parent){var t=E4(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function yZ(e){var t=E4(e.pos);return Number(t[t.length-1])===0}function L5(e,t,n,r,i,l,c,o,h,p){var g,b=e.clientX,w=e.clientY,P=e.target.getBoundingClientRect(),I=P.top,A=P.height,O=(p==="rtl"?-1:1)*(((i==null?void 0:i.x)||0)-b),M=(O-12)/r,R=o[n.props.eventKey];if(w<I+A/2){var N=c.findIndex(function(ge){return ge.key===R.key}),z=N<=0?0:N-1,B=c[z].key;R=o[B]}var U=R.key,q=R,H=R.key,te=0,Y=0;if(!h.includes(U))for(var le=0;le<M&&gZ(R);le+=1)R=R.parent,Y+=1;var J=t.props.data,Z=R.node,Q=!0;return yZ(R)&&R.level===0&&w<I+A/2&&l({dragNode:J,dropNode:Z,dropPosition:-1})&&R.key===n.props.eventKey?te=-1:(q.children||[]).length&&h.includes(H)?l({dragNode:J,dropNode:Z,dropPosition:0})?te=0:Q=!1:Y===0?M>-1.5?l({dragNode:J,dropNode:Z,dropPosition:1})?te=1:Q=!1:l({dragNode:J,dropNode:Z,dropPosition:0})?te=0:l({dragNode:J,dropNode:Z,dropPosition:1})?te=1:Q=!1:l({dragNode:J,dropNode:Z,dropPosition:1})?te=1:Q=!1,{dropPosition:te,dropLevelOffset:Y,dropTargetKey:R.key,dropTargetPos:R.pos,dragOverNodeKey:H,dropContainerKey:te===0?null:((g=R.parent)===null||g===void 0?void 0:g.key)||null,dropAllowed:Q}}function z5(e,t){if(!!e){var n=t.multiple;return n?e.slice():e.length?[e[0]]:e}}function y_(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(sn(e)==="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return Nr(!1,"`checkedKeys` is not an array or an object"),null;return t}function $2(e,t){var n=new Set;function r(i){if(!n.has(i)){var l=t[i];if(!!l){n.add(i);var c=l.parent,o=l.node;o.disabled||c&&r(c.key)}}}return(e||[]).forEach(function(i){r(i)}),wt(n)}var xZ=["children"];function tm(e,t){return e!=null?e:t}function Ty(e){var t=e||{},n=t.title,r=t._title,i=t.key,l=t.children,c=n||"title";return{title:c,_title:r||[c],key:i||"key",children:l||"children"}}function iA(e){function t(n){var r=Xi(n);return r.map(function(i){if(!mZ(i))return Nr(!i,"Tree/TreeNode can only accept TreeNode as children."),null;var l=i.key,c=i.props,o=c.children,h=In(c,xZ),p=ve({key:l},h),g=t(o);return g.length&&(p.children=g),p}).filter(function(i){return i})}return t(e)}function x_(e,t,n){var r=Ty(n),i=r._title,l=r.key,c=r.children,o=new Set(t===!0?[]:t),h=[];function p(g){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return g.map(function(w,P){for(var I=rA(b?b.pos:"0",P),A=tm(w[l],I),O,M=0;M<i.length;M+=1){var R=i[M];if(w[R]!==void 0){O=w[R];break}}var N=ve(ve({},mi(w,[].concat(wt(i),[l,c]))),{},{title:O,key:A,parent:b,pos:I,children:null,data:w,isStart:[].concat(wt(b?b.isStart:[]),[P===0]),isEnd:[].concat(wt(b?b.isEnd:[]),[P===g.length-1])});return h.push(N),t===!0||o.has(A)?N.children=p(w[c]||[],N):N.children=[],N})}return p(e),h}function _Z(e,t,n){var r={};sn(n)==="object"?r=n:r={externalGetKey:n},r=r||{};var i=r,l=i.childrenPropName,c=i.externalGetKey,o=i.fieldNames,h=Ty(o),p=h.key,g=h.children,b=l||g,w;c?typeof c=="string"?w=function(A){return A[c]}:typeof c=="function"&&(w=function(A){return c(A)}):w=function(A,O){return tm(A[p],O)};function P(I,A,O,M){var R=I?I[b]:e,N=I?rA(O.pos,A):"0",z=I?[].concat(wt(M),[I]):[];if(I){var B=w(I,N),U={node:I,index:A,pos:N,key:B,parentPos:O.node?O.pos:null,level:O.level+1,nodes:z};t(U)}R&&R.forEach(function(q,H){P(q,H,{node:I,pos:N,level:O?O.level+1:-1},z)})}P(null)}function U0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.initWrapper,r=t.processEntity,i=t.onProcessFinished,l=t.externalGetKey,c=t.childrenPropName,o=t.fieldNames,h=arguments.length>2?arguments[2]:void 0,p=l||h,g={},b={},w={posEntities:g,keyEntities:b};return n&&(w=n(w)||w),_Z(e,function(P){var I=P.node,A=P.index,O=P.pos,M=P.key,R=P.parentPos,N=P.level,z=P.nodes,B={node:I,nodes:z,index:A,key:M,pos:O,level:N},U=tm(M,O);g[O]=B,b[U]=B,B.parent=g[R],B.parent&&(B.parent.children=B.parent.children||[],B.parent.children.push(B)),r&&r(B,w)},{externalGetKey:p,childrenPropName:c,fieldNames:o}),i&&i(w),w}function np(e,t){var n=t.expandedKeys,r=t.selectedKeys,i=t.loadedKeys,l=t.loadingKeys,c=t.checkedKeys,o=t.halfCheckedKeys,h=t.dragOverNodeKey,p=t.dropPosition,g=t.keyEntities,b=g[e],w={eventKey:e,expanded:n.indexOf(e)!==-1,selected:r.indexOf(e)!==-1,loaded:i.indexOf(e)!==-1,loading:l.indexOf(e)!==-1,checked:c.indexOf(e)!==-1,halfChecked:o.indexOf(e)!==-1,pos:String(b?b.pos:""),dragOver:h===e&&p===0,dragOverGapTop:h===e&&p===-1,dragOverGapBottom:h===e&&p===1};return w}function wi(e){var t=e.data,n=e.expanded,r=e.selected,i=e.checked,l=e.loaded,c=e.loading,o=e.halfChecked,h=e.dragOver,p=e.dragOverGapTop,g=e.dragOverGapBottom,b=e.pos,w=e.active,P=e.eventKey,I=ve(ve({},t),{},{expanded:n,selected:r,checked:i,loaded:l,loading:c,halfChecked:o,dragOver:h,dragOverGapTop:p,dragOverGapBottom:g,pos:b,active:w,key:P});return"props"in I||Object.defineProperty(I,"props",{get:function(){return Nr(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),I}var bZ=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},oA=C.exports.createContext(null),wZ=function(t,n){var r=t.defaultValue,i=t.children,l=t.options,c=l===void 0?[]:l,o=t.prefixCls,h=t.className,p=t.style,g=t.onChange,b=bZ(t,["defaultValue","children","options","prefixCls","className","style","onChange"]),w=C.exports.useContext(Nn),P=w.getPrefixCls,I=w.direction,A=C.exports.useState(b.value||r||[]),O=ze(A,2),M=O[0],R=O[1],N=C.exports.useState([]),z=ze(N,2),B=z[0],U=z[1];C.exports.useEffect(function(){"value"in b&&R(b.value||[])},[b.value]);var q=function(){return c.map(function(de){return typeof de=="string"||typeof de=="number"?{label:de,value:de}:de})},H=function(de){U(function(oe){return oe.filter(function(ye){return ye!==de})})},te=function(de){U(function(oe){return[].concat(wt(oe),[de])})},Y=function(de){var oe=M.indexOf(de.value),ye=wt(M);oe===-1?ye.push(de.value):ye.splice(oe,1),"value"in b||R(ye);var Re=q();g==null||g(ye.filter(function(Te){return B.includes(Te)}).sort(function(Te,ke){var De=Re.findIndex(function(Ne){return Ne.value===Te}),Me=Re.findIndex(function(Ne){return Ne.value===ke});return De-Me}))},le=P("checkbox",o),J="".concat(le,"-group"),Z=mi(b,["value","disabled"]);c&&c.length>0&&(i=q().map(function(re){return E(aA,{prefixCls:le,disabled:"disabled"in re?re.disabled:b.disabled,value:re.value,checked:M.includes(re.value),onChange:re.onChange,className:"".concat(J,"-item"),style:re.style,children:re.label},re.value.toString())}));var Q={toggleOption:Y,value:M,disabled:b.disabled,name:b.name,registerValue:te,cancelValue:H},ge=Ye(J,se({},"".concat(J,"-rtl"),I==="rtl"),h);return E("div",{className:ge,style:p,...Z,ref:n,children:E(oA.Provider,{value:Q,children:i})})},CZ=C.exports.forwardRef(wZ);const SZ=C.exports.memo(CZ);var EZ=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},kZ=function(t,n){var r,i,l=t.prefixCls,c=t.className,o=t.children,h=t.indeterminate,p=h===void 0?!1:h,g=t.style,b=t.onMouseEnter,w=t.onMouseLeave,P=t.skipGroup,I=P===void 0?!1:P,A=t.disabled,O=EZ(t,["prefixCls","className","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),M=C.exports.useContext(Nn),R=M.getPrefixCls,N=M.direction,z=C.exports.useContext(oA),B=C.exports.useContext(Yo),U=B.isFormItemInput,q=C.exports.useContext(pu),H=(i=(z==null?void 0:z.disabled)||A)!==null&&i!==void 0?i:q,te=C.exports.useRef(O.value);C.exports.useEffect(function(){z==null||z.registerValue(O.value)},[]),C.exports.useEffect(function(){if(!I)return O.value!==te.current&&(z==null||z.cancelValue(te.current),z==null||z.registerValue(O.value),te.current=O.value),function(){return z==null?void 0:z.cancelValue(O.value)}},[O.value]);var Y=R("checkbox",l),le=tt({},O);z&&!I&&(le.onChange=function(){O.onChange&&O.onChange.apply(O,arguments),z.toggleOption&&z.toggleOption({label:o,value:O.value})},le.name=z.name,le.checked=z.value.includes(O.value));var J=Ye((r={},se(r,"".concat(Y,"-wrapper"),!0),se(r,"".concat(Y,"-rtl"),N==="rtl"),se(r,"".concat(Y,"-wrapper-checked"),le.checked),se(r,"".concat(Y,"-wrapper-disabled"),H),se(r,"".concat(Y,"-wrapper-in-form-item"),U),r),c),Z=Ye(se({},"".concat(Y,"-indeterminate"),p)),Q=p?"mixed":void 0;return Qe("label",{className:J,style:g,onMouseEnter:b,onMouseLeave:w,children:[E(C4,{"aria-checked":Q,...le,prefixCls:Y,className:Z,disabled:H,ref:n}),o!==void 0&&E("span",{children:o})]})},TZ=C.exports.forwardRef(kZ);const aA=TZ;var k4=aA;k4.Group=SZ;k4.__ANT_CHECKBOX=!0;const xc=k4;var PZ=C.exports.createContext({});const sA=PZ;var IZ=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function MZ(e){return typeof e=="number"?"".concat(e," ").concat(e," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?"0 0 ".concat(e):e}var RZ=["xs","sm","md","lg","xl","xxl"],AZ=C.exports.forwardRef(function(e,t){var n,r=C.exports.useContext(Nn),i=r.getPrefixCls,l=r.direction,c=C.exports.useContext(sA),o=c.gutter,h=c.wrap,p=c.supportFlexGap,g=e.prefixCls,b=e.span,w=e.order,P=e.offset,I=e.push,A=e.pull,O=e.className,M=e.children,R=e.flex,N=e.style,z=IZ(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),B=i("col",g),U={};RZ.forEach(function(le){var J,Z={},Q=e[le];typeof Q=="number"?Z.span=Q:sn(Q)==="object"&&(Z=Q||{}),delete z[le],U=tt(tt({},U),(J={},se(J,"".concat(B,"-").concat(le,"-").concat(Z.span),Z.span!==void 0),se(J,"".concat(B,"-").concat(le,"-order-").concat(Z.order),Z.order||Z.order===0),se(J,"".concat(B,"-").concat(le,"-offset-").concat(Z.offset),Z.offset||Z.offset===0),se(J,"".concat(B,"-").concat(le,"-push-").concat(Z.push),Z.push||Z.push===0),se(J,"".concat(B,"-").concat(le,"-pull-").concat(Z.pull),Z.pull||Z.pull===0),se(J,"".concat(B,"-rtl"),l==="rtl"),J))});var q=Ye(B,(n={},se(n,"".concat(B,"-").concat(b),b!==void 0),se(n,"".concat(B,"-order-").concat(w),w),se(n,"".concat(B,"-offset-").concat(P),P),se(n,"".concat(B,"-push-").concat(I),I),se(n,"".concat(B,"-pull-").concat(A),A),n),O,U),H={};if(o&&o[0]>0){var te=o[0]/2;H.paddingLeft=te,H.paddingRight=te}if(o&&o[1]>0&&!p){var Y=o[1]/2;H.paddingTop=Y,H.paddingBottom=Y}return R&&(H.flex=MZ(R),h===!1&&!H.minWidth&&(H.minWidth=0)),E("div",{...z,style:tt(tt({},H),N),className:q,ref:t,children:M})});const Py=AZ;var OZ=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};ra("top","middle","bottom","stretch");ra("start","end","center","space-around","space-between","space-evenly");function F5(e,t){var n=C.exports.useState(typeof e=="string"?e:""),r=ze(n,2),i=r[0],l=r[1],c=function(){if(typeof e=="string"&&l(e),sn(e)==="object")for(var h=0;h<_y.length;h++){var p=_y[h];if(!!t[p]){var g=e[p];if(g!==void 0){l(g);return}}}};return C.exports.useEffect(function(){c()},[JSON.stringify(e),t]),i}var NZ=C.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.justify,l=e.align,c=e.className,o=e.style,h=e.children,p=e.gutter,g=p===void 0?0:p,b=e.wrap,w=OZ(e,["prefixCls","justify","align","className","style","children","gutter","wrap"]),P=C.exports.useContext(Nn),I=P.getPrefixCls,A=P.direction,O=C.exports.useState({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),M=ze(O,2),R=M[0],N=M[1],z=C.exports.useState({xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1}),B=ze(z,2),U=B[0],q=B[1],H=F5(l,U),te=F5(i,U),Y=W7(),le=C.exports.useRef(g);C.exports.useEffect(function(){var Me=by.subscribe(function(Ne){q(Ne);var Le=le.current||0;(!Array.isArray(Le)&&sn(Le)==="object"||Array.isArray(Le)&&(sn(Le[0])==="object"||sn(Le[1])==="object"))&&N(Ne)});return function(){return by.unsubscribe(Me)}},[]);var J=function(){var Ne=[void 0,void 0],Le=Array.isArray(g)?g:[g,void 0];return Le.forEach(function(Ve,qe){if(sn(Ve)==="object")for(var Ue=0;Ue<_y.length;Ue++){var ct=_y[Ue];if(R[ct]&&Ve[ct]!==void 0){Ne[qe]=Ve[ct];break}}else Ne[qe]=Ve}),Ne},Z=I("row",r),Q=J(),ge=Ye(Z,(n={},se(n,"".concat(Z,"-no-wrap"),b===!1),se(n,"".concat(Z,"-").concat(te),te),se(n,"".concat(Z,"-").concat(H),H),se(n,"".concat(Z,"-rtl"),A==="rtl"),n),c),re={},de=Q[0]!=null&&Q[0]>0?Q[0]/-2:void 0,oe=Q[1]!=null&&Q[1]>0?Q[1]/-2:void 0;if(de&&(re.marginLeft=de,re.marginRight=de),Y){var ye=ze(Q,2);re.rowGap=ye[1]}else oe&&(re.marginTop=oe,re.marginBottom=oe);var Re=ze(Q,2),Te=Re[0],ke=Re[1],De=C.exports.useMemo(function(){return{gutter:[Te,ke],wrap:b,supportFlexGap:Y}},[Te,ke,b,Y]);return E(sA.Provider,{value:De,children:E("div",{...w,className:ge,style:tt(tt({},re),o),ref:t,children:h})})});const lA=NZ;var uA=C.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.forceRender,l=e.className,c=e.style,o=e.children,h=e.isActive,p=e.role,g=C.exports.useState(h||i),b=ze(g,2),w=b[0],P=b[1];return C.exports.useEffect(function(){(i||h)&&P(!0)},[i,h]),w?E("div",{ref:t,className:Ye("".concat(r,"-content"),(n={},se(n,"".concat(r,"-content-active"),h),se(n,"".concat(r,"-content-inactive"),!h),n),l),style:c,role:p,children:E("div",{className:"".concat(r,"-content-box"),children:o})}):null});uA.displayName="PanelContent";var DZ=["className","id","style","prefixCls","headerClass","children","isActive","destroyInactivePanel","accordion","forceRender","openMotion","extra","collapsible"],cA=function(e){li(n,e);var t=ui(n);function n(){var r;Kr(this,n);for(var i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];return r=t.call.apply(t,[this].concat(l)),r.onItemClick=function(){var o=r.props,h=o.onItemClick,p=o.panelKey;typeof h=="function"&&h(p)},r.handleKeyPress=function(o){(o.key==="Enter"||o.keyCode===13||o.which===13)&&r.onItemClick()},r.renderIcon=function(){var o=r.props,h=o.showArrow,p=o.expandIcon,g=o.prefixCls,b=o.collapsible;if(!h)return null;var w=typeof p=="function"?p(r.props):E("i",{className:"arrow"});return w&&E("div",{className:"".concat(g,"-expand-icon"),onClick:b==="header"||b==="icon"?r.onItemClick:null,children:w})},r.renderTitle=function(){var o=r.props,h=o.header,p=o.prefixCls,g=o.collapsible;return E("span",{className:"".concat(p,"-header-text"),onClick:g==="header"?r.onItemClick:null,children:h})},r}return Hr(n,[{key:"shouldComponentUpdate",value:function(i){return!gc(this.props,i)}},{key:"render",value:function(){var i,l,c=this.props,o=c.className,h=c.id,p=c.style,g=c.prefixCls,b=c.headerClass,w=c.children,P=c.isActive,I=c.destroyInactivePanel,A=c.accordion,O=c.forceRender,M=c.openMotion,R=c.extra,N=c.collapsible,z=In(c,DZ),B=N==="disabled",U=N==="header",q=N==="icon",H=Ye((i={},se(i,"".concat(g,"-item"),!0),se(i,"".concat(g,"-item-active"),P),se(i,"".concat(g,"-item-disabled"),B),i),o),te=Ye("".concat(g,"-header"),(l={},se(l,b,b),se(l,"".concat(g,"-header-collapsible-only"),U),se(l,"".concat(g,"-icon-collapsible-only"),q),l)),Y={className:te,"aria-expanded":P,"aria-disabled":B,onKeyPress:this.handleKeyPress};!U&&!q&&(Y.onClick=this.onItemClick,Y.role=A?"tab":"button",Y.tabIndex=B?-1:0);var le=R!=null&&typeof R!="boolean";return delete z.header,delete z.panelKey,delete z.onItemClick,delete z.showArrow,delete z.expandIcon,Qe("div",{...z,className:H,style:p,id:h,children:[Qe("div",{...Y,children:[this.renderIcon(),this.renderTitle(),le&&E("div",{className:"".concat(g,"-extra"),children:R})]}),E(Ca,{visible:P,leavedClassName:"".concat(g,"-content-hidden"),...M,forceRender:O,removeOnLeave:I,children:function(J,Z){var Q=J.className,ge=J.style;return E(uA,{ref:Z,prefixCls:g,className:Q,style:ge,isActive:P,forceRender:O,role:A?"tabpanel":null,children:w})}})]})}}]),n}(C.exports.Component);cA.defaultProps={showArrow:!0,isActive:!1,onItemClick:function(){},headerClass:"",forceRender:!1};function $5(e){var t=e;if(!Array.isArray(t)){var n=sn(t);t=n==="number"||n==="string"?[t]:[]}return t.map(function(r){return String(r)})}var nm=function(e){li(n,e);var t=ui(n);function n(r){var i;Kr(this,n),i=t.call(this,r),i.onClickItem=function(h){var p=i.state.activeKey;if(i.props.accordion)p=p[0]===h?[]:[h];else{p=wt(p);var g=p.indexOf(h),b=g>-1;b?p.splice(g,1):p.push(h)}i.setActiveKey(p)},i.getNewChild=function(h,p){if(!h)return null;var g=i.state.activeKey,b=i.props,w=b.prefixCls,P=b.openMotion,I=b.accordion,A=b.destroyInactivePanel,O=b.expandIcon,M=b.collapsible,R=h.key||String(p),N=h.props,z=N.header,B=N.headerClass,U=N.destroyInactivePanel,q=N.collapsible,H=!1;I?H=g[0]===R:H=g.indexOf(R)>-1;var te=q!=null?q:M,Y={key:R,panelKey:R,header:z,headerClass:B,isActive:H,prefixCls:w,destroyInactivePanel:U!=null?U:A,openMotion:P,accordion:I,children:h.props.children,onItemClick:te==="disabled"?null:i.onClickItem,expandIcon:O,collapsible:te};return typeof h.type=="string"?h:(Object.keys(Y).forEach(function(le){typeof Y[le]>"u"&&delete Y[le]}),C.exports.cloneElement(h,Y))},i.getItems=function(){var h=i.props.children;return Xi(h).map(i.getNewChild)},i.setActiveKey=function(h){"activeKey"in i.props||i.setState({activeKey:h}),i.props.onChange(i.props.accordion?h[0]:h)};var l=r.activeKey,c=r.defaultActiveKey,o=c;return"activeKey"in r&&(o=l),i.state={activeKey:$5(o)},i}return Hr(n,[{key:"shouldComponentUpdate",value:function(i,l){return!gc(this.props,i)||!gc(this.state,l)}},{key:"render",value:function(){var i,l=this.props,c=l.prefixCls,o=l.className,h=l.style,p=l.accordion,g=Ye((i={},se(i,c,!0),se(i,o,!!o),i));return E("div",{className:g,style:h,role:p?"tablist":null,children:this.getItems()})}}],[{key:"getDerivedStateFromProps",value:function(i){var l={};return"activeKey"in i&&(l.activeKey=$5(i.activeKey)),l}}]),n}(C.exports.Component);nm.defaultProps={prefixCls:"rc-collapse",onChange:function(){},accordion:!1,destroyInactivePanel:!1};nm.Panel=cA;nm.Panel;var LZ=function(t){var n=C.exports.useContext(Nn),r=n.getPrefixCls,i=t.prefixCls,l=t.className,c=l===void 0?"":l,o=t.showArrow,h=o===void 0?!0:o,p=r("collapse",i),g=Ye(se({},"".concat(p,"-no-arrow"),!h),c);return E(nm.Panel,{...t,prefixCls:p,className:g})};const zZ=LZ;var dA=function(t){var n,r=C.exports.useContext(Nn),i=r.getPrefixCls,l=r.direction,c=t.prefixCls,o=t.className,h=o===void 0?"":o,p=t.bordered,g=p===void 0?!0:p,b=t.ghost,w=t.expandIconPosition,P=w===void 0?"start":w,I=i("collapse",c),A=C.exports.useMemo(function(){return P==="left"?"start":P==="right"?"end":P},[P]),O=function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},U=t.expandIcon,q=U?U(B):E(v4,{rotate:B.isActive?90:void 0});return Ei(q,function(){return{className:Ye(q.props.className,"".concat(I,"-arrow"))}})},M=Ye("".concat(I,"-icon-position-").concat(A),(n={},se(n,"".concat(I,"-borderless"),!g),se(n,"".concat(I,"-rtl"),l==="rtl"),se(n,"".concat(I,"-ghost"),!!b),n),h),R=tt(tt({},Ap),{motionAppear:!1,leavedClassName:"".concat(I,"-content-hidden")}),N=function(){var B=t.children;return Xi(B).map(function(U,q){var H;if(!((H=U.props)===null||H===void 0)&&H.disabled){var te=U.key||String(q),Y=U.props,le=Y.disabled,J=Y.collapsible,Z=tt(tt({},mi(U.props,["disabled"])),{key:te,collapsible:J!=null?J:le?"disabled":void 0});return Ei(U,Z)}return U})};return E(nm,{openMotion:R,...t,expandIcon:O,prefixCls:I,className:M,children:N()})};dA.Panel=zZ;const B5=dA;var fA=C.exports.createContext(null),V5=[];function FZ(e,t){var n=C.exports.useState(function(){if(!wo())return null;var I=document.createElement("div");return I}),r=ze(n,1),i=r[0],l=C.exports.useRef(!1),c=C.exports.useContext(fA),o=C.exports.useState(V5),h=ze(o,2),p=h[0],g=h[1],b=c||(l.current?void 0:function(I){g(function(A){var O=[I].concat(wt(A));return O})});function w(){i.parentElement||document.body.appendChild(i),l.current=!0}function P(){var I;(I=i.parentElement)===null||I===void 0||I.removeChild(i),l.current=!1}return si(function(){return e?c?c(w):w():P(),P},[e]),si(function(){p.length&&(p.forEach(function(I){return I()}),g(V5))},[p]),[i,b]}var __;function Iy(e){if(typeof document>"u")return 0;if(e||__===void 0){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var n=document.createElement("div"),r=n.style;r.position="absolute",r.top="0",r.left="0",r.pointerEvents="none",r.visibility="hidden",r.width="200px",r.height="150px",r.overflow="hidden",n.appendChild(t),document.body.appendChild(n);var i=t.offsetWidth;n.style.overflow="scroll";var l=t.offsetWidth;i===l&&(l=n.clientWidth),document.body.removeChild(n),__=i-l}return __}function U5(e){var t=e.match(/^(.*)px$/),n=Number(t==null?void 0:t[1]);return Number.isNaN(n)?Iy():n}function j5(e){if(typeof document>"u"||!e||!(e instanceof Element))return{width:0,height:0};var t=getComputedStyle(e,"::-webkit-scrollbar"),n=t.width,r=t.height;return{width:U5(n),height:U5(r)}}function $Z(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var BZ="rc-util-locker-".concat(Date.now()),K5=0;function VZ(e){var t=!!e,n=C.exports.useState(function(){return K5+=1,"".concat(BZ,"_").concat(K5)}),r=ze(n,1),i=r[0];si(function(){if(t){var l=Iy(),c=$Z();Gp(`
html body {
overflow-y: hidden;
`.concat(c?"width: calc(100% - ".concat(l,"px);"):"",`
}`),i)}else P6(i);return function(){P6(i)}},[t,i])}var H5=!1;function UZ(e){return typeof e=="boolean"&&(H5=e),H5}var W5=function(t){return t===!1?!1:!wo()||!t?null:typeof t=="string"?document.querySelector(t):typeof t=="function"?t():t},jZ=C.exports.forwardRef(function(e,t){var n=e.open,r=e.autoLock,i=e.getContainer;e.debug;var l=e.autoDestroy,c=l===void 0?!0:l,o=e.children,h=C.exports.useState(n),p=ze(h,2),g=p[0],b=p[1],w=g||n;C.exports.useEffect(function(){(c||n)&&b(n)},[n,c]);var P=C.exports.useState(function(){return W5(i)}),I=ze(P,2),A=I[0],O=I[1];C.exports.useEffect(function(){var le=W5(i);O(le!=null?le:null)});var M=FZ(w&&!A),R=ze(M,2),N=R[0],z=R[1],B=A!=null?A:N;VZ(r&&n&&wo()&&(B===N||B===document.body));var U=null;if(o&&Sc(o)&&t){var q=o;U=q.ref}var H=VI(U,t);if(!w||!wo()||A===void 0)return null;var te=B===!1||UZ(),Y=o;return t&&(Y=C.exports.cloneElement(o,{ref:H})),E(fA.Provider,{value:z,children:te?Y:uu.exports.createPortal(Y,B)})});function My(e){var t=C.exports.useState(e),n=ze(t,2),r=n[0],i=n[1];return C.exports.useEffect(function(){var l=setTimeout(function(){i(e)},e.length?0:10);return function(){clearTimeout(l)}},[e]),r}var G5=[];function b_(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof e=="string"?e:"".concat(n,"-").concat(r),error:e,errorStatus:t}}function hA(e){var t=e.help,n=e.helpStatus,r=e.errors,i=r===void 0?G5:r,l=e.warnings,c=l===void 0?G5:l,o=e.className,h=e.fieldId,p=e.onVisibleChanged,g=C.exports.useContext(l4),b=g.prefixCls,w=C.exports.useContext(Nn),P=w.getPrefixCls,I="".concat(b,"-item-explain"),A=P(),O=My(i),M=My(c),R=C.exports.useMemo(function(){return t!=null?[b_(t,n,"help")]:[].concat(wt(O.map(function(z,B){return b_(z,"error","error",B)})),wt(M.map(function(z,B){return b_(z,"warning","warning",B)})))},[t,n,O,M]),N={};return h&&(N.id="".concat(h,"_help")),E(Ca,{motionDeadline:Ap.motionDeadline,motionName:"".concat(A,"-show-help"),visible:!!R.length,onVisibleChanged:p,children:function(z){var B=z.className,U=z.style;return E("div",{...N,className:Ye(I,B,o),style:U,role:"alert",children:E(VM,{keys:R,...Ap,motionName:"".concat(A,"-show-help-item"),component:!1,children:function(q){var H=q.key,te=q.error,Y=q.errorStatus,le=q.className,J=q.style;return E("div",{className:Ye(le,se({},"".concat(I,"-").concat(Y),Y)),style:J,children:te},H)}})})}})}function q5(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function Z5(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function w_(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return Z5(n.overflowY,t)||Z5(n.overflowX,t)||function(r){var i=function(l){if(!l.ownerDocument||!l.ownerDocument.defaultView)return null;try{return l.ownerDocument.defaultView.frameElement}catch{return null}}(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)}(e)}return!1}function Jv(e,t,n,r,i,l,c,o){return l<e&&c>t||l>e&&c<t?0:l<=e&&o<=n||c>=t&&o>=n?l-e-r:c>t&&o<n||l<e&&o>n?c-t+i:0}var X5=function(e,t){var n=window,r=t.scrollMode,i=t.block,l=t.inline,c=t.boundary,o=t.skipOverflowHiddenElements,h=typeof c=="function"?c:function(Pt){return Pt!==c};if(!q5(e))throw new TypeError("Invalid target");for(var p,g,b=document.scrollingElement||document.documentElement,w=[],P=e;q5(P)&&h(P);){if((P=(g=(p=P).parentElement)==null?p.getRootNode().host||null:g)===b){w.push(P);break}P!=null&&P===document.body&&w_(P)&&!w_(document.documentElement)||P!=null&&w_(P,o)&&w.push(P)}for(var I=n.visualViewport?n.visualViewport.width:innerWidth,A=n.visualViewport?n.visualViewport.height:innerHeight,O=window.scrollX||pageXOffset,M=window.scrollY||pageYOffset,R=e.getBoundingClientRect(),N=R.height,z=R.width,B=R.top,U=R.right,q=R.bottom,H=R.left,te=i==="start"||i==="nearest"?B:i==="end"?q:B+N/2,Y=l==="center"?H+z/2:l==="end"?U:H,le=[],J=0;J<w.length;J++){var Z=w[J],Q=Z.getBoundingClientRect(),ge=Q.height,re=Q.width,de=Q.top,oe=Q.right,ye=Q.bottom,Re=Q.left;if(r==="if-needed"&&B>=0&&H>=0&&q<=A&&U<=I&&B>=de&&q<=ye&&H>=Re&&U<=oe)return le;var Te=getComputedStyle(Z),ke=parseInt(Te.borderLeftWidth,10),De=parseInt(Te.borderTopWidth,10),Me=parseInt(Te.borderRightWidth,10),Ne=parseInt(Te.borderBottomWidth,10),Le=0,Ve=0,qe="offsetWidth"in Z?Z.offsetWidth-Z.clientWidth-ke-Me:0,Ue="offsetHeight"in Z?Z.offsetHeight-Z.clientHeight-De-Ne:0,ct="offsetWidth"in Z?Z.offsetWidth===0?0:re/Z.offsetWidth:0,pt="offsetHeight"in Z?Z.offsetHeight===0?0:ge/Z.offsetHeight:0;if(b===Z)Le=i==="start"?te:i==="end"?te-A:i==="nearest"?Jv(M,M+A,A,De,Ne,M+te,M+te+N,N):te-A/2,Ve=l==="start"?Y:l==="center"?Y-I/2:l==="end"?Y-I:Jv(O,O+I,I,ke,Me,O+Y,O+Y+z,z),Le=Math.max(0,Le+M),Ve=Math.max(0,Ve+O);else{Le=i==="start"?te-de-De:i==="end"?te-ye+Ne+Ue:i==="nearest"?Jv(de,ye,ge,De,Ne+Ue,te,te+N,N):te-(de+ge/2)+Ue/2,Ve=l==="start"?Y-Re-ke:l==="center"?Y-(Re+re/2)+qe/2:l==="end"?Y-oe+Me+qe:Jv(Re,oe,re,ke,Me+qe,Y,Y+z,z);var Tt=Z.scrollLeft,Xe=Z.scrollTop;te+=Xe-(Le=Math.max(0,Math.min(Xe+Le/pt,Z.scrollHeight-ge/pt+Ue))),Y+=Tt-(Ve=Math.max(0,Math.min(Tt+Ve/ct,Z.scrollWidth-re/ct+qe)))}le.push({el:Z,top:Le,left:Ve})}return le};function pA(e){return e===Object(e)&&Object.keys(e).length!==0}function KZ(e,t){t===void 0&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach(function(r){var i=r.el,l=r.top,c=r.left;i.scroll&&n?i.scroll({top:l,left:c,behavior:t}):(i.scrollTop=l,i.scrollLeft=c)})}function HZ(e){return e===!1?{block:"end",inline:"nearest"}:pA(e)?e:{block:"start",inline:"nearest"}}function WZ(e,t){var n=e.isConnected||e.ownerDocument.documentElement.contains(e);if(pA(t)&&typeof t.behavior=="function")return t.behavior(n?X5(e,t):[]);if(!!n){var r=HZ(t);return KZ(X5(e,r),r.behavior)}}var GZ=["parentNode"],qZ="form_item";function rp(e){return e===void 0||e===!1?[]:Array.isArray(e)?e:[e]}function mA(e,t){if(!!e.length){var n=e.join("_");if(t)return"".concat(t,"_").concat(n);var r=GZ.includes(n);return r?"".concat(qZ,"_").concat(n):n}}function Y5(e){var t=rp(e);return t.join("_")}function vA(e){var t=LC(),n=ze(t,1),r=n[0],i=C.exports.useRef({}),l=C.exports.useMemo(function(){return e!=null?e:tt(tt({},r),{__INTERNAL__:{itemRef:function(o){return function(h){var p=Y5(o);h?i.current[p]=h:delete i.current[p]}}},scrollToField:function(o){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=rp(o),g=mA(p,l.__INTERNAL__.name),b=g?document.getElementById(g):null;b&&WZ(b,tt({scrollMode:"if-needed",block:"nearest"},h))},getFieldInstance:function(o){var h=Y5(o);return i.current[h]}})},[e,r]);return[l]}var ZZ=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},XZ=function(t,n){var r,i=C.exports.useContext(ms),l=C.exports.useContext(pu),c=C.exports.useContext(Nn),o=c.getPrefixCls,h=c.direction,p=c.form,g=t.prefixCls,b=t.className,w=b===void 0?"":b,P=t.size,I=P===void 0?i:P,A=t.disabled,O=A===void 0?l:A,M=t.form,R=t.colon,N=t.labelAlign,z=t.labelWrap,B=t.labelCol,U=t.wrapperCol,q=t.hideRequiredMark,H=t.layout,te=H===void 0?"horizontal":H,Y=t.scrollToFirstError,le=t.requiredMark,J=t.onFinishFailed,Z=t.name,Q=ZZ(t,["prefixCls","className","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name"]),ge=C.exports.useMemo(function(){return le!==void 0?le:p&&p.requiredMark!==void 0?p.requiredMark:!q},[q,le,p]),re=R!=null?R:p==null?void 0:p.colon,de=o("form",g),oe=Ye(de,(r={},se(r,"".concat(de,"-").concat(te),!0),se(r,"".concat(de,"-hide-required-mark"),ge===!1),se(r,"".concat(de,"-rtl"),h==="rtl"),se(r,"".concat(de,"-").concat(I),I),r),w),ye=vA(M),Re=ze(ye,1),Te=Re[0],ke=Te.__INTERNAL__;ke.name=Z;var De=C.exports.useMemo(function(){return{name:Z,labelAlign:N,labelCol:B,labelWrap:z,wrapperCol:U,vertical:te==="vertical",colon:re,requiredMark:ge,itemRef:ke.itemRef,form:Te}},[Z,N,B,U,te,re,ge,Te]);C.exports.useImperativeHandle(n,function(){return Te});var Me=function(Le){J==null||J(Le);var Ve={block:"nearest"};Y&&Le.errorFields.length&&(sn(Y)==="object"&&(Ve=Y),Te.scrollToField(Le.errorFields[0].name,Ve))};return E(vR,{disabled:O,children:E(gR,{size:I,children:E(su.Provider,{value:De,children:E(cf,{id:Z,...Q,name:Z,onFinishFailed:Me,form:Te,className:oe})})})})},YZ=C.exports.forwardRef(XZ);const QZ=YZ;var JZ=function(){var t=C.exports.useContext(Yo),n=t.status;return{status:n}};const eX=JZ;function tX(e){var t=C.exports.useState(e),n=ze(t,2),r=n[0],i=n[1],l=C.exports.useRef(null),c=C.exports.useRef([]),o=C.exports.useRef(!1);C.exports.useEffect(function(){return o.current=!1,function(){o.current=!0,nr.cancel(l.current),l.current=null}},[]);function h(p){o.current||(l.current===null&&(c.current=[],l.current=nr(function(){l.current=null,i(function(g){var b=g;return c.current.forEach(function(w){b=w(b)}),b})})),c.current.push(p))}return[r,h]}function nX(){var e=C.exports.useContext(su),t=e.itemRef,n=C.exports.useRef({});function r(i,l){var c=l&&sn(l)==="object"&&l.ref,o=i.join("_");return(n.current.name!==o||n.current.originRef!==c)&&(n.current.name=o,n.current.originRef=c,n.current.ref=Lo(t(i),c)),n.current.ref}return r}var rX={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"};const iX=rX;var gA=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:iX})})};gA.displayName="QuestionCircleOutlined";const oX=C.exports.forwardRef(gA);var aX=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function sX(e){return e?sn(e)==="object"&&!C.exports.isValidElement(e)?e:{title:e}:null}var lX=function(t){var n=t.prefixCls,r=t.label,i=t.htmlFor,l=t.labelCol,c=t.labelAlign,o=t.colon,h=t.required,p=t.requiredMark,g=t.tooltip,b=dM("Form"),w=ze(b,1),P=w[0];return r?E(su.Consumer,{children:function(I){var A,O=I.vertical,M=I.labelAlign,R=I.labelCol,N=I.labelWrap,z=I.colon,B,U=l||R||{},q=c||M,H="".concat(n,"-item-label"),te=Ye(H,q==="left"&&"".concat(H,"-left"),U.className,se({},"".concat(H,"-wrap"),!!N)),Y=r,le=o===!0||z!==!1&&o!==!1,J=le&&!O;J&&typeof r=="string"&&r.trim()!==""&&(Y=r.replace(/[:|]\s*$/,""));var Z=sX(g);if(Z){var Q=Z.icon,ge=Q===void 0?E(oX,{}):Q,re=aX(Z,["icon"]),de=E(oo,{...re,children:C.exports.cloneElement(ge,{className:"".concat(n,"-item-tooltip"),title:""})});Y=Qe($n,{children:[Y,de]})}p==="optional"&&!h&&(Y=Qe($n,{children:[Y,E("span",{className:"".concat(n,"-item-optional"),title:"",children:(P==null?void 0:P.optional)||((B=Js.Form)===null||B===void 0?void 0:B.optional)})]}));var oe=Ye((A={},se(A,"".concat(n,"-item-required"),h),se(A,"".concat(n,"-item-required-mark-optional"),p==="optional"),se(A,"".concat(n,"-item-no-colon"),!le),A));return E(Py,{...U,className:te,children:E("label",{htmlFor:i,className:oe,title:typeof r=="string"?r:"",children:Y})})}},"label"):null};const uX=lX;var cX=function(t){var n=t.prefixCls,r=t.status,i=t.wrapperCol,l=t.children,c=t.errors,o=t.warnings,h=t._internalItemRender,p=t.extra,g=t.help,b=t.fieldId,w=t.marginBottom,P=t.onErrorVisibleChanged,I="".concat(n,"-item"),A=C.exports.useContext(su),O=i||A.wrapperCol||{},M=Ye("".concat(I,"-control"),O.className),R=C.exports.useMemo(function(){return tt({},A)},[A]);delete R.labelCol,delete R.wrapperCol;var N=E("div",{className:"".concat(I,"-control-input"),children:E("div",{className:"".concat(I,"-control-input-content"),children:l})}),z=C.exports.useMemo(function(){return{prefixCls:n,status:r}},[n,r]),B=w!==null||c.length||o.length?Qe("div",{style:{display:"flex",flexWrap:"nowrap"},children:[E(l4.Provider,{value:z,children:E(hA,{fieldId:b,errors:c,warnings:o,help:g,helpStatus:r,className:"".concat(I,"-explain-connected"),onVisibleChanged:P})}),!!w&&E("div",{style:{width:0,height:w}})]}):null,U={};b&&(U.id="".concat(b,"_extra"));var q=p?E("div",{...U,className:"".concat(I,"-extra"),children:p}):null,H=h&&h.mark==="pro_table_render"&&h.render?h.render(t,{input:N,errorList:B,extra:q}):Qe($n,{children:[N,B,q]});return E(su.Provider,{value:R,children:E(Py,{...O,className:M,children:H})})};const dX=cX;var fX=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},hX={success:k0,warning:T0,error:kc,validating:qd};function pX(e){var t,n=e.prefixCls,r=e.className,i=e.style,l=e.help,c=e.errors,o=e.warnings,h=e.validateStatus,p=e.meta,g=e.hasFeedback,b=e.hidden,w=e.children,P=e.fieldId,I=e.isRequired,A=e.onSubItemMetaChange,O=fX(e,["prefixCls","className","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","isRequired","onSubItemMetaChange"]),M="".concat(n,"-item"),R=C.exports.useContext(su),N=R.requiredMark,z=C.exports.useRef(null),B=My(c),U=My(o),q=l!=null,H=!!(q||c.length||o.length),te=C.exports.useState(null),Y=ze(te,2),le=Y[0],J=Y[1];si(function(){if(H&&z.current){var de=getComputedStyle(z.current);J(parseInt(de.marginBottom,10))}},[H]);var Z=function(oe){oe||J(null)},Q="";h!==void 0?Q=h:p.validating?Q="validating":B.length?Q="error":U.length?Q="warning":p.touched&&(Q="success");var ge=C.exports.useMemo(function(){var de;if(g){var oe=Q&&hX[Q];de=oe?E("span",{className:Ye("".concat(M,"-feedback-icon"),"".concat(M,"-feedback-icon-").concat(Q)),children:E(oe,{})}):null}return{status:Q,hasFeedback:g,feedbackIcon:de,isFormItemInput:!0}},[Q,g]),re=(t={},se(t,M,!0),se(t,"".concat(M,"-with-help"),q||B.length||U.length),se(t,"".concat(r),!!r),se(t,"".concat(M,"-has-feedback"),Q&&g),se(t,"".concat(M,"-has-success"),Q==="success"),se(t,"".concat(M,"-has-warning"),Q==="warning"),se(t,"".concat(M,"-has-error"),Q==="error"),se(t,"".concat(M,"-is-validating"),Q==="validating"),se(t,"".concat(M,"-hidden"),b),t);return Qe("div",{className:Ye(re),style:i,ref:z,children:[Qe(lA,{className:"".concat(M,"-row"),...mi(O,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","required","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol"]),children:[E(uX,{htmlFor:P,required:I,requiredMark:N,...e,prefixCls:n}),E(dX,{...e,...p,errors:B,warnings:U,prefixCls:n,status:Q,help:l,marginBottom:le,onErrorVisibleChanged:Z,children:E(r7.Provider,{value:A,children:E(Yo.Provider,{value:ge,children:w})})})]}),!!le&&E("div",{className:"".concat(M,"-margin-offset"),style:{marginBottom:-le}})]})}var mX="__SPLIT__";ra("success","warning","error","validating","");var vX=C.exports.memo(function(e){var t=e.children;return t},function(e,t){return e.value===t.value&&e.update===t.update&&e.childProps.length===t.childProps.length&&e.childProps.every(function(n,r){return n===t.childProps[r]})});function gX(e){return e!=null}function Q5(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[]}}function yX(e){var t=e.name,n=e.noStyle,r=e.dependencies,i=e.prefixCls,l=e.shouldUpdate,c=e.rules,o=e.children,h=e.required,p=e.label,g=e.messageVariables,b=e.trigger,w=b===void 0?"onChange":b,P=e.validateTrigger,I=e.hidden,A=C.exports.useContext(Nn),O=A.getPrefixCls,M=C.exports.useContext(su),R=M.name,N=typeof o=="function",z=C.exports.useContext(r7),B=C.exports.useContext(vc),U=B.validateTrigger,q=P!==void 0?P:U,H=gX(t),te=O("form",i),Y=C.exports.useContext(iM),le=C.exports.useRef(),J=tX({}),Z=ze(J,2),Q=Z[0],ge=Z[1],re=fs(function(){return Q5()}),de=ze(re,2),oe=de[0],ye=de[1],Re=function(ct){var pt=Y==null?void 0:Y.getKey(ct.name);if(ye(ct.destroy?Q5():ct,!0),n&&z){var Tt=ct.name;if(ct.destroy)Tt=le.current||Tt;else if(pt!==void 0){var Xe=ze(pt,2),Pt=Xe[0],mt=Xe[1];Tt=[Pt].concat(wt(mt)),le.current=Tt}z(ct,Tt)}},Te=function(ct,pt){ge(function(Tt){var Xe=tt({},Tt),Pt=[].concat(wt(ct.name.slice(0,-1)),wt(pt)),mt=Pt.join(mX);return ct.destroy?delete Xe[mt]:Xe[mt]=ct,Xe})},ke=C.exports.useMemo(function(){var Ue=wt(oe.errors),ct=wt(oe.warnings);return Object.values(Q).forEach(function(pt){Ue.push.apply(Ue,wt(pt.errors||[])),ct.push.apply(ct,wt(pt.warnings||[]))}),[Ue,ct]},[Q,oe.errors,oe.warnings]),De=ze(ke,2),Me=De[0],Ne=De[1],Le=nX();function Ve(Ue,ct,pt){return n&&!I?Ue:E(pX,{...e,prefixCls:te,fieldId:ct,isRequired:pt,errors:Me,warnings:Ne,meta:oe,onSubItemMetaChange:Te,children:Ue},"row")}if(!H&&!N&&!r)return Ve(o);var qe={};return typeof p=="string"?qe.label=p:t&&(qe.label=String(t)),g&&(qe=tt(tt({},qe),g)),E(DC,{...e,messageVariables:qe,trigger:w,validateTrigger:q,onMetaChange:Re,children:function(Ue,ct,pt){var Tt=rp(t).length&&ct?ct.name:[],Xe=mA(Tt,R),Pt=h!==void 0?h:!!(c&&c.some(function(ut){if(ut&&sn(ut)==="object"&&ut.required&&!ut.warningOnly)return!0;if(typeof ut=="function"){var it=ut(pt);return it&&it.required&&!it.warningOnly}return!1})),mt=tt({},Ue),Mt=null;if(Array.isArray(o)&&H)Mt=o;else if(!(N&&(!(l||r)||H))){if(!(r&&!N&&!H))if(Do(o)){var Ct=tt(tt({},o.props),mt);if(Ct.id||(Ct.id=Xe),e.help||Me.length>0||Ne.length>0||e.extra){var Lt=[];(e.help||Me.length>0)&&Lt.push("".concat(Xe,"_help")),e.extra&&Lt.push("".concat(Xe,"_extra")),Ct["aria-describedby"]=Lt.join(" ")}Me.length>0&&(Ct["aria-invalid"]="true"),Pt&&(Ct["aria-required"]="true"),Sc(o)&&(Ct.ref=Le(Tt,o));var lt=new Set([].concat(wt(rp(w)),wt(rp(q))));lt.forEach(function(ut){Ct[ut]=function(){for(var it,ft,xt,Wt,Ut,Qt=arguments.length,Fe=new Array(Qt),Ge=0;Ge<Qt;Ge++)Fe[Ge]=arguments[Ge];(xt=mt[ut])===null||xt===void 0||(it=xt).call.apply(it,[mt].concat(Fe)),(Ut=(Wt=o.props)[ut])===null||Ut===void 0||(ft=Ut).call.apply(ft,[Wt].concat(Fe))}});var dt=[Ct["aria-required"],Ct["aria-invalid"],Ct["aria-describedby"]];Mt=E(vX,{value:mt[e.valuePropName||"value"],update:o,childProps:dt,children:Ei(o,Ct)})}else N&&(l||r)&&!H?Mt=o(pt):Mt=o}return Ve(Mt,Xe,Pt)}})}var yA=yX;yA.useStatus=eX;const xX=yA;var _X=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},bX=function(t){var n=t.prefixCls,r=t.children,i=_X(t,["prefixCls","children"]),l=C.exports.useContext(Nn),c=l.getPrefixCls,o=c("form",n),h=C.exports.useMemo(function(){return{prefixCls:o,status:"error"}},[o]);return E(oM,{...i,children:function(p,g,b){return E(l4.Provider,{value:h,children:r(p.map(function(w){return tt(tt({},w),{fieldKey:w.key})}),g,{errors:b.errors,warnings:b.warnings})})}})};const wX=bX;function CX(){var e=C.exports.useContext(su),t=e.form;return t}var al=QZ;al.Item=xX;al.List=wX;al.ErrorList=hA;al.useForm=vA;al.useFormInstance=CX;al.useWatch=sM;al.Provider=QH;al.create=function(){};const Ba=al;var SX={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};const EX=SX;var xA=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:EX})})};xA.displayName="EyeOutlined";const kX=C.exports.forwardRef(xA);function J5(e){var t=e.getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}function TX(){var e=ve({},Dg);return e.useId}var ek=0;function PX(e){var t=C.exports.useState("ssr-id"),n=ze(t,2),r=n[0],i=n[1],l=TX(),c=l==null?void 0:l();return C.exports.useEffect(function(){if(!l){var o=ek;ek+=1,i("rc_unique_".concat(o))}},[]),e||c||r}function IX(e){var t=e.prefixCls,n=e.style,r=e.visible,i=e.maskProps,l=e.motionName;return E(Ca,{visible:r,motionName:l,leavedClassName:"".concat(t,"-mask-hidden"),children:function(c,o){var h=c.className,p=c.style;return E("div",{ref:o,style:ve(ve({},p),n),className:Ye("".concat(t,"-mask"),h),...i})}},"mask")}function tk(e,t,n){var r=t;return!r&&n&&(r="".concat(e,"-").concat(n)),r}function nk(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if(typeof n!="number"){var i=e.document;n=i.documentElement[r],typeof n!="number"&&(n=i.body[r])}return n}function MX(e){var t=e.getBoundingClientRect(),n={left:t.left,top:t.top},r=e.ownerDocument,i=r.defaultView||r.parentWindow;return n.left+=nk(i),n.top+=nk(i,!0),n}const RX=C.exports.memo(function(e){var t=e.children;return t},function(e,t){var n=t.shouldUpdate;return!n});var rk={width:0,height:0,overflow:"hidden",outline:"none"},AX=tr.forwardRef(function(e,t){var n=e.prefixCls,r=e.className,i=e.style,l=e.title,c=e.ariaId,o=e.footer,h=e.closable,p=e.closeIcon,g=e.onClose,b=e.children,w=e.bodyStyle,P=e.bodyProps,I=e.modalRender,A=e.onMouseDown,O=e.onMouseUp,M=e.holderRef,R=e.visible,N=e.forceRender,z=e.width,B=e.height,U=C.exports.useRef(),q=C.exports.useRef();tr.useImperativeHandle(t,function(){return{focus:function(){var Q;(Q=U.current)===null||Q===void 0||Q.focus()},changeActive:function(Q){var ge=document,re=ge.activeElement;Q&&re===q.current?U.current.focus():!Q&&re===U.current&&q.current.focus()}}});var H={};z!==void 0&&(H.width=z),B!==void 0&&(H.height=B);var te;o&&(te=E("div",{className:"".concat(n,"-footer"),children:o}));var Y;l&&(Y=E("div",{className:"".concat(n,"-header"),children:E("div",{className:"".concat(n,"-title"),id:c,children:l})}));var le;h&&(le=E("button",{type:"button",onClick:g,"aria-label":"Close",className:"".concat(n,"-close"),children:p||E("span",{className:"".concat(n,"-close-x")})}));var J=Qe("div",{className:"".concat(n,"-content"),children:[le,Y,E("div",{className:"".concat(n,"-body"),style:w,...P,children:b}),te]});return Qe("div",{role:"dialog","aria-labelledby":l?c:null,"aria-modal":"true",ref:M,style:ve(ve({},i),H),className:Ye(n,r),onMouseDown:A,onMouseUp:O,children:[E("div",{tabIndex:0,ref:U,style:rk,"aria-hidden":"true"}),E(RX,{shouldUpdate:R||N,children:I?I(J):J}),E("div",{tabIndex:0,ref:q,style:rk,"aria-hidden":"true"})]},"dialog-element")}),_A=C.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.title,i=e.style,l=e.className,c=e.visible,o=e.forceRender,h=e.destroyOnClose,p=e.motionName,g=e.ariaId,b=e.onVisibleChanged,w=e.mousePosition,P=C.exports.useRef(),I=C.exports.useState(),A=ze(I,2),O=A[0],M=A[1],R={};O&&(R.transformOrigin=O);function N(){var z=MX(P.current);M(w?"".concat(w.x-z.left,"px ").concat(w.y-z.top,"px"):"")}return E(Ca,{visible:c,onVisibleChanged:b,onAppearPrepare:N,onEnterPrepare:N,forceRender:o,motionName:p,removeOnLeave:h,ref:P,children:function(z,B){var U=z.className,q=z.style;return E(AX,{...e,ref:t,title:r,ariaId:g,prefixCls:n,holderRef:B,style:ve(ve(ve({},q),i),R),className:Ye(l,U)})}})});_A.displayName="Content";function OX(e){var t=e.prefixCls,n=t===void 0?"rc-dialog":t,r=e.zIndex,i=e.visible,l=i===void 0?!1:i,c=e.keyboard,o=c===void 0?!0:c,h=e.focusTriggerAfterClose,p=h===void 0?!0:h,g=e.wrapStyle,b=e.wrapClassName,w=e.wrapProps,P=e.onClose,I=e.afterClose,A=e.transitionName,O=e.animation,M=e.closable,R=M===void 0?!0:M,N=e.mask,z=N===void 0?!0:N,B=e.maskTransitionName,U=e.maskAnimation,q=e.maskClosable,H=q===void 0?!0:q,te=e.maskStyle,Y=e.maskProps,le=e.rootClassName,J=C.exports.useRef(),Z=C.exports.useRef(),Q=C.exports.useRef(),ge=C.exports.useState(l),re=ze(ge,2),de=re[0],oe=re[1],ye=PX();function Re(){uc(Z.current,document.activeElement)||(J.current=document.activeElement)}function Te(){if(!uc(Z.current,document.activeElement)){var ct;(ct=Q.current)===null||ct===void 0||ct.focus()}}function ke(ct){if(ct)Te();else{if(oe(!1),z&&J.current&&p){try{J.current.focus({preventScroll:!0})}catch{}J.current=null}de&&(I==null||I())}}function De(ct){P==null||P(ct)}var Me=C.exports.useRef(!1),Ne=C.exports.useRef(),Le=function(){clearTimeout(Ne.current),Me.current=!0},Ve=function(){Ne.current=setTimeout(function(){Me.current=!1})},qe=null;H&&(qe=function(pt){Me.current?Me.current=!1:Z.current===pt.target&&De(pt)});function Ue(ct){if(o&&ct.keyCode===Et.ESC){ct.stopPropagation(),De(ct);return}l&&ct.keyCode===Et.TAB&&Q.current.changeActive(!ct.shiftKey)}return C.exports.useEffect(function(){l&&(oe(!0),Re())},[l]),C.exports.useEffect(function(){return function(){clearTimeout(Ne.current)}},[]),Qe("div",{className:Ye("".concat(n,"-root"),le),...au(e,{data:!0}),children:[E(IX,{prefixCls:n,visible:z&&l,motionName:tk(n,B,U),style:ve({zIndex:r},te),maskProps:Y}),E("div",{tabIndex:-1,onKeyDown:Ue,className:Ye("".concat(n,"-wrap"),b),ref:Z,onClick:qe,style:ve(ve({zIndex:r},g),{},{display:de?null:"none"}),...w,children:E(_A,{...e,onMouseDown:Le,onMouseUp:Ve,ref:Q,closable:R,ariaId:ye,prefixCls:n,visible:l&&de,onClose:De,onVisibleChanged:ke,motionName:tk(n,A,O)})})]})}var bA=function(t){var n=t.visible,r=t.getContainer,i=t.forceRender,l=t.destroyOnClose,c=l===void 0?!1:l,o=t.afterClose,h=C.exports.useState(n),p=ze(h,2),g=p[0],b=p[1];return C.exports.useEffect(function(){n&&b(!0)},[n]),!i&&c&&!g?null:E(jZ,{open:n||i||g,autoDestroy:!1,getContainer:r,autoLock:n||g,children:E(OX,{...t,destroyOnClose:c,afterClose:function(){o==null||o(),b(!1)}})})};bA.displayName="Dialog";var NX=function(t){var n,r=C.exports.useContext(Nn),i=r.getPrefixCls,l=r.direction,c=t.prefixCls,o=t.className,h=o===void 0?"":o,p=i("input-group",c),g=Ye(p,(n={},se(n,"".concat(p,"-lg"),t.size==="large"),se(n,"".concat(p,"-sm"),t.size==="small"),se(n,"".concat(p,"-compact"),t.compact),se(n,"".concat(p,"-rtl"),l==="rtl"),n),h),b=C.exports.useContext(Yo),w=C.exports.useMemo(function(){return tt(tt({},b),{isFormItemInput:!1})},[b]);return E("span",{className:g,style:t.style,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onFocus:t.onFocus,onBlur:t.onBlur,children:E(Yo.Provider,{value:w,children:t.children})})};const DX=NX;function kg(e){return!!(e.addonBefore||e.addonAfter)}function wA(e){return!!(e.prefix||e.suffix||e.allowClear)}function ik(e,t,n,r){if(!!n){var i=t;if(t.type==="click"){var l=e.cloneNode(!0);i=Object.create(t,{target:{value:l},currentTarget:{value:l}}),l.value="",n(i);return}if(r!==void 0){i=Object.create(t,{target:{value:e},currentTarget:{value:e}}),e.value=r,n(i);return}n(i)}}function LX(e,t){if(!!e){e.focus(t);var n=t||{},r=n.cursor;if(r){var i=e.value.length;switch(r){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(i,i);break;default:e.setSelectionRange(0,i)}}}}function ok(e){return typeof e>"u"||e===null?"":String(e)}var zX=function(t){var n=t.inputElement,r=t.prefixCls,i=t.prefix,l=t.suffix,c=t.addonBefore,o=t.addonAfter,h=t.className,p=t.style,g=t.affixWrapperClassName,b=t.groupClassName,w=t.wrapperClassName,P=t.disabled,I=t.readOnly,A=t.focused,O=t.triggerFocus,M=t.allowClear,R=t.value,N=t.handleReset,z=t.hidden,B=C.exports.useRef(null),U=function(oe){var ye;(ye=B.current)!==null&&ye!==void 0&&ye.contains(oe.target)&&(O==null||O())},q=function(){var oe;if(!M)return null;var ye=!P&&!I&&R,Re="".concat(r,"-clear-icon"),Te=sn(M)==="object"&&M!==null&&M!==void 0&&M.clearIcon?M.clearIcon:"\u2716";return E("span",{onClick:N,onMouseDown:function(De){return De.preventDefault()},className:Ye(Re,(oe={},se(oe,"".concat(Re,"-hidden"),!ye),se(oe,"".concat(Re,"-has-suffix"),!!l),oe)),role:"button",tabIndex:-1,children:Te})},H=C.exports.cloneElement(n,{value:R,hidden:z});if(wA(t)){var te,Y="".concat(r,"-affix-wrapper"),le=Ye(Y,(te={},se(te,"".concat(Y,"-disabled"),P),se(te,"".concat(Y,"-focused"),A),se(te,"".concat(Y,"-readonly"),I),se(te,"".concat(Y,"-input-with-clear-btn"),l&&M&&R),te),!kg(t)&&h,g),J=(l||M)&&Qe("span",{className:"".concat(r,"-suffix"),children:[q(),l]});H=Qe("span",{className:le,style:p,hidden:!kg(t)&&z,onClick:U,ref:B,children:[i&&E("span",{className:"".concat(r,"-prefix"),children:i}),C.exports.cloneElement(n,{style:null,value:R,hidden:null}),J]})}if(kg(t)){var Z="".concat(r,"-group"),Q="".concat(Z,"-addon"),ge=Ye("".concat(r,"-wrapper"),Z,w),re=Ye("".concat(r,"-group-wrapper"),h,b);return E("span",{className:re,style:p,hidden:z,children:Qe("span",{className:ge,children:[c&&E("span",{className:Q,children:c}),C.exports.cloneElement(H,{style:null,hidden:null}),o&&E("span",{className:Q,children:o})]})})}return H},FX=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","inputClassName"],$X=C.exports.forwardRef(function(e,t){var n=e.autoComplete,r=e.onChange,i=e.onFocus,l=e.onBlur,c=e.onPressEnter,o=e.onKeyDown,h=e.prefixCls,p=h===void 0?"rc-input":h,g=e.disabled,b=e.htmlSize,w=e.className,P=e.maxLength,I=e.suffix,A=e.showCount,O=e.type,M=O===void 0?"text":O,R=e.inputClassName,N=In(e,FX),z=Vi(e.defaultValue,{value:e.value}),B=ze(z,2),U=B[0],q=B[1],H=C.exports.useState(!1),te=ze(H,2),Y=te[0],le=te[1],J=C.exports.useRef(null),Z=function(ke){J.current&&LX(J.current,ke)};C.exports.useImperativeHandle(t,function(){return{focus:Z,blur:function(){var ke;(ke=J.current)===null||ke===void 0||ke.blur()},setSelectionRange:function(ke,De,Me){var Ne;(Ne=J.current)===null||Ne===void 0||Ne.setSelectionRange(ke,De,Me)},select:function(){var ke;(ke=J.current)===null||ke===void 0||ke.select()},input:J.current}}),C.exports.useEffect(function(){le(function(Te){return Te&&g?!1:Te})},[g]);var Q=function(ke){e.value===void 0&&q(ke.target.value),J.current&&ik(J.current,ke,r)},ge=function(ke){c&&ke.key==="Enter"&&c(ke),o==null||o(ke)},re=function(ke){le(!0),i==null||i(ke)},de=function(ke){le(!1),l==null||l(ke)},oe=function(ke){q(""),Z(),J.current&&ik(J.current,ke,r)},ye=function(){var ke=mi(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","affixWrapperClassName","groupClassName","inputClassName","wrapperClassName","htmlSize"]);return E("input",{autoComplete:n,...ke,onChange:Q,onFocus:re,onBlur:de,onKeyDown:ge,className:Ye(p,se({},"".concat(p,"-disabled"),g),R,!kg(e)&&!wA(e)&&w),ref:J,size:b,type:M})},Re=function(){var ke=Number(P)>0;if(I||A){var De=ok(U),Me=wt(De).length,Ne=sn(A)==="object"?A.formatter({value:De,count:Me,maxLength:P}):"".concat(Me).concat(ke?" / ".concat(P):"");return Qe($n,{children:[!!A&&E("span",{className:Ye("".concat(p,"-show-count-suffix"),se({},"".concat(p,"-show-count-has-suffix"),!!I)),children:Ne}),I]})}return null};return E(zX,{...N,prefixCls:p,className:w,inputElement:ye(),handleReset:oe,value:ok(U),focused:Y,triggerFocus:Z,suffix:Re(),disabled:g})});function CA(e,t){var n=C.exports.useRef([]),r=function(){n.current.push(setTimeout(function(){var l,c,o,h;((l=e.current)===null||l===void 0?void 0:l.input)&&((c=e.current)===null||c===void 0?void 0:c.input.getAttribute("type"))==="password"&&((o=e.current)===null||o===void 0?void 0:o.input.hasAttribute("value"))&&((h=e.current)===null||h===void 0||h.input.removeAttribute("value"))}))};return C.exports.useEffect(function(){return t&&r(),function(){return n.current.forEach(function(i){i&&clearTimeout(i)})}},[]),r}function BX(e){return!!(e.prefix||e.suffix||e.allowClear)}var VX=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function UX(e){return typeof e>"u"||e===null?"":String(e)}function C_(e,t,n,r){if(!!n){var i=t;if(t.type==="click"){var l=e.cloneNode(!0);i=Object.create(t,{target:{value:l},currentTarget:{value:l}}),l.value="",n(i);return}if(r!==void 0){i=Object.create(t,{target:{value:e},currentTarget:{value:e}}),e.value=r,n(i);return}n(i)}}function jX(e,t){if(!!e){e.focus(t);var n=t||{},r=n.cursor;if(r){var i=e.value.length;switch(r){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(i,i);break;default:e.setSelectionRange(0,i);break}}}}var KX=C.exports.forwardRef(function(e,t){var n,r,i,l=e.prefixCls,c=e.bordered,o=c===void 0?!0:c,h=e.status,p=e.size,g=e.disabled,b=e.onBlur,w=e.onFocus,P=e.suffix,I=e.allowClear,A=e.addonAfter,O=e.addonBefore,M=e.className,R=e.onChange,N=VX(e,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","onChange"]),z=tr.useContext(Nn),B=z.getPrefixCls,U=z.direction,q=z.input,H=B("input",l),te=C.exports.useRef(null),Y=ff(H,U),le=Y.compactSize,J=Y.compactItemClassnames,Z=tr.useContext(ms),Q=le||p||Z,ge=tr.useContext(pu),re=g!=null?g:ge,de=C.exports.useContext(Yo),oe=de.status,ye=de.hasFeedback,Re=de.feedbackIcon,Te=Xp(oe,h),ke=BX(e)||!!ye,De=C.exports.useRef(ke);C.exports.useEffect(function(){ke&&De.current,De.current=ke},[ke]);var Me=CA(te,!0),Ne=function(pt){Me(),b==null||b(pt)},Le=function(pt){Me(),w==null||w(pt)},Ve=function(pt){Me(),R==null||R(pt)},qe=(ye||P)&&Qe($n,{children:[P,ye&&Re]}),Ue;return sn(I)==="object"&&(I==null?void 0:I.clearIcon)?Ue=I:I&&(Ue={clearIcon:E(kc,{})}),E($X,{ref:Lo(t,te),prefixCls:H,autoComplete:q==null?void 0:q.autoComplete,...N,disabled:re||void 0,onBlur:Ne,onFocus:Le,suffix:qe,allowClear:Ue,className:Ye(M,J),onChange:Ve,addonAfter:A&&E(xy,{children:E(I2,{override:!0,status:!0,children:A})}),addonBefore:O&&E(xy,{children:E(I2,{override:!0,status:!0,children:O})}),inputClassName:Ye((n={},se(n,"".concat(H,"-sm"),Q==="small"),se(n,"".concat(H,"-lg"),Q==="large"),se(n,"".concat(H,"-rtl"),U==="rtl"),se(n,"".concat(H,"-borderless"),!o),n),!ke&&eu(H,Te)),affixWrapperClassName:Ye((r={},se(r,"".concat(H,"-affix-wrapper-sm"),Q==="small"),se(r,"".concat(H,"-affix-wrapper-lg"),Q==="large"),se(r,"".concat(H,"-affix-wrapper-rtl"),U==="rtl"),se(r,"".concat(H,"-affix-wrapper-borderless"),!o),r),eu("".concat(H,"-affix-wrapper"),Te,ye)),wrapperClassName:Ye(se({},"".concat(H,"-group-rtl"),U==="rtl")),groupClassName:Ye((i={},se(i,"".concat(H,"-group-wrapper-sm"),Q==="small"),se(i,"".concat(H,"-group-wrapper-lg"),Q==="large"),se(i,"".concat(H,"-group-wrapper-rtl"),U==="rtl"),i),eu("".concat(H,"-group-wrapper"),Te,ye))})});const T4=KX;var HX={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"};const WX=HX;var SA=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:WX})})};SA.displayName="EyeInvisibleOutlined";const GX=C.exports.forwardRef(SA);var qX=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},ZX=function(t){return t?E(kX,{}):E(GX,{})},XX={click:"onClick",hover:"onMouseOver"},YX=C.exports.forwardRef(function(e,t){var n=e.visibilityToggle,r=n===void 0?!0:n,i=sn(r)==="object"&&r.visible!==void 0,l=C.exports.useState(function(){return i?r.visible:!1}),c=ze(l,2),o=c[0],h=c[1],p=C.exports.useRef(null);C.exports.useEffect(function(){i&&h(r.visible)},[i,r]);var g=CA(p),b=function(){var A=e.disabled;A||(o&&g(),h(function(O){var M,R=!O;return sn(r)==="object"&&((M=r.onVisibleChange)===null||M===void 0||M.call(r,R)),R}))},w=function(A){var O,M=e.action,R=M===void 0?"click":M,N=e.iconRender,z=N===void 0?ZX:N,B=XX[R]||"",U=z(o),q=(O={},se(O,B,b),se(O,"className","".concat(A,"-icon")),se(O,"key","passwordIcon"),se(O,"onMouseDown",function(te){te.preventDefault()}),se(O,"onMouseUp",function(te){te.preventDefault()}),O);return C.exports.cloneElement(C.exports.isValidElement(U)?U:E("span",{children:U}),q)},P=function(A){var O=A.getPrefixCls,M=e.className,R=e.prefixCls,N=e.inputPrefixCls,z=e.size,B=qX(e,["className","prefixCls","inputPrefixCls","size"]),U=O("input",N),q=O("input-password",R),H=r&&w(q),te=Ye(q,M,se({},"".concat(q,"-").concat(z),!!z)),Y=tt(tt({},mi(B,["suffix","iconRender","visibilityToggle"])),{type:o?"text":"password",className:te,prefixCls:U,suffix:H});return z&&(Y.size=z),E(T4,{ref:Lo(t,p),...Y})};return E(hu,{children:P})});const QX=YX;var JX=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},eY=C.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.inputPrefixCls,l=e.className,c=e.size,o=e.suffix,h=e.enterButton,p=h===void 0?!1:h,g=e.addonAfter,b=e.loading,w=e.disabled,P=e.onSearch,I=e.onChange,A=e.onCompositionStart,O=e.onCompositionEnd,M=JX(e,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),R=C.exports.useContext(Nn),N=R.getPrefixCls,z=R.direction,B=C.exports.useContext(ms),U=C.exports.useRef(!1),q=N("input-search",r),H=N("input",i),te=ff(q,z),Y=te.compactSize,le=Y||c||B,J=C.exports.useRef(null),Z=function(Le){Le&&Le.target&&Le.type==="click"&&P&&P(Le.target.value,Le),I&&I(Le)},Q=function(Le){var Ve;document.activeElement===((Ve=J.current)===null||Ve===void 0?void 0:Ve.input)&&Le.preventDefault()},ge=function(Le){var Ve,qe;P&&P((qe=(Ve=J.current)===null||Ve===void 0?void 0:Ve.input)===null||qe===void 0?void 0:qe.value,Le)},re=function(Le){U.current||b||ge(Le)},de=typeof p=="boolean"?E(u4,{}):null,oe="".concat(q,"-button"),ye,Re=p||{},Te=Re.type&&Re.type.__ANT_BUTTON===!0;Te||Re.type==="button"?ye=Ei(Re,tt({onMouseDown:Q,onClick:function(Le){var Ve,qe;(qe=(Ve=Re==null?void 0:Re.props)===null||Ve===void 0?void 0:Ve.onClick)===null||qe===void 0||qe.call(Ve,Le),ge(Le)},key:"enterButton"},Te?{className:oe,size:le}:{})):ye=E(Br,{className:oe,type:p?"primary":void 0,size:le,disabled:w,onMouseDown:Q,onClick:ge,loading:b,icon:de,children:p},"enterButton"),g&&(ye=[ye,Ei(g,{key:"addonAfter"})]);var ke=Ye(q,(n={},se(n,"".concat(q,"-rtl"),z==="rtl"),se(n,"".concat(q,"-").concat(le),!!le),se(n,"".concat(q,"-with-button"),!!p),n),l),De=function(Le){U.current=!0,A==null||A(Le)},Me=function(Le){U.current=!1,O==null||O(Le)};return E(T4,{ref:Lo(J,t),onPressEnter:re,...M,size:le,onCompositionStart:De,onCompositionEnd:Me,prefixCls:H,addonAfter:ye,suffix:o,onChange:Z,className:ke,disabled:w})});const tY=eY;var nY=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
pointer-events: none !important;
`,rY=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],S_={},ha;function iY(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&S_[n])return S_[n];var r=window.getComputedStyle(e),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),l=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),c=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),o=rY.map(function(p){return"".concat(p,":").concat(r.getPropertyValue(p))}).join(";"),h={sizingStyle:o,paddingSize:l,borderSize:c,boxSizing:i};return t&&n&&(S_[n]=h),h}function oY(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ha||(ha=document.createElement("textarea"),ha.setAttribute("tab-index","-1"),ha.setAttribute("aria-hidden","true"),document.body.appendChild(ha)),e.getAttribute("wrap")?ha.setAttribute("wrap",e.getAttribute("wrap")):ha.removeAttribute("wrap");var i=iY(e,t),l=i.paddingSize,c=i.borderSize,o=i.boxSizing,h=i.sizingStyle;ha.setAttribute("style","".concat(h,";").concat(nY)),ha.value=e.value||e.placeholder||"";var p=void 0,g=void 0,b,w=ha.scrollHeight;if(o==="border-box"?w+=c:o==="content-box"&&(w-=l),n!==null||r!==null){ha.value=" ";var P=ha.scrollHeight-l;n!==null&&(p=P*n,o==="border-box"&&(p=p+l+c),w=Math.max(p,w)),r!==null&&(g=P*r,o==="border-box"&&(g=g+l+c),b=w>g?"":"hidden",w=Math.min(g,w))}var I={height:w,overflowY:b,resize:"none"};return p&&(I.minHeight=p),g&&(I.maxHeight=g),I}var aY=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],E_=0,k_=1,T_=2,sY=C.exports.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-textarea":n;e.onPressEnter;var i=e.defaultValue,l=e.value,c=e.autoSize,o=e.onResize,h=e.className,p=e.style,g=e.disabled,b=e.onChange;e.onInternalAutoSize;var w=In(e,aY),P=Vi(i,{value:l,postState:function(Me){return Me!=null?Me:""}}),I=ze(P,2),A=I[0],O=I[1],M=function(Me){O(Me.target.value),b==null||b(Me)},R=C.exports.useRef();C.exports.useImperativeHandle(t,function(){return{textArea:R.current}});var N=C.exports.useMemo(function(){return c&&sn(c)==="object"?[c.minRows,c.maxRows]:[]},[c]),z=ze(N,2),B=z[0],U=z[1],q=!!c,H=function(){try{if(document.activeElement===R.current){var Me=R.current,Ne=Me.selectionStart,Le=Me.selectionEnd,Ve=Me.scrollTop;R.current.setSelectionRange(Ne,Le),R.current.scrollTop=Ve}}catch{}},te=C.exports.useState(T_),Y=ze(te,2),le=Y[0],J=Y[1],Z=C.exports.useState(),Q=ze(Z,2),ge=Q[0],re=Q[1],de=function(){J(E_)};si(function(){q&&de()},[l,B,U,q]),si(function(){if(le===E_)J(k_);else if(le===k_){var De=oY(R.current,!1,B,U);J(T_),re(De)}else H()},[le]);var oe=C.exports.useRef(),ye=function(){nr.cancel(oe.current)},Re=function(Me){le===T_&&(o==null||o(Me),c&&(ye(),oe.current=nr(function(){de()})))};C.exports.useEffect(function(){return ye},[]);var Te=q?ge:null,ke=ve(ve({},p),Te);return(le===E_||le===k_)&&(ke.overflowY="hidden",ke.overflowX="hidden"),E(ol,{onResize:Re,disabled:!(c||o),children:E("textarea",{...w,ref:R,style:ke,className:Ye(r,h,se({},"".concat(r,"-disabled"),g)),disabled:g,value:A,onChange:M})})}),lY=function(e){li(n,e);var t=ui(n);function n(r){var i;Kr(this,n),i=t.call(this,r),i.resizableTextArea=void 0,i.focus=function(){i.resizableTextArea.textArea.focus()},i.saveTextArea=function(c){i.resizableTextArea=c},i.handleChange=function(c){var o=i.props.onChange;i.setValue(c.target.value),o&&o(c)},i.handleKeyDown=function(c){var o=i.props,h=o.onPressEnter,p=o.onKeyDown;c.keyCode===13&&h&&h(c),p&&p(c)};var l=typeof r.value>"u"||r.value===null?r.defaultValue:r.value;return i.state={value:l},i}return Hr(n,[{key:"setValue",value:function(i,l){"value"in this.props||this.setState({value:i},l)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return E(sY,{...this.props,value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea})}}],[{key:"getDerivedStateFromProps",value:function(i){return"value"in i?{value:i.value}:null}}]),n}(C.exports.Component),uY=ra("text","input");function cY(e){return!!(e.addonBefore||e.addonAfter)}var dY=function(e){li(n,e);var t=ui(n);function n(){return Kr(this,n),t.apply(this,arguments)}return Hr(n,[{key:"renderClearIcon",value:function(i){var l,c=this.props,o=c.value,h=c.disabled,p=c.readOnly,g=c.handleReset,b=c.suffix,w=!h&&!p&&o,P="".concat(i,"-clear-icon");return E(kc,{onClick:g,onMouseDown:function(A){return A.preventDefault()},className:Ye((l={},se(l,"".concat(P,"-hidden"),!w),se(l,"".concat(P,"-has-suffix"),!!b),l),P),role:"button"})}},{key:"renderTextAreaWithClearIcon",value:function(i,l,c){var o,h=this.props,p=h.value,g=h.allowClear,b=h.className,w=h.style,P=h.direction,I=h.bordered,A=h.hidden,O=h.status,M=c.status,R=c.hasFeedback;if(!g)return Ei(l,{value:p});var N=Ye("".concat(i,"-affix-wrapper"),"".concat(i,"-affix-wrapper-textarea-with-clear-btn"),eu("".concat(i,"-affix-wrapper"),Xp(M,O),R),(o={},se(o,"".concat(i,"-affix-wrapper-rtl"),P==="rtl"),se(o,"".concat(i,"-affix-wrapper-borderless"),!I),se(o,"".concat(b),!cY(this.props)&&b),o));return Qe("span",{className:N,style:w,hidden:A,children:[Ei(l,{style:null,value:p}),this.renderClearIcon(i)]})}},{key:"render",value:function(){var i=this;return E(Yo.Consumer,{children:function(l){var c=i.props,o=c.prefixCls,h=c.inputType,p=c.element;if(h===uY[0])return i.renderTextAreaWithClearIcon(o,p,l)}})}}]),n}(C.exports.Component);const fY=dY;var hY=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function EA(e,t){return wt(e||"").slice(0,t).join("")}function ak(e,t,n,r){var i=n;return e?i=EA(n,r):wt(t||"").length<n.length&&wt(n||"").length>r&&(i=t),i}var pY=C.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.bordered,l=i===void 0?!0:i,c=e.showCount,o=c===void 0?!1:c,h=e.maxLength,p=e.className,g=e.style,b=e.size,w=e.disabled,P=e.onCompositionStart,I=e.onCompositionEnd,A=e.onChange,O=e.status,M=hY(e,["prefixCls","bordered","showCount","maxLength","className","style","size","disabled","onCompositionStart","onCompositionEnd","onChange","status"]),R=C.exports.useContext(Nn),N=R.getPrefixCls,z=R.direction,B=C.exports.useContext(ms),U=C.exports.useContext(pu),q=w!=null?w:U,H=C.exports.useContext(Yo),te=H.status,Y=H.hasFeedback,le=H.isFormItemInput,J=H.feedbackIcon,Z=Xp(te,O),Q=C.exports.useRef(null),ge=C.exports.useRef(null),re=C.exports.useState(!1),de=ze(re,2),oe=de[0],ye=de[1],Re=C.exports.useRef(),Te=C.exports.useRef(0),ke=Vi(M.defaultValue,{value:M.value}),De=ze(ke,2),Me=De[0],Ne=De[1],Le=M.hidden,Ve=function(ut,it){M.value===void 0&&(Ne(ut),it==null||it())},qe=Number(h)>0,Ue=function(ut){ye(!0),Re.current=Me,Te.current=ut.currentTarget.selectionStart,P==null||P(ut)},ct=function(ut){var it;ye(!1);var ft=ut.currentTarget.value;if(qe){var xt=Te.current>=h+1||Te.current===((it=Re.current)===null||it===void 0?void 0:it.length);ft=ak(xt,Re.current,ft,h)}ft!==Me&&(Ve(ft),C_(ut.currentTarget,ut,A,ft)),I==null||I(ut)},pt=function(ut){var it=ut.target.value;if(!oe&&qe){var ft=ut.target.selectionStart>=h+1||ut.target.selectionStart===it.length||!ut.target.selectionStart;it=ak(ft,Me,it,h)}Ve(it),C_(ut.currentTarget,ut,A,it)},Tt=function(ut){var it,ft,xt;Ve(""),(it=Q.current)===null||it===void 0||it.focus(),C_((xt=(ft=Q.current)===null||ft===void 0?void 0:ft.resizableTextArea)===null||xt===void 0?void 0:xt.textArea,ut,A)},Xe=N("input",r);C.exports.useImperativeHandle(t,function(){var dt;return{resizableTextArea:(dt=Q.current)===null||dt===void 0?void 0:dt.resizableTextArea,focus:function(it){var ft,xt;jX((xt=(ft=Q.current)===null||ft===void 0?void 0:ft.resizableTextArea)===null||xt===void 0?void 0:xt.textArea,it)},blur:function(){var it;return(it=Q.current)===null||it===void 0?void 0:it.blur()}}});var Pt=E(lY,{...mi(M,["allowClear"]),disabled:q,className:Ye((n={},se(n,"".concat(Xe,"-borderless"),!l),se(n,p,p&&!o),se(n,"".concat(Xe,"-sm"),B==="small"||b==="small"),se(n,"".concat(Xe,"-lg"),B==="large"||b==="large"),n),eu(Xe,Z)),style:o?{resize:g==null?void 0:g.resize}:g,prefixCls:Xe,onCompositionStart:Ue,onChange:pt,onCompositionEnd:ct,ref:Q}),mt=UX(Me);!oe&&qe&&(M.value===null||M.value===void 0)&&(mt=EA(mt,h));var Mt=E(fY,{disabled:q,...M,prefixCls:Xe,direction:z,inputType:"text",value:mt,element:Pt,handleReset:Tt,ref:ge,bordered:l,status:O,style:o?void 0:g});if(o||Y){var Ct,Lt=wt(mt).length,lt="";return sn(o)==="object"?lt=o.formatter({value:mt,count:Lt,maxLength:h}):lt="".concat(Lt).concat(qe?" / ".concat(h):""),Qe("div",{hidden:Le,className:Ye("".concat(Xe,"-textarea"),(Ct={},se(Ct,"".concat(Xe,"-textarea-rtl"),z==="rtl"),se(Ct,"".concat(Xe,"-textarea-show-count"),o),se(Ct,"".concat(Xe,"-textarea-in-form-item"),le),Ct),eu("".concat(Xe,"-textarea"),Z,Y),p),style:g,"data-count":lt,children:[Mt,Y&&E("span",{className:"".concat(Xe,"-textarea-suffix"),children:J})]})}return Mt});const kA=pY;var rm=T4;rm.Group=DX;rm.Search=tY;rm.TextArea=kA;rm.Password=QX;const Kl=rm;var mY={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"};const vY=mY;var TA=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:vY})})};TA.displayName="DoubleLeftOutlined";const gY=C.exports.forwardRef(TA);var yY={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};const xY=yY;var PA=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:xY})})};PA.displayName="DoubleRightOutlined";const _Y=C.exports.forwardRef(PA);var Ih=function(t){var n,r="".concat(t.rootPrefixCls,"-item"),i=Ye(r,"".concat(r,"-").concat(t.page),(n={},se(n,"".concat(r,"-active"),t.active),se(n,"".concat(r,"-disabled"),!t.page),se(n,t.className,!!t.className),n)),l=function(){t.onClick(t.page)},c=function(h){t.onKeyPress(h,t.onClick,t.page)};return E("li",{title:t.showTitle?t.page:null,className:i,onClick:l,onKeyPress:c,tabIndex:"0",children:t.itemRender(t.page,"page",E("a",{rel:"nofollow",children:t.page}))})};const Zu={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40};var IA=function(e){li(n,e);var t=ui(n);function n(){var r;Kr(this,n);for(var i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];return r=t.call.apply(t,[this].concat(l)),r.state={goInputText:""},r.buildOptionText=function(o){return"".concat(o," ").concat(r.props.locale.items_per_page)},r.changeSize=function(o){r.props.changeSize(Number(o))},r.handleChange=function(o){r.setState({goInputText:o.target.value})},r.handleBlur=function(o){var h=r.props,p=h.goButton,g=h.quickGo,b=h.rootPrefixCls,w=r.state.goInputText;p||w===""||(r.setState({goInputText:""}),!(o.relatedTarget&&(o.relatedTarget.className.indexOf("".concat(b,"-item-link"))>=0||o.relatedTarget.className.indexOf("".concat(b,"-item"))>=0))&&g(r.getValidValue()))},r.go=function(o){var h=r.state.goInputText;h!==""&&(o.keyCode===Zu.ENTER||o.type==="click")&&(r.setState({goInputText:""}),r.props.quickGo(r.getValidValue()))},r}return Hr(n,[{key:"getValidValue",value:function(){var i=this.state.goInputText;return!i||isNaN(i)?void 0:Number(i)}},{key:"getPageSizeOptions",value:function(){var i=this.props,l=i.pageSize,c=i.pageSizeOptions;return c.some(function(o){return o.toString()===l.toString()})?c:c.concat([l.toString()]).sort(function(o,h){var p=isNaN(Number(o))?0:Number(o),g=isNaN(Number(h))?0:Number(h);return p-g})}},{key:"render",value:function(){var i=this,l=this.props,c=l.pageSize,o=l.locale,h=l.rootPrefixCls,p=l.changeSize,g=l.quickGo,b=l.goButton,w=l.selectComponentClass,P=l.buildOptionText,I=l.selectPrefixCls,A=l.disabled,O=this.state.goInputText,M="".concat(h,"-options"),R=w,N=null,z=null,B=null;if(!p&&!g)return null;var U=this.getPageSizeOptions();if(p&&R){var q=U.map(function(H,te){return E(R.Option,{value:H.toString(),children:(P||i.buildOptionText)(H)},te)});N=E(R,{disabled:A,prefixCls:I,showSearch:!1,className:"".concat(M,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(c||U[0]).toString(),onChange:this.changeSize,getPopupContainer:function(te){return te.parentNode},"aria-label":o.page_size,defaultOpen:!1,children:q})}return g&&(b&&(B=typeof b=="boolean"?E("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:A,className:"".concat(M,"-quick-jumper-button"),children:o.jump_to_confirm}):E("span",{onClick:this.go,onKeyUp:this.go,children:b})),z=Qe("div",{className:"".concat(M,"-quick-jumper"),children:[o.jump_to,E("input",{disabled:A,type:"text",value:O,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":o.page}),o.page,B]})),Qe("li",{className:"".concat(M),children:[N,z]})}}]),n}(tr.Component);IA.defaultProps={pageSizeOptions:["10","20","50","100"]};const bY={items_per_page:"\u6761/\u9875",jump_to:"\u8DF3\u81F3",jump_to_confirm:"\u786E\u5B9A",page:"\u9875",prev_page:"\u4E0A\u4E00\u9875",next_page:"\u4E0B\u4E00\u9875",prev_5:"\u5411\u524D 5 \u9875",next_5:"\u5411\u540E 5 \u9875",prev_3:"\u5411\u524D 3 \u9875",next_3:"\u5411\u540E 3 \u9875",page_size:"\u9875\u7801"};function B2(){}function sk(e){var t=Number(e);return typeof t=="number"&&!isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function wY(e,t,n){return n}function Tl(e,t,n){var r=typeof e>"u"?t.pageSize:e;return Math.floor((n.total-1)/r)+1}var MA=function(e){li(n,e);var t=ui(n);function n(r){var i;Kr(this,n),i=t.call(this,r),i.getJumpPrevPage=function(){return Math.max(1,i.state.current-(i.props.showLessItems?3:5))},i.getJumpNextPage=function(){return Math.min(Tl(void 0,i.state,i.props),i.state.current+(i.props.showLessItems?3:5))},i.getItemIcon=function(p,g){var b=i.props.prefixCls,w=p||E("button",{type:"button","aria-label":g,className:"".concat(b,"-item-link")});return typeof p=="function"&&(w=tr.createElement(p,ve({},i.props))),w},i.savePaginationNode=function(p){i.paginationNode=p},i.isValid=function(p){var g=i.props.total;return sk(p)&&p!==i.state.current&&sk(g)&&g>0},i.shouldDisplayQuickJumper=function(){var p=i.props,g=p.showQuickJumper,b=p.total,w=i.state.pageSize;return b<=w?!1:g},i.handleKeyDown=function(p){(p.keyCode===Zu.ARROW_UP||p.keyCode===Zu.ARROW_DOWN)&&p.preventDefault()},i.handleKeyUp=function(p){var g=i.getValidValue(p),b=i.state.currentInputValue;g!==b&&i.setState({currentInputValue:g}),p.keyCode===Zu.ENTER?i.handleChange(g):p.keyCode===Zu.ARROW_UP?i.handleChange(g-1):p.keyCode===Zu.ARROW_DOWN&&i.handleChange(g+1)},i.handleBlur=function(p){var g=i.getValidValue(p);i.handleChange(g)},i.changePageSize=function(p){var g=i.state.current,b=Tl(p,i.state,i.props);g=g>b?b:g,b===0&&(g=i.state.current),typeof p=="number"&&("pageSize"in i.props||i.setState({pageSize:p}),"current"in i.props||i.setState({current:g,currentInputValue:g})),i.props.onShowSizeChange(g,p),"onChange"in i.props&&i.props.onChange&&i.props.onChange(g,p)},i.handleChange=function(p){var g=i.props,b=g.disabled,w=g.onChange,P=i.state,I=P.pageSize,A=P.current,O=P.currentInputValue;if(i.isValid(p)&&!b){var M=Tl(void 0,i.state,i.props),R=p;return p>M?R=M:p<1&&(R=1),"current"in i.props||i.setState({current:R}),R!==O&&i.setState({currentInputValue:R}),w(R,I),R}return A},i.prev=function(){i.hasPrev()&&i.handleChange(i.state.current-1)},i.next=function(){i.hasNext()&&i.handleChange(i.state.current+1)},i.jumpPrev=function(){i.handleChange(i.getJumpPrevPage())},i.jumpNext=function(){i.handleChange(i.getJumpNextPage())},i.hasPrev=function(){return i.state.current>1},i.hasNext=function(){return i.state.current<Tl(void 0,i.state,i.props)},i.runIfEnter=function(p,g){if(p.key==="Enter"||p.charCode===13){for(var b=arguments.length,w=new Array(b>2?b-2:0),P=2;P<b;P++)w[P-2]=arguments[P];g.apply(void 0,w)}},i.runIfEnterPrev=function(p){i.runIfEnter(p,i.prev)},i.runIfEnterNext=function(p){i.runIfEnter(p,i.next)},i.runIfEnterJumpPrev=function(p){i.runIfEnter(p,i.jumpPrev)},i.runIfEnterJumpNext=function(p){i.runIfEnter(p,i.jumpNext)},i.handleGoTO=function(p){(p.keyCode===Zu.ENTER||p.type==="click")&&i.handleChange(i.state.currentInputValue)};var l=r.onChange!==B2,c="current"in r;c&&!l&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var o=r.defaultCurrent;"current"in r&&(o=r.current);var h=r.defaultPageSize;return"pageSize"in r&&(h=r.pageSize),o=Math.min(o,Tl(h,void 0,r)),i.state={current:o,currentInputValue:o,pageSize:h},i}return Hr(n,[{key:"componentDidUpdate",value:function(i,l){var c=this.props.prefixCls;if(l.current!==this.state.current&&this.paginationNode){var o=this.paginationNode.querySelector(".".concat(c,"-item-").concat(l.current));o&&document.activeElement===o&&o.blur()}}},{key:"getValidValue",value:function(i){var l=i.target.value,c=Tl(void 0,this.state,this.props),o=this.state.currentInputValue,h;return l===""?h=l:isNaN(Number(l))?h=o:l>=c?h=c:h=Number(l),h}},{key:"getShowSizeChanger",value:function(){var i=this.props,l=i.showSizeChanger,c=i.total,o=i.totalBoundaryShowSizeChanger;return typeof l<"u"?l:c>o}},{key:"renderPrev",value:function(i){var l=this.props,c=l.prevIcon,o=l.itemRender,h=o(i,"prev",this.getItemIcon(c,"prev page")),p=!this.hasPrev();return C.exports.isValidElement(h)?C.exports.cloneElement(h,{disabled:p}):h}},{key:"renderNext",value:function(i){var l=this.props,c=l.nextIcon,o=l.itemRender,h=o(i,"next",this.getItemIcon(c,"next page")),p=!this.hasNext();return C.exports.isValidElement(h)?C.exports.cloneElement(h,{disabled:p}):h}},{key:"render",value:function(){var i=this,l=this.props,c=l.prefixCls,o=l.className,h=l.style,p=l.disabled,g=l.hideOnSinglePage,b=l.total,w=l.locale,P=l.showQuickJumper,I=l.showLessItems,A=l.showTitle,O=l.showTotal,M=l.simple,R=l.itemRender,N=l.showPrevNextJumpers,z=l.jumpPrevIcon,B=l.jumpNextIcon,U=l.selectComponentClass,q=l.selectPrefixCls,H=l.pageSizeOptions,te=this.state,Y=te.current,le=te.pageSize,J=te.currentInputValue;if(g===!0&&b<=le)return null;var Z=Tl(void 0,this.state,this.props),Q=[],ge=null,re=null,de=null,oe=null,ye=null,Re=P&&P.goButton,Te=I?1:2,ke=Y-1>0?Y-1:0,De=Y+1<Z?Y+1:Z,Me=Object.keys(this.props).reduce(function(Ct,Lt){return(Lt.substr(0,5)==="data-"||Lt.substr(0,5)==="aria-"||Lt==="role")&&(Ct[Lt]=i.props[Lt]),Ct},{}),Ne=O&&E("li",{className:"".concat(c,"-total-text"),children:O(b,[b===0?0:(Y-1)*le+1,Y*le>b?b:Y*le])});if(M)return Re&&(typeof Re=="boolean"?ye=E("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO,children:w.jump_to_confirm}):ye=E("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO,children:Re}),ye=E("li",{title:A?"".concat(w.jump_to).concat(Y,"/").concat(Z):null,className:"".concat(c,"-simple-pager"),children:ye})),Qe("ul",{className:Ye(c,"".concat(c,"-simple"),se({},"".concat(c,"-disabled"),p),o),style:h,ref:this.savePaginationNode,...Me,children:[Ne,E("li",{title:A?w.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:Ye("".concat(c,"-prev"),se({},"".concat(c,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev(),children:this.renderPrev(ke)}),Qe("li",{title:A?"".concat(Y,"/").concat(Z):null,className:"".concat(c,"-simple-pager"),children:[E("input",{type:"text",value:J,disabled:p,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:"3"}),E("span",{className:"".concat(c,"-slash"),children:"/"}),Z]}),E("li",{title:A?w.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:Ye("".concat(c,"-next"),se({},"".concat(c,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext(),children:this.renderNext(De)}),ye]});if(Z<=3+Te*2){var Le={locale:w,rootPrefixCls:c,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:A,itemRender:R};Z||Q.push(C.exports.createElement(Ih,{...Le,key:"noPager",page:1,className:"".concat(c,"-item-disabled")}));for(var Ve=1;Ve<=Z;Ve+=1){var qe=Y===Ve;Q.push(C.exports.createElement(Ih,{...Le,key:Ve,page:Ve,active:qe}))}}else{var Ue=I?w.prev_3:w.prev_5,ct=I?w.next_3:w.next_5;N&&(ge=E("li",{title:A?Ue:null,onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:Ye("".concat(c,"-jump-prev"),se({},"".concat(c,"-jump-prev-custom-icon"),!!z)),children:R(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(z,"prev page"))},"prev"),re=E("li",{title:A?ct:null,tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:Ye("".concat(c,"-jump-next"),se({},"".concat(c,"-jump-next-custom-icon"),!!B)),children:R(this.getJumpNextPage(),"jump-next",this.getItemIcon(B,"next page"))},"next")),oe=E(Ih,{locale:w,last:!0,rootPrefixCls:c,onClick:this.handleChange,onKeyPress:this.runIfEnter,page:Z,active:!1,showTitle:A,itemRender:R},Z),de=E(Ih,{locale:w,rootPrefixCls:c,onClick:this.handleChange,onKeyPress:this.runIfEnter,page:1,active:!1,showTitle:A,itemRender:R},1);var pt=Math.max(1,Y-Te),Tt=Math.min(Y+Te,Z);Y-1<=Te&&(Tt=1+Te*2),Z-Y<=Te&&(pt=Z-Te*2);for(var Xe=pt;Xe<=Tt;Xe+=1){var Pt=Y===Xe;Q.push(E(Ih,{locale:w,rootPrefixCls:c,onClick:this.handleChange,onKeyPress:this.runIfEnter,page:Xe,active:Pt,showTitle:A,itemRender:R},Xe))}Y-1>=Te*2&&Y!==1+2&&(Q[0]=C.exports.cloneElement(Q[0],{className:"".concat(c,"-item-after-jump-prev")}),Q.unshift(ge)),Z-Y>=Te*2&&Y!==Z-2&&(Q[Q.length-1]=C.exports.cloneElement(Q[Q.length-1],{className:"".concat(c,"-item-before-jump-next")}),Q.push(re)),pt!==1&&Q.unshift(de),Tt!==Z&&Q.push(oe)}var mt=!this.hasPrev()||!Z,Mt=!this.hasNext()||!Z;return Qe("ul",{className:Ye(c,o,se({},"".concat(c,"-disabled"),p)),style:h,ref:this.savePaginationNode,...Me,children:[Ne,E("li",{title:A?w.prev_page:null,onClick:this.prev,tabIndex:mt?null:0,onKeyPress:this.runIfEnterPrev,className:Ye("".concat(c,"-prev"),se({},"".concat(c,"-disabled"),mt)),"aria-disabled":mt,children:this.renderPrev(ke)}),Q,E("li",{title:A?w.next_page:null,onClick:this.next,tabIndex:Mt?null:0,onKeyPress:this.runIfEnterNext,className:Ye("".concat(c,"-next"),se({},"".concat(c,"-disabled"),Mt)),"aria-disabled":Mt,children:this.renderNext(De)}),E(IA,{disabled:p,locale:w,rootPrefixCls:c,selectComponentClass:U,selectPrefixCls:q,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Y,pageSize:le,pageSizeOptions:H,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Re})]})}}],[{key:"getDerivedStateFromProps",value:function(i,l){var c={};if("current"in i&&(c.current=i.current,i.current!==l.current&&(c.currentInputValue=c.current)),"pageSize"in i&&i.pageSize!==l.pageSize){var o=l.current,h=Tl(i.pageSize,l,i);o=o>h?h:o,"current"in i||(c.current=o,c.currentInputValue=o),c.pageSize=i.pageSize}return c}}]),n}(tr.Component);MA.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:B2,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:B2,locale:bY,style:{},itemRender:wY,totalBoundaryShowSizeChanger:50};var RA=function(t){return E(tl,{...t,size:"small"})},AA=function(t){return E(tl,{...t,size:"middle"})};RA.Option=tl.Option;AA.Option=tl.Option;var CY=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},SY=function(t){var n=t.prefixCls,r=t.selectPrefixCls,i=t.className,l=t.size,c=t.locale,o=t.selectComponentClass,h=t.responsive,p=t.showSizeChanger,g=CY(t,["prefixCls","selectPrefixCls","className","size","locale","selectComponentClass","responsive","showSizeChanger"]),b=v7(h),w=b.xs,P=C.exports.useContext(Nn),I=P.getPrefixCls,A=P.direction,O=P.pagination,M=O===void 0?{}:O,R=I("pagination",n),N=p!=null?p:M.showSizeChanger,z=function(){var U=E("span",{className:"".concat(R,"-item-ellipsis"),children:"\u2022\u2022\u2022"}),q=E("button",{className:"".concat(R,"-item-link"),type:"button",tabIndex:-1,children:E(fG,{})}),H=E("button",{className:"".concat(R,"-item-link"),type:"button",tabIndex:-1,children:E(v4,{})}),te=E("a",{className:"".concat(R,"-item-link"),children:Qe("div",{className:"".concat(R,"-item-container"),children:[E(gY,{className:"".concat(R,"-item-link-icon")}),U]})}),Y=E("a",{className:"".concat(R,"-item-link"),children:Qe("div",{className:"".concat(R,"-item-container"),children:[E(_Y,{className:"".concat(R,"-item-link-icon")}),U]})});if(A==="rtl"){var le=[H,q];q=le[0],H=le[1];var J=[Y,te];te=J[0],Y=J[1]}return{prevIcon:q,nextIcon:H,jumpPrevIcon:te,jumpNextIcon:Y}};return E(Wp,{componentName:"Pagination",defaultLocale:lM,children:function(B){var U,q=tt(tt({},B),c),H=l==="small"||!!(w&&!l&&h),te=I("select",r),Y=Ye((U={},se(U,"".concat(R,"-mini"),H),se(U,"".concat(R,"-rtl"),A==="rtl"),U),i);return E(MA,{...z(),...g,prefixCls:R,selectPrefixCls:te,className:Y,selectComponentClass:o||(H?RA:AA),locale:q,showSizeChanger:N})}})};const EY=SY;var kY=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};ra("small","default","large");var Tg=null;function TY(e,t){var n=t.indicator,r="".concat(e,"-dot");return n===null?null:Do(n)?Ei(n,{className:Ye(n.props.className,r)}):Do(Tg)?Ei(Tg,{className:Ye(Tg.props.className,r)}):Qe("span",{className:Ye(r,"".concat(e,"-dot-spin")),children:[E("i",{className:"".concat(e,"-dot-item")}),E("i",{className:"".concat(e,"-dot-item")}),E("i",{className:"".concat(e,"-dot-item")}),E("i",{className:"".concat(e,"-dot-item")})]})}function PY(e,t){return!!e&&!!t&&!isNaN(Number(t))}var IY=function(t){var n=t.spinPrefixCls,r=t.spinning,i=r===void 0?!0:r,l=t.delay,c=t.className,o=t.size,h=o===void 0?"default":o,p=t.tip,g=t.wrapperClassName,b=t.style,w=t.children,P=kY(t,["spinPrefixCls","spinning","delay","className","size","tip","wrapperClassName","style","children"]),I=C.exports.useState(function(){return i&&!PY(i,l)}),A=ze(I,2),O=A[0],M=A[1];C.exports.useEffect(function(){var z=aZ(function(){M(i)},l);return z(),function(){var B;(B=z==null?void 0:z.cancel)===null||B===void 0||B.call(z)}},[l,i]);var R=function(){return typeof w<"u"},N=function(B){var U,q=B.direction,H=Ye(n,(U={},se(U,"".concat(n,"-sm"),h==="small"),se(U,"".concat(n,"-lg"),h==="large"),se(U,"".concat(n,"-spinning"),O),se(U,"".concat(n,"-show-text"),!!p),se(U,"".concat(n,"-rtl"),q==="rtl"),U),c),te=mi(P,["indicator","prefixCls"]),Y=Qe("div",{...te,style:b,className:H,"aria-live":"polite","aria-busy":O,children:[TY(n,t),p?E("div",{className:"".concat(n,"-text"),children:p}):null]});if(R()){var le=Ye("".concat(n,"-container"),se({},"".concat(n,"-blur"),O));return Qe("div",{...te,className:Ye("".concat(n,"-nested-loading"),g),children:[O&&E("div",{children:Y},"loading"),E("div",{className:le,children:w},"container")]})}return Y};return E(hu,{children:N})},OA=function(t){var n=t.prefixCls,r=C.exports.useContext(Nn),i=r.getPrefixCls,l=i("spin",n),c=tt(tt({},t),{spinPrefixCls:l});return E(IY,{...c})};OA.setDefaultIndicator=function(e){Tg=e};const P4=OA;function lk(e){return!!(e&&!!e.then)}var MY=function(t){var n=C.exports.useRef(!1),r=C.exports.useRef(null),i=fs(!1),l=ze(i,2),c=l[0],o=l[1],h=t.close,p=function(){h==null||h.apply(void 0,arguments)};C.exports.useEffect(function(){var O=null;return t.autoFocus&&(O=setTimeout(function(){var M;(M=r.current)===null||M===void 0||M.focus()})),function(){O&&clearTimeout(O)}},[]);var g=function(M){!lk(M)||(o(!0),M.then(function(){o(!1,!0),p.apply(void 0,arguments),n.current=!1},function(R){console.error(R),o(!1,!0),n.current=!1}))},b=function(M){var R=t.actionFn;if(!n.current){if(n.current=!0,!R){p();return}var N;if(t.emitEvent){if(N=R(M),t.quitOnNullishReturnValue&&!lk(N)){n.current=!1,p(M);return}}else if(R.length)N=R(h),n.current=!1;else if(N=R(),!N){p();return}g(N)}},w=t.type,P=t.children,I=t.prefixCls,A=t.buttonProps;return E(Br,{...j7(w),onClick:b,loading:c,prefixCls:I,...A,ref:r,children:P})};const uk=MY;var RY=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},V2,AY=function(t){V2={x:t.pageX,y:t.pageY},setTimeout(function(){V2=null},100)};H7()&&document.documentElement.addEventListener("click",AY,!0);var OY=function(t){var n,r,i=C.exports.useContext(Nn),l=i.getPopupContainer,c=i.getPrefixCls,o=i.direction,h=function(Q){var ge=t.onCancel;ge==null||ge(Q)},p=function(Q){var ge=t.onOk;ge==null||ge(Q)},g=t.prefixCls,b=t.footer,w=t.visible,P=t.open,I=P===void 0?!1:P,A=t.wrapClassName,O=t.centered,M=t.getContainer,R=t.closeIcon,N=t.focusTriggerAfterClose,z=N===void 0?!0:N,B=t.width,U=B===void 0?520:B,q=RY(t,["prefixCls","footer","visible","open","wrapClassName","centered","getContainer","closeIcon","focusTriggerAfterClose","width"]),H=c("modal",g),te=c(),Y=E(Wp,{componentName:"Modal",defaultLocale:cM(),children:function(Z){var Q=t.okText,ge=t.okType,re=ge===void 0?"primary":ge,de=t.cancelText,oe=t.confirmLoading,ye=oe===void 0?!1:oe;return Qe($n,{children:[E(Br,{onClick:h,...t.cancelButtonProps,children:de||Z.cancelText}),E(Br,{...j7(re),loading:ye,onClick:p,...t.okButtonProps,children:Q!=null?Q:Z.okText})]})}}),le=E("span",{className:"".concat(H,"-close-x"),children:R||E(I0,{className:"".concat(H,"-close-icon")})}),J=Ye(A,(n={},se(n,"".concat(H,"-centered"),!!O),se(n,"".concat(H,"-wrap-rtl"),o==="rtl"),n));return E(xy,{children:E(I2,{status:!0,override:!0,children:E(bA,{width:U,...q,getContainer:M===void 0?l:M,prefixCls:H,wrapClassName:J,footer:b===void 0?Y:b,visible:I||w,mousePosition:(r=q.mousePosition)!==null&&r!==void 0?r:V2,onClose:h,closeIcon:le,focusTriggerAfterClose:z,transitionName:el(te,"zoom",t.transitionName),maskTransitionName:el(te,"fade",t.maskTransitionName)})})})};const NA=OY;var NY=function(t){var n=t.icon,r=t.onCancel,i=t.onOk,l=t.close,c=t.zIndex,o=t.afterClose,h=t.visible,p=t.open,g=t.keyboard,b=t.centered,w=t.getContainer,P=t.maskStyle,I=t.okText,A=t.okButtonProps,O=t.cancelText,M=t.cancelButtonProps,R=t.direction,N=t.prefixCls,z=t.wrapClassName,B=t.rootPrefixCls,U=t.iconPrefixCls,q=t.bodyStyle,H=t.closable,te=H===void 0?!1:H,Y=t.closeIcon,le=t.modalRender,J=t.focusTriggerAfterClose,Z=t.okType||"primary",Q="".concat(N,"-confirm"),ge="okCancel"in t?t.okCancel:!0,re=t.width||416,de=t.style||{},oe=t.mask===void 0?!0:t.mask,ye=t.maskClosable===void 0?!1:t.maskClosable,Re=t.autoFocusButton===null?!1:t.autoFocusButton||"ok",Te=Ye(Q,"".concat(Q,"-").concat(t.type),se({},"".concat(Q,"-rtl"),R==="rtl"),t.className),ke=ge&&E(uk,{actionFn:r,close:l,autoFocus:Re==="cancel",buttonProps:M,prefixCls:"".concat(B,"-btn"),children:O});return E(df,{prefixCls:B,iconPrefixCls:U,direction:R,children:E(NA,{prefixCls:N,className:Te,wrapClassName:Ye(se({},"".concat(Q,"-centered"),!!t.centered),z),onCancel:function(){return l==null?void 0:l({triggerCancel:!0})},open:p||h,title:"",footer:"",transitionName:el(B,"zoom",t.transitionName),maskTransitionName:el(B,"fade",t.maskTransitionName),mask:oe,maskClosable:ye,maskStyle:P,style:de,bodyStyle:q,width:re,zIndex:c,afterClose:o,keyboard:g,centered:b,getContainer:w,closable:te,closeIcon:Y,modalRender:le,focusTriggerAfterClose:J,children:Qe("div",{className:"".concat(Q,"-body-wrapper"),children:[Qe("div",{className:"".concat(Q,"-body"),children:[n,t.title===void 0?null:E("span",{className:"".concat(Q,"-title"),children:t.title}),E("div",{className:"".concat(Q,"-content"),children:t.content})]}),Qe("div",{className:"".concat(Q,"-btns"),children:[ke,E(uk,{type:Z,actionFn:i,close:l,autoFocus:Re==="ok",buttonProps:A,prefixCls:"".concat(B,"-btn"),children:I})]})]})})})};const DA=NY;var DY=[];const Pd=DY;var LY=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},LA="";function zY(){return LA}function im(e){var t=document.createDocumentFragment(),n=tt(tt({},e),{close:c,open:!0}),r;function i(){for(var h=arguments.length,p=new Array(h),g=0;g<h;g++)p[g]=arguments[g];var b=p.some(function(I){return I&&I.triggerCancel});e.onCancel&&b&&e.onCancel.apply(e,[function(){}].concat(wt(p.slice(1))));for(var w=0;w<Pd.length;w++){var P=Pd[w];if(P===c){Pd.splice(w,1);break}}IM(t)}function l(h){var p=h.okText,g=h.cancelText,b=h.prefixCls,w=LY(h,["okText","cancelText","prefixCls"]);clearTimeout(r),r=setTimeout(function(){var P=cM(),I=GC(),A=I.getPrefixCls,O=I.getIconPrefixCls,M=A(void 0,zY()),R=b||"".concat(M,"-modal"),N=O();PM(E(DA,{...w,prefixCls:R,rootPrefixCls:M,iconPrefixCls:N,okText:p||(w.okCancel?P.okText:P.justOkText),cancelText:g||P.cancelText}),t)})}function c(){for(var h=this,p=arguments.length,g=new Array(p),b=0;b<p;b++)g[b]=arguments[b];n=tt(tt({},n),{open:!1,afterClose:function(){typeof e.afterClose=="function"&&e.afterClose(),i.apply(h,g)}}),n.visible&&delete n.visible,l(n)}function o(h){typeof h=="function"?n=h(n):n=tt(tt({},n),h),l(n)}return l(n),Pd.push(c),{destroy:c,update:o}}function zA(e){return tt(tt({icon:E(M0,{}),okCancel:!1},e),{type:"warning"})}function FA(e){return tt(tt({icon:E(WC,{}),okCancel:!1},e),{type:"info"})}function $A(e){return tt(tt({icon:E(KC,{}),okCancel:!1},e),{type:"success"})}function BA(e){return tt(tt({icon:E(HC,{}),okCancel:!1},e),{type:"error"})}function VA(e){return tt(tt({icon:E(M0,{}),okCancel:!0},e),{type:"confirm"})}function FY(e){var t=e.rootPrefixCls;LA=t}function $Y(){var e=C.exports.useState([]),t=ze(e,2),n=t[0],r=t[1],i=C.exports.useCallback(function(l){return r(function(c){return[].concat(wt(c),[l])}),function(){r(function(c){return c.filter(function(o){return o!==l})})}},[]);return[n,i]}var BY=function(t,n){var r=t.afterClose,i=t.config,l=C.exports.useState(!0),c=ze(l,2),o=c[0],h=c[1],p=C.exports.useState(i),g=ze(p,2),b=g[0],w=g[1],P=C.exports.useContext(Nn),I=P.direction,A=P.getPrefixCls,O=A("modal"),M=A(),R=function(){h(!1);for(var z=arguments.length,B=new Array(z),U=0;U<z;U++)B[U]=arguments[U];var q=B.some(function(H){return H&&H.triggerCancel});b.onCancel&&q&&b.onCancel.apply(b,[function(){}].concat(wt(B.slice(1))))};return C.exports.useImperativeHandle(n,function(){return{destroy:R,update:function(z){w(function(B){return tt(tt({},B),z)})}}}),E(Wp,{componentName:"Modal",defaultLocale:Js.Modal,children:function(N){return E(DA,{prefixCls:O,rootPrefixCls:M,...b,close:R,open:o,afterClose:r,okText:b.okText||(b.okCancel?N.okText:N.justOkText),direction:I,cancelText:b.cancelText||N.cancelText})}})};const VY=C.exports.forwardRef(BY);var ck=0,UY=C.exports.memo(C.exports.forwardRef(function(e,t){var n=$Y(),r=ze(n,2),i=r[0],l=r[1];return C.exports.useImperativeHandle(t,function(){return{patchElement:l}},[]),E($n,{children:i})}));function jY(){var e=C.exports.useRef(null),t=C.exports.useState([]),n=ze(t,2),r=n[0],i=n[1];C.exports.useEffect(function(){if(r.length){var o=wt(r);o.forEach(function(h){h()}),i([])}},[r]);var l=C.exports.useCallback(function(o){return function(p){var g;ck+=1;var b=C.exports.createRef(),w,P=E(VY,{config:o(p),ref:b,afterClose:function(){w==null||w()}},"modal-".concat(ck));return w=(g=e.current)===null||g===void 0?void 0:g.patchElement(P),{destroy:function(){function A(){var O;(O=b.current)===null||O===void 0||O.destroy()}b.current?A():i(function(O){return[].concat(wt(O),[A])})},update:function(A){function O(){var M;(M=b.current)===null||M===void 0||M.update(A)}b.current?O():i(function(M){return[].concat(wt(M),[O])})}}}},[]),c=C.exports.useMemo(function(){return{info:l(FA),success:l($A),error:l(BA),warning:l(zA),confirm:l(VA)}},[]);return[c,E(UY,{ref:e})]}function UA(e){return im(zA(e))}var gs=NA;gs.useModal=jY;gs.info=function(t){return im(FA(t))};gs.success=function(t){return im($A(t))};gs.error=function(t){return im(BA(t))};gs.warning=UA;gs.warn=UA;gs.confirm=function(t){return im(VA(t))};gs.destroyAll=function(){for(;Pd.length;){var t=Pd.pop();t&&t()}};gs.config=FY;const KY=gs;var HY={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M869 487.8L491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 000-48.4z"}}]},name:"arrow-right",theme:"outlined"};const WY=HY;var GY=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},qY={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-block"},ZY=C.exports.forwardRef(function(e,t){var n=function(g){var b=g.keyCode;b===Et.ENTER&&g.preventDefault()},r=function(g){var b=g.keyCode,w=e.onClick;b===Et.ENTER&&w&&w()},i=e.style,l=e.noStyle,c=e.disabled,o=GY(e,["style","noStyle","disabled"]),h={};return l||(h=tt({},qY)),c&&(h.pointerEvents="none"),h=tt(tt({},h),i),E("div",{role:"button",tabIndex:0,ref:t,...o,onKeyDown:n,onKeyUp:r,style:h})});const dk=ZY;var XY={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M955.7 856l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zM480 416c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v184c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V416zm32 352a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"warning",theme:"filled"};const YY=XY;var jA=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:YY})})};jA.displayName="WarningFilled";const QY=C.exports.forwardRef(jA);var JY=function(){return Qe("svg",{width:"252",height:"294",children:[E("defs",{children:E("path",{d:"M0 .387h251.772v251.772H0z"})}),Qe("g",{fill:"none",fillRule:"evenodd",children:[Qe("g",{transform:"translate(0 .012)",children:[E("mask",{fill:"#fff"}),E("path",{d:"M0 127.32v-2.095C0 56.279 55.892.387 124.838.387h2.096c68.946 0 124.838 55.892 124.838 124.838v2.096c0 68.946-55.892 124.838-124.838 124.838h-2.096C55.892 252.16 0 196.267 0 127.321",fill:"#E4EBF7",mask:"url(#b)"})]}),E("path",{d:"M39.755 130.84a8.276 8.276 0 1 1-16.468-1.66 8.276 8.276 0 0 1 16.468 1.66",fill:"#FFF"}),E("path",{d:"M36.975 134.297l10.482 5.943M48.373 146.508l-12.648 10.788",stroke:"#FFF",strokeWidth:"2"}),E("path",{d:"M39.875 159.352a5.667 5.667 0 1 1-11.277-1.136 5.667 5.667 0 0 1 11.277 1.136M57.588 143.247a5.708 5.708 0 1 1-11.358-1.145 5.708 5.708 0 0 1 11.358 1.145M99.018 26.875l29.82-.014a4.587 4.587 0 1 0-.003-9.175l-29.82.013a4.587 4.587 0 1 0 .003 9.176M110.424 45.211l29.82-.013a4.588 4.588 0 0 0-.004-9.175l-29.82.013a4.587 4.587 0 1 0 .004 9.175",fill:"#FFF"}),E("path",{d:"M112.798 26.861v-.002l15.784-.006a4.588 4.588 0 1 0 .003 9.175l-15.783.007v-.002a4.586 4.586 0 0 0-.004-9.172M184.523 135.668c-.553 5.485-5.447 9.483-10.931 8.93-5.485-.553-9.483-5.448-8.93-10.932.552-5.485 5.447-9.483 10.932-8.93 5.485.553 9.483 5.447 8.93 10.932",fill:"#FFF"}),E("path",{d:"M179.26 141.75l12.64 7.167M193.006 156.477l-15.255 13.011",stroke:"#FFF",strokeWidth:"2"}),E("path",{d:"M184.668 170.057a6.835 6.835 0 1 1-13.6-1.372 6.835 6.835 0 0 1 13.6 1.372M203.34 153.325a6.885 6.885 0 1 1-13.7-1.382 6.885 6.885 0 0 1 13.7 1.382",fill:"#FFF"}),E("path",{d:"M151.931 192.324a2.222 2.222 0 1 1-4.444 0 2.222 2.222 0 0 1 4.444 0zM225.27 116.056a2.222 2.222 0 1 1-4.445 0 2.222 2.222 0 0 1 4.444 0zM216.38 151.08a2.223 2.223 0 1 1-4.446-.001 2.223 2.223 0 0 1 4.446 0zM176.917 107.636a2.223 2.223 0 1 1-4.445 0 2.223 2.223 0 0 1 4.445 0zM195.291 92.165a2.223 2.223 0 1 1-4.445 0 2.223 2.223 0 0 1 4.445 0zM202.058 180.711a2.223 2.223 0 1 1-4.446 0 2.223 2.223 0 0 1 4.446 0z",stroke:"#FFF",strokeWidth:"2"}),E("path",{stroke:"#FFF",strokeWidth:"2",d:"M214.404 153.302l-1.912 20.184-10.928 5.99M173.661 174.792l-6.356 9.814h-11.36l-4.508 6.484M174.941 125.168v-15.804M220.824 117.25l-12.84 7.901-15.31-7.902V94.39"}),E("path",{d:"M166.588 65.936h-3.951a4.756 4.756 0 0 1-4.743-4.742 4.756 4.756 0 0 1 4.743-4.743h3.951a4.756 4.756 0 0 1 4.743 4.743 4.756 4.756 0 0 1-4.743 4.742",fill:"#FFF"}),E("path",{d:"M174.823 30.03c0-16.281 13.198-29.48 29.48-29.48 16.28 0 29.48 13.199 29.48 29.48 0 16.28-13.2 29.48-29.48 29.48-16.282 0-29.48-13.2-29.48-29.48",fill:"#1890FF"}),E("path",{d:"M205.952 38.387c.5.5.785 1.142.785 1.928s-.286 1.465-.785 1.964c-.572.5-1.214.75-2 .75-.785 0-1.429-.285-1.929-.785-.572-.5-.82-1.143-.82-1.929s.248-1.428.82-1.928c.5-.5 1.144-.75 1.93-.75.785 0 1.462.25 1.999.75m4.285-19.463c1.428 1.249 2.143 2.963 2.143 5.142 0 1.712-.427 3.13-1.219 4.25-.067.096-.137.18-.218.265-.416.429-1.41 1.346-2.956 2.699a5.07 5.07 0 0 0-1.428 1.75 5.207 5.207 0 0 0-.536 2.357v.5h-4.107v-.5c0-1.357.215-2.536.714-3.5.464-.964 1.857-2.464 4.178-4.536l.43-.5c.643-.785.964-1.643.964-2.535 0-1.18-.358-2.108-1-2.785-.678-.68-1.643-1.001-2.858-1.001-1.536 0-2.642.464-3.357 1.43-.37.5-.621 1.135-.76 1.904a1.999 1.999 0 0 1-1.971 1.63h-.004c-1.277 0-2.257-1.183-1.98-2.43.337-1.518 1.02-2.78 2.073-3.784 1.536-1.5 3.607-2.25 6.25-2.25 2.32 0 4.214.607 5.642 1.894",fill:"#FFF"}),E("path",{d:"M52.04 76.131s21.81 5.36 27.307 15.945c5.575 10.74-6.352 9.26-15.73 4.935-10.86-5.008-24.7-11.822-11.577-20.88",fill:"#FFB594"}),E("path",{d:"M90.483 67.504l-.449 2.893c-.753.49-4.748-2.663-4.748-2.663l-1.645.748-1.346-5.684s6.815-4.589 8.917-5.018c2.452-.501 9.884.94 10.7 2.278 0 0 1.32.486-2.227.69-3.548.203-5.043.447-6.79 3.132-1.747 2.686-2.412 3.624-2.412 3.624",fill:"#FFC6A0"}),E("path",{d:"M128.055 111.367c-2.627-7.724-6.15-13.18-8.917-15.478-3.5-2.906-9.34-2.225-11.366-4.187-1.27-1.231-3.215-1.197-3.215-1.197s-14.98-3.158-16.828-3.479c-2.37-.41-2.124-.714-6.054-1.405-1.57-1.907-2.917-1.122-2.917-1.122l-7.11-1.383c-.853-1.472-2.423-1.023-2.423-1.023l-2.468-.897c-1.645 9.976-7.74 13.796-7.74 13.796 1.795 1.122 15.703 8.3 15.703 8.3l5.107 37.11s-3.321 5.694 1.346 9.109c0 0 19.883-3.743 34.921-.329 0 0 3.047-2.546.972-8.806.523-3.01 1.394-8.263 1.736-11.622.385.772 2.019 1.918 3.14 3.477 0 0 9.407-7.365 11.052-14.012-.832-.723-1.598-1.585-2.267-2.453-.567-.736-.358-2.056-.765-2.717-.669-1.084-1.804-1.378-1.907-1.682",fill:"#FFF"}),E("path",{d:"M101.09 289.998s4.295 2.041 7.354 1.021c2.821-.94 4.53.668 7.08 1.178 2.55.51 6.874 1.1 11.686-1.26-.103-5.51-6.889-3.98-11.96-6.713-2.563-1.38-3.784-4.722-3.598-8.799h-9.402s-1.392 10.52-1.16 14.573",fill:"#CBD1D1"}),E("path",{d:"M101.067 289.826s2.428 1.271 6.759.653c3.058-.437 3.712.481 7.423 1.031 3.712.55 10.724-.069 11.823-.894.413 1.1-.343 2.063-.343 2.063s-1.512.603-4.812.824c-2.03.136-5.8.291-7.607-.503-1.787-1.375-5.247-1.903-5.728-.241-3.918.95-7.355-.286-7.355-.286l-.16-2.647z",fill:"#2B0849"}),E("path",{d:"M108.341 276.044h3.094s-.103 6.702 4.536 8.558c-4.64.618-8.558-2.303-7.63-8.558",fill:"#A4AABA"}),E("path",{d:"M57.542 272.401s-2.107 7.416-4.485 12.306c-1.798 3.695-4.225 7.492 5.465 7.492 6.648 0 8.953-.48 7.423-6.599-1.53-6.12.266-13.199.266-13.199h-8.669z",fill:"#CBD1D1"}),E("path",{d:"M51.476 289.793s2.097 1.169 6.633 1.169c6.083 0 8.249-1.65 8.249-1.65s.602 1.114-.619 2.165c-.993.855-3.597 1.591-7.39 1.546-4.145-.048-5.832-.566-6.736-1.168-.825-.55-.687-1.58-.137-2.062",fill:"#2B0849"}),E("path",{d:"M58.419 274.304s.033 1.519-.314 2.93c-.349 1.42-1.078 3.104-1.13 4.139-.058 1.151 4.537 1.58 5.155.034.62-1.547 1.294-6.427 1.913-7.252.619-.825-4.903-2.119-5.624.15",fill:"#A4AABA"}),E("path",{d:"M99.66 278.514l13.378.092s1.298-54.52 1.853-64.403c.554-9.882 3.776-43.364 1.002-63.128l-12.547-.644-22.849.78s-.434 3.966-1.195 9.976c-.063.496-.682.843-.749 1.365-.075.585.423 1.354.32 1.966-2.364 14.08-6.377 33.104-8.744 46.677-.116.666-1.234 1.009-1.458 2.691-.04.302.211 1.525.112 1.795-6.873 18.744-10.949 47.842-14.277 61.885l14.607-.014s2.197-8.57 4.03-16.97c2.811-12.886 23.111-85.01 23.111-85.01l3.016-.521 1.043 46.35s-.224 1.234.337 2.02c.56.785-.56 1.123-.392 2.244l.392 1.794s-.449 7.178-.898 11.89c-.448 4.71-.092 39.165-.092 39.165",fill:"#7BB2F9"}),E("path",{d:"M76.085 221.626c1.153.094 4.038-2.019 6.955-4.935M106.36 225.142s2.774-1.11 6.103-3.883",stroke:"#648BD8",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M107.275 222.1s2.773-1.11 6.102-3.884",stroke:"#648BD8",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M74.74 224.767s2.622-.591 6.505-3.365M86.03 151.634c-.27 3.106.3 8.525-4.336 9.123M103.625 149.88s.11 14.012-1.293 15.065c-2.219 1.664-2.99 1.944-2.99 1.944M99.79 150.438s.035 12.88-1.196 24.377M93.673 175.911s7.212-1.664 9.431-1.664M74.31 205.861a212.013 212.013 0 0 1-.979 4.56s-1.458 1.832-1.009 3.776c.449 1.944-.947 2.045-4.985 15.355-1.696 5.59-4.49 18.591-6.348 27.597l-.231 1.12M75.689 197.807a320.934 320.934 0 0 1-.882 4.754M82.591 152.233L81.395 162.7s-1.097.15-.5 2.244c.113 1.346-2.674 15.775-5.18 30.43M56.12 274.418h13.31",stroke:"#648BD8",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M116.241 148.22s-17.047-3.104-35.893.2c.158 2.514-.003 4.15-.003 4.15s14.687-2.818 35.67-.312c.252-2.355.226-4.038.226-4.038",fill:"#192064"}),E("path",{d:"M106.322 151.165l.003-4.911a.81.81 0 0 0-.778-.815c-2.44-.091-5.066-.108-7.836-.014a.818.818 0 0 0-.789.815l-.003 4.906a.81.81 0 0 0 .831.813c2.385-.06 4.973-.064 7.73.017a.815.815 0 0 0 .842-.81",fill:"#FFF"}),E("path",{d:"M105.207 150.233l.002-3.076a.642.642 0 0 0-.619-.646 94.321 94.321 0 0 0-5.866-.01.65.65 0 0 0-.63.647v3.072a.64.64 0 0 0 .654.644 121.12 121.12 0 0 1 5.794.011c.362.01.665-.28.665-.642",fill:"#192064"}),E("path",{d:"M100.263 275.415h12.338M101.436 270.53c.006 3.387.042 5.79.111 6.506M101.451 264.548a915.75 915.75 0 0 0-.015 4.337M100.986 174.965l.898 44.642s.673 1.57-.225 2.692c-.897 1.122 2.468.673.898 2.243-1.57 1.57.897 1.122 0 3.365-.596 1.489-.994 21.1-1.096 35.146",stroke:"#648BD8",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M46.876 83.427s-.516 6.045 7.223 5.552c11.2-.712 9.218-9.345 31.54-21.655-.786-2.708-2.447-4.744-2.447-4.744s-11.068 3.11-22.584 8.046c-6.766 2.9-13.395 6.352-13.732 12.801M104.46 91.057l.941-5.372-8.884-11.43-5.037 5.372-1.74 7.834a.321.321 0 0 0 .108.32c.965.8 6.5 5.013 14.347 3.544a.332.332 0 0 0 .264-.268",fill:"#FFC6A0"}),E("path",{d:"M93.942 79.387s-4.533-2.853-2.432-6.855c1.623-3.09 4.513 1.133 4.513 1.133s.52-3.642 3.121-3.642c.52-1.04 1.561-4.162 1.561-4.162s11.445 2.601 13.526 3.121c0 5.203-2.304 19.424-7.84 19.861-8.892.703-12.449-9.456-12.449-9.456",fill:"#FFC6A0"}),E("path",{d:"M113.874 73.446c2.601-2.081 3.47-9.722 3.47-9.722s-2.479-.49-6.64-2.05c-4.683-2.081-12.798-4.747-17.48.976-9.668 3.223-2.05 19.823-2.05 19.823l2.713-3.021s-3.935-3.287-2.08-6.243c2.17-3.462 3.92 1.073 3.92 1.073s.637-2.387 3.581-3.342c.355-.71 1.036-2.674 1.432-3.85a1.073 1.073 0 0 1 1.263-.704c2.4.558 8.677 2.019 11.356 2.662.522.125.871.615.82 1.15l-.305 3.248z",fill:"#520038"}),E("path",{d:"M104.977 76.064c-.103.61-.582 1.038-1.07.956-.489-.083-.801-.644-.698-1.254.103-.61.582-1.038 1.07-.956.488.082.8.644.698 1.254M112.132 77.694c-.103.61-.582 1.038-1.07.956-.488-.083-.8-.644-.698-1.254.103-.61.582-1.038 1.07-.956.488.082.8.643.698 1.254",fill:"#552950"}),E("path",{stroke:"#DB836E",strokeWidth:"1.118",strokeLinecap:"round",strokeLinejoin:"round",d:"M110.13 74.84l-.896 1.61-.298 4.357h-2.228"}),E("path",{d:"M110.846 74.481s1.79-.716 2.506.537",stroke:"#5C2552",strokeWidth:"1.118",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M92.386 74.282s.477-1.114 1.113-.716c.637.398 1.274 1.433.558 1.99-.717.556.159 1.67.159 1.67",stroke:"#DB836E",strokeWidth:"1.118",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M103.287 72.93s1.83 1.113 4.137.954",stroke:"#5C2552",strokeWidth:"1.118",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M103.685 81.762s2.227 1.193 4.376 1.193M104.64 84.308s.954.398 1.511.318M94.693 81.205s2.308 7.4 10.424 7.639",stroke:"#DB836E",strokeWidth:"1.118",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M81.45 89.384s.45 5.647-4.935 12.787M69 82.654s-.726 9.282-8.204 14.206",stroke:"#E4EBF7",strokeWidth:"1.101",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M129.405 122.865s-5.272 7.403-9.422 10.768",stroke:"#E4EBF7",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M119.306 107.329s.452 4.366-2.127 32.062",stroke:"#E4EBF7",strokeWidth:"1.101",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M150.028 151.232h-49.837a1.01 1.01 0 0 1-1.01-1.01v-31.688c0-.557.452-1.01 1.01-1.01h49.837c.558 0 1.01.453 1.01 1.01v31.688a1.01 1.01 0 0 1-1.01 1.01",fill:"#F2D7AD"}),E("path",{d:"M150.29 151.232h-19.863v-33.707h20.784v32.786a.92.92 0 0 1-.92.92",fill:"#F4D19D"}),E("path",{d:"M123.554 127.896H92.917a.518.518 0 0 1-.425-.816l6.38-9.113c.193-.277.51-.442.85-.442h31.092l-7.26 10.371z",fill:"#F2D7AD"}),E("path",{fill:"#CC9B6E",d:"M123.689 128.447H99.25v-.519h24.169l7.183-10.26.424.298z"}),E("path",{d:"M158.298 127.896h-18.669a2.073 2.073 0 0 1-1.659-.83l-7.156-9.541h19.965c.49 0 .95.23 1.244.622l6.69 8.92a.519.519 0 0 1-.415.83",fill:"#F4D19D"}),E("path",{fill:"#CC9B6E",d:"M157.847 128.479h-19.384l-7.857-10.475.415-.31 7.7 10.266h19.126zM130.554 150.685l-.032-8.177.519-.002.032 8.177z"}),E("path",{fill:"#CC9B6E",d:"M130.511 139.783l-.08-21.414.519-.002.08 21.414zM111.876 140.932l-.498-.143 1.479-5.167.498.143zM108.437 141.06l-2.679-2.935 2.665-3.434.41.318-2.397 3.089 2.384 2.612zM116.607 141.06l-.383-.35 2.383-2.612-2.397-3.089.41-.318 2.665 3.434z"}),E("path",{d:"M154.316 131.892l-3.114-1.96.038 3.514-1.043.092c-1.682.115-3.634.23-4.789.23-1.902 0-2.693 2.258 2.23 2.648l-2.645-.596s-2.168 1.317.504 2.3c0 0-1.58 1.217.561 2.58-.584 3.504 5.247 4.058 7.122 3.59 1.876-.47 4.233-2.359 4.487-5.16.28-3.085-.89-5.432-3.35-7.238",fill:"#FFC6A0"}),E("path",{d:"M153.686 133.577s-6.522.47-8.36.372c-1.836-.098-1.904 2.19 2.359 2.264 3.739.15 5.451-.044 5.451-.044",stroke:"#DB836E",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M145.16 135.877c-1.85 1.346.561 2.355.561 2.355s3.478.898 6.73.617",stroke:"#DB836E",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M151.89 141.71s-6.28.111-6.73-2.132c-.223-1.346.45-1.402.45-1.402M146.114 140.868s-1.103 3.16 5.44 3.533M151.202 129.932v3.477M52.838 89.286c3.533-.337 8.423-1.248 13.582-7.754",stroke:"#DB836E",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M168.567 248.318a6.647 6.647 0 0 1-6.647-6.647v-66.466a6.647 6.647 0 1 1 13.294 0v66.466a6.647 6.647 0 0 1-6.647 6.647",fill:"#5BA02E"}),E("path",{d:"M176.543 247.653a6.647 6.647 0 0 1-6.646-6.647v-33.232a6.647 6.647 0 1 1 13.293 0v33.232a6.647 6.647 0 0 1-6.647 6.647",fill:"#92C110"}),E("path",{d:"M186.443 293.613H158.92a3.187 3.187 0 0 1-3.187-3.187v-46.134a3.187 3.187 0 0 1 3.187-3.187h27.524a3.187 3.187 0 0 1 3.187 3.187v46.134a3.187 3.187 0 0 1-3.187 3.187",fill:"#F2D7AD"}),E("path",{d:"M88.979 89.48s7.776 5.384 16.6 2.842",stroke:"#E4EBF7",strokeWidth:"1.101",strokeLinecap:"round",strokeLinejoin:"round"})]})]})};const eQ=JY;var tQ=function(){return Qe("svg",{width:"254",height:"294",children:[Qe("defs",{children:[E("path",{d:"M0 .335h253.49v253.49H0z"}),E("path",{d:"M0 293.665h253.49V.401H0z"})]}),Qe("g",{fill:"none",fillRule:"evenodd",children:[Qe("g",{transform:"translate(0 .067)",children:[E("mask",{fill:"#fff"}),E("path",{d:"M0 128.134v-2.11C0 56.608 56.273.334 125.69.334h2.11c69.416 0 125.69 56.274 125.69 125.69v2.11c0 69.417-56.274 125.69-125.69 125.69h-2.11C56.273 253.824 0 197.551 0 128.134",fill:"#E4EBF7",mask:"url(#b)"})]}),E("path",{d:"M39.989 132.108a8.332 8.332 0 1 1-16.581-1.671 8.332 8.332 0 0 1 16.58 1.671",fill:"#FFF"}),E("path",{d:"M37.19 135.59l10.553 5.983M48.665 147.884l-12.734 10.861",stroke:"#FFF",strokeWidth:"2"}),E("path",{d:"M40.11 160.816a5.706 5.706 0 1 1-11.354-1.145 5.706 5.706 0 0 1 11.354 1.145M57.943 144.6a5.747 5.747 0 1 1-11.436-1.152 5.747 5.747 0 0 1 11.436 1.153M99.656 27.434l30.024-.013a4.619 4.619 0 1 0-.004-9.238l-30.024.013a4.62 4.62 0 0 0 .004 9.238M111.14 45.896l30.023-.013a4.62 4.62 0 1 0-.004-9.238l-30.024.013a4.619 4.619 0 1 0 .004 9.238",fill:"#FFF"}),E("path",{d:"M113.53 27.421v-.002l15.89-.007a4.619 4.619 0 1 0 .005 9.238l-15.892.007v-.002a4.618 4.618 0 0 0-.004-9.234M150.167 70.091h-3.979a4.789 4.789 0 0 1-4.774-4.775 4.788 4.788 0 0 1 4.774-4.774h3.979a4.789 4.789 0 0 1 4.775 4.774 4.789 4.789 0 0 1-4.775 4.775",fill:"#FFF"}),E("path",{d:"M171.687 30.234c0-16.392 13.289-29.68 29.681-29.68 16.392 0 29.68 13.288 29.68 29.68 0 16.393-13.288 29.681-29.68 29.681s-29.68-13.288-29.68-29.68",fill:"#FF603B"}),E("path",{d:"M203.557 19.435l-.676 15.035a1.514 1.514 0 0 1-3.026 0l-.675-15.035a2.19 2.19 0 1 1 4.377 0m-.264 19.378c.513.477.77 1.1.77 1.87s-.257 1.393-.77 1.907c-.55.476-1.21.733-1.943.733a2.545 2.545 0 0 1-1.87-.77c-.55-.514-.806-1.136-.806-1.87 0-.77.256-1.393.806-1.87.513-.513 1.137-.733 1.87-.733.77 0 1.43.22 1.943.733",fill:"#FFF"}),E("path",{d:"M119.3 133.275c4.426-.598 3.612-1.204 4.079-4.778.675-5.18-3.108-16.935-8.262-25.118-1.088-10.72-12.598-11.24-12.598-11.24s4.312 4.895 4.196 16.199c1.398 5.243.804 14.45.804 14.45s5.255 11.369 11.78 10.487",fill:"#FFB594"}),E("path",{d:"M100.944 91.61s1.463-.583 3.211.582c8.08 1.398 10.368 6.706 11.3 11.368 1.864 1.282 1.864 2.33 1.864 3.496.365.777 1.515 3.03 1.515 3.03s-7.225 1.748-10.954 6.758c-1.399-6.41-6.936-25.235-6.936-25.235",fill:"#FFF"}),E("path",{d:"M94.008 90.5l1.019-5.815-9.23-11.874-5.233 5.581-2.593 9.863s8.39 5.128 16.037 2.246",fill:"#FFB594"}),E("path",{d:"M82.931 78.216s-4.557-2.868-2.445-6.892c1.632-3.107 4.537 1.139 4.537 1.139s.524-3.662 3.139-3.662c.523-1.046 1.569-4.184 1.569-4.184s11.507 2.615 13.6 3.138c-.001 5.23-2.317 19.529-7.884 19.969-8.94.706-12.516-9.508-12.516-9.508",fill:"#FFC6A0"}),E("path",{d:"M102.971 72.243c2.616-2.093 3.489-9.775 3.489-9.775s-2.492-.492-6.676-2.062c-4.708-2.092-12.867-4.771-17.575.982-9.54 4.41-2.062 19.93-2.062 19.93l2.729-3.037s-3.956-3.304-2.092-6.277c2.183-3.48 3.943 1.08 3.943 1.08s.64-2.4 3.6-3.36c.356-.714 1.04-2.69 1.44-3.872a1.08 1.08 0 0 1 1.27-.707c2.41.56 8.723 2.03 11.417 2.676.524.126.876.619.825 1.156l-.308 3.266z",fill:"#520038"}),E("path",{d:"M101.22 76.514c-.104.613-.585 1.044-1.076.96-.49-.082-.805-.646-.702-1.26.104-.613.585-1.044 1.076-.961.491.083.805.647.702 1.26M94.26 75.074c-.104.613-.585 1.044-1.076.96-.49-.082-.805-.646-.702-1.26.104-.613.585-1.044 1.076-.96.491.082.805.646.702 1.26",fill:"#552950"}),E("path",{stroke:"#DB836E",strokeWidth:"1.063",strokeLinecap:"round",strokeLinejoin:"round",d:"M99.206 73.644l-.9 1.62-.3 4.38h-2.24"}),E("path",{d:"M99.926 73.284s1.8-.72 2.52.54",stroke:"#5C2552",strokeWidth:"1.117",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M81.367 73.084s.48-1.12 1.12-.72c.64.4 1.28 1.44.56 2s.16 1.68.16 1.68",stroke:"#DB836E",strokeWidth:"1.117",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M92.326 71.724s1.84 1.12 4.16.96",stroke:"#5C2552",strokeWidth:"1.117",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M92.726 80.604s2.24 1.2 4.4 1.2M93.686 83.164s.96.4 1.52.32M83.687 80.044s1.786 6.547 9.262 7.954",stroke:"#DB836E",strokeWidth:"1.063",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M95.548 91.663s-1.068 2.821-8.298 2.105c-7.23-.717-10.29-5.044-10.29-5.044",stroke:"#E4EBF7",strokeWidth:"1.136",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M78.126 87.478s6.526 4.972 16.47 2.486c0 0 9.577 1.02 11.536 5.322 5.36 11.77.543 36.835 0 39.962 3.496 4.055-.466 8.483-.466 8.483-15.624-3.548-35.81-.6-35.81-.6-4.849-3.546-1.223-9.044-1.223-9.044L62.38 110.32c-2.485-15.227.833-19.803 3.549-20.743 3.03-1.049 8.04-1.282 8.04-1.282.496-.058 1.08-.076 1.37-.233 2.36-1.282 2.787-.583 2.787-.583",fill:"#FFF"}),E("path",{d:"M65.828 89.81s-6.875.465-7.59 8.156c-.466 8.857 3.03 10.954 3.03 10.954s6.075 22.102 16.796 22.957c8.39-2.176 4.758-6.702 4.661-11.42-.233-11.304-7.108-16.897-7.108-16.897s-4.212-13.75-9.789-13.75",fill:"#FFC6A0"}),E("path",{d:"M71.716 124.225s.855 11.264 9.828 6.486c4.765-2.536 7.581-13.828 9.789-22.568 1.456-5.768 2.58-12.197 2.58-12.197l-4.973-1.709s-2.408 5.516-7.769 12.275c-4.335 5.467-9.144 11.11-9.455 17.713",fill:"#FFC6A0"}),E("path",{d:"M108.463 105.191s1.747 2.724-2.331 30.535c2.376 2.216 1.053 6.012-.233 7.51",stroke:"#E4EBF7",strokeWidth:"1.085",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M123.262 131.527s-.427 2.732-11.77 1.981c-15.187-1.006-25.326-3.25-25.326-3.25l.933-5.8s.723.215 9.71-.068c11.887-.373 18.714-6.07 24.964-1.022 4.039 3.263 1.489 8.16 1.489 8.16",fill:"#FFC6A0"}),E("path",{d:"M70.24 90.974s-5.593-4.739-11.054 2.68c-3.318 7.223.517 15.284 2.664 19.578-.31 3.729 2.33 4.311 2.33 4.311s.108.895 1.516 2.68c4.078-7.03 6.72-9.166 13.711-12.546-.328-.656-1.877-3.265-1.825-3.767.175-1.69-1.282-2.623-1.282-2.623s-.286-.156-1.165-2.738c-.788-2.313-2.036-5.177-4.895-7.575",fill:"#FFF"}),E("path",{d:"M90.232 288.027s4.855 2.308 8.313 1.155c3.188-1.063 5.12.755 8.002 1.331 2.881.577 7.769 1.243 13.207-1.424-.117-6.228-7.786-4.499-13.518-7.588-2.895-1.56-4.276-5.336-4.066-9.944H91.544s-1.573 11.89-1.312 16.47",fill:"#CBD1D1"}),E("path",{d:"M90.207 287.833s2.745 1.437 7.639.738c3.456-.494 3.223.66 7.418 1.282 4.195.621 13.092-.194 14.334-1.126.466 1.242-.388 2.33-.388 2.33s-1.709.682-5.438.932c-2.295.154-8.098.276-10.14-.621-2.02-1.554-4.894-1.515-6.06-.234-4.427 1.075-7.184-.31-7.184-.31l-.181-2.991z",fill:"#2B0849"}),E("path",{d:"M98.429 272.257h3.496s-.117 7.574 5.127 9.671c-5.244.7-9.672-2.602-8.623-9.671",fill:"#A4AABA"}),E("path",{d:"M44.425 272.046s-2.208 7.774-4.702 12.899c-1.884 3.874-4.428 7.854 5.729 7.854 6.97 0 9.385-.503 7.782-6.917-1.604-6.415.279-13.836.279-13.836h-9.088z",fill:"#CBD1D1"}),E("path",{d:"M38.066 290.277s2.198 1.225 6.954 1.225c6.376 0 8.646-1.73 8.646-1.73s.63 1.168-.649 2.27c-1.04.897-3.77 1.668-7.745 1.621-4.347-.05-6.115-.593-7.062-1.224-.864-.577-.72-1.657-.144-2.162",fill:"#2B0849"}),E("path",{d:"M45.344 274.041s.035 1.592-.329 3.07c-.365 1.49-1.13 3.255-1.184 4.34-.061 1.206 4.755 1.657 5.403.036.65-1.622 1.357-6.737 2.006-7.602.648-.865-5.14-2.222-5.896.156",fill:"#A4AABA"}),E("path",{d:"M89.476 277.57l13.899.095s1.349-56.643 1.925-66.909c.576-10.267 3.923-45.052 1.042-65.585l-13.037-.669-23.737.81s-.452 4.12-1.243 10.365c-.065.515-.708.874-.777 1.417-.078.608.439 1.407.332 2.044-2.455 14.627-5.797 32.736-8.256 46.837-.121.693-1.282 1.048-1.515 2.796-.042.314.22 1.584.116 1.865-7.14 19.473-12.202 52.601-15.66 67.19l15.176-.015s2.282-10.145 4.185-18.871c2.922-13.389 24.012-88.32 24.012-88.32l3.133-.954-.158 48.568s-.233 1.282.35 2.098c.583.815-.581 1.167-.408 2.331l.408 1.864s-.466 7.458-.932 12.352c-.467 4.895 1.145 40.69 1.145 40.69",fill:"#7BB2F9"}),E("path",{d:"M64.57 218.881c1.197.099 4.195-2.097 7.225-5.127M96.024 222.534s2.881-1.152 6.34-4.034",stroke:"#648BD8",strokeWidth:"1.085",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M96.973 219.373s2.882-1.153 6.34-4.034",stroke:"#648BD8",strokeWidth:"1.032",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M63.172 222.144s2.724-.614 6.759-3.496M74.903 146.166c-.281 3.226.31 8.856-4.506 9.478M93.182 144.344s.115 14.557-1.344 15.65c-2.305 1.73-3.107 2.02-3.107 2.02M89.197 144.923s.269 13.144-1.01 25.088M83.525 170.71s6.81-1.051 9.116-1.051M46.026 270.045l-.892 4.538M46.937 263.289l-.815 4.157M62.725 202.503c-.33 1.618-.102 1.904-.449 3.438 0 0-2.756 1.903-2.29 3.923.466 2.02-.31 3.424-4.505 17.252-1.762 5.807-4.233 18.922-6.165 28.278-.03.144-.521 2.646-1.14 5.8M64.158 194.136c-.295 1.658-.6 3.31-.917 4.938M71.33 146.787l-1.244 10.877s-1.14.155-.519 2.33c.117 1.399-2.778 16.39-5.382 31.615M44.242 273.727H58.07",stroke:"#648BD8",strokeWidth:"1.085",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M106.18 142.117c-3.028-.489-18.825-2.744-36.219.2a.625.625 0 0 0-.518.644c.063 1.307.044 2.343.015 2.995a.617.617 0 0 0 .716.636c3.303-.534 17.037-2.412 35.664-.266.347.04.66-.214.692-.56.124-1.347.16-2.425.17-3.029a.616.616 0 0 0-.52-.62",fill:"#192064"}),E("path",{d:"M96.398 145.264l.003-5.102a.843.843 0 0 0-.809-.847 114.104 114.104 0 0 0-8.141-.014.85.85 0 0 0-.82.847l-.003 5.097c0 .476.388.857.864.845 2.478-.064 5.166-.067 8.03.017a.848.848 0 0 0 .876-.843",fill:"#FFF"}),E("path",{d:"M95.239 144.296l.002-3.195a.667.667 0 0 0-.643-.672c-1.9-.061-3.941-.073-6.094-.01a.675.675 0 0 0-.654.672l-.002 3.192c0 .376.305.677.68.669 1.859-.042 3.874-.043 6.02.012.376.01.69-.291.691-.668",fill:"#192064"}),E("path",{d:"M90.102 273.522h12.819M91.216 269.761c.006 3.519-.072 5.55 0 6.292M90.923 263.474c-.009 1.599-.016 2.558-.016 4.505M90.44 170.404l.932 46.38s.7 1.631-.233 2.796c-.932 1.166 2.564.7.932 2.33-1.63 1.633.933 1.166 0 3.497-.618 1.546-1.031 21.921-1.138 36.513",stroke:"#648BD8",strokeWidth:"1.085",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M73.736 98.665l2.214 4.312s2.098.816 1.865 2.68l.816 2.214M64.297 116.611c.233-.932 2.176-7.147 12.585-10.488M77.598 90.042s7.691 6.137 16.547 2.72",stroke:"#E4EBF7",strokeWidth:"1.085",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M91.974 86.954s5.476-.816 7.574-4.545c1.297-.345.72 2.212-.33 3.671-.7.971-1.01 1.554-1.01 1.554s.194.31.155.816c-.053.697-.175.653-.272 1.048-.081.335.108.657 0 1.049-.046.17-.198.5-.382.878-.12.249-.072.687-.2.948-.231.469-1.562 1.87-2.622 2.855-3.826 3.554-5.018 1.644-6.001-.408-.894-1.865-.661-5.127-.874-6.875-.35-2.914-2.622-3.03-1.923-4.429.343-.685 2.87.69 3.263 1.748.757 2.04 2.952 1.807 2.622 1.69",fill:"#FFC6A0"}),E("path",{d:"M99.8 82.429c-.465.077-.35.272-.97 1.243-.622.971-4.817 2.932-6.39 3.224-2.589.48-2.278-1.56-4.254-2.855-1.69-1.107-3.562-.638-1.398 1.398.99.932.932 1.107 1.398 3.205.335 1.506-.64 3.67.7 5.593",stroke:"#DB836E",strokeWidth:".774",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M79.543 108.673c-2.1 2.926-4.266 6.175-5.557 8.762",stroke:"#E59788",strokeWidth:".774",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M87.72 124.768s-2.098-1.942-5.127-2.719c-3.03-.777-3.574-.155-5.516.078-1.942.233-3.885-.932-3.652.7.233 1.63 5.05 1.01 5.206 2.097.155 1.087-6.37 2.796-8.313 2.175-.777.777.466 1.864 2.02 2.175.233 1.554 2.253 1.554 2.253 1.554s.699 1.01 2.641 1.088c2.486 1.32 8.934-.7 10.954-1.554 2.02-.855-.466-5.594-.466-5.594",fill:"#FFC6A0"}),E("path",{d:"M73.425 122.826s.66 1.127 3.167 1.418c2.315.27 2.563.583 2.563.583s-2.545 2.894-9.07 2.272M72.416 129.274s3.826.097 4.933-.718M74.98 130.75s1.961.136 3.36-.505M77.232 131.916s1.748.019 2.914-.505M73.328 122.321s-.595-1.032 1.262-.427c1.671.544 2.833.055 5.128.155 1.389.061 3.067-.297 3.982.15 1.606.784 3.632 2.181 3.632 2.181s10.526 1.204 19.033-1.127M78.864 108.104s-8.39 2.758-13.168 12.12",stroke:"#E59788",strokeWidth:".774",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M109.278 112.533s3.38-3.613 7.575-4.662",stroke:"#E4EBF7",strokeWidth:"1.085",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M107.375 123.006s9.697-2.745 11.445-.88",stroke:"#E59788",strokeWidth:".774",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M194.605 83.656l3.971-3.886M187.166 90.933l3.736-3.655M191.752 84.207l-4.462-4.56M198.453 91.057l-4.133-4.225M129.256 163.074l3.718-3.718M122.291 170.039l3.498-3.498M126.561 163.626l-4.27-4.27M132.975 170.039l-3.955-3.955",stroke:"#BFCDDD",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M190.156 211.779h-1.604a4.023 4.023 0 0 1-4.011-4.011V175.68a4.023 4.023 0 0 1 4.01-4.01h1.605a4.023 4.023 0 0 1 4.011 4.01v32.088a4.023 4.023 0 0 1-4.01 4.01",fill:"#A3B4C6"}),E("path",{d:"M237.824 212.977a4.813 4.813 0 0 1-4.813 4.813h-86.636a4.813 4.813 0 0 1 0-9.626h86.636a4.813 4.813 0 0 1 4.813 4.813",fill:"#A3B4C6"}),E("mask",{fill:"#fff"}),E("path",{fill:"#A3B4C6",mask:"url(#d)",d:"M154.098 190.096h70.513v-84.617h-70.513z"}),E("path",{d:"M224.928 190.096H153.78a3.219 3.219 0 0 1-3.208-3.209V167.92a3.219 3.219 0 0 1 3.208-3.21h71.148a3.219 3.219 0 0 1 3.209 3.21v18.967a3.219 3.219 0 0 1-3.21 3.209M224.928 130.832H153.78a3.218 3.218 0 0 1-3.208-3.208v-18.968a3.219 3.219 0 0 1 3.208-3.209h71.148a3.219 3.219 0 0 1 3.209 3.21v18.967a3.218 3.218 0 0 1-3.21 3.208",fill:"#BFCDDD",mask:"url(#d)"}),E("path",{d:"M159.563 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M166.98 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M174.397 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M222.539 120.546h-22.461a.802.802 0 0 1-.802-.802v-3.208c0-.443.359-.803.802-.803h22.46c.444 0 .803.36.803.803v3.208c0 .443-.36.802-.802.802",fill:"#FFF",mask:"url(#d)"}),E("path",{d:"M224.928 160.464H153.78a3.218 3.218 0 0 1-3.208-3.209v-18.967a3.219 3.219 0 0 1 3.208-3.209h71.148a3.219 3.219 0 0 1 3.209 3.209v18.967a3.218 3.218 0 0 1-3.21 3.209",fill:"#BFCDDD",mask:"url(#d)"}),E("path",{d:"M173.455 130.832h49.301M164.984 130.832h6.089M155.952 130.832h6.75M173.837 160.613h49.3M165.365 160.613h6.089M155.57 160.613h6.751",stroke:"#7C90A5",strokeWidth:"1.124",strokeLinecap:"round",strokeLinejoin:"round",mask:"url(#d)"}),E("path",{d:"M159.563 151.038a2.407 2.407 0 1 1 0-4.814 2.407 2.407 0 0 1 0 4.814M166.98 151.038a2.407 2.407 0 1 1 0-4.814 2.407 2.407 0 0 1 0 4.814M174.397 151.038a2.407 2.407 0 1 1 .001-4.814 2.407 2.407 0 0 1 0 4.814M222.539 151.038h-22.461a.802.802 0 0 1-.802-.802v-3.209c0-.443.359-.802.802-.802h22.46c.444 0 .803.36.803.802v3.209c0 .443-.36.802-.802.802M159.563 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M166.98 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M174.397 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M222.539 179.987h-22.461a.802.802 0 0 1-.802-.802v-3.209c0-.443.359-.802.802-.802h22.46c.444 0 .803.36.803.802v3.209c0 .443-.36.802-.802.802",fill:"#FFF",mask:"url(#d)"}),E("path",{d:"M203.04 221.108h-27.372a2.413 2.413 0 0 1-2.406-2.407v-11.448a2.414 2.414 0 0 1 2.406-2.407h27.372a2.414 2.414 0 0 1 2.407 2.407V218.7a2.413 2.413 0 0 1-2.407 2.407",fill:"#BFCDDD",mask:"url(#d)"}),E("path",{d:"M177.259 207.217v11.52M201.05 207.217v11.52",stroke:"#A3B4C6",strokeWidth:"1.124",strokeLinecap:"round",strokeLinejoin:"round",mask:"url(#d)"}),E("path",{d:"M162.873 267.894a9.422 9.422 0 0 1-9.422-9.422v-14.82a9.423 9.423 0 0 1 18.845 0v14.82a9.423 9.423 0 0 1-9.423 9.422",fill:"#5BA02E",mask:"url(#d)"}),E("path",{d:"M171.22 267.83a9.422 9.422 0 0 1-9.422-9.423v-3.438a9.423 9.423 0 0 1 18.845 0v3.438a9.423 9.423 0 0 1-9.422 9.423",fill:"#92C110",mask:"url(#d)"}),E("path",{d:"M181.31 293.666h-27.712a3.209 3.209 0 0 1-3.209-3.21V269.79a3.209 3.209 0 0 1 3.209-3.21h27.711a3.209 3.209 0 0 1 3.209 3.21v20.668a3.209 3.209 0 0 1-3.209 3.209",fill:"#F2D7AD",mask:"url(#d)"})]})]})};const nQ=tQ;var rQ=function(){return E("svg",{width:"251",height:"294",children:Qe("g",{fill:"none",fillRule:"evenodd",children:[E("path",{d:"M0 129.023v-2.084C0 58.364 55.591 2.774 124.165 2.774h2.085c68.574 0 124.165 55.59 124.165 124.165v2.084c0 68.575-55.59 124.166-124.165 124.166h-2.085C55.591 253.189 0 197.598 0 129.023",fill:"#E4EBF7"}),E("path",{d:"M41.417 132.92a8.231 8.231 0 1 1-16.38-1.65 8.231 8.231 0 0 1 16.38 1.65",fill:"#FFF"}),E("path",{d:"M38.652 136.36l10.425 5.91M49.989 148.505l-12.58 10.73",stroke:"#FFF",strokeWidth:"2"}),E("path",{d:"M41.536 161.28a5.636 5.636 0 1 1-11.216-1.13 5.636 5.636 0 0 1 11.216 1.13M59.154 145.261a5.677 5.677 0 1 1-11.297-1.138 5.677 5.677 0 0 1 11.297 1.138M100.36 29.516l29.66-.013a4.562 4.562 0 1 0-.004-9.126l-29.66.013a4.563 4.563 0 0 0 .005 9.126M111.705 47.754l29.659-.013a4.563 4.563 0 1 0-.004-9.126l-29.66.013a4.563 4.563 0 1 0 .005 9.126",fill:"#FFF"}),E("path",{d:"M114.066 29.503V29.5l15.698-.007a4.563 4.563 0 1 0 .004 9.126l-15.698.007v-.002a4.562 4.562 0 0 0-.004-9.122M185.405 137.723c-.55 5.455-5.418 9.432-10.873 8.882-5.456-.55-9.432-5.418-8.882-10.873.55-5.455 5.418-9.432 10.873-8.882 5.455.55 9.432 5.418 8.882 10.873",fill:"#FFF"}),E("path",{d:"M180.17 143.772l12.572 7.129M193.841 158.42L178.67 171.36",stroke:"#FFF",strokeWidth:"2"}),E("path",{d:"M185.55 171.926a6.798 6.798 0 1 1-13.528-1.363 6.798 6.798 0 0 1 13.527 1.363M204.12 155.285a6.848 6.848 0 1 1-13.627-1.375 6.848 6.848 0 0 1 13.626 1.375",fill:"#FFF"}),E("path",{d:"M152.988 194.074a2.21 2.21 0 1 1-4.42 0 2.21 2.21 0 0 1 4.42 0zM225.931 118.217a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.421 0zM217.09 153.051a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.42 0zM177.84 109.842a2.21 2.21 0 1 1-4.422 0 2.21 2.21 0 0 1 4.421 0zM196.114 94.454a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.421 0zM202.844 182.523a2.21 2.21 0 1 1-4.42 0 2.21 2.21 0 0 1 4.42 0z",stroke:"#FFF",strokeWidth:"2"}),E("path",{stroke:"#FFF",strokeWidth:"2",d:"M215.125 155.262l-1.902 20.075-10.87 5.958M174.601 176.636l-6.322 9.761H156.98l-4.484 6.449M175.874 127.28V111.56M221.51 119.404l-12.77 7.859-15.228-7.86V96.668"}),E("path",{d:"M180.68 29.32C180.68 13.128 193.806 0 210 0c16.193 0 29.32 13.127 29.32 29.32 0 16.194-13.127 29.322-29.32 29.322-16.193 0-29.32-13.128-29.32-29.321",fill:"#A26EF4"}),E("path",{d:"M221.45 41.706l-21.563-.125a1.744 1.744 0 0 1-1.734-1.754l.071-12.23a1.744 1.744 0 0 1 1.754-1.734l21.562.125c.964.006 1.74.791 1.735 1.755l-.071 12.229a1.744 1.744 0 0 1-1.754 1.734",fill:"#FFF"}),E("path",{d:"M215.106 29.192c-.015 2.577-2.049 4.654-4.543 4.64-2.494-.014-4.504-2.115-4.489-4.693l.04-6.925c.016-2.577 2.05-4.654 4.543-4.64 2.494.015 4.504 2.116 4.49 4.693l-.04 6.925zm-4.53-14.074a6.877 6.877 0 0 0-6.916 6.837l-.043 7.368a6.877 6.877 0 0 0 13.754.08l.042-7.368a6.878 6.878 0 0 0-6.837-6.917zM167.566 68.367h-3.93a4.73 4.73 0 0 1-4.717-4.717 4.73 4.73 0 0 1 4.717-4.717h3.93a4.73 4.73 0 0 1 4.717 4.717 4.73 4.73 0 0 1-4.717 4.717",fill:"#FFF"}),E("path",{d:"M168.214 248.838a6.611 6.611 0 0 1-6.61-6.611v-66.108a6.611 6.611 0 0 1 13.221 0v66.108a6.611 6.611 0 0 1-6.61 6.61",fill:"#5BA02E"}),E("path",{d:"M176.147 248.176a6.611 6.611 0 0 1-6.61-6.61v-33.054a6.611 6.611 0 1 1 13.221 0v33.053a6.611 6.611 0 0 1-6.61 6.611",fill:"#92C110"}),E("path",{d:"M185.994 293.89h-27.376a3.17 3.17 0 0 1-3.17-3.17v-45.887a3.17 3.17 0 0 1 3.17-3.17h27.376a3.17 3.17 0 0 1 3.17 3.17v45.886a3.17 3.17 0 0 1-3.17 3.17",fill:"#F2D7AD"}),E("path",{d:"M81.972 147.673s6.377-.927 17.566-1.28c11.729-.371 17.57 1.086 17.57 1.086s3.697-3.855.968-8.424c1.278-12.077 5.982-32.827.335-48.273-1.116-1.339-3.743-1.512-7.536-.62-1.337.315-7.147-.149-7.983-.1l-15.311-.347s-3.487-.17-8.035-.508c-1.512-.113-4.227-1.683-5.458-.338-.406.443-2.425 5.669-1.97 16.077l8.635 35.642s-3.141 3.61 1.219 7.085",fill:"#FFF"}),E("path",{d:"M75.768 73.325l-.9-6.397 11.982-6.52s7.302-.118 8.038 1.205c.737 1.324-5.616.993-5.616.993s-1.836 1.388-2.615 2.5c-1.654 2.363-.986 6.471-8.318 5.986-1.708.284-2.57 2.233-2.57 2.233",fill:"#FFC6A0"}),E("path",{d:"M52.44 77.672s14.217 9.406 24.973 14.444c1.061.497-2.094 16.183-11.892 11.811-7.436-3.318-20.162-8.44-21.482-14.496-.71-3.258 2.543-7.643 8.401-11.76M141.862 80.113s-6.693 2.999-13.844 6.876c-3.894 2.11-10.137 4.704-12.33 7.988-6.224 9.314 3.536 11.22 12.947 7.503 6.71-2.651 28.999-12.127 13.227-22.367",fill:"#FFB594"}),E("path",{d:"M76.166 66.36l3.06 3.881s-2.783 2.67-6.31 5.747c-7.103 6.195-12.803 14.296-15.995 16.44-3.966 2.662-9.754 3.314-12.177-.118-3.553-5.032.464-14.628 31.422-25.95",fill:"#FFC6A0"}),E("path",{d:"M64.674 85.116s-2.34 8.413-8.912 14.447c.652.548 18.586 10.51 22.144 10.056 5.238-.669 6.417-18.968 1.145-20.531-.702-.208-5.901-1.286-8.853-2.167-.87-.26-1.611-1.71-3.545-.936l-1.98-.869zM128.362 85.826s5.318 1.956 7.325 13.734c-.546.274-17.55 12.35-21.829 7.805-6.534-6.94-.766-17.393 4.275-18.61 4.646-1.121 5.03-1.37 10.23-2.929",fill:"#FFF"}),E("path",{d:"M78.18 94.656s.911 7.41-4.914 13.078",stroke:"#E4EBF7",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M87.397 94.68s3.124 2.572 10.263 2.572c7.14 0 9.074-3.437 9.074-3.437",stroke:"#E4EBF7",strokeWidth:".932",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M117.184 68.639l-6.781-6.177s-5.355-4.314-9.223-.893c-3.867 3.422 4.463 2.083 5.653 4.165 1.19 2.082.848 1.143-2.083.446-5.603-1.331-2.082.893 2.975 5.355 2.091 1.845 6.992.955 6.992.955l2.467-3.851z",fill:"#FFC6A0"}),E("path",{d:"M105.282 91.315l-.297-10.937-15.918-.027-.53 10.45c-.026.403.17.788.515.999 2.049 1.251 9.387 5.093 15.799.424.287-.21.443-.554.431-.91",fill:"#FFB594"}),E("path",{d:"M107.573 74.24c.817-1.147.982-9.118 1.015-11.928a1.046 1.046 0 0 0-.965-1.055l-4.62-.365c-7.71-1.044-17.071.624-18.253 6.346-5.482 5.813-.421 13.244-.421 13.244s1.963 3.566 4.305 6.791c.756 1.041.398-3.731 3.04-5.929 5.524-4.594 15.899-7.103 15.899-7.103",fill:"#5C2552"}),E("path",{d:"M88.426 83.206s2.685 6.202 11.602 6.522c7.82.28 8.973-7.008 7.434-17.505l-.909-5.483c-6.118-2.897-15.478.54-15.478.54s-.576 2.044-.19 5.504c-2.276 2.066-1.824 5.618-1.824 5.618s-.905-1.922-1.98-2.321c-.86-.32-1.897.089-2.322 1.98-1.04 4.632 3.667 5.145 3.667 5.145",fill:"#FFC6A0"}),E("path",{stroke:"#DB836E",strokeWidth:"1.145",strokeLinecap:"round",strokeLinejoin:"round",d:"M100.843 77.099l1.701-.928-1.015-4.324.674-1.406"}),E("path",{d:"M105.546 74.092c-.022.713-.452 1.279-.96 1.263-.51-.016-.904-.607-.882-1.32.021-.713.452-1.278.96-1.263.51.016.904.607.882 1.32M97.592 74.349c-.022.713-.452 1.278-.961 1.263-.509-.016-.904-.607-.882-1.32.022-.713.452-1.279.961-1.263.51.016.904.606.882 1.32",fill:"#552950"}),E("path",{d:"M91.132 86.786s5.269 4.957 12.679 2.327",stroke:"#DB836E",strokeWidth:"1.145",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M99.776 81.903s-3.592.232-1.44-2.79c1.59-1.496 4.897-.46 4.897-.46s1.156 3.906-3.457 3.25",fill:"#DB836E"}),E("path",{d:"M102.88 70.6s2.483.84 3.402.715M93.883 71.975s2.492-1.144 4.778-1.073",stroke:"#5C2552",strokeWidth:"1.526",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M86.32 77.374s.961.879 1.458 2.106c-.377.48-1.033 1.152-.236 1.809M99.337 83.719s1.911.151 2.509-.254",stroke:"#DB836E",strokeWidth:"1.145",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M87.782 115.821l15.73-3.012M100.165 115.821l10.04-2.008",stroke:"#E4EBF7",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M66.508 86.763s-1.598 8.83-6.697 14.078",stroke:"#E4EBF7",strokeWidth:"1.114",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M128.31 87.934s3.013 4.121 4.06 11.785",stroke:"#E4EBF7",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M64.09 84.816s-6.03 9.912-13.607 9.903",stroke:"#DB836E",strokeWidth:".795",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M112.366 65.909l-.142 5.32s5.993 4.472 11.945 9.202c4.482 3.562 8.888 7.455 10.985 8.662 4.804 2.766 8.9 3.355 11.076 1.808 4.071-2.894 4.373-9.878-8.136-15.263-4.271-1.838-16.144-6.36-25.728-9.73",fill:"#FFC6A0"}),E("path",{d:"M130.532 85.488s4.588 5.757 11.619 6.214",stroke:"#DB836E",strokeWidth:".75",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M121.708 105.73s-.393 8.564-1.34 13.612",stroke:"#E4EBF7",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M115.784 161.512s-3.57-1.488-2.678-7.14",stroke:"#648BD8",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M101.52 290.246s4.326 2.057 7.408 1.03c2.842-.948 4.564.673 7.132 1.186 2.57.514 6.925 1.108 11.772-1.269-.104-5.551-6.939-4.01-12.048-6.763-2.582-1.39-3.812-4.757-3.625-8.863h-9.471s-1.402 10.596-1.169 14.68",fill:"#CBD1D1"}),E("path",{d:"M101.496 290.073s2.447 1.281 6.809.658c3.081-.44 3.74.485 7.479 1.039 3.739.554 10.802-.07 11.91-.9.415 1.108-.347 2.077-.347 2.077s-1.523.608-4.847.831c-2.045.137-5.843.293-7.663-.507-1.8-1.385-5.286-1.917-5.77-.243-3.947.958-7.41-.288-7.41-.288l-.16-2.667z",fill:"#2B0849"}),E("path",{d:"M108.824 276.19h3.116s-.103 6.751 4.57 8.62c-4.673.624-8.62-2.32-7.686-8.62",fill:"#A4AABA"}),E("path",{d:"M57.65 272.52s-2.122 7.47-4.518 12.396c-1.811 3.724-4.255 7.548 5.505 7.548 6.698 0 9.02-.483 7.479-6.648-1.541-6.164.268-13.296.268-13.296H57.65z",fill:"#CBD1D1"}),E("path",{d:"M51.54 290.04s2.111 1.178 6.682 1.178c6.128 0 8.31-1.662 8.31-1.662s.605 1.122-.624 2.18c-1 .862-3.624 1.603-7.444 1.559-4.177-.049-5.876-.57-6.786-1.177-.831-.554-.692-1.593-.138-2.078",fill:"#2B0849"}),E("path",{d:"M58.533 274.438s.034 1.529-.315 2.95c-.352 1.431-1.087 3.127-1.139 4.17-.058 1.16 4.57 1.592 5.194.035.623-1.559 1.303-6.475 1.927-7.306.622-.831-4.94-2.135-5.667.15",fill:"#A4AABA"}),E("path",{d:"M100.885 277.015l13.306.092s1.291-54.228 1.843-64.056c.552-9.828 3.756-43.13.997-62.788l-12.48-.64-22.725.776s-.433 3.944-1.19 9.921c-.062.493-.677.838-.744 1.358-.075.582.42 1.347.318 1.956-2.35 14.003-6.343 32.926-8.697 46.425-.116.663-1.227 1.004-1.45 2.677-.04.3.21 1.516.112 1.785-6.836 18.643-10.89 47.584-14.2 61.551l14.528-.014s2.185-8.524 4.008-16.878c2.796-12.817 22.987-84.553 22.987-84.553l3-.517 1.037 46.1s-.223 1.228.334 2.008c.558.782-.556 1.117-.39 2.233l.39 1.784s-.446 7.14-.892 11.826c-.446 4.685-.092 38.954-.092 38.954",fill:"#7BB2F9"}),E("path",{d:"M77.438 220.434c1.146.094 4.016-2.008 6.916-4.91M107.55 223.931s2.758-1.103 6.069-3.862",stroke:"#648BD8",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M108.459 220.905s2.759-1.104 6.07-3.863",stroke:"#648BD8",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M76.099 223.557s2.608-.587 6.47-3.346M87.33 150.82c-.27 3.088.297 8.478-4.315 9.073M104.829 149.075s.11 13.936-1.286 14.983c-2.207 1.655-2.975 1.934-2.975 1.934M101.014 149.63s.035 12.81-1.19 24.245M94.93 174.965s7.174-1.655 9.38-1.655M75.671 204.754c-.316 1.55-.64 3.067-.973 4.535 0 0-1.45 1.822-1.003 3.756.446 1.934-.943 2.034-4.96 15.273-1.686 5.559-4.464 18.49-6.313 27.447-.078.38-4.018 18.06-4.093 18.423M77.043 196.743a313.269 313.269 0 0 1-.877 4.729M83.908 151.414l-1.19 10.413s-1.091.148-.496 2.23c.111 1.34-2.66 15.692-5.153 30.267M57.58 272.94h13.238",stroke:"#648BD8",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),E("path",{d:"M117.377 147.423s-16.955-3.087-35.7.199c.157 2.501-.002 4.128-.002 4.128s14.607-2.802 35.476-.31c.251-2.342.226-4.017.226-4.017",fill:"#192064"}),E("path",{d:"M107.511 150.353l.004-4.885a.807.807 0 0 0-.774-.81c-2.428-.092-5.04-.108-7.795-.014a.814.814 0 0 0-.784.81l-.003 4.88c0 .456.371.82.827.808a140.76 140.76 0 0 1 7.688.017.81.81 0 0 0 .837-.806",fill:"#FFF"}),E("path",{d:"M106.402 149.426l.002-3.06a.64.64 0 0 0-.616-.643 94.135 94.135 0 0 0-5.834-.009.647.647 0 0 0-.626.643l-.001 3.056c0 .36.291.648.651.64 1.78-.04 3.708-.041 5.762.012.36.009.662-.279.662-.64",fill:"#192064"}),E("path",{d:"M101.485 273.933h12.272M102.652 269.075c.006 3.368.04 5.759.11 6.47M102.667 263.125c-.009 1.53-.015 2.98-.016 4.313M102.204 174.024l.893 44.402s.669 1.561-.224 2.677c-.892 1.116 2.455.67.893 2.231-1.562 1.562.893 1.116 0 3.347-.592 1.48-.988 20.987-1.09 34.956",stroke:"#648BD8",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"})]})})};const iQ=rQ;var oQ={success:k0,error:kc,info:T0,warning:QY},om={404:eQ,500:nQ,403:iQ},aQ=Object.keys(om),sQ=function(t){var n=t.prefixCls,r=t.icon,i=t.status,l=Ye("".concat(n,"-icon"));if(aQ.includes("".concat(i))){var c=om[i];return E("div",{className:"".concat(l," ").concat(n,"-image"),children:E(c,{})})}var o=C.exports.createElement(oQ[i]);return r===null||r===!1?null:E("div",{className:l,children:r||o})},lQ=function(t){var n=t.prefixCls,r=t.extra;return r?E("div",{className:"".concat(n,"-extra"),children:r}):null},j0=function(t){var n=t.prefixCls,r=t.className,i=t.subTitle,l=t.title,c=t.style,o=t.children,h=t.status,p=h===void 0?"info":h,g=t.icon,b=t.extra,w=C.exports.useContext(Nn),P=w.getPrefixCls,I=w.direction,A=P("result",n),O=Ye(A,"".concat(A,"-").concat(p),r,se({},"".concat(A,"-rtl"),I==="rtl"));return Qe("div",{className:O,style:c,children:[E(sQ,{prefixCls:A,status:p,icon:g}),E("div",{className:"".concat(A,"-title"),children:l}),i&&E("div",{className:"".concat(A,"-subtitle"),children:i}),E(lQ,{prefixCls:A,extra:b}),o&&E("div",{className:"".concat(A,"-content"),children:o})]})};j0.PRESENTED_IMAGE_403=om[403];j0.PRESENTED_IMAGE_404=om[404];j0.PRESENTED_IMAGE_500=om[500];const uQ=j0;var Tc=C.exports.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0});function U2(e,t,n){return(e-t)/(n-t)}function I4(e,t,n,r){var i=U2(t,n,r),l={};switch(e){case"rtl":l.right="".concat(i*100,"%"),l.transform="translateX(50%)";break;case"btt":l.bottom="".concat(i*100,"%"),l.transform="translateY(50%)";break;case"ttb":l.top="".concat(i*100,"%"),l.transform="translateY(-50%)";break;default:l.left="".concat(i*100,"%"),l.transform="translateX(-50%)";break}return l}function Id(e,t){return Array.isArray(e)?e[t]:e}var cQ=["prefixCls","value","valueIndex","onStartMove","style","render","dragging","onOffsetChange"],dQ=C.exports.forwardRef(function(e,t){var n,r,i=e.prefixCls,l=e.value,c=e.valueIndex,o=e.onStartMove,h=e.style,p=e.render,g=e.dragging,b=e.onOffsetChange,w=In(e,cQ),P=C.exports.useContext(Tc),I=P.min,A=P.max,O=P.direction,M=P.disabled,R=P.range,N=P.tabIndex,z=P.ariaLabelForHandle,B=P.ariaLabelledByForHandle,U=P.ariaValueTextFormatterForHandle,q="".concat(i,"-handle"),H=function(Z){M||o(Z,c)},te=function(Z){if(!M){var Q=null;switch(Z.which||Z.keyCode){case Et.LEFT:Q=O==="ltr"||O==="btt"?-1:1;break;case Et.RIGHT:Q=O==="ltr"||O==="btt"?1:-1;break;case Et.UP:Q=O!=="ttb"?1:-1;break;case Et.DOWN:Q=O!=="ttb"?-1:1;break;case Et.HOME:Q="min";break;case Et.END:Q="max";break;case Et.PAGE_UP:Q=2;break;case Et.PAGE_DOWN:Q=-2;break}Q!==null&&(Z.preventDefault(),b(Q,c))}},Y=I4(O,l,I,A),le=E("div",{ref:t,className:Ye(q,(n={},se(n,"".concat(q,"-").concat(c+1),R),se(n,"".concat(q,"-dragging"),g),n)),style:ve(ve({},Y),h),onMouseDown:H,onTouchStart:H,onKeyDown:te,tabIndex:M?null:Id(N,c),role:"slider","aria-valuemin":I,"aria-valuemax":A,"aria-valuenow":l,"aria-disabled":M,"aria-label":Id(z,c),"aria-labelledby":Id(B,c),"aria-valuetext":(r=Id(U,c))===null||r===void 0?void 0:r(l),...w});return p&&(le=p(le,{index:c,prefixCls:i,value:l,dragging:g})),le}),fQ=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","draggingIndex"],hQ=C.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.style,i=e.onStartMove,l=e.onOffsetChange,c=e.values,o=e.handleRender,h=e.draggingIndex,p=In(e,fQ),g=C.exports.useRef({});return C.exports.useImperativeHandle(t,function(){return{focus:function(w){var P;(P=g.current[w])===null||P===void 0||P.focus()}}}),E($n,{children:c.map(function(b,w){return E(dQ,{ref:function(I){I?g.current[w]=I:delete g.current[w]},dragging:h===w,prefixCls:n,style:Id(r,w),value:b,valueIndex:w,onStartMove:i,onOffsetChange:l,render:o,...p},w)})})});function fk(e){var t="touches"in e?e.touches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function pQ(e,t,n,r,i,l,c,o,h){var p=C.exports.useState(null),g=ze(p,2),b=g[0],w=g[1],P=C.exports.useState(-1),I=ze(P,2),A=I[0],O=I[1],M=C.exports.useState(n),R=ze(M,2),N=R[0],z=R[1],B=C.exports.useState(n),U=ze(B,2),q=U[0],H=U[1],te=C.exports.useRef(null),Y=C.exports.useRef(null);C.exports.useEffect(function(){A===-1&&z(n)},[n,A]),C.exports.useEffect(function(){return function(){document.removeEventListener("mousemove",te.current),document.removeEventListener("mouseup",Y.current),document.removeEventListener("touchmove",te.current),document.removeEventListener("touchend",Y.current)}},[]);var le=function(de,oe){N.some(function(ye,Re){return ye!==de[Re]})&&(oe!==void 0&&w(oe),z(de),c(de))},J=function(de,oe){if(de===-1){var ye=q[0],Re=q[q.length-1],Te=r-ye,ke=i-Re,De=oe*(i-r);De=Math.max(De,Te),De=Math.min(De,ke);var Me=l(ye+De);De=Me-ye;var Ne=q.map(function(Ue){return Ue+De});le(Ne)}else{var Le=(i-r)*oe,Ve=wt(N);Ve[de]=q[de];var qe=h(Ve,Le,de,"dist");le(qe.values,qe.value)}},Z=C.exports.useRef(J);Z.current=J;var Q=function(de,oe){de.stopPropagation();var ye=n[oe];O(oe),w(ye),H(n);var Re=fk(de),Te=Re.pageX,ke=Re.pageY,De=function(Le){Le.preventDefault();var Ve=fk(Le),qe=Ve.pageX,Ue=Ve.pageY,ct=qe-Te,pt=Ue-ke,Tt=e.current.getBoundingClientRect(),Xe=Tt.width,Pt=Tt.height,mt;switch(t){case"btt":mt=-pt/Pt;break;case"ttb":mt=pt/Pt;break;case"rtl":mt=-ct/Xe;break;default:mt=ct/Xe}Z.current(oe,mt)},Me=function Ne(Le){Le.preventDefault(),document.removeEventListener("mouseup",Ne),document.removeEventListener("mousemove",De),document.removeEventListener("touchend",Ne),document.removeEventListener("touchmove",De),te.current=null,Y.current=null,O(-1),o()};document.addEventListener("mouseup",Me),document.addEventListener("mousemove",De),document.addEventListener("touchend",Me),document.addEventListener("touchmove",De),te.current=De,Y.current=Me},ge=C.exports.useMemo(function(){var re=wt(n).sort(function(oe,ye){return oe-ye}),de=wt(N).sort(function(oe,ye){return oe-ye});return re.every(function(oe,ye){return oe===de[ye]})?N:n},[n,N]);return[A,b,ge,Q]}function mQ(e){var t=e.prefixCls,n=e.style,r=e.start,i=e.end,l=e.index,c=e.onStartMove,o=C.exports.useContext(Tc),h=o.direction,p=o.min,g=o.max,b=o.disabled,w=o.range,P="".concat(t,"-track"),I=U2(r,p,g),A=U2(i,p,g),O=function(N){!b&&c&&c(N,-1)},M={};switch(h){case"rtl":M.right="".concat(I*100,"%"),M.width="".concat(A*100-I*100,"%");break;case"btt":M.bottom="".concat(I*100,"%"),M.height="".concat(A*100-I*100,"%");break;case"ttb":M.top="".concat(I*100,"%"),M.height="".concat(A*100-I*100,"%");break;default:M.left="".concat(I*100,"%"),M.width="".concat(A*100-I*100,"%")}return E("div",{className:Ye(P,w&&"".concat(P,"-").concat(l+1)),style:ve(ve({},M),n),onMouseDown:O,onTouchStart:O})}function vQ(e){var t=e.prefixCls,n=e.style,r=e.values,i=e.startPoint,l=e.onStartMove,c=C.exports.useContext(Tc),o=c.included,h=c.range,p=c.min,g=C.exports.useMemo(function(){if(!h){if(r.length===0)return[];var b=i!=null?i:p,w=r[0];return[{start:Math.min(b,w),end:Math.max(b,w)}]}for(var P=[],I=0;I<r.length-1;I+=1)P.push({start:r[I],end:r[I+1]});return P},[r,h,i,p]);return o?g.map(function(b,w){var P=b.start,I=b.end;return E(mQ,{index:w,prefixCls:t,style:Id(n,w),start:P,end:I,onStartMove:l},w)}):null}function gQ(e){var t=e.prefixCls,n=e.style,r=e.children,i=e.value,l=e.onClick,c=C.exports.useContext(Tc),o=c.min,h=c.max,p=c.direction,g=c.includedStart,b=c.includedEnd,w=c.included,P="".concat(t,"-text"),I=I4(p,i,o,h);return E("span",{className:Ye(P,se({},"".concat(P,"-active"),w&&g<=i&&i<=b)),style:ve(ve({},I),n),onMouseDown:function(O){O.stopPropagation()},onClick:function(){l(i)},children:r})}function yQ(e){var t=e.prefixCls,n=e.marks,r=e.onClick,i="".concat(t,"-mark");return n.length?E("div",{className:i,children:n.map(function(l){var c=l.value,o=l.style,h=l.label;return E(gQ,{prefixCls:i,style:o,value:c,onClick:r,children:h},c)})}):null}function xQ(e){var t=e.prefixCls,n=e.value,r=e.style,i=e.activeStyle,l=C.exports.useContext(Tc),c=l.min,o=l.max,h=l.direction,p=l.included,g=l.includedStart,b=l.includedEnd,w="".concat(t,"-dot"),P=p&&g<=n&&n<=b,I=ve(ve({},I4(h,n,c,o)),typeof r=="function"?r(n):r);return P&&(I=ve(ve({},I),typeof i=="function"?i(n):i)),E("span",{className:Ye(w,se({},"".concat(w,"-active"),P)),style:I})}function _Q(e){var t=e.prefixCls,n=e.marks,r=e.dots,i=e.style,l=e.activeStyle,c=C.exports.useContext(Tc),o=c.min,h=c.max,p=c.step,g=C.exports.useMemo(function(){var b=new Set;if(n.forEach(function(P){b.add(P.value)}),r&&p!==null)for(var w=o;w<=h;)b.add(w),w+=p;return Array.from(b)},[o,h,p,r,n]);return E("div",{className:"".concat(t,"-step"),children:g.map(function(b){return E(xQ,{prefixCls:t,value:b,style:i,activeStyle:l},b)})})}function bQ(e,t,n,r,i,l){var c=C.exports.useCallback(function(P){var I=isFinite(P)?P:e;return I=Math.min(t,P),I=Math.max(e,I),I},[e,t]),o=C.exports.useCallback(function(P){if(n!==null){var I=e+Math.round((c(P)-e)/n)*n,A=function(N){return(String(N).split(".")[1]||"").length},O=Math.max(A(n),A(t),A(e)),M=Number(I.toFixed(O));return e<=M&&M<=t?M:null}return null},[n,e,t,c]),h=C.exports.useCallback(function(P){var I=c(P),A=r.map(function(R){return R.value});n!==null&&A.push(o(P)),A.push(e,t);var O=A[0],M=t-e;return A.forEach(function(R){var N=Math.abs(I-R);N<=M&&(O=R,M=N)}),O},[e,t,r,n,c,o]),p=function P(I,A,O){var M=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof A=="number"){var R,N=I[O],z=N+A,B=[];r.forEach(function(Y){B.push(Y.value)}),B.push(e,t),B.push(o(N));var U=A>0?1:-1;M==="unit"?B.push(o(N+U*n)):B.push(o(z)),B=B.filter(function(Y){return Y!==null}).filter(function(Y){return A<0?Y<=N:Y>=N}),M==="unit"&&(B=B.filter(function(Y){return Y!==N}));var q=M==="unit"?N:z;R=B[0];var H=Math.abs(R-q);if(B.forEach(function(Y){var le=Math.abs(Y-q);le<H&&(R=Y,H=le)}),R===void 0)return A<0?e:t;if(M==="dist")return R;if(Math.abs(A)>1){var te=wt(I);return te[O]=R,P(te,A-U,O,M)}return R}else{if(A==="min")return e;if(A==="max")return t}},g=function(I,A,O){var M=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",R=I[O],N=p(I,A,O,M);return{value:N,changed:N!==R}},b=function(I){return l===null&&I===0||typeof l=="number"&&I<l},w=function(I,A,O){var M=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",R=I.map(h),N=R[O],z=p(R,A,O,M);if(R[O]=z,i===!1){var B=l||0;O>0&&R[O-1]!==N&&(R[O]=Math.max(R[O],R[O-1]+B)),O<R.length-1&&R[O+1]!==N&&(R[O]=Math.min(R[O],R[O+1]-B))}else if(typeof l=="number"||l===null){for(var U=O+1;U<R.length;U+=1)for(var q=!0;b(R[U]-R[U-1])&&q;){var H=g(R,1,U);R[U]=H.value,q=H.changed}for(var te=O;te>0;te-=1)for(var Y=!0;b(R[te]-R[te-1])&&Y;){var le=g(R,-1,te-1);R[te-1]=le.value,Y=le.changed}for(var J=R.length-1;J>0;J-=1)for(var Z=!0;b(R[J]-R[J-1])&&Z;){var Q=g(R,-1,J-1);R[J-1]=Q.value,Z=Q.changed}for(var ge=0;ge<R.length-1;ge+=1)for(var re=!0;b(R[ge+1]-R[ge])&&re;){var de=g(R,1,ge+1);R[ge+1]=de.value,re=de.changed}}return{value:R[O],values:R}};return[h,w]}var wQ=C.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=r===void 0?"rc-slider":r,l=e.className,c=e.style,o=e.disabled,h=o===void 0?!1:o,p=e.autoFocus,g=e.onFocus,b=e.onBlur,w=e.min,P=w===void 0?0:w,I=e.max,A=I===void 0?100:I,O=e.step,M=O===void 0?1:O,R=e.value,N=e.defaultValue,z=e.range,B=e.count,U=e.onChange,q=e.onBeforeChange,H=e.onAfterChange,te=e.allowCross,Y=te===void 0?!0:te,le=e.pushable,J=le===void 0?!1:le,Z=e.draggableTrack,Q=e.reverse,ge=e.vertical,re=e.included,de=re===void 0?!0:re,oe=e.startPoint,ye=e.trackStyle,Re=e.handleStyle,Te=e.railStyle,ke=e.dotStyle,De=e.activeDotStyle,Me=e.marks,Ne=e.dots,Le=e.handleRender,Ve=e.tabIndex,qe=Ve===void 0?0:Ve,Ue=e.ariaLabelForHandle,ct=e.ariaLabelledByForHandle,pt=e.ariaValueTextFormatterForHandle,Tt=C.exports.useRef(),Xe=C.exports.useRef(),Pt=C.exports.useMemo(function(){return ge?Q?"ttb":"btt":Q?"rtl":"ltr"},[Q,ge]),mt=C.exports.useMemo(function(){return isFinite(P)?P:0},[P]),Mt=C.exports.useMemo(function(){return isFinite(A)?A:100},[A]),Ct=C.exports.useMemo(function(){return M!==null&&M<=0?1:M},[M]),Lt=C.exports.useMemo(function(){return J===!0?Ct:J>=0?J:!1},[J,Ct]),lt=C.exports.useMemo(function(){var me=Object.keys(Me||{});return me.map(function(K){var G=Me[K],ce={value:Number(K)};return G&&sn(G)==="object"&&!C.exports.isValidElement(G)&&("label"in G||"style"in G)?(ce.style=G.style,ce.label=G.label):ce.label=G,ce}).filter(function(K){var G=K.label;return G||typeof G=="number"}).sort(function(K,G){return K.value-G.value})},[Me]),dt=bQ(mt,Mt,Ct,lt,Y,Lt),ut=ze(dt,2),it=ut[0],ft=ut[1],xt=Vi(N,{value:R}),Wt=ze(xt,2),Ut=Wt[0],Qt=Wt[1],Fe=C.exports.useMemo(function(){var me=Ut==null?[]:Array.isArray(Ut)?Ut:[Ut],K=ze(me,1),G=K[0],ce=G===void 0?mt:G,ae=Ut===null?[]:[ce];if(z){if(ae=wt(me),B||Ut===void 0){var xe=B>=0?B+1:2;for(ae=ae.slice(0,xe);ae.length<xe;){var Ee;ae.push((Ee=ae[ae.length-1])!==null&&Ee!==void 0?Ee:mt)}}ae.sort(function(be,Ce){return be-Ce})}return ae.forEach(function(be,Ce){ae[Ce]=it(be)}),ae},[Ut,z,mt,B,it]),Ge=C.exports.useRef(Fe);Ge.current=Fe;var Xt=function(K){return z?K:K[0]},dn=function(K){var G=wt(K).sort(function(ce,ae){return ce-ae});U&&!gc(G,Ge.current)&&U(Xt(G)),Qt(G)},Vt=function(K){if(!h){var G=0,ce=Mt-mt;Fe.forEach(function(xe,Ee){var be=Math.abs(K-xe);be<=ce&&(ce=be,G=Ee)});var ae=wt(Fe);ae[G]=K,z&&!Fe.length&&B===void 0&&ae.push(K),q==null||q(Xt(ae)),dn(ae),H==null||H(Xt(ae))}},jt=function(K){K.preventDefault();var G=Xe.current.getBoundingClientRect(),ce=G.width,ae=G.height,xe=G.left,Ee=G.top,be=G.bottom,Ce=G.right,Oe=K.clientX,He=K.clientY,We;switch(Pt){case"btt":We=(be-He)/ae;break;case"ttb":We=(He-Ee)/ae;break;case"rtl":We=(Ce-Oe)/ce;break;default:We=(Oe-xe)/ce}var Be=mt+We*(Mt-mt);Vt(it(Be))},nn=C.exports.useState(null),_n=ze(nn,2),An=_n[0],_t=_n[1],Gt=function(K,G){if(!h){var ce=ft(Fe,K,G);q==null||q(Xt(Fe)),dn(ce.values),H==null||H(Xt(ce.values)),_t(ce.value)}};C.exports.useEffect(function(){if(An!==null){var me=Fe.indexOf(An);me>=0&&Tt.current.focus(me)}_t(null)},[An]);var an=C.exports.useMemo(function(){return Z&&Ct===null?!1:Z},[Z,Ct]),Fn=function(){H==null||H(Xt(Ge.current))},kn=pQ(Xe,Pt,Fe,mt,Mt,it,dn,Fn,ft),zt=ze(kn,4),Tn=zt[0],Cn=zt[1],hn=zt[2],Nt=zt[3],ot=function(K,G){Nt(K,G),q==null||q(Xt(Ge.current))},ht=Tn!==-1;C.exports.useEffect(function(){if(!ht){var me=Fe.lastIndexOf(Cn);Tt.current.focus(me)}},[ht]);var At=C.exports.useMemo(function(){return wt(hn).sort(function(me,K){return me-K})},[hn]),$t=C.exports.useMemo(function(){return z?[At[0],At[At.length-1]]:[mt,At[0]]},[At,z,mt]),cn=ze($t,2),Mn=cn[0],Gn=cn[1];C.exports.useImperativeHandle(t,function(){return{focus:function(){Tt.current.focus(0)},blur:function(){var K=document,G=K.activeElement;Xe.current.contains(G)&&(G==null||G.blur())}}}),C.exports.useEffect(function(){p&&Tt.current.focus(0)},[]);var qn=C.exports.useMemo(function(){return{min:mt,max:Mt,direction:Pt,disabled:h,step:Ct,included:de,includedStart:Mn,includedEnd:Gn,range:z,tabIndex:qe,ariaLabelForHandle:Ue,ariaLabelledByForHandle:ct,ariaValueTextFormatterForHandle:pt}},[mt,Mt,Pt,h,Ct,de,Mn,Gn,z,qe,Ue,ct,pt]);return E(Tc.Provider,{value:qn,children:Qe("div",{ref:Xe,className:Ye(i,l,(n={},se(n,"".concat(i,"-disabled"),h),se(n,"".concat(i,"-vertical"),ge),se(n,"".concat(i,"-horizontal"),!ge),se(n,"".concat(i,"-with-marks"),lt.length),n)),style:c,onMouseDown:jt,children:[E("div",{className:"".concat(i,"-rail"),style:Te}),E(vQ,{prefixCls:i,style:ye,values:At,startPoint:oe,onStartMove:an?ot:null}),E(_Q,{prefixCls:i,marks:lt,dots:Ne,style:ke,activeStyle:De}),E(hQ,{ref:Tt,prefixCls:i,style:Re,values:hn,draggingIndex:Tn,onStartMove:ot,onOffsetChange:Gt,onFocus:g,onBlur:b,handleRender:Le}),E(yQ,{prefixCls:i,marks:lt,onClick:Vt})]})})}),CQ=C.exports.forwardRef(function(e,t){var n=e.open,r=C.exports.useRef(null),i=C.exports.useRef(null);function l(){nr.cancel(i.current),i.current=null}function c(){i.current=nr(function(){var o;(o=r.current)===null||o===void 0||o.forcePopupAlign(),i.current=null})}return C.exports.useEffect(function(){return n?c():l(),l},[n,e.title]),E(oo,{ref:Lo(r,t),...e})});const SQ=CQ;var EQ=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},kQ=C.exports.forwardRef(function(e,t){var n=C.exports.useContext(Nn),r=n.getPrefixCls,i=n.direction,l=n.getPopupContainer,c=C.exports.useState({}),o=ze(c,2),h=o[0],p=o[1],g=function(H,te){p(function(Y){return tt(tt({},Y),se({},H,te))})},b=function(H,te){return H||(te?i==="rtl"?"left":"right":"top")},w=e.prefixCls,P=e.range,I=e.className,A=EQ(e,["prefixCls","range","className"]),O=r("slider",w),M=Ye(I,se({},"".concat(O,"-rtl"),i==="rtl"));i==="rtl"&&!A.vertical&&(A.reverse=!A.reverse);var R=C.exports.useMemo(function(){return P?sn(P)==="object"?[!0,P.draggableTrack]:[!0,!1]:[!1]},[P]),N=ze(R,2),z=N[0],B=N[1],U=function(H,te){var Y,le=te.index,J=te.dragging,Z=r(),Q=e.tooltip,ge=Q===void 0?{}:Q,re=e.vertical,de=tt({formatter:(Y=e.tipFormatter)!==null&&Y!==void 0?Y:function(Ve){return typeof Ve=="number"?Ve.toString():""},open:e.tooltipVisible,placement:e.tooltipPlacement,getPopupContainer:e.getTooltipPopupContainer},ge),oe=de.open,ye=de.placement,Re=de.getPopupContainer,Te=de.prefixCls,ke=de.formatter,De=ke?h[le]||J:!1,Me=oe||oe===void 0&&De,Ne=tt(tt({},H.props),{onMouseEnter:function(){return g(le,!0)},onMouseLeave:function(){return g(le,!1)}}),Le=r("tooltip",Te);return E(SQ,{prefixCls:Le,title:ke?ke(te.value):"",open:Me,placement:b(ye,re),transitionName:"".concat(Z,"-zoom-down"),overlayClassName:"".concat(O,"-tooltip"),getPopupContainer:Re||l,children:C.exports.cloneElement(H,Ne)},le)};return E(wQ,{...A,step:A.step,range:z,draggableTrack:B,className:M,ref:t,prefixCls:O,handleRender:U})});const TQ=kQ;function PQ(e){return null}function IQ(e){return null}var MQ="RC_TABLE_KEY";function KA(e){return e==null?[]:Array.isArray(e)?e:[e]}function HA(e,t){if(!t&&typeof t!="number")return e;for(var n=KA(t),r=e,i=0;i<n.length;i+=1){if(!r)return null;var l=n[i];r=r[l]}return r}function K0(e){var t=[],n={};return e.forEach(function(r){for(var i=r||{},l=i.key,c=i.dataIndex,o=l||KA(c).join("-")||MQ;n[o];)o="".concat(o,"_next");n[o]=!0,t.push(o)}),t}function j2(e){return e!=null}var WA=C.exports.createContext(!1);function RQ(){var e=C.exports.createContext(null),t=function(r){var i=r.value,l=r.children,c=C.exports.useRef(i);c.current=i;var o=C.exports.useState(function(){return{getValue:function(){return c.current},listeners:new Set}}),h=ze(o,1),p=h[0];return si(function(){p.listeners.forEach(function(g){g(i)})},[i]),E(e.Provider,{value:p,children:l})};return{Context:e,Provider:t}}function AQ(e,t){var n=Mp(t),r=C.exports.useContext(e==null?void 0:e.Context),i=r||{},l=i.listeners,c=i.getValue,o=C.exports.useState(function(){return n(r?c():null)}),h=ze(o,2),p=h[0],g=h[1];return si(function(){if(!r)return;function b(w){g(function(P){var I=n(w);return gc(P,I)?P:I})}return l.add(b),function(){l.delete(b)}},[r]),p}var GA=RQ(),H0=C.exports.createContext(null),qA=C.exports.createContext({renderWithProps:!1}),OQ=["colSpan","rowSpan","style","className"];function NQ(e,t,n,r){var i=e+t-1;return e<=r&&i>=n}function DQ(e){return e&&sn(e)==="object"&&!Array.isArray(e)&&!C.exports.isValidElement(e)}function LQ(e){return typeof e=="string"?!0:Sc(e)}var zQ=function(t){var n=t.ellipsis,r=t.rowType,i=t.children,l,c=n===!0?{showTitle:!0}:n;return c&&(c.showTitle||r==="header")&&(typeof i=="string"||typeof i=="number"?l=i.toString():C.exports.isValidElement(i)&&typeof i.props.children=="string"&&(l=i.props.children)),l};function FQ(e,t){var n,r,i,l=e.prefixCls,c=e.className,o=e.record,h=e.index,p=e.renderIndex,g=e.dataIndex,b=e.render,w=e.children,P=e.component,I=P===void 0?"td":P,A=e.colSpan,O=e.rowSpan,M=e.fixLeft,R=e.fixRight,N=e.firstFixLeft,z=e.lastFixLeft,B=e.firstFixRight,U=e.lastFixRight,q=e.appendNode,H=e.additionalProps,te=H===void 0?{}:H,Y=e.ellipsis,le=e.align,J=e.rowType,Z=e.isSticky,Q=e.hovering,ge=e.onHover,re="".concat(l,"-cell"),de=C.exports.useContext(qA),oe=C.exports.useContext(WA),ye=C.exports.useContext(H0),Re=ye.allColumnsFixedLeft,Te=C.exports.useMemo(function(){if(j2(w))return[w];var it=HA(o,g),ft=it,xt=void 0;if(b){var Wt=b(it,o,p);DQ(Wt)?(ft=Wt.children,xt=Wt.props,de.renderWithProps=!0):ft=Wt}return[ft,xt]},[de.renderWithProps?Math.random():0,w,g,de,o,b,p]),ke=ze(Te,2),De=ke[0],Me=ke[1],Ne=De;sn(Ne)==="object"&&!Array.isArray(Ne)&&!C.exports.isValidElement(Ne)&&(Ne=null),Y&&(z||B)&&(Ne=E("span",{className:"".concat(re,"-content"),children:Ne}));var Le=Me||{},Ve=Le.colSpan,qe=Le.rowSpan,Ue=Le.style,ct=Le.className,pt=In(Le,OQ),Tt=(n=Ve!==void 0?Ve:A)!==null&&n!==void 0?n:1,Xe=(r=qe!==void 0?qe:O)!==null&&r!==void 0?r:1;if(Tt===0||Xe===0)return null;var Pt={},mt=typeof M=="number"&&oe,Mt=typeof R=="number"&&oe;mt&&(Pt.position="sticky",Pt.left=M),Mt&&(Pt.position="sticky",Pt.right=R);var Ct={};le&&(Ct.textAlign=le);var Lt=function(ft){var xt;o&&ge(h,h+Xe-1),te==null||(xt=te.onMouseEnter)===null||xt===void 0||xt.call(te,ft)},lt=function(ft){var xt;o&&ge(-1,-1),te==null||(xt=te.onMouseLeave)===null||xt===void 0||xt.call(te,ft)},dt=zQ({rowType:J,ellipsis:Y,children:De}),ut=ve(ve(ve({title:dt},pt),te),{},{colSpan:Tt!==1?Tt:null,rowSpan:Xe!==1?Xe:null,className:Ye(re,c,(i={},se(i,"".concat(re,"-fix-left"),mt&&oe),se(i,"".concat(re,"-fix-left-first"),N&&oe),se(i,"".concat(re,"-fix-left-last"),z&&oe),se(i,"".concat(re,"-fix-left-all"),z&&Re&&oe),se(i,"".concat(re,"-fix-right"),Mt&&oe),se(i,"".concat(re,"-fix-right-first"),B&&oe),se(i,"".concat(re,"-fix-right-last"),U&&oe),se(i,"".concat(re,"-ellipsis"),Y),se(i,"".concat(re,"-with-append"),q),se(i,"".concat(re,"-fix-sticky"),(mt||Mt)&&Z&&oe),se(i,"".concat(re,"-row-hover"),!Me&&Q),i),te.className,ct),style:ve(ve(ve(ve({},te.style),Ct),Pt),Ue),onMouseEnter:Lt,onMouseLeave:lt,ref:LQ(I)?t:null});return Qe(I,{...ut,children:[q,Ne]})}var ZA=C.exports.forwardRef(FQ);ZA.displayName="Cell";var $Q=["expanded","className","hovering"],BQ=C.exports.memo(ZA,function(e,t){return t.shouldCellUpdate?$Q.every(function(n){return e[n]===t[n]})&&!t.shouldCellUpdate(t.record,e.record):gc(e,t)}),am=C.exports.forwardRef(function(e,t){var n=e.index,r=e.additionalProps,i=r===void 0?{}:r,l=e.colSpan,c=e.rowSpan,o=i.colSpan,h=i.rowSpan,p=l!=null?l:o,g=c!=null?c:h,b=AQ(GA,function(I){var A=NQ(n,g||1,I==null?void 0:I.startRow,I==null?void 0:I.endRow);return{onHover:I==null?void 0:I.onHover,hovering:A}}),w=b.onHover,P=b.hovering;return E(BQ,{...e,colSpan:p,rowSpan:g,hovering:P,ref:t,onHover:w})});am.displayName="WrappedCell";var ys=C.exports.createContext(null);function M4(e,t,n,r,i){var l=n[e]||{},c=n[t]||{},o,h;l.fixed==="left"?o=r.left[e]:c.fixed==="right"&&(h=r.right[t]);var p=!1,g=!1,b=!1,w=!1,P=n[t+1],I=n[e-1];if(i==="rtl"){if(o!==void 0){var A=I&&I.fixed==="left";w=!A}else if(h!==void 0){var O=P&&P.fixed==="right";b=!O}}else if(o!==void 0){var M=P&&P.fixed==="left";p=!M}else if(h!==void 0){var R=I&&I.fixed==="right";g=!R}return{fixLeft:o,fixRight:h,lastFixLeft:p,firstFixRight:g,lastFixRight:b,firstFixLeft:w,isSticky:r.isSticky}}function XA(e){var t=e.cells,n=e.stickyOffsets,r=e.flattenColumns,i=e.rowComponent,l=e.cellComponent,c=e.onHeaderRow,o=e.index,h=C.exports.useContext(ys),p=h.prefixCls,g=h.direction,b;c&&(b=c(t.map(function(P){return P.column}),o));var w=K0(t.map(function(P){return P.column}));return E(i,{...b,children:t.map(function(P,I){var A=P.column,O=M4(P.colStart,P.colEnd,r,n,g),M;return A&&A.onHeaderCell&&(M=P.column.onHeaderCell(A)),C.exports.createElement(am,{...P,ellipsis:A.ellipsis,align:A.align,component:l,prefixCls:p,key:w[I],...O,additionalProps:M,rowType:"header"})})})}XA.displayName="HeaderRow";function VQ(e){var t=[];function n(c,o){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;t[h]=t[h]||[];var p=o,g=c.filter(Boolean).map(function(b){var w={key:b.key,className:b.className||"",children:b.title,column:b,colStart:p},P=1,I=b.children;return I&&I.length>0&&(P=n(I,p,h+1).reduce(function(A,O){return A+O},0),w.hasSubColumns=!0),"colSpan"in b&&(P=b.colSpan),"rowSpan"in b&&(w.rowSpan=b.rowSpan),w.colSpan=P,w.colEnd=w.colStart+P-1,t[h].push(w),p+=P,P});return g}n(e,0);for(var r=t.length,i=function(o){t[o].forEach(function(h){!("rowSpan"in h)&&!h.hasSubColumns&&(h.rowSpan=r-o)})},l=0;l<r;l+=1)i(l);return t}function hk(e){var t=e.stickyOffsets,n=e.columns,r=e.flattenColumns,i=e.onHeaderRow,l=C.exports.useContext(ys),c=l.prefixCls,o=l.getComponent,h=C.exports.useMemo(function(){return VQ(n)},[n]),p=o(["header","wrapper"],"thead"),g=o(["header","row"],"tr"),b=o(["header","cell"],"th");return E(p,{className:"".concat(c,"-thead"),children:h.map(function(w,P){var I=E(XA,{flattenColumns:r,cells:w,stickyOffsets:t,rowComponent:g,cellComponent:b,onHeaderRow:i,index:P},P);return I})})}var YA=C.exports.createContext(null);function QA(e){var t=e.prefixCls,n=e.children,r=e.component,i=e.cellComponent,l=e.className,c=e.expanded,o=e.colSpan,h=e.isEmpty,p=C.exports.useContext(ys),g=p.scrollbarSize,b=C.exports.useContext(YA),w=b.fixHeader,P=b.fixColumn,I=b.componentWidth,A=b.horizonScroll;return C.exports.useMemo(function(){var O=n;return(h?A:P)&&(O=E("div",{style:{width:I-(w?g:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed"),children:I!==0&&O})),E(r,{className:l,style:{display:c?null:"none"},children:E(am,{component:i,prefixCls:t,colSpan:o,children:O})})},[n,r,l,c,o,h,g,I,P,w,A])}var JA=C.exports.createContext(null);function eO(e){var t=e.className,n=e.style,r=e.record,i=e.index,l=e.renderIndex,c=e.rowKey,o=e.rowExpandable,h=e.expandedKeys,p=e.onRow,g=e.indent,b=g===void 0?0:g,w=e.rowComponent,P=e.cellComponent,I=e.childrenColumnName,A=C.exports.useContext(ys),O=A.prefixCls,M=A.fixedInfoList,R=C.exports.useContext(H0),N=R.flattenColumns,z=R.expandableType,B=R.expandRowByClick,U=R.onTriggerExpand,q=R.rowClassName,H=R.expandedRowClassName,te=R.indentSize,Y=R.expandIcon,le=R.expandedRowRender,J=R.expandIconColumnIndex,Z=C.exports.useState(!1),Q=ze(Z,2),ge=Q[0],re=Q[1],de=h&&h.has(e.recordKey);C.exports.useEffect(function(){de&&re(!0)},[de]);var oe=z==="row"&&(!o||o(r)),ye=z==="nest",Re=I&&r&&r[I],Te=oe||ye,ke=C.exports.useRef(U);ke.current=U;var De=function(){ke.current.apply(ke,arguments)},Me=p==null?void 0:p(r,i),Ne=function(Xe){var Pt;B&&Te&&De(r,Xe);for(var mt=arguments.length,Mt=new Array(mt>1?mt-1:0),Ct=1;Ct<mt;Ct++)Mt[Ct-1]=arguments[Ct];Me==null||(Pt=Me.onClick)===null||Pt===void 0||Pt.call.apply(Pt,[Me,Xe].concat(Mt))},Le;typeof q=="string"?Le=q:typeof q=="function"&&(Le=q(r,i,b));var Ve=K0(N),qe=E(w,{...Me,"data-row-key":c,className:Ye(t,"".concat(O,"-row"),"".concat(O,"-row-level-").concat(b),Le,Me&&Me.className),style:ve(ve({},n),Me?Me.style:null),onClick:Ne,children:N.map(function(Tt,Xe){var Pt=Tt.render,mt=Tt.dataIndex,Mt=Tt.className,Ct=Ve[Xe],Lt=M[Xe],lt;Xe===(J||0)&&ye&&(lt=Qe($n,{children:[E("span",{style:{paddingLeft:"".concat(te*b,"px")},className:"".concat(O,"-row-indent indent-level-").concat(b)}),Y({prefixCls:O,expanded:de,expandable:Re,record:r,onExpand:De})]}));var dt;return Tt.onCell&&(dt=Tt.onCell(r,i)),E(am,{className:Mt,ellipsis:Tt.ellipsis,align:Tt.align,component:P,prefixCls:O,record:r,index:i,renderIndex:l,dataIndex:mt,render:Pt,shouldCellUpdate:Tt.shouldCellUpdate,expanded:lt&&de,...Lt,appendNode:lt,additionalProps:dt},Ct)})}),Ue;if(oe&&(ge||de)){var ct=le(r,i,b+1,de),pt=H&&H(r,i,b);Ue=E(QA,{expanded:de,className:Ye("".concat(O,"-expanded-row"),"".concat(O,"-expanded-row-level-").concat(b+1),pt),prefixCls:O,component:w,cellComponent:P,colSpan:N.length,isEmpty:!1,children:ct})}return Qe($n,{children:[qe,Ue]})}eO.displayName="BodyRow";function tO(e,t,n,r,i,l){var c=[];c.push({record:e,indent:t,index:l});var o=i(e),h=r==null?void 0:r.has(o);if(e&&Array.isArray(e[n])&&h)for(var p=0;p<e[n].length;p+=1){var g=tO(e[n][p],t+1,n,r,i,p);c.push.apply(c,wt(g))}return c}function UQ(e,t,n,r){var i=C.exports.useMemo(function(){if(n!=null&&n.size){for(var l=[],c=0;c<(e==null?void 0:e.length);c+=1){var o=e[c];l.push.apply(l,wt(tO(o,0,t,n,r,c)))}return l}return e==null?void 0:e.map(function(h,p){return{record:h,indent:0,index:p}})},[e,t,n,r]);return i}function jQ(e){var t=e.columnKey,n=e.onColumnResize,r=C.exports.useRef();return C.exports.useEffect(function(){r.current&&n(t,r.current.offsetWidth)},[]),E(ol,{data:t,children:E("td",{ref:r,style:{padding:0,border:0,height:0},children:E("div",{style:{height:0,overflow:"hidden"},children:"\xA0"})})})}function KQ(e){var t=e.prefixCls,n=e.columnsKey,r=e.onColumnResize;return E("tr",{"aria-hidden":"true",className:"".concat(t,"-measure-row"),style:{height:0,fontSize:0},children:E(ol.Collection,{onBatchResize:function(l){l.forEach(function(c){var o=c.data,h=c.size;r(o,h.offsetWidth)})},children:n.map(function(i){return E(jQ,{columnKey:i,onColumnResize:r},i)})})})}function HQ(e){var t=e.data,n=e.getRowKey,r=e.measureColumnWidth,i=e.expandedKeys,l=e.onRow,c=e.rowExpandable,o=e.emptyNode,h=e.childrenColumnName,p=C.exports.useContext(JA),g=p.onColumnResize,b=C.exports.useContext(ys),w=b.prefixCls,P=b.getComponent,I=C.exports.useContext(H0),A=I.flattenColumns,O=UQ(t,h,i,n),M=C.exports.useRef({renderWithProps:!1}),R=C.exports.useState(-1),N=ze(R,2),z=N[0],B=N[1],U=C.exports.useState(-1),q=ze(U,2),H=q[0],te=q[1],Y=C.exports.useCallback(function(J,Z){B(J),te(Z)},[]),le=C.exports.useMemo(function(){var J=P(["body","wrapper"],"tbody"),Z=P(["body","row"],"tr"),Q=P(["body","cell"],"td"),ge;t.length?ge=O.map(function(de,oe){var ye=de.record,Re=de.indent,Te=de.index,ke=n(ye,oe);return E(eO,{rowKey:ke,record:ye,recordKey:ke,index:oe,renderIndex:Te,rowComponent:Z,cellComponent:Q,expandedKeys:i,onRow:l,getRowKey:n,rowExpandable:c,childrenColumnName:h,indent:Re},ke)}):ge=E(QA,{expanded:!0,className:"".concat(w,"-placeholder"),prefixCls:w,component:Z,cellComponent:Q,colSpan:A.length,isEmpty:!0,children:o});var re=K0(A);return Qe(J,{className:"".concat(w,"-tbody"),children:[r&&E(KQ,{prefixCls:w,columnsKey:re,onColumnResize:g}),ge]})},[t,w,l,r,i,n,P,o,A,h,g,c,O]);return E(qA.Provider,{value:M.current,children:E(GA.Provider,{value:{startRow:z,endRow:H,onHover:Y},children:le})})}var nO=C.exports.memo(HQ);nO.displayName="Body";var WQ=["expandable"],ip="RC_TABLE_INTERNAL_COL_DEFINE";function GQ(e){var t=e.expandable,n=In(e,WQ),r;return"expandable"in e?r=ve(ve({},n),t):r=n,r.showExpandColumn===!1&&(r.expandIconColumnIndex=-1),r}var Xu={},qQ=["children"],ZQ=["fixed"];function R4(e){return Xi(e).filter(function(t){return C.exports.isValidElement(t)}).map(function(t){var n=t.key,r=t.props,i=r.children,l=In(r,qQ),c=ve({key:n},l);return i&&(c.children=R4(i)),c})}function K2(e){return e.reduce(function(t,n){var r=n.fixed,i=r===!0?"left":r,l=n.children;return l&&l.length>0?[].concat(wt(t),wt(K2(l).map(function(c){return ve({fixed:i},c)}))):[].concat(wt(t),[ve(ve({},n),{},{fixed:i})])},[])}function XQ(e){return e.map(function(t){var n=t.fixed,r=In(t,ZQ),i=n;return n==="left"?i="right":n==="right"&&(i="left"),ve({fixed:i},r)})}function YQ(e,t){var n=e.prefixCls,r=e.columns,i=e.children,l=e.expandable,c=e.expandedKeys,o=e.columnTitle,h=e.getRowKey,p=e.onTriggerExpand,g=e.expandIcon,b=e.rowExpandable,w=e.expandIconColumnIndex,P=e.direction,I=e.expandRowByClick,A=e.columnWidth,O=e.fixed,M=C.exports.useMemo(function(){return r||R4(i)},[r,i]),R=C.exports.useMemo(function(){if(l){var B,U=M.slice();if(!U.includes(Xu)){var q=w||0;q>=0&&U.splice(q,0,Xu)}var H=U.indexOf(Xu);U=U.filter(function(J,Z){return J!==Xu||Z===H});var te=M[H],Y;(O==="left"||O)&&!w?Y="left":(O==="right"||O)&&w===M.length?Y="right":Y=te?te.fixed:null;var le=(B={},se(B,ip,{className:"".concat(n,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),se(B,"title",o),se(B,"fixed",Y),se(B,"className","".concat(n,"-row-expand-icon-cell")),se(B,"width",A),se(B,"render",function(Z,Q,ge){var re=h(Q,ge),de=c.has(re),oe=b?b(Q):!0,ye=g({prefixCls:n,expanded:de,expandable:oe,record:Q,onExpand:p});return I?E("span",{onClick:function(Te){return Te.stopPropagation()},children:ye}):ye}),B);return U.map(function(J){return J===Xu?le:J})}return M.filter(function(J){return J!==Xu})},[l,M,h,c,g,P]),N=C.exports.useMemo(function(){var B=R;return t&&(B=t(B)),B.length||(B=[{render:function(){return null}}]),B},[t,R,P]),z=C.exports.useMemo(function(){return P==="rtl"?XQ(K2(N)):K2(N)},[N,P]);return[N,z]}function rO(e){var t=C.exports.useRef(e),n=C.exports.useState({}),r=ze(n,2),i=r[1],l=C.exports.useRef(null),c=C.exports.useRef([]);function o(h){c.current.push(h);var p=Promise.resolve();l.current=p,p.then(function(){if(l.current===p){var g=c.current,b=t.current;c.current=[],g.forEach(function(w){t.current=w(t.current)}),l.current=null,b!==t.current&&i({})}})}return C.exports.useEffect(function(){return function(){l.current=null}},[]),[t.current,o]}function QQ(e){var t=C.exports.useRef(e||null),n=C.exports.useRef();function r(){window.clearTimeout(n.current)}function i(c){t.current=c,r(),n.current=window.setTimeout(function(){t.current=null,n.current=void 0},100)}function l(){return t.current}return C.exports.useEffect(function(){return r},[]),[i,l]}function JQ(e,t,n){var r=C.exports.useMemo(function(){for(var i=[],l=[],c=0,o=0,h=0;h<t;h+=1)if(n==="rtl"){l[h]=o,o+=e[h]||0;var p=t-h-1;i[p]=c,c+=e[p]||0}else{i[h]=c,c+=e[h]||0;var g=t-h-1;l[g]=o,o+=e[g]||0}return{left:i,right:l}},[e,t,n]);return r}var eJ=["columnType"];function iO(e){for(var t=e.colWidths,n=e.columns,r=e.columCount,i=[],l=r||n.length,c=!1,o=l-1;o>=0;o-=1){var h=t[o],p=n&&n[o],g=p&&p[ip];if(h||g||c){var b=g||{};b.columnType;var w=In(b,eJ);i.unshift(E("col",{style:{width:h},...w},o)),c=!0}}return E("colgroup",{children:i})}function pk(e){var t=e.className,n=e.children;return E("div",{className:t,children:n})}var oO=C.exports.createContext({});function tJ(e){var t=e.className,n=e.index,r=e.children,i=e.colSpan,l=i===void 0?1:i,c=e.rowSpan,o=e.align,h=C.exports.useContext(ys),p=h.prefixCls,g=h.direction,b=C.exports.useContext(oO),w=b.scrollColumnIndex,P=b.stickyOffsets,I=b.flattenColumns,A=n+l-1,O=A+1===w?l+1:l,M=M4(n,n+O-1,I,P,g);return E(am,{className:t,index:n,component:"td",prefixCls:p,record:null,dataIndex:null,align:o,colSpan:O,rowSpan:c,render:function(){return r},...M})}var nJ=["children"];function rJ(e){var t=e.children,n=In(e,nJ);return E("tr",{...n,children:t})}function W0(e){var t=e.children;return t}W0.Row=rJ;W0.Cell=tJ;function eg(e){var t=e.children,n=e.stickyOffsets,r=e.flattenColumns,i=C.exports.useContext(ys),l=i.prefixCls,c=r.length-1,o=r[c],h=C.exports.useMemo(function(){return{stickyOffsets:n,flattenColumns:r,scrollColumnIndex:o!=null&&o.scrollbar?c:null}},[o,r,c,n]);return E(oO.Provider,{value:h,children:E("tfoot",{className:"".concat(l,"-summary"),children:t})})}var aO=W0;function iJ(e){var t,n=e.prefixCls,r=e.record,i=e.onExpand,l=e.expanded,c=e.expandable,o="".concat(n,"-row-expand-icon");if(!c)return E("span",{className:Ye(o,"".concat(n,"-row-spaced"))});var h=function(g){i(r,g),g.stopPropagation()};return E("span",{className:Ye(o,(t={},se(t,"".concat(n,"-row-expanded"),l),se(t,"".concat(n,"-row-collapsed"),!l),t)),onClick:h})}function oJ(e,t,n){var r=[];function i(l){(l||[]).forEach(function(c,o){r.push(t(c,o)),i(c[n])})}return i(e),r}var aJ=function(t,n){var r,i,l=t.scrollBodyRef,c=t.onScroll,o=t.offsetScroll,h=t.container,p=C.exports.useContext(ys),g=p.prefixCls,b=((r=l.current)===null||r===void 0?void 0:r.scrollWidth)||0,w=((i=l.current)===null||i===void 0?void 0:i.clientWidth)||0,P=b&&w*(w/b),I=C.exports.useRef(),A=rO({scrollLeft:0,isHiddenScrollBar:!1}),O=ze(A,2),M=O[0],R=O[1],N=C.exports.useRef({delta:0,x:0}),z=C.exports.useState(!1),B=ze(z,2),U=B[0],q=B[1],H=function(){q(!1)},te=function(Q){Q.persist(),N.current.delta=Q.pageX-M.scrollLeft,N.current.x=0,q(!0),Q.preventDefault()},Y=function(Q){var ge,re=Q||((ge=window)===null||ge===void 0?void 0:ge.event),de=re.buttons;if(!U||de===0){U&&q(!1);return}var oe=N.current.x+Q.pageX-N.current.x-N.current.delta;oe<=0&&(oe=0),oe+P>=w&&(oe=w-P),c({scrollLeft:oe/w*(b+2)}),N.current.x=Q.pageX},le=function(){if(!!l.current){var Q=J5(l.current).top,ge=Q+l.current.offsetHeight,re=h===window?document.documentElement.scrollTop+window.innerHeight:J5(h).top+h.clientHeight;ge-Iy()<=re||Q>=re-o?R(function(de){return ve(ve({},de),{},{isHiddenScrollBar:!0})}):R(function(de){return ve(ve({},de),{},{isHiddenScrollBar:!1})})}},J=function(Q){R(function(ge){return ve(ve({},ge),{},{scrollLeft:Q/b*w||0})})};return C.exports.useImperativeHandle(n,function(){return{setScrollLeft:J}}),C.exports.useEffect(function(){var Z=Hs(document.body,"mouseup",H,!1),Q=Hs(document.body,"mousemove",Y,!1);return le(),function(){Z.remove(),Q.remove()}},[P,U]),C.exports.useEffect(function(){var Z=Hs(h,"scroll",le,!1),Q=Hs(window,"resize",le,!1);return function(){Z.remove(),Q.remove()}},[h]),C.exports.useEffect(function(){M.isHiddenScrollBar||R(function(Z){var Q=l.current;return Q?ve(ve({},Z),{},{scrollLeft:Q.scrollLeft/Q.scrollWidth*Q.clientWidth}):Z})},[M.isHiddenScrollBar]),b<=w||!P||M.isHiddenScrollBar?null:E("div",{style:{height:Iy(),width:w,bottom:o},className:"".concat(g,"-sticky-scroll"),children:E("div",{onMouseDown:te,ref:I,className:Ye("".concat(g,"-sticky-scroll-bar"),se({},"".concat(g,"-sticky-scroll-bar-active"),U)),style:{width:"".concat(P,"px"),transform:"translate3d(".concat(M.scrollLeft,"px, 0, 0)")}})})};const sJ=C.exports.forwardRef(aJ);var mk=wo()?window:null;function lJ(e,t){var n=sn(e)==="object"?e:{},r=n.offsetHeader,i=r===void 0?0:r,l=n.offsetSummary,c=l===void 0?0:l,o=n.offsetScroll,h=o===void 0?0:o,p=n.getContainer,g=p===void 0?function(){return mk}:p,b=g()||mk;return C.exports.useMemo(function(){var w=!!e;return{isSticky:w,stickyClassName:w?"".concat(t,"-sticky-holder"):"",offsetHeader:i,offsetSummary:c,offsetScroll:h,container:b}},[h,i,c,t,b])}var uJ=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function cJ(e,t){return C.exports.useMemo(function(){for(var n=[],r=0;r<t;r+=1){var i=e[r];if(i!==void 0)n[r]=i;else return null}return n},[e.join("_"),t])}var H2=C.exports.forwardRef(function(e,t){var n=e.className,r=e.noData,i=e.columns,l=e.flattenColumns,c=e.colWidths,o=e.columCount,h=e.stickyOffsets,p=e.direction,g=e.fixHeader,b=e.stickyTopOffset,w=e.stickyBottomOffset,P=e.stickyClassName,I=e.onScroll,A=e.maxContentScroll,O=e.children,M=In(e,uJ),R=C.exports.useContext(ys),N=R.prefixCls,z=R.scrollbarSize,B=R.isSticky,U=B&&!g?0:z,q=C.exports.useRef(null),H=C.exports.useCallback(function(re){uy(t,re),uy(q,re)},[]);C.exports.useEffect(function(){var re;function de(oe){var ye=oe.currentTarget,Re=oe.deltaX;Re&&(I({currentTarget:ye,scrollLeft:ye.scrollLeft+Re}),oe.preventDefault())}return(re=q.current)===null||re===void 0||re.addEventListener("wheel",de),function(){var oe;(oe=q.current)===null||oe===void 0||oe.removeEventListener("wheel",de)}},[]);var te=C.exports.useMemo(function(){return l.every(function(re){return re.width>=0})},[l]),Y=l[l.length-1],le={fixed:Y?Y.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(N,"-cell-scrollbar")}}},J=C.exports.useMemo(function(){return U?[].concat(wt(i),[le]):i},[U,i]),Z=C.exports.useMemo(function(){return U?[].concat(wt(l),[le]):l},[U,l]),Q=C.exports.useMemo(function(){var re=h.right,de=h.left;return ve(ve({},h),{},{left:p==="rtl"?[].concat(wt(de.map(function(oe){return oe+U})),[0]):de,right:p==="rtl"?re:[].concat(wt(re.map(function(oe){return oe+U})),[0]),isSticky:B})},[U,h,B]),ge=cJ(c,o);return E("div",{style:ve({overflow:"hidden"},B?{top:b,bottom:w}:{}),ref:H,className:Ye(n,se({},P,!!P)),children:Qe("table",{style:{tableLayout:"fixed",visibility:r||ge?null:"hidden"},children:[(!r||!A||te)&&E(iO,{colWidths:ge?[].concat(wt(ge),[U]):[],columCount:o+1,columns:Z}),O(ve(ve({},M),{},{stickyOffsets:Q,columns:J,flattenColumns:Z}))]})})});H2.displayName="FixedHolder";var dJ=[],fJ={},Pg="rc-table-internal-hook",hJ=C.exports.memo(function(e){var t=e.children;return t},function(e,t){return gc(e.props,t.props)?e.pingLeft!==t.pingLeft||e.pingRight!==t.pingRight:!1});function Pc(e){var t,n=e.prefixCls,r=e.className,i=e.rowClassName,l=e.style,c=e.data,o=e.rowKey,h=e.scroll,p=e.tableLayout,g=e.direction,b=e.title,w=e.footer,P=e.summary,I=e.id,A=e.showHeader,O=e.components,M=e.emptyText,R=e.onRow,N=e.onHeaderRow,z=e.internalHooks,B=e.transformColumns,U=e.internalRefs,q=e.sticky,H=c||dJ,te=!!H.length,Y=C.exports.useCallback(function(zn,Zn){return HA(O||{},zn)||Zn},[O]),le=C.exports.useMemo(function(){return typeof o=="function"?o:function(zn){var Zn=zn&&zn[o];return Zn}},[o]),J=GQ(e),Z=J.expandIcon,Q=J.expandedRowKeys,ge=J.defaultExpandedRowKeys,re=J.defaultExpandAllRows,de=J.expandedRowRender,oe=J.columnTitle,ye=J.onExpand,Re=J.onExpandedRowsChange,Te=J.expandRowByClick,ke=J.rowExpandable,De=J.expandIconColumnIndex,Me=J.expandedRowClassName,Ne=J.childrenColumnName,Le=J.indentSize,Ve=Z||iJ,qe=Ne||"children",Ue=C.exports.useMemo(function(){return de?"row":e.expandable&&z===Pg&&e.expandable.__PARENT_RENDER_ICON__||H.some(function(zn){return zn&&sn(zn)==="object"&&zn[qe]})?"nest":!1},[!!de,H]),ct=C.exports.useState(function(){return ge||(re?oJ(H,le,qe):[])}),pt=ze(ct,2),Tt=pt[0],Xe=pt[1],Pt=C.exports.useMemo(function(){return new Set(Q||Tt||[])},[Q,Tt]),mt=C.exports.useCallback(function(zn){var Zn=le(zn,H.indexOf(zn)),Ir,ki=Pt.has(Zn);ki?(Pt.delete(Zn),Ir=wt(Pt)):Ir=[].concat(wt(Pt),[Zn]),Xe(Ir),ye&&ye(!ki,zn),Re&&Re(Ir)},[le,Pt,H,ye,Re]),Mt=C.exports.useState(0),Ct=ze(Mt,2),Lt=Ct[0],lt=Ct[1],dt=YQ(ve(ve(ve({},e),J),{},{expandable:!!de,columnTitle:oe,expandedKeys:Pt,getRowKey:le,onTriggerExpand:mt,expandIcon:Ve,expandIconColumnIndex:De,direction:g}),z===Pg?B:null),ut=ze(dt,2),it=ut[0],ft=ut[1],xt=C.exports.useMemo(function(){return{columns:it,flattenColumns:ft}},[it,ft]),Wt=C.exports.useRef(),Ut=C.exports.useRef(),Qt=C.exports.useRef(),Fe=C.exports.useRef(),Ge=C.exports.useRef(),Xt=C.exports.useState(!1),dn=ze(Xt,2),Vt=dn[0],jt=dn[1],nn=C.exports.useState(!1),_n=ze(nn,2),An=_n[0],_t=_n[1],Gt=rO(new Map),an=ze(Gt,2),Fn=an[0],kn=an[1],zt=K0(ft),Tn=zt.map(function(zn){return Fn.get(zn)}),Cn=C.exports.useMemo(function(){return Tn},[Tn.join("_")]),hn=JQ(Cn,ft.length,g),Nt=h&&j2(h.y),ot=h&&j2(h.x)||Boolean(J.fixed),ht=ot&&ft.some(function(zn){var Zn=zn.fixed;return Zn}),At=C.exports.useRef(),$t=lJ(q,n),cn=$t.isSticky,Mn=$t.offsetHeader,Gn=$t.offsetSummary,qn=$t.offsetScroll,me=$t.stickyClassName,K=$t.container,G=P==null?void 0:P(H),ce=(Nt||cn)&&C.exports.isValidElement(G)&&G.type===W0&&G.props.fixed,ae,xe,Ee;Nt&&(xe={overflowY:"scroll",maxHeight:h.y}),ot&&(ae={overflowX:"auto"},Nt||(xe={overflowY:"hidden"}),Ee={width:(h==null?void 0:h.x)===!0?"auto":h==null?void 0:h.x,minWidth:"100%"});var be=C.exports.useCallback(function(zn,Zn){t4(Wt.current)&&kn(function(Ir){if(Ir.get(zn)!==Zn){var ki=new Map(Ir);return ki.set(zn,Zn),ki}return Ir})},[]),Ce=QQ(null),Oe=ze(Ce,2),He=Oe[0],We=Oe[1];function Be(zn,Zn){!Zn||(typeof Zn=="function"?Zn(zn):Zn.scrollLeft!==zn&&(Zn.scrollLeft=zn))}var Ot=function(Zn){var Ir=Zn.currentTarget,ki=Zn.scrollLeft,Ga=g==="rtl",Eo=typeof ki=="number"?ki:Ir.scrollLeft,_s=Ir||fJ;if(!We()||We()===_s){var ka;He(_s),Be(Eo,Ut.current),Be(Eo,Qt.current),Be(Eo,Ge.current),Be(Eo,(ka=At.current)===null||ka===void 0?void 0:ka.setScrollLeft)}if(Ir){var gr=Ir.scrollWidth,Ta=Ir.clientWidth;if(gr===Ta){jt(!1),_t(!1);return}Ga?(jt(-Eo<gr-Ta),_t(-Eo>0)):(jt(Eo>0),_t(Eo<gr-Ta))}},bt=function(){ot&&Qt.current?Ot({currentTarget:Qt.current}):(jt(!1),_t(!1))},Je=function(Zn){var Ir=Zn.width;Ir!==Lt&&(bt(),lt(Wt.current?Wt.current.offsetWidth:Ir))},Rt=C.exports.useRef(!1);C.exports.useEffect(function(){Rt.current&&bt()},[ot,c,it.length]),C.exports.useEffect(function(){Rt.current=!0},[]);var Bt=C.exports.useState(0),gn=ze(Bt,2),on=gn[0],yn=gn[1],Bn=C.exports.useState(!0),Jn=ze(Bn,2),Dr=Jn[0],or=Jn[1];C.exports.useEffect(function(){Qt.current instanceof Element?yn(j5(Qt.current).width):yn(j5(Fe.current).width),or(F2("position","sticky"))},[]),C.exports.useEffect(function(){z===Pg&&U&&(U.body.current=Qt.current)});var Pr=Y(["table"],"table"),Pn=C.exports.useMemo(function(){return p||(ht?(h==null?void 0:h.x)==="max-content"?"auto":"fixed":Nt||cn||ft.some(function(zn){var Zn=zn.ellipsis;return Zn})?"fixed":"auto")},[Nt,ht,ft,p,cn]),Sn,Rn={colWidths:Cn,columCount:ft.length,stickyOffsets:hn,onHeaderRow:N,fixHeader:Nt,scroll:h},Wr=C.exports.useMemo(function(){return te?null:typeof M=="function"?M():M},[te,M]),vr=E(nO,{data:H,measureColumnWidth:Nt||ot||cn,expandedKeys:Pt,rowExpandable:ke,getRowKey:le,onRow:R,emptyNode:Wr,childrenColumnName:qe}),jn=E(iO,{colWidths:ft.map(function(zn){var Zn=zn.width;return Zn}),columns:ft}),Ln=Y(["body"]);if(Nt||cn){var Yn;typeof Ln=="function"?(Yn=Ln(H,{scrollbarSize:on,ref:Qt,onScroll:Ot}),Rn.colWidths=ft.map(function(zn,Zn){var Ir=zn.width,ki=Zn===it.length-1?Ir-on:Ir;return typeof ki=="number"&&!Number.isNaN(ki)?ki:(Nr(!1,"When use `components.body` with render props. Each column should have a fixed `width` value."),0)})):Yn=E("div",{style:ve(ve({},ae),xe),onScroll:Ot,ref:Qt,className:Ye("".concat(n,"-body")),children:Qe(Pr,{style:ve(ve({},Ee),{},{tableLayout:Pn}),children:[jn,vr,!ce&&G&&E(eg,{stickyOffsets:hn,flattenColumns:ft,children:G})]})});var xr=ve(ve(ve({noData:!H.length,maxContentScroll:ot&&h.x==="max-content"},Rn),xt),{},{direction:g,stickyClassName:me,onScroll:Ot});Sn=Qe($n,{children:[A!==!1&&E(H2,{...xr,stickyTopOffset:Mn,className:"".concat(n,"-header"),ref:Ut,children:function(zn){return Qe($n,{children:[E(hk,{...zn}),ce==="top"&&E(eg,{...zn,children:G})]})}}),Yn,ce&&ce!=="top"&&E(H2,{...xr,stickyBottomOffset:Gn,className:"".concat(n,"-summary"),ref:Ge,children:function(zn){return E(eg,{...zn,children:G})}}),cn&&E(sJ,{ref:At,offsetScroll:qn,scrollBodyRef:Qt,onScroll:Ot,container:K})]})}else Sn=E("div",{style:ve(ve({},ae),xe),className:Ye("".concat(n,"-content")),onScroll:Ot,ref:Qt,children:Qe(Pr,{style:ve(ve({},Ee),{},{tableLayout:Pn}),children:[jn,A!==!1&&E(hk,{...Rn,...xt}),vr,G&&E(eg,{stickyOffsets:hn,flattenColumns:ft,children:G})]})});var br=au(e,{aria:!0,data:!0}),Lr=E("div",{className:Ye(n,r,(t={},se(t,"".concat(n,"-rtl"),g==="rtl"),se(t,"".concat(n,"-ping-left"),Vt),se(t,"".concat(n,"-ping-right"),An),se(t,"".concat(n,"-layout-fixed"),p==="fixed"),se(t,"".concat(n,"-fixed-header"),Nt),se(t,"".concat(n,"-fixed-column"),ht),se(t,"".concat(n,"-scroll-horizontal"),ot),se(t,"".concat(n,"-has-fix-left"),ft[0]&&ft[0].fixed),se(t,"".concat(n,"-has-fix-right"),ft[ft.length-1]&&ft[ft.length-1].fixed==="right"),t)),style:l,id:I,ref:Wt,...br,children:Qe(hJ,{pingLeft:Vt,pingRight:An,props:ve(ve({},e),{},{stickyOffsets:hn,mergedExpandedKeys:Pt}),children:[b&&E(pk,{className:"".concat(n,"-title"),children:b(H)}),E("div",{ref:Fe,className:"".concat(n,"-container"),children:Sn}),w&&E(pk,{className:"".concat(n,"-footer"),children:w(H)})]})});ot&&(Lr=E(ol,{onResize:Je,children:Lr}));var so=C.exports.useMemo(function(){return{prefixCls:n,getComponent:Y,scrollbarSize:on,direction:g,fixedInfoList:ft.map(function(zn,Zn){return M4(Zn,Zn,ft,hn,g)}),isSticky:cn}},[n,Y,on,g,ft,hn,cn]),cl=C.exports.useMemo(function(){return ve(ve({},xt),{},{tableLayout:Pn,rowClassName:i,expandedRowClassName:Me,expandIcon:Ve,expandableType:Ue,expandRowByClick:Te,expandedRowRender:de,onTriggerExpand:mt,expandIconColumnIndex:De,indentSize:Le,allColumnsFixedLeft:xt.flattenColumns.every(function(zn){return zn.fixed==="left"})})},[xt,Pn,i,Me,Ve,Ue,Te,de,mt,De,Le]),Ac=C.exports.useMemo(function(){return{componentWidth:Lt,fixHeader:Nt,fixColumn:ht,horizonScroll:ot}},[Lt,Nt,ht,ot]),Ea=C.exports.useMemo(function(){return{onColumnResize:be}},[be]);return E(WA.Provider,{value:Dr,children:E(ys.Provider,{value:so,children:E(H0.Provider,{value:cl,children:E(YA.Provider,{value:Ac,children:E(JA.Provider,{value:Ea,children:Lr})})})})})}Pc.EXPAND_COLUMN=Xu;Pc.Column=IQ;Pc.ColumnGroup=PQ;Pc.Summary=aO;Pc.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};function pJ(e){return null}function mJ(e){return null}function vJ(e){return function(n){var r,i=n.prefixCls,l=n.onExpand,c=n.record,o=n.expanded,h=n.expandable,p="".concat(i,"-row-expand-icon");return E("button",{type:"button",onClick:function(b){l(c,b),b.stopPropagation()},className:Ye(p,(r={},se(r,"".concat(p,"-spaced"),!h),se(r,"".concat(p,"-expanded"),h&&o),se(r,"".concat(p,"-collapsed"),h&&!o),r)),"aria-label":o?e.collapse:e.expand,"aria-expanded":o})}}function Yd(e,t){return"key"in e&&e.key!==void 0&&e.key!==null?e.key:e.dataIndex?Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex:t}function G0(e,t){return t?"".concat(t,"-").concat(e):"".concat(e)}function q0(e,t){return typeof e=="function"?e(t):e}function gJ(e,t){var n=q0(e,t);return Object.prototype.toString.call(n)==="[object Object]"?"":n}var yJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"};const xJ=yJ;var sO=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:xJ})})};sO.displayName="FilterFilled";const _J=C.exports.forwardRef(sO);function bJ(){this.__data__=[],this.size=0}var wJ=bJ;function CJ(e,t){return e===t||e!==e&&t!==t}var lO=CJ,SJ=lO;function EJ(e,t){for(var n=e.length;n--;)if(SJ(e[n][0],t))return n;return-1}var Z0=EJ,kJ=Z0,TJ=Array.prototype,PJ=TJ.splice;function IJ(e){var t=this.__data__,n=kJ(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():PJ.call(t,n,1),--this.size,!0}var MJ=IJ,RJ=Z0;function AJ(e){var t=this.__data__,n=RJ(t,e);return n<0?void 0:t[n][1]}var OJ=AJ,NJ=Z0;function DJ(e){return NJ(this.__data__,e)>-1}var LJ=DJ,zJ=Z0;function FJ(e,t){var n=this.__data__,r=zJ(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var $J=FJ,BJ=wJ,VJ=MJ,UJ=OJ,jJ=LJ,KJ=$J;function pf(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}pf.prototype.clear=BJ;pf.prototype.delete=VJ;pf.prototype.get=UJ;pf.prototype.has=jJ;pf.prototype.set=KJ;var X0=pf,HJ=X0;function WJ(){this.__data__=new HJ,this.size=0}var GJ=WJ;function qJ(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var ZJ=qJ;function XJ(e){return this.__data__.get(e)}var YJ=XJ;function QJ(e){return this.__data__.has(e)}var JJ=QJ,eee=Jp,tee=B0,nee="[object AsyncFunction]",ree="[object Function]",iee="[object GeneratorFunction]",oee="[object Proxy]";function aee(e){if(!tee(e))return!1;var t=eee(e);return t==ree||t==iee||t==nee||t==oee}var uO=aee,see=vs,lee=see["__core-js_shared__"],uee=lee,P_=uee,vk=function(){var e=/[^.]+$/.exec(P_&&P_.keys&&P_.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function cee(e){return!!vk&&vk in e}var dee=cee,fee=Function.prototype,hee=fee.toString;function pee(e){if(e!=null){try{return hee.call(e)}catch{}try{return e+""}catch{}}return""}var cO=pee,mee=uO,vee=dee,gee=B0,yee=cO,xee=/[\\^$.*+?()[\]{}|]/g,_ee=/^\[object .+?Constructor\]$/,bee=Function.prototype,wee=Object.prototype,Cee=bee.toString,See=wee.hasOwnProperty,Eee=RegExp("^"+Cee.call(See).replace(xee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function kee(e){if(!gee(e)||vee(e))return!1;var t=mee(e)?Eee:_ee;return t.test(yee(e))}var Tee=kee;function Pee(e,t){return e==null?void 0:e[t]}var Iee=Pee,Mee=Tee,Ree=Iee;function Aee(e,t){var n=Ree(e,t);return Mee(n)?n:void 0}var mf=Aee,Oee=mf,Nee=vs,Dee=Oee(Nee,"Map"),A4=Dee,Lee=mf,zee=Lee(Object,"create"),Y0=zee,gk=Y0;function Fee(){this.__data__=gk?gk(null):{},this.size=0}var $ee=Fee;function Bee(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Vee=Bee,Uee=Y0,jee="__lodash_hash_undefined__",Kee=Object.prototype,Hee=Kee.hasOwnProperty;function Wee(e){var t=this.__data__;if(Uee){var n=t[e];return n===jee?void 0:n}return Hee.call(t,e)?t[e]:void 0}var Gee=Wee,qee=Y0,Zee=Object.prototype,Xee=Zee.hasOwnProperty;function Yee(e){var t=this.__data__;return qee?t[e]!==void 0:Xee.call(t,e)}var Qee=Yee,Jee=Y0,ete="__lodash_hash_undefined__";function tte(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Jee&&t===void 0?ete:t,this}var nte=tte,rte=$ee,ite=Vee,ote=Gee,ate=Qee,ste=nte;function vf(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}vf.prototype.clear=rte;vf.prototype.delete=ite;vf.prototype.get=ote;vf.prototype.has=ate;vf.prototype.set=ste;var lte=vf,yk=lte,ute=X0,cte=A4;function dte(){this.size=0,this.__data__={hash:new yk,map:new(cte||ute),string:new yk}}var fte=dte;function hte(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var pte=hte,mte=pte;function vte(e,t){var n=e.__data__;return mte(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Q0=vte,gte=Q0;function yte(e){var t=gte(this,e).delete(e);return this.size-=t?1:0,t}var xte=yte,_te=Q0;function bte(e){return _te(this,e).get(e)}var wte=bte,Cte=Q0;function Ste(e){return Cte(this,e).has(e)}var Ete=Ste,kte=Q0;function Tte(e,t){var n=kte(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var Pte=Tte,Ite=fte,Mte=xte,Rte=wte,Ate=Ete,Ote=Pte;function gf(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}gf.prototype.clear=Ite;gf.prototype.delete=Mte;gf.prototype.get=Rte;gf.prototype.has=Ate;gf.prototype.set=Ote;var dO=gf,Nte=X0,Dte=A4,Lte=dO,zte=200;function Fte(e,t){var n=this.__data__;if(n instanceof Nte){var r=n.__data__;if(!Dte||r.length<zte-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Lte(r)}return n.set(e,t),this.size=n.size,this}var $te=Fte,Bte=X0,Vte=GJ,Ute=ZJ,jte=YJ,Kte=JJ,Hte=$te;function yf(e){var t=this.__data__=new Bte(e);this.size=t.size}yf.prototype.clear=Vte;yf.prototype.delete=Ute;yf.prototype.get=jte;yf.prototype.has=Kte;yf.prototype.set=Hte;var Wte=yf,Gte="__lodash_hash_undefined__";function qte(e){return this.__data__.set(e,Gte),this}var Zte=qte;function Xte(e){return this.__data__.has(e)}var Yte=Xte,Qte=dO,Jte=Zte,ene=Yte;function Ry(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Qte;++t<n;)this.add(e[t])}Ry.prototype.add=Ry.prototype.push=Jte;Ry.prototype.has=ene;var tne=Ry;function nne(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var rne=nne;function ine(e,t){return e.has(t)}var one=ine,ane=tne,sne=rne,lne=one,une=1,cne=2;function dne(e,t,n,r,i,l){var c=n&une,o=e.length,h=t.length;if(o!=h&&!(c&&h>o))return!1;var p=l.get(e),g=l.get(t);if(p&&g)return p==t&&g==e;var b=-1,w=!0,P=n&cne?new ane:void 0;for(l.set(e,t),l.set(t,e);++b<o;){var I=e[b],A=t[b];if(r)var O=c?r(A,I,b,t,e,l):r(I,A,b,e,t,l);if(O!==void 0){if(O)continue;w=!1;break}if(P){if(!sne(t,function(M,R){if(!lne(P,R)&&(I===M||i(I,M,n,r,l)))return P.push(R)})){w=!1;break}}else if(!(I===A||i(I,A,n,r,l))){w=!1;break}}return l.delete(e),l.delete(t),w}var fO=dne,fne=vs,hne=fne.Uint8Array,pne=hne;function mne(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}var vne=mne;function gne(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var yne=gne,xk=b4,_k=pne,xne=lO,_ne=fO,bne=vne,wne=yne,Cne=1,Sne=2,Ene="[object Boolean]",kne="[object Date]",Tne="[object Error]",Pne="[object Map]",Ine="[object Number]",Mne="[object RegExp]",Rne="[object Set]",Ane="[object String]",One="[object Symbol]",Nne="[object ArrayBuffer]",Dne="[object DataView]",bk=xk?xk.prototype:void 0,I_=bk?bk.valueOf:void 0;function Lne(e,t,n,r,i,l,c){switch(n){case Dne:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Nne:return!(e.byteLength!=t.byteLength||!l(new _k(e),new _k(t)));case Ene:case kne:case Ine:return xne(+e,+t);case Tne:return e.name==t.name&&e.message==t.message;case Mne:case Ane:return e==t+"";case Pne:var o=bne;case Rne:var h=r&Cne;if(o||(o=wne),e.size!=t.size&&!h)return!1;var p=c.get(e);if(p)return p==t;r|=Sne,c.set(e,t);var g=_ne(o(e),o(t),r,i,l,c);return c.delete(e),g;case One:if(I_)return I_.call(e)==I_.call(t)}return!1}var zne=Lne;function Fne(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var $ne=Fne,Bne=$ne,Vne=w4;function Une(e,t,n){var r=t(e);return Vne(e)?r:Bne(r,n(e))}var jne=Une;function Kne(e,t){for(var n=-1,r=e==null?0:e.length,i=0,l=[];++n<r;){var c=e[n];t(c,n,e)&&(l[i++]=c)}return l}var Hne=Kne;function Wne(){return[]}var Gne=Wne,qne=Hne,Zne=Gne,Xne=Object.prototype,Yne=Xne.propertyIsEnumerable,wk=Object.getOwnPropertySymbols,Qne=wk?function(e){return e==null?[]:(e=Object(e),qne(wk(e),function(t){return Yne.call(e,t)}))}:Zne,Jne=Qne;function ere(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var tre=ere,nre=Jp,rre=em,ire="[object Arguments]";function ore(e){return rre(e)&&nre(e)==ire}var are=ore,Ck=are,sre=em,hO=Object.prototype,lre=hO.hasOwnProperty,ure=hO.propertyIsEnumerable,cre=Ck(function(){return arguments}())?Ck:function(e){return sre(e)&&lre.call(e,"callee")&&!ure.call(e,"callee")},dre=cre,Ay={exports:{}};function fre(){return!1}var hre=fre;(function(e,t){var n=vs,r=hre,i=t&&!t.nodeType&&t,l=i&&!0&&e&&!e.nodeType&&e,c=l&&l.exports===i,o=c?n.Buffer:void 0,h=o?o.isBuffer:void 0,p=h||r;e.exports=p})(Ay,Ay.exports);var pre=9007199254740991,mre=/^(?:0|[1-9]\d*)$/;function vre(e,t){var n=typeof e;return t=t==null?pre:t,!!t&&(n=="number"||n!="symbol"&&mre.test(e))&&e>-1&&e%1==0&&e<t}var gre=vre,yre=9007199254740991;function xre(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=yre}var pO=xre,_re=Jp,bre=pO,wre=em,Cre="[object Arguments]",Sre="[object Array]",Ere="[object Boolean]",kre="[object Date]",Tre="[object Error]",Pre="[object Function]",Ire="[object Map]",Mre="[object Number]",Rre="[object Object]",Are="[object RegExp]",Ore="[object Set]",Nre="[object String]",Dre="[object WeakMap]",Lre="[object ArrayBuffer]",zre="[object DataView]",Fre="[object Float32Array]",$re="[object Float64Array]",Bre="[object Int8Array]",Vre="[object Int16Array]",Ure="[object Int32Array]",jre="[object Uint8Array]",Kre="[object Uint8ClampedArray]",Hre="[object Uint16Array]",Wre="[object Uint32Array]",Ur={};Ur[Fre]=Ur[$re]=Ur[Bre]=Ur[Vre]=Ur[Ure]=Ur[jre]=Ur[Kre]=Ur[Hre]=Ur[Wre]=!0;Ur[Cre]=Ur[Sre]=Ur[Lre]=Ur[Ere]=Ur[zre]=Ur[kre]=Ur[Tre]=Ur[Pre]=Ur[Ire]=Ur[Mre]=Ur[Rre]=Ur[Are]=Ur[Ore]=Ur[Nre]=Ur[Dre]=!1;function Gre(e){return wre(e)&&bre(e.length)&&!!Ur[_re(e)]}var qre=Gre;function Zre(e){return function(t){return e(t)}}var Xre=Zre,W2={exports:{}};(function(e,t){var n=Y7,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,l=i&&i.exports===r,c=l&&n.process,o=function(){try{var h=i&&i.require&&i.require("util").types;return h||c&&c.binding&&c.binding("util")}catch{}}();e.exports=o})(W2,W2.exports);var Yre=qre,Qre=Xre,Sk=W2.exports,Ek=Sk&&Sk.isTypedArray,Jre=Ek?Qre(Ek):Yre,mO=Jre,eie=tre,tie=dre,nie=w4,rie=Ay.exports,iie=gre,oie=mO,aie=Object.prototype,sie=aie.hasOwnProperty;function lie(e,t){var n=nie(e),r=!n&&tie(e),i=!n&&!r&&rie(e),l=!n&&!r&&!i&&oie(e),c=n||r||i||l,o=c?eie(e.length,String):[],h=o.length;for(var p in e)(t||sie.call(e,p))&&!(c&&(p=="length"||i&&(p=="offset"||p=="parent")||l&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||iie(p,h)))&&o.push(p);return o}var uie=lie,cie=Object.prototype;function die(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||cie;return e===n}var fie=die;function hie(e,t){return function(n){return e(t(n))}}var pie=hie,mie=pie,vie=mie(Object.keys,Object),gie=vie,yie=fie,xie=gie,_ie=Object.prototype,bie=_ie.hasOwnProperty;function wie(e){if(!yie(e))return xie(e);var t=[];for(var n in Object(e))bie.call(e,n)&&n!="constructor"&&t.push(n);return t}var Cie=wie,Sie=uO,Eie=pO;function kie(e){return e!=null&&Eie(e.length)&&!Sie(e)}var Tie=kie,Pie=uie,Iie=Cie,Mie=Tie;function Rie(e){return Mie(e)?Pie(e):Iie(e)}var Aie=Rie,Oie=jne,Nie=Jne,Die=Aie;function Lie(e){return Oie(e,Die,Nie)}var zie=Lie,kk=zie,Fie=1,$ie=Object.prototype,Bie=$ie.hasOwnProperty;function Vie(e,t,n,r,i,l){var c=n&Fie,o=kk(e),h=o.length,p=kk(t),g=p.length;if(h!=g&&!c)return!1;for(var b=h;b--;){var w=o[b];if(!(c?w in t:Bie.call(t,w)))return!1}var P=l.get(e),I=l.get(t);if(P&&I)return P==t&&I==e;var A=!0;l.set(e,t),l.set(t,e);for(var O=c;++b<h;){w=o[b];var M=e[w],R=t[w];if(r)var N=c?r(R,M,w,t,e,l):r(M,R,w,e,t,l);if(!(N===void 0?M===R||i(M,R,n,r,l):N)){A=!1;break}O||(O=w=="constructor")}if(A&&!O){var z=e.constructor,B=t.constructor;z!=B&&"constructor"in e&&"constructor"in t&&!(typeof z=="function"&&z instanceof z&&typeof B=="function"&&B instanceof B)&&(A=!1)}return l.delete(e),l.delete(t),A}var Uie=Vie,jie=mf,Kie=vs,Hie=jie(Kie,"DataView"),Wie=Hie,Gie=mf,qie=vs,Zie=Gie(qie,"Promise"),Xie=Zie,Yie=mf,Qie=vs,Jie=Yie(Qie,"Set"),eoe=Jie,toe=mf,noe=vs,roe=toe(noe,"WeakMap"),ioe=roe,G2=Wie,q2=A4,Z2=Xie,X2=eoe,Y2=ioe,vO=Jp,xf=cO,Tk="[object Map]",ooe="[object Object]",Pk="[object Promise]",Ik="[object Set]",Mk="[object WeakMap]",Rk="[object DataView]",aoe=xf(G2),soe=xf(q2),loe=xf(Z2),uoe=xf(X2),coe=xf(Y2),Yu=vO;(G2&&Yu(new G2(new ArrayBuffer(1)))!=Rk||q2&&Yu(new q2)!=Tk||Z2&&Yu(Z2.resolve())!=Pk||X2&&Yu(new X2)!=Ik||Y2&&Yu(new Y2)!=Mk)&&(Yu=function(e){var t=vO(e),n=t==ooe?e.constructor:void 0,r=n?xf(n):"";if(r)switch(r){case aoe:return Rk;case soe:return Tk;case loe:return Pk;case uoe:return Ik;case coe:return Mk}return t});var doe=Yu,M_=Wte,foe=fO,hoe=zne,poe=Uie,Ak=doe,Ok=w4,Nk=Ay.exports,moe=mO,voe=1,Dk="[object Arguments]",Lk="[object Array]",tg="[object Object]",goe=Object.prototype,zk=goe.hasOwnProperty;function yoe(e,t,n,r,i,l){var c=Ok(e),o=Ok(t),h=c?Lk:Ak(e),p=o?Lk:Ak(t);h=h==Dk?tg:h,p=p==Dk?tg:p;var g=h==tg,b=p==tg,w=h==p;if(w&&Nk(e)){if(!Nk(t))return!1;c=!0,g=!1}if(w&&!g)return l||(l=new M_),c||moe(e)?foe(e,t,n,r,i,l):hoe(e,t,h,n,r,i,l);if(!(n&voe)){var P=g&&zk.call(e,"__wrapped__"),I=b&&zk.call(t,"__wrapped__");if(P||I){var A=P?e.value():e,O=I?t.value():t;return l||(l=new M_),i(A,O,n,r,l)}}return w?(l||(l=new M_),poe(e,t,n,r,i,l)):!1}var xoe=yoe,_oe=xoe,Fk=em;function gO(e,t,n,r,i){return e===t?!0:e==null||t==null||!Fk(e)&&!Fk(t)?e!==e&&t!==t:_oe(e,t,n,r,gO,i)}var boe=gO,woe=boe;function Coe(e,t){return woe(e,t)}var $k=Coe;function yO(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var Soe=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],xO=function(t,n){var r=t.className,i=t.style,l=t.motion,c=t.motionNodes,o=t.motionType,h=t.onMotionStart,p=t.onMotionEnd,g=t.active,b=t.treeNodeRequiredProps,w=In(t,Soe),P=C.exports.useState(!0),I=ze(P,2),A=I[0],O=I[1],M=C.exports.useContext(S4),R=M.prefixCls,N=C.exports.useRef(!1),z=function(){N.current||p(),N.current=!0};return C.exports.useEffect(function(){c&&o==="hide"&&A&&O(!1)},[c]),C.exports.useEffect(function(){return c&&h(),function(){c&&z()}},[]),c?E(Ca,{ref:n,visible:A,...l,motionAppear:o==="show",onAppearEnd:z,onLeaveEnd:z,children:function(B,U){var q=B.className,H=B.style;return E("div",{ref:U,className:Ye("".concat(R,"-treenode-motion"),q),style:H,children:c.map(function(te){var Y=tt({},(yO(te.data),te.data)),le=te.title,J=te.key,Z=te.isStart,Q=te.isEnd;delete Y.children;var ge=np(J,b);return C.exports.createElement(yc,{...Y,...ge,title:le,active:g,data:te.data,key:J,isStart:Z,isEnd:Q})})})}}):E(yc,{domRef:n,className:r,style:i,...w,active:g})};xO.displayName="MotionTreeNode";var Eoe=C.exports.forwardRef(xO);function koe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=e.length,r=t.length;if(Math.abs(n-r)!==1)return{add:!1,key:null};function i(l,c){var o=new Map;l.forEach(function(p){o.set(p,!0)});var h=c.filter(function(p){return!o.has(p)});return h.length===1?h[0]:null}return n<r?{add:!0,key:i(e,t)}:{add:!1,key:i(t,e)}}function Bk(e,t,n){var r=e.findIndex(function(o){return o.key===n}),i=e[r+1],l=t.findIndex(function(o){return o.key===n});if(i){var c=t.findIndex(function(o){return o.key===i.key});return t.slice(l+1,c)}return t.slice(l+1)}var Toe=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],Vk={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Poe=function(){},_c="RC_TREE_MOTION_".concat(Math.random()),Q2={key:_c},_O={key:_c,level:0,index:0,pos:"0",node:Q2,nodes:[Q2]},Uk={parent:null,children:[],pos:_O.pos,data:Q2,title:null,key:_c,isStart:[],isEnd:[]};function jk(e,t,n,r){return t===!1||!n?e:e.slice(0,Math.ceil(n/r)+1)}function Kk(e){var t=e.key,n=e.pos;return tm(t,n)}function Ioe(e){for(var t=String(e.data.key),n=e;n.parent;)n=n.parent,t="".concat(n.data.key," > ").concat(t);return t}var bO=C.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.data;e.selectable,e.checkable;var i=e.expandedKeys,l=e.selectedKeys,c=e.checkedKeys,o=e.loadedKeys,h=e.loadingKeys,p=e.halfCheckedKeys,g=e.keyEntities,b=e.disabled,w=e.dragging,P=e.dragOverNodeKey,I=e.dropPosition,A=e.motion,O=e.height,M=e.itemHeight,R=e.virtual,N=e.focusable,z=e.activeItem,B=e.focused,U=e.tabIndex,q=e.onKeyDown,H=e.onFocus,te=e.onBlur,Y=e.onActiveChange,le=e.onListChangeStart,J=e.onListChangeEnd,Z=In(e,Toe),Q=C.exports.useRef(null),ge=C.exports.useRef(null);C.exports.useImperativeHandle(t,function(){return{scrollTo:function(ut){Q.current.scrollTo(ut)},getIndentWidth:function(){return ge.current.offsetWidth}}});var re=C.exports.useState(i),de=ze(re,2),oe=de[0],ye=de[1],Re=C.exports.useState(r),Te=ze(Re,2),ke=Te[0],De=Te[1],Me=C.exports.useState(r),Ne=ze(Me,2),Le=Ne[0],Ve=Ne[1],qe=C.exports.useState([]),Ue=ze(qe,2),ct=Ue[0],pt=Ue[1],Tt=C.exports.useState(null),Xe=ze(Tt,2),Pt=Xe[0],mt=Xe[1],Mt=C.exports.useRef(r);Mt.current=r;function Ct(){var dt=Mt.current;De(dt),Ve(dt),pt([]),mt(null),J()}C.exports.useEffect(function(){ye(i);var dt=koe(oe,i);if(dt.key!==null)if(dt.add){var ut=ke.findIndex(function(Qt){var Fe=Qt.key;return Fe===dt.key}),it=jk(Bk(ke,r,dt.key),R,O,M),ft=ke.slice();ft.splice(ut+1,0,Uk),Ve(ft),pt(it),mt("show")}else{var xt=r.findIndex(function(Qt){var Fe=Qt.key;return Fe===dt.key}),Wt=jk(Bk(r,ke,dt.key),R,O,M),Ut=r.slice();Ut.splice(xt+1,0,Uk),Ve(Ut),pt(Wt),mt("hide")}else ke!==r&&(De(r),Ve(r))},[i,r]),C.exports.useEffect(function(){w||Ct()},[w]);var Lt=A?Le:r,lt={expandedKeys:i,selectedKeys:l,loadedKeys:o,loadingKeys:h,checkedKeys:c,halfCheckedKeys:p,dragOverNodeKey:P,dropPosition:I,keyEntities:g};return Qe($n,{children:[B&&z&&E("span",{style:Vk,"aria-live":"assertive",children:Ioe(z)}),E("div",{children:E("input",{style:Vk,disabled:N===!1||b,tabIndex:N!==!1?U:null,onKeyDown:q,onFocus:H,onBlur:te,value:"",onChange:Poe,"aria-label":"for screen reader"})}),E("div",{className:"".concat(n,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0},children:E("div",{className:"".concat(n,"-indent"),children:E("div",{ref:ge,className:"".concat(n,"-indent-unit")})})}),E(i4,{...Z,data:Lt,itemKey:Kk,height:O,fullHeight:!1,virtual:R,itemHeight:M,prefixCls:"".concat(n,"-list"),ref:Q,onVisibleChange:function(ut,it){var ft=new Set(ut),xt=it.filter(function(Wt){return!ft.has(Wt)});xt.some(function(Wt){return Kk(Wt)===_c})&&Ct()},children:function(dt){var ut=dt.pos,it=tt({},(yO(dt.data),dt.data)),ft=dt.title,xt=dt.key,Wt=dt.isStart,Ut=dt.isEnd,Qt=tm(xt,ut);delete it.key,delete it.children;var Fe=np(Qt,lt);return E(Eoe,{...it,...Fe,title:ft,active:!!z&&xt===z.key,pos:ut,data:dt.data,isStart:Wt,isEnd:Ut,motion:A,motionNodes:xt===_c?ct:null,motionType:Pt,onMotionStart:le,onMotionEnd:Ct,treeNodeRequiredProps:lt,onMouseMove:function(){Y(null)}})}})]})});bO.displayName="NodeList";function Moe(e){var t=e.dropPosition,n=e.dropLevelOffset,r=e.indent,i={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(t){case-1:i.top=0,i.left=-n*r;break;case 1:i.bottom=0,i.left=-n*r;break;case 0:i.bottom=0,i.left=r;break}return E("div",{style:i})}var Roe=10,J0=function(e){li(n,e);var t=ui(n);function n(){var r;Kr(this,n);for(var i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];return r=t.call.apply(t,[this].concat(l)),r.destroyed=!1,r.delayedDragEnterLogic=void 0,r.loadingRetryTimes={},r.state={keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:Ty()},r.dragStartMousePosition=null,r.dragNode=void 0,r.currentMouseOverDroppableNodeKey=null,r.listRef=C.exports.createRef(),r.onNodeDragStart=function(o,h){var p=r.state,g=p.expandedKeys,b=p.keyEntities,w=r.props.onDragStart,P=h.props.eventKey;r.dragNode=h,r.dragStartMousePosition={x:o.clientX,y:o.clientY};var I=is(g,P);r.setState({draggingNodeKey:P,dragChildrenKeys:vZ(P,b),indent:r.listRef.current.getIndentWidth()}),r.setExpandedKeys(I),window.addEventListener("dragend",r.onWindowDragEnd),w==null||w({event:o,node:wi(h.props)})},r.onNodeDragEnter=function(o,h){var p=r.state,g=p.expandedKeys,b=p.keyEntities,w=p.dragChildrenKeys,P=p.flattenNodes,I=p.indent,A=r.props,O=A.onDragEnter,M=A.onExpand,R=A.allowDrop,N=A.direction,z=h.props,B=z.pos,U=z.eventKey,q=On(r),H=q.dragNode;if(r.currentMouseOverDroppableNodeKey!==U&&(r.currentMouseOverDroppableNodeKey=U),!H){r.resetDragState();return}var te=L5(o,H,h,I,r.dragStartMousePosition,R,P,b,g,N),Y=te.dropPosition,le=te.dropLevelOffset,J=te.dropTargetKey,Z=te.dropContainerKey,Q=te.dropTargetPos,ge=te.dropAllowed,re=te.dragOverNodeKey;if(w.indexOf(J)!==-1||!ge){r.resetDragState();return}if(r.delayedDragEnterLogic||(r.delayedDragEnterLogic={}),Object.keys(r.delayedDragEnterLogic).forEach(function(de){clearTimeout(r.delayedDragEnterLogic[de])}),H.props.eventKey!==h.props.eventKey&&(o.persist(),r.delayedDragEnterLogic[B]=window.setTimeout(function(){if(r.state.draggingNodeKey!==null){var de=wt(g),oe=b[h.props.eventKey];oe&&(oe.children||[]).length&&(de=Ds(g,h.props.eventKey)),"expandedKeys"in r.props||r.setExpandedKeys(de),M==null||M(de,{node:wi(h.props),expanded:!0,nativeEvent:o.nativeEvent})}},800)),H.props.eventKey===J&&le===0){r.resetDragState();return}r.setState({dragOverNodeKey:re,dropPosition:Y,dropLevelOffset:le,dropTargetKey:J,dropContainerKey:Z,dropTargetPos:Q,dropAllowed:ge}),O==null||O({event:o,node:wi(h.props),expandedKeys:g})},r.onNodeDragOver=function(o,h){var p=r.state,g=p.dragChildrenKeys,b=p.flattenNodes,w=p.keyEntities,P=p.expandedKeys,I=p.indent,A=r.props,O=A.onDragOver,M=A.allowDrop,R=A.direction,N=On(r),z=N.dragNode;if(!!z){var B=L5(o,z,h,I,r.dragStartMousePosition,M,b,w,P,R),U=B.dropPosition,q=B.dropLevelOffset,H=B.dropTargetKey,te=B.dropContainerKey,Y=B.dropAllowed,le=B.dropTargetPos,J=B.dragOverNodeKey;g.indexOf(H)!==-1||!Y||(z.props.eventKey===H&&q===0?r.state.dropPosition===null&&r.state.dropLevelOffset===null&&r.state.dropTargetKey===null&&r.state.dropContainerKey===null&&r.state.dropTargetPos===null&&r.state.dropAllowed===!1&&r.state.dragOverNodeKey===null||r.resetDragState():U===r.state.dropPosition&&q===r.state.dropLevelOffset&&H===r.state.dropTargetKey&&te===r.state.dropContainerKey&&le===r.state.dropTargetPos&&Y===r.state.dropAllowed&&J===r.state.dragOverNodeKey||r.setState({dropPosition:U,dropLevelOffset:q,dropTargetKey:H,dropContainerKey:te,dropTargetPos:le,dropAllowed:Y,dragOverNodeKey:J}),O==null||O({event:o,node:wi(h.props)}))}},r.onNodeDragLeave=function(o,h){r.currentMouseOverDroppableNodeKey===h.props.eventKey&&!o.currentTarget.contains(o.relatedTarget)&&(r.resetDragState(),r.currentMouseOverDroppableNodeKey=null);var p=r.props.onDragLeave;p==null||p({event:o,node:wi(h.props)})},r.onWindowDragEnd=function(o){r.onNodeDragEnd(o,null,!0),window.removeEventListener("dragend",r.onWindowDragEnd)},r.onNodeDragEnd=function(o,h){var p=r.props.onDragEnd;r.setState({dragOverNodeKey:null}),r.cleanDragState(),p==null||p({event:o,node:wi(h.props)}),r.dragNode=null,window.removeEventListener("dragend",r.onWindowDragEnd)},r.onNodeDrop=function(o,h){var p,g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,b=r.state,w=b.dragChildrenKeys,P=b.dropPosition,I=b.dropTargetKey,A=b.dropTargetPos,O=b.dropAllowed;if(!!O){var M=r.props.onDrop;if(r.setState({dragOverNodeKey:null}),r.cleanDragState(),I!==null){var R=ve(ve({},np(I,r.getTreeNodeRequiredProps())),{},{active:((p=r.getActiveItem())===null||p===void 0?void 0:p.key)===I,data:r.state.keyEntities[I].node}),N=w.indexOf(I)!==-1;Nr(!N,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var z=E4(A),B={event:o,node:wi(R),dragNode:r.dragNode?wi(r.dragNode.props):null,dragNodesKeys:[r.dragNode.props.eventKey].concat(w),dropToGap:P!==0,dropPosition:P+Number(z[z.length-1])};g||M==null||M(B),r.dragNode=null}}},r.cleanDragState=function(){var o=r.state.draggingNodeKey;o!==null&&r.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),r.dragStartMousePosition=null,r.currentMouseOverDroppableNodeKey=null},r.triggerExpandActionExpand=function(o,h){var p=r.state,g=p.expandedKeys,b=p.flattenNodes,w=h.expanded,P=h.key,I=h.isLeaf;if(!(I||o.shiftKey||o.metaKey||o.ctrlKey)){var A=b.filter(function(M){return M.key===P})[0],O=wi(ve(ve({},np(P,r.getTreeNodeRequiredProps())),{},{data:A.data}));r.setExpandedKeys(w?is(g,P):Ds(g,P)),r.onNodeExpand(o,O)}},r.onNodeClick=function(o,h){var p=r.props,g=p.onClick,b=p.expandAction;b==="click"&&r.triggerExpandActionExpand(o,h),g==null||g(o,h)},r.onNodeDoubleClick=function(o,h){var p=r.props,g=p.onDoubleClick,b=p.expandAction;b==="doubleClick"&&r.triggerExpandActionExpand(o,h),g==null||g(o,h)},r.onNodeSelect=function(o,h){var p=r.state.selectedKeys,g=r.state,b=g.keyEntities,w=g.fieldNames,P=r.props,I=P.onSelect,A=P.multiple,O=h.selected,M=h[w.key],R=!O;R?A?p=Ds(p,M):p=[M]:p=is(p,M);var N=p.map(function(z){var B=b[z];return B?B.node:null}).filter(function(z){return z});r.setUncontrolledState({selectedKeys:p}),I==null||I(p,{event:"select",selected:R,node:h,selectedNodes:N,nativeEvent:o.nativeEvent})},r.onNodeCheck=function(o,h,p){var g=r.state,b=g.keyEntities,w=g.checkedKeys,P=g.halfCheckedKeys,I=r.props,A=I.checkStrictly,O=I.onCheck,M=h.key,R,N={event:"check",node:h,checked:p,nativeEvent:o.nativeEvent};if(A){var z=p?Ds(w,M):is(w,M),B=is(P,M);R={checked:z,halfChecked:B},N.checkedNodes=z.map(function(le){return b[le]}).filter(function(le){return le}).map(function(le){return le.node}),r.setUncontrolledState({checkedKeys:z})}else{var U=Gs([].concat(wt(w),[M]),!0,b),q=U.checkedKeys,H=U.halfCheckedKeys;if(!p){var te=new Set(q);te.delete(M);var Y=Gs(Array.from(te),{checked:!1,halfCheckedKeys:H},b);q=Y.checkedKeys,H=Y.halfCheckedKeys}R=q,N.checkedNodes=[],N.checkedNodesPositions=[],N.halfCheckedKeys=H,q.forEach(function(le){var J=b[le];if(!!J){var Z=J.node,Q=J.pos;N.checkedNodes.push(Z),N.checkedNodesPositions.push({node:Z,pos:Q})}}),r.setUncontrolledState({checkedKeys:q},!1,{halfCheckedKeys:H})}O==null||O(R,N)},r.onNodeLoad=function(o){var h=o.key,p=new Promise(function(g,b){r.setState(function(w){var P=w.loadedKeys,I=P===void 0?[]:P,A=w.loadingKeys,O=A===void 0?[]:A,M=r.props,R=M.loadData,N=M.onLoad;if(!R||I.indexOf(h)!==-1||O.indexOf(h)!==-1)return null;var z=R(o);return z.then(function(){var B=r.state.loadedKeys,U=Ds(B,h);N==null||N(U,{event:"load",node:o}),r.setUncontrolledState({loadedKeys:U}),r.setState(function(q){return{loadingKeys:is(q.loadingKeys,h)}}),g()}).catch(function(B){if(r.setState(function(q){return{loadingKeys:is(q.loadingKeys,h)}}),r.loadingRetryTimes[h]=(r.loadingRetryTimes[h]||0)+1,r.loadingRetryTimes[h]>=Roe){var U=r.state.loadedKeys;Nr(!1,"Retry for `loadData` many times but still failed. No more retry."),r.setUncontrolledState({loadedKeys:Ds(U,h)}),g()}b(B)}),{loadingKeys:Ds(O,h)}})});return p.catch(function(){}),p},r.onNodeMouseEnter=function(o,h){var p=r.props.onMouseEnter;p==null||p({event:o,node:h})},r.onNodeMouseLeave=function(o,h){var p=r.props.onMouseLeave;p==null||p({event:o,node:h})},r.onNodeContextMenu=function(o,h){var p=r.props.onRightClick;p&&(o.preventDefault(),p({event:o,node:h}))},r.onFocus=function(){var o=r.props.onFocus;r.setState({focused:!0});for(var h=arguments.length,p=new Array(h),g=0;g<h;g++)p[g]=arguments[g];o==null||o.apply(void 0,p)},r.onBlur=function(){var o=r.props.onBlur;r.setState({focused:!1}),r.onActiveChange(null);for(var h=arguments.length,p=new Array(h),g=0;g<h;g++)p[g]=arguments[g];o==null||o.apply(void 0,p)},r.getTreeNodeRequiredProps=function(){var o=r.state,h=o.expandedKeys,p=o.selectedKeys,g=o.loadedKeys,b=o.loadingKeys,w=o.checkedKeys,P=o.halfCheckedKeys,I=o.dragOverNodeKey,A=o.dropPosition,O=o.keyEntities;return{expandedKeys:h||[],selectedKeys:p||[],loadedKeys:g||[],loadingKeys:b||[],checkedKeys:w||[],halfCheckedKeys:P||[],dragOverNodeKey:I,dropPosition:A,keyEntities:O}},r.setExpandedKeys=function(o){var h=r.state,p=h.treeData,g=h.fieldNames,b=x_(p,o,g);r.setUncontrolledState({expandedKeys:o,flattenNodes:b},!0)},r.onNodeExpand=function(o,h){var p=r.state.expandedKeys,g=r.state,b=g.listChanging,w=g.fieldNames,P=r.props,I=P.onExpand,A=P.loadData,O=h.expanded,M=h[w.key];if(!b){var R=p.indexOf(M),N=!O;if(Nr(O&&R!==-1||!O&&R===-1,"Expand state not sync with index check"),N?p=Ds(p,M):p=is(p,M),r.setExpandedKeys(p),I==null||I(p,{node:h,expanded:N,nativeEvent:o.nativeEvent}),N&&A){var z=r.onNodeLoad(h);z&&z.then(function(){var B=x_(r.state.treeData,p,w);r.setUncontrolledState({flattenNodes:B})}).catch(function(){var B=r.state.expandedKeys,U=is(B,M);r.setExpandedKeys(U)})}}},r.onListChangeStart=function(){r.setUncontrolledState({listChanging:!0})},r.onListChangeEnd=function(){setTimeout(function(){r.setUncontrolledState({listChanging:!1})})},r.onActiveChange=function(o){var h=r.state.activeKey,p=r.props.onActiveChange;h!==o&&(r.setState({activeKey:o}),o!==null&&r.scrollTo({key:o}),p==null||p(o))},r.getActiveItem=function(){var o=r.state,h=o.activeKey,p=o.flattenNodes;return h===null?null:p.find(function(g){var b=g.key;return b===h})||null},r.offsetActiveKey=function(o){var h=r.state,p=h.flattenNodes,g=h.activeKey,b=p.findIndex(function(I){var A=I.key;return A===g});b===-1&&o<0&&(b=p.length),b=(b+o+p.length)%p.length;var w=p[b];if(w){var P=w.key;r.onActiveChange(P)}else r.onActiveChange(null)},r.onKeyDown=function(o){var h=r.state,p=h.activeKey,g=h.expandedKeys,b=h.checkedKeys,w=h.fieldNames,P=r.props,I=P.onKeyDown,A=P.checkable,O=P.selectable;switch(o.which){case Et.UP:{r.offsetActiveKey(-1),o.preventDefault();break}case Et.DOWN:{r.offsetActiveKey(1),o.preventDefault();break}}var M=r.getActiveItem();if(M&&M.data){var R=r.getTreeNodeRequiredProps(),N=M.data.isLeaf===!1||!!(M.data[w.children]||[]).length,z=wi(ve(ve({},np(p,R)),{},{data:M.data,active:!0}));switch(o.which){case Et.LEFT:{N&&g.includes(p)?r.onNodeExpand({},z):M.parent&&r.onActiveChange(M.parent.key),o.preventDefault();break}case Et.RIGHT:{N&&!g.includes(p)?r.onNodeExpand({},z):M.children&&M.children.length&&r.onActiveChange(M.children[0].key),o.preventDefault();break}case Et.ENTER:case Et.SPACE:{A&&!z.disabled&&z.checkable!==!1&&!z.disableCheckbox?r.onNodeCheck({},z,!b.includes(p)):!A&&O&&!z.disabled&&z.selectable!==!1&&r.onNodeSelect({},z);break}}}I==null||I(o)},r.setUncontrolledState=function(o){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!r.destroyed){var g=!1,b=!0,w={};Object.keys(o).forEach(function(P){if(P in r.props){b=!1;return}g=!0,w[P]=o[P]}),g&&(!h||b)&&r.setState(ve(ve({},w),p))}},r.scrollTo=function(o){r.listRef.current.scrollTo(o)},r}return Hr(n,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var i=this.props.activeKey;i!==void 0&&i!==this.state.activeKey&&(this.setState({activeKey:i}),i!==null&&this.scrollTo({key:i}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var i,l=this.state,c=l.focused,o=l.flattenNodes,h=l.keyEntities,p=l.draggingNodeKey,g=l.activeKey,b=l.dropLevelOffset,w=l.dropContainerKey,P=l.dropTargetKey,I=l.dropPosition,A=l.dragOverNodeKey,O=l.indent,M=this.props,R=M.prefixCls,N=M.className,z=M.style,B=M.showLine,U=M.focusable,q=M.tabIndex,H=q===void 0?0:q,te=M.selectable,Y=M.showIcon,le=M.icon,J=M.switcherIcon,Z=M.draggable,Q=M.checkable,ge=M.checkStrictly,re=M.disabled,de=M.motion,oe=M.loadData,ye=M.filterTreeNode,Re=M.height,Te=M.itemHeight,ke=M.virtual,De=M.titleRender,Me=M.dropIndicatorRender,Ne=M.onContextMenu,Le=M.onScroll,Ve=M.direction,qe=M.rootClassName,Ue=M.rootStyle,ct=au(this.props,{aria:!0,data:!0}),pt;return Z&&(sn(Z)==="object"?pt=Z:typeof Z=="function"?pt={nodeDraggable:Z}:pt={}),E(S4.Provider,{value:{prefixCls:R,selectable:te,showIcon:Y,icon:le,switcherIcon:J,draggable:pt,draggingNodeKey:p,checkable:Q,checkStrictly:ge,disabled:re,keyEntities:h,dropLevelOffset:b,dropContainerKey:w,dropTargetKey:P,dropPosition:I,dragOverNodeKey:A,indent:O,direction:Ve,dropIndicatorRender:Me,loadData:oe,filterTreeNode:ye,titleRender:De,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop},children:E("div",{role:"tree",className:Ye(R,N,qe,(i={},se(i,"".concat(R,"-show-line"),B),se(i,"".concat(R,"-focused"),c),se(i,"".concat(R,"-active-focused"),g!==null),i)),style:Ue,children:E(bO,{ref:this.listRef,prefixCls:R,style:z,data:o,disabled:re,selectable:te,checkable:!!Q,motion:de,dragging:p!==null,height:Re,itemHeight:Te,virtual:ke,focusable:U,focused:c,tabIndex:H,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Ne,onScroll:Le,...this.getTreeNodeRequiredProps(),...ct})})})}}],[{key:"getDerivedStateFromProps",value:function(i,l){var c=l.prevProps,o={prevProps:i};function h(U){return!c&&U in i||c&&c[U]!==i[U]}var p,g=l.fieldNames;if(h("fieldNames")&&(g=Ty(i.fieldNames),o.fieldNames=g),h("treeData")?p=i.treeData:h("children")&&(Nr(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),p=iA(i.children)),p){o.treeData=p;var b=U0(p,{fieldNames:g});o.keyEntities=ve(se({},_c,_O),b.keyEntities)}var w=o.keyEntities||l.keyEntities;if(h("expandedKeys")||c&&h("autoExpandParent"))o.expandedKeys=i.autoExpandParent||!c&&i.defaultExpandParent?$2(i.expandedKeys,w):i.expandedKeys;else if(!c&&i.defaultExpandAll){var P=ve({},w);delete P[_c],o.expandedKeys=Object.keys(P).map(function(U){return P[U].key})}else!c&&i.defaultExpandedKeys&&(o.expandedKeys=i.autoExpandParent||i.defaultExpandParent?$2(i.defaultExpandedKeys,w):i.defaultExpandedKeys);if(o.expandedKeys||delete o.expandedKeys,p||o.expandedKeys){var I=x_(p||l.treeData,o.expandedKeys||l.expandedKeys,g);o.flattenNodes=I}if(i.selectable&&(h("selectedKeys")?o.selectedKeys=z5(i.selectedKeys,i):!c&&i.defaultSelectedKeys&&(o.selectedKeys=z5(i.defaultSelectedKeys,i))),i.checkable){var A;if(h("checkedKeys")?A=y_(i.checkedKeys)||{}:!c&&i.defaultCheckedKeys?A=y_(i.defaultCheckedKeys)||{}:p&&(A=y_(i.checkedKeys)||{checkedKeys:l.checkedKeys,halfCheckedKeys:l.halfCheckedKeys}),A){var O=A,M=O.checkedKeys,R=M===void 0?[]:M,N=O.halfCheckedKeys,z=N===void 0?[]:N;if(!i.checkStrictly){var B=Gs(R,!0,w);R=B.checkedKeys,z=B.halfCheckedKeys}o.checkedKeys=R,o.halfCheckedKeys=z}}return h("loadedKeys")&&(o.loadedKeys=i.loadedKeys),o}}]),n}(C.exports.Component);J0.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:Moe,allowDrop:function(){return!0},expandAction:!1};J0.TreeNode=yc;var Aoe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"};const Ooe=Aoe;var wO=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:Ooe})})};wO.displayName="HolderOutlined";const Noe=C.exports.forwardRef(wO);var Hk=4;function Doe(e){var t,n=e.dropPosition,r=e.dropLevelOffset,i=e.prefixCls,l=e.indent,c=e.direction,o=c===void 0?"ltr":c,h=o==="ltr"?"left":"right",p=o==="ltr"?"right":"left",g=(t={},se(t,h,-r*l+Hk),se(t,p,0),t);switch(n){case-1:g.top=-3;break;case 1:g.bottom=-3;break;default:g.bottom=-3,g[h]=l+Hk;break}return E("div",{style:g,className:"".concat(i,"-drop-indicator")})}var Loe={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"};const zoe=Loe;var CO=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:zoe})})};CO.displayName="CaretDownFilled";const Foe=C.exports.forwardRef(CO);var $oe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"};const Boe=$oe;var SO=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:Boe})})};SO.displayName="FileOutlined";const EO=C.exports.forwardRef(SO);var Voe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"};const Uoe=Voe;var kO=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:Uoe})})};kO.displayName="MinusSquareOutlined";const joe=C.exports.forwardRef(kO);var Koe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"};const Hoe=Koe;var TO=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:Hoe})})};TO.displayName="PlusSquareOutlined";const Woe=C.exports.forwardRef(TO);function PO(e,t,n,r){var i=r.isLeaf,l=r.expanded,c=r.loading;if(c)return E(qd,{className:"".concat(e,"-switcher-loading-icon")});var o;if(n&&sn(n)==="object"&&(o=n.showLeafIcon),i){if(!n)return null;if(typeof o!="boolean"&&!!o){var h=typeof o=="function"?o(r):o,p="".concat(e,"-switcher-line-custom-icon");return Do(h)?Ei(h,{className:Ye(h.props.className||"",p)}):h}return o?E(EO,{className:"".concat(e,"-switcher-line-icon")}):E("span",{className:"".concat(e,"-switcher-leaf-line")})}var g="".concat(e,"-switcher-icon"),b=typeof t=="function"?t(r):t;return Do(b)?Ei(b,{className:Ye(b.props.className||"",g)}):b||(n?l?E(joe,{className:"".concat(e,"-switcher-line-icon")}):E(Woe,{className:"".concat(e,"-switcher-line-icon")}):E(Foe,{className:g}))}var Goe=C.exports.forwardRef(function(e,t){var n,r=C.exports.useContext(Nn),i=r.getPrefixCls,l=r.direction,c=r.virtual,o=e.prefixCls,h=e.className,p=e.showIcon,g=p===void 0?!1:p,b=e.showLine,w=e.switcherIcon,P=e.blockNode,I=P===void 0?!1:P,A=e.children,O=e.checkable,M=O===void 0?!1:O,R=e.selectable,N=R===void 0?!0:R,z=e.draggable,B=e.motion,U=B===void 0?tt(tt({},Ap),{motionAppear:!1}):B,q=i("tree",o),H=tt(tt({},e),{checkable:M,selectable:N,showIcon:g,motion:U,blockNode:I,showLine:Boolean(b),dropIndicatorRender:Doe}),te=C.exports.useMemo(function(){if(!z)return!1;var Y={};switch(sn(z)){case"function":Y.nodeDraggable=z;break;case"object":Y=tt({},z);break}return Y.icon!==!1&&(Y.icon=Y.icon||E(Noe,{})),Y},[z]);return E(J0,{itemHeight:20,ref:t,virtual:c,...H,prefixCls:q,className:Ye((n={},se(n,"".concat(q,"-icon-hide"),!g),se(n,"".concat(q,"-block-node"),I),se(n,"".concat(q,"-unselectable"),!N),se(n,"".concat(q,"-rtl"),l==="rtl"),n),h),direction:l,checkable:M&&E("span",{className:"".concat(q,"-checkbox-inner")}),selectable:N,switcherIcon:function(le){return PO(q,w,b,le)},draggable:te,children:A})});const IO=Goe;var qoe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"};const Zoe=qoe;var MO=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:Zoe})})};MO.displayName="FolderOpenOutlined";const Xoe=C.exports.forwardRef(MO);var Yoe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"};const Qoe=Yoe;var RO=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:Qoe})})};RO.displayName="FolderOutlined";const Joe=C.exports.forwardRef(RO);var zs;(function(e){e[e.None=0]="None",e[e.Start=1]="Start",e[e.End=2]="End"})(zs||(zs={}));function O4(e,t){function n(r){var i=r.key,l=r.children;t(i,r)!==!1&&O4(l||[],t)}e.forEach(n)}function eae(e){var t=e.treeData,n=e.expandedKeys,r=e.startKey,i=e.endKey,l=[],c=zs.None;if(r&&r===i)return[r];if(!r||!i)return[];function o(h){return h===r||h===i}return O4(t,function(h){if(c===zs.End)return!1;if(o(h)){if(l.push(h),c===zs.None)c=zs.Start;else if(c===zs.Start)return c=zs.End,!1}else c===zs.Start&&l.push(h);return n.includes(h)}),l}function R_(e,t){var n=wt(t),r=[];return O4(e,function(i,l){var c=n.indexOf(i);return c!==-1&&(r.push(l),n.splice(c,1)),!!n.length}),r}var Wk=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function tae(e){var t=e.isLeaf,n=e.expanded;return t?E(EO,{}):n?E(Xoe,{}):E(Joe,{})}function Gk(e){var t=e.treeData,n=e.children;return t||iA(n)}var nae=function(t,n){var r=t.defaultExpandAll,i=t.defaultExpandParent,l=t.defaultExpandedKeys,c=Wk(t,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]),o=C.exports.useRef(),h=C.exports.useRef(),p=function(){var de=U0(Gk(c)),oe=de.keyEntities,ye;return r?ye=Object.keys(oe):i?ye=$2(c.expandedKeys||l||[],oe):ye=c.expandedKeys||l,ye},g=C.exports.useState(c.selectedKeys||c.defaultSelectedKeys||[]),b=ze(g,2),w=b[0],P=b[1],I=C.exports.useState(function(){return p()}),A=ze(I,2),O=A[0],M=A[1];C.exports.useEffect(function(){"selectedKeys"in c&&P(c.selectedKeys)},[c.selectedKeys]),C.exports.useEffect(function(){"expandedKeys"in c&&M(c.expandedKeys)},[c.expandedKeys]);var R=function(de,oe){var ye;return"expandedKeys"in c||M(de),(ye=c.onExpand)===null||ye===void 0?void 0:ye.call(c,de,oe)},N=function(de,oe){var ye,Re=c.multiple,Te=oe.node,ke=oe.nativeEvent,De=Te.key,Me=De===void 0?"":De,Ne=Gk(c),Le=tt(tt({},oe),{selected:!0}),Ve=(ke==null?void 0:ke.ctrlKey)||(ke==null?void 0:ke.metaKey),qe=ke==null?void 0:ke.shiftKey,Ue;Re&&Ve?(Ue=de,o.current=Me,h.current=Ue,Le.selectedNodes=R_(Ne,Ue)):Re&&qe?(Ue=Array.from(new Set([].concat(wt(h.current||[]),wt(eae({treeData:Ne,expandedKeys:O,startKey:Me,endKey:o.current}))))),Le.selectedNodes=R_(Ne,Ue)):(Ue=[Me],o.current=Me,h.current=Ue,Le.selectedNodes=R_(Ne,Ue)),(ye=c.onSelect)===null||ye===void 0||ye.call(c,Ue,Le),"selectedKeys"in c||P(Ue)},z=C.exports.useContext(Nn),B=z.getPrefixCls,U=z.direction,q=c.prefixCls,H=c.className,te=c.showIcon,Y=te===void 0?!0:te,le=c.expandAction,J=le===void 0?"click":le,Z=Wk(c,["prefixCls","className","showIcon","expandAction"]),Q=B("tree",q),ge=Ye("".concat(Q,"-directory"),se({},"".concat(Q,"-directory-rtl"),U==="rtl"),H);return E(IO,{icon:tae,ref:n,blockNode:!0,...Z,showIcon:Y,expandAction:J,prefixCls:Q,className:ge,expandedKeys:O,selectedKeys:w,onSelect:N,onExpand:R})},rae=C.exports.forwardRef(nae);const iae=rae;var N4=IO;N4.DirectoryTree=iae;N4.TreeNode=yc;const oae=N4;function aae(e){var t=C.exports.useRef(e),n=m7();return[function(){return t.current},function(r){t.current=r,n()}]}function qk(e){var t=e.value,n=e.onChange,r=e.filterSearch,i=e.tablePrefixCls,l=e.locale;return r?E("div",{className:"".concat(i,"-filter-dropdown-search"),children:E(Kl,{prefix:E(u4,{}),placeholder:l.filterSearchPlaceholder,onChange:n,value:t,htmlSize:1,className:"".concat(i,"-filter-dropdown-search-input")})}):null}var sae=function(t){var n=t.keyCode;n===Et.ENTER&&t.stopPropagation()},lae=function(t){return E("div",{className:t.className,onClick:function(r){return r.stopPropagation()},onKeyDown:sae,children:t.children})};const uae=lae;function cae(e){return e.some(function(t){var n=t.children;return n})}function AO(e,t){return typeof t=="string"||typeof t=="number"?t==null?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()):!1}function OO(e){var t=e.filters,n=e.prefixCls,r=e.filteredKeys,i=e.filterMultiple,l=e.searchValue,c=e.filterSearch;return t.map(function(o,h){var p=String(o.value);if(o.children)return{key:p||h,label:o.text,popupClassName:"".concat(n,"-dropdown-submenu"),children:OO({filters:o.children,prefixCls:n,filteredKeys:r,filterMultiple:i,searchValue:l,filterSearch:c})};var g=i?xc:tA,b={key:o.value!==void 0?p:h,label:Qe($n,{children:[E(g,{checked:r.includes(p)}),E("span",{children:o.text})]})};return l.trim()?typeof c=="function"?c(l,o)?b:null:AO(l,o.text)?b:null:b})}function dae(e){var t,n=e.tablePrefixCls,r=e.prefixCls,i=e.column,l=e.dropdownPrefixCls,c=e.columnKey,o=e.filterMultiple,h=e.filterMode,p=h===void 0?"menu":h,g=e.filterSearch,b=g===void 0?!1:g,w=e.filterState,P=e.triggerFilter,I=e.locale,A=e.children,O=e.getPopupContainer,M=i.filterDropdownOpen,R=i.onFilterDropdownOpenChange,N=i.filterDropdownVisible,z=i.onFilterDropdownVisibleChange,B=i.filterResetToDefaultFilteredValue,U=i.defaultFilteredValue,q=C.exports.useState(!1),H=ze(q,2),te=H[0],Y=H[1],le=!!(w&&(((t=w.filteredKeys)===null||t===void 0?void 0:t.length)||w.forceFiltered)),J=function(Ge){Y(Ge),R==null||R(Ge),z==null||z(Ge)},Z;typeof M=="boolean"?Z=M:Z=typeof N=="boolean"?N:te;var Q=w==null?void 0:w.filteredKeys,ge=aae(Q||[]),re=ze(ge,2),de=re[0],oe=re[1],ye=function(Ge){var Xt=Ge.selectedKeys;oe(Xt)},Re=function(Ge,Xt){var dn=Xt.node,Vt=Xt.checked;ye(o?{selectedKeys:Ge}:{selectedKeys:Vt&&dn.key?[dn.key]:[]})};C.exports.useEffect(function(){!te||ye({selectedKeys:Q||[]})},[Q]);var Te=C.exports.useState([]),ke=ze(Te,2),De=ke[0],Me=ke[1],Ne=function(Ge){Me(Ge)},Le=C.exports.useState(""),Ve=ze(Le,2),qe=Ve[0],Ue=Ve[1],ct=function(Ge){var Xt=Ge.target.value;Ue(Xt)};C.exports.useEffect(function(){te||Ue("")},[te]);var pt=function(Ge){var Xt=Ge&&Ge.length?Ge:null;if(Xt===null&&(!w||!w.filteredKeys)||$k(Xt,w==null?void 0:w.filteredKeys))return null;P({column:i,key:c,filteredKeys:Xt})},Tt=function(){J(!1),pt(de())},Xe=function(){var Ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1},Xt=Ge.confirm,dn=Ge.closeDropdown;Xt&&pt([]),dn&&J(!1),Ue(""),oe(B?(U||[]).map(function(Vt){return String(Vt)}):[])},Pt=function(){var Ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0},Xt=Ge.closeDropdown;Xt&&J(!1),pt(de())},mt=function(Ge){Ge&&Q!==void 0&&oe(Q||[]),J(Ge),!Ge&&!i.filterDropdown&&Tt()},Mt=Ye(se({},"".concat(l,"-menu-without-submenu"),!cae(i.filters||[]))),Ct=function(Ge){if(Ge.target.checked){var Xt=Fd(i==null?void 0:i.filters).map(function(dn){return String(dn)});oe(Xt)}else oe([])},Lt=function Fe(Ge){var Xt=Ge.filters;return(Xt||[]).map(function(dn,Vt){var jt=String(dn.value),nn={title:dn.text,key:dn.value!==void 0?jt:Vt};return dn.children&&(nn.children=Fe({filters:dn.children})),nn})},lt=function Fe(Ge){var Xt;return tt(tt({},Ge),{text:Ge.title,value:Ge.key,children:((Xt=Ge.children)===null||Xt===void 0?void 0:Xt.map(function(dn){return Fe(dn)}))||[]})},dt;if(typeof i.filterDropdown=="function")dt=i.filterDropdown({prefixCls:"".concat(l,"-custom"),setSelectedKeys:function(Ge){return ye({selectedKeys:Ge})},selectedKeys:de(),confirm:Pt,clearFilters:Xe,filters:i.filters,visible:Z,close:function(){J(!1)}});else if(i.filterDropdown)dt=i.filterDropdown;else{var ut=de()||[],it=function(){return(i.filters||[]).length===0?E(ss,{image:ss.PRESENTED_IMAGE_SIMPLE,description:I.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):p==="tree"?Qe($n,{children:[E(qk,{filterSearch:b,value:qe,onChange:ct,tablePrefixCls:n,locale:I}),Qe("div",{className:"".concat(n,"-filter-dropdown-tree"),children:[o?E(xc,{checked:ut.length===Fd(i.filters).length,indeterminate:ut.length>0&&ut.length<Fd(i.filters).length,className:"".concat(n,"-filter-dropdown-checkall"),onChange:Ct,children:I.filterCheckall}):null,E(oae,{checkable:!0,selectable:!1,blockNode:!0,multiple:o,checkStrictly:!o,className:"".concat(l,"-menu"),onCheck:Re,checkedKeys:ut,selectedKeys:ut,showIcon:!1,treeData:Lt({filters:i.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:qe.trim()?function(Ge){return typeof b=="function"?b(qe,lt(Ge)):AO(qe,Ge.title)}:void 0})]})]}):Qe($n,{children:[E(qk,{filterSearch:b,value:qe,onChange:ct,tablePrefixCls:n,locale:I}),E(B7,{selectable:!0,multiple:o,prefixCls:"".concat(l,"-menu"),className:Mt,onSelect:ye,onDeselect:ye,selectedKeys:ut,getPopupContainer:O,openKeys:De,onOpenChange:Ne,items:OO({filters:i.filters||[],filterSearch:b,prefixCls:r,filteredKeys:de(),filterMultiple:o,searchValue:qe})})]})},ft=function(){return B?$k((U||[]).map(function(Ge){return String(Ge)}),ut):ut.length===0};dt=Qe($n,{children:[it(),Qe("div",{className:"".concat(r,"-dropdown-btns"),children:[E(Br,{type:"link",size:"small",disabled:ft(),onClick:function(){return Xe()},children:I.filterReset}),E(Br,{type:"primary",size:"small",onClick:Tt,children:I.filterConfirm})]})]})}i.filterDropdown&&(dt=E($7,{selectable:void 0,children:dt}));var xt=function(){return E(uae,{className:"".concat(r,"-dropdown"),children:dt})},Wt;typeof i.filterIcon=="function"?Wt=i.filterIcon(le):i.filterIcon?Wt=i.filterIcon:Wt=E(_J,{});var Ut=C.exports.useContext(Nn),Qt=Ut.direction;return Qe("div",{className:"".concat(r,"-column"),children:[E("span",{className:"".concat(n,"-column-title"),children:A}),E(_4,{dropdownRender:xt,trigger:["click"],open:Z,onOpenChange:mt,getPopupContainer:O,placement:Qt==="rtl"?"bottomLeft":"bottomRight",children:E("span",{role:"button",tabIndex:-1,className:Ye("".concat(r,"-trigger"),{active:le}),onClick:function(Ge){Ge.stopPropagation()},children:Wt})})]})}function J2(e,t,n){var r=[];return(e||[]).forEach(function(i,l){var c,o=G0(l,n);if(i.filters||"filterDropdown"in i||"onFilter"in i)if("filteredValue"in i){var h=i.filteredValue;"filterDropdown"in i||(h=(c=h==null?void 0:h.map(String))!==null&&c!==void 0?c:h),r.push({column:i,key:Yd(i,o),filteredKeys:h,forceFiltered:i.filtered})}else r.push({column:i,key:Yd(i,o),filteredKeys:t&&i.defaultFilteredValue?i.defaultFilteredValue:void 0,forceFiltered:i.filtered});"children"in i&&(r=[].concat(wt(r),wt(J2(i.children,t,o))))}),r}function NO(e,t,n,r,i,l,c,o){return n.map(function(h,p){var g=G0(p,o),b=h.filterMultiple,w=b===void 0?!0:b,P=h.filterMode,I=h.filterSearch,A=h;if(A.filters||A.filterDropdown){var O=Yd(A,g),M=r.find(function(R){var N=R.key;return O===N});A=tt(tt({},A),{title:function(N){return E(dae,{tablePrefixCls:e,prefixCls:"".concat(e,"-filter"),dropdownPrefixCls:t,column:A,columnKey:O,filterState:M,filterMultiple:w,filterMode:P,filterSearch:I,triggerFilter:i,locale:c,getPopupContainer:l,children:q0(h.title,N)})}})}return"children"in A&&(A=tt(tt({},A),{children:NO(e,t,A.children,r,i,l,c,g)})),A})}function Fd(e){var t=[];return(e||[]).forEach(function(n){var r=n.value,i=n.children;t.push(r),i&&(t=[].concat(wt(t),wt(Fd(i))))}),t}function Zk(e){var t={};return e.forEach(function(n){var r=n.key,i=n.filteredKeys,l=n.column,c=l.filters,o=l.filterDropdown;if(o)t[r]=i||null;else if(Array.isArray(i)){var h=Fd(c);t[r]=h.filter(function(p){return i.includes(String(p))})}else t[r]=null}),t}function Xk(e,t){return t.reduce(function(n,r){var i=r.column,l=i.onFilter,c=i.filters,o=r.filteredKeys;return l&&o&&o.length?n.filter(function(h){return o.some(function(p){var g=Fd(c),b=g.findIndex(function(P){return String(P)===String(p)}),w=b!==-1?g[b]:p;return l(w,h)})}):n},e)}function fae(e){var t=e.prefixCls,n=e.dropdownPrefixCls,r=e.mergedColumns,i=e.onFilterChange,l=e.getPopupContainer,c=e.locale,o=C.exports.useState(function(){return J2(r,!0)}),h=ze(o,2),p=h[0],g=h[1],b=C.exports.useMemo(function(){var A=J2(r,!1),O=!0;return A.forEach(function(M){var R=M.filteredKeys;R!==void 0&&(O=!1)}),O?p:A},[r,p]),w=C.exports.useMemo(function(){return Zk(b)},[b]),P=function(O){var M=b.filter(function(R){var N=R.key;return N!==O.key});M.push(O),g(M),i(Zk(M),M)},I=function(O){return NO(t,n,O,b,P,l,c)};return[I,b,w]}function hae(e,t,n){var r=C.exports.useRef({});function i(l){if(!r.current||r.current.data!==e||r.current.childrenColumnName!==t||r.current.getRowKey!==n){let h=function(p){p.forEach(function(g,b){var w=n(g,b);c.set(w,g),g&&sn(g)==="object"&&t in g&&h(g[t]||[])})};var o=h,c=new Map;h(e),r.current={data:e,childrenColumnName:t,kvMap:c,getRowKey:n}}return r.current.kvMap.get(l)}return[i]}var pae=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},DO=10;function mae(e,t){var n={current:t.current,pageSize:t.pageSize},r=e&&sn(e)==="object"?e:{};return Object.keys(r).forEach(function(i){var l=t[i];typeof l!="function"&&(n[i]=l)}),n}function vae(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(i){i&&Object.keys(i).forEach(function(l){var c=i[l];c!==void 0&&(e[l]=c)})}),e}function gae(e,t,n){var r=t&&sn(t)==="object"?t:{},i=r.total,l=i===void 0?0:i,c=pae(r,["total"]),o=C.exports.useState(function(){return{current:"defaultCurrent"in c?c.defaultCurrent:1,pageSize:"defaultPageSize"in c?c.defaultPageSize:DO}}),h=ze(o,2),p=h[0],g=h[1],b=vae(p,c,{total:l>0?l:e}),w=Math.ceil((l||e)/b.pageSize);b.current>w&&(b.current=w||1);var P=function(O,M){g({current:O!=null?O:1,pageSize:M||b.pageSize})},I=function(O,M){var R;t&&((R=t.onChange)===null||R===void 0||R.call(t,O,M)),P(O,M),n(O,M||(b==null?void 0:b.pageSize))};return t===!1?[{},function(){}]:[tt(tt({},b),{onChange:I}),P]}var Rl={},ew="SELECT_ALL",tw="SELECT_INVERT",nw="SELECT_NONE",Yk=[];function LO(e,t){var n=[];return(e||[]).forEach(function(r){n.push(r),r&&sn(r)==="object"&&t in r&&(n=[].concat(wt(n),wt(LO(r[t],t))))}),n}function yae(e,t){var n=e||{},r=n.preserveSelectedRowKeys,i=n.selectedRowKeys,l=n.defaultSelectedRowKeys,c=n.getCheckboxProps,o=n.onChange,h=n.onSelect,p=n.onSelectAll,g=n.onSelectInvert,b=n.onSelectNone,w=n.onSelectMultiple,P=n.columnWidth,I=n.type,A=n.selections,O=n.fixed,M=n.renderCell,R=n.hideSelectAll,N=n.checkStrictly,z=N===void 0?!0:N,B=t.prefixCls,U=t.data,q=t.pageData,H=t.getRecordByKey,te=t.getRowKey,Y=t.expandType,le=t.childrenColumnName,J=t.locale,Z=t.getPopupContainer,Q=Vi(i||l||Yk,{value:i}),ge=ze(Q,2),re=ge[0],de=ge[1],oe=C.exports.useRef(new Map),ye=C.exports.useCallback(function(lt){if(r){var dt=new Map;lt.forEach(function(ut){var it=H(ut);!it&&oe.current.has(ut)&&(it=oe.current.get(ut)),dt.set(ut,it)}),oe.current=dt}},[H,r]);C.exports.useEffect(function(){ye(re)},[re]);var Re=C.exports.useMemo(function(){return z?{keyEntities:null}:U0(U,{externalGetKey:te,childrenPropName:le})},[U,te,z,le]),Te=Re.keyEntities,ke=C.exports.useMemo(function(){return LO(q,le)},[q,le]),De=C.exports.useMemo(function(){var lt=new Map;return ke.forEach(function(dt,ut){var it=te(dt,ut),ft=(c?c(dt):null)||{};lt.set(it,ft)}),lt},[ke,te,c]),Me=C.exports.useCallback(function(lt){var dt;return!!(!((dt=De.get(te(lt)))===null||dt===void 0)&&dt.disabled)},[De,te]),Ne=C.exports.useMemo(function(){if(z)return[re||[],[]];var lt=Gs(re,!0,Te,Me),dt=lt.checkedKeys,ut=lt.halfCheckedKeys;return[dt||[],ut]},[re,z,Te,Me]),Le=ze(Ne,2),Ve=Le[0],qe=Le[1],Ue=C.exports.useMemo(function(){var lt=I==="radio"?Ve.slice(0,1):Ve;return new Set(lt)},[Ve,I]),ct=C.exports.useMemo(function(){return I==="radio"?new Set:new Set(qe)},[qe,I]),pt=C.exports.useState(null),Tt=ze(pt,2),Xe=Tt[0],Pt=Tt[1];C.exports.useEffect(function(){e||de(Yk)},[!!e]);var mt=C.exports.useCallback(function(lt,dt){var ut,it;ye(lt),r?(ut=lt,it=lt.map(function(ft){return oe.current.get(ft)})):(ut=[],it=[],lt.forEach(function(ft){var xt=H(ft);xt!==void 0&&(ut.push(ft),it.push(xt))})),de(ut),o==null||o(ut,it,{type:dt})},[de,H,o,r]),Mt=C.exports.useCallback(function(lt,dt,ut,it){if(h){var ft=ut.map(function(xt){return H(xt)});h(H(lt),dt,ft,it)}mt(ut,"single")},[h,H,mt]),Ct=C.exports.useMemo(function(){if(!A||R)return null;var lt=A===!0?[ew,tw,nw]:A;return lt.map(function(dt){return dt===ew?{key:"all",text:J.selectionAll,onSelect:function(){mt(U.map(function(it,ft){return te(it,ft)}).filter(function(it){var ft=De.get(it);return!(ft!=null&&ft.disabled)||Ue.has(it)}),"all")}}:dt===tw?{key:"invert",text:J.selectInvert,onSelect:function(){var it=new Set(Ue);q.forEach(function(xt,Wt){var Ut=te(xt,Wt),Qt=De.get(Ut);Qt!=null&&Qt.disabled||(it.has(Ut)?it.delete(Ut):it.add(Ut))});var ft=Array.from(it);g&&g(ft),mt(ft,"invert")}}:dt===nw?{key:"none",text:J.selectNone,onSelect:function(){b==null||b(),mt(Array.from(Ue).filter(function(it){var ft=De.get(it);return ft==null?void 0:ft.disabled}),"none")}}:dt}).map(function(dt){return tt(tt({},dt),{onSelect:function(){for(var it,ft,xt=arguments.length,Wt=new Array(xt),Ut=0;Ut<xt;Ut++)Wt[Ut]=arguments[Ut];(ft=dt.onSelect)===null||ft===void 0||(it=ft).call.apply(it,[dt].concat(Wt)),Pt(null)}})})},[A,Ue,q,te,g,mt]),Lt=C.exports.useCallback(function(lt){var dt;if(!e)return lt.filter(function(hn){return hn!==Rl});var ut=wt(lt),it=new Set(Ue),ft=ke.map(te).filter(function(hn){return!De.get(hn).disabled}),xt=ft.every(function(hn){return it.has(hn)}),Wt=ft.some(function(hn){return it.has(hn)}),Ut=function(){var Nt=[];xt?ft.forEach(function(ht){it.delete(ht),Nt.push(ht)}):ft.forEach(function(ht){it.has(ht)||(it.add(ht),Nt.push(ht))});var ot=Array.from(it);p==null||p(!xt,ot.map(function(ht){return H(ht)}),Nt.map(function(ht){return H(ht)})),mt(ot,"all"),Pt(null)},Qt;if(I!=="radio"){var Fe;if(Ct){var Ge={getPopupContainer:Z,items:Ct.map(function(hn,Nt){var ot=hn.key,ht=hn.text,At=hn.onSelect;return{key:ot||Nt,onClick:function(){At==null||At(ft)},label:ht}})};Fe=E("div",{className:"".concat(B,"-selection-extra"),children:E(_4,{menu:Ge,getPopupContainer:Z,children:E("span",{children:E(l7,{})})})})}var Xt=ke.map(function(hn,Nt){var ot=te(hn,Nt),ht=De.get(ot)||{};return tt({checked:it.has(ot)},ht)}).filter(function(hn){var Nt=hn.disabled;return Nt}),dn=!!Xt.length&&Xt.length===ke.length,Vt=dn&&Xt.every(function(hn){var Nt=hn.checked;return Nt}),jt=dn&&Xt.some(function(hn){var Nt=hn.checked;return Nt});Qt=!R&&Qe("div",{className:"".concat(B,"-selection"),children:[E(xc,{checked:dn?Vt:!!ke.length&&xt,indeterminate:dn?!Vt&&jt:!xt&&Wt,onChange:Ut,disabled:ke.length===0||dn,"aria-label":Fe?"Custom selection":"Select all",skipGroup:!0}),Fe]})}var nn;I==="radio"?nn=function(Nt,ot,ht){var At=te(ot,ht),$t=it.has(At);return{node:E(tA,{...De.get(At),checked:$t,onClick:function(Mn){return Mn.stopPropagation()},onChange:function(Mn){it.has(At)||Mt(At,!0,[At],Mn.nativeEvent)}}),checked:$t}}:nn=function(Nt,ot,ht){var At,$t=te(ot,ht),cn=it.has($t),Mn=ct.has($t),Gn=De.get($t),qn;return Y==="nest"?qn=Mn:qn=(At=Gn==null?void 0:Gn.indeterminate)!==null&&At!==void 0?At:Mn,{node:E(xc,{...Gn,indeterminate:qn,checked:cn,skipGroup:!0,onClick:function(K){return K.stopPropagation()},onChange:function(K){var G=K.nativeEvent,ce=G.shiftKey,ae=-1,xe=-1;if(ce&&z){var Ee=new Set([Xe,$t]);ft.some(function(Bt,gn){if(Ee.has(Bt))if(ae===-1)ae=gn;else return xe=gn,!0;return!1})}if(xe!==-1&&ae!==xe&&z){var be=ft.slice(ae,xe+1),Ce=[];cn?be.forEach(function(Bt){it.has(Bt)&&(Ce.push(Bt),it.delete(Bt))}):be.forEach(function(Bt){it.has(Bt)||(Ce.push(Bt),it.add(Bt))});var Oe=Array.from(it);w==null||w(!cn,Oe.map(function(Bt){return H(Bt)}),Ce.map(function(Bt){return H(Bt)})),mt(Oe,"multiple")}else{var He=Ve;if(z){var We=cn?is(He,$t):Ds(He,$t);Mt($t,!cn,We,G)}else{var Be=Gs([].concat(wt(He),[$t]),!0,Te,Me),Ot=Be.checkedKeys,bt=Be.halfCheckedKeys,Je=Ot;if(cn){var Rt=new Set(Ot);Rt.delete($t),Je=Gs(Array.from(Rt),{checked:!1,halfCheckedKeys:bt},Te,Me).checkedKeys}Mt($t,!cn,Je,G)}}Pt(cn?null:$t)}}),checked:cn}};var _n=function(Nt,ot,ht){var At=nn(Nt,ot,ht),$t=At.node,cn=At.checked;return M?M(cn,ot,ht,$t):$t};if(!ut.includes(Rl))if(ut.findIndex(function(hn){var Nt;return((Nt=hn[ip])===null||Nt===void 0?void 0:Nt.columnType)==="EXPAND_COLUMN"})===0){var An=ut,_t=OC(An),Gt=_t[0],an=_t.slice(1);ut=[Gt,Rl].concat(wt(an))}else ut=[Rl].concat(wt(ut));var Fn=ut.indexOf(Rl);ut=ut.filter(function(hn,Nt){return hn!==Rl||Nt===Fn});var kn=ut[Fn-1],zt=ut[Fn+1],Tn=O;Tn===void 0&&((zt==null?void 0:zt.fixed)!==void 0?Tn=zt.fixed:(kn==null?void 0:kn.fixed)!==void 0&&(Tn=kn.fixed)),Tn&&kn&&((dt=kn[ip])===null||dt===void 0?void 0:dt.columnType)==="EXPAND_COLUMN"&&kn.fixed===void 0&&(kn.fixed=Tn);var Cn=se({fixed:Tn,width:P,className:"".concat(B,"-selection-column"),title:e.columnTitle||Qt,render:_n},ip,{className:"".concat(B,"-selection-col")});return ut.map(function(hn){return hn===Rl?Cn:hn})},[te,ke,e,Ve,Ue,ct,P,Ct,Y,Xe,De,w,Mt,Me]);return[Lt,Ue]}var xae={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};const _ae=xae;var zO=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:_ae})})};zO.displayName="CaretDownOutlined";const bae=C.exports.forwardRef(zO);var wae={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"};const Cae=wae;var FO=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:Cae})})};FO.displayName="CaretUpOutlined";const Sae=C.exports.forwardRef(FO);var Ig="ascend",A_="descend";function Oy(e){return sn(e.sorter)==="object"&&typeof e.sorter.multiple=="number"?e.sorter.multiple:!1}function Qk(e){return typeof e=="function"?e:e&&sn(e)==="object"&&e.compare?e.compare:!1}function Eae(e,t){return t?e[e.indexOf(t)+1]:e[0]}function rw(e,t,n){var r=[];function i(l,c){r.push({column:l,key:Yd(l,c),multiplePriority:Oy(l),sortOrder:l.sortOrder})}return(e||[]).forEach(function(l,c){var o=G0(c,n);l.children?("sortOrder"in l&&i(l,o),r=[].concat(wt(r),wt(rw(l.children,t,o)))):l.sorter&&("sortOrder"in l?i(l,o):t&&l.defaultSortOrder&&r.push({column:l,key:Yd(l,o),multiplePriority:Oy(l),sortOrder:l.defaultSortOrder}))}),r}function $O(e,t,n,r,i,l,c,o){return(t||[]).map(function(h,p){var g=G0(p,o),b=h;if(b.sorter){var w=b.sortDirections||i,P=b.showSorterTooltip===void 0?c:b.showSorterTooltip,I=Yd(b,g),A=n.find(function(Y){var le=Y.key;return le===I}),O=A?A.sortOrder:null,M=Eae(w,O),R=w.includes(Ig)&&E(Sae,{className:Ye("".concat(e,"-column-sorter-up"),{active:O===Ig}),role:"presentation"}),N=w.includes(A_)&&E(bae,{className:Ye("".concat(e,"-column-sorter-down"),{active:O===A_}),role:"presentation"}),z=l||{},B=z.cancelSort,U=z.triggerAsc,q=z.triggerDesc,H=B;M===A_?H=q:M===Ig&&(H=U);var te=sn(P)==="object"?P:{title:H};b=tt(tt({},b),{className:Ye(b.className,se({},"".concat(e,"-column-sort"),O)),title:function(le){var J=Qe("div",{className:"".concat(e,"-column-sorters"),children:[E("span",{className:"".concat(e,"-column-title"),children:q0(h.title,le)}),E("span",{className:Ye("".concat(e,"-column-sorter"),se({},"".concat(e,"-column-sorter-full"),!!(R&&N))),children:Qe("span",{className:"".concat(e,"-column-sorter-inner"),children:[R,N]})})]});return P?E(oo,{...te,children:J}):J},onHeaderCell:function(le){var J=h.onHeaderCell&&h.onHeaderCell(le)||{},Z=J.onClick,Q=J.onKeyDown;J.onClick=function(de){r({column:h,key:I,sortOrder:M,multiplePriority:Oy(h)}),Z==null||Z(de)},J.onKeyDown=function(de){de.keyCode===Et.ENTER&&(r({column:h,key:I,sortOrder:M,multiplePriority:Oy(h)}),Q==null||Q(de))};var ge=gJ(h.title,{}),re=ge==null?void 0:ge.toString();return O?J["aria-sort"]=O==="ascend"?"ascending":"descending":J["aria-label"]=re||"",J.className=Ye(J.className,"".concat(e,"-column-has-sorters")),J.tabIndex=0,h.ellipsis&&(J.title=(ge!=null?ge:"").toString()),J}})}return"children"in b&&(b=tt(tt({},b),{children:$O(e,b.children,n,r,i,l,c,g)})),b})}function Jk(e){var t=e.column,n=e.sortOrder;return{column:t,order:n,field:t.dataIndex,columnKey:t.key}}function eT(e){var t=e.filter(function(n){var r=n.sortOrder;return r}).map(Jk);return t.length===0&&e.length?tt(tt({},Jk(e[e.length-1])),{column:void 0}):t.length<=1?t[0]||{}:t}function iw(e,t,n){var r=t.slice().sort(function(c,o){return o.multiplePriority-c.multiplePriority}),i=e.slice(),l=r.filter(function(c){var o=c.column.sorter,h=c.sortOrder;return Qk(o)&&h});return l.length?i.sort(function(c,o){for(var h=0;h<l.length;h+=1){var p=l[h],g=p.column.sorter,b=p.sortOrder,w=Qk(g);if(w&&b){var P=w(c,o,b);if(P!==0)return b===Ig?P:-P}}return 0}).map(function(c){var o=c[n];return o?tt(tt({},c),se({},n,iw(o,t,n))):c}):i}function kae(e){var t=e.prefixCls,n=e.mergedColumns,r=e.onSorterChange,i=e.sortDirections,l=e.tableLocale,c=e.showSorterTooltip,o=C.exports.useState(rw(n,!0)),h=ze(o,2),p=h[0],g=h[1],b=C.exports.useMemo(function(){var O=!0,M=rw(n,!1);if(!M.length)return p;var R=[];function N(B){O?R.push(B):R.push(tt(tt({},B),{sortOrder:null}))}var z=null;return M.forEach(function(B){z===null?(N(B),B.sortOrder&&(B.multiplePriority===!1?O=!1:z=!0)):(z&&B.multiplePriority!==!1||(O=!1),N(B))}),R},[n,p]),w=C.exports.useMemo(function(){var O=b.map(function(M){var R=M.column,N=M.sortOrder;return{column:R,order:N}});return{sortColumns:O,sortColumn:O[0]&&O[0].column,sortOrder:O[0]&&O[0].order}},[b]);function P(O){var M;O.multiplePriority===!1||!b.length||b[0].multiplePriority===!1?M=[O]:M=[].concat(wt(b.filter(function(R){var N=R.key;return N!==O.key})),[O]),g(M),r(eT(M),M)}var I=function(M){return $O(t,M,b,P,i,l,c)},A=function(){return eT(b)};return[I,b,w,A]}function BO(e,t){return e.map(function(n){var r=tt({},n);return r.title=q0(n.title,t),"children"in r&&(r.children=BO(r.children,t)),r})}function Tae(e){var t=C.exports.useCallback(function(n){return BO(n,e)},[e]);return[t]}var Pae=[];function Iae(e,t){var n,r=e.prefixCls,i=e.className,l=e.style,c=e.size,o=e.bordered,h=e.dropdownPrefixCls,p=e.dataSource,g=e.pagination,b=e.rowSelection,w=e.rowKey,P=w===void 0?"key":w,I=e.rowClassName,A=e.columns,O=e.children,M=e.childrenColumnName,R=e.onChange,N=e.getPopupContainer,z=e.loading,B=e.expandIcon,U=e.expandable,q=e.expandedRowRender,H=e.expandIconColumnIndex,te=e.indentSize,Y=e.scroll,le=e.sortDirections,J=e.locale,Z=e.showSorterTooltip,Q=Z===void 0?!0:Z;[["filterDropdownVisible","filterDropdownOpen"],["onFilterDropdownVisibleChange","onFilterDropdownOpenChange"]].forEach(function(We){var Be=ze(We,2);Be[0],Be[1]});var ge=C.exports.useMemo(function(){return A||R4(O)},[A,O]),re=C.exports.useMemo(function(){return ge.some(function(We){return We.responsive})},[ge]),de=v7(re),oe=C.exports.useMemo(function(){var We=new Set(Object.keys(de).filter(function(Be){return de[Be]}));return ge.filter(function(Be){return!Be.responsive||Be.responsive.some(function(Ot){return We.has(Ot)})})},[ge,de]),ye=mi(e,["className","style","columns"]),Re=C.exports.useContext(ms),Te=C.exports.useContext(Nn),ke=Te.locale,De=ke===void 0?Js:ke,Me=Te.renderEmpty,Ne=Te.direction,Le=c||Re,Ve=tt(tt({},De.Table),J),qe=p||Pae,Ue=C.exports.useContext(Nn),ct=Ue.getPrefixCls,pt=ct("table",r),Tt=ct("dropdown",h),Xe=tt({childrenColumnName:M,expandIconColumnIndex:H},U),Pt=Xe.childrenColumnName,mt=Pt===void 0?"children":Pt,Mt=C.exports.useMemo(function(){return qe.some(function(We){return We==null?void 0:We[mt]})?"nest":q||U&&U.expandedRowRender?"row":null},[qe]),Ct={body:C.exports.useRef()},Lt=C.exports.useMemo(function(){return typeof P=="function"?P:function(We){return We==null?void 0:We[P]}},[P]),lt=hae(qe,mt,Lt),dt=ze(lt,1),ut=dt[0],it={},ft=function(Be,Ot){var bt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Je=tt(tt({},it),Be);bt&&(it.resetPagination(),Je.pagination.current&&(Je.pagination.current=1),g&&g.onChange&&g.onChange(1,Je.pagination.pageSize)),Y&&Y.scrollToFirstRowOnChange!==!1&&Ct.body.current&&Kj(0,{getContainer:function(){return Ct.body.current}}),R==null||R(Je.pagination,Je.filters,Je.sorter,{currentDataSource:Xk(iw(qe,Je.sorterStates,mt),Je.filterStates),action:Ot})},xt=function(Be,Ot){ft({sorter:Be,sorterStates:Ot},"sort",!1)},Wt=kae({prefixCls:pt,mergedColumns:oe,onSorterChange:xt,sortDirections:le||["ascend","descend"],tableLocale:Ve,showSorterTooltip:Q}),Ut=ze(Wt,4),Qt=Ut[0],Fe=Ut[1],Ge=Ut[2],Xt=Ut[3],dn=C.exports.useMemo(function(){return iw(qe,Fe,mt)},[qe,Fe]);it.sorter=Xt(),it.sorterStates=Fe;var Vt=function(Be,Ot){ft({filters:Be,filterStates:Ot},"filter",!0)},jt=fae({prefixCls:pt,locale:Ve,dropdownPrefixCls:Tt,mergedColumns:oe,onFilterChange:Vt,getPopupContainer:N}),nn=ze(jt,3),_n=nn[0],An=nn[1],_t=nn[2],Gt=Xk(dn,An);it.filters=_t,it.filterStates=An;var an=C.exports.useMemo(function(){var We={};return Object.keys(_t).forEach(function(Be){_t[Be]!==null&&(We[Be]=_t[Be])}),tt(tt({},Ge),{filters:We})},[Ge,_t]),Fn=Tae(an),kn=ze(Fn,1),zt=kn[0],Tn=function(Be,Ot){ft({pagination:tt(tt({},it.pagination),{current:Be,pageSize:Ot})},"paginate")},Cn=gae(Gt.length,g,Tn),hn=ze(Cn,2),Nt=hn[0],ot=hn[1];it.pagination=g===!1?{}:mae(g,Nt),it.resetPagination=ot;var ht=C.exports.useMemo(function(){if(g===!1||!Nt.pageSize)return Gt;var We=Nt.current,Be=We===void 0?1:We,Ot=Nt.total,bt=Nt.pageSize,Je=bt===void 0?DO:bt;return Gt.length<Ot?Gt.length>Je?Gt.slice((Be-1)*Je,Be*Je):Gt:Gt.slice((Be-1)*Je,Be*Je)},[!!g,Gt,Nt&&Nt.current,Nt&&Nt.pageSize,Nt&&Nt.total]),At=yae(b,{prefixCls:pt,data:Gt,pageData:ht,getRowKey:Lt,getRecordByKey:ut,expandType:Mt,childrenColumnName:mt,locale:Ve,getPopupContainer:N}),$t=ze(At,2),cn=$t[0],Mn=$t[1],Gn=function(Be,Ot,bt){var Je;return typeof I=="function"?Je=Ye(I(Be,Ot,bt)):Je=Ye(I),Ye(se({},"".concat(pt,"-row-selected"),Mn.has(Lt(Be,Ot))),Je)};Xe.__PARENT_RENDER_ICON__=Xe.expandIcon,Xe.expandIcon=Xe.expandIcon||B||vJ(Ve),Mt==="nest"&&Xe.expandIconColumnIndex===void 0?Xe.expandIconColumnIndex=b?1:0:Xe.expandIconColumnIndex>0&&b&&(Xe.expandIconColumnIndex-=1),typeof Xe.indentSize!="number"&&(Xe.indentSize=typeof te=="number"?te:15);var qn=C.exports.useCallback(function(We){return zt(cn(_n(Qt(We))))},[Qt,_n,cn]),me,K;if(g!==!1&&(Nt==null?void 0:Nt.total)){var G;Nt.size?G=Nt.size:G=Le==="small"||Le==="middle"?"small":void 0;var ce=function(Be){return E(EY,{...Nt,className:Ye("".concat(pt,"-pagination ").concat(pt,"-pagination-").concat(Be),Nt.className),size:G})},ae=Ne==="rtl"?"left":"right",xe=Nt.position;if(xe!==null&&Array.isArray(xe)){var Ee=xe.find(function(We){return We.includes("top")}),be=xe.find(function(We){return We.includes("bottom")}),Ce=xe.every(function(We){return"".concat(We)==="none"});!Ee&&!be&&!Ce&&(K=ce(ae)),Ee&&(me=ce(Ee.toLowerCase().replace("top",""))),be&&(K=ce(be.toLowerCase().replace("bottom","")))}else K=ce(ae)}var Oe;typeof z=="boolean"?Oe={spinning:z}:sn(z)==="object"&&(Oe=tt({spinning:!0},z));var He=Ye("".concat(pt,"-wrapper"),se({},"".concat(pt,"-wrapper-rtl"),Ne==="rtl"),i);return E("div",{ref:t,className:He,style:l,children:Qe(P4,{spinning:!1,...Oe,children:[me,E(Pc,{...ye,columns:oe,direction:Ne,expandable:Xe,prefixCls:pt,className:Ye((n={},se(n,"".concat(pt,"-middle"),Le==="middle"),se(n,"".concat(pt,"-small"),Le==="small"),se(n,"".concat(pt,"-bordered"),o),se(n,"".concat(pt,"-empty"),qe.length===0),n)),data:ht,rowKey:Lt,rowClassName:Gn,emptyText:J&&J.emptyText||(Me||s4)("Table"),internalHooks:Pg,internalRefs:Ct,transformColumns:qn}),K]})})}var Mae=C.exports.forwardRef(Iae),sl=Mae;sl.SELECTION_COLUMN=Rl;sl.EXPAND_COLUMN=Pc.EXPAND_COLUMN;sl.SELECTION_ALL=ew;sl.SELECTION_INVERT=tw;sl.SELECTION_NONE=nw;sl.Column=pJ;sl.ColumnGroup=mJ;sl.Summary=aO;const Rae=sl;var VO=C.exports.createContext(null),UO=C.exports.createContext(null);function Aae(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function Oae(e){var t=e||{},n=t.label,r=t.value,i=t.children,l=r||"value";return{_title:n?[n]:["title","label"],value:l,key:l,children:i||"children"}}function ow(e){return!e||e.disabled||e.disableCheckbox||e.checkable===!1}function Nae(e,t){var n=[];function r(i){i.forEach(function(l){var c=l[t.children];c&&(n.push(l[t.value]),r(c))})}return r(e),n}function tT(e){return e==null}var Dae={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Lae=function(t,n){var r=ER(),i=r.prefixCls,l=r.multiple,c=r.searchValue,o=r.toggleOpen,h=r.open,p=r.notFoundContent,g=C.exports.useContext(UO),b=g.virtual,w=g.listHeight,P=g.listItemHeight,I=g.treeData,A=g.fieldNames,O=g.onSelect,M=g.dropdownMatchSelectWidth,R=g.treeExpandAction,N=C.exports.useContext(VO),z=N.checkable,B=N.checkedKeys,U=N.halfCheckedKeys,q=N.treeExpandedKeys,H=N.treeDefaultExpandAll,te=N.treeDefaultExpandedKeys,Y=N.onTreeExpand,le=N.treeIcon,J=N.showTreeIcon,Z=N.switcherIcon,Q=N.treeLine,ge=N.treeNodeFilterProp,re=N.loadData,de=N.treeLoadedKeys,oe=N.treeMotion,ye=N.onTreeLoad,Re=N.keyEntities,Te=C.exports.useRef(),ke=Kp(function(){return I},[h,I],function(xt,Wt){return Wt[0]&&xt[1]!==Wt[1]}),De=C.exports.useMemo(function(){return z?{checked:B,halfChecked:U}:null},[z,B,U]);C.exports.useEffect(function(){if(h&&!l&&B.length){var xt;(xt=Te.current)===null||xt===void 0||xt.scrollTo({key:B[0]})}},[h]);var Me=String(c).toLowerCase(),Ne=function(Wt){return Me?String(Wt[ge]).toLowerCase().includes(Me):!1},Le=C.exports.useState(te),Ve=ze(Le,2),qe=Ve[0],Ue=Ve[1],ct=C.exports.useState(null),pt=ze(ct,2),Tt=pt[0],Xe=pt[1],Pt=C.exports.useMemo(function(){return q?wt(q):c?Tt:qe},[qe,Tt,q,c]);C.exports.useEffect(function(){c&&Xe(Nae(I,A))},[c]);var mt=function(Wt){Ue(Wt),Xe(Wt),Y&&Y(Wt)},Mt=function(Wt){Wt.preventDefault()},Ct=function(Wt,Ut){var Qt=Ut.node;z&&ow(Qt)||(O(Qt.key,{selected:!B.includes(Qt.key)}),l||o(!1))},Lt=C.exports.useState(null),lt=ze(Lt,2),dt=lt[0],ut=lt[1],it=Re[dt];if(C.exports.useImperativeHandle(n,function(){var xt;return{scrollTo:(xt=Te.current)===null||xt===void 0?void 0:xt.scrollTo,onKeyDown:function(Ut){var Qt,Fe=Ut.which;switch(Fe){case Et.UP:case Et.DOWN:case Et.LEFT:case Et.RIGHT:(Qt=Te.current)===null||Qt===void 0||Qt.onKeyDown(Ut);break;case Et.ENTER:{if(it){var Ge=(it==null?void 0:it.node)||{},Xt=Ge.selectable,dn=Ge.value;Xt!==!1&&Ct(null,{node:{key:dt},selected:!B.includes(dn)})}break}case Et.ESC:o(!1)}},onKeyUp:function(){}}}),ke.length===0)return E("div",{role:"listbox",className:"".concat(i,"-empty"),onMouseDown:Mt,children:p});var ft={fieldNames:A};return de&&(ft.loadedKeys=de),Pt&&(ft.expandedKeys=Pt),Qe("div",{onMouseDown:Mt,children:[it&&h&&E("span",{style:Dae,"aria-live":"assertive",children:it.node.value}),E(J0,{ref:Te,focusable:!1,prefixCls:"".concat(i,"-tree"),treeData:ke,height:w,itemHeight:P,virtual:b!==!1&&M!==!1,multiple:l,icon:le,showIcon:J,switcherIcon:Z,showLine:Q,loadData:c?null:re,motion:oe,activeKey:dt,checkable:z,checkStrictly:!0,checkedKeys:De,selectedKeys:z?[]:B,defaultExpandAll:H,...ft,onActiveChange:ut,onSelect:Ct,onCheck:Ct,onExpand:mt,onLoad:ye,filterTreeNode:Ne,expandAction:R})]})},jO=C.exports.forwardRef(Lae);jO.displayName="OptionList";var D4=function(){return null},KO="SHOW_ALL",L4="SHOW_PARENT",e1="SHOW_CHILD";function nT(e,t,n,r){var i=new Set(e);return t===e1?e.filter(function(l){var c=n[l];return!(c&&c.children&&c.children.some(function(o){var h=o.node;return i.has(h[r.value])})&&c.children.every(function(o){var h=o.node;return ow(h)||i.has(h[r.value])}))}):t===L4?e.filter(function(l){var c=n[l],o=c?c.parent:null;return!(o&&!ow(o.node)&&i.has(o.key))}):e}var zae=["children","value"];function HO(e){return Xi(e).map(function(t){if(!C.exports.isValidElement(t)||!t.type)return null;var n=t,r=n.key,i=n.props,l=i.children,c=i.value,o=In(i,zae),h=ve({key:r,value:c},o),p=HO(l);return p.length&&(h.children=p),h}).filter(function(t){return t})}function aw(e){if(!e)return e;var t=ve({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Nr(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),t}}),t}function Fae(e,t,n,r,i,l){var c=null,o=null;function h(){function p(g){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return g.map(function(P,I){var A="".concat(b,"-").concat(I),O=P[l.value],M=n.includes(O),R=p(P[l.children]||[],A,M),N=E(D4,{...P,children:R.map(function(B){return B.node})});if(t===O&&(c=N),M){var z={pos:A,node:N,children:R};return w||o.push(z),z}return null}).filter(function(P){return P})}o||(o=[],p(r),o.sort(function(g,b){var w=g.node.props.value,P=b.node.props.value,I=n.indexOf(w),A=n.indexOf(P);return I-A}))}Object.defineProperty(e,"triggerNode",{get:function(){return Nr(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),h(),c}}),Object.defineProperty(e,"allCheckedNodes",{get:function(){return Nr(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),h(),i?o:o.map(function(g){var b=g.node;return b})}})}function $ae(e,t){var n=t.id,r=t.pId,i=t.rootPId,l={},c=[],o=e.map(function(h){var p=ve({},h),g=p[n];return l[g]=p,p.key=p.key||g,p});return o.forEach(function(h){var p=h[r],g=l[p];g&&(g.children=g.children||[],g.children.push(h)),(p===i||!g&&i===null)&&c.push(h)}),c}function Bae(e,t,n){return C.exports.useMemo(function(){return e?n?$ae(e,ve({id:"id",pId:"pId",rootPId:null},n!==!0?n:{})):e:HO(t)},[t,n,e])}const Vae=function(e){var t=C.exports.useRef({valueLabels:new Map});return C.exports.useMemo(function(){var n=t.current.valueLabels,r=new Map,i=e.map(function(l){var c,o=l.value,h=(c=l.label)!==null&&c!==void 0?c:n.get(o);return r.set(o,h),ve(ve({},l),{},{label:h})});return t.current.valueLabels=r,[i]},[e])};function rT(e){var t=C.exports.useRef();t.current=e;var n=C.exports.useCallback(function(){return t.current.apply(t,arguments)},[]);return n}const Uae=function(e,t){return C.exports.useMemo(function(){var n=U0(e,{fieldNames:t,initWrapper:function(i){return ve(ve({},i),{},{valueEntities:new Map})},processEntity:function(i,l){var c=i.node[t.value];l.valueEntities.set(c,i)}});return n},[e,t])},jae=function(e,t,n,r){return C.exports.useMemo(function(){var i=e.map(function(h){var p=h.value;return p}),l=t.map(function(h){var p=h.value;return p}),c=i.filter(function(h){return!r[h]});if(n){var o=Gs(i,!0,r);i=o.checkedKeys,l=o.halfCheckedKeys}return[Array.from(new Set([].concat(wt(c),wt(i)))),l]},[e,t,n,r])},Kae=function(e,t,n){var r=n.treeNodeFilterProp,i=n.filterTreeNode,l=n.fieldNames,c=l.children;return C.exports.useMemo(function(){if(!t||i===!1)return e;var o;if(typeof i=="function")o=i;else{var h=t.toUpperCase();o=function(b,w){var P=w[r];return String(P).toUpperCase().includes(h)}}function p(g){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return g.map(function(w){var P=w[c],I=b||o(t,aw(w)),A=p(P||[],I);return I||A.length?ve(ve({},w),{},se({isLeaf:void 0},c,A)):null}).filter(function(w){return w})}return p(e)},[e,t,c,r,i])};var Hae=["id","prefixCls","value","defaultValue","onChange","onSelect","onDeselect","searchValue","inputValue","onSearch","autoClearSearchValue","filterTreeNode","treeNodeFilterProp","showCheckedStrategy","treeNodeLabelProp","multiple","treeCheckable","treeCheckStrictly","labelInValue","fieldNames","treeDataSimpleMode","treeData","children","loadData","treeLoadedKeys","onTreeLoad","treeDefaultExpandAll","treeExpandedKeys","treeDefaultExpandedKeys","onTreeExpand","treeExpandAction","virtual","listHeight","listItemHeight","onDropdownVisibleChange","dropdownMatchSelectWidth","treeLine","treeIcon","showTreeIcon","switcherIcon","treeMotion"];function Wae(e){return!e||sn(e)!=="object"}var Gae=C.exports.forwardRef(function(e,t){var n=e.id,r=e.prefixCls,i=r===void 0?"rc-tree-select":r,l=e.value,c=e.defaultValue,o=e.onChange,h=e.onSelect,p=e.onDeselect,g=e.searchValue,b=e.inputValue,w=e.onSearch,P=e.autoClearSearchValue,I=P===void 0?!0:P,A=e.filterTreeNode,O=e.treeNodeFilterProp,M=O===void 0?"value":O,R=e.showCheckedStrategy,N=R===void 0?e1:R,z=e.treeNodeLabelProp,B=e.multiple,U=e.treeCheckable,q=e.treeCheckStrictly,H=e.labelInValue,te=e.fieldNames,Y=e.treeDataSimpleMode,le=e.treeData,J=e.children,Z=e.loadData,Q=e.treeLoadedKeys,ge=e.onTreeLoad,re=e.treeDefaultExpandAll,de=e.treeExpandedKeys,oe=e.treeDefaultExpandedKeys,ye=e.onTreeExpand,Re=e.treeExpandAction,Te=e.virtual,ke=e.listHeight,De=ke===void 0?200:ke,Me=e.listItemHeight,Ne=Me===void 0?20:Me,Le=e.onDropdownVisibleChange,Ve=e.dropdownMatchSelectWidth,qe=Ve===void 0?!0:Ve,Ue=e.treeLine,ct=e.treeIcon,pt=e.showTreeIcon,Tt=e.switcherIcon,Xe=e.treeMotion,Pt=In(e,Hae),mt=ZR(n),Mt=U&&!q,Ct=U||q,Lt=q||H,lt=Ct||B,dt=Vi(c,{value:l}),ut=ze(dt,2),it=ut[0],ft=ut[1],xt=C.exports.useMemo(function(){return Oae(te)},[JSON.stringify(te)]),Wt=Vi("",{value:g!==void 0?g:b,postState:function(xe){return xe||""}}),Ut=ze(Wt,2),Qt=Ut[0],Fe=Ut[1],Ge=function(xe){Fe(xe),w==null||w(xe)},Xt=Bae(le,J,Y),dn=Uae(Xt,xt),Vt=dn.keyEntities,jt=dn.valueEntities,nn=C.exports.useCallback(function(ae){var xe=[],Ee=[];return ae.forEach(function(be){jt.has(be)?Ee.push(be):xe.push(be)}),{missingRawValues:xe,existRawValues:Ee}},[jt]),_n=Kae(Xt,Qt,{fieldNames:xt,treeNodeFilterProp:M,filterTreeNode:A}),An=C.exports.useCallback(function(ae){if(ae){if(z)return ae[z];for(var xe=xt._title,Ee=0;Ee<xe.length;Ee+=1){var be=ae[xe[Ee]];if(be!==void 0)return be}}},[xt,z]),_t=C.exports.useCallback(function(ae){var xe=Aae(ae);return xe.map(function(Ee){return Wae(Ee)?{value:Ee}:Ee})},[]),Gt=C.exports.useCallback(function(ae){var xe=_t(ae);return xe.map(function(Ee){var be=Ee.label,Ce=Ee.value,Oe=Ee.halfChecked,He,We=jt.get(Ce);if(We){var Be;be=(Be=be)!==null&&Be!==void 0?Be:An(We.node),He=We.node.disabled}else if(be===void 0){var Ot=_t(it).find(function(bt){return bt.value===Ce});be=Ot.label}return{label:be,value:Ce,halfChecked:Oe,disabled:He}})},[jt,An,_t,it]),an=C.exports.useMemo(function(){return _t(it)},[_t,it]),Fn=C.exports.useMemo(function(){var ae=[],xe=[];return an.forEach(function(Ee){Ee.halfChecked?xe.push(Ee):ae.push(Ee)}),[ae,xe]},[an]),kn=ze(Fn,2),zt=kn[0],Tn=kn[1],Cn=C.exports.useMemo(function(){return zt.map(function(ae){return ae.value})},[zt]),hn=jae(zt,Tn,Mt,Vt),Nt=ze(hn,2),ot=Nt[0],ht=Nt[1],At=C.exports.useMemo(function(){var ae=nT(ot,N,Vt,xt),xe=ae.map(function(Oe){var He,We,Be;return(He=(We=Vt[Oe])===null||We===void 0||(Be=We.node)===null||Be===void 0?void 0:Be[xt.value])!==null&&He!==void 0?He:Oe}),Ee=xe.map(function(Oe){var He=zt.find(function(We){return We.value===Oe});return{value:Oe,label:He==null?void 0:He.label}}),be=Gt(Ee),Ce=be[0];return!lt&&Ce&&tT(Ce.value)&&tT(Ce.label)?[]:be.map(function(Oe){var He;return ve(ve({},Oe),{},{label:(He=Oe.label)!==null&&He!==void 0?He:Oe.value})})},[xt,lt,ot,zt,Gt,N,Vt]),$t=Vae(At),cn=ze($t,1),Mn=cn[0],Gn=rT(function(ae,xe,Ee){var be=Gt(ae);if(ft(be),I&&Fe(""),o){var Ce=ae;if(Mt){var Oe=nT(ae,N,Vt,xt);Ce=Oe.map(function(on){var yn=jt.get(on);return yn?yn.node[xt.value]:on})}var He=xe||{triggerValue:void 0,selected:void 0},We=He.triggerValue,Be=He.selected,Ot=Ce;if(q){var bt=Tn.filter(function(on){return!Ce.includes(on.value)});Ot=[].concat(wt(Ot),wt(bt))}var Je=Gt(Ot),Rt={preValue:zt,triggerValue:We},Bt=!0;(q||Ee==="selection"&&!Be)&&(Bt=!1),Fae(Rt,We,ae,Xt,Bt,xt),Ct?Rt.checked=Be:Rt.selected=Be;var gn=Lt?Je:Je.map(function(on){return on.value});o(lt?gn:gn[0],Lt?null:Je.map(function(on){return on.label}),Rt)}}),qn=C.exports.useCallback(function(ae,xe){var Ee,be=xe.selected,Ce=xe.source,Oe=Vt[ae],He=Oe==null?void 0:Oe.node,We=(Ee=He==null?void 0:He[xt.value])!==null&&Ee!==void 0?Ee:ae;if(!lt)Gn([We],{selected:!0,triggerValue:We},"option");else{var Be=be?[].concat(wt(Cn),[We]):ot.filter(function(yn){return yn!==We});if(Mt){var Ot=nn(Be),bt=Ot.missingRawValues,Je=Ot.existRawValues,Rt=Je.map(function(yn){return jt.get(yn).key}),Bt;if(be){var gn=Gs(Rt,!0,Vt);Bt=gn.checkedKeys}else{var on=Gs(Rt,{checked:!1,halfCheckedKeys:ht},Vt);Bt=on.checkedKeys}Be=[].concat(wt(bt),wt(Bt.map(function(yn){return Vt[yn].node[xt.value]})))}Gn(Be,{selected:be,triggerValue:We},Ce||"option")}be||!lt?h==null||h(We,aw(He)):p==null||p(We,aw(He))},[nn,jt,Vt,xt,lt,Cn,Gn,Mt,h,p,ot,ht]),me=C.exports.useCallback(function(ae){if(Le){var xe={};Object.defineProperty(xe,"documentClickClose",{get:function(){return Nr(!1,"Second param of `onDropdownVisibleChange` has been removed."),!1}}),Le(ae,xe)}},[Le]),K=rT(function(ae,xe){var Ee=ae.map(function(be){return be.value});if(xe.type==="clear"){Gn(Ee,{},"selection");return}xe.values.length&&qn(xe.values[0].value,{selected:!1,source:"selection"})}),G=C.exports.useMemo(function(){return{virtual:Te,dropdownMatchSelectWidth:qe,listHeight:De,listItemHeight:Ne,treeData:_n,fieldNames:xt,onSelect:qn,treeExpandAction:Re}},[Te,qe,De,Ne,_n,xt,qn,Re]),ce=C.exports.useMemo(function(){return{checkable:Ct,loadData:Z,treeLoadedKeys:Q,onTreeLoad:ge,checkedKeys:ot,halfCheckedKeys:ht,treeDefaultExpandAll:re,treeExpandedKeys:de,treeDefaultExpandedKeys:oe,onTreeExpand:ye,treeIcon:ct,treeMotion:Xe,showTreeIcon:pt,switcherIcon:Tt,treeLine:Ue,treeNodeFilterProp:M,keyEntities:Vt}},[Ct,Z,Q,ge,ot,ht,re,de,oe,ye,ct,Xe,pt,Tt,Ue,M,Vt]);return E(UO.Provider,{value:G,children:E(VO.Provider,{value:ce,children:E(qR,{ref:t,...Pt,id:mt,prefixCls:i,mode:lt?"multiple":void 0,displayValues:Mn,onDisplayValuesChange:K,searchValue:Qt,onSearch:Ge,OptionList:jO,emptyOptions:!Xt.length,onDropdownVisibleChange:me,dropdownMatchSelectWidth:qe})})})}),sm=Gae;sm.TreeNode=D4;sm.SHOW_ALL=KO;sm.SHOW_PARENT=L4;sm.SHOW_CHILD=e1;var qae=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Zae=function(t,n){var r,i=t.prefixCls,l=t.size,c=t.disabled,o=t.bordered,h=o===void 0?!0:o,p=t.className,g=t.treeCheckable,b=t.multiple,w=t.listHeight,P=w===void 0?256:w,I=t.listItemHeight,A=I===void 0?26:I,O=t.placement,M=t.notFoundContent,R=t.switcherIcon,N=t.treeLine,z=t.getPopupContainer,B=t.dropdownClassName,U=t.popupClassName,q=t.treeIcon,H=q===void 0?!1:q,te=t.transitionName,Y=t.choiceTransitionName,le=Y===void 0?"":Y,J=t.status,Z=t.showArrow,Q=t.treeExpandAction,ge=qae(t,["prefixCls","size","disabled","bordered","className","treeCheckable","multiple","listHeight","listItemHeight","placement","notFoundContent","switcherIcon","treeLine","getPopupContainer","dropdownClassName","popupClassName","treeIcon","transitionName","choiceTransitionName","status","showArrow","treeExpandAction"]),re=C.exports.useContext(Nn),de=re.getPopupContainer,oe=re.getPrefixCls,ye=re.renderEmpty,Re=re.direction,Te=re.virtual,ke=re.dropdownMatchSelectWidth,De=C.exports.useContext(ms),Me=oe("select",i),Ne=oe("select-tree",i),Le=oe("tree-select",i),Ve=ff(Me,Re),qe=Ve.compactSize,Ue=Ve.compactItemClassnames,ct=Ye(U||B,"".concat(Le,"-dropdown"),se({},"".concat(Le,"-dropdown-rtl"),Re==="rtl")),pt=!!(g||b),Tt=Z!==void 0?Z:ge.loading||!pt,Xe=C.exports.useContext(Yo),Pt=Xe.status,mt=Xe.hasFeedback,Mt=Xe.isFormItemInput,Ct=Xe.feedbackIcon,Lt=Xp(Pt,J),lt=d7(tt(tt({},ge),{multiple:pt,showArrow:Tt,hasFeedback:mt,feedbackIcon:Ct,prefixCls:Me})),dt=lt.suffixIcon,ut=lt.removeIcon,it=lt.clearIcon,ft;M!==void 0?ft=M:ft=(ye||s4)("Select");var xt=mi(ge,["suffixIcon","itemIcon","removeIcon","clearIcon","switcherIcon"]),Wt=function(){return O!==void 0?O:Re==="rtl"?"bottomRight":"bottomLeft"},Ut=qe||l||De,Qt=C.exports.useContext(pu),Fe=c!=null?c:Qt,Ge=Ye(!i&&Le,(r={},se(r,"".concat(Me,"-lg"),Ut==="large"),se(r,"".concat(Me,"-sm"),Ut==="small"),se(r,"".concat(Me,"-rtl"),Re==="rtl"),se(r,"".concat(Me,"-borderless"),!h),se(r,"".concat(Me,"-in-form-item"),Mt),r),eu(Me,Lt,mt),Ue,p),Xt=oe();return E(sm,{virtual:Te,dropdownMatchSelectWidth:ke,disabled:Fe,...xt,ref:n,prefixCls:Me,className:Ge,listHeight:P,listItemHeight:A,treeCheckable:g&&E("span",{className:"".concat(Me,"-tree-checkbox-inner")}),treeLine:!!N,inputIcon:dt,multiple:b,placement:Wt(),removeIcon:ut,clearIcon:it,switcherIcon:function(Vt){return PO(Ne,R,N,Vt)},showTreeIcon:H,notFoundContent:ft,getPopupContainer:z||de,treeMotion:null,dropdownClassName:ct,choiceTransitionName:el(Xt,"",le),transitionName:el(Xt,i7(O),te),showArrow:mt||Z,treeExpandAction:Q})},Xae=C.exports.forwardRef(Zae),lm=Xae;lm.TreeNode=D4;lm.SHOW_ALL=KO;lm.SHOW_PARENT=L4;lm.SHOW_CHILD=e1;const WO=lm;var Yae={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};const Qae=Yae;var GO=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:Qae})})};GO.displayName="CopyOutlined";const Jae=C.exports.forwardRef(GO);var ese={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};const tse=ese;var qO=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:tse})})};qO.displayName="EditOutlined";const nse=C.exports.forwardRef(qO);var rse=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(i){e.addRange(i)}),t&&t.focus()}},ise=rse,iT={"text/plain":"Text","text/html":"Url",default:"Text"},ose="Copy to clipboard: #{key}, Enter";function ase(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function sse(e,t){var n,r,i,l,c,o,h=!1;t||(t={}),n=t.debug||!1;try{i=ise(),l=document.createRange(),c=document.getSelection(),o=document.createElement("span"),o.textContent=e,o.ariaHidden="true",o.style.all="unset",o.style.position="fixed",o.style.top=0,o.style.clip="rect(0, 0, 0, 0)",o.style.whiteSpace="pre",o.style.webkitUserSelect="text",o.style.MozUserSelect="text",o.style.msUserSelect="text",o.style.userSelect="text",o.addEventListener("copy",function(g){if(g.stopPropagation(),t.format)if(g.preventDefault(),typeof g.clipboardData>"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var b=iT[t.format]||iT.default;window.clipboardData.setData(b,e)}else g.clipboardData.clearData(),g.clipboardData.setData(t.format,e);t.onCopy&&(g.preventDefault(),t.onCopy(g.clipboardData))}),document.body.appendChild(o),l.selectNodeContents(o),c.addRange(l);var p=document.execCommand("copy");if(!p)throw new Error("copy command was unsuccessful");h=!0}catch(g){n&&console.error("unable to copy using execCommand: ",g),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),h=!0}catch(b){n&&console.error("unable to copy using clipboardData: ",b),n&&console.error("falling back to prompt"),r=ase("message"in t?t.message:ose),window.prompt(r,e)}}finally{c&&(typeof c.removeRange=="function"?c.removeRange(l):c.removeAllRanges()),o&&document.body.removeChild(o),i()}return h}var lse=sse,use={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"};const cse=use;var ZO=function(t,n){return E(lr,{...ve(ve({},t),{},{ref:n,icon:cse})})};ZO.displayName="EnterOutlined";const dse=C.exports.forwardRef(ZO);var fse=function(t){var n=t.prefixCls,r=t["aria-label"],i=t.className,l=t.style,c=t.direction,o=t.maxLength,h=t.autoSize,p=h===void 0?!0:h,g=t.value,b=t.onSave,w=t.onCancel,P=t.onEnd,I=t.component,A=t.enterIcon,O=A===void 0?E(dse,{}):A,M=C.exports.useRef(null),R=C.exports.useRef(!1),N=C.exports.useRef(),z=C.exports.useState(g),B=ze(z,2),U=B[0],q=B[1];C.exports.useEffect(function(){q(g)},[g]),C.exports.useEffect(function(){if(M.current&&M.current.resizableTextArea){var de=M.current.resizableTextArea.textArea;de.focus();var oe=de.value.length;de.setSelectionRange(oe,oe)}},[]);var H=function(oe){var ye=oe.target;q(ye.value.replace(/[\n\r]/g,""))},te=function(){R.current=!0},Y=function(){R.current=!1},le=function(oe){var ye=oe.keyCode;R.current||(N.current=ye)},J=function(){b(U.trim())},Z=function(oe){var ye=oe.keyCode,Re=oe.ctrlKey,Te=oe.altKey,ke=oe.metaKey,De=oe.shiftKey;N.current===ye&&!R.current&&!Re&&!Te&&!ke&&!De&&(ye===Et.ENTER?(J(),P==null||P()):ye===Et.ESC&&w())},Q=function(){J()},ge=I?"".concat(n,"-").concat(I):"",re=Ye(n,"".concat(n,"-edit-content"),se({},"".concat(n,"-rtl"),c==="rtl"),i,ge);return Qe("div",{className:re,style:l,children:[E(kA,{ref:M,maxLength:o,value:U,onChange:H,onKeyDown:le,onKeyUp:Z,onCompositionStart:te,onCompositionEnd:Y,onBlur:Q,"aria-label":r,rows:1,autoSize:p}),O!==null?Ei(O,{className:"".concat(n,"-edit-content-confirm")}):null]})};const hse=fse;function O_(e,t){return C.exports.useMemo(function(){var n=!!e;return[n,tt(tt({},t),n&&sn(e)==="object"?e:null)]},[e])}var pse=function(t,n){var r=C.exports.useRef(!1);C.exports.useEffect(function(){r.current?t():r.current=!0},n)};const mse=pse;var vse=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},gse=C.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.component,i=r===void 0?"article":r,l=e.className,c=e.setContentRef,o=e.children,h=e.direction,p=vse(e,["prefixCls","component","className","setContentRef","children","direction"]),g=C.exports.useContext(Nn),b=g.getPrefixCls,w=g.direction,P=h!=null?h:w,I=t;c&&(I=Lo(t,c));var A=b("typography",n),O=Ye(A,se({},"".concat(A,"-rtl"),P==="rtl"),l);return E(i,{className:O,ref:I,...p,children:o})});const XO=gse;function YO(e){var t=sn(e);return t==="string"||t==="number"}function yse(e){var t=0;return e.forEach(function(n){YO(n)?t+=String(n).length:t+=1}),t}function oT(e,t){for(var n=0,r=[],i=0;i<e.length;i+=1){if(n===t)return r;var l=e[i],c=YO(l),o=c?String(l).length:1,h=n+o;if(h>t){var p=t-n;return r.push(String(l).slice(0,p)),r}r.push(l),n=h}return e}var xse=0,ng=1,aT=2,N_=3,sT=4,_se=function(t){var n=t.enabledMeasure,r=t.children,i=t.text,l=t.width,c=t.fontSize,o=t.rows,h=t.onEllipsis,p=C.exports.useState([0,0,0]),g=ze(p,2),b=ze(g[0],3),w=b[0],P=b[1],I=b[2],A=g[1],O=C.exports.useState(xse),M=ze(O,2),R=M[0],N=M[1],z=C.exports.useState(0),B=ze(z,2),U=B[0],q=B[1],H=C.exports.useRef(null),te=C.exports.useRef(null),Y=C.exports.useMemo(function(){return Xi(i)},[i]),le=C.exports.useMemo(function(){return yse(Y)},[Y]),J=C.exports.useMemo(function(){return!n||R!==N_?r(Y,!1):r(oT(Y,P),P<le)},[n,R,r,Y,P,le]);si(function(){n&&l&&c&&le&&(N(ng),A([0,Math.ceil(le/2),le]))},[n,l,c,i,le,o]),si(function(){var re;R===ng&&q(((re=H.current)===null||re===void 0?void 0:re.offsetHeight)||0)},[R]),si(function(){var re,de;if(U){if(R===ng){var oe=((re=te.current)===null||re===void 0?void 0:re.offsetHeight)||0,ye=o*U;oe<=ye?(N(sT),h(!1)):N(aT)}else if(R===aT)if(w!==I){var Re=((de=te.current)===null||de===void 0?void 0:de.offsetHeight)||0,Te=o*U,ke=w,De=I;w===I-1?De=w:Re<=Te?ke=P:De=P;var Me=Math.ceil((ke+De)/2);A([ke,Me,De])}else N(N_),h(!0)}},[R,w,I,o,U]);var Z={width:l,whiteSpace:"normal",margin:0,padding:0},Q=function(de,oe,ye){return E("span",{"aria-hidden":!0,ref:oe,style:tt({position:"fixed",display:"block",left:0,top:0,zIndex:-9999,visibility:"hidden",pointerEvents:"none",fontSize:Math.floor(c/2)*2},ye),children:de})},ge=function(de,oe){var ye=oT(Y,de);return Q(r(ye,!0),oe,Z)};return Qe($n,{children:[J,n&&R!==N_&&R!==sT&&Qe($n,{children:[Q("lg",H,{wordBreak:"keep-all",whiteSpace:"nowrap"}),R===ng?Q(r(Y,!1),te,Z):ge(P,te)]})]})};const bse=_se;var wse=function(t){var n=t.enabledEllipsis,r=t.isEllipsis,i=t.children,l=t.tooltipProps;return!(l!=null&&l.title)||!n?i:E(oo,{open:r?void 0:!1,...l,children:i})};const Cse=wse;var Sse=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Ese(e,t){var n=e.mark,r=e.code,i=e.underline,l=e.delete,c=e.strong,o=e.keyboard,h=e.italic,p=t;function g(b,w){!b||(p=C.exports.createElement(w,{},p))}return g(c,"strong"),g(i,"u"),g(l,"del"),g(r,"code"),g(n,"mark"),g(o,"kbd"),g(h,"i"),p}function rg(e,t,n){return e===!0||e===void 0?t:e||n&&t}function lT(e){return e===!1?[!1,!1]:Array.isArray(e)?e:[e]}var kse="...",Tse=C.exports.forwardRef(function(e,t){var n,r,i,l=e.prefixCls,c=e.className,o=e.style,h=e.type,p=e.disabled,g=e.children,b=e.ellipsis,w=e.editable,P=e.copyable,I=e.component,A=e.title,O=Sse(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),M=C.exports.useContext(Nn),R=M.getPrefixCls,N=M.direction,z=dM("Text")[0],B=C.exports.useRef(null),U=C.exports.useRef(null),q=R("typography",l),H=mi(O,["mark","code","delete","underline","strong","keyboard","italic"]),te=O_(w),Y=ze(te,2),le=Y[0],J=Y[1],Z=Vi(!1,{value:J.editing}),Q=ze(Z,2),ge=Q[0],re=Q[1],de=J.triggerType,oe=de===void 0?["icon"]:de,ye=function(Je){var Rt;Je&&((Rt=J.onStart)===null||Rt===void 0||Rt.call(J)),re(Je)};mse(function(){var bt;ge||(bt=U.current)===null||bt===void 0||bt.focus()},[ge]);var Re=function(Je){Je==null||Je.preventDefault(),ye(!0)},Te=function(Je){var Rt;(Rt=J.onChange)===null||Rt===void 0||Rt.call(J,Je),ye(!1)},ke=function(){var Je;(Je=J.onCancel)===null||Je===void 0||Je.call(J),ye(!1)},De=O_(P),Me=ze(De,2),Ne=Me[0],Le=Me[1],Ve=C.exports.useState(!1),qe=ze(Ve,2),Ue=qe[0],ct=qe[1],pt=C.exports.useRef(),Tt={};Le.format&&(Tt.format=Le.format);var Xe=function(){window.clearTimeout(pt.current)},Pt=function(Je){var Rt;Je==null||Je.preventDefault(),Je==null||Je.stopPropagation(),lse(Le.text||String(g)||"",Tt),ct(!0),Xe(),pt.current=window.setTimeout(function(){ct(!1)},3e3),(Rt=Le.onCopy)===null||Rt===void 0||Rt.call(Le,Je)};C.exports.useEffect(function(){return Xe},[]);var mt=C.exports.useState(!1),Mt=ze(mt,2),Ct=Mt[0],Lt=Mt[1],lt=C.exports.useState(!1),dt=ze(lt,2),ut=dt[0],it=dt[1],ft=C.exports.useState(!1),xt=ze(ft,2),Wt=xt[0],Ut=xt[1],Qt=C.exports.useState(!1),Fe=ze(Qt,2),Ge=Fe[0],Xt=Fe[1],dn=C.exports.useState(!1),Vt=ze(dn,2),jt=Vt[0],nn=Vt[1],_n=C.exports.useState(!0),An=ze(_n,2),_t=An[0],Gt=An[1],an=O_(b,{expandable:!1}),Fn=ze(an,2),kn=Fn[0],zt=Fn[1],Tn=kn&&!Wt,Cn=zt.rows,hn=Cn===void 0?1:Cn,Nt=C.exports.useMemo(function(){return!Tn||zt.suffix!==void 0||zt.onEllipsis||zt.expandable||le||Ne},[Tn,zt,le,Ne]);si(function(){kn&&!Nt&&(Lt(F2("webkitLineClamp")),it(F2("textOverflow")))},[Nt,kn]);var ot=C.exports.useMemo(function(){return Nt?!1:hn===1?ut:Ct},[Nt,ut,Ct]),ht=Tn&&(ot?jt:Ge),At=Tn&&hn===1&&ot,$t=Tn&&hn>1&&ot,cn=function(Je){var Rt;Ut(!0),(Rt=zt.onExpand)===null||Rt===void 0||Rt.call(zt,Je)},Mn=C.exports.useState(0),Gn=ze(Mn,2),qn=Gn[0],me=Gn[1],K=C.exports.useState(0),G=ze(K,2),ce=G[0],ae=G[1],xe=function(Je,Rt){var Bt=Je.offsetWidth,gn;me(Bt),ae(parseInt((gn=window.getComputedStyle)===null||gn===void 0?void 0:gn.call(window,Rt).fontSize,10)||0)},Ee=function(Je){var Rt;Xt(Je),Ge!==Je&&((Rt=zt.onEllipsis)===null||Rt===void 0||Rt.call(zt,Je))};C.exports.useEffect(function(){var bt=B.current;if(kn&&ot&&bt){var Je=$t?bt.offsetHeight<bt.scrollHeight:bt.offsetWidth<bt.scrollWidth;jt!==Je&&nn(Je)}},[kn,ot,g,$t,_t]),C.exports.useEffect(function(){var bt=B.current;if(!(typeof IntersectionObserver>"u"||!bt||!ot||!Tn)){var Je=new IntersectionObserver(function(){Gt(!!bt.offsetParent)});return Je.observe(bt),function(){Je.disconnect()}}},[ot,Tn]);var be={};zt.tooltip===!0?be={title:(n=J.text)!==null&&n!==void 0?n:g}:C.exports.isValidElement(zt.tooltip)?be={title:zt.tooltip}:sn(zt.tooltip)==="object"?be=tt({title:(r=J.text)!==null&&r!==void 0?r:g},zt.tooltip):be={title:zt.tooltip};var Ce=C.exports.useMemo(function(){var bt=function(Rt){return["string","number"].includes(sn(Rt))};if(!(!kn||ot)){if(bt(J.text))return J.text;if(bt(g))return g;if(bt(A))return A;if(bt(be.title))return be.title}},[kn,ot,A,be.title,ht]);if(ge)return E(hse,{value:(i=J.text)!==null&&i!==void 0?i:typeof g=="string"?g:"",onSave:Te,onCancel:ke,onEnd:J.onEnd,prefixCls:q,className:c,style:o,direction:N,component:I,maxLength:J.maxLength,autoSize:J.autoSize,enterIcon:J.enterIcon});var Oe=function(){var Je=zt.expandable,Rt=zt.symbol;if(!Je)return null;var Bt;return Rt?Bt=Rt:Bt=z.expand,E("a",{className:"".concat(q,"-expand"),onClick:cn,"aria-label":z.expand,children:Bt},"expand")},He=function(){if(!!le){var Je=J.icon,Rt=J.tooltip,Bt=Xi(Rt)[0]||z.edit,gn=typeof Bt=="string"?Bt:"";return oe.includes("icon")?E(oo,{title:Rt===!1?"":Bt,children:E(dk,{ref:U,className:"".concat(q,"-edit"),onClick:Re,"aria-label":gn,children:Je||E(nse,{role:"button"})})},"edit"):null}},We=function(){if(!!Ne){var Je=Le.tooltips,Rt=Le.icon,Bt=lT(Je),gn=lT(Rt),on=Ue?rg(Bt[1],z.copied):rg(Bt[0],z.copy),yn=Ue?z.copied:z.copy,Bn=typeof on=="string"?on:yn;return E(oo,{title:on,children:E(dk,{className:Ye("".concat(q,"-copy"),Ue&&"".concat(q,"-copy-success")),onClick:Pt,"aria-label":Bn,children:Ue?rg(gn[1],E(a7,{}),!0):rg(gn[0],E(Jae,{}),!0)})},"copy")}},Be=function(Je){return[Je&&Oe(),He(),We()]},Ot=function(Je){return[Je&&E("span",{"aria-hidden":!0,children:kse},"ellipsis"),zt.suffix,Be(Je)]};return E(ol,{onResize:xe,disabled:!Tn||ot,children:function(bt){var Je;return E(Cse,{tooltipProps:be,enabledEllipsis:Tn,isEllipsis:ht,children:E(XO,{className:Ye((Je={},se(Je,"".concat(q,"-").concat(h),h),se(Je,"".concat(q,"-disabled"),p),se(Je,"".concat(q,"-ellipsis"),kn),se(Je,"".concat(q,"-single-line"),Tn&&hn===1),se(Je,"".concat(q,"-ellipsis-single-line"),At),se(Je,"".concat(q,"-ellipsis-multiple-line"),$t),Je),c),prefixCls:l,style:tt(tt({},o),{WebkitLineClamp:$t?hn:void 0}),component:I,ref:Lo(bt,B,t),direction:N,onClick:oe.includes("text")?Re:void 0,"aria-label":Ce==null?void 0:Ce.toString(),title:A,...H,children:E(bse,{enabledMeasure:Tn&&!ot,text:g,rows:hn,width:qn,fontSize:ce,onEllipsis:Ee,children:function(Rt,Bt){var gn=Rt;Rt.length&&Bt&&Ce&&(gn=E("span",{"aria-hidden":!0,children:gn},"show-content"));var on=Ese(e,Qe($n,{children:[gn,Ot(Bt)]}));return on}})})})}})});const t1=Tse;var Pse=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Ise=C.exports.forwardRef(function(e,t){var n=e.ellipsis,r=e.rel,i=Pse(e,["ellipsis","rel"]),l=tt(tt({},i),{rel:r===void 0&&i.target==="_blank"?"noopener noreferrer":r});return delete l.navigate,E(t1,{...l,ref:t,ellipsis:!!n,component:"a"})});const Mse=Ise;var Rse=C.exports.forwardRef(function(e,t){return E(t1,{ref:t,...e,component:"div"})});const Ase=Rse;var Ose=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Nse=function(t,n){var r=t.ellipsis,i=Ose(t,["ellipsis"]),l=C.exports.useMemo(function(){return r&&sn(r)==="object"?mi(r,["expandable","rows"]):r},[r]);return E(t1,{ref:n,...i,ellipsis:l,component:"span"})};const Dse=C.exports.forwardRef(Nse);var Lse=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},zse=JH(1,2,3,4,5),Fse=C.exports.forwardRef(function(e,t){var n=e.level,r=n===void 0?1:n,i=Lse(e,["level"]),l;return zse.includes(r)?l="h".concat(r):l="h1",E(t1,{ref:t,...i,component:l})});const $se=Fse;var um=XO;um.Text=Dse;um.Link=Mse;um.Title=$se;um.Paragraph=Ase;const z4=um;var Bse={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};const Vse=Bse;var Use=C.exports.createContext({});const QO=Use;var ig=2,uT=.16,jse=.05,Kse=.05,Hse=.15,JO=5,eN=4,Wse=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function cT(e){var t=e.r,n=e.g,r=e.b,i=fy(t,n,r);return{h:i.h*360,s:i.s,v:i.v}}function og(e){var t=e.r,n=e.g,r=e.b;return"#".concat(hy(t,n,r,!1))}function Gse(e,t,n){var r=n/100,i={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return i}function dT(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-ig*t:Math.round(e.h)+ig*t:r=n?Math.round(e.h)+ig*t:Math.round(e.h)-ig*t,r<0?r+=360:r>=360&&(r-=360),r}function fT(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-uT*t:t===eN?r=e.s+uT:r=e.s+jse*t,r>1&&(r=1),n&&t===JO&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function hT(e,t,n){var r;return n?r=e.v+Kse*t:r=e.v-Hse*t,r>1&&(r=1),Number(r.toFixed(2))}function sw(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=Ua(e),i=JO;i>0;i-=1){var l=cT(r),c=og(Ua({h:dT(l,i,!0),s:fT(l,i,!0),v:hT(l,i,!0)}));n.push(c)}n.push(og(r));for(var o=1;o<=eN;o+=1){var h=cT(r),p=og(Ua({h:dT(h,o),s:fT(h,o),v:hT(h,o)}));n.push(p)}return t.theme==="dark"?Wse.map(function(g){var b=g.index,w=g.opacity,P=og(Gse(Ua(t.backgroundColor||"#141414"),Ua(n[b]),w*100));return P}):n}var D_={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},L_={},z_={};Object.keys(D_).forEach(function(e){L_[e]=sw(D_[e]),L_[e].primary=L_[e][5],z_[e]=sw(D_[e],{theme:"dark",backgroundColor:"#141414"}),z_[e].primary=z_[e][5]});function qse(e,t){Nr(e,"[@ant-design/icons] ".concat(t))}function pT(e){return sn(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(sn(e.icon)==="object"||typeof e.icon=="function")}function mT(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:t[n]=r}return t},{})}function lw(e,t,n){return n?tr.createElement(e.tag,ve(ve({key:t},mT(e.attrs)),n),(e.children||[]).map(function(r,i){return lw(r,"".concat(t,"-").concat(e.tag,"-").concat(i))})):tr.createElement(e.tag,ve({key:t},mT(e.attrs)),(e.children||[]).map(function(r,i){return lw(r,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function tN(e){return sw(e)[0]}function nN(e){return e?Array.isArray(e)?e:[e]:[]}var Zse=`
.anticon {
display: inline-block;
color: inherit;
font-style: normal;
line-height: 0;
text-align: center;
text-transform: none;
vertical-align: -0.125em;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.anticon > * {
line-height: 1;
}
.anticon svg {
display: inline-block;
}
.anticon::before {
display: none;
}
.anticon .anticon-icon {
display: block;
}
.anticon[tabindex] {
cursor: pointer;
}
.anticon-spin::before,
.anticon-spin {
display: inline-block;
-webkit-animation: loadingCircle 1s infinite linear;
animation: loadingCircle 1s infinite linear;
}
@-webkit-keyframes loadingCircle {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes loadingCircle {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
`,Xse=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Zse,n=C.exports.useContext(QO),r=n.csp,i=n.prefixCls,l=t;i&&(l=l.replace(/anticon/g,i)),C.exports.useEffect(function(){Gp(l,"@ant-design-icons",{prepend:!0,csp:r})},[])},Yse=["icon","className","onClick","style","primaryColor","secondaryColor"],op={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Qse(e){var t=e.primaryColor,n=e.secondaryColor;op.primaryColor=t,op.secondaryColor=n||tN(t),op.calculated=!!n}function Jse(){return ve({},op)}var n1=function(t){var n=t.icon,r=t.className,i=t.onClick,l=t.style,c=t.primaryColor,o=t.secondaryColor,h=In(t,Yse),p=op;if(c&&(p={primaryColor:c,secondaryColor:o||tN(c)}),Xse(),qse(pT(n),"icon should be icon definiton, but got ".concat(n)),!pT(n))return null;var g=n;return g&&typeof g.icon=="function"&&(g=ve(ve({},g),{},{icon:g.icon(p.primaryColor,p.secondaryColor)})),lw(g.icon,"svg-".concat(g.name),ve({className:r,onClick:i,style:l,"data-icon":g.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},h))};n1.displayName="IconReact";n1.getTwoToneColors=Jse;n1.setTwoToneColors=Qse;const F4=n1;function rN(e){var t=nN(e),n=ze(t,2),r=n[0],i=n[1];return F4.setTwoToneColors({primaryColor:r,secondaryColor:i})}function ele(){var e=F4.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var tle=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];rN("#1890ff");var r1=C.exports.forwardRef(function(e,t){var n,r=e.className,i=e.icon,l=e.spin,c=e.rotate,o=e.tabIndex,h=e.onClick,p=e.twoToneColor,g=In(e,tle),b=C.exports.useContext(QO),w=b.prefixCls,P=w===void 0?"anticon":w,I=b.rootClassName,A=Ye(I,P,(n={},se(n,"".concat(P,"-").concat(i.name),!!i.name),se(n,"".concat(P,"-spin"),!!l||i.name==="loading"),n),r),O=o;O===void 0&&h&&(O=-1);var M=c?{msTransform:"rotate(".concat(c,"deg)"),transform:"rotate(".concat(c,"deg)")}:void 0,R=nN(p),N=ze(R,2),z=N[0],B=N[1];return E("span",{...ve(ve({role:"img","aria-label":i.name},g),{},{ref:t,tabIndex:O,onClick:h,className:A}),children:E(F4,{icon:i,primaryColor:z,secondaryColor:B,style:M})})});r1.displayName="AntdIcon";r1.getTwoToneColor=ele;r1.setTwoToneColor=rN;const ll=r1;var iN=function(t,n){return E(ll,{...ve(ve({},t),{},{ref:n,icon:WY})})};iN.displayName="ArrowRightOutlined";const oN=C.exports.forwardRef(iN);var aN=function(t,n){return E(ll,{...ve(ve({},t),{},{ref:n,icon:Vse})})};aN.displayName="DownloadOutlined";const nle=C.exports.forwardRef(aN);var rle={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M391 240.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L200 146.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L280 333.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L401 410c5.1.6 9.5-3.7 8.9-8.9L391 240.9zm10.1 373.2L240.8 633c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L146.3 824a8.03 8.03 0 000 11.3l42.4 42.3c3.1 3.1 8.2 3.1 11.3 0L333.7 744l43.7 43.7A8.01 8.01 0 00391 783l18.9-160.1c.6-5.1-3.7-9.4-8.8-8.8zm221.8-204.2L783.2 391c6.6-.8 9.4-8.9 4.7-13.6L744 333.6 877.7 200c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.3a8.03 8.03 0 00-11.3 0L690.3 279.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L614.1 401c-.6 5.2 3.7 9.5 8.8 8.9zM744 690.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L623 614c-5.1-.6-9.5 3.7-8.9 8.9L633 783.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L824 877.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L744 690.4z"}}]},name:"fullscreen-exit",theme:"outlined"};const ile=rle;var sN=function(t,n){return E(ll,{...ve(ve({},t),{},{ref:n,icon:ile})})};sN.displayName="FullscreenExitOutlined";const ole=C.exports.forwardRef(sN);var ale={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M290 236.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L169 160c-5.1-.6-9.5 3.7-8.9 8.9L179 329.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L370 423.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L290 236.4zm352.7 187.3c3.1 3.1 8.2 3.1 11.3 0l133.7-133.6 43.7 43.7a8.01 8.01 0 0013.6-4.7L863.9 169c.6-5.1-3.7-9.5-8.9-8.9L694.8 179c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L600.3 370a8.03 8.03 0 000 11.3l42.4 42.4zM845 694.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L654 600.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L734 787.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L855 864c5.1.6 9.5-3.7 8.9-8.9L845 694.9zm-463.7-94.6a8.03 8.03 0 00-11.3 0L236.3 733.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L160.1 855c-.6 5.1 3.7 9.5 8.9 8.9L329.2 845c6.6-.8 9.4-8.9 4.7-13.6L290 787.6 423.7 654c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.4z"}}]},name:"fullscreen",theme:"outlined"};const sle=ale;var lN=function(t,n){return E(ll,{...ve(ve({},t),{},{ref:n,icon:sle})})};lN.displayName="FullscreenOutlined";const lle=C.exports.forwardRef(lN);var ule={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"lock",theme:"outlined"};const cle=ule;var uN=function(t,n){return E(ll,{...ve(ve({},t),{},{ref:n,icon:cle})})};uN.displayName="LockOutlined";const uw=C.exports.forwardRef(uN);var dle={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z"}}]},name:"logout",theme:"outlined"};const fle=dle;var cN=function(t,n){return E(ll,{...ve(ve({},t),{},{ref:n,icon:fle})})};cN.displayName="LogoutOutlined";const hle=C.exports.forwardRef(cN);var ple={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"}}]},name:"mail",theme:"outlined"};const mle=ple;var dN=function(t,n){return E(ll,{...ve(ve({},t),{},{ref:n,icon:mle})})};dN.displayName="MailOutlined";const vle=C.exports.forwardRef(dN);var fN=function(t,n){return E(ll,{...ve(ve({},t),{},{ref:n,icon:u7})})};fN.displayName="SearchOutlined";const gle=C.exports.forwardRef(fN);var yle={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"};const xle=yle;var hN=function(t,n){return E(ll,{...ve(ve({},t),{},{ref:n,icon:xle})})};hN.displayName="UserOutlined";const pN=C.exports.forwardRef(hN);function mN(e,t){return function(){return e.apply(t,arguments)}}const{toString:vN}=Object.prototype,{getPrototypeOf:$4}=Object,B4=(e=>t=>{const n=vN.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ul=e=>(e=e.toLowerCase(),t=>B4(t)===e),i1=e=>t=>typeof t===e,{isArray:_f}=Array,Np=i1("undefined");function _le(e){return e!==null&&!Np(e)&&e.constructor!==null&&!Np(e.constructor)&&lu(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const gN=ul("ArrayBuffer");function ble(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&gN(e.buffer),t}const wle=i1("string"),lu=i1("function"),yN=i1("number"),V4=e=>e!==null&&typeof e=="object",Cle=e=>e===!0||e===!1,Mg=e=>{if(B4(e)!=="object")return!1;const t=$4(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Sle=ul("Date"),Ele=ul("File"),kle=ul("Blob"),Tle=ul("FileList"),Ple=e=>V4(e)&&lu(e.pipe),Ile=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||vN.call(e)===t||lu(e.toString)&&e.toString()===t)},Mle=ul("URLSearchParams"),Rle=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function cm(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),_f(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const l=n?Object.getOwnPropertyNames(e):Object.keys(e),c=l.length;let o;for(r=0;r<c;r++)o=l[r],t.call(null,e[o],o,e)}}function xN(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const _N=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),bN=e=>!Np(e)&&e!==_N;function cw(){const{caseless:e}=bN(this)&&this||{},t={},n=(r,i)=>{const l=e&&xN(t,i)||i;Mg(t[l])&&Mg(r)?t[l]=cw(t[l],r):Mg(r)?t[l]=cw({},r):_f(r)?t[l]=r.slice():t[l]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&cm(arguments[r],n);return t}const Ale=(e,t,n,{allOwnKeys:r}={})=>(cm(t,(i,l)=>{n&&lu(i)?e[l]=mN(i,n):e[l]=i},{allOwnKeys:r}),e),Ole=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Nle=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Dle=(e,t,n,r)=>{let i,l,c;const o={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),l=i.length;l-- >0;)c=i[l],(!r||r(c,e,t))&&!o[c]&&(t[c]=e[c],o[c]=!0);e=n!==!1&&$4(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Lle=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},zle=e=>{if(!e)return null;if(_f(e))return e;let t=e.length;if(!yN(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Fle=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&$4(Uint8Array)),$le=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const l=i.value;t.call(e,l[0],l[1])}},Ble=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Vle=ul("HTMLFormElement"),Ule=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),vT=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),jle=ul("RegExp"),wN=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};cm(n,(i,l)=>{t(i,l,e)!==!1&&(r[l]=i)}),Object.defineProperties(e,r)},Kle=e=>{wN(e,(t,n)=>{if(lu(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(!!lu(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Hle=(e,t)=>{const n={},r=i=>{i.forEach(l=>{n[l]=!0})};return _f(e)?r(e):r(String(e).split(t)),n},Wle=()=>{},Gle=(e,t)=>(e=+e,Number.isFinite(e)?e:t),F_="abcdefghijklmnopqrstuvwxyz",gT="0123456789",CN={DIGIT:gT,ALPHA:F_,ALPHA_DIGIT:F_+F_.toUpperCase()+gT},qle=(e=16,t=CN.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Zle(e){return!!(e&&lu(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Xle=e=>{const t=new Array(10),n=(r,i)=>{if(V4(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const l=_f(r)?[]:{};return cm(r,(c,o)=>{const h=n(c,i+1);!Np(h)&&(l[o]=h)}),t[i]=void 0,l}}return r};return n(e,0)},It={isArray:_f,isArrayBuffer:gN,isBuffer:_le,isFormData:Ile,isArrayBufferView:ble,isString:wle,isNumber:yN,isBoolean:Cle,isObject:V4,isPlainObject:Mg,isUndefined:Np,isDate:Sle,isFile:Ele,isBlob:kle,isRegExp:jle,isFunction:lu,isStream:Ple,isURLSearchParams:Mle,isTypedArray:Fle,isFileList:Tle,forEach:cm,merge:cw,extend:Ale,trim:Rle,stripBOM:Ole,inherits:Nle,toFlatObject:Dle,kindOf:B4,kindOfTest:ul,endsWith:Lle,toArray:zle,forEachEntry:$le,matchAll:Ble,isHTMLForm:Vle,hasOwnProperty:vT,hasOwnProp:vT,reduceDescriptors:wN,freezeMethods:Kle,toObjectSet:Hle,toCamelCase:Ule,noop:Wle,toFiniteNumber:Gle,findKey:xN,global:_N,isContextDefined:bN,ALPHABET:CN,generateString:qle,isSpecCompliantForm:Zle,toJSONObject:Xle};function fr(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}It.inherits(fr,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:It.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const SN=fr.prototype,EN={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{EN[e]={value:e}});Object.defineProperties(fr,EN);Object.defineProperty(SN,"isAxiosError",{value:!0});fr.from=(e,t,n,r,i,l)=>{const c=Object.create(SN);return It.toFlatObject(e,c,function(h){return h!==Error.prototype},o=>o!=="isAxiosError"),fr.call(c,e.message,t,n,r,i),c.cause=e,c.name=e.name,l&&Object.assign(c,l),c};const Yle=null;function dw(e){return It.isPlainObject(e)||It.isArray(e)}function kN(e){return It.endsWith(e,"[]")?e.slice(0,-2):e}function yT(e,t,n){return e?e.concat(t).map(function(i,l){return i=kN(i),!n&&l?"["+i+"]":i}).join(n?".":""):t}function Qle(e){return It.isArray(e)&&!e.some(dw)}const Jle=It.toFlatObject(It,{},null,function(t){return/^is[A-Z]/.test(t)});function o1(e,t,n){if(!It.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=It.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(A,O){return!It.isUndefined(O[A])});const r=n.metaTokens,i=n.visitor||g,l=n.dots,c=n.indexes,h=(n.Blob||typeof Blob<"u"&&Blob)&&It.isSpecCompliantForm(t);if(!It.isFunction(i))throw new TypeError("visitor must be a function");function p(I){if(I===null)return"";if(It.isDate(I))return I.toISOString();if(!h&&It.isBlob(I))throw new fr("Blob is not supported. Use a Buffer instead.");return It.isArrayBuffer(I)||It.isTypedArray(I)?h&&typeof Blob=="function"?new Blob([I]):Buffer.from(I):I}function g(I,A,O){let M=I;if(I&&!O&&typeof I=="object"){if(It.endsWith(A,"{}"))A=r?A:A.slice(0,-2),I=JSON.stringify(I);else if(It.isArray(I)&&Qle(I)||(It.isFileList(I)||It.endsWith(A,"[]"))&&(M=It.toArray(I)))return A=kN(A),M.forEach(function(N,z){!(It.isUndefined(N)||N===null)&&t.append(c===!0?yT([A],z,l):c===null?A:A+"[]",p(N))}),!1}return dw(I)?!0:(t.append(yT(O,A,l),p(I)),!1)}const b=[],w=Object.assign(Jle,{defaultVisitor:g,convertValue:p,isVisitable:dw});function P(I,A){if(!It.isUndefined(I)){if(b.indexOf(I)!==-1)throw Error("Circular reference detected in "+A.join("."));b.push(I),It.forEach(I,function(M,R){(!(It.isUndefined(M)||M===null)&&i.call(t,M,It.isString(R)?R.trim():R,A,w))===!0&&P(M,A?A.concat(R):[R])}),b.pop()}}if(!It.isObject(e))throw new TypeError("data must be an object");return P(e),t}function xT(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function U4(e,t){this._pairs=[],e&&o1(e,this,t)}const TN=U4.prototype;TN.append=function(t,n){this._pairs.push([t,n])};TN.toString=function(t){const n=t?function(r){return t.call(this,r,xT)}:xT;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function eue(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function PN(e,t,n){if(!t)return e;const r=n&&n.encode||eue,i=n&&n.serialize;let l;if(i?l=i(t,n):l=It.isURLSearchParams(t)?t.toString():new U4(t,n).toString(r),l){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+l}return e}class tue{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){It.forEach(this.handlers,function(r){r!==null&&t(r)})}}const _T=tue,IN={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},nue=typeof URLSearchParams<"u"?URLSearchParams:U4,rue=typeof FormData<"u"?FormData:null,iue=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),oue=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),us={isBrowser:!0,classes:{URLSearchParams:nue,FormData:rue,Blob},isStandardBrowserEnv:iue,isStandardBrowserWebWorkerEnv:oue,protocols:["http","https","file","blob","url","data"]};function aue(e,t){return o1(e,new us.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,l){return us.isNode&&It.isBuffer(n)?(this.append(r,n.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)}},t))}function sue(e){return It.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function lue(e){const t={},n=Object.keys(e);let r;const i=n.length;let l;for(r=0;r<i;r++)l=n[r],t[l]=e[l];return t}function MN(e){function t(n,r,i,l){let c=n[l++];const o=Number.isFinite(+c),h=l>=n.length;return c=!c&&It.isArray(i)?i.length:c,h?(It.hasOwnProp(i,c)?i[c]=[i[c],r]:i[c]=r,!o):((!i[c]||!It.isObject(i[c]))&&(i[c]=[]),t(n,r,i[c],l)&&It.isArray(i[c])&&(i[c]=lue(i[c])),!o)}if(It.isFormData(e)&&It.isFunction(e.entries)){const n={};return It.forEachEntry(e,(r,i)=>{t(sue(r),i,n,0)}),n}return null}const uue={"Content-Type":void 0};function cue(e,t,n){if(It.isString(e))try{return(t||JSON.parse)(e),It.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const a1={transitional:IN,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,l=It.isObject(t);if(l&&It.isHTMLForm(t)&&(t=new FormData(t)),It.isFormData(t))return i&&i?JSON.stringify(MN(t)):t;if(It.isArrayBuffer(t)||It.isBuffer(t)||It.isStream(t)||It.isFile(t)||It.isBlob(t))return t;if(It.isArrayBufferView(t))return t.buffer;if(It.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(l){if(r.indexOf("application/x-www-form-urlencoded")>-1)return aue(t,this.formSerializer).toString();if((o=It.isFileList(t))||r.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return o1(o?{"files[]":t}:t,h&&new h,this.formSerializer)}}return l||i?(n.setContentType("application/json",!1),cue(t)):t}],transformResponse:[function(t){const n=this.transitional||a1.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&It.isString(t)&&(r&&!this.responseType||i)){const c=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(o){if(c)throw o.name==="SyntaxError"?fr.from(o,fr.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:us.classes.FormData,Blob:us.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};It.forEach(["delete","get","head"],function(t){a1.headers[t]={}});It.forEach(["post","put","patch"],function(t){a1.headers[t]=It.merge(uue)});const j4=a1,due=It.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),fue=e=>{const t={};let n,r,i;return e&&e.split(`
`).forEach(function(c){i=c.indexOf(":"),n=c.substring(0,i).trim().toLowerCase(),r=c.substring(i+1).trim(),!(!n||t[n]&&due[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},bT=Symbol("internals");function Mh(e){return e&&String(e).trim().toLowerCase()}function Rg(e){return e===!1||e==null?e:It.isArray(e)?e.map(Rg):String(e)}function hue(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}function pue(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function $_(e,t,n,r,i){if(It.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!It.isString(t)){if(It.isString(r))return t.indexOf(r)!==-1;if(It.isRegExp(r))return r.test(t)}}function mue(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function vue(e,t){const n=It.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,l,c){return this[r].call(this,t,i,l,c)},configurable:!0})})}class s1{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function l(o,h,p){const g=Mh(h);if(!g)throw new Error("header name must be a non-empty string");const b=It.findKey(i,g);(!b||i[b]===void 0||p===!0||p===void 0&&i[b]!==!1)&&(i[b||h]=Rg(o))}const c=(o,h)=>It.forEach(o,(p,g)=>l(p,g,h));return It.isPlainObject(t)||t instanceof this.constructor?c(t,n):It.isString(t)&&(t=t.trim())&&!pue(t)?c(fue(t),n):t!=null&&l(n,t,r),this}get(t,n){if(t=Mh(t),t){const r=It.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return hue(i);if(It.isFunction(n))return n.call(this,i,r);if(It.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Mh(t),t){const r=It.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||$_(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function l(c){if(c=Mh(c),c){const o=It.findKey(r,c);o&&(!n||$_(r,r[o],o,n))&&(delete r[o],i=!0)}}return It.isArray(t)?t.forEach(l):l(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const l=n[r];(!t||$_(this,this[l],l,t,!0))&&(delete this[l],i=!0)}return i}normalize(t){const n=this,r={};return It.forEach(this,(i,l)=>{const c=It.findKey(r,l);if(c){n[c]=Rg(i),delete n[l];return}const o=t?mue(l):String(l).trim();o!==l&&delete n[l],n[o]=Rg(i),r[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return It.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&It.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[bT]=this[bT]={accessors:{}}).accessors,i=this.prototype;function l(c){const o=Mh(c);r[o]||(vue(i,c),r[o]=!0)}return It.isArray(t)?t.forEach(l):l(t),this}}s1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);It.freezeMethods(s1.prototype);It.freezeMethods(s1);const qs=s1;function B_(e,t){const n=this||j4,r=t||n,i=qs.from(r.headers);let l=r.data;return It.forEach(e,function(o){l=o.call(n,l,i.normalize(),t?t.status:void 0)}),i.normalize(),l}function RN(e){return!!(e&&e.__CANCEL__)}function dm(e,t,n){fr.call(this,e==null?"canceled":e,fr.ERR_CANCELED,t,n),this.name="CanceledError"}It.inherits(dm,fr,{__CANCEL__:!0});function gue(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new fr("Request failed with status code "+n.status,[fr.ERR_BAD_REQUEST,fr.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const yue=us.isStandardBrowserEnv?function(){return{write:function(n,r,i,l,c,o){const h=[];h.push(n+"="+encodeURIComponent(r)),It.isNumber(i)&&h.push("expires="+new Date(i).toGMTString()),It.isString(l)&&h.push("path="+l),It.isString(c)&&h.push("domain="+c),o===!0&&h.push("secure"),document.cookie=h.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function xue(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function _ue(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function AN(e,t){return e&&!xue(t)?_ue(e,t):t}const bue=us.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(l){let c=l;return t&&(n.setAttribute("href",c),c=n.href),n.setAttribute("href",c),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(c){const o=It.isString(c)?i(c):c;return o.protocol===r.protocol&&o.host===r.host}}():function(){return function(){return!0}}();function wue(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Cue(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,l=0,c;return t=t!==void 0?t:1e3,function(h){const p=Date.now(),g=r[l];c||(c=p),n[i]=h,r[i]=p;let b=l,w=0;for(;b!==i;)w+=n[b++],b=b%e;if(i=(i+1)%e,i===l&&(l=(l+1)%e),p-c<t)return;const P=g&&p-g;return P?Math.round(w*1e3/P):void 0}}function wT(e,t){let n=0;const r=Cue(50,250);return i=>{const l=i.loaded,c=i.lengthComputable?i.total:void 0,o=l-n,h=r(o),p=l<=c;n=l;const g={loaded:l,total:c,progress:c?l/c:void 0,bytes:o,rate:h||void 0,estimated:h&&c&&p?(c-l)/h:void 0,event:i};g[t?"download":"upload"]=!0,e(g)}}const Sue=typeof XMLHttpRequest<"u",Eue=Sue&&function(e){return new Promise(function(n,r){let i=e.data;const l=qs.from(e.headers).normalize(),c=e.responseType;let o;function h(){e.cancelToken&&e.cancelToken.unsubscribe(o),e.signal&&e.signal.removeEventListener("abort",o)}It.isFormData(i)&&(us.isStandardBrowserEnv||us.isStandardBrowserWebWorkerEnv)&&l.setContentType(!1);let p=new XMLHttpRequest;if(e.auth){const P=e.auth.username||"",I=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";l.set("Authorization","Basic "+btoa(P+":"+I))}const g=AN(e.baseURL,e.url);p.open(e.method.toUpperCase(),PN(g,e.params,e.paramsSerializer),!0),p.timeout=e.timeout;function b(){if(!p)return;const P=qs.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),A={data:!c||c==="text"||c==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:P,config:e,request:p};gue(function(M){n(M),h()},function(M){r(M),h()},A),p=null}if("onloadend"in p?p.onloadend=b:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(b)},p.onabort=function(){!p||(r(new fr("Request aborted",fr.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new fr("Network Error",fr.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let I=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const A=e.transitional||IN;e.timeoutErrorMessage&&(I=e.timeoutErrorMessage),r(new fr(I,A.clarifyTimeoutError?fr.ETIMEDOUT:fr.ECONNABORTED,e,p)),p=null},us.isStandardBrowserEnv){const P=(e.withCredentials||bue(g))&&e.xsrfCookieName&&yue.read(e.xsrfCookieName);P&&l.set(e.xsrfHeaderName,P)}i===void 0&&l.setContentType(null),"setRequestHeader"in p&&It.forEach(l.toJSON(),function(I,A){p.setRequestHeader(A,I)}),It.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),c&&c!=="json"&&(p.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&p.addEventListener("progress",wT(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",wT(e.onUploadProgress)),(e.cancelToken||e.signal)&&(o=P=>{!p||(r(!P||P.type?new dm(null,e,p):P),p.abort(),p=null)},e.cancelToken&&e.cancelToken.subscribe(o),e.signal&&(e.signal.aborted?o():e.signal.addEventListener("abort",o)));const w=wue(g);if(w&&us.protocols.indexOf(w)===-1){r(new fr("Unsupported protocol "+w+":",fr.ERR_BAD_REQUEST,e));return}p.send(i||null)})},Ag={http:Yle,xhr:Eue};It.forEach(Ag,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const kue={getAdapter:e=>{e=It.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;i<t&&(n=e[i],!(r=It.isString(n)?Ag[n.toLowerCase()]:n));i++);if(!r)throw r===!1?new fr(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(It.hasOwnProp(Ag,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!It.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:Ag};function V_(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new dm(null,e)}function CT(e){return V_(e),e.headers=qs.from(e.headers),e.data=B_.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),kue.getAdapter(e.adapter||j4.adapter)(e).then(function(r){return V_(e),r.data=B_.call(e,e.transformResponse,r),r.headers=qs.from(r.headers),r},function(r){return RN(r)||(V_(e),r&&r.response&&(r.response.data=B_.call(e,e.transformResponse,r.response),r.response.headers=qs.from(r.response.headers))),Promise.reject(r)})}const ST=e=>e instanceof qs?e.toJSON():e;function Qd(e,t){t=t||{};const n={};function r(p,g,b){return It.isPlainObject(p)&&It.isPlainObject(g)?It.merge.call({caseless:b},p,g):It.isPlainObject(g)?It.merge({},g):It.isArray(g)?g.slice():g}function i(p,g,b){if(It.isUndefined(g)){if(!It.isUndefined(p))return r(void 0,p,b)}else return r(p,g,b)}function l(p,g){if(!It.isUndefined(g))return r(void 0,g)}function c(p,g){if(It.isUndefined(g)){if(!It.isUndefined(p))return r(void 0,p)}else return r(void 0,g)}function o(p,g,b){if(b in t)return r(p,g);if(b in e)return r(void 0,p)}const h={url:l,method:l,data:l,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:o,headers:(p,g)=>i(ST(p),ST(g),!0)};return It.forEach(Object.keys(e).concat(Object.keys(t)),function(g){const b=h[g]||i,w=b(e[g],t[g],g);It.isUndefined(w)&&b!==o||(n[g]=w)}),n}const ON="1.3.3",K4={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{K4[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ET={};K4.transitional=function(t,n,r){function i(l,c){return"[Axios v"+ON+"] Transitional option '"+l+"'"+c+(r?". "+r:"")}return(l,c,o)=>{if(t===!1)throw new fr(i(c," has been removed"+(n?" in "+n:"")),fr.ERR_DEPRECATED);return n&&!ET[c]&&(ET[c]=!0,console.warn(i(c," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(l,c,o):!0}};function Tue(e,t,n){if(typeof e!="object")throw new fr("options must be an object",fr.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const l=r[i],c=t[l];if(c){const o=e[l],h=o===void 0||c(o,l,e);if(h!==!0)throw new fr("option "+l+" must be "+h,fr.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new fr("Unknown option "+l,fr.ERR_BAD_OPTION)}}const fw={assertOptions:Tue,validators:K4},Pl=fw.validators;class Ny{constructor(t){this.defaults=t,this.interceptors={request:new _T,response:new _T}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Qd(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:l}=n;r!==void 0&&fw.assertOptions(r,{silentJSONParsing:Pl.transitional(Pl.boolean),forcedJSONParsing:Pl.transitional(Pl.boolean),clarifyTimeoutError:Pl.transitional(Pl.boolean)},!1),i!==void 0&&fw.assertOptions(i,{encode:Pl.function,serialize:Pl.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let c;c=l&&It.merge(l.common,l[n.method]),c&&It.forEach(["delete","get","head","post","put","patch","common"],I=>{delete l[I]}),n.headers=qs.concat(c,l);const o=[];let h=!0;this.interceptors.request.forEach(function(A){typeof A.runWhen=="function"&&A.runWhen(n)===!1||(h=h&&A.synchronous,o.unshift(A.fulfilled,A.rejected))});const p=[];this.interceptors.response.forEach(function(A){p.push(A.fulfilled,A.rejected)});let g,b=0,w;if(!h){const I=[CT.bind(this),void 0];for(I.unshift.apply(I,o),I.push.apply(I,p),w=I.length,g=Promise.resolve(n);b<w;)g=g.then(I[b++],I[b++]);return g}w=o.length;let P=n;for(b=0;b<w;){const I=o[b++],A=o[b++];try{P=I(P)}catch(O){A.call(this,O);break}}try{g=CT.call(this,P)}catch(I){return Promise.reject(I)}for(b=0,w=p.length;b<w;)g=g.then(p[b++],p[b++]);return g}getUri(t){t=Qd(this.defaults,t);const n=AN(t.baseURL,t.url);return PN(n,t.params,t.paramsSerializer)}}It.forEach(["delete","get","head","options"],function(t){Ny.prototype[t]=function(n,r){return this.request(Qd(r||{},{method:t,url:n,data:(r||{}).data}))}});It.forEach(["post","put","patch"],function(t){function n(r){return function(l,c,o){return this.request(Qd(o||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:l,data:c}))}}Ny.prototype[t]=n(),Ny.prototype[t+"Form"]=n(!0)});const Og=Ny;class H4{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(l){n=l});const r=this;this.promise.then(i=>{if(!r._listeners)return;let l=r._listeners.length;for(;l-- >0;)r._listeners[l](i);r._listeners=null}),this.promise.then=i=>{let l;const c=new Promise(o=>{r.subscribe(o),l=o}).then(i);return c.cancel=function(){r.unsubscribe(l)},c},t(function(l,c,o){r.reason||(r.reason=new dm(l,c,o),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new H4(function(i){t=i}),cancel:t}}}const Pue=H4;function Iue(e){return function(n){return e.apply(null,n)}}function Mue(e){return It.isObject(e)&&e.isAxiosError===!0}const hw={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(hw).forEach(([e,t])=>{hw[t]=e});const Rue=hw;function NN(e){const t=new Og(e),n=mN(Og.prototype.request,t);return It.extend(n,Og.prototype,t,{allOwnKeys:!0}),It.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return NN(Qd(e,i))},n}const Ai=NN(j4);Ai.Axios=Og;Ai.CanceledError=dm;Ai.CancelToken=Pue;Ai.isCancel=RN;Ai.VERSION=ON;Ai.toFormData=o1;Ai.AxiosError=fr;Ai.Cancel=Ai.CanceledError;Ai.all=function(t){return Promise.all(t)};Ai.spread=Iue;Ai.isAxiosError=Mue;Ai.mergeConfig=Qd;Ai.AxiosHeaders=qs;Ai.formToJSON=e=>MN(It.isHTMLForm(e)?new FormData(e):e);Ai.HttpStatusCode=Rue;Ai.default=Ai;const Aue=Ai;class bf{constructor(){this.listeners=[],this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.push(t),this.onSubscribe(),()=>{this.listeners=this.listeners.filter(n=>n!==t),this.onUnsubscribe()}}hasListeners(){return this.listeners.length>0}onSubscribe(){}onUnsubscribe(){}}const Dp=typeof window>"u"||"Deno"in window;function pa(){}function Oue(e,t){return typeof e=="function"?e(t):e}function pw(e){return typeof e=="number"&&e>=0&&e!==1/0}function DN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Vh(e,t,n){return fm(e)?typeof t=="function"?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function Nue(e,t,n){return fm(e)?typeof t=="function"?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:typeof e=="function"?{...t,mutationFn:e}:{...e}}function Nl(e,t,n){return fm(e)?[{...t,queryKey:e},n]:[e||{},t]}function kT(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:l,queryKey:c,stale:o}=e;if(fm(c)){if(r){if(t.queryHash!==W4(c,t.options))return!1}else if(!Dy(t.queryKey,c))return!1}if(n!=="all"){const h=t.isActive();if(n==="active"&&!h||n==="inactive"&&h)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||typeof i<"u"&&i!==t.state.fetchStatus||l&&!l(t))}function TT(e,t){const{exact:n,fetching:r,predicate:i,mutationKey:l}=e;if(fm(l)){if(!t.options.mutationKey)return!1;if(n){if(ac(t.options.mutationKey)!==ac(l))return!1}else if(!Dy(t.options.mutationKey,l))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||i&&!i(t))}function W4(e,t){return((t==null?void 0:t.queryKeyHashFn)||ac)(e)}function ac(e){return JSON.stringify(e,(t,n)=>vw(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Dy(e,t){return LN(e,t)}function LN(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!LN(e[n],t[n])):!1}function zN(e,t){if(e===t)return e;const n=PT(e)&&PT(t);if(n||vw(e)&&vw(t)){const r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),l=i.length,c=n?[]:{};let o=0;for(let h=0;h<l;h++){const p=n?h:i[h];c[p]=zN(e[p],t[p]),c[p]===e[p]&&o++}return r===l&&o===r?e:c}return t}function mw(e,t){if(e&&!t||t&&!e)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function PT(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function vw(e){if(!IT(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!IT(n)||!n.hasOwnProperty("isPrototypeOf"))}function IT(e){return Object.prototype.toString.call(e)==="[object Object]"}function fm(e){return Array.isArray(e)}function FN(e){return new Promise(t=>{setTimeout(t,e)})}function MT(e){FN(0).then(e)}function Due(){if(typeof AbortController=="function")return new AbortController}function gw(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?zN(e,t):t}class Lue extends bf{constructor(){super(),this.setup=t=>{if(!Dp&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.focused=t,t&&this.onFocus()}onFocus(){this.listeners.forEach(t=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Ly=new Lue;class zue extends bf{constructor(){super(),this.setup=t=>{if(!Dp&&window.addEventListener){const n=()=>t();return window.addEventListener("online",n,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(t){this.online=t,t&&this.onOnline()}onOnline(){this.listeners.forEach(t=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const zy=new zue;function Fue(e){return Math.min(1e3*2**e,3e4)}function l1(e){return(e!=null?e:"online")==="online"?zy.isOnline():!0}class $N{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function Ng(e){return e instanceof $N}function BN(e){let t=!1,n=0,r=!1,i,l,c;const o=new Promise((O,M)=>{l=O,c=M}),h=O=>{r||(P(new $N(O)),e.abort==null||e.abort())},p=()=>{t=!0},g=()=>{t=!1},b=()=>!Ly.isFocused()||e.networkMode!=="always"&&!zy.isOnline(),w=O=>{r||(r=!0,e.onSuccess==null||e.onSuccess(O),i==null||i(),l(O))},P=O=>{r||(r=!0,e.onError==null||e.onError(O),i==null||i(),c(O))},I=()=>new Promise(O=>{i=M=>{const R=r||!b();return R&&O(M),R},e.onPause==null||e.onPause()}).then(()=>{i=void 0,r||e.onContinue==null||e.onContinue()}),A=()=>{if(r)return;let O;try{O=e.fn()}catch(M){O=Promise.reject(M)}Promise.resolve(O).then(w).catch(M=>{var R,N;if(r)return;const z=(R=e.retry)!=null?R:3,B=(N=e.retryDelay)!=null?N:Fue,U=typeof B=="function"?B(n,M):B,q=z===!0||typeof z=="number"&&n<z||typeof z=="function"&&z(n,M);if(t||!q){P(M);return}n++,e.onFail==null||e.onFail(n,M),FN(U).then(()=>{if(b())return I()}).then(()=>{t?P(M):A()})})};return l1(e.networkMode)?A():I().then(A),{promise:o,cancel:h,continue:()=>(i==null?void 0:i())?o:Promise.resolve(),cancelRetry:p,continueRetry:g}}const G4=console;function $ue(){let e=[],t=0,n=g=>{g()},r=g=>{g()};const i=g=>{let b;t++;try{b=g()}finally{t--,t||o()}return b},l=g=>{t?e.push(g):MT(()=>{n(g)})},c=g=>(...b)=>{l(()=>{g(...b)})},o=()=>{const g=e;e=[],g.length&&MT(()=>{r(()=>{g.forEach(b=>{n(b)})})})};return{batch:i,batchCalls:c,schedule:l,setNotifyFunction:g=>{n=g},setBatchNotifyFunction:g=>{r=g}}}const ai=$ue();class VN{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),pw(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t!=null?t:Dp?1/0:5*60*1e3)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class Bue extends VN{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||G4,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||Vue(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const r=gw(this.state.data,t,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const r=this.promise;return(n=this.retryer)==null||n.cancel(t),r?r.then(pa).catch(pa):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!DN(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(r=>r.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(r=>r.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.indexOf(t)===-1&&(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.indexOf(t)!==-1&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var r,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var l;return(l=this.retryer)==null||l.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const P=this.observers.find(I=>I.options.queryFn);P&&this.setOptions(P.options)}Array.isArray(this.options.queryKey);const c=Due(),o={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},h=P=>{Object.defineProperty(P,"signal",{enumerable:!0,get:()=>{if(c)return this.abortSignalConsumed=!0,c.signal}})};h(o);const p=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(o)):Promise.reject("Missing queryFn"),g={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:p};if(h(g),(r=this.options.behavior)==null||r.onFetch(g),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=g.fetchOptions)==null?void 0:i.meta)){var b;this.dispatch({type:"fetch",meta:(b=g.fetchOptions)==null?void 0:b.meta})}const w=P=>{if(Ng(P)&&P.silent||this.dispatch({type:"error",error:P}),!Ng(P)){var I,A;(I=(A=this.cache.config).onError)==null||I.call(A,P,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=BN({fn:g.fetchFn,abort:c==null?void 0:c.abort.bind(c),onSuccess:P=>{var I,A;if(typeof P>"u"){w(new Error("undefined"));return}this.setData(P),(I=(A=this.cache.config).onSuccess)==null||I.call(A,P,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:w,onFail:(P,I)=>{this.dispatch({type:"failed",failureCount:P,error:I})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:g.options.retry,retryDelay:g.options.retryDelay,networkMode:g.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=r=>{var i,l;switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(i=t.meta)!=null?i:null,fetchStatus:l1(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(l=t.dataUpdatedAt)!=null?l:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const c=t.error;return Ng(c)&&c.revert&&this.revertState?{...this.revertState}:{...r,error:c,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ai.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function Vue(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r!=null?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}class Uue extends bf{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var i;const l=n.queryKey,c=(i=n.queryHash)!=null?i:W4(l,n);let o=this.get(c);return o||(o=new Bue({cache:this,logger:t.getLogger(),queryKey:l,queryHash:c,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(l)}),this.add(o)),o}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(r=>r!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){ai.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=Nl(t,n);return typeof r.exact>"u"&&(r.exact=!0),this.queries.find(i=>kT(r,i))}findAll(t,n){const[r]=Nl(t,n);return Object.keys(r).length>0?this.queries.filter(i=>kT(r,i)):this.queries}notify(t){ai.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ai.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){ai.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class jue extends VN{constructor(t){super(),this.options={...t.defaultOptions,...t.options},this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||G4,this.observers=[],this.state=t.state||UN(),this.updateCacheTime(this.options.cacheTime),this.scheduleGc()}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.indexOf(t)===-1&&(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,n;return(t=(n=this.retryer)==null?void 0:n.continue())!=null?t:this.execute()}async execute(){const t=()=>{var N;return this.retryer=BN({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(z,B)=>{this.dispatch({type:"failed",failureCount:z,error:B})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(N=this.options.retry)!=null?N:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,i,l,c,o,h;if(!n){var p,g,b,w;this.dispatch({type:"loading",variables:this.options.variables}),await((p=(g=this.mutationCache.config).onMutate)==null?void 0:p.call(g,this.state.variables,this));const z=await((b=(w=this.options).onMutate)==null?void 0:b.call(w,this.state.variables));z!==this.state.context&&this.dispatch({type:"loading",context:z,variables:this.state.variables})}const N=await t();return await((r=(i=this.mutationCache.config).onSuccess)==null?void 0:r.call(i,N,this.state.variables,this.state.context,this)),await((l=(c=this.options).onSuccess)==null?void 0:l.call(c,N,this.state.variables,this.state.context)),await((o=(h=this.options).onSettled)==null?void 0:o.call(h,N,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:N}),N}catch(N){try{var P,I,A,O,M,R;throw await((P=(I=this.mutationCache.config).onError)==null?void 0:P.call(I,N,this.state.variables,this.state.context,this)),await((A=(O=this.options).onError)==null?void 0:A.call(O,N,this.state.variables,this.state.context)),await((M=(R=this.options).onSettled)==null?void 0:M.call(R,void 0,N,this.state.variables,this.state.context)),N}finally{this.dispatch({type:"error",error:N})}}}dispatch(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"loading":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!l1(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"};case"setState":return{...r,...t.state}}};this.state=n(this.state),ai.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function UN(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class Kue extends bf{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const i=new jue({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:r,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0});return this.add(i),i}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){ai.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(n=>TT(t,n))}findAll(t){return this.mutations.filter(n=>TT(t,n))}notify(t){ai.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const n=this.mutations.filter(r=>r.state.isPaused);return ai.batch(()=>n.reduce((r,i)=>r.then(()=>i.continue().catch(pa)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function Hue(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,i,l,c;const o=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,h=(r=e.fetchOptions)==null||(i=r.meta)==null?void 0:i.fetchMore,p=h==null?void 0:h.pageParam,g=(h==null?void 0:h.direction)==="forward",b=(h==null?void 0:h.direction)==="backward",w=((l=e.state.data)==null?void 0:l.pages)||[],P=((c=e.state.data)==null?void 0:c.pageParams)||[];let I=P,A=!1;const O=U=>{Object.defineProperty(U,"signal",{enumerable:!0,get:()=>{var q;if((q=e.signal)!=null&&q.aborted)A=!0;else{var H;(H=e.signal)==null||H.addEventListener("abort",()=>{A=!0})}return e.signal}})},M=e.options.queryFn||(()=>Promise.reject("Missing queryFn")),R=(U,q,H,te)=>(I=te?[q,...I]:[...I,q],te?[H,...U]:[...U,H]),N=(U,q,H,te)=>{if(A)return Promise.reject("Cancelled");if(typeof H>"u"&&!q&&U.length)return Promise.resolve(U);const Y={queryKey:e.queryKey,pageParam:H,meta:e.options.meta};O(Y);const le=M(Y);return Promise.resolve(le).then(Z=>R(U,H,Z,te))};let z;if(!w.length)z=N([]);else if(g){const U=typeof p<"u",q=U?p:RT(e.options,w);z=N(w,U,q)}else if(b){const U=typeof p<"u",q=U?p:Wue(e.options,w);z=N(w,U,q,!0)}else{I=[];const U=typeof e.options.getNextPageParam>"u";z=(o&&w[0]?o(w[0],0,w):!0)?N([],U,P[0]):Promise.resolve(R([],P[0],w[0]));for(let H=1;H<w.length;H++)z=z.then(te=>{if(o&&w[H]?o(w[H],H,w):!0){const le=U?P[H]:RT(e.options,te);return N(te,U,le)}return Promise.resolve(R(te,P[H],w[H]))})}return z.then(U=>({pages:U,pageParams:I}))}}}}function RT(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function Wue(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class Gue{constructor(t={}){this.queryCache=t.queryCache||new Uue,this.mutationCache=t.mutationCache||new Kue,this.logger=t.logger||G4,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Ly.subscribe(()=>{Ly.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=zy.subscribe(()=>{zy.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,n;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(n=this.unsubscribeOnline)==null||n.call(this),this.unsubscribeOnline=void 0)}isFetching(t,n){const[r]=Nl(t,n);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state.data}ensureQueryData(t,n,r){const i=Vh(t,n,r),l=this.getQueryData(i.queryKey);return l?Promise.resolve(l):this.fetchQuery(i)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:r})=>{const i=r.data;return[n,i]})}setQueryData(t,n,r){const i=this.queryCache.find(t),l=i==null?void 0:i.state.data,c=Oue(n,l);if(typeof c>"u")return;const o=Vh(t),h=this.defaultQueryOptions(o);return this.queryCache.build(this,h).setData(c,{...r,manual:!0})}setQueriesData(t,n,r){return ai.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,n,r)]))}getQueryState(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state}removeQueries(t,n){const[r]=Nl(t,n),i=this.queryCache;ai.batch(()=>{i.findAll(r).forEach(l=>{i.remove(l)})})}resetQueries(t,n,r){const[i,l]=Nl(t,n,r),c=this.queryCache,o={type:"active",...i};return ai.batch(()=>(c.findAll(i).forEach(h=>{h.reset()}),this.refetchQueries(o,l)))}cancelQueries(t,n,r){const[i,l={}]=Nl(t,n,r);typeof l.revert>"u"&&(l.revert=!0);const c=ai.batch(()=>this.queryCache.findAll(i).map(o=>o.cancel(l)));return Promise.all(c).then(pa).catch(pa)}invalidateQueries(t,n,r){const[i,l]=Nl(t,n,r);return ai.batch(()=>{var c,o;if(this.queryCache.findAll(i).forEach(p=>{p.invalidate()}),i.refetchType==="none")return Promise.resolve();const h={...i,type:(c=(o=i.refetchType)!=null?o:i.type)!=null?c:"active"};return this.refetchQueries(h,l)})}refetchQueries(t,n,r){const[i,l]=Nl(t,n,r),c=ai.batch(()=>this.queryCache.findAll(i).filter(h=>!h.isDisabled()).map(h=>{var p;return h.fetch(void 0,{...l,cancelRefetch:(p=l==null?void 0:l.cancelRefetch)!=null?p:!0,meta:{refetchPage:i.refetchPage}})}));let o=Promise.all(c).then(pa);return l!=null&&l.throwOnError||(o=o.catch(pa)),o}fetchQuery(t,n,r){const i=Vh(t,n,r),l=this.defaultQueryOptions(i);typeof l.retry>"u"&&(l.retry=!1);const c=this.queryCache.build(this,l);return c.isStaleByTime(l.staleTime)?c.fetch(l):Promise.resolve(c.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(pa).catch(pa)}fetchInfiniteQuery(t,n,r){const i=Vh(t,n,r);return i.behavior=Hue(),this.fetchQuery(i)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(pa).catch(pa)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,n){const r=this.queryDefaults.find(i=>ac(t)===ac(i.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>Dy(t,r.queryKey));return n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(i=>ac(t)===ac(i.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>Dy(t,r.mutationKey));return n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n={...this.defaultOptions.queries,...this.getQueryDefaults(t==null?void 0:t.queryKey),...t,_defaulted:!0};return!n.queryHash&&n.queryKey&&(n.queryHash=W4(n.queryKey,n)),typeof n.refetchOnReconnect>"u"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary>"u"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(t==null?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class que extends bf{constructor(t,n){super(),this.client=t,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.length===1&&(this.currentQuery.addObserver(this),AT(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.listeners.length||this.destroy()}shouldFetchOnReconnect(){return yw(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return yw(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=[],this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,n){const r=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),mw(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();const l=this.hasListeners();l&&OT(this.currentQuery,i,this.options,r)&&this.executeFetch(),this.updateResult(n),l&&(this.currentQuery!==i||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();const c=this.computeRefetchInterval();l&&(this.currentQuery!==i||this.options.enabled!==r.enabled||c!==this.currentRefetchInterval)&&this.updateRefetchInterval(c)}getOptimisticResult(t){const n=this.client.getQueryCache().build(this.client,t);return this.createResult(n,t)}getCurrentResult(){return this.currentResult}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),t[r])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...n}={}){return this.fetch({...n,meta:{refetchPage:t}})}fetchOptimistic(t){const n=this.client.defaultQueryOptions(t),r=this.client.getQueryCache().build(this.client,n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return this.executeFetch({...t,cancelRefetch:(n=t.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let n=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(pa)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),Dp||this.currentResult.isStale||!pw(this.options.staleTime))return;const n=DN(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(Dp||this.options.enabled===!1||!pw(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Ly.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,n){const r=this.currentQuery,i=this.options,l=this.currentResult,c=this.currentResultState,o=this.currentResultOptions,h=t!==r,p=h?t.state:this.currentQueryInitialState,g=h?this.currentResult:this.previousQueryResult,{state:b}=t;let{dataUpdatedAt:w,error:P,errorUpdatedAt:I,fetchStatus:A,status:O}=b,M=!1,R=!1,N;if(n._optimisticResults){const H=this.hasListeners(),te=!H&&AT(t,n),Y=H&&OT(t,r,n,i);(te||Y)&&(A=l1(t.options.networkMode)?"fetching":"paused",w||(O="loading")),n._optimisticResults==="isRestoring"&&(A="idle")}if(n.keepPreviousData&&!b.dataUpdatedAt&&g!=null&&g.isSuccess&&O!=="error")N=g.data,w=g.dataUpdatedAt,O=g.status,M=!0;else if(n.select&&typeof b.data<"u")if(l&&b.data===(c==null?void 0:c.data)&&n.select===this.selectFn)N=this.selectResult;else try{this.selectFn=n.select,N=n.select(b.data),N=gw(l==null?void 0:l.data,N,n),this.selectResult=N,this.selectError=null}catch(H){this.selectError=H}else N=b.data;if(typeof n.placeholderData<"u"&&typeof N>"u"&&O==="loading"){let H;if(l!=null&&l.isPlaceholderData&&n.placeholderData===(o==null?void 0:o.placeholderData))H=l.data;else if(H=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof H<"u")try{H=n.select(H),this.selectError=null}catch(te){this.selectError=te}typeof H<"u"&&(O="success",N=gw(l==null?void 0:l.data,H,n),R=!0)}this.selectError&&(P=this.selectError,N=this.selectResult,I=Date.now(),O="error");const z=A==="fetching",B=O==="loading",U=O==="error";return{status:O,fetchStatus:A,isLoading:B,isSuccess:O==="success",isError:U,isInitialLoading:B&&z,data:N,dataUpdatedAt:w,error:P,errorUpdatedAt:I,failureCount:b.fetchFailureCount,failureReason:b.fetchFailureReason,errorUpdateCount:b.errorUpdateCount,isFetched:b.dataUpdateCount>0||b.errorUpdateCount>0,isFetchedAfterMount:b.dataUpdateCount>p.dataUpdateCount||b.errorUpdateCount>p.errorUpdateCount,isFetching:z,isRefetching:z&&!B,isLoadingError:U&&b.dataUpdatedAt===0,isPaused:A==="paused",isPlaceholderData:R,isPreviousData:M,isRefetchError:U&&b.dataUpdatedAt!==0,isStale:q4(t,n),refetch:this.refetch,remove:this.remove}}updateResult(t){const n=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,mw(r,n))return;this.currentResult=r;const i={cache:!0},l=()=>{if(!n)return!0;const{notifyOnChangeProps:c}=this.options;if(c==="all"||!c&&!this.trackedProps.size)return!0;const o=new Set(c!=null?c:this.trackedProps);return this.options.useErrorBoundary&&o.add("error"),Object.keys(this.currentResult).some(h=>{const p=h;return this.currentResult[p]!==n[p]&&o.has(p)})};(t==null?void 0:t.listeners)!==!1&&l()&&(i.listeners=!0),this.notify({...i,...t})}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const n={};t.type==="success"?n.onSuccess=!t.manual:t.type==="error"&&!Ng(t.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(t){ai.batch(()=>{if(t.onSuccess){var n,r,i,l;(n=(r=this.options).onSuccess)==null||n.call(r,this.currentResult.data),(i=(l=this.options).onSettled)==null||i.call(l,this.currentResult.data,null)}else if(t.onError){var c,o,h,p;(c=(o=this.options).onError)==null||c.call(o,this.currentResult.error),(h=(p=this.options).onSettled)==null||h.call(p,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(g=>{g(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function Zue(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function AT(e,t){return Zue(e,t)||e.state.dataUpdatedAt>0&&yw(e,t,t.refetchOnMount)}function yw(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&q4(e,t)}return!1}function OT(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&q4(e,n)}function q4(e,t){return e.isStaleByTime(t.staleTime)}class Xue extends bf{constructor(t,n){super(),this.client=t,this.setOptions(n),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.client.defaultMutationOptions(t),mw(n,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this})}onUnsubscribe(){if(!this.listeners.length){var t;(t=this.currentMutation)==null||t.removeObserver(this)}}onMutationUpdate(t){this.updateResult();const n={listeners:!0};t.type==="success"?n.onSuccess=!0:t.type==="error"&&(n.onError=!0),this.notify(n)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(t,n){return this.mutateOptions=n,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof t<"u"?t:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const t=this.currentMutation?this.currentMutation.state:UN(),n={...t,isLoading:t.status==="loading",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=n}notify(t){ai.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(t.onSuccess){var n,r,i,l;(n=(r=this.mutateOptions).onSuccess)==null||n.call(r,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(i=(l=this.mutateOptions).onSettled)==null||i.call(l,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(t.onError){var c,o,h,p;(c=(o=this.mutateOptions).onError)==null||c.call(o,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(h=(p=this.mutateOptions).onSettled)==null||h.call(p,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}t.listeners&&this.listeners.forEach(g=>{g(this.currentResult)})})}}const jN=c0.exports.useSyncExternalStore,NT=C.exports.createContext(void 0),KN=C.exports.createContext(!1);function HN(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=NT),window.ReactQueryClientContext):NT)}const hm=({context:e}={})=>{const t=C.exports.useContext(HN(e,C.exports.useContext(KN)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Yue=({client:e,children:t,context:n,contextSharing:r=!1})=>{C.exports.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const i=HN(n,r);return E(KN.Provider,{value:!n&&r,children:E(i.Provider,{value:e,children:t})})},WN=C.exports.createContext(!1),Que=()=>C.exports.useContext(WN);WN.Provider;function Jue(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const ece=C.exports.createContext(Jue()),tce=()=>C.exports.useContext(ece);function GN(e,t){return typeof e=="function"?e(...t):!!e}const nce=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},rce=e=>{C.exports.useEffect(()=>{e.clearReset()},[e])},ice=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&GN(n,[e.error,r]),oce=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},ace=(e,t)=>e.isLoading&&e.isFetching&&!t,sce=(e,t,n)=>(e==null?void 0:e.suspense)&&ace(t,n),lce=(e,t,n)=>t.fetchOptimistic(e).then(({data:r})=>{e.onSuccess==null||e.onSuccess(r),e.onSettled==null||e.onSettled(r,null)}).catch(r=>{n.clearReset(),e.onError==null||e.onError(r),e.onSettled==null||e.onSettled(void 0,r)});function uce(e,t){const n=hm({context:e.context}),r=Que(),i=tce(),l=n.defaultQueryOptions(e);l._optimisticResults=r?"isRestoring":"optimistic",l.onError&&(l.onError=ai.batchCalls(l.onError)),l.onSuccess&&(l.onSuccess=ai.batchCalls(l.onSuccess)),l.onSettled&&(l.onSettled=ai.batchCalls(l.onSettled)),oce(l),nce(l,i),rce(i);const[c]=C.exports.useState(()=>new t(n,l)),o=c.getOptimisticResult(l);if(jN(C.exports.useCallback(h=>r?()=>{}:c.subscribe(ai.batchCalls(h)),[c,r]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),C.exports.useEffect(()=>{c.setOptions(l,{listeners:!1})},[l,c]),sce(l,o,r))throw lce(l,c,i);if(ice({result:o,errorResetBoundary:i,useErrorBoundary:l.useErrorBoundary,query:c.getCurrentQuery()}))throw o.error;return l.notifyOnChangeProps?o:c.trackResult(o)}function Sa(e,t,n){const r=Vh(e,t,n);return uce(r,que)}function cce(e,t,n){const r=Nue(e,t,n),i=hm({context:r.context}),[l]=C.exports.useState(()=>new Xue(i,r));C.exports.useEffect(()=>{l.setOptions(r)},[l,r]);const c=jN(C.exports.useCallback(h=>l.subscribe(ai.batchCalls(h)),[l]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),o=C.exports.useCallback((h,p)=>{l.mutate(h,p).catch(dce)},[l]);if(c.error&&GN(l.options.useErrorBoundary,[c.error]))throw c.error;return{...c,mutate:o,mutateAsync:c.mutate}}function dce(){}const mr={initial:"initial","initial-match":"initial-match-points","initial-unmatch":"initial-unmatch-points",approve:"approve-points",working:"working-points",cancelled:"cancelled-points",atd:"atd"},Fr={initial:"\u041A \u0440\u0430\u0441\u0441\u043C\u043E\u0442\u0440\u0435\u043D\u0438\u044E",approve:"\u0421\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u0438\u0435-\u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430",working:"\u0420\u0430\u0431\u043E\u0442\u0430\u0435\u0442"},qN={kiosk:"\u0413\u043E\u0440\u043E\u0434\u0441\u043A\u043E\u0439 \u043A\u0438\u043E\u0441\u043A",mfc:"\u041C\u0424\u0426",library:"\u0411\u0438\u0431\u043B\u0438\u043E\u0442\u0435\u043A\u0430",sport:"\u0421\u043F\u043E\u0440\u0442\u0438\u0432\u043D\u044B\u0439 \u043E\u0431\u044A\u0435\u043A\u0442",retail:"\u0420\u0438\u0442\u0435\u0439\u043B",residential:"\u041F\u043E\u0434\u044A\u0435\u0437\u0434 \u0436\u0438\u043B\u043E\u0433\u043E \u0434\u043E\u043C\u0430",dk:"\u0414\u043E\u043C \u043A\u0443\u043B\u044C\u0442\u0443\u0440\u044B/\u041A\u043B\u0443\u0431"},fce="\u0424\u0438\u043B\u044C\u0442\u0440 \u0437\u0430\u0431\u043B\u043E\u043A\u0438\u0440\u043E\u0432\u0430\u043D - \u0431\u044B\u043B\u043E \u0440\u0443\u0447\u043D\u043E\u0435 \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435",Yr={INITIAL:"INITIAL",APPROVE_WORKING:"APPROVE_WORKING",WORKING:"WORKING"},hce={[Yr.INITIAL]:[Fr.initial],[Yr.APPROVE_WORKING]:[Fr.approve,Fr.working],[Yr.WORKING]:[Fr.working]},pce={[Yr.INITIAL]:{visible:[mr.initial],invisible:[mr.approve,mr.working]},[Yr.APPROVE_WORKING]:{visible:[mr.approve,mr.working],invisible:[mr.initial]},[Yr.WORKING]:{visible:[mr.working],invisible:[mr.initial,mr.approve]}},DT=e=>{let t;const n=new Set,r=(h,p)=>{const g=typeof h=="function"?h(t):h;if(!Object.is(g,t)){const b=t;t=(p!=null?p:typeof g!="object")?g:Object.assign({},t,g),n.forEach(w=>w(t,b))}},i=()=>t,o={setState:r,getState:i,subscribe:h=>(n.add(h),()=>n.delete(h)),destroy:()=>{var h;((h={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0})==null?void 0:h.MODE)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,i,o),o},mce=e=>e?DT(e):DT;var ZN={exports:{}},XN={};/**
* @license React
* use-sync-external-store-shim/with-selector.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var u1=C.exports,vce=c0.exports;function gce(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yce=typeof Object.is=="function"?Object.is:gce,xce=vce.useSyncExternalStore,_ce=u1.useRef,bce=u1.useEffect,wce=u1.useMemo,Cce=u1.useDebugValue;XN.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var l=_ce(null);if(l.current===null){var c={hasValue:!1,value:null};l.current=c}else c=l.current;l=wce(function(){function h(P){if(!p){if(p=!0,g=P,P=r(P),i!==void 0&&c.hasValue){var I=c.value;if(i(I,P))return b=I}return b=P}if(I=b,yce(g,P))return I;var A=r(P);return i!==void 0&&i(I,A)?I:(g=P,b=A)}var p=!1,g,b,w=n===void 0?null:n;return[function(){return h(t())},w===null?void 0:function(){return h(w())}]},[t,n,r,i]);var o=xce(e,l[0],l[1]);return bce(function(){c.hasValue=!0,c.value=o},[o]),Cce(o),o};(function(e){e.exports=XN})(ZN);const Sce=Iw(ZN.exports),{useSyncExternalStoreWithSelector:Ece}=Sce;function kce(e,t=e.getState,n){const r=Ece(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return C.exports.useDebugValue(r),r}const LT=e=>{var t;((t={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0})==null?void 0:t.MODE)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const n=typeof e=="function"?mce(e):e,r=(i,l)=>kce(n,i,l);return Object.assign(r,n),r},mu=e=>e?LT(e):LT;function ga(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map(function(i){return"'"+i+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Jd(e){return!!e&&!!e[_r]}function nl(e){var t;return!!e&&(function(n){if(!n||typeof n!="object")return!1;var r=Object.getPrototypeOf(n);if(r===null)return!0;var i=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Lce}(e)||Array.isArray(e)||!!e[jT]||!!(!((t=e.constructor)===null||t===void 0)&&t[jT])||Z4(e)||X4(e))}function ef(e,t,n){n===void 0&&(n=!1),wf(e)===0?(n?Object.keys:t3)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,i){return t(i,r,e)})}function wf(e){var t=e[_r];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Z4(e)?2:X4(e)?3:0}function xw(e,t){return wf(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Tce(e,t){return wf(e)===2?e.get(t):e[t]}function YN(e,t,n){var r=wf(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Pce(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Z4(e){return Nce&&e instanceof Map}function X4(e){return Dce&&e instanceof Set}function Fi(e){return e.o||e.t}function Y4(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=zce(e);delete t[_r];for(var n=t3(t),r=0;r<n.length;r++){var i=n[r],l=t[i];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(t[i]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function Q4(e,t){return t===void 0&&(t=!1),J4(e)||Jd(e)||!nl(e)||(wf(e)>1&&(e.set=e.add=e.clear=e.delete=Ice),Object.freeze(e),t&&ef(e,function(n,r){return Q4(r,!0)},!0)),e}function Ice(){ga(2)}function J4(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function ps(e){var t=bw[e];return t||ga(18,e),t}function Mce(e,t){bw[e]||(bw[e]=t)}function Fy(){return zp}function U_(e,t){t&&(ps("Patches"),e.u=[],e.s=[],e.v=t)}function $y(e){_w(e),e.p.forEach(Rce),e.p=null}function _w(e){e===zp&&(zp=e.l)}function zT(e){return zp={p:[],l:zp,h:e,m:!0,_:0}}function Rce(e){var t=e[_r];t.i===0||t.i===1?t.j():t.O=!0}function j_(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||ps("ES5").S(t,e,r),r?(n[_r].P&&($y(t),ga(4)),nl(e)&&(e=By(t,e),t.l||Vy(t,e)),t.u&&ps("Patches").M(n[_r].t,e,t.u,t.s)):e=By(t,n,[]),$y(t),t.u&&t.v(t.u,t.s),e!==QN?e:void 0}function By(e,t,n){if(J4(t))return t;var r=t[_r];if(!r)return ef(t,function(o,h){return FT(e,r,t,o,h,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Vy(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=Y4(r.k):r.o,l=i,c=!1;r.i===3&&(l=new Set(i),i.clear(),c=!0),ef(l,function(o,h){return FT(e,r,i,o,h,n,c)}),Vy(e,i,!1),n&&e.u&&ps("Patches").N(r,n,e.u,e.s)}return r.o}function FT(e,t,n,r,i,l,c){if(Jd(i)){var o=By(e,i,l&&t&&t.i!==3&&!xw(t.R,r)?l.concat(r):void 0);if(YN(n,r,o),!Jd(o))return;e.m=!1}else c&&n.add(i);if(nl(i)&&!J4(i)){if(!e.h.D&&e._<1)return;By(e,i),t&&t.A.l||Vy(e,i)}}function Vy(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&Q4(t,n)}function K_(e,t){var n=e[_r];return(n?Fi(n):e)[t]}function $T(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Bs(e){e.P||(e.P=!0,e.l&&Bs(e.l))}function H_(e){e.o||(e.o=Y4(e.t))}function Lp(e,t,n){var r=Z4(t)?ps("MapSet").F(t,n):X4(t)?ps("MapSet").T(t,n):e.g?function(i,l){var c=Array.isArray(i),o={i:c?1:0,A:l?l.A:Fy(),P:!1,I:!1,R:{},l,t:i,k:null,o:null,j:null,C:!1},h=o,p=ww;c&&(h=[o],p=Uh);var g=Proxy.revocable(h,p),b=g.revoke,w=g.proxy;return o.k=w,o.j=b,w}(t,n):ps("ES5").J(t,n);return(n?n.A:Fy()).p.push(r),r}function Ace(e){return Jd(e)||ga(22,e),function t(n){if(!nl(n))return n;var r,i=n[_r],l=wf(n);if(i){if(!i.P&&(i.i<4||!ps("ES5").K(i)))return i.t;i.I=!0,r=BT(n,l),i.I=!1}else r=BT(n,l);return ef(r,function(c,o){i&&Tce(i.t,c)===o||YN(r,c,t(o))}),l===3?new Set(r):r}(e)}function BT(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Y4(e)}function Oce(){function e(o,h){function p(){this.constructor=o}i(o,h),o.prototype=(p.prototype=h.prototype,new p)}function t(o){o.o||(o.R=new Map,o.o=new Map(o.t))}function n(o){o.o||(o.o=new Set,o.t.forEach(function(h){if(nl(h)){var p=Lp(o.A.h,h,o);o.p.set(h,p),o.o.add(p)}else o.o.add(h)}))}function r(o){o.O&&ga(3,JSON.stringify(Fi(o)))}var i=function(o,h){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,g){p.__proto__=g}||function(p,g){for(var b in g)g.hasOwnProperty(b)&&(p[b]=g[b])})(o,h)},l=function(){function o(p,g){return this[_r]={i:2,l:g,A:g?g.A:Fy(),P:!1,I:!1,o:void 0,R:void 0,t:p,k:this,C:!1,O:!1},this}e(o,Map);var h=o.prototype;return Object.defineProperty(h,"size",{get:function(){return Fi(this[_r]).size}}),h.has=function(p){return Fi(this[_r]).has(p)},h.set=function(p,g){var b=this[_r];return r(b),Fi(b).has(p)&&Fi(b).get(p)===g||(t(b),Bs(b),b.R.set(p,!0),b.o.set(p,g),b.R.set(p,!0)),this},h.delete=function(p){if(!this.has(p))return!1;var g=this[_r];return r(g),t(g),Bs(g),g.t.has(p)?g.R.set(p,!1):g.R.delete(p),g.o.delete(p),!0},h.clear=function(){var p=this[_r];r(p),Fi(p).size&&(t(p),Bs(p),p.R=new Map,ef(p.t,function(g){p.R.set(g,!1)}),p.o.clear())},h.forEach=function(p,g){var b=this;Fi(this[_r]).forEach(function(w,P){p.call(g,b.get(P),P,b)})},h.get=function(p){var g=this[_r];r(g);var b=Fi(g).get(p);if(g.I||!nl(b)||b!==g.t.get(p))return b;var w=Lp(g.A.h,b,g);return t(g),g.o.set(p,w),w},h.keys=function(){return Fi(this[_r]).keys()},h.values=function(){var p,g=this,b=this.keys();return(p={})[ag]=function(){return g.values()},p.next=function(){var w=b.next();return w.done?w:{done:!1,value:g.get(w.value)}},p},h.entries=function(){var p,g=this,b=this.keys();return(p={})[ag]=function(){return g.entries()},p.next=function(){var w=b.next();if(w.done)return w;var P=g.get(w.value);return{done:!1,value:[w.value,P]}},p},h[ag]=function(){return this.entries()},o}(),c=function(){function o(p,g){return this[_r]={i:3,l:g,A:g?g.A:Fy(),P:!1,I:!1,o:void 0,t:p,k:this,p:new Map,O:!1,C:!1},this}e(o,Set);var h=o.prototype;return Object.defineProperty(h,"size",{get:function(){return Fi(this[_r]).size}}),h.has=function(p){var g=this[_r];return r(g),g.o?!!g.o.has(p)||!(!g.p.has(p)||!g.o.has(g.p.get(p))):g.t.has(p)},h.add=function(p){var g=this[_r];return r(g),this.has(p)||(n(g),Bs(g),g.o.add(p)),this},h.delete=function(p){if(!this.has(p))return!1;var g=this[_r];return r(g),n(g),Bs(g),g.o.delete(p)||!!g.p.has(p)&&g.o.delete(g.p.get(p))},h.clear=function(){var p=this[_r];r(p),Fi(p).size&&(n(p),Bs(p),p.o.clear())},h.values=function(){var p=this[_r];return r(p),n(p),p.o.values()},h.entries=function(){var p=this[_r];return r(p),n(p),p.o.entries()},h.keys=function(){return this.values()},h[ag]=function(){return this.values()},h.forEach=function(p,g){for(var b=this.values(),w=b.next();!w.done;)p.call(g,w.value,w.value,this),w=b.next()},o}();Mce("MapSet",{F:function(o,h){return new l(o,h)},T:function(o,h){return new c(o,h)}})}var VT,zp,e3=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Nce=typeof Map<"u",Dce=typeof Set<"u",UT=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",QN=e3?Symbol.for("immer-nothing"):((VT={})["immer-nothing"]=!0,VT),jT=e3?Symbol.for("immer-draftable"):"__$immer_draftable",_r=e3?Symbol.for("immer-state"):"__$immer_state",ag=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",Lce=""+Object.prototype.constructor,t3=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,zce=Object.getOwnPropertyDescriptors||function(e){var t={};return t3(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},bw={},ww={get:function(e,t){if(t===_r)return e;var n=Fi(e);if(!xw(n,t))return function(i,l,c){var o,h=$T(l,c);return h?"value"in h?h.value:(o=h.get)===null||o===void 0?void 0:o.call(i.k):void 0}(e,n,t);var r=n[t];return e.I||!nl(r)?r:r===K_(e.t,t)?(H_(e),e.o[t]=Lp(e.A.h,r,e)):r},has:function(e,t){return t in Fi(e)},ownKeys:function(e){return Reflect.ownKeys(Fi(e))},set:function(e,t,n){var r=$T(Fi(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=K_(Fi(e),t),l=i==null?void 0:i[_r];if(l&&l.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(Pce(n,i)&&(n!==void 0||xw(e.t,t)))return!0;H_(e),Bs(e)}return e.o[t]===n&&(n!==void 0||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return K_(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,H_(e),Bs(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=Fi(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){ga(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){ga(12)}},Uh={};ef(ww,function(e,t){Uh[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Uh.deleteProperty=function(e,t){return Uh.set.call(this,e,t,void 0)},Uh.set=function(e,t,n){return ww.set.call(this,e[0],t,n,e[0])};var Fce=function(){function e(n){var r=this;this.g=UT,this.D=!0,this.produce=function(i,l,c){if(typeof i=="function"&&typeof l!="function"){var o=l;l=i;var h=r;return function(A){var O=this;A===void 0&&(A=o);for(var M=arguments.length,R=Array(M>1?M-1:0),N=1;N<M;N++)R[N-1]=arguments[N];return h.produce(A,function(z){var B;return(B=l).call.apply(B,[O,z].concat(R))})}}var p;if(typeof l!="function"&&ga(6),c!==void 0&&typeof c!="function"&&ga(7),nl(i)){var g=zT(r),b=Lp(r,i,void 0),w=!0;try{p=l(b),w=!1}finally{w?$y(g):_w(g)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(A){return U_(g,c),j_(A,g)},function(A){throw $y(g),A}):(U_(g,c),j_(p,g))}if(!i||typeof i!="object"){if((p=l(i))===void 0&&(p=i),p===QN&&(p=void 0),r.D&&Q4(p,!0),c){var P=[],I=[];ps("Patches").M(i,p,P,I),c(P,I)}return p}ga(21,i)},this.produceWithPatches=function(i,l){if(typeof i=="function")return function(p){for(var g=arguments.length,b=Array(g>1?g-1:0),w=1;w<g;w++)b[w-1]=arguments[w];return r.produceWithPatches(p,function(P){return i.apply(void 0,[P].concat(b))})};var c,o,h=r.produce(i,l,function(p,g){c=p,o=g});return typeof Promise<"u"&&h instanceof Promise?h.then(function(p){return[p,c,o]}):[h,c,o]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){nl(n)||ga(8),Jd(n)&&(n=Ace(n));var r=zT(this),i=Lp(this,n,void 0);return i[_r].C=!0,_w(r),i},t.finishDraft=function(n,r){var i=n&&n[_r],l=i.A;return U_(l,r),j_(void 0,l)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!UT&&ga(20),this.g=n},t.applyPatches=function(n,r){var i;for(i=r.length-1;i>=0;i--){var l=r[i];if(l.path.length===0&&l.op==="replace"){n=l.value;break}}i>-1&&(r=r.slice(i+1));var c=ps("Patches").$;return Jd(n)?c(n,r):this.produce(n,function(o){return c(o,r)})},e}(),Qo=new Fce,$ce=Qo.produce;Qo.produceWithPatches.bind(Qo);Qo.setAutoFreeze.bind(Qo);Qo.setUseProxies.bind(Qo);Qo.applyPatches.bind(Qo);Qo.createDraft.bind(Qo);Qo.finishDraft.bind(Qo);const Bce=e=>(t,n,r)=>(r.setState=(i,l,...c)=>{const o=typeof i=="function"?$ce(i):i;return t(o,l,...c)},e(r.setState,n,r)),vu=Bce,rl={prediction:[0,0],categories:[],region:null,status:[Fr.initial],deltaTraffic:[-1e3,1e3],factTraffic:[0,0],age:[0,0]},Vce=e=>({filters:rl,setPrediction:t=>{e(n=>{n.filters.prediction=t})},setDeltaTraffic:t=>{e(n=>{n.filters.deltaTraffic=t})},setFactTraffic:t=>{e(n=>{n.filters.factTraffic=t})},setAge:t=>{e(n=>{n.filters.age=t})},setCategories:t=>e(n=>{n.filters.categories=t}),setRegion:t=>e(n=>{n.filters.region=t}),setStatus:t=>e(n=>{n.filters.status=t})}),Oi=mu(vu(Vce)),Uce={included:new Set([]),excluded:new Set([])},jce=e=>({selection:Uce,include:t=>{e(n=>{const{excluded:r}=n.selection;r.has(t)?n.selection.excluded.delete(t):n.selection.included.add(t)})},exclude:t=>{e(n=>{const{included:r}=n.selection;r.has(t)?n.selection.included.delete(t):n.selection.excluded.add(t)})},reset:()=>e(t=>{t.selection.included.clear(),t.selection.excluded.clear()})}),xs=mu(vu(jce)),Kce=()=>{const{selection:e}=xs();return C.exports.useMemo(()=>e.included.size||e.excluded.size,[e])},Uy="https://postnet-dev.selftech.ru",Jo=Aue.create({baseURL:`${Uy}/`,withCredentials:!0,xsrfHeaderName:"X-CSRFToken",xsrfCookieName:"csrftoken"}),JN=(e,t)=>{const n=e||new URLSearchParams;return t&&(t.type==="ao"&&n.append("ao[]",t.id),t.type==="rayon"&&n.append("rayon[]",t.id)),n},pm=async(e,t)=>{const n=JN(e,t),{data:r}=await Jo.get(`/api/placement_points?${n.toString()}`);return r},n3=async(e,t)=>{const n=JN(e,t),{data:r}=await Jo.get(`/api/placement_points/to_excel?${n.toString()}`,{responseType:"arraybuffer"});return r},Hce=()=>Sa(["all-initial-count"],async()=>{const e=new URLSearchParams({page:1,page_size:1,"status[]":[Fr.initial]});return await pm(e)},{select:e=>e.count}),Wce=()=>{const{filters:e}=Oi(),{prediction:t,categories:n,region:r}=e,{selection:{included:i}}=xs(),l=[...i];return Sa(["filtered-points",e,l],async()=>{const c=new URLSearchParams({page:1,page_size:1,"prediction_current[]":t,"status[]":[Fr.initial],"categories[]":n,"included[]":l});return await pm(c,r)},{select:c=>c.count,keepPreviousData:!0})},e9=uf(!0),c1=uf(!1),r3=W$(c1,"setAuth",(e,t)=>{e.set(t)});async function Gce(){try{await Jo.get("/accounts/profile/"),r3(!0)}catch{console.log("Not authorized")}finally{e9.set(!1)}}Gce();class t9 extends Error{constructor(n){super("");zS(this,"errors");this.name="DjangoValidationError";const r=[];for(const i in n)r.push({name:i,errors:n[i]});this.errors=r}}const Cw=uf(!1),Sw=uf(""),qce="\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u0432\u043E\u0439\u0442\u0438 \u0441 \u043F\u0440\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u043C\u0438 \u0443\u0447\u0435\u0442\u043D\u044B\u043C\u0438 \u0434\u0430\u043D\u043D\u044B\u043C\u0438.";async function Zce(e){var n,r,i,l;Cw.set(!0),Sw.set("");try{const{data:c}=await Jo.post("accounts/login/",e);return r3(!0),c}catch(c){var t=qce;throw(r=(n=c.response)==null?void 0:n.data)!=null&&r.detail&&(t=(l=(i=c.response)==null?void 0:i.data)==null?void 0:l.detail,Sw.set(t)),new t9(c.response.data)}finally{Cw.set(!1)}}const Ew=uf(!1),n9=uf("");async function Xce(e){var t;Ew.set(!0);try{const{data:n}=await Jo.post("accounts/register/",e);return n}catch(n){throw(t=n.response.data)!=null&&t.non_field_errors&&n9.set(n.response.data.non_field_errors.join(" ")),new t9(n.response.data)}finally{Ew.set(!1)}}function Yce(){const e=ou(Sw),t=ou(Cw),n=r=>{Zce(r)};return Qe(x4,{direction:"vertical",style:{width:"320px"},children:[e.length>0?E(R0,{type:"error",showIcon:!0,closable:!0,description:e}):null,E(z4.Title,{level:4,children:"\u0412\u0445\u043E\u0434"}),Qe(Ba,{disabled:t,name:"basic",layout:"vertical",onFinish:n,autoComplete:"off",children:[E(Ba.Item,{label:"\u041B\u043E\u0433\u0438\u043D",name:"login",rules:[{required:!0,message:"\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u043F\u043E\u043B\u0435"}],children:E(Kl,{prefix:E(pN,{className:"site-form-item-icon"}),placeholder:"\u043B\u043E\u0433\u0438\u043D"})}),E(Ba.Item,{label:"\u041F\u0430\u0440\u043E\u043B\u044C",name:"password",rules:[{required:!0,message:"\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u043F\u043E\u043B\u0435"}],children:E(Kl,{prefix:E(uw,{className:"site-form-item-icon"}),type:"password",placeholder:"\u043F\u0430\u0440\u043E\u043B\u044C"})}),E(Ba.Item,{children:E(Br,{block:!0,type:"primary",htmlType:"submit",children:"\u0412\u043E\u0439\u0442\u0438"})}),E("div",{style:{textAlign:"center"},children:E(Gb,{to:"/register",children:"\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044F"})})]})]})}function Qce(){return ou(c1)?E(u0,{to:"/",replace:!0}):E("main",{className:"w-screen h-screen flex items-center justify-center",children:E(Yce,{})})}const Jce=e=>{const t=C.exports.useRef(e),n=C.exports.useRef(),r=C.exports.useRef(!1),i=C.exports.useRef(!1),[,l]=C.exports.useState(0);r.current&&(i.current=!0),C.exports.useEffect(()=>(r.current||(n.current=t.current(),r.current=!0),l(c=>c+1),()=>{!i.current||n.current&&n.current()}),[])};function ede(){const[e]=j$(),[t,n]=C.exports.useState(!1);return Jce(()=>{async function r(){try{await Jo.post("accounts/verify-registration/",{user_id:e.get("user_id"),timestamp:e.get("timestamp"),signature:e.get("signature")})}finally{n(!0)}}r()}),t?E(u0,{to:"/"}):E("div",{children:"Verifying..."})}function tde(e){var t=typeof e;return t==="function"||t==="object"&&!!e}function nde(){const[e]=Ba.useForm(),[t,n]=C.exports.useState(""),r=ou(n9),i=ou(Ew),l=c=>{Xce(c).then(()=>{n(`\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u043D. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043F\u043E\u0447\u0442\u0443 ${c.email} \u0434\u043B\u044F \u0430\u043A\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u0430\u043A\u043A\u0430\u0443\u043D\u0442\u0430.`)}).catch(o=>{tde(o.errors)&&e.setFields(o.errors)})};return t?E(uQ,{title:t,status:"success",extra:E(Gb,{to:"/",children:"\u041D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E"})}):Qe(x4,{direction:"vertical",style:{width:"320px"},children:[r.length>0?E(R0,{type:"error",showIcon:!0,closable:!0,description:r}):null,E(z4.Title,{level:4,children:"\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044F"}),Qe(Ba,{form:e,disabled:i,name:"basic",layout:"vertical",onFinish:l,children:[E(Ba.Item,{name:"username",label:"\u041B\u043E\u0433\u0438\u043D",rules:[{required:!0,message:"\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u043F\u043E\u043B\u0435"}],children:E(Kl,{prefix:E(pN,{className:"site-form-item-icon"}),placeholder:""})}),E(Ba.Item,{name:"email",label:"Email",rules:[{required:!0,type:"email",message:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0439 email"}],children:E(Kl,{type:"email",autoComplete:"email",prefix:E(vle,{className:"site-form-item-icon"}),placeholder:""})}),E(Ba.Item,{name:"password",label:"\u041F\u0430\u0440\u043E\u043B\u044C",rules:[{required:!0,message:"\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u043F\u043E\u043B\u0435"}],children:E(Kl,{prefix:E(uw,{className:"site-form-item-icon"}),type:"password",autoComplete:"new-password",placeholder:""})}),E(Ba.Item,{name:"password_confirm",label:"\u041F\u0430\u0440\u043E\u043B\u044C \u0435\u0449\u0435 \u0440\u0430\u0437",rules:[{required:!0,message:"\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u043F\u043E\u043B\u0435"},({getFieldValue:c})=>({validator(o,h){return!h||c("password")===h?Promise.resolve():Promise.reject(new Error("\u041F\u0430\u0440\u043E\u043B\u0438 \u043D\u0435 \u0441\u043E\u0432\u043F\u0430\u0434\u0430\u044E\u0442"))}})],children:E(Kl,{autoComplete:"re-password",prefix:E(uw,{className:"site-form-item-icon"}),type:"password",placeholder:""})}),E(Ba.Item,{children:E(Br,{block:!0,type:"primary",htmlType:"submit",children:"\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F"})}),E("div",{style:{textAlign:"center"},children:E(Gb,{to:"/",children:"\u0423\u0436\u0435 \u0435\u0441\u0442\u044C \u0430\u043A\u043A\u0430\u0443\u043D\u0442"})})]})]})}function rde(){return ou(c1)?E(u0,{to:"/",replace:!0}):E("main",{className:"h-screen w-screen flex items-center justify-center",children:E(nde,{})})}function ide(e){const t=ou(c1);return ou(e9)?E(P4,{className:"user-info-loader"}):t?E($n,{children:e.children}):E(u0,{to:"/signin",replace:!0})}var r9={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Us,function(){var n,r,i;function l(o,h){if(!n)n=h;else if(!r)r=h;else{var p="var sharedChunk = {}; ("+n+")(sharedChunk); ("+r+")(sharedChunk);",g={};n(g),i=h(g),typeof window<"u"&&(i.workerUrl=window.URL.createObjectURL(new Blob([p],{type:"text/javascript"})))}}l(["exports"],function(o){var h=p;function p(u,a,d,m){this.cx=3*u,this.bx=3*(d-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*a,this.by=3*(m-a)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=a,this.p2x=d,this.p2y=m}function g(u,a,d,m){const x=new h(u,a,d,m);return function(S){return x.solve(S)}}p.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,a){if(a===void 0&&(a=1e-6),u<0)return 0;if(u>1)return 1;for(var d=u,m=0;m<8;m++){var x=this.sampleCurveX(d)-u;if(Math.abs(x)<a)return d;var S=this.sampleCurveDerivativeX(d);if(Math.abs(S)<1e-6)break;d-=x/S}var T=0,L=1;for(d=u,m=0;m<20&&(x=this.sampleCurveX(d),!(Math.abs(x-u)<a));m++)u>x?T=d:L=d,d=.5*(L-T)+T;return d},solve:function(u,a){return this.sampleCurveY(this.solveCurveX(u,a))}};const b=g(.25,.1,.25,1);function w(u,a,d){return Math.min(d,Math.max(a,u))}function P(u,a,d){const m=d-a,x=((u-a)%m+m)%m+a;return x===a?d:x}function I(u,...a){for(const d of a)for(const m in d)u[m]=d[m];return u}let A=1;function O(u,a){u.forEach(d=>{a[d]&&(a[d]=a[d].bind(a))})}function M(u,a,d){const m={};for(const x in u)m[x]=a.call(d||this,u[x],x,u);return m}function R(u,a,d){const m={};for(const x in u)a.call(d||this,u[x],x,u)&&(m[x]=u[x]);return m}function N(u){return Array.isArray(u)?u.map(N):typeof u=="object"&&u?M(u,N):u}const z={};function B(u){z[u]||(typeof console<"u"&&console.warn(u),z[u]=!0)}function U(u,a,d){return(d.y-u.y)*(a.x-u.x)>(a.y-u.y)*(d.x-u.x)}function q(u){let a=0;for(let d,m,x=0,S=u.length,T=S-1;x<S;T=x++)d=u[x],m=u[T],a+=(m.x-d.x)*(d.y+m.y);return a}function H(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function te(u){const a={};if(u.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(d,m,x,S)=>{const T=x||S;return a[m]=!T||T.toLowerCase(),""}),a["max-age"]){const d=parseInt(a["max-age"],10);isNaN(d)?delete a["max-age"]:a["max-age"]=d}return a}let Y,le,J=null;function Z(u){if(J==null){const a=u.navigator?u.navigator.userAgent:null;J=!!u.safari||!(!a||!(/\b(iPad|iPhone|iPod)\b/.test(a)||a.match("Safari")&&!a.match("Chrome")))}return J}function Q(u){return typeof ImageBitmap<"u"&&u instanceof ImageBitmap}const ge={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frame(u){const a=requestAnimationFrame(u);return{cancel:()=>cancelAnimationFrame(a)}},getImageData(u,a=0){const d=window.document.createElement("canvas"),m=d.getContext("2d");if(!m)throw new Error("failed to create canvas 2d context");return d.width=u.width,d.height=u.height,m.drawImage(u,0,0,u.width,u.height),m.getImageData(-a,-a,u.width+2*a,u.height+2*a)},resolveURL:u=>(Y||(Y=document.createElement("a")),Y.href=u,Y.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(le==null&&(le=matchMedia("(prefers-reduced-motion: reduce)")),le.matches)}};var re=de;function de(u,a){this.x=u,this.y=a}de.prototype={clone:function(){return new de(this.x,this.y)},add:function(u){return this.clone()._add(u)},sub:function(u){return this.clone()._sub(u)},multByPoint:function(u){return this.clone()._multByPoint(u)},divByPoint:function(u){return this.clone()._divByPoint(u)},mult:function(u){return this.clone()._mult(u)},div:function(u){return this.clone()._div(u)},rotate:function(u){return this.clone()._rotate(u)},rotateAround:function(u,a){return this.clone()._rotateAround(u,a)},matMult:function(u){return this.clone()._matMult(u)},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(u){return this.x===u.x&&this.y===u.y},dist:function(u){return Math.sqrt(this.distSqr(u))},distSqr:function(u){var a=u.x-this.x,d=u.y-this.y;return a*a+d*d},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(u){return Math.atan2(this.y-u.y,this.x-u.x)},angleWith:function(u){return this.angleWithSep(u.x,u.y)},angleWithSep:function(u,a){return Math.atan2(this.x*a-this.y*u,this.x*u+this.y*a)},_matMult:function(u){var a=u[2]*this.x+u[3]*this.y;return this.x=u[0]*this.x+u[1]*this.y,this.y=a,this},_add:function(u){return this.x+=u.x,this.y+=u.y,this},_sub:function(u){return this.x-=u.x,this.y-=u.y,this},_mult:function(u){return this.x*=u,this.y*=u,this},_div:function(u){return this.x/=u,this.y/=u,this},_multByPoint:function(u){return this.x*=u.x,this.y*=u.y,this},_divByPoint:function(u){return this.x/=u.x,this.y/=u.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var u=this.y;return this.y=this.x,this.x=-u,this},_rotate:function(u){var a=Math.cos(u),d=Math.sin(u),m=d*this.x+a*this.y;return this.x=a*this.x-d*this.y,this.y=m,this},_rotateAround:function(u,a){var d=Math.cos(u),m=Math.sin(u),x=a.y+m*(this.x-a.x)+d*(this.y-a.y);return this.x=a.x+d*(this.x-a.x)-m*(this.y-a.y),this.y=x,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},de.convert=function(u){return u instanceof de?u:Array.isArray(u)?new de(u[0],u[1]):u};const oe={MAX_PARALLEL_IMAGE_REQUESTS:16,REGISTERED_PROTOCOLS:{}},ye="mapbox-tiles";let Re,Te,ke=500,De=50;function Me(){typeof caches>"u"||Re||(Re=caches.open(ye))}let Ne=1/0;const Le={supported:!1,testSupport:function(u){!Ue&&qe&&(ct?pt(u):Ve=u)}};let Ve,qe,Ue=!1,ct=!1;function pt(u){const a=u.createTexture();u.bindTexture(u.TEXTURE_2D,a);try{if(u.texImage2D(u.TEXTURE_2D,0,u.RGBA,u.RGBA,u.UNSIGNED_BYTE,qe),u.isContextLost())return;Le.supported=!0}catch{}u.deleteTexture(a),Ue=!0}typeof document<"u"&&(qe=document.createElement("img"),qe.onload=function(){Ve&&pt(Ve),Ve=null,ct=!0},qe.onerror=function(){Ue=!0,Ve=null},qe.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const Tt={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(Tt);class Xe extends Error{constructor(a,d,m,x){super(`AJAXError: ${d} (${a}): ${m}`),this.status=a,this.statusText=d,this.url=m,this.body=x}}const Pt=H()?()=>self.worker&&self.worker.referrer:()=>(window.location.protocol==="blob:"?window.parent:window).location.href;function mt(u,a){const d=new AbortController,m=new Request(u.url,{method:u.method||"GET",body:u.body,credentials:u.credentials,headers:u.headers,referrer:Pt(),signal:d.signal});let x=!1,S=!1;return u.type==="json"&&m.headers.set("Accept","application/json"),((T,L,F)=>{if(S)return;const j=Date.now();fetch(m).then(X=>X.ok?((ne,ue,he)=>{(u.type==="arrayBuffer"?ne.arrayBuffer():u.type==="json"?ne.json():ne.text()).then(pe=>{S||(ue&&he&&function(Ae,Ie,Ze){if(Me(),!Re)return;const st={status:Ie.status,statusText:Ie.statusText,headers:new Headers};Ie.headers.forEach((rt,kt)=>st.headers.set(kt,rt));const Ke=te(Ie.headers.get("Cache-Control")||"");Ke["no-store"]||(Ke["max-age"]&&st.headers.set("Expires",new Date(Ze+1e3*Ke["max-age"]).toUTCString()),new Date(st.headers.get("Expires")).getTime()-Ze<42e4||function(rt,kt){if(Te===void 0)try{new Response(new ReadableStream),Te=!0}catch{Te=!1}Te?kt(rt.body):rt.blob().then(kt)}(Ie,rt=>{const kt=new Response(rt,st);Me(),Re&&Re.then(St=>St.put(function(un){const pn=un.indexOf("?");return pn<0?un:un.slice(0,pn)}(Ae.url),kt)).catch(St=>B(St.message))}))}(m,ue,he),x=!0,a(null,pe,ne.headers.get("Cache-Control"),ne.headers.get("Expires")))}).catch(pe=>{S||a(new Error(pe.message))})})(X,null,j):X.blob().then(ne=>a(new Xe(X.status,X.statusText,u.url,ne)))).catch(X=>{X.code!==20&&a(new Error(X.message))})})(),{cancel:()=>{S=!0,x||d.abort()}}}const Mt=function(u,a){if(/:\/\//.test(u.url)&&!/^https?:|^file:/.test(u.url)){if(H()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",u,a);if(!H()){const m=u.url.substring(0,u.url.indexOf("://"));return(oe.REGISTERED_PROTOCOLS[m]||mt)(u,a)}}if(!(/^file:/.test(d=u.url)||/^file:/.test(Pt())&&!/^\w+:/.test(d))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return mt(u,a);if(H()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",u,a,void 0,!0)}var d;return function(m,x){const S=new XMLHttpRequest;S.open(m.method||"GET",m.url,!0),m.type==="arrayBuffer"&&(S.responseType="arraybuffer");for(const T in m.headers)S.setRequestHeader(T,m.headers[T]);return m.type==="json"&&(S.responseType="text",S.setRequestHeader("Accept","application/json")),S.withCredentials=m.credentials==="include",S.onerror=()=>{x(new Error(S.statusText))},S.onload=()=>{if((S.status>=200&&S.status<300||S.status===0)&&S.response!==null){let T=S.response;if(m.type==="json")try{T=JSON.parse(S.response)}catch(L){return x(L)}x(null,T,S.getResponseHeader("Cache-Control"),S.getResponseHeader("Expires"))}else{const T=new Blob([S.response],{type:S.getResponseHeader("Content-Type")});x(new Xe(S.status,S.statusText,m.url,T))}},S.send(m.body),{cancel:()=>S.abort()}}(u,a)},Ct=function(u,a){return Mt(I(u,{type:"arrayBuffer"}),a)};function Lt(u){const a=window.document.createElement("a");return a.href=u,a.protocol===window.document.location.protocol&&a.host===window.document.location.host}const lt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let dt,ut;dt=[],ut=0;const it=function(u,a){if(Le.supported&&(u.headers||(u.headers={}),u.headers.accept="image/webp,*/*"),ut>=oe.MAX_PARALLEL_IMAGE_REQUESTS){const S={requestParameters:u,callback:a,cancelled:!1,cancel(){this.cancelled=!0}};return dt.push(S),S}ut++;let d=!1;const m=()=>{if(!d)for(d=!0,ut--;dt.length&&ut<oe.MAX_PARALLEL_IMAGE_REQUESTS;){const S=dt.shift(),{requestParameters:T,callback:L,cancelled:F}=S;F||(S.cancel=it(T,L).cancel)}},x=Ct(u,(S,T,L,F)=>{m(),S?a(S):T&&function(j,X){typeof createImageBitmap=="function"?function(ne,ue){const he=new Blob([new Uint8Array(ne)],{type:"image/png"});createImageBitmap(he).then(pe=>{ue(null,pe)}).catch(pe=>{ue(new Error(`Could not load image because of ${pe.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})}(j,X):function(ne,ue){const he=new Image;he.onload=()=>{ue(null,he),URL.revokeObjectURL(he.src),he.onload=null,window.requestAnimationFrame(()=>{he.src=lt})},he.onerror=()=>ue(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const pe=new Blob([new Uint8Array(ne)],{type:"image/png"});he.src=ne.byteLength?URL.createObjectURL(pe):lt}(j,X)}(T,(j,X)=>{j!=null?a(j):X!=null&&a(null,X,{cacheControl:L,expires:F})})});return{cancel:()=>{x.cancel(),m()}}};function ft(u,a,d){d[u]&&d[u].indexOf(a)!==-1||(d[u]=d[u]||[],d[u].push(a))}function xt(u,a,d){if(d&&d[u]){const m=d[u].indexOf(a);m!==-1&&d[u].splice(m,1)}}class Wt{constructor(a,d={}){I(this,d),this.type=a}}class Ut extends Wt{constructor(a,d={}){super("error",I({error:a},d))}}class Qt{on(a,d){return this._listeners=this._listeners||{},ft(a,d,this._listeners),this}off(a,d){return xt(a,d,this._listeners),xt(a,d,this._oneTimeListeners),this}once(a,d){return this._oneTimeListeners=this._oneTimeListeners||{},ft(a,d,this._oneTimeListeners),this}fire(a,d){typeof a=="string"&&(a=new Wt(a,d||{}));const m=a.type;if(this.listens(m)){a.target=this;const x=this._listeners&&this._listeners[m]?this._listeners[m].slice():[];for(const L of x)L.call(this,a);const S=this._oneTimeListeners&&this._oneTimeListeners[m]?this._oneTimeListeners[m].slice():[];for(const L of S)xt(m,L,this._oneTimeListeners),L.call(this,a);const T=this._eventedParent;T&&(I(a,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),T.fire(a))}else a instanceof Ut&&console.error(a.error);return this}listens(a){return this._listeners&&this._listeners[a]&&this._listeners[a].length>0||this._oneTimeListeners&&this._oneTimeListeners[a]&&this._oneTimeListeners[a].length>0||this._eventedParent&&this._eventedParent.listens(a)}setEventedParent(a,d){return this._eventedParent=a,this._eventedParentData=d,this}}var Fe={$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"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"string"},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:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{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-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":{},within:{}}},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}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1},elevationOffset:{type:"number",default:450}},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"}}};class Ge{constructor(a,d,m,x){this.message=(a?`${a}: `:"")+m,x&&(this.identifier=x),d!=null&&d.__line__&&(this.line=d.__line__)}}function Xt(u){const a=u.value;return a?[new Ge(u.key,a,"constants have been deprecated as of v8")]:[]}function dn(u,...a){for(const d of a)for(const m in d)u[m]=d[m];return u}function Vt(u){return u instanceof Number||u instanceof String||u instanceof Boolean?u.valueOf():u}function jt(u){if(Array.isArray(u))return u.map(jt);if(u instanceof Object&&!(u instanceof Number||u instanceof String||u instanceof Boolean)){const a={};for(const d in u)a[d]=jt(u[d]);return a}return Vt(u)}class nn extends Error{constructor(a,d){super(d),this.message=d,this.key=a}}class _n{constructor(a,d=[]){this.parent=a,this.bindings={};for(const[m,x]of d)this.bindings[m]=x}concat(a){return new _n(this,a)}get(a){if(this.bindings[a])return this.bindings[a];if(this.parent)return this.parent.get(a);throw new Error(`${a} not found in scope.`)}has(a){return!!this.bindings[a]||!!this.parent&&this.parent.has(a)}}const An={kind:"null"},_t={kind:"number"},Gt={kind:"string"},an={kind:"boolean"},Fn={kind:"color"},kn={kind:"object"},zt={kind:"value"},Tn={kind:"collator"},Cn={kind:"formatted"},hn={kind:"padding"},Nt={kind:"resolvedImage"};function ot(u,a){return{kind:"array",itemType:u,N:a}}function ht(u){if(u.kind==="array"){const a=ht(u.itemType);return typeof u.N=="number"?`array<${a}, ${u.N}>`:u.itemType.kind==="value"?"array":`array<${a}>`}return u.kind}const At=[An,_t,Gt,an,Fn,Cn,kn,ot(zt),hn,Nt];function $t(u,a){if(a.kind==="error")return null;if(u.kind==="array"){if(a.kind==="array"&&(a.N===0&&a.itemType.kind==="value"||!$t(u.itemType,a.itemType))&&(typeof u.N!="number"||u.N===a.N))return null}else{if(u.kind===a.kind)return null;if(u.kind==="value"){for(const d of At)if(!$t(d,a))return null}}return`Expected ${ht(u)} but found ${ht(a)} instead.`}function cn(u,a){return a.some(d=>d.kind===u.kind)}function Mn(u,a){return a.some(d=>d==="null"?u===null:d==="array"?Array.isArray(u):d==="object"?u&&!Array.isArray(u)&&typeof u=="object":d===typeof u)}var Gn,qn={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function me(u){return(u=Math.round(u))<0?0:u>255?255:u}function K(u){return me(u[u.length-1]==="%"?parseFloat(u)/100*255:parseInt(u))}function G(u){return(a=u[u.length-1]==="%"?parseFloat(u)/100:parseFloat(u))<0?0:a>1?1:a;var a}function ce(u,a,d){return d<0?d+=1:d>1&&(d-=1),6*d<1?u+(a-u)*d*6:2*d<1?a:3*d<2?u+(a-u)*(2/3-d)*6:u}try{Gn={}.parseCSSColor=function(u){var a,d=u.replace(/ /g,"").toLowerCase();if(d in qn)return qn[d].slice();if(d[0]==="#")return d.length===4?(a=parseInt(d.substr(1),16))>=0&&a<=4095?[(3840&a)>>4|(3840&a)>>8,240&a|(240&a)>>4,15&a|(15&a)<<4,1]:null:d.length===7&&(a=parseInt(d.substr(1),16))>=0&&a<=16777215?[(16711680&a)>>16,(65280&a)>>8,255&a,1]:null;var m=d.indexOf("("),x=d.indexOf(")");if(m!==-1&&x+1===d.length){var S=d.substr(0,m),T=d.substr(m+1,x-(m+1)).split(","),L=1;switch(S){case"rgba":if(T.length!==4)return null;L=G(T.pop());case"rgb":return T.length!==3?null:[K(T[0]),K(T[1]),K(T[2]),L];case"hsla":if(T.length!==4)return null;L=G(T.pop());case"hsl":if(T.length!==3)return null;var F=(parseFloat(T[0])%360+360)%360/360,j=G(T[1]),X=G(T[2]),ne=X<=.5?X*(j+1):X+j-X*j,ue=2*X-ne;return[me(255*ce(ue,ne,F+1/3)),me(255*ce(ue,ne,F)),me(255*ce(ue,ne,F-1/3)),L];default:return null}}return null}}catch{}class ae{constructor(a,d,m,x=1){this.r=a,this.g=d,this.b=m,this.a=x}static parse(a){if(!a)return;if(a instanceof ae)return a;if(typeof a!="string")return;const d=Gn(a);return d?new ae(d[0]/255*d[3],d[1]/255*d[3],d[2]/255*d[3],d[3]):void 0}toString(){const[a,d,m,x]=this.toArray();return`rgba(${Math.round(a)},${Math.round(d)},${Math.round(m)},${x})`}toArray(){const{r:a,g:d,b:m,a:x}=this;return x===0?[0,0,0,0]:[255*a/x,255*d/x,255*m/x,x]}}ae.black=new ae(0,0,0,1),ae.white=new ae(1,1,1,1),ae.transparent=new ae(0,0,0,0),ae.red=new ae(1,0,0,1);class xe{constructor(a,d,m){this.sensitivity=a?d?"variant":"case":d?"accent":"base",this.locale=m,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(a,d){return this.collator.compare(a,d)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Ee{constructor(a,d,m,x,S){this.text=a,this.image=d,this.scale=m,this.fontStack=x,this.textColor=S}}class be{constructor(a){this.sections=a}static fromString(a){return new be([new Ee(a,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(a=>a.text.length!==0||a.image&&a.image.name.length!==0)}static factory(a){return a instanceof be?a:be.fromString(a)}toString(){return this.sections.length===0?"":this.sections.map(a=>a.text).join("")}}class Ce{constructor(a){this.values=a.slice()}static parse(a){if(a instanceof Ce)return a;if(typeof a=="number")return new Ce([a,a,a,a]);if(Array.isArray(a)&&!(a.length<1||a.length>4)){for(const d of a)if(typeof d!="number")return;switch(a.length){case 1:a=[a[0],a[0],a[0],a[0]];break;case 2:a=[a[0],a[1],a[0],a[1]];break;case 3:a=[a[0],a[1],a[2],a[1]]}return new Ce(a)}}toString(){return JSON.stringify(this.values)}}class Oe{constructor(a){this.name=a.name,this.available=a.available}toString(){return this.name}static fromString(a){return a?new Oe({name:a,available:!1}):null}}function He(u,a,d,m){return typeof u=="number"&&u>=0&&u<=255&&typeof a=="number"&&a>=0&&a<=255&&typeof d=="number"&&d>=0&&d<=255?m===void 0||typeof m=="number"&&m>=0&&m<=1?null:`Invalid rgba value [${[u,a,d,m].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof m=="number"?[u,a,d,m]:[u,a,d]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function We(u){if(u===null||typeof u=="string"||typeof u=="boolean"||typeof u=="number"||u instanceof ae||u instanceof xe||u instanceof be||u instanceof Ce||u instanceof Oe)return!0;if(Array.isArray(u)){for(const a of u)if(!We(a))return!1;return!0}if(typeof u=="object"){for(const a in u)if(!We(u[a]))return!1;return!0}return!1}function Be(u){if(u===null)return An;if(typeof u=="string")return Gt;if(typeof u=="boolean")return an;if(typeof u=="number")return _t;if(u instanceof ae)return Fn;if(u instanceof xe)return Tn;if(u instanceof be)return Cn;if(u instanceof Ce)return hn;if(u instanceof Oe)return Nt;if(Array.isArray(u)){const a=u.length;let d;for(const m of u){const x=Be(m);if(d){if(d===x)continue;d=zt;break}d=x}return ot(d||zt,a)}return kn}function Ot(u){const a=typeof u;return u===null?"":a==="string"||a==="number"||a==="boolean"?String(u):u instanceof ae||u instanceof be||u instanceof Ce||u instanceof Oe?u.toString():JSON.stringify(u)}class bt{constructor(a,d){this.type=a,this.value=d}static parse(a,d){if(a.length!==2)return d.error(`'literal' expression requires exactly one argument, but found ${a.length-1} instead.`);if(!We(a[1]))return d.error("invalid value");const m=a[1];let x=Be(m);const S=d.expectedType;return x.kind!=="array"||x.N!==0||!S||S.kind!=="array"||typeof S.N=="number"&&S.N!==0||(x=S),new bt(x,m)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class Je{constructor(a){this.name="ExpressionEvaluationError",this.message=a}toJSON(){return this.message}}const Rt={string:Gt,number:_t,boolean:an,object:kn};class Bt{constructor(a,d){this.type=a,this.args=d}static parse(a,d){if(a.length<2)return d.error("Expected at least one argument.");let m,x=1;const S=a[0];if(S==="array"){let L,F;if(a.length>2){const j=a[1];if(typeof j!="string"||!(j in Rt)||j==="object")return d.error('The item type argument of "array" must be one of string, number, boolean',1);L=Rt[j],x++}else L=zt;if(a.length>3){if(a[2]!==null&&(typeof a[2]!="number"||a[2]<0||a[2]!==Math.floor(a[2])))return d.error('The length argument to "array" must be a positive integer literal',2);F=a[2],x++}m=ot(L,F)}else{if(!Rt[S])throw new Error(`Types doesn't contain name = ${S}`);m=Rt[S]}const T=[];for(;x<a.length;x++){const L=d.parse(a[x],x,zt);if(!L)return null;T.push(L)}return new Bt(m,T)}evaluate(a){for(let d=0;d<this.args.length;d++){const m=this.args[d].evaluate(a);if(!$t(this.type,Be(m)))return m;if(d===this.args.length-1)throw new Je(`Expected value to be of type ${ht(this.type)}, but found ${ht(Be(m))} instead.`)}throw new Error}eachChild(a){this.args.forEach(a)}outputDefined(){return this.args.every(a=>a.outputDefined())}}const gn={"to-boolean":an,"to-color":Fn,"to-number":_t,"to-string":Gt};class on{constructor(a,d){this.type=a,this.args=d}static parse(a,d){if(a.length<2)return d.error("Expected at least one argument.");const m=a[0];if(!gn[m])throw new Error(`Can't parse ${m} as it is not part of the known types`);if((m==="to-boolean"||m==="to-string")&&a.length!==2)return d.error("Expected one argument.");const x=gn[m],S=[];for(let T=1;T<a.length;T++){const L=d.parse(a[T],T,zt);if(!L)return null;S.push(L)}return new on(x,S)}evaluate(a){if(this.type.kind==="boolean")return Boolean(this.args[0].evaluate(a));if(this.type.kind==="color"){let d,m;for(const x of this.args){if(d=x.evaluate(a),m=null,d instanceof ae)return d;if(typeof d=="string"){const S=a.parseColor(d);if(S)return S}else if(Array.isArray(d)&&(m=d.length<3||d.length>4?`Invalid rbga value ${JSON.stringify(d)}: expected an array containing either three or four numeric values.`:He(d[0],d[1],d[2],d[3]),!m))return new ae(d[0]/255,d[1]/255,d[2]/255,d[3])}throw new Je(m||`Could not parse color from value '${typeof d=="string"?d:JSON.stringify(d)}'`)}if(this.type.kind==="padding"){let d;for(const m of this.args){d=m.evaluate(a);const x=Ce.parse(d);if(x)return x}throw new Je(`Could not parse padding from value '${typeof d=="string"?d:JSON.stringify(d)}'`)}if(this.type.kind==="number"){let d=null;for(const m of this.args){if(d=m.evaluate(a),d===null)return 0;const x=Number(d);if(!isNaN(x))return x}throw new Je(`Could not convert ${JSON.stringify(d)} to number.`)}return this.type.kind==="formatted"?be.fromString(Ot(this.args[0].evaluate(a))):this.type.kind==="resolvedImage"?Oe.fromString(Ot(this.args[0].evaluate(a))):Ot(this.args[0].evaluate(a))}eachChild(a){this.args.forEach(a)}outputDefined(){return this.args.every(a=>a.outputDefined())}}const yn=["Unknown","Point","LineString","Polygon"];class Bn{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"?yn[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(a){let d=this._parseColorCache[a];return d||(d=this._parseColorCache[a]=ae.parse(a)),d}}class Jn{constructor(a,d,m,x){this.name=a,this.type=d,this._evaluate=m,this.args=x}evaluate(a){return this._evaluate(a,this.args)}eachChild(a){this.args.forEach(a)}outputDefined(){return!1}static parse(a,d){const m=a[0],x=Jn.definitions[m];if(!x)return d.error(`Unknown expression "${m}". If you wanted a literal array, use ["literal", [...]].`,0);const S=Array.isArray(x)?x[0]:x.type,T=Array.isArray(x)?[[x[1],x[2]]]:x.overloads,L=T.filter(([j])=>!Array.isArray(j)||j.length===a.length-1);let F=null;for(const[j,X]of L){F=new Ga(d.registry,d.path,null,d.scope);const ne=[];let ue=!1;for(let he=1;he<a.length;he++){const pe=a[he],Ae=Array.isArray(j)?j[he-1]:j.type,Ie=F.parse(pe,1+ne.length,Ae);if(!Ie){ue=!0;break}ne.push(Ie)}if(!ue)if(Array.isArray(j)&&j.length!==ne.length)F.error(`Expected ${j.length} arguments, but found ${ne.length} instead.`);else{for(let he=0;he<ne.length;he++){const pe=Array.isArray(j)?j[he]:j.type,Ae=ne[he];F.concat(he+1).checkSubtype(pe,Ae.type)}if(F.errors.length===0)return new Jn(m,S,X,ne)}}if(L.length===1)d.errors.push(...F.errors);else{const j=(L.length?L:T).map(([ne])=>{return ue=ne,Array.isArray(ue)?`(${ue.map(ht).join(", ")})`:`(${ht(ue.type)}...)`;var ue}).join(" | "),X=[];for(let ne=1;ne<a.length;ne++){const ue=d.parse(a[ne],1+X.length);if(!ue)return null;X.push(ht(ue.type))}d.error(`Expected arguments of type ${j}, but found (${X.join(", ")}) instead.`)}return null}static register(a,d){Jn.definitions=d;for(const m in d)a[m]=Jn}}class Dr{constructor(a,d,m){this.type=Tn,this.locale=m,this.caseSensitive=a,this.diacriticSensitive=d}static parse(a,d){if(a.length!==2)return d.error("Expected one argument.");const m=a[1];if(typeof m!="object"||Array.isArray(m))return d.error("Collator options argument must be an object.");const x=d.parse(m["case-sensitive"]!==void 0&&m["case-sensitive"],1,an);if(!x)return null;const S=d.parse(m["diacritic-sensitive"]!==void 0&&m["diacritic-sensitive"],1,an);if(!S)return null;let T=null;return m.locale&&(T=d.parse(m.locale,1,Gt),!T)?null:new Dr(x,S,T)}evaluate(a){return new xe(this.caseSensitive.evaluate(a),this.diacriticSensitive.evaluate(a),this.locale?this.locale.evaluate(a):null)}eachChild(a){a(this.caseSensitive),a(this.diacriticSensitive),this.locale&&a(this.locale)}outputDefined(){return!1}}const or=8192;function Pr(u,a){u[0]=Math.min(u[0],a[0]),u[1]=Math.min(u[1],a[1]),u[2]=Math.max(u[2],a[0]),u[3]=Math.max(u[3],a[1])}function Pn(u,a){return!(u[0]<=a[0]||u[2]>=a[2]||u[1]<=a[1]||u[3]>=a[3])}function Sn(u,a){const d=(180+u[0])/360,m=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u[1]*Math.PI/360)))/360,x=Math.pow(2,a.z);return[Math.round(d*x*or),Math.round(m*x*or)]}function Rn(u,a,d){const m=u[0]-a[0],x=u[1]-a[1],S=u[0]-d[0],T=u[1]-d[1];return m*T-S*x==0&&m*S<=0&&x*T<=0}function Wr(u,a){let d=!1;for(let T=0,L=a.length;T<L;T++){const F=a[T];for(let j=0,X=F.length;j<X-1;j++){if(Rn(u,F[j],F[j+1]))return!1;(x=F[j])[1]>(m=u)[1]!=(S=F[j+1])[1]>m[1]&&m[0]<(S[0]-x[0])*(m[1]-x[1])/(S[1]-x[1])+x[0]&&(d=!d)}}var m,x,S;return d}function vr(u,a){for(let d=0;d<a.length;d++)if(Wr(u,a[d]))return!0;return!1}function jn(u,a,d,m){const x=m[0]-d[0],S=m[1]-d[1],T=(u[0]-d[0])*S-x*(u[1]-d[1]),L=(a[0]-d[0])*S-x*(a[1]-d[1]);return T>0&&L<0||T<0&&L>0}function Ln(u,a,d){for(const j of d)for(let X=0;X<j.length-1;++X)if((L=[(T=j[X+1])[0]-(S=j[X])[0],T[1]-S[1]])[0]*(F=[(x=a)[0]-(m=u)[0],x[1]-m[1]])[1]-L[1]*F[0]!=0&&jn(m,x,S,T)&&jn(S,T,m,x))return!0;var m,x,S,T,L,F;return!1}function Yn(u,a){for(let d=0;d<u.length;++d)if(!Wr(u[d],a))return!1;for(let d=0;d<u.length-1;++d)if(Ln(u[d],u[d+1],a))return!1;return!0}function xr(u,a){for(let d=0;d<a.length;d++)if(Yn(u,a[d]))return!0;return!1}function br(u,a,d){const m=[];for(let x=0;x<u.length;x++){const S=[];for(let T=0;T<u[x].length;T++){const L=Sn(u[x][T],d);Pr(a,L),S.push(L)}m.push(S)}return m}function Lr(u,a,d){const m=[];for(let x=0;x<u.length;x++){const S=br(u[x],a,d);m.push(S)}return m}function so(u,a,d,m){if(u[0]<d[0]||u[0]>d[2]){const x=.5*m;let S=u[0]-d[0]>x?-m:d[0]-u[0]>x?m:0;S===0&&(S=u[0]-d[2]>x?-m:d[2]-u[0]>x?m:0),u[0]+=S}Pr(a,u)}function cl(u,a,d,m){const x=Math.pow(2,m.z)*or,S=[m.x*or,m.y*or],T=[];for(const L of u)for(const F of L){const j=[F.x+S[0],F.y+S[1]];so(j,a,d,x),T.push(j)}return T}function Ac(u,a,d,m){const x=Math.pow(2,m.z)*or,S=[m.x*or,m.y*or],T=[];for(const F of u){const j=[];for(const X of F){const ne=[X.x+S[0],X.y+S[1]];Pr(a,ne),j.push(ne)}T.push(j)}if(a[2]-a[0]<=x/2){(L=a)[0]=L[1]=1/0,L[2]=L[3]=-1/0;for(const F of T)for(const j of F)so(j,a,d,x)}var L;return T}class Ea{constructor(a,d){this.type=an,this.geojson=a,this.geometries=d}static parse(a,d){if(a.length!==2)return d.error(`'within' expression requires exactly one argument, but found ${a.length-1} instead.`);if(We(a[1])){const m=a[1];if(m.type==="FeatureCollection")for(let x=0;x<m.features.length;++x){const S=m.features[x].geometry.type;if(S==="Polygon"||S==="MultiPolygon")return new Ea(m,m.features[x].geometry)}else if(m.type==="Feature"){const x=m.geometry.type;if(x==="Polygon"||x==="MultiPolygon")return new Ea(m,m.geometry)}else if(m.type==="Polygon"||m.type==="MultiPolygon")return new Ea(m,m)}return d.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(a){if(a.geometry()!=null&&a.canonicalID()!=null){if(a.geometryType()==="Point")return function(d,m){const x=[1/0,1/0,-1/0,-1/0],S=[1/0,1/0,-1/0,-1/0],T=d.canonicalID();if(m.type==="Polygon"){const L=br(m.coordinates,S,T),F=cl(d.geometry(),x,S,T);if(!Pn(x,S))return!1;for(const j of F)if(!Wr(j,L))return!1}if(m.type==="MultiPolygon"){const L=Lr(m.coordinates,S,T),F=cl(d.geometry(),x,S,T);if(!Pn(x,S))return!1;for(const j of F)if(!vr(j,L))return!1}return!0}(a,this.geometries);if(a.geometryType()==="LineString")return function(d,m){const x=[1/0,1/0,-1/0,-1/0],S=[1/0,1/0,-1/0,-1/0],T=d.canonicalID();if(m.type==="Polygon"){const L=br(m.coordinates,S,T),F=Ac(d.geometry(),x,S,T);if(!Pn(x,S))return!1;for(const j of F)if(!Yn(j,L))return!1}if(m.type==="MultiPolygon"){const L=Lr(m.coordinates,S,T),F=Ac(d.geometry(),x,S,T);if(!Pn(x,S))return!1;for(const j of F)if(!xr(j,L))return!1}return!0}(a,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}function zn(u){if(u instanceof Jn&&(u.name==="get"&&u.args.length===1||u.name==="feature-state"||u.name==="has"&&u.args.length===1||u.name==="properties"||u.name==="geometry-type"||u.name==="id"||/^filter-/.test(u.name))||u instanceof Ea)return!1;let a=!0;return u.eachChild(d=>{a&&!zn(d)&&(a=!1)}),a}function Zn(u){if(u instanceof Jn&&u.name==="feature-state")return!1;let a=!0;return u.eachChild(d=>{a&&!Zn(d)&&(a=!1)}),a}function Ir(u,a){if(u instanceof Jn&&a.indexOf(u.name)>=0)return!1;let d=!0;return u.eachChild(m=>{d&&!Ir(m,a)&&(d=!1)}),d}class ki{constructor(a,d){this.type=d.type,this.name=a,this.boundExpression=d}static parse(a,d){if(a.length!==2||typeof a[1]!="string")return d.error("'var' expression requires exactly one string literal argument.");const m=a[1];return d.scope.has(m)?new ki(m,d.scope.get(m)):d.error(`Unknown variable "${m}". Make sure "${m}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(a){return this.boundExpression.evaluate(a)}eachChild(){}outputDefined(){return!1}}class Ga{constructor(a,d=[],m,x=new _n,S=[]){this.registry=a,this.path=d,this.key=d.map(T=>`[${T}]`).join(""),this.scope=x,this.errors=S,this.expectedType=m}parse(a,d,m,x,S={}){return d?this.concat(d,m,x)._parse(a,S):this._parse(a,S)}_parse(a,d){function m(x,S,T){return T==="assert"?new Bt(S,[x]):T==="coerce"?new on(S,[x]):x}if(a!==null&&typeof a!="string"&&typeof a!="boolean"&&typeof a!="number"||(a=["literal",a]),Array.isArray(a)){if(a.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const x=a[0];if(typeof x!="string")return this.error(`Expression name must be a string, but found ${typeof x} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const S=this.registry[x];if(S){let T=S.parse(a,this);if(!T)return null;if(this.expectedType){const L=this.expectedType,F=T.type;if(L.kind!=="string"&&L.kind!=="number"&&L.kind!=="boolean"&&L.kind!=="object"&&L.kind!=="array"||F.kind!=="value")if(L.kind!=="color"&&L.kind!=="formatted"&&L.kind!=="resolvedImage"||F.kind!=="value"&&F.kind!=="string")if(L.kind!=="padding"||F.kind!=="value"&&F.kind!=="number"&&F.kind!=="array"){if(this.checkSubtype(L,F))return null}else T=m(T,L,d.typeAnnotation||"coerce");else T=m(T,L,d.typeAnnotation||"coerce");else T=m(T,L,d.typeAnnotation||"assert")}if(!(T instanceof bt)&&T.type.kind!=="resolvedImage"&&Eo(T)){const L=new Bn;try{T=new bt(T.type,T.evaluate(L))}catch(F){return this.error(F.message),null}}return T}return this.error(`Unknown expression "${x}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(a===void 0?"'undefined' value invalid. Use null instead.":typeof a=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof a} instead.`)}concat(a,d,m){const x=typeof a=="number"?this.path.concat(a):this.path,S=m?this.scope.concat(m):this.scope;return new Ga(this.registry,x,d||null,S,this.errors)}error(a,...d){const m=`${this.key}${d.map(x=>`[${x}]`).join("")}`;this.errors.push(new nn(m,a))}checkSubtype(a,d){const m=$t(a,d);return m&&this.error(m),m}}function Eo(u){if(u instanceof ki)return Eo(u.boundExpression);if(u instanceof Jn&&u.name==="error"||u instanceof Dr||u instanceof Ea)return!1;const a=u instanceof on||u instanceof Bt;let d=!0;return u.eachChild(m=>{d=a?d&&Eo(m):d&&m instanceof bt}),!!d&&zn(u)&&Ir(u,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function _s(u,a){const d=u.length-1;let m,x,S=0,T=d,L=0;for(;S<=T;)if(L=Math.floor((S+T)/2),m=u[L],x=u[L+1],m<=a){if(L===d||a<x)return L;S=L+1}else{if(!(m>a))throw new Je("Input is not a number.");T=L-1}return 0}class ka{constructor(a,d,m){this.type=a,this.input=d,this.labels=[],this.outputs=[];for(const[x,S]of m)this.labels.push(x),this.outputs.push(S)}static parse(a,d){if(a.length-1<4)return d.error(`Expected at least 4 arguments, but found only ${a.length-1}.`);if((a.length-1)%2!=0)return d.error("Expected an even number of arguments.");const m=d.parse(a[1],1,_t);if(!m)return null;const x=[];let S=null;d.expectedType&&d.expectedType.kind!=="value"&&(S=d.expectedType);for(let T=1;T<a.length;T+=2){const L=T===1?-1/0:a[T],F=a[T+1],j=T,X=T+1;if(typeof L!="number")return d.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',j);if(x.length&&x[x.length-1][0]>=L)return d.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',j);const ne=d.parse(F,X,S);if(!ne)return null;S=S||ne.type,x.push([L,ne])}return new ka(S,m,x)}evaluate(a){const d=this.labels,m=this.outputs;if(d.length===1)return m[0].evaluate(a);const x=this.input.evaluate(a);if(x<=d[0])return m[0].evaluate(a);const S=d.length;return x>=d[S-1]?m[S-1].evaluate(a):m[_s(d,x)].evaluate(a)}eachChild(a){a(this.input);for(const d of this.outputs)a(d)}outputDefined(){return this.outputs.every(a=>a.outputDefined())}}function gr(u,a,d){return u*(1-d)+a*d}var Ta=Object.freeze({__proto__:null,number:gr,color:function(u,a,d){return new ae(gr(u.r,a.r,d),gr(u.g,a.g,d),gr(u.b,a.b,d),gr(u.a,a.a,d))},array:function(u,a,d){return u.map((m,x)=>gr(m,a[x],d))},padding:function(u,a,d){const m=u.values,x=a.values;return new Ce([gr(m[0],x[0],d),gr(m[1],x[1],d),gr(m[2],x[2],d),gr(m[3],x[3],d)])}});const gm=.95047,ym=1.08883,Ef=4/29,Oc=6/29,xm=3*Oc*Oc,p1=Math.PI/180,m1=180/Math.PI;function kf(u){return u>.008856451679035631?Math.pow(u,1/3):u/xm+Ef}function Tf(u){return u>Oc?u*u*u:xm*(u-Ef)}function Pf(u){return 255*(u<=.0031308?12.92*u:1.055*Math.pow(u,1/2.4)-.055)}function If(u){return(u/=255)<=.04045?u/12.92:Math.pow((u+.055)/1.055,2.4)}function ar(u){const a=If(u.r),d=If(u.g),m=If(u.b),x=kf((.4124564*a+.3575761*d+.1804375*m)/gm),S=kf((.2126729*a+.7151522*d+.072175*m)/1);return{l:116*S-16,a:500*(x-S),b:200*(S-kf((.0193339*a+.119192*d+.9503041*m)/ym)),alpha:u.a}}function _m(u){let a=(u.l+16)/116,d=isNaN(u.a)?a:a+u.a/500,m=isNaN(u.b)?a:a-u.b/200;return a=1*Tf(a),d=gm*Tf(d),m=ym*Tf(m),new ae(Pf(3.2404542*d-1.5371385*a-.4985314*m),Pf(-.969266*d+1.8760108*a+.041556*m),Pf(.0556434*d-.2040259*a+1.0572252*m),u.alpha)}function v1(u,a,d){const m=a-u;return u+d*(m>180||m<-180?m-360*Math.round(m/360):m)}const _u={forward:ar,reverse:_m,interpolate:function(u,a,d){return{l:gr(u.l,a.l,d),a:gr(u.a,a.a,d),b:gr(u.b,a.b,d),alpha:gr(u.alpha,a.alpha,d)}}},bu={forward:function(u){const{l:a,a:d,b:m}=ar(u),x=Math.atan2(m,d)*m1;return{h:x<0?x+360:x,c:Math.sqrt(d*d+m*m),l:a,alpha:u.a}},reverse:function(u){const a=u.h*p1,d=u.c;return _m({l:u.l,a:Math.cos(a)*d,b:Math.sin(a)*d,alpha:u.alpha})},interpolate:function(u,a,d){return{h:v1(u.h,a.h,d),c:gr(u.c,a.c,d),l:gr(u.l,a.l,d),alpha:gr(u.alpha,a.alpha,d)}}};var bm=Object.freeze({__proto__:null,lab:_u,hcl:bu});class lo{constructor(a,d,m,x,S){this.type=a,this.operator=d,this.interpolation=m,this.input=x,this.labels=[],this.outputs=[];for(const[T,L]of S)this.labels.push(T),this.outputs.push(L)}static interpolationFactor(a,d,m,x){let S=0;if(a.name==="exponential")S=Mf(d,a.base,m,x);else if(a.name==="linear")S=Mf(d,1,m,x);else if(a.name==="cubic-bezier"){const T=a.controlPoints;S=new h(T[0],T[1],T[2],T[3]).solve(Mf(d,1,m,x))}return S}static parse(a,d){let[m,x,S,...T]=a;if(!Array.isArray(x)||x.length===0)return d.error("Expected an interpolation type expression.",1);if(x[0]==="linear")x={name:"linear"};else if(x[0]==="exponential"){const j=x[1];if(typeof j!="number")return d.error("Exponential interpolation requires a numeric base.",1,1);x={name:"exponential",base:j}}else{if(x[0]!=="cubic-bezier")return d.error(`Unknown interpolation type ${String(x[0])}`,1,0);{const j=x.slice(1);if(j.length!==4||j.some(X=>typeof X!="number"||X<0||X>1))return d.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);x={name:"cubic-bezier",controlPoints:j}}}if(a.length-1<4)return d.error(`Expected at least 4 arguments, but found only ${a.length-1}.`);if((a.length-1)%2!=0)return d.error("Expected an even number of arguments.");if(S=d.parse(S,2,_t),!S)return null;const L=[];let F=null;m==="interpolate-hcl"||m==="interpolate-lab"?F=Fn:d.expectedType&&d.expectedType.kind!=="value"&&(F=d.expectedType);for(let j=0;j<T.length;j+=2){const X=T[j],ne=T[j+1],ue=j+3,he=j+4;if(typeof X!="number")return d.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',ue);if(L.length&&L[L.length-1][0]>=X)return d.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',ue);const pe=d.parse(ne,he,F);if(!pe)return null;F=F||pe.type,L.push([X,pe])}return F.kind==="number"||F.kind==="color"||F.kind==="padding"||F.kind==="array"&&F.itemType.kind==="number"&&typeof F.N=="number"?new lo(F,m,x,S,L):d.error(`Type ${ht(F)} is not interpolatable.`)}evaluate(a){const d=this.labels,m=this.outputs;if(d.length===1)return m[0].evaluate(a);const x=this.input.evaluate(a);if(x<=d[0])return m[0].evaluate(a);const S=d.length;if(x>=d[S-1])return m[S-1].evaluate(a);const T=_s(d,x),L=lo.interpolationFactor(this.interpolation,x,d[T],d[T+1]),F=m[T].evaluate(a),j=m[T+1].evaluate(a);return this.operator==="interpolate"?Ta[this.type.kind.toLowerCase()](F,j,L):this.operator==="interpolate-hcl"?bu.reverse(bu.interpolate(bu.forward(F),bu.forward(j),L)):_u.reverse(_u.interpolate(_u.forward(F),_u.forward(j),L))}eachChild(a){a(this.input);for(const d of this.outputs)a(d)}outputDefined(){return this.outputs.every(a=>a.outputDefined())}}function Mf(u,a,d,m){const x=m-d,S=u-d;return x===0?0:a===1?S/x:(Math.pow(a,S)-1)/(Math.pow(a,x)-1)}class Nc{constructor(a,d){this.type=a,this.args=d}static parse(a,d){if(a.length<2)return d.error("Expectected at least one argument.");let m=null;const x=d.expectedType;x&&x.kind!=="value"&&(m=x);const S=[];for(const L of a.slice(1)){const F=d.parse(L,1+S.length,m,void 0,{typeAnnotation:"omit"});if(!F)return null;m=m||F.type,S.push(F)}if(!m)throw new Error("No output type");const T=x&&S.some(L=>$t(x,L.type));return new Nc(T?zt:m,S)}evaluate(a){let d,m=null,x=0;for(const S of this.args)if(x++,m=S.evaluate(a),m&&m instanceof Oe&&!m.available&&(d||(d=m.name),m=null,x===this.args.length&&(m=d)),m!==null)break;return m}eachChild(a){this.args.forEach(a)}outputDefined(){return this.args.every(a=>a.outputDefined())}}class Dc{constructor(a,d){this.type=d.type,this.bindings=[].concat(a),this.result=d}evaluate(a){return this.result.evaluate(a)}eachChild(a){for(const d of this.bindings)a(d[1]);a(this.result)}static parse(a,d){if(a.length<4)return d.error(`Expected at least 3 arguments, but found ${a.length-1} instead.`);const m=[];for(let S=1;S<a.length-1;S+=2){const T=a[S];if(typeof T!="string")return d.error(`Expected string, but found ${typeof T} instead.`,S);if(/[^a-zA-Z0-9_]/.test(T))return d.error("Variable names must contain only alphanumeric characters or '_'.",S);const L=d.parse(a[S+1],S+1);if(!L)return null;m.push([T,L])}const x=d.parse(a[a.length-1],a.length-1,d.expectedType,m);return x?new Dc(m,x):null}outputDefined(){return this.result.outputDefined()}}class Rf{constructor(a,d,m){this.type=a,this.index=d,this.input=m}static parse(a,d){if(a.length!==3)return d.error(`Expected 2 arguments, but found ${a.length-1} instead.`);const m=d.parse(a[1],1,_t),x=d.parse(a[2],2,ot(d.expectedType||zt));return m&&x?new Rf(x.type.itemType,m,x):null}evaluate(a){const d=this.index.evaluate(a),m=this.input.evaluate(a);if(d<0)throw new Je(`Array index out of bounds: ${d} < 0.`);if(d>=m.length)throw new Je(`Array index out of bounds: ${d} > ${m.length-1}.`);if(d!==Math.floor(d))throw new Je(`Array index must be an integer, but found ${d} instead.`);return m[d]}eachChild(a){a(this.index),a(this.input)}outputDefined(){return!1}}class Af{constructor(a,d){this.type=an,this.needle=a,this.haystack=d}static parse(a,d){if(a.length!==3)return d.error(`Expected 2 arguments, but found ${a.length-1} instead.`);const m=d.parse(a[1],1,zt),x=d.parse(a[2],2,zt);return m&&x?cn(m.type,[an,Gt,_t,An,zt])?new Af(m,x):d.error(`Expected first argument to be of type boolean, string, number or null, but found ${ht(m.type)} instead`):null}evaluate(a){const d=this.needle.evaluate(a),m=this.haystack.evaluate(a);if(!m)return!1;if(!Mn(d,["boolean","string","number","null"]))throw new Je(`Expected first argument to be of type boolean, string, number or null, but found ${ht(Be(d))} instead.`);if(!Mn(m,["string","array"]))throw new Je(`Expected second argument to be of type array or string, but found ${ht(Be(m))} instead.`);return m.indexOf(d)>=0}eachChild(a){a(this.needle),a(this.haystack)}outputDefined(){return!0}}class Lc{constructor(a,d,m){this.type=_t,this.needle=a,this.haystack=d,this.fromIndex=m}static parse(a,d){if(a.length<=2||a.length>=5)return d.error(`Expected 3 or 4 arguments, but found ${a.length-1} instead.`);const m=d.parse(a[1],1,zt),x=d.parse(a[2],2,zt);if(!m||!x)return null;if(!cn(m.type,[an,Gt,_t,An,zt]))return d.error(`Expected first argument to be of type boolean, string, number or null, but found ${ht(m.type)} instead`);if(a.length===4){const S=d.parse(a[3],3,_t);return S?new Lc(m,x,S):null}return new Lc(m,x)}evaluate(a){const d=this.needle.evaluate(a),m=this.haystack.evaluate(a);if(!Mn(d,["boolean","string","number","null"]))throw new Je(`Expected first argument to be of type boolean, string, number or null, but found ${ht(Be(d))} instead.`);if(!Mn(m,["string","array"]))throw new Je(`Expected second argument to be of type array or string, but found ${ht(Be(m))} instead.`);if(this.fromIndex){const x=this.fromIndex.evaluate(a);return m.indexOf(d,x)}return m.indexOf(d)}eachChild(a){a(this.needle),a(this.haystack),this.fromIndex&&a(this.fromIndex)}outputDefined(){return!1}}class Of{constructor(a,d,m,x,S,T){this.inputType=a,this.type=d,this.input=m,this.cases=x,this.outputs=S,this.otherwise=T}static parse(a,d){if(a.length<5)return d.error(`Expected at least 4 arguments, but found only ${a.length-1}.`);if(a.length%2!=1)return d.error("Expected an even number of arguments.");let m,x;d.expectedType&&d.expectedType.kind!=="value"&&(x=d.expectedType);const S={},T=[];for(let j=2;j<a.length-1;j+=2){let X=a[j];const ne=a[j+1];Array.isArray(X)||(X=[X]);const ue=d.concat(j);if(X.length===0)return ue.error("Expected at least one branch label.");for(const pe of X){if(typeof pe!="number"&&typeof pe!="string")return ue.error("Branch labels must be numbers or strings.");if(typeof pe=="number"&&Math.abs(pe)>Number.MAX_SAFE_INTEGER)return ue.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof pe=="number"&&Math.floor(pe)!==pe)return ue.error("Numeric branch labels must be integer values.");if(m){if(ue.checkSubtype(m,Be(pe)))return null}else m=Be(pe);if(S[String(pe)]!==void 0)return ue.error("Branch labels must be unique.");S[String(pe)]=T.length}const he=d.parse(ne,j,x);if(!he)return null;x=x||he.type,T.push(he)}const L=d.parse(a[1],1,zt);if(!L)return null;const F=d.parse(a[a.length-1],a.length-1,x);return F?L.type.kind!=="value"&&d.concat(1).checkSubtype(m,L.type)?null:new Of(m,x,L,S,T,F):null}evaluate(a){const d=this.input.evaluate(a);return(Be(d)===this.inputType&&this.outputs[this.cases[d]]||this.otherwise).evaluate(a)}eachChild(a){a(this.input),this.outputs.forEach(a),a(this.otherwise)}outputDefined(){return this.outputs.every(a=>a.outputDefined())&&this.otherwise.outputDefined()}}class Nf{constructor(a,d,m){this.type=a,this.branches=d,this.otherwise=m}static parse(a,d){if(a.length<4)return d.error(`Expected at least 3 arguments, but found only ${a.length-1}.`);if(a.length%2!=0)return d.error("Expected an odd number of arguments.");let m;d.expectedType&&d.expectedType.kind!=="value"&&(m=d.expectedType);const x=[];for(let T=1;T<a.length-1;T+=2){const L=d.parse(a[T],T,an);if(!L)return null;const F=d.parse(a[T+1],T+1,m);if(!F)return null;x.push([L,F]),m=m||F.type}const S=d.parse(a[a.length-1],a.length-1,m);if(!S)return null;if(!m)throw new Error("Can't infer output type");return new Nf(m,x,S)}evaluate(a){for(const[d,m]of this.branches)if(d.evaluate(a))return m.evaluate(a);return this.otherwise.evaluate(a)}eachChild(a){for(const[d,m]of this.branches)a(d),a(m);a(this.otherwise)}outputDefined(){return this.branches.every(([a,d])=>d.outputDefined())&&this.otherwise.outputDefined()}}class zc{constructor(a,d,m,x){this.type=a,this.input=d,this.beginIndex=m,this.endIndex=x}static parse(a,d){if(a.length<=2||a.length>=5)return d.error(`Expected 3 or 4 arguments, but found ${a.length-1} instead.`);const m=d.parse(a[1],1,zt),x=d.parse(a[2],2,_t);if(!m||!x)return null;if(!cn(m.type,[ot(zt),Gt,zt]))return d.error(`Expected first argument to be of type array or string, but found ${ht(m.type)} instead`);if(a.length===4){const S=d.parse(a[3],3,_t);return S?new zc(m.type,m,x,S):null}return new zc(m.type,m,x)}evaluate(a){const d=this.input.evaluate(a),m=this.beginIndex.evaluate(a);if(!Mn(d,["string","array"]))throw new Je(`Expected first argument to be of type array or string, but found ${ht(Be(d))} instead.`);if(this.endIndex){const x=this.endIndex.evaluate(a);return d.slice(m,x)}return d.slice(m)}eachChild(a){a(this.input),a(this.beginIndex),this.endIndex&&a(this.endIndex)}outputDefined(){return!1}}function wm(u,a){return u==="=="||u==="!="?a.kind==="boolean"||a.kind==="string"||a.kind==="number"||a.kind==="null"||a.kind==="value":a.kind==="string"||a.kind==="number"||a.kind==="value"}function Cm(u,a,d,m){return m.compare(a,d)===0}function dl(u,a,d){const m=u!=="=="&&u!=="!=";return class i9{constructor(S,T,L){this.type=an,this.lhs=S,this.rhs=T,this.collator=L,this.hasUntypedArgument=S.type.kind==="value"||T.type.kind==="value"}static parse(S,T){if(S.length!==3&&S.length!==4)return T.error("Expected two or three arguments.");const L=S[0];let F=T.parse(S[1],1,zt);if(!F)return null;if(!wm(L,F.type))return T.concat(1).error(`"${L}" comparisons are not supported for type '${ht(F.type)}'.`);let j=T.parse(S[2],2,zt);if(!j)return null;if(!wm(L,j.type))return T.concat(2).error(`"${L}" comparisons are not supported for type '${ht(j.type)}'.`);if(F.type.kind!==j.type.kind&&F.type.kind!=="value"&&j.type.kind!=="value")return T.error(`Cannot compare types '${ht(F.type)}' and '${ht(j.type)}'.`);m&&(F.type.kind==="value"&&j.type.kind!=="value"?F=new Bt(j.type,[F]):F.type.kind!=="value"&&j.type.kind==="value"&&(j=new Bt(F.type,[j])));let X=null;if(S.length===4){if(F.type.kind!=="string"&&j.type.kind!=="string"&&F.type.kind!=="value"&&j.type.kind!=="value")return T.error("Cannot use collator to compare non-string types.");if(X=T.parse(S[3],3,Tn),!X)return null}return new i9(F,j,X)}evaluate(S){const T=this.lhs.evaluate(S),L=this.rhs.evaluate(S);if(m&&this.hasUntypedArgument){const F=Be(T),j=Be(L);if(F.kind!==j.kind||F.kind!=="string"&&F.kind!=="number")throw new Je(`Expected arguments for "${u}" to be (string, string) or (number, number), but found (${F.kind}, ${j.kind}) instead.`)}if(this.collator&&!m&&this.hasUntypedArgument){const F=Be(T),j=Be(L);if(F.kind!=="string"||j.kind!=="string")return a(S,T,L)}return this.collator?d(S,T,L,this.collator.evaluate(S)):a(S,T,L)}eachChild(S){S(this.lhs),S(this.rhs),this.collator&&S(this.collator)}outputDefined(){return!0}}}const g1=dl("==",function(u,a,d){return a===d},Cm),y1=dl("!=",function(u,a,d){return a!==d},function(u,a,d,m){return!Cm(0,a,d,m)}),x1=dl("<",function(u,a,d){return a<d},function(u,a,d,m){return m.compare(a,d)<0}),_1=dl(">",function(u,a,d){return a>d},function(u,a,d,m){return m.compare(a,d)>0}),b1=dl("<=",function(u,a,d){return a<=d},function(u,a,d,m){return m.compare(a,d)<=0}),w1=dl(">=",function(u,a,d){return a>=d},function(u,a,d,m){return m.compare(a,d)>=0});class Df{constructor(a,d,m,x,S){this.type=Gt,this.number=a,this.locale=d,this.currency=m,this.minFractionDigits=x,this.maxFractionDigits=S}static parse(a,d){if(a.length!==3)return d.error("Expected two arguments.");const m=d.parse(a[1],1,_t);if(!m)return null;const x=a[2];if(typeof x!="object"||Array.isArray(x))return d.error("NumberFormat options argument must be an object.");let S=null;if(x.locale&&(S=d.parse(x.locale,1,Gt),!S))return null;let T=null;if(x.currency&&(T=d.parse(x.currency,1,Gt),!T))return null;let L=null;if(x["min-fraction-digits"]&&(L=d.parse(x["min-fraction-digits"],1,_t),!L))return null;let F=null;return x["max-fraction-digits"]&&(F=d.parse(x["max-fraction-digits"],1,_t),!F)?null:new Df(m,S,T,L,F)}evaluate(a){return new Intl.NumberFormat(this.locale?this.locale.evaluate(a):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(a):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(a):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(a):void 0}).format(this.number.evaluate(a))}eachChild(a){a(this.number),this.locale&&a(this.locale),this.currency&&a(this.currency),this.minFractionDigits&&a(this.minFractionDigits),this.maxFractionDigits&&a(this.maxFractionDigits)}outputDefined(){return!1}}class Fc{constructor(a){this.type=Cn,this.sections=a}static parse(a,d){if(a.length<2)return d.error("Expected at least one argument.");const m=a[1];if(!Array.isArray(m)&&typeof m=="object")return d.error("First argument must be an image or text section.");const x=[];let S=!1;for(let T=1;T<=a.length-1;++T){const L=a[T];if(S&&typeof L=="object"&&!Array.isArray(L)){S=!1;let F=null;if(L["font-scale"]&&(F=d.parse(L["font-scale"],1,_t),!F))return null;let j=null;if(L["text-font"]&&(j=d.parse(L["text-font"],1,ot(Gt)),!j))return null;let X=null;if(L["text-color"]&&(X=d.parse(L["text-color"],1,Fn),!X))return null;const ne=x[x.length-1];ne.scale=F,ne.font=j,ne.textColor=X}else{const F=d.parse(a[T],1,zt);if(!F)return null;const j=F.type.kind;if(j!=="string"&&j!=="value"&&j!=="null"&&j!=="resolvedImage")return d.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");S=!0,x.push({content:F,scale:null,font:null,textColor:null})}}return new Fc(x)}evaluate(a){return new be(this.sections.map(d=>{const m=d.content.evaluate(a);return Be(m)===Nt?new Ee("",m,null,null,null):new Ee(Ot(m),null,d.scale?d.scale.evaluate(a):null,d.font?d.font.evaluate(a).join(","):null,d.textColor?d.textColor.evaluate(a):null)}))}eachChild(a){for(const d of this.sections)a(d.content),d.scale&&a(d.scale),d.font&&a(d.font),d.textColor&&a(d.textColor)}outputDefined(){return!1}}class Lf{constructor(a){this.type=Nt,this.input=a}static parse(a,d){if(a.length!==2)return d.error("Expected two arguments.");const m=d.parse(a[1],1,Gt);return m?new Lf(m):d.error("No image name provided.")}evaluate(a){const d=this.input.evaluate(a),m=Oe.fromString(d);return m&&a.availableImages&&(m.available=a.availableImages.indexOf(d)>-1),m}eachChild(a){a(this.input)}outputDefined(){return!1}}class zf{constructor(a){this.type=_t,this.input=a}static parse(a,d){if(a.length!==2)return d.error(`Expected 1 argument, but found ${a.length-1} instead.`);const m=d.parse(a[1],1);return m?m.type.kind!=="array"&&m.type.kind!=="string"&&m.type.kind!=="value"?d.error(`Expected argument of type string or array, but found ${ht(m.type)} instead.`):new zf(m):null}evaluate(a){const d=this.input.evaluate(a);if(typeof d=="string"||Array.isArray(d))return d.length;throw new Je(`Expected value to be of type string or array, but found ${ht(Be(d))} instead.`)}eachChild(a){a(this.input)}outputDefined(){return!1}}const fl={"==":g1,"!=":y1,">":_1,"<":x1,">=":w1,"<=":b1,array:Bt,at:Rf,boolean:Bt,case:Nf,coalesce:Nc,collator:Dr,format:Fc,image:Lf,in:Af,"index-of":Lc,interpolate:lo,"interpolate-hcl":lo,"interpolate-lab":lo,length:zf,let:Dc,literal:bt,match:Of,number:Bt,"number-format":Df,object:Bt,slice:zc,step:ka,string:Bt,"to-boolean":on,"to-color":on,"to-number":on,"to-string":on,var:ki,within:Ea};function Sm(u,[a,d,m,x]){a=a.evaluate(u),d=d.evaluate(u),m=m.evaluate(u);const S=x?x.evaluate(u):1,T=He(a,d,m,S);if(T)throw new Je(T);return new ae(a/255*S,d/255*S,m/255*S,S)}function Em(u,a){return u in a}function $c(u,a){const d=a[u];return d===void 0?null:d}function bs(u){return{type:u}}function km(u){return{result:"success",value:u}}function hl(u){return{result:"error",value:u}}function Er(u){return u["property-type"]==="data-driven"||u["property-type"]==="cross-faded-data-driven"}function Tm(u){return!!u.expression&&u.expression.parameters.indexOf("zoom")>-1}function Xn(u){return!!u.expression&&u.expression.interpolated}function sr(u){return u instanceof Number?"number":u instanceof String?"string":u instanceof Boolean?"boolean":Array.isArray(u)?"array":u===null?"null":typeof u}function wr(u){return typeof u=="object"&&u!==null&&!Array.isArray(u)}function Mr(u){return u}function wu(u,a){const d=a.type==="color",m=u.stops&&typeof u.stops[0][0]=="object",x=m||!(m||u.property!==void 0),S=u.type||(Xn(a)?"exponential":"interval");if(d||a.type==="padding"){const j=d?ae.parse:Ce.parse;(u=dn({},u)).stops&&(u.stops=u.stops.map(X=>[X[0],j(X[1])])),u.default=j(u.default?u.default:a.default)}if(u.colorSpace&&u.colorSpace!=="rgb"&&!bm[u.colorSpace])throw new Error(`Unknown color space: ${u.colorSpace}`);let T,L,F;if(S==="exponential")T=Pm;else if(S==="interval")T=S1;else if(S==="categorical"){T=C1,L=Object.create(null);for(const j of u.stops)L[j[0]]=j[1];F=typeof u.stops[0][0]}else{if(S!=="identity")throw new Error(`Unknown function type "${S}"`);T=E1}if(m){const j={},X=[];for(let he=0;he<u.stops.length;he++){const pe=u.stops[he],Ae=pe[0].zoom;j[Ae]===void 0&&(j[Ae]={zoom:Ae,type:u.type,property:u.property,default:u.default,stops:[]},X.push(Ae)),j[Ae].stops.push([pe[0].value,pe[1]])}const ne=[];for(const he of X)ne.push([j[he].zoom,wu(j[he],a)]);const ue={name:"linear"};return{kind:"composite",interpolationType:ue,interpolationFactor:lo.interpolationFactor.bind(void 0,ue),zoomStops:ne.map(he=>he[0]),evaluate:({zoom:he},pe)=>Pm({stops:ne,base:u.base},a,he).evaluate(he,pe)}}if(x){const j=S==="exponential"?{name:"exponential",base:u.base!==void 0?u.base:1}:null;return{kind:"camera",interpolationType:j,interpolationFactor:lo.interpolationFactor.bind(void 0,j),zoomStops:u.stops.map(X=>X[0]),evaluate:({zoom:X})=>T(u,a,X,L,F)}}return{kind:"source",evaluate(j,X){const ne=X&&X.properties?X.properties[u.property]:void 0;return ne===void 0?pl(u.default,a.default):T(u,a,ne,L,F)}}}function pl(u,a,d){return u!==void 0?u:a!==void 0?a:d!==void 0?d:void 0}function C1(u,a,d,m,x){return pl(typeof d===x?m[d]:void 0,u.default,a.default)}function S1(u,a,d){if(sr(d)!=="number")return pl(u.default,a.default);const m=u.stops.length;if(m===1||d<=u.stops[0][0])return u.stops[0][1];if(d>=u.stops[m-1][0])return u.stops[m-1][1];const x=_s(u.stops.map(S=>S[0]),d);return u.stops[x][1]}function Pm(u,a,d){const m=u.base!==void 0?u.base:1;if(sr(d)!=="number")return pl(u.default,a.default);const x=u.stops.length;if(x===1||d<=u.stops[0][0])return u.stops[0][1];if(d>=u.stops[x-1][0])return u.stops[x-1][1];const S=_s(u.stops.map(X=>X[0]),d),T=function(X,ne,ue,he){const pe=he-ue,Ae=X-ue;return pe===0?0:ne===1?Ae/pe:(Math.pow(ne,Ae)-1)/(Math.pow(ne,pe)-1)}(d,m,u.stops[S][0],u.stops[S+1][0]),L=u.stops[S][1],F=u.stops[S+1][1];let j=Ta[a.type]||Mr;if(u.colorSpace&&u.colorSpace!=="rgb"){const X=bm[u.colorSpace];j=(ne,ue)=>X.reverse(X.interpolate(X.forward(ne),X.forward(ue),T))}return typeof L.evaluate=="function"?{evaluate(...X){const ne=L.evaluate.apply(void 0,X),ue=F.evaluate.apply(void 0,X);if(ne!==void 0&&ue!==void 0)return j(ne,ue,T)}}:j(L,F,T)}function E1(u,a,d){switch(a.type){case"color":d=ae.parse(d);break;case"formatted":d=be.fromString(d.toString());break;case"resolvedImage":d=Oe.fromString(d.toString());break;case"padding":d=Ce.parse(d);break;default:sr(d)===a.type||a.type==="enum"&&a.values[d]||(d=void 0)}return pl(d,u.default,a.default)}Jn.register(fl,{error:[{kind:"error"},[Gt],(u,[a])=>{throw new Je(a.evaluate(u))}],typeof:[Gt,[zt],(u,[a])=>ht(Be(a.evaluate(u)))],"to-rgba":[ot(_t,4),[Fn],(u,[a])=>a.evaluate(u).toArray()],rgb:[Fn,[_t,_t,_t],Sm],rgba:[Fn,[_t,_t,_t,_t],Sm],has:{type:an,overloads:[[[Gt],(u,[a])=>Em(a.evaluate(u),u.properties())],[[Gt,kn],(u,[a,d])=>Em(a.evaluate(u),d.evaluate(u))]]},get:{type:zt,overloads:[[[Gt],(u,[a])=>$c(a.evaluate(u),u.properties())],[[Gt,kn],(u,[a,d])=>$c(a.evaluate(u),d.evaluate(u))]]},"feature-state":[zt,[Gt],(u,[a])=>$c(a.evaluate(u),u.featureState||{})],properties:[kn,[],u=>u.properties()],"geometry-type":[Gt,[],u=>u.geometryType()],id:[zt,[],u=>u.id()],zoom:[_t,[],u=>u.globals.zoom],"heatmap-density":[_t,[],u=>u.globals.heatmapDensity||0],"line-progress":[_t,[],u=>u.globals.lineProgress||0],accumulated:[zt,[],u=>u.globals.accumulated===void 0?null:u.globals.accumulated],"+":[_t,bs(_t),(u,a)=>{let d=0;for(const m of a)d+=m.evaluate(u);return d}],"*":[_t,bs(_t),(u,a)=>{let d=1;for(const m of a)d*=m.evaluate(u);return d}],"-":{type:_t,overloads:[[[_t,_t],(u,[a,d])=>a.evaluate(u)-d.evaluate(u)],[[_t],(u,[a])=>-a.evaluate(u)]]},"/":[_t,[_t,_t],(u,[a,d])=>a.evaluate(u)/d.evaluate(u)],"%":[_t,[_t,_t],(u,[a,d])=>a.evaluate(u)%d.evaluate(u)],ln2:[_t,[],()=>Math.LN2],pi:[_t,[],()=>Math.PI],e:[_t,[],()=>Math.E],"^":[_t,[_t,_t],(u,[a,d])=>Math.pow(a.evaluate(u),d.evaluate(u))],sqrt:[_t,[_t],(u,[a])=>Math.sqrt(a.evaluate(u))],log10:[_t,[_t],(u,[a])=>Math.log(a.evaluate(u))/Math.LN10],ln:[_t,[_t],(u,[a])=>Math.log(a.evaluate(u))],log2:[_t,[_t],(u,[a])=>Math.log(a.evaluate(u))/Math.LN2],sin:[_t,[_t],(u,[a])=>Math.sin(a.evaluate(u))],cos:[_t,[_t],(u,[a])=>Math.cos(a.evaluate(u))],tan:[_t,[_t],(u,[a])=>Math.tan(a.evaluate(u))],asin:[_t,[_t],(u,[a])=>Math.asin(a.evaluate(u))],acos:[_t,[_t],(u,[a])=>Math.acos(a.evaluate(u))],atan:[_t,[_t],(u,[a])=>Math.atan(a.evaluate(u))],min:[_t,bs(_t),(u,a)=>Math.min(...a.map(d=>d.evaluate(u)))],max:[_t,bs(_t),(u,a)=>Math.max(...a.map(d=>d.evaluate(u)))],abs:[_t,[_t],(u,[a])=>Math.abs(a.evaluate(u))],round:[_t,[_t],(u,[a])=>{const d=a.evaluate(u);return d<0?-Math.round(-d):Math.round(d)}],floor:[_t,[_t],(u,[a])=>Math.floor(a.evaluate(u))],ceil:[_t,[_t],(u,[a])=>Math.ceil(a.evaluate(u))],"filter-==":[an,[Gt,zt],(u,[a,d])=>u.properties()[a.value]===d.value],"filter-id-==":[an,[zt],(u,[a])=>u.id()===a.value],"filter-type-==":[an,[Gt],(u,[a])=>u.geometryType()===a.value],"filter-<":[an,[Gt,zt],(u,[a,d])=>{const m=u.properties()[a.value],x=d.value;return typeof m==typeof x&&m<x}],"filter-id-<":[an,[zt],(u,[a])=>{const d=u.id(),m=a.value;return typeof d==typeof m&&d<m}],"filter->":[an,[Gt,zt],(u,[a,d])=>{const m=u.properties()[a.value],x=d.value;return typeof m==typeof x&&m>x}],"filter-id->":[an,[zt],(u,[a])=>{const d=u.id(),m=a.value;return typeof d==typeof m&&d>m}],"filter-<=":[an,[Gt,zt],(u,[a,d])=>{const m=u.properties()[a.value],x=d.value;return typeof m==typeof x&&m<=x}],"filter-id-<=":[an,[zt],(u,[a])=>{const d=u.id(),m=a.value;return typeof d==typeof m&&d<=m}],"filter->=":[an,[Gt,zt],(u,[a,d])=>{const m=u.properties()[a.value],x=d.value;return typeof m==typeof x&&m>=x}],"filter-id->=":[an,[zt],(u,[a])=>{const d=u.id(),m=a.value;return typeof d==typeof m&&d>=m}],"filter-has":[an,[zt],(u,[a])=>a.value in u.properties()],"filter-has-id":[an,[],u=>u.id()!==null&&u.id()!==void 0],"filter-type-in":[an,[ot(Gt)],(u,[a])=>a.value.indexOf(u.geometryType())>=0],"filter-id-in":[an,[ot(zt)],(u,[a])=>a.value.indexOf(u.id())>=0],"filter-in-small":[an,[Gt,ot(zt)],(u,[a,d])=>d.value.indexOf(u.properties()[a.value])>=0],"filter-in-large":[an,[Gt,ot(zt)],(u,[a,d])=>function(m,x,S,T){for(;S<=T;){const L=S+T>>1;if(x[L]===m)return!0;x[L]>m?T=L-1:S=L+1}return!1}(u.properties()[a.value],d.value,0,d.value.length-1)],all:{type:an,overloads:[[[an,an],(u,[a,d])=>a.evaluate(u)&&d.evaluate(u)],[bs(an),(u,a)=>{for(const d of a)if(!d.evaluate(u))return!1;return!0}]]},any:{type:an,overloads:[[[an,an],(u,[a,d])=>a.evaluate(u)||d.evaluate(u)],[bs(an),(u,a)=>{for(const d of a)if(d.evaluate(u))return!0;return!1}]]},"!":[an,[an],(u,[a])=>!a.evaluate(u)],"is-supported-script":[an,[Gt],(u,[a])=>{const d=u.globals&&u.globals.isSupportedScript;return!d||d(a.evaluate(u))}],upcase:[Gt,[Gt],(u,[a])=>a.evaluate(u).toUpperCase()],downcase:[Gt,[Gt],(u,[a])=>a.evaluate(u).toLowerCase()],concat:[Gt,bs(zt),(u,a)=>a.map(d=>Ot(d.evaluate(u))).join("")],"resolved-locale":[Gt,[Tn],(u,[a])=>a.evaluate(u).resolvedLocale()]});class Bc{constructor(a,d){this.expression=a,this._warningHistory={},this._evaluator=new Bn,this._defaultValue=d?function(m){return m.type==="color"&&wr(m.default)?new ae(0,0,0,0):m.type==="color"?ae.parse(m.default)||null:m.type==="padding"?Ce.parse(m.default)||null:m.default===void 0?null:m.default}(d):null,this._enumValues=d&&d.type==="enum"?d.values:null}evaluateWithoutErrorHandling(a,d,m,x,S,T){return this._evaluator.globals=a,this._evaluator.feature=d,this._evaluator.featureState=m,this._evaluator.canonical=x,this._evaluator.availableImages=S||null,this._evaluator.formattedSection=T,this.expression.evaluate(this._evaluator)}evaluate(a,d,m,x,S,T){this._evaluator.globals=a,this._evaluator.feature=d||null,this._evaluator.featureState=m||null,this._evaluator.canonical=x,this._evaluator.availableImages=S||null,this._evaluator.formattedSection=T||null;try{const L=this.expression.evaluate(this._evaluator);if(L==null||typeof L=="number"&&L!=L)return this._defaultValue;if(this._enumValues&&!(L in this._enumValues))throw new Je(`Expected value to be one of ${Object.keys(this._enumValues).map(F=>JSON.stringify(F)).join(", ")}, but found ${JSON.stringify(L)} instead.`);return L}catch(L){return this._warningHistory[L.message]||(this._warningHistory[L.message]=!0,typeof console<"u"&&console.warn(L.message)),this._defaultValue}}}function Cu(u){return Array.isArray(u)&&u.length>0&&typeof u[0]=="string"&&u[0]in fl}function Su(u,a){const d=new Ga(fl,[],a?function(x){const S={color:Fn,string:Gt,number:_t,enum:Gt,boolean:an,formatted:Cn,padding:hn,resolvedImage:Nt};return x.type==="array"?ot(S[x.value]||zt,x.length):S[x.type]}(a):void 0),m=d.parse(u,void 0,void 0,void 0,a&&a.type==="string"?{typeAnnotation:"coerce"}:void 0);return m?km(new Bc(m,a)):hl(d.errors)}class Eu{constructor(a,d){this.kind=a,this._styleExpression=d,this.isStateDependent=a!=="constant"&&!Zn(d.expression)}evaluateWithoutErrorHandling(a,d,m,x,S,T){return this._styleExpression.evaluateWithoutErrorHandling(a,d,m,x,S,T)}evaluate(a,d,m,x,S,T){return this._styleExpression.evaluate(a,d,m,x,S,T)}}class Ff{constructor(a,d,m,x){this.kind=a,this.zoomStops=m,this._styleExpression=d,this.isStateDependent=a!=="camera"&&!Zn(d.expression),this.interpolationType=x}evaluateWithoutErrorHandling(a,d,m,x,S,T){return this._styleExpression.evaluateWithoutErrorHandling(a,d,m,x,S,T)}evaluate(a,d,m,x,S,T){return this._styleExpression.evaluate(a,d,m,x,S,T)}interpolationFactor(a,d,m){return this.interpolationType?lo.interpolationFactor(this.interpolationType,a,d,m):0}}function Im(u,a){const d=Su(u,a);if(d.result==="error")return d;const m=d.value.expression,x=zn(m);if(!x&&!Er(a))return hl([new nn("","data expressions not supported")]);const S=Ir(m,["zoom"]);if(!S&&!Tm(a))return hl([new nn("","zoom expressions not supported")]);const T=Uc(m);return T||S?T instanceof nn?hl([T]):T instanceof lo&&!Xn(a)?hl([new nn("",'"interpolate" expressions cannot be used with this property')]):km(T?new Ff(x?"camera":"composite",d.value,T.labels,T instanceof lo?T.interpolation:void 0):new Eu(x?"constant":"source",d.value)):hl([new nn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Vc{constructor(a,d){this._parameters=a,this._specification=d,dn(this,wu(this._parameters,this._specification))}static deserialize(a){return new Vc(a._parameters,a._specification)}static serialize(a){return{_parameters:a._parameters,_specification:a._specification}}}function Uc(u){let a=null;if(u instanceof Dc)a=Uc(u.result);else if(u instanceof Nc){for(const d of u.args)if(a=Uc(d),a)break}else(u instanceof ka||u instanceof lo)&&u.input instanceof Jn&&u.input.name==="zoom"&&(a=u);return a instanceof nn||u.eachChild(d=>{const m=Uc(d);m instanceof nn?a=m:!a&&m?a=new nn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):a&&m&&a!==m&&(a=new nn("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),a}function zo(u){const a=u.key,d=u.value,m=u.valueSpec||{},x=u.objectElementValidators||{},S=u.style,T=u.styleSpec;let L=[];const F=sr(d);if(F!=="object")return[new Ge(a,d,`object expected, ${F} found`)];for(const j in d){const X=j.split(".")[0],ne=m[X]||m["*"];let ue;if(x[X])ue=x[X];else if(m[X])ue=co;else if(x["*"])ue=x["*"];else{if(!m["*"]){L.push(new Ge(a,d[j],`unknown property "${j}"`));continue}ue=co}L=L.concat(ue({key:(a&&`${a}.`)+j,value:d[j],valueSpec:ne,style:S,styleSpec:T,object:d,objectKey:j},d))}for(const j in m)x[j]||m[j].required&&m[j].default===void 0&&d[j]===void 0&&L.push(new Ge(a,d,`missing required property "${j}"`));return L}function Mm(u){const a=u.value,d=u.valueSpec,m=u.style,x=u.styleSpec,S=u.key,T=u.arrayElementValidator||co;if(sr(a)!=="array")return[new Ge(S,a,`array expected, ${sr(a)} found`)];if(d.length&&a.length!==d.length)return[new Ge(S,a,`array length ${d.length} expected, length ${a.length} found`)];if(d["min-length"]&&a.length<d["min-length"])return[new Ge(S,a,`array length at least ${d["min-length"]} expected, length ${a.length} found`)];let L={type:d.value,values:d.values};x.$version<7&&(L.function=d.function),sr(d.value)==="object"&&(L=d.value);let F=[];for(let j=0;j<a.length;j++)F=F.concat(T({array:a,arrayIndex:j,value:a[j],valueSpec:L,style:m,styleSpec:x,key:`${S}[${j}]`}));return F}function $f(u){const a=u.key,d=u.value,m=u.valueSpec;let x=sr(d);return x==="number"&&d!=d&&(x="NaN"),x!=="number"?[new Ge(a,d,`number expected, ${x} found`)]:"minimum"in m&&d<m.minimum?[new Ge(a,d,`${d} is less than the minimum value ${m.minimum}`)]:"maximum"in m&&d>m.maximum?[new Ge(a,d,`${d} is greater than the maximum value ${m.maximum}`)]:[]}function Rm(u){const a=u.valueSpec,d=Vt(u.value.type);let m,x,S,T={};const L=d!=="categorical"&&u.value.property===void 0,F=!L,j=sr(u.value.stops)==="array"&&sr(u.value.stops[0])==="array"&&sr(u.value.stops[0][0])==="object",X=zo({key:u.key,value:u.value,valueSpec:u.styleSpec.function,style:u.style,styleSpec:u.styleSpec,objectElementValidators:{stops:function(he){if(d==="identity")return[new Ge(he.key,he.value,'identity function may not have a "stops" property')];let pe=[];const Ae=he.value;return pe=pe.concat(Mm({key:he.key,value:Ae,valueSpec:he.valueSpec,style:he.style,styleSpec:he.styleSpec,arrayElementValidator:ne})),sr(Ae)==="array"&&Ae.length===0&&pe.push(new Ge(he.key,Ae,"array must have at least one stop")),pe},default:function(he){return co({key:he.key,value:he.value,valueSpec:a,style:he.style,styleSpec:he.styleSpec})}}});return d==="identity"&&L&&X.push(new Ge(u.key,u.value,'missing required property "property"')),d==="identity"||u.value.stops||X.push(new Ge(u.key,u.value,'missing required property "stops"')),d==="exponential"&&u.valueSpec.expression&&!Xn(u.valueSpec)&&X.push(new Ge(u.key,u.value,"exponential functions not supported")),u.styleSpec.$version>=8&&(F&&!Er(u.valueSpec)?X.push(new Ge(u.key,u.value,"property functions not supported")):L&&!Tm(u.valueSpec)&&X.push(new Ge(u.key,u.value,"zoom functions not supported"))),d!=="categorical"&&!j||u.value.property!==void 0||X.push(new Ge(u.key,u.value,'"property" property is required')),X;function ne(he){let pe=[];const Ae=he.value,Ie=he.key;if(sr(Ae)!=="array")return[new Ge(Ie,Ae,`array expected, ${sr(Ae)} found`)];if(Ae.length!==2)return[new Ge(Ie,Ae,`array length 2 expected, length ${Ae.length} found`)];if(j){if(sr(Ae[0])!=="object")return[new Ge(Ie,Ae,`object expected, ${sr(Ae[0])} found`)];if(Ae[0].zoom===void 0)return[new Ge(Ie,Ae,"object stop key must have zoom")];if(Ae[0].value===void 0)return[new Ge(Ie,Ae,"object stop key must have value")];if(S&&S>Vt(Ae[0].zoom))return[new Ge(Ie,Ae[0].zoom,"stop zoom values must appear in ascending order")];Vt(Ae[0].zoom)!==S&&(S=Vt(Ae[0].zoom),x=void 0,T={}),pe=pe.concat(zo({key:`${Ie}[0]`,value:Ae[0],valueSpec:{zoom:{}},style:he.style,styleSpec:he.styleSpec,objectElementValidators:{zoom:$f,value:ue}}))}else pe=pe.concat(ue({key:`${Ie}[0]`,value:Ae[0],valueSpec:{},style:he.style,styleSpec:he.styleSpec},Ae));return Cu(jt(Ae[1]))?pe.concat([new Ge(`${Ie}[1]`,Ae[1],"expressions are not allowed in function stops.")]):pe.concat(co({key:`${Ie}[1]`,value:Ae[1],valueSpec:a,style:he.style,styleSpec:he.styleSpec}))}function ue(he,pe){const Ae=sr(he.value),Ie=Vt(he.value),Ze=he.value!==null?he.value:pe;if(m){if(Ae!==m)return[new Ge(he.key,Ze,`${Ae} stop domain type must match previous stop domain type ${m}`)]}else m=Ae;if(Ae!=="number"&&Ae!=="string"&&Ae!=="boolean")return[new Ge(he.key,Ze,"stop domain value must be a number, string, or boolean")];if(Ae!=="number"&&d!=="categorical"){let st=`number expected, ${Ae} found`;return Er(a)&&d===void 0&&(st+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ge(he.key,Ze,st)]}return d!=="categorical"||Ae!=="number"||isFinite(Ie)&&Math.floor(Ie)===Ie?d!=="categorical"&&Ae==="number"&&x!==void 0&&Ie<x?[new Ge(he.key,Ze,"stop domain values must appear in ascending order")]:(x=Ie,d==="categorical"&&Ie in T?[new Ge(he.key,Ze,"stop domain values must be unique")]:(T[Ie]=!0,[])):[new Ge(he.key,Ze,`integer expected, found ${Ie}`)]}}function ws(u){const a=(u.expressionContext==="property"?Im:Su)(jt(u.value),u.valueSpec);if(a.result==="error")return a.value.map(m=>new Ge(`${u.key}${m.key}`,u.value,m.message));const d=a.value.expression||a.value._styleExpression.expression;if(u.expressionContext==="property"&&u.propertyKey==="text-font"&&!d.outputDefined())return[new Ge(u.key,u.value,`Invalid data expression for "${u.propertyKey}". Output values must be contained as literals within the expression.`)];if(u.expressionContext==="property"&&u.propertyType==="layout"&&!Zn(d))return[new Ge(u.key,u.value,'"feature-state" data expressions are not supported with layout properties.')];if(u.expressionContext==="filter"&&!Zn(d))return[new Ge(u.key,u.value,'"feature-state" data expressions are not supported with filters.')];if(u.expressionContext&&u.expressionContext.indexOf("cluster")===0){if(!Ir(d,["zoom","feature-state"]))return[new Ge(u.key,u.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(u.expressionContext==="cluster-initial"&&!zn(d))return[new Ge(u.key,u.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function ku(u){const a=u.key,d=u.value,m=u.valueSpec,x=[];return Array.isArray(m.values)?m.values.indexOf(Vt(d))===-1&&x.push(new Ge(a,d,`expected one of [${m.values.join(", ")}], ${JSON.stringify(d)} found`)):Object.keys(m.values).indexOf(Vt(d))===-1&&x.push(new Ge(a,d,`expected one of [${Object.keys(m.values).join(", ")}], ${JSON.stringify(d)} found`)),x}function ml(u){if(u===!0||u===!1)return!0;if(!Array.isArray(u)||u.length===0)return!1;switch(u[0]){case"has":return u.length>=2&&u[1]!=="$id"&&u[1]!=="$type";case"in":return u.length>=3&&(typeof u[1]!="string"||Array.isArray(u[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return u.length!==3||Array.isArray(u[1])||Array.isArray(u[2]);case"any":case"all":for(const a of u.slice(1))if(!ml(a)&&typeof a!="boolean")return!1;return!0;default:return!0}}const k1={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function jc(u){if(u==null)return{filter:()=>!0,needGeometry:!1};ml(u)||(u=Tu(u));const a=Su(u,k1);if(a.result==="error")throw new Error(a.value.map(d=>`${d.key}: ${d.message}`).join(", "));return{filter:(d,m,x)=>a.value.evaluate(d,m,{},x),needGeometry:Om(u)}}function Am(u,a){return u<a?-1:u>a?1:0}function Om(u){if(!Array.isArray(u))return!1;if(u[0]==="within")return!0;for(let a=1;a<u.length;a++)if(Om(u[a]))return!0;return!1}function Tu(u){if(!u)return!0;const a=u[0];return u.length<=1?a!=="any":a==="=="?Bf(u[1],u[2],"=="):a==="!="?vl(Bf(u[1],u[2],"==")):a==="<"||a===">"||a==="<="||a===">="?Bf(u[1],u[2],a):a==="any"?(d=u.slice(1),["any"].concat(d.map(Tu))):a==="all"?["all"].concat(u.slice(1).map(Tu)):a==="none"?["all"].concat(u.slice(1).map(Tu).map(vl)):a==="in"?Kc(u[1],u.slice(2)):a==="!in"?vl(Kc(u[1],u.slice(2))):a==="has"?Pu(u[1]):a==="!has"?vl(Pu(u[1])):a!=="within"||u;var d}function Bf(u,a,d){switch(u){case"$type":return[`filter-type-${d}`,a];case"$id":return[`filter-id-${d}`,a];default:return[`filter-${d}`,u,a]}}function Kc(u,a){if(a.length===0)return!1;switch(u){case"$type":return["filter-type-in",["literal",a]];case"$id":return["filter-id-in",["literal",a]];default:return a.length>200&&!a.some(d=>typeof d!=typeof a[0])?["filter-in-large",u,["literal",a.sort(Am)]]:["filter-in-small",u,["literal",a]]}}function Pu(u){switch(u){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",u]}}function vl(u){return["!",u]}function Iu(u){return ml(jt(u.value))?ws(dn({},u,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Nm(u)}function Nm(u){const a=u.value,d=u.key;if(sr(a)!=="array")return[new Ge(d,a,`array expected, ${sr(a)} found`)];const m=u.styleSpec;let x,S=[];if(a.length<1)return[new Ge(d,a,"filter array must have at least 1 element")];switch(S=S.concat(ku({key:`${d}[0]`,value:a[0],valueSpec:m.filter_operator,style:u.style,styleSpec:u.styleSpec})),Vt(a[0])){case"<":case"<=":case">":case">=":a.length>=2&&Vt(a[1])==="$type"&&S.push(new Ge(d,a,`"$type" cannot be use with operator "${a[0]}"`));case"==":case"!=":a.length!==3&&S.push(new Ge(d,a,`filter array for operator "${a[0]}" must have 3 elements`));case"in":case"!in":a.length>=2&&(x=sr(a[1]),x!=="string"&&S.push(new Ge(`${d}[1]`,a[1],`string expected, ${x} found`)));for(let T=2;T<a.length;T++)x=sr(a[T]),Vt(a[1])==="$type"?S=S.concat(ku({key:`${d}[${T}]`,value:a[T],valueSpec:m.geometry_type,style:u.style,styleSpec:u.styleSpec})):x!=="string"&&x!=="number"&&x!=="boolean"&&S.push(new Ge(`${d}[${T}]`,a[T],`string, number, or boolean expected, ${x} found`));break;case"any":case"all":case"none":for(let T=1;T<a.length;T++)S=S.concat(Nm({key:`${d}[${T}]`,value:a[T],style:u.style,styleSpec:u.styleSpec}));break;case"has":case"!has":x=sr(a[1]),a.length!==2?S.push(new Ge(d,a,`filter array for "${a[0]}" operator must have 2 elements`)):x!=="string"&&S.push(new Ge(`${d}[1]`,a[1],`string expected, ${x} found`));break;case"within":x=sr(a[1]),a.length!==2?S.push(new Ge(d,a,`filter array for "${a[0]}" operator must have 2 elements`)):x!=="object"&&S.push(new Ge(`${d}[1]`,a[1],`object expected, ${x} found`))}return S}function Mu(u,a){const d=u.key,m=u.style,x=u.styleSpec,S=u.value,T=u.objectKey,L=x[`${a}_${u.layerType}`];if(!L)return[];const F=T.match(/^(.*)-transition$/);if(a==="paint"&&F&&L[F[1]]&&L[F[1]].transition)return co({key:d,value:S,valueSpec:x.transition,style:m,styleSpec:x});const j=u.valueSpec||L[T];if(!j)return[new Ge(d,S,`unknown property "${T}"`)];let X;if(sr(S)==="string"&&Er(j)&&!j.tokens&&(X=/^{([^}]+)}$/.exec(S)))return[new Ge(d,S,`"${T}" does not support interpolation syntax
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(X[1])} }\`.`)];const ne=[];return u.layerType==="symbol"&&(T==="text-field"&&m&&!m.glyphs&&ne.push(new Ge(d,S,'use of "text-field" requires a style "glyphs" property')),T==="text-font"&&wr(jt(S))&&Vt(S.type)==="identity"&&ne.push(new Ge(d,S,'"text-font" does not support identity functions'))),ne.concat(co({key:u.key,value:S,valueSpec:j,style:m,styleSpec:x,expressionContext:"property",propertyType:a,propertyKey:T}))}function Dm(u){return Mu(u,"paint")}function Lm(u){return Mu(u,"layout")}function zm(u){let a=[];const d=u.value,m=u.key,x=u.style,S=u.styleSpec;d.type||d.ref||a.push(new Ge(m,d,'either "type" or "ref" is required'));let T=Vt(d.type);const L=Vt(d.ref);if(d.id){const F=Vt(d.id);for(let j=0;j<u.arrayIndex;j++){const X=x.layers[j];Vt(X.id)===F&&a.push(new Ge(m,d.id,`duplicate layer id "${d.id}", previously used at line ${X.id.__line__}`))}}if("ref"in d){let F;["type","source","source-layer","filter","layout"].forEach(j=>{j in d&&a.push(new Ge(m,d[j],`"${j}" is prohibited for ref layers`))}),x.layers.forEach(j=>{Vt(j.id)===L&&(F=j)}),F?F.ref?a.push(new Ge(m,d.ref,"ref cannot reference another ref layer")):T=Vt(F.type):a.push(new Ge(m,d.ref,`ref layer "${L}" not found`))}else if(T!=="background")if(d.source){const F=x.sources&&x.sources[d.source],j=F&&Vt(F.type);F?j==="vector"&&T==="raster"?a.push(new Ge(m,d.source,`layer "${d.id}" requires a raster source`)):j==="raster"&&T!=="raster"?a.push(new Ge(m,d.source,`layer "${d.id}" requires a vector source`)):j!=="vector"||d["source-layer"]?j==="raster-dem"&&T!=="hillshade"?a.push(new Ge(m,d.source,"raster-dem source can only be used with layer type 'hillshade'.")):T!=="line"||!d.paint||!d.paint["line-gradient"]||j==="geojson"&&F.lineMetrics||a.push(new Ge(m,d,`layer "${d.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):a.push(new Ge(m,d,`layer "${d.id}" must specify a "source-layer"`)):a.push(new Ge(m,d.source,`source "${d.source}" not found`))}else a.push(new Ge(m,d,'missing required property "source"'));return a=a.concat(zo({key:m,value:d,valueSpec:S.layer,style:u.style,styleSpec:u.styleSpec,objectElementValidators:{"*":()=>[],type:()=>co({key:`${m}.type`,value:d.type,valueSpec:S.layer.type,style:u.style,styleSpec:u.styleSpec,object:d,objectKey:"type"}),filter:Iu,layout:F=>zo({layer:d,key:F.key,value:F.value,style:F.style,styleSpec:F.styleSpec,objectElementValidators:{"*":j=>Lm(dn({layerType:T},j))}}),paint:F=>zo({layer:d,key:F.key,value:F.value,style:F.style,styleSpec:F.styleSpec,objectElementValidators:{"*":j=>Dm(dn({layerType:T},j))}})}})),a}function gl(u){const a=u.value,d=u.key,m=sr(a);return m!=="string"?[new Ge(d,a,`string expected, ${m} found`)]:[]}const Fm={promoteId:function({key:u,value:a}){if(sr(a)==="string")return gl({key:u,value:a});{const d=[];for(const m in a)d.push(...gl({key:`${u}.${m}`,value:a[m]}));return d}}};function Ru(u){const a=u.value,d=u.key,m=u.styleSpec,x=u.style;if(!a.type)return[new Ge(d,a,'"type" is required')];const S=Vt(a.type);let T;switch(S){case"vector":case"raster":case"raster-dem":return T=zo({key:d,value:a,valueSpec:m[`source_${S.replace("-","_")}`],style:u.style,styleSpec:m,objectElementValidators:Fm}),T;case"geojson":if(T=zo({key:d,value:a,valueSpec:m.source_geojson,style:x,styleSpec:m,objectElementValidators:Fm}),a.cluster)for(const L in a.clusterProperties){const[F,j]=a.clusterProperties[L],X=typeof F=="string"?[F,["accumulated"],["get",L]]:F;T.push(...ws({key:`${d}.${L}.map`,value:j,expressionContext:"cluster-map"})),T.push(...ws({key:`${d}.${L}.reduce`,value:X,expressionContext:"cluster-reduce"}))}return T;case"video":return zo({key:d,value:a,valueSpec:m.source_video,style:x,styleSpec:m});case"image":return zo({key:d,value:a,valueSpec:m.source_image,style:x,styleSpec:m});case"canvas":return[new Ge(d,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return ku({key:`${d}.type`,value:a.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:x,styleSpec:m})}}function Au(u){const a=u.value,d=u.styleSpec,m=d.light,x=u.style;let S=[];const T=sr(a);if(a===void 0)return S;if(T!=="object")return S=S.concat([new Ge("light",a,`object expected, ${T} found`)]),S;for(const L in a){const F=L.match(/^(.*)-transition$/);S=S.concat(F&&m[F[1]]&&m[F[1]].transition?co({key:L,value:a[L],valueSpec:d.transition,style:x,styleSpec:d}):m[L]?co({key:L,value:a[L],valueSpec:m[L],style:x,styleSpec:d}):[new Ge(L,a[L],`unknown property "${L}"`)])}return S}function uo(u){const a=u.value,d=u.styleSpec,m=d.terrain,x=u.style;let S=[];const T=sr(a);if(a===void 0)return S;if(T!=="object")return S=S.concat([new Ge("terrain",a,`object expected, ${T} found`)]),S;for(const L in a)S=S.concat(m[L]?co({key:L,value:a[L],valueSpec:m[L],style:x,styleSpec:d}):[new Ge(L,a[L],`unknown property "${L}"`)]);return S}const Ou={"*":()=>[],array:Mm,boolean:function(u){const a=u.value,d=u.key,m=sr(a);return m!=="boolean"?[new Ge(d,a,`boolean expected, ${m} found`)]:[]},number:$f,color:function(u){const a=u.key,d=u.value,m=sr(d);return m!=="string"?[new Ge(a,d,`color expected, ${m} found`)]:Gn(d)===null?[new Ge(a,d,`color expected, "${d}" found`)]:[]},constants:Xt,enum:ku,filter:Iu,function:Rm,layer:zm,object:zo,source:Ru,light:Au,terrain:uo,string:gl,formatted:function(u){return gl(u).length===0?[]:ws(u)},resolvedImage:function(u){return gl(u).length===0?[]:ws(u)},padding:function(u){const a=u.key,d=u.value;if(sr(d)==="array"){if(d.length<1||d.length>4)return[new Ge(a,d,`padding requires 1 to 4 values; ${d.length} values found`)];const m={type:"number"};let x=[];for(let S=0;S<d.length;S++)x=x.concat(co({key:`${a}[${S}]`,value:d[S],valueSpec:m}));return x}return $f({key:a,value:d,valueSpec:{}})}};function co(u){const a=u.value,d=u.valueSpec,m=u.styleSpec;return d.expression&&wr(Vt(a))?Rm(u):d.expression&&Cu(jt(a))?ws(u):d.type&&Ou[d.type]?Ou[d.type](u):zo(dn({},u,{valueSpec:d.type?m[d.type]:d}))}function T1(u){const a=u.value,d=u.key,m=gl(u);return m.length||(a.indexOf("{fontstack}")===-1&&m.push(new Ge(d,a,'"glyphs" url must include a "{fontstack}" token')),a.indexOf("{range}")===-1&&m.push(new Ge(d,a,'"glyphs" url must include a "{range}" token'))),m}function qa(u,a=Fe){let d=[];return d=d.concat(co({key:"",value:u,valueSpec:a.$root,styleSpec:a,style:u,objectElementValidators:{glyphs:T1,"*":()=>[]}})),u.constants&&(d=d.concat(Xt({key:"constants",value:u.constants,style:u,styleSpec:a}))),$m(d)}function $m(u){return[].concat(u).sort((a,d)=>a.line-d.line)}function Pa(u){return function(...a){return $m(u.apply(this,a))}}qa.source=Pa(Ru),qa.light=Pa(Au),qa.terrain=Pa(uo),qa.layer=Pa(zm),qa.filter=Pa(Iu),qa.paintProperty=Pa(Dm),qa.layoutProperty=Pa(Lm);const Nu=qa,Vf=Nu.light,P1=Nu.paintProperty,I1=Nu.layoutProperty;function Hc(u,a){let d=!1;if(a&&a.length)for(const m of a)u.fire(new Ut(new Error(m.message))),d=!0;return d}class Du{constructor(a,d,m){const x=this.cells=[];if(a instanceof ArrayBuffer){this.arrayBuffer=a;const T=new Int32Array(this.arrayBuffer);a=T[0],this.d=(d=T[1])+2*(m=T[2]);for(let F=0;F<this.d*this.d;F++){const j=T[3+F],X=T[3+F+1];x.push(j===X?null:T.subarray(j,X))}const L=T[3+x.length+1];this.keys=T.subarray(T[3+x.length],L),this.bboxes=T.subarray(L),this.insert=this._insertReadonly}else{this.d=d+2*m;for(let T=0;T<this.d*this.d;T++)x.push([]);this.keys=[],this.bboxes=[]}this.n=d,this.extent=a,this.padding=m,this.scale=d/a,this.uid=0;const S=m/d*a;this.min=-S,this.max=a+S}insert(a,d,m,x,S){this._forEachCell(d,m,x,S,this._insertCell,this.uid++,void 0,void 0),this.keys.push(a),this.bboxes.push(d),this.bboxes.push(m),this.bboxes.push(x),this.bboxes.push(S)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(a,d,m,x,S,T){this.cells[S].push(T)}query(a,d,m,x,S){const T=this.min,L=this.max;if(a<=T&&d<=T&&L<=m&&L<=x&&!S)return Array.prototype.slice.call(this.keys);{const F=[];return this._forEachCell(a,d,m,x,this._queryCell,F,{},S),F}}_queryCell(a,d,m,x,S,T,L,F){const j=this.cells[S];if(j!==null){const X=this.keys,ne=this.bboxes;for(let ue=0;ue<j.length;ue++){const he=j[ue];if(L[he]===void 0){const pe=4*he;(F?F(ne[pe+0],ne[pe+1],ne[pe+2],ne[pe+3]):a<=ne[pe+2]&&d<=ne[pe+3]&&m>=ne[pe+0]&&x>=ne[pe+1])?(L[he]=!0,T.push(X[he])):L[he]=!1}}}}_forEachCell(a,d,m,x,S,T,L,F){const j=this._convertToCellCoord(a),X=this._convertToCellCoord(d),ne=this._convertToCellCoord(m),ue=this._convertToCellCoord(x);for(let he=j;he<=ne;he++)for(let pe=X;pe<=ue;pe++){const Ae=this.d*pe+he;if((!F||F(this._convertFromCellCoord(he),this._convertFromCellCoord(pe),this._convertFromCellCoord(he+1),this._convertFromCellCoord(pe+1)))&&S.call(this,a,d,m,x,Ae,T,L,F))return}}_convertFromCellCoord(a){return(a-this.padding)/this.scale}_convertToCellCoord(a){return Math.max(0,Math.min(this.d-1,Math.floor(a*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const a=this.cells,d=3+this.cells.length+1+1;let m=0;for(let T=0;T<this.cells.length;T++)m+=this.cells[T].length;const x=new Int32Array(d+m+this.keys.length+this.bboxes.length);x[0]=this.extent,x[1]=this.n,x[2]=this.padding;let S=d;for(let T=0;T<a.length;T++){const L=a[T];x[3+T]=S,x.set(L,S),S+=L.length}return x[3+a.length]=S,x.set(this.keys,S),S+=this.keys.length,x[3+a.length+1]=S,x.set(this.bboxes,S),S+=this.bboxes.length,x.buffer}static serialize(a,d){const m=a.toArrayBuffer();return d&&d.push(m),{buffer:m}}static deserialize(a){return new Du(a.buffer)}}const Ia={};function fn(u,a,d={}){if(Ia[u])throw new Error(`${u} is already registered.`);Object.defineProperty(a,"_classRegistryKey",{value:u,writeable:!1}),Ia[u]={klass:a,omit:d.omit||[],shallow:d.shallow||[]}}fn("Object",Object),fn("TransferableGridIndex",Du),fn("Color",ae),fn("Error",Error),fn("AJAXError",Xe),fn("ResolvedImage",Oe),fn("StylePropertyFunction",Vc),fn("StyleExpression",Bc,{omit:["_evaluator"]}),fn("ZoomDependentExpression",Ff),fn("ZoomConstantExpression",Eu),fn("CompoundExpression",Jn,{omit:["_evaluate"]});for(const u in fl)fl[u]._classRegistryKey||fn(`Expression_${u}`,fl[u]);function Bm(u){return u&&typeof ArrayBuffer<"u"&&(u instanceof ArrayBuffer||u.constructor&&u.constructor.name==="ArrayBuffer")}function Cs(u,a){if(u==null||typeof u=="boolean"||typeof u=="number"||typeof u=="string"||u instanceof Boolean||u instanceof Number||u instanceof String||u instanceof Date||u instanceof RegExp||u instanceof Blob)return u;if(Bm(u)||Q(u))return a&&a.push(u),u;if(ArrayBuffer.isView(u)){const d=u;return a&&a.push(d.buffer),d}if(u instanceof ImageData)return a&&a.push(u.data.buffer),u;if(Array.isArray(u)){const d=[];for(const m of u)d.push(Cs(m,a));return d}if(typeof u=="object"){const d=u.constructor,m=d._classRegistryKey;if(!m)throw new Error("can't serialize object of unregistered class");if(!Ia[m])throw new Error(`${m} is not registered.`);const x=d.serialize?d.serialize(u,a):{};if(d.serialize){if(a&&x===a[a.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(const S in u){if(!u.hasOwnProperty(S)||Ia[m].omit.indexOf(S)>=0)continue;const T=u[S];x[S]=Ia[m].shallow.indexOf(S)>=0?T:Cs(T,a)}u instanceof Error&&(x.message=u.message)}if(x.$name)throw new Error("$name property is reserved for worker serialization logic.");return m!=="Object"&&(x.$name=m),x}throw new Error("can't serialize object of type "+typeof u)}function Za(u){if(u==null||typeof u=="boolean"||typeof u=="number"||typeof u=="string"||u instanceof Boolean||u instanceof Number||u instanceof String||u instanceof Date||u instanceof RegExp||u instanceof Blob||Bm(u)||Q(u)||ArrayBuffer.isView(u)||u instanceof ImageData)return u;if(Array.isArray(u))return u.map(Za);if(typeof u=="object"){const a=u.$name||"Object";if(!Ia[a])throw new Error(`can't deserialize unregistered class ${a}`);const{klass:d}=Ia[a];if(!d)throw new Error(`can't deserialize unregistered class ${a}`);if(d.deserialize)return d.deserialize(u);const m=Object.create(d.prototype);for(const x of Object.keys(u)){if(x==="$name")continue;const S=u[x];m[x]=Ia[a].shallow.indexOf(x)>=0?S:Za(S)}return m}throw new Error("can't deserialize object of type "+typeof u)}class Uf{constructor(){this.first=!0}update(a,d){const m=Math.floor(a);return this.first?(this.first=!1,this.lastIntegerZoom=m,this.lastIntegerZoomTime=0,this.lastZoom=a,this.lastFloorZoom=m,!0):(this.lastFloorZoom>m?(this.lastIntegerZoom=m+1,this.lastIntegerZoomTime=d):this.lastFloorZoom<m&&(this.lastIntegerZoom=m,this.lastIntegerZoomTime=d),a!==this.lastZoom&&(this.lastZoom=a,this.lastFloorZoom=m,!0))}}const Jt={"Latin-1 Supplement":u=>u>=128&&u<=255,Arabic:u=>u>=1536&&u<=1791,"Arabic Supplement":u=>u>=1872&&u<=1919,"Arabic Extended-A":u=>u>=2208&&u<=2303,"Hangul Jamo":u=>u>=4352&&u<=4607,"Unified Canadian Aboriginal Syllabics":u=>u>=5120&&u<=5759,Khmer:u=>u>=6016&&u<=6143,"Unified Canadian Aboriginal Syllabics Extended":u=>u>=6320&&u<=6399,"General Punctuation":u=>u>=8192&&u<=8303,"Letterlike Symbols":u=>u>=8448&&u<=8527,"Number Forms":u=>u>=8528&&u<=8591,"Miscellaneous Technical":u=>u>=8960&&u<=9215,"Control Pictures":u=>u>=9216&&u<=9279,"Optical Character Recognition":u=>u>=9280&&u<=9311,"Enclosed Alphanumerics":u=>u>=9312&&u<=9471,"Geometric Shapes":u=>u>=9632&&u<=9727,"Miscellaneous Symbols":u=>u>=9728&&u<=9983,"Miscellaneous Symbols and Arrows":u=>u>=11008&&u<=11263,"CJK Radicals Supplement":u=>u>=11904&&u<=12031,"Kangxi Radicals":u=>u>=12032&&u<=12255,"Ideographic Description Characters":u=>u>=12272&&u<=12287,"CJK Symbols and Punctuation":u=>u>=12288&&u<=12351,Hiragana:u=>u>=12352&&u<=12447,Katakana:u=>u>=12448&&u<=12543,Bopomofo:u=>u>=12544&&u<=12591,"Hangul Compatibility Jamo":u=>u>=12592&&u<=12687,Kanbun:u=>u>=12688&&u<=12703,"Bopomofo Extended":u=>u>=12704&&u<=12735,"CJK Strokes":u=>u>=12736&&u<=12783,"Katakana Phonetic Extensions":u=>u>=12784&&u<=12799,"Enclosed CJK Letters and Months":u=>u>=12800&&u<=13055,"CJK Compatibility":u=>u>=13056&&u<=13311,"CJK Unified Ideographs Extension A":u=>u>=13312&&u<=19903,"Yijing Hexagram Symbols":u=>u>=19904&&u<=19967,"CJK Unified Ideographs":u=>u>=19968&&u<=40959,"Yi Syllables":u=>u>=40960&&u<=42127,"Yi Radicals":u=>u>=42128&&u<=42191,"Hangul Jamo Extended-A":u=>u>=43360&&u<=43391,"Hangul Syllables":u=>u>=44032&&u<=55215,"Hangul Jamo Extended-B":u=>u>=55216&&u<=55295,"Private Use Area":u=>u>=57344&&u<=63743,"CJK Compatibility Ideographs":u=>u>=63744&&u<=64255,"Arabic Presentation Forms-A":u=>u>=64336&&u<=65023,"Vertical Forms":u=>u>=65040&&u<=65055,"CJK Compatibility Forms":u=>u>=65072&&u<=65103,"Small Form Variants":u=>u>=65104&&u<=65135,"Arabic Presentation Forms-B":u=>u>=65136&&u<=65279,"Halfwidth and Fullwidth Forms":u=>u>=65280&&u<=65519};function Wc(u){for(const a of u)if(Kf(a.charCodeAt(0)))return!0;return!1}function M1(u){for(const a of u)if(!jf(a.charCodeAt(0)))return!1;return!0}function jf(u){return!(Jt.Arabic(u)||Jt["Arabic Supplement"](u)||Jt["Arabic Extended-A"](u)||Jt["Arabic Presentation Forms-A"](u)||Jt["Arabic Presentation Forms-B"](u))}function Kf(u){return!(u!==746&&u!==747&&(u<4352||!(Jt["Bopomofo Extended"](u)||Jt.Bopomofo(u)||Jt["CJK Compatibility Forms"](u)&&!(u>=65097&&u<=65103)||Jt["CJK Compatibility Ideographs"](u)||Jt["CJK Compatibility"](u)||Jt["CJK Radicals Supplement"](u)||Jt["CJK Strokes"](u)||!(!Jt["CJK Symbols and Punctuation"](u)||u>=12296&&u<=12305||u>=12308&&u<=12319||u===12336)||Jt["CJK Unified Ideographs Extension A"](u)||Jt["CJK Unified Ideographs"](u)||Jt["Enclosed CJK Letters and Months"](u)||Jt["Hangul Compatibility Jamo"](u)||Jt["Hangul Jamo Extended-A"](u)||Jt["Hangul Jamo Extended-B"](u)||Jt["Hangul Jamo"](u)||Jt["Hangul Syllables"](u)||Jt.Hiragana(u)||Jt["Ideographic Description Characters"](u)||Jt.Kanbun(u)||Jt["Kangxi Radicals"](u)||Jt["Katakana Phonetic Extensions"](u)||Jt.Katakana(u)&&u!==12540||!(!Jt["Halfwidth and Fullwidth Forms"](u)||u===65288||u===65289||u===65293||u>=65306&&u<=65310||u===65339||u===65341||u===65343||u>=65371&&u<=65503||u===65507||u>=65512&&u<=65519)||!(!Jt["Small Form Variants"](u)||u>=65112&&u<=65118||u>=65123&&u<=65126)||Jt["Unified Canadian Aboriginal Syllabics"](u)||Jt["Unified Canadian Aboriginal Syllabics Extended"](u)||Jt["Vertical Forms"](u)||Jt["Yijing Hexagram Symbols"](u)||Jt["Yi Syllables"](u)||Jt["Yi Radicals"](u))))}function Vm(u){return!(Kf(u)||function(a){return!!(Jt["Latin-1 Supplement"](a)&&(a===167||a===169||a===174||a===177||a===188||a===189||a===190||a===215||a===247)||Jt["General Punctuation"](a)&&(a===8214||a===8224||a===8225||a===8240||a===8241||a===8251||a===8252||a===8258||a===8263||a===8264||a===8265||a===8273)||Jt["Letterlike Symbols"](a)||Jt["Number Forms"](a)||Jt["Miscellaneous Technical"](a)&&(a>=8960&&a<=8967||a>=8972&&a<=8991||a>=8996&&a<=9e3||a===9003||a>=9085&&a<=9114||a>=9150&&a<=9165||a===9167||a>=9169&&a<=9179||a>=9186&&a<=9215)||Jt["Control Pictures"](a)&&a!==9251||Jt["Optical Character Recognition"](a)||Jt["Enclosed Alphanumerics"](a)||Jt["Geometric Shapes"](a)||Jt["Miscellaneous Symbols"](a)&&!(a>=9754&&a<=9759)||Jt["Miscellaneous Symbols and Arrows"](a)&&(a>=11026&&a<=11055||a>=11088&&a<=11097||a>=11192&&a<=11243)||Jt["CJK Symbols and Punctuation"](a)||Jt.Katakana(a)||Jt["Private Use Area"](a)||Jt["CJK Compatibility Forms"](a)||Jt["Small Form Variants"](a)||Jt["Halfwidth and Fullwidth Forms"](a)||a===8734||a===8756||a===8757||a>=9984&&a<=10087||a>=10102&&a<=10131||a===65532||a===65533)}(u))}function Um(u){return u>=1424&&u<=2303||Jt["Arabic Presentation Forms-A"](u)||Jt["Arabic Presentation Forms-B"](u)}function R1(u,a){return!(!a&&Um(u)||u>=2304&&u<=3583||u>=3840&&u<=4255||Jt.Khmer(u))}function jm(u){for(const a of u)if(Um(a.charCodeAt(0)))return!0;return!1}const Hf="deferred",Wf="loading",Gf="loaded";let qf=null,Yi="unavailable",Xa=null;const Km=function(u){u&&typeof u=="string"&&u.indexOf("NetworkError")>-1&&(Yi="error"),qf&&qf(u)};function yl(){Zf.fire(new Wt("pluginStateChange",{pluginStatus:Yi,pluginURL:Xa}))}const Zf=new Qt,Lu=function(){return Yi},Hm=function(){if(Yi!==Hf||!Xa)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Yi=Wf,yl(),Xa&&Ct({url:Xa},u=>{u?Km(u):(Yi=Gf,yl())})},ko={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>Yi===Gf||ko.applyArabicShaping!=null,isLoading:()=>Yi===Wf,setState(u){if(!H())throw new Error("Cannot set the state of the rtl-text-plugin when not in the web-worker context");Yi=u.pluginStatus,Xa=u.pluginURL},isParsed(){if(!H())throw new Error("rtl-text-plugin is only parsed on the worker-threads");return ko.applyArabicShaping!=null&&ko.processBidirectionalText!=null&&ko.processStyledBidirectionalText!=null},getPluginURL(){if(!H())throw new Error("rtl-text-plugin url can only be queried from the worker threads");return Xa}};class Rr{constructor(a,d){this.zoom=a,d?(this.now=d.now,this.fadeDuration=d.fadeDuration,this.zoomHistory=d.zoomHistory,this.transition=d.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Uf,this.transition={})}isSupportedScript(a){return function(d,m){for(const x of d)if(!R1(x.charCodeAt(0),m))return!1;return!0}(a,ko.isLoaded())}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const a=this.zoom,d=a-Math.floor(a),m=this.crossFadingFactor();return a>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:d+(1-d)*m}:{fromScale:.5,toScale:1,t:1-(1-m)*d}}}class zu{constructor(a,d){this.property=a,this.value=d,this.expression=function(m,x){if(wr(m))return new Vc(m,x);if(Cu(m)){const S=Im(m,x);if(S.result==="error")throw new Error(S.value.map(T=>`${T.key}: ${T.message}`).join(", "));return S.value}{let S=m;return x.type==="color"&&typeof m=="string"?S=ae.parse(m):x.type!=="padding"||typeof m!="number"&&!Array.isArray(m)||(S=Ce.parse(m)),{kind:"constant",evaluate:()=>S}}}(d===void 0?a.specification.default:d,a.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(a,d,m){return this.property.possiblyEvaluate(this,a,d,m)}}class Gc{constructor(a){this.property=a,this.value=new zu(a,void 0)}transitioned(a,d){return new Gm(this.property,this.value,d,I({},a.transition,this.transition),a.now)}untransitioned(){return new Gm(this.property,this.value,null,{},0)}}class Wm{constructor(a){this._properties=a,this._values=Object.create(a.defaultTransitionablePropertyValues)}getValue(a){return N(this._values[a].value.value)}setValue(a,d){Object.prototype.hasOwnProperty.call(this._values,a)||(this._values[a]=new Gc(this._values[a].property)),this._values[a].value=new zu(this._values[a].property,d===null?void 0:N(d))}getTransition(a){return N(this._values[a].transition)}setTransition(a,d){Object.prototype.hasOwnProperty.call(this._values,a)||(this._values[a]=new Gc(this._values[a].property)),this._values[a].transition=N(d)||void 0}serialize(){const a={};for(const d of Object.keys(this._values)){const m=this.getValue(d);m!==void 0&&(a[d]=m);const x=this.getTransition(d);x!==void 0&&(a[`${d}-transition`]=x)}return a}transitioned(a,d){const m=new qm(this._properties);for(const x of Object.keys(this._values))m._values[x]=this._values[x].transitioned(a,d._values[x]);return m}untransitioned(){const a=new qm(this._properties);for(const d of Object.keys(this._values))a._values[d]=this._values[d].untransitioned();return a}}class Gm{constructor(a,d,m,x,S){this.property=a,this.value=d,this.begin=S+x.delay||0,this.end=this.begin+x.duration||0,a.specification.transition&&(x.delay||x.duration)&&(this.prior=m)}possiblyEvaluate(a,d,m){const x=a.now||0,S=this.value.possiblyEvaluate(a,d,m),T=this.prior;if(T){if(x>this.end)return this.prior=null,S;if(this.value.isDataDriven())return this.prior=null,S;if(x<this.begin)return T.possiblyEvaluate(a,d,m);{const L=(x-this.begin)/(this.end-this.begin);return this.property.interpolate(T.possiblyEvaluate(a,d,m),S,function(F){if(F<=0)return 0;if(F>=1)return 1;const j=F*F,X=j*F;return 4*(F<.5?X:3*(F-j)+X-.75)}(L))}}return S}}class qm{constructor(a){this._properties=a,this._values=Object.create(a.defaultTransitioningPropertyValues)}possiblyEvaluate(a,d,m){const x=new Fu(this._properties);for(const S of Object.keys(this._values))x._values[S]=this._values[S].possiblyEvaluate(a,d,m);return x}hasTransition(){for(const a of Object.keys(this._values))if(this._values[a].prior)return!0;return!1}}class A1{constructor(a){this._properties=a,this._values=Object.create(a.defaultPropertyValues)}getValue(a){return N(this._values[a].value)}setValue(a,d){this._values[a]=new zu(this._values[a].property,d===null?void 0:N(d))}serialize(){const a={};for(const d of Object.keys(this._values)){const m=this.getValue(d);m!==void 0&&(a[d]=m)}return a}possiblyEvaluate(a,d,m){const x=new Fu(this._properties);for(const S of Object.keys(this._values))x._values[S]=this._values[S].possiblyEvaluate(a,d,m);return x}}class ia{constructor(a,d,m){this.property=a,this.value=d,this.parameters=m}isConstant(){return this.value.kind==="constant"}constantOr(a){return this.value.kind==="constant"?this.value.value:a}evaluate(a,d,m,x){return this.property.evaluate(this.value,this.parameters,a,d,m,x)}}class Fu{constructor(a){this._properties=a,this._values=Object.create(a.defaultPossiblyEvaluatedValues)}get(a){return this._values[a]}}class mn{constructor(a){this.specification=a}possiblyEvaluate(a,d){if(a.isDataDriven())throw new Error("Value should not be data driven");return a.expression.evaluate(d)}interpolate(a,d,m){const x=Ta[this.specification.type];return x?x(a,d,m):a}}class En{constructor(a,d){this.specification=a,this.overrides=d}possiblyEvaluate(a,d,m,x){return new ia(this,a.expression.kind==="constant"||a.expression.kind==="camera"?{kind:"constant",value:a.expression.evaluate(d,null,{},m,x)}:a.expression,d)}interpolate(a,d,m){if(a.value.kind!=="constant"||d.value.kind!=="constant")return a;if(a.value.value===void 0||d.value.value===void 0)return new ia(this,{kind:"constant",value:void 0},a.parameters);const x=Ta[this.specification.type];return x?new ia(this,{kind:"constant",value:x(a.value.value,d.value.value,m)},a.parameters):a}evaluate(a,d,m,x,S,T){return a.kind==="constant"?a.value:a.evaluate(d,m,x,S,T)}}class xl extends En{possiblyEvaluate(a,d,m,x){if(a.value===void 0)return new ia(this,{kind:"constant",value:void 0},d);if(a.expression.kind==="constant"){const S=a.expression.evaluate(d,null,{},m,x),T=a.property.specification.type==="resolvedImage"&&typeof S!="string"?S.name:S,L=this._calculate(T,T,T,d);return new ia(this,{kind:"constant",value:L},d)}if(a.expression.kind==="camera"){const S=this._calculate(a.expression.evaluate({zoom:d.zoom-1}),a.expression.evaluate({zoom:d.zoom}),a.expression.evaluate({zoom:d.zoom+1}),d);return new ia(this,{kind:"constant",value:S},d)}return new ia(this,a.expression,d)}evaluate(a,d,m,x,S,T){if(a.kind==="source"){const L=a.evaluate(d,m,x,S,T);return this._calculate(L,L,L,d)}return a.kind==="composite"?this._calculate(a.evaluate({zoom:Math.floor(d.zoom)-1},m,x),a.evaluate({zoom:Math.floor(d.zoom)},m,x),a.evaluate({zoom:Math.floor(d.zoom)+1},m,x),d):a.value}_calculate(a,d,m,x){return x.zoom>x.zoomHistory.lastIntegerZoom?{from:a,to:d}:{from:m,to:d}}interpolate(a){return a}}class Xf{constructor(a){this.specification=a}possiblyEvaluate(a,d,m,x){if(a.value!==void 0){if(a.expression.kind==="constant"){const S=a.expression.evaluate(d,null,{},m,x);return this._calculate(S,S,S,d)}return this._calculate(a.expression.evaluate(new Rr(Math.floor(d.zoom-1),d)),a.expression.evaluate(new Rr(Math.floor(d.zoom),d)),a.expression.evaluate(new Rr(Math.floor(d.zoom+1),d)),d)}}_calculate(a,d,m,x){return x.zoom>x.zoomHistory.lastIntegerZoom?{from:a,to:d}:{from:m,to:d}}interpolate(a){return a}}class Ya{constructor(a){this.specification=a}possiblyEvaluate(a,d,m,x){return!!a.expression.evaluate(d,null,{},m,x)}interpolate(){return!1}}class Ti{constructor(a){this.properties=a,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const d in a){const m=a[d];m.specification.overridable&&this.overridableProperties.push(d);const x=this.defaultPropertyValues[d]=new zu(m,void 0),S=this.defaultTransitionablePropertyValues[d]=new Gc(m);this.defaultTransitioningPropertyValues[d]=S.untransitioned(),this.defaultPossiblyEvaluatedValues[d]=x.possiblyEvaluate({})}}}fn("DataDrivenProperty",En),fn("DataConstantProperty",mn),fn("CrossFadedDataDrivenProperty",xl),fn("CrossFadedProperty",Xf),fn("ColorRampProperty",Ya);const Qa="-transition";class oa extends Qt{constructor(a,d){if(super(),this.id=a.id,this.type=a.type,this._featureFilter={filter:()=>!0,needGeometry:!1},a.type!=="custom"&&(this.metadata=a.metadata,this.minzoom=a.minzoom,this.maxzoom=a.maxzoom,a.type!=="background"&&(this.source=a.source,this.sourceLayer=a["source-layer"],this.filter=a.filter),d.layout&&(this._unevaluatedLayout=new A1(d.layout)),d.paint)){this._transitionablePaint=new Wm(d.paint);for(const m in a.paint)this.setPaintProperty(m,a.paint[m],{validate:!1});for(const m in a.layout)this.setLayoutProperty(m,a.layout[m],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Fu(d.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(a){return a==="visibility"?this.visibility:this._unevaluatedLayout.getValue(a)}setLayoutProperty(a,d,m={}){d!=null&&this._validate(I1,`layers.${this.id}.layout.${a}`,a,d,m)||(a!=="visibility"?this._unevaluatedLayout.setValue(a,d):this.visibility=d)}getPaintProperty(a){return a.endsWith(Qa)?this._transitionablePaint.getTransition(a.slice(0,-Qa.length)):this._transitionablePaint.getValue(a)}setPaintProperty(a,d,m={}){if(d!=null&&this._validate(P1,`layers.${this.id}.paint.${a}`,a,d,m))return!1;if(a.endsWith(Qa))return this._transitionablePaint.setTransition(a.slice(0,-Qa.length),d||void 0),!1;{const x=this._transitionablePaint._values[a],S=x.property.specification["property-type"]==="cross-faded-data-driven",T=x.value.isDataDriven(),L=x.value;this._transitionablePaint.setValue(a,d),this._handleSpecialPaintPropertyUpdate(a);const F=this._transitionablePaint._values[a].value;return F.isDataDriven()||T||S||this._handleOverridablePaintPropertyUpdate(a,L,F)}}_handleSpecialPaintPropertyUpdate(a){}_handleOverridablePaintPropertyUpdate(a,d,m){return!1}isHidden(a){return!!(this.minzoom&&a<this.minzoom)||!!(this.maxzoom&&a>=this.maxzoom)||this.visibility==="none"}updateTransitions(a){this._transitioningPaint=this._transitionablePaint.transitioned(a,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(a,d){a.getCrossfadeParameters&&(this._crossfadeParameters=a.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(a,void 0,d)),this.paint=this._transitioningPaint.possiblyEvaluate(a,void 0,d)}serialize(){const a={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(a.layout=a.layout||{},a.layout.visibility=this.visibility),R(a,(d,m)=>!(d===void 0||m==="layout"&&!Object.keys(d).length||m==="paint"&&!Object.keys(d).length))}_validate(a,d,m,x,S={}){return(!S||S.validate!==!1)&&Hc(this,a.call(Nu,{key:d,layerType:this.type,objectKey:m,value:x,styleSpec:Fe,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const a in this.paint._values){const d=this.paint.get(a);if(d instanceof ia&&Er(d.property.specification)&&(d.value.kind==="source"||d.value.kind==="composite")&&d.value.isStateDependent)return!0}return!1}}const Zm={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Ja{constructor(a,d){this._structArray=a,this._pos1=d*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Gr{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(a,d){return a._trim(),d&&(a.isTransferred=!0,d.push(a.arrayBuffer)),{length:a.length,arrayBuffer:a.arrayBuffer}}static deserialize(a){const d=Object.create(this.prototype);return d.arrayBuffer=a.arrayBuffer,d.length=a.length,d.capacity=a.arrayBuffer.byteLength/d.bytesPerElement,d._refreshViews(),d}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(a){this.reserve(a),this.length=a}reserve(a){if(a>this.capacity){this.capacity=Math.max(a,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const d=this.uint8;this._refreshViews(),d&&this.uint8.set(d)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function ni(u,a=1){let d=0,m=0;return{members:u.map(x=>{const S=Zm[x.type].BYTES_PER_ELEMENT,T=d=Yf(d,Math.max(a,S)),L=x.components||1;return m=Math.max(m,S),d+=S*L,{name:x.name,type:x.type,components:L,offset:T}}),size:Yf(d,Math.max(m,a)),alignment:a}}function Yf(u,a){return Math.ceil(u/a)*a}class Ss extends Gr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(a,d){const m=this.length;return this.resize(m+1),this.emplace(m,a,d)}emplace(a,d,m){const x=2*a;return this.int16[x+0]=d,this.int16[x+1]=m,a}}Ss.prototype.bytesPerElement=4,fn("StructArrayLayout2i4",Ss);class y extends Gr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(a,d,m,x){const S=this.length;return this.resize(S+1),this.emplace(S,a,d,m,x)}emplace(a,d,m,x,S){const T=4*a;return this.int16[T+0]=d,this.int16[T+1]=m,this.int16[T+2]=x,this.int16[T+3]=S,a}}y.prototype.bytesPerElement=8,fn("StructArrayLayout4i8",y);class s extends Gr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(a,d,m,x,S,T){const L=this.length;return this.resize(L+1),this.emplace(L,a,d,m,x,S,T)}emplace(a,d,m,x,S,T,L){const F=6*a;return this.int16[F+0]=d,this.int16[F+1]=m,this.int16[F+2]=x,this.int16[F+3]=S,this.int16[F+4]=T,this.int16[F+5]=L,a}}s.prototype.bytesPerElement=12,fn("StructArrayLayout2i4i12",s);class f extends Gr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(a,d,m,x,S,T){const L=this.length;return this.resize(L+1),this.emplace(L,a,d,m,x,S,T)}emplace(a,d,m,x,S,T,L){const F=4*a,j=8*a;return this.int16[F+0]=d,this.int16[F+1]=m,this.uint8[j+4]=x,this.uint8[j+5]=S,this.uint8[j+6]=T,this.uint8[j+7]=L,a}}f.prototype.bytesPerElement=8,fn("StructArrayLayout2i4ub8",f);class v extends Gr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(a,d){const m=this.length;return this.resize(m+1),this.emplace(m,a,d)}emplace(a,d,m){const x=2*a;return this.float32[x+0]=d,this.float32[x+1]=m,a}}v.prototype.bytesPerElement=8,fn("StructArrayLayout2f8",v);class _ extends Gr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(a,d,m,x,S,T,L,F,j,X){const ne=this.length;return this.resize(ne+1),this.emplace(ne,a,d,m,x,S,T,L,F,j,X)}emplace(a,d,m,x,S,T,L,F,j,X,ne){const ue=10*a;return this.uint16[ue+0]=d,this.uint16[ue+1]=m,this.uint16[ue+2]=x,this.uint16[ue+3]=S,this.uint16[ue+4]=T,this.uint16[ue+5]=L,this.uint16[ue+6]=F,this.uint16[ue+7]=j,this.uint16[ue+8]=X,this.uint16[ue+9]=ne,a}}_.prototype.bytesPerElement=20,fn("StructArrayLayout10ui20",_);class k extends Gr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(a,d,m,x,S,T,L,F,j,X,ne,ue){const he=this.length;return this.resize(he+1),this.emplace(he,a,d,m,x,S,T,L,F,j,X,ne,ue)}emplace(a,d,m,x,S,T,L,F,j,X,ne,ue,he){const pe=12*a;return this.int16[pe+0]=d,this.int16[pe+1]=m,this.int16[pe+2]=x,this.int16[pe+3]=S,this.uint16[pe+4]=T,this.uint16[pe+5]=L,this.uint16[pe+6]=F,this.uint16[pe+7]=j,this.int16[pe+8]=X,this.int16[pe+9]=ne,this.int16[pe+10]=ue,this.int16[pe+11]=he,a}}k.prototype.bytesPerElement=24,fn("StructArrayLayout4i4ui4i24",k);class D extends Gr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(a,d,m){const x=this.length;return this.resize(x+1),this.emplace(x,a,d,m)}emplace(a,d,m,x){const S=3*a;return this.float32[S+0]=d,this.float32[S+1]=m,this.float32[S+2]=x,a}}D.prototype.bytesPerElement=12,fn("StructArrayLayout3f12",D);class $ extends Gr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(a){const d=this.length;return this.resize(d+1),this.emplace(d,a)}emplace(a,d){return this.uint32[1*a+0]=d,a}}$.prototype.bytesPerElement=4,fn("StructArrayLayout1ul4",$);class V extends Gr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(a,d,m,x,S,T,L,F,j){const X=this.length;return this.resize(X+1),this.emplace(X,a,d,m,x,S,T,L,F,j)}emplace(a,d,m,x,S,T,L,F,j,X){const ne=10*a,ue=5*a;return this.int16[ne+0]=d,this.int16[ne+1]=m,this.int16[ne+2]=x,this.int16[ne+3]=S,this.int16[ne+4]=T,this.int16[ne+5]=L,this.uint32[ue+3]=F,this.uint16[ne+8]=j,this.uint16[ne+9]=X,a}}V.prototype.bytesPerElement=20,fn("StructArrayLayout6i1ul2ui20",V);class W extends Gr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(a,d,m,x,S,T){const L=this.length;return this.resize(L+1),this.emplace(L,a,d,m,x,S,T)}emplace(a,d,m,x,S,T,L){const F=6*a;return this.int16[F+0]=d,this.int16[F+1]=m,this.int16[F+2]=x,this.int16[F+3]=S,this.int16[F+4]=T,this.int16[F+5]=L,a}}W.prototype.bytesPerElement=12,fn("StructArrayLayout2i2i2i12",W);class ee extends Gr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(a,d,m,x,S){const T=this.length;return this.resize(T+1),this.emplace(T,a,d,m,x,S)}emplace(a,d,m,x,S,T){const L=4*a,F=8*a;return this.float32[L+0]=d,this.float32[L+1]=m,this.float32[L+2]=x,this.int16[F+6]=S,this.int16[F+7]=T,a}}ee.prototype.bytesPerElement=16,fn("StructArrayLayout2f1f2i16",ee);class ie extends Gr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(a,d,m,x){const S=this.length;return this.resize(S+1),this.emplace(S,a,d,m,x)}emplace(a,d,m,x,S){const T=12*a,L=3*a;return this.uint8[T+0]=d,this.uint8[T+1]=m,this.float32[L+1]=x,this.float32[L+2]=S,a}}ie.prototype.bytesPerElement=12,fn("StructArrayLayout2ub2f12",ie);class fe extends Gr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(a,d,m){const x=this.length;return this.resize(x+1),this.emplace(x,a,d,m)}emplace(a,d,m,x){const S=3*a;return this.uint16[S+0]=d,this.uint16[S+1]=m,this.uint16[S+2]=x,a}}fe.prototype.bytesPerElement=6,fn("StructArrayLayout3ui6",fe);class Se extends Gr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(a,d,m,x,S,T,L,F,j,X,ne,ue,he,pe,Ae,Ie,Ze){const st=this.length;return this.resize(st+1),this.emplace(st,a,d,m,x,S,T,L,F,j,X,ne,ue,he,pe,Ae,Ie,Ze)}emplace(a,d,m,x,S,T,L,F,j,X,ne,ue,he,pe,Ae,Ie,Ze,st){const Ke=24*a,rt=12*a,kt=48*a;return this.int16[Ke+0]=d,this.int16[Ke+1]=m,this.uint16[Ke+2]=x,this.uint16[Ke+3]=S,this.uint32[rt+2]=T,this.uint32[rt+3]=L,this.uint32[rt+4]=F,this.uint16[Ke+10]=j,this.uint16[Ke+11]=X,this.uint16[Ke+12]=ne,this.float32[rt+7]=ue,this.float32[rt+8]=he,this.uint8[kt+36]=pe,this.uint8[kt+37]=Ae,this.uint8[kt+38]=Ie,this.uint32[rt+10]=Ze,this.int16[Ke+22]=st,a}}Se.prototype.bytesPerElement=48,fn("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Se);class _e extends Gr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(a,d,m,x,S,T,L,F,j,X,ne,ue,he,pe,Ae,Ie,Ze,st,Ke,rt,kt,St,un,pn,en,Zt,Ht,tn){const Yt=this.length;return this.resize(Yt+1),this.emplace(Yt,a,d,m,x,S,T,L,F,j,X,ne,ue,he,pe,Ae,Ie,Ze,st,Ke,rt,kt,St,un,pn,en,Zt,Ht,tn)}emplace(a,d,m,x,S,T,L,F,j,X,ne,ue,he,pe,Ae,Ie,Ze,st,Ke,rt,kt,St,un,pn,en,Zt,Ht,tn,Yt){const Ft=34*a,wn=17*a;return this.int16[Ft+0]=d,this.int16[Ft+1]=m,this.int16[Ft+2]=x,this.int16[Ft+3]=S,this.int16[Ft+4]=T,this.int16[Ft+5]=L,this.int16[Ft+6]=F,this.int16[Ft+7]=j,this.uint16[Ft+8]=X,this.uint16[Ft+9]=ne,this.uint16[Ft+10]=ue,this.uint16[Ft+11]=he,this.uint16[Ft+12]=pe,this.uint16[Ft+13]=Ae,this.uint16[Ft+14]=Ie,this.uint16[Ft+15]=Ze,this.uint16[Ft+16]=st,this.uint16[Ft+17]=Ke,this.uint16[Ft+18]=rt,this.uint16[Ft+19]=kt,this.uint16[Ft+20]=St,this.uint16[Ft+21]=un,this.uint16[Ft+22]=pn,this.uint32[wn+12]=en,this.float32[wn+13]=Zt,this.float32[wn+14]=Ht,this.float32[wn+15]=tn,this.float32[wn+16]=Yt,a}}_e.prototype.bytesPerElement=68,fn("StructArrayLayout8i15ui1ul4f68",_e);class we extends Gr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(a){const d=this.length;return this.resize(d+1),this.emplace(d,a)}emplace(a,d){return this.float32[1*a+0]=d,a}}we.prototype.bytesPerElement=4,fn("StructArrayLayout1f4",we);class $e extends Gr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(a,d,m){const x=this.length;return this.resize(x+1),this.emplace(x,a,d,m)}emplace(a,d,m,x){const S=3*a;return this.int16[S+0]=d,this.int16[S+1]=m,this.int16[S+2]=x,a}}$e.prototype.bytesPerElement=6,fn("StructArrayLayout3i6",$e);class je extends Gr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(a,d,m){const x=this.length;return this.resize(x+1),this.emplace(x,a,d,m)}emplace(a,d,m,x){const S=4*a;return this.uint32[2*a+0]=d,this.uint16[S+2]=m,this.uint16[S+3]=x,a}}je.prototype.bytesPerElement=8,fn("StructArrayLayout1ul2ui8",je);class et extends Gr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(a,d){const m=this.length;return this.resize(m+1),this.emplace(m,a,d)}emplace(a,d,m){const x=2*a;return this.uint16[x+0]=d,this.uint16[x+1]=m,a}}et.prototype.bytesPerElement=4,fn("StructArrayLayout2ui4",et);class Pe extends Gr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(a){const d=this.length;return this.resize(d+1),this.emplace(d,a)}emplace(a,d){return this.uint16[1*a+0]=d,a}}Pe.prototype.bytesPerElement=2,fn("StructArrayLayout1ui2",Pe);class at extends Gr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(a,d,m,x){const S=this.length;return this.resize(S+1),this.emplace(S,a,d,m,x)}emplace(a,d,m,x,S){const T=4*a;return this.float32[T+0]=d,this.float32[T+1]=m,this.float32[T+2]=x,this.float32[T+3]=S,a}}at.prototype.bytesPerElement=16,fn("StructArrayLayout4f16",at);class nt extends Ja{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new re(this.anchorPointX,this.anchorPointY)}}nt.prototype.size=20;class gt extends V{get(a){return new nt(this,a)}}fn("CollisionBoxArray",gt);class yt extends Ja{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(a){this._structArray.uint8[this._pos1+37]=a}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(a){this._structArray.uint8[this._pos1+38]=a}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(a){this._structArray.uint32[this._pos4+10]=a}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}yt.prototype.size=48;class Dt extends Se{get(a){return new yt(this,a)}}fn("PlacedSymbolArray",Dt);class vt extends Ja{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(a){this._structArray.uint32[this._pos4+12]=a}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get textOffset0(){return this._structArray.float32[this._pos4+14]}get textOffset1(){return this._structArray.float32[this._pos4+15]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+16]}}vt.prototype.size=68;class rn extends _e{get(a){return new vt(this,a)}}fn("SymbolInstanceArray",rn);class qt extends we{getoffsetX(a){return this.float32[1*a+0]}}fn("GlyphOffsetArray",qt);class ln extends $e{getx(a){return this.int16[3*a+0]}gety(a){return this.int16[3*a+1]}gettileUnitDistanceFromAnchor(a){return this.int16[3*a+2]}}fn("SymbolLineVertexArray",ln);class Dn extends Ja{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}Dn.prototype.size=8;class Vn extends je{get(a){return new Dn(this,a)}}fn("FeatureIndexArray",Vn);class bn extends Ss{}class cr extends Ss{}class dr extends Ss{}class Qn extends s{}class er extends f{}class pr extends v{}class vi extends _{}class aa extends k{}class Fo extends D{}class sa extends ${}class es extends W{}class To extends ie{}class Qi extends fe{}class Ma extends et{}const qc=ni([{name:"a_pos",components:2,type:"Int16"}],4),{members:ci}=qc;class Hn{constructor(a=[]){this.segments=a}prepareSegment(a,d,m,x){let S=this.segments[this.segments.length-1];return a>Hn.MAX_VERTEX_ARRAY_LENGTH&&B(`Max vertices per segment is ${Hn.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${a}`),(!S||S.vertexLength+a>Hn.MAX_VERTEX_ARRAY_LENGTH||S.sortKey!==x)&&(S={vertexOffset:d.length,primitiveOffset:m.length,vertexLength:0,primitiveLength:0},x!==void 0&&(S.sortKey=x),this.segments.push(S)),S}get(){return this.segments}destroy(){for(const a of this.segments)for(const d in a.vaos)a.vaos[d].destroy()}static simpleSegment(a,d,m,x){return new Hn([{vertexOffset:a,primitiveOffset:d,vertexLength:m,primitiveLength:x,vaos:{},sortKey:0}])}}function ur(u,a){return 256*(u=w(Math.floor(u),0,255))+w(Math.floor(a),0,255)}Hn.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,fn("SegmentVector",Hn);const gi=ni([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var yi={exports:{}},Ar={exports:{}};Ar.exports=function(u,a){var d,m,x,S,T,L,F,j;for(m=u.length-(d=3&u.length),x=a,T=3432918353,L=461845907,j=0;j<m;)F=255&u.charCodeAt(j)|(255&u.charCodeAt(++j))<<8|(255&u.charCodeAt(++j))<<16|(255&u.charCodeAt(++j))<<24,++j,x=27492+(65535&(S=5*(65535&(x=(x^=F=(65535&(F=(F=(65535&F)*T+(((F>>>16)*T&65535)<<16)&4294967295)<<15|F>>>17))*L+(((F>>>16)*L&65535)<<16)&4294967295)<<13|x>>>19))+((5*(x>>>16)&65535)<<16)&4294967295))+((58964+(S>>>16)&65535)<<16);switch(F=0,d){case 3:F^=(255&u.charCodeAt(j+2))<<16;case 2:F^=(255&u.charCodeAt(j+1))<<8;case 1:x^=F=(65535&(F=(F=(65535&(F^=255&u.charCodeAt(j)))*T+(((F>>>16)*T&65535)<<16)&4294967295)<<15|F>>>17))*L+(((F>>>16)*L&65535)<<16)&4294967295}return x^=u.length,x=2246822507*(65535&(x^=x>>>16))+((2246822507*(x>>>16)&65535)<<16)&4294967295,x=3266489909*(65535&(x^=x>>>13))+((3266489909*(x>>>16)&65535)<<16)&4294967295,(x^=x>>>16)>>>0};var Po={exports:{}};Po.exports=function(u,a){for(var d,m=u.length,x=a^m,S=0;m>=4;)d=1540483477*(65535&(d=255&u.charCodeAt(S)|(255&u.charCodeAt(++S))<<8|(255&u.charCodeAt(++S))<<16|(255&u.charCodeAt(++S))<<24))+((1540483477*(d>>>16)&65535)<<16),x=1540483477*(65535&x)+((1540483477*(x>>>16)&65535)<<16)^(d=1540483477*(65535&(d^=d>>>24))+((1540483477*(d>>>16)&65535)<<16)),m-=4,++S;switch(m){case 3:x^=(255&u.charCodeAt(S+2))<<16;case 2:x^=(255&u.charCodeAt(S+1))<<8;case 1:x=1540483477*(65535&(x^=255&u.charCodeAt(S)))+((1540483477*(x>>>16)&65535)<<16)}return x=1540483477*(65535&(x^=x>>>13))+((1540483477*(x>>>16)&65535)<<16),(x^=x>>>15)>>>0};var Es=Ar.exports,Qf=Po.exports;yi.exports=Es,yi.exports.murmur3=Es,yi.exports.murmur2=Qf;class _l{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(a,d,m,x){this.ids.push(Xm(a)),this.positions.push(d,m,x)}getPositions(a){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const d=Xm(a);let m=0,x=this.ids.length-1;for(;m<x;){const T=m+x>>1;this.ids[T]>=d?x=T:m=T+1}const S=[];for(;this.ids[m]===d;)S.push({index:this.positions[3*m],start:this.positions[3*m+1],end:this.positions[3*m+2]}),m++;return S}static serialize(a,d){const m=new Float64Array(a.ids),x=new Uint32Array(a.positions);return Jf(m,x,0,m.length-1),d&&d.push(m.buffer,x.buffer),{ids:m,positions:x}}static deserialize(a){const d=new _l;return d.ids=a.ids,d.positions=a.positions,d.indexed=!0,d}}function Xm(u){const a=+u;return!isNaN(a)&&a<=Number.MAX_SAFE_INTEGER?a:yi.exports(String(u))}function Jf(u,a,d,m){for(;d<m;){const x=u[d+m>>1];let S=d-1,T=m+1;for(;;){do S++;while(u[S]<x);do T--;while(u[T]>x);if(S>=T)break;ts(u,S,T),ts(a,3*S,3*T),ts(a,3*S+1,3*T+1),ts(a,3*S+2,3*T+2)}T-d<m-T?(Jf(u,a,d,T),d=T+1):(Jf(u,a,T+1,m),m=T)}}function ts(u,a,d){const m=u[a];u[a]=u[d],u[d]=m}fn("FeaturePositionMap",_l);class ks{constructor(a,d){this.gl=a.gl,this.location=d}}class Ts extends ks{constructor(a,d){super(a,d),this.current=0}set(a){this.current!==a&&(this.current=a,this.gl.uniform1f(this.location,a))}}class Zc extends ks{constructor(a,d){super(a,d),this.current=[0,0,0,0]}set(a){a[0]===this.current[0]&&a[1]===this.current[1]&&a[2]===this.current[2]&&a[3]===this.current[3]||(this.current=a,this.gl.uniform4f(this.location,a[0],a[1],a[2],a[3]))}}class m3 extends ks{constructor(a,d){super(a,d),this.current=ae.transparent}set(a){a.r===this.current.r&&a.g===this.current.g&&a.b===this.current.b&&a.a===this.current.a||(this.current=a,this.gl.uniform4f(this.location,a.r,a.g,a.b,a.a))}}const T9=new Float32Array(16);function O1(u){return[ur(255*u.r,255*u.g),ur(255*u.b,255*u.a)]}class eh{constructor(a,d,m){this.value=a,this.uniformNames=d.map(x=>`u_${x}`),this.type=m}setUniform(a,d,m){a.set(m.constantOr(this.value))}getBinding(a,d,m){return this.type==="color"?new m3(a,d):new Ts(a,d)}}class Xc{constructor(a,d){this.uniformNames=d.map(m=>`u_${m}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(a,d){this.pixelRatioFrom=d.pixelRatio,this.pixelRatioTo=a.pixelRatio,this.patternFrom=d.tlbr,this.patternTo=a.tlbr}setUniform(a,d,m,x){const S=x==="u_pattern_to"?this.patternTo:x==="u_pattern_from"?this.patternFrom:x==="u_pixel_ratio_to"?this.pixelRatioTo:x==="u_pixel_ratio_from"?this.pixelRatioFrom:null;S&&a.set(S)}getBinding(a,d,m){return m.substr(0,9)==="u_pattern"?new Zc(a,d):new Ts(a,d)}}class Ps{constructor(a,d,m,x){this.expression=a,this.type=m,this.maxValue=0,this.paintVertexAttributes=d.map(S=>({name:`a_${S}`,type:"Float32",components:m==="color"?2:1,offset:0})),this.paintVertexArray=new x}populatePaintArray(a,d,m,x,S){const T=this.paintVertexArray.length,L=this.expression.evaluate(new Rr(0),d,{},x,[],S);this.paintVertexArray.resize(a),this._setPaintValue(T,a,L)}updatePaintArray(a,d,m,x){const S=this.expression.evaluate({zoom:0},m,x);this._setPaintValue(a,d,S)}_setPaintValue(a,d,m){if(this.type==="color"){const x=O1(m);for(let S=a;S<d;S++)this.paintVertexArray.emplace(S,x[0],x[1])}else{for(let x=a;x<d;x++)this.paintVertexArray.emplace(x,m);this.maxValue=Math.max(this.maxValue,Math.abs(m))}}upload(a){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=a.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class Ra{constructor(a,d,m,x,S,T){this.expression=a,this.uniformNames=d.map(L=>`u_${L}_t`),this.type=m,this.useIntegerZoom=x,this.zoom=S,this.maxValue=0,this.paintVertexAttributes=d.map(L=>({name:`a_${L}`,type:"Float32",components:m==="color"?4:2,offset:0})),this.paintVertexArray=new T}populatePaintArray(a,d,m,x,S){const T=this.expression.evaluate(new Rr(this.zoom),d,{},x,[],S),L=this.expression.evaluate(new Rr(this.zoom+1),d,{},x,[],S),F=this.paintVertexArray.length;this.paintVertexArray.resize(a),this._setPaintValue(F,a,T,L)}updatePaintArray(a,d,m,x){const S=this.expression.evaluate({zoom:this.zoom},m,x),T=this.expression.evaluate({zoom:this.zoom+1},m,x);this._setPaintValue(a,d,S,T)}_setPaintValue(a,d,m,x){if(this.type==="color"){const S=O1(m),T=O1(x);for(let L=a;L<d;L++)this.paintVertexArray.emplace(L,S[0],S[1],T[0],T[1])}else{for(let S=a;S<d;S++)this.paintVertexArray.emplace(S,m,x);this.maxValue=Math.max(this.maxValue,Math.abs(m),Math.abs(x))}}upload(a){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=a.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(a,d){const m=this.useIntegerZoom?Math.floor(d.zoom):d.zoom,x=w(this.expression.interpolationFactor(m,this.zoom,this.zoom+1),0,1);a.set(x)}getBinding(a,d,m){return new Ts(a,d)}}class bl{constructor(a,d,m,x,S,T){this.expression=a,this.type=d,this.useIntegerZoom=m,this.zoom=x,this.layerId=T,this.zoomInPaintVertexArray=new S,this.zoomOutPaintVertexArray=new S}populatePaintArray(a,d,m){const x=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(a),this.zoomOutPaintVertexArray.resize(a),this._setPaintValues(x,a,d.patterns&&d.patterns[this.layerId],m)}updatePaintArray(a,d,m,x,S){this._setPaintValues(a,d,m.patterns&&m.patterns[this.layerId],S)}_setPaintValues(a,d,m,x){if(!x||!m)return;const{min:S,mid:T,max:L}=m,F=x[S],j=x[T],X=x[L];if(F&&j&&X)for(let ne=a;ne<d;ne++)this.zoomInPaintVertexArray.emplace(ne,j.tl[0],j.tl[1],j.br[0],j.br[1],F.tl[0],F.tl[1],F.br[0],F.br[1],j.pixelRatio,F.pixelRatio),this.zoomOutPaintVertexArray.emplace(ne,j.tl[0],j.tl[1],j.br[0],j.br[1],X.tl[0],X.tl[1],X.br[0],X.br[1],j.pixelRatio,X.pixelRatio)}upload(a){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=a.createVertexBuffer(this.zoomInPaintVertexArray,gi.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=a.createVertexBuffer(this.zoomOutPaintVertexArray,gi.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class v3{constructor(a,d,m){this.binders={},this._buffers=[];const x=[];for(const S in a.paint._values){if(!m(S))continue;const T=a.paint.get(S);if(!(T instanceof ia&&Er(T.property.specification)))continue;const L=P9(S,a.type),F=T.value,j=T.property.specification.type,X=T.property.useIntegerZoom,ne=T.property.specification["property-type"],ue=ne==="cross-faded"||ne==="cross-faded-data-driven";if(F.kind==="constant")this.binders[S]=ue?new Xc(F.value,L):new eh(F.value,L,j),x.push(`/u_${S}`);else if(F.kind==="source"||ue){const he=g3(S,j,"source");this.binders[S]=ue?new bl(F,j,X,d,he,a.id):new Ps(F,L,j,he),x.push(`/a_${S}`)}else{const he=g3(S,j,"composite");this.binders[S]=new Ra(F,L,j,X,d,he),x.push(`/z_${S}`)}}this.cacheKey=x.sort().join("")}getMaxValue(a){const d=this.binders[a];return d instanceof Ps||d instanceof Ra?d.maxValue:0}populatePaintArrays(a,d,m,x,S){for(const T in this.binders){const L=this.binders[T];(L instanceof Ps||L instanceof Ra||L instanceof bl)&&L.populatePaintArray(a,d,m,x,S)}}setConstantPatternPositions(a,d){for(const m in this.binders){const x=this.binders[m];x instanceof Xc&&x.setConstantPatternPositions(a,d)}}updatePaintArrays(a,d,m,x,S){let T=!1;for(const L in a){const F=d.getPositions(L);for(const j of F){const X=m.feature(j.index);for(const ne in this.binders){const ue=this.binders[ne];if((ue instanceof Ps||ue instanceof Ra||ue instanceof bl)&&ue.expression.isStateDependent===!0){const he=x.paint.get(ne);ue.expression=he.value,ue.updatePaintArray(j.start,j.end,X,a[L],S),T=!0}}}}return T}defines(){const a=[];for(const d in this.binders){const m=this.binders[d];(m instanceof eh||m instanceof Xc)&&a.push(...m.uniformNames.map(x=>`#define HAS_UNIFORM_${x}`))}return a}getBinderAttributes(){const a=[];for(const d in this.binders){const m=this.binders[d];if(m instanceof Ps||m instanceof Ra)for(let x=0;x<m.paintVertexAttributes.length;x++)a.push(m.paintVertexAttributes[x].name);else if(m instanceof bl)for(let x=0;x<gi.members.length;x++)a.push(gi.members[x].name)}return a}getBinderUniforms(){const a=[];for(const d in this.binders){const m=this.binders[d];if(m instanceof eh||m instanceof Xc||m instanceof Ra)for(const x of m.uniformNames)a.push(x)}return a}getPaintVertexBuffers(){return this._buffers}getUniforms(a,d){const m=[];for(const x in this.binders){const S=this.binders[x];if(S instanceof eh||S instanceof Xc||S instanceof Ra){for(const T of S.uniformNames)if(d[T]){const L=S.getBinding(a,d[T],T);m.push({name:T,property:x,binding:L})}}}return m}setUniforms(a,d,m,x){for(const{name:S,property:T,binding:L}of d)this.binders[T].setUniform(L,x,m.get(T),S)}updatePaintBuffers(a){this._buffers=[];for(const d in this.binders){const m=this.binders[d];if(a&&m instanceof bl){const x=a.fromScale===2?m.zoomInPaintVertexBuffer:m.zoomOutPaintVertexBuffer;x&&this._buffers.push(x)}else(m instanceof Ps||m instanceof Ra)&&m.paintVertexBuffer&&this._buffers.push(m.paintVertexBuffer)}}upload(a){for(const d in this.binders){const m=this.binders[d];(m instanceof Ps||m instanceof Ra||m instanceof bl)&&m.upload(a)}this.updatePaintBuffers()}destroy(){for(const a in this.binders){const d=this.binders[a];(d instanceof Ps||d instanceof Ra||d instanceof bl)&&d.destroy()}}}class $u{constructor(a,d,m=()=>!0){this.programConfigurations={};for(const x of a)this.programConfigurations[x.id]=new v3(x,d,m);this.needsUpload=!1,this._featureMap=new _l,this._bufferOffset=0}populatePaintArrays(a,d,m,x,S,T){for(const L in this.programConfigurations)this.programConfigurations[L].populatePaintArrays(a,d,x,S,T);d.id!==void 0&&this._featureMap.add(d.id,m,this._bufferOffset,a),this._bufferOffset=a,this.needsUpload=!0}updatePaintArrays(a,d,m,x){for(const S of m)this.needsUpload=this.programConfigurations[S.id].updatePaintArrays(a,this._featureMap,d,S,x)||this.needsUpload}get(a){return this.programConfigurations[a]}upload(a){if(this.needsUpload){for(const d in this.programConfigurations)this.programConfigurations[d].upload(a);this.needsUpload=!1}}destroy(){for(const a in this.programConfigurations)this.programConfigurations[a].destroy()}}function P9(u,a){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[u]||[u.replace(`${a}-`,"").replace(/-/g,"_")]}function g3(u,a,d){const m={color:{source:v,composite:at},number:{source:we,composite:v}},x=function(S){return{"line-pattern":{source:vi,composite:vi},"fill-pattern":{source:vi,composite:vi},"fill-extrusion-pattern":{source:vi,composite:vi}}[S]}(u);return x&&x[d]||m[a][d]}fn("ConstantBinder",eh),fn("CrossFadedConstantBinder",Xc),fn("SourceExpressionBinder",Ps),fn("CrossFadedCompositeBinder",bl),fn("CompositeExpressionBinder",Ra),fn("ProgramConfiguration",v3,{omit:["_buffers"]}),fn("ProgramConfigurationSet",$u);var di=8192;const N1=Math.pow(2,14)-1,y3=-N1-1;function Bu(u){const a=di/u.extent,d=u.loadGeometry();for(let m=0;m<d.length;m++){const x=d[m];for(let S=0;S<x.length;S++){const T=x[S],L=Math.round(T.x*a),F=Math.round(T.y*a);T.x=w(L,y3,N1),T.y=w(F,y3,N1),(L<T.x||L>T.x+1||F<T.y||F>T.y+1)&&B("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return d}function Vu(u,a){return{type:u.type,id:u.id,properties:u.properties,geometry:a?Bu(u):[]}}function Ym(u,a,d,m,x){u.emplaceBack(2*a+(m+1)/2,2*d+(x+1)/2)}class D1{constructor(a){this.zoom=a.zoom,this.overscaling=a.overscaling,this.layers=a.layers,this.layerIds=this.layers.map(d=>d.id),this.index=a.index,this.hasPattern=!1,this.layoutVertexArray=new cr,this.indexArray=new Qi,this.segments=new Hn,this.programConfigurations=new $u(a.layers,a.zoom),this.stateDependentLayerIds=this.layers.filter(d=>d.isStateDependent()).map(d=>d.id)}populate(a,d,m){const x=this.layers[0],S=[];let T=null,L=!1;x.type==="circle"&&(T=x.layout.get("circle-sort-key"),L=!T.isConstant());for(const{feature:F,id:j,index:X,sourceLayerIndex:ne}of a){const ue=this.layers[0]._featureFilter.needGeometry,he=Vu(F,ue);if(!this.layers[0]._featureFilter.filter(new Rr(this.zoom),he,m))continue;const pe=L?T.evaluate(he,{},m):void 0,Ae={id:j,properties:F.properties,type:F.type,sourceLayerIndex:ne,index:X,geometry:ue?he.geometry:Bu(F),patterns:{},sortKey:pe};S.push(Ae)}L&&S.sort((F,j)=>F.sortKey-j.sortKey);for(const F of S){const{geometry:j,index:X,sourceLayerIndex:ne}=F,ue=a[X].feature;this.addFeature(F,j,X,m),d.featureIndex.insert(ue,j,X,ne,this.index)}}update(a,d,m){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(a,d,this.stateDependentLayers,m)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(a){this.uploaded||(this.layoutVertexBuffer=a.createVertexBuffer(this.layoutVertexArray,ci),this.indexBuffer=a.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(a),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(a,d,m,x){for(const S of d)for(const T of S){const L=T.x,F=T.y;if(L<0||L>=di||F<0||F>=di)continue;const j=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,a.sortKey),X=j.vertexLength;Ym(this.layoutVertexArray,L,F,-1,-1),Ym(this.layoutVertexArray,L,F,1,-1),Ym(this.layoutVertexArray,L,F,1,1),Ym(this.layoutVertexArray,L,F,-1,1),this.indexArray.emplaceBack(X,X+1,X+2),this.indexArray.emplaceBack(X,X+3,X+2),j.vertexLength+=4,j.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,a,m,{},x)}}function x3(u,a){for(let d=0;d<u.length;d++)if(Yc(a,u[d]))return!0;for(let d=0;d<a.length;d++)if(Yc(u,a[d]))return!0;return!!L1(u,a)}function I9(u,a,d){return!!Yc(u,a)||!!z1(a,u,d)}function _3(u,a){if(u.length===1)return w3(a,u[0]);for(let d=0;d<a.length;d++){const m=a[d];for(let x=0;x<m.length;x++)if(Yc(u,m[x]))return!0}for(let d=0;d<u.length;d++)if(w3(a,u[d]))return!0;for(let d=0;d<a.length;d++)if(L1(u,a[d]))return!0;return!1}function M9(u,a,d){if(u.length>1){if(L1(u,a))return!0;for(let m=0;m<a.length;m++)if(z1(a[m],u,d))return!0}for(let m=0;m<u.length;m++)if(z1(u[m],a,d))return!0;return!1}function L1(u,a){if(u.length===0||a.length===0)return!1;for(let d=0;d<u.length-1;d++){const m=u[d],x=u[d+1];for(let S=0;S<a.length-1;S++)if(R9(m,x,a[S],a[S+1]))return!0}return!1}function R9(u,a,d,m){return U(u,d,m)!==U(a,d,m)&&U(u,a,d)!==U(u,a,m)}function z1(u,a,d){const m=d*d;if(a.length===1)return u.distSqr(a[0])<m;for(let x=1;x<a.length;x++)if(b3(u,a[x-1],a[x])<m)return!0;return!1}function b3(u,a,d){const m=a.distSqr(d);if(m===0)return u.distSqr(a);const x=((u.x-a.x)*(d.x-a.x)+(u.y-a.y)*(d.y-a.y))/m;return u.distSqr(x<0?a:x>1?d:d.sub(a)._mult(x)._add(a))}function w3(u,a){let d,m,x,S=!1;for(let T=0;T<u.length;T++){d=u[T];for(let L=0,F=d.length-1;L<d.length;F=L++)m=d[L],x=d[F],m.y>a.y!=x.y>a.y&&a.x<(x.x-m.x)*(a.y-m.y)/(x.y-m.y)+m.x&&(S=!S)}return S}function Yc(u,a){let d=!1;for(let m=0,x=u.length-1;m<u.length;x=m++){const S=u[m],T=u[x];S.y>a.y!=T.y>a.y&&a.x<(T.x-S.x)*(a.y-S.y)/(T.y-S.y)+S.x&&(d=!d)}return d}function A9(u,a,d){const m=d[0],x=d[2];if(u.x<m.x&&a.x<m.x||u.x>x.x&&a.x>x.x||u.y<m.y&&a.y<m.y||u.y>x.y&&a.y>x.y)return!1;const S=U(u,a,d[0]);return S!==U(u,a,d[1])||S!==U(u,a,d[2])||S!==U(u,a,d[3])}function th(u,a,d){const m=a.paint.get(u).value;return m.kind==="constant"?m.value:d.programConfigurations.get(a.id).getMaxValue(u)}function Qm(u){return Math.sqrt(u[0]*u[0]+u[1]*u[1])}function Jm(u,a,d,m,x){if(!a[0]&&!a[1])return u;const S=re.convert(a)._mult(x);d==="viewport"&&S._rotate(-m);const T=[];for(let L=0;L<u.length;L++)T.push(u[L].sub(S));return T}fn("CircleBucket",D1,{omit:["layers"]});const O9=new Ti({"circle-sort-key":new En(Fe.layout_circle["circle-sort-key"])});var N9={paint:new Ti({"circle-radius":new En(Fe.paint_circle["circle-radius"]),"circle-color":new En(Fe.paint_circle["circle-color"]),"circle-blur":new En(Fe.paint_circle["circle-blur"]),"circle-opacity":new En(Fe.paint_circle["circle-opacity"]),"circle-translate":new mn(Fe.paint_circle["circle-translate"]),"circle-translate-anchor":new mn(Fe.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new mn(Fe.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new mn(Fe.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new En(Fe.paint_circle["circle-stroke-width"]),"circle-stroke-color":new En(Fe.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new En(Fe.paint_circle["circle-stroke-opacity"])}),layout:O9},Ji=1e-6,eo=typeof Float32Array<"u"?Float32Array:Array;function C3(){var u=new eo(9);return eo!=Float32Array&&(u[1]=0,u[2]=0,u[3]=0,u[5]=0,u[6]=0,u[7]=0),u[0]=1,u[4]=1,u[8]=1,u}function F1(u){return u[0]=1,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=1,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=1,u[11]=0,u[12]=0,u[13]=0,u[14]=0,u[15]=1,u}function S3(u,a,d){var m=a[0],x=a[1],S=a[2],T=a[3],L=a[4],F=a[5],j=a[6],X=a[7],ne=a[8],ue=a[9],he=a[10],pe=a[11],Ae=a[12],Ie=a[13],Ze=a[14],st=a[15],Ke=d[0],rt=d[1],kt=d[2],St=d[3];return u[0]=Ke*m+rt*L+kt*ne+St*Ae,u[1]=Ke*x+rt*F+kt*ue+St*Ie,u[2]=Ke*S+rt*j+kt*he+St*Ze,u[3]=Ke*T+rt*X+kt*pe+St*st,u[4]=(Ke=d[4])*m+(rt=d[5])*L+(kt=d[6])*ne+(St=d[7])*Ae,u[5]=Ke*x+rt*F+kt*ue+St*Ie,u[6]=Ke*S+rt*j+kt*he+St*Ze,u[7]=Ke*T+rt*X+kt*pe+St*st,u[8]=(Ke=d[8])*m+(rt=d[9])*L+(kt=d[10])*ne+(St=d[11])*Ae,u[9]=Ke*x+rt*F+kt*ue+St*Ie,u[10]=Ke*S+rt*j+kt*he+St*Ze,u[11]=Ke*T+rt*X+kt*pe+St*st,u[12]=(Ke=d[12])*m+(rt=d[13])*L+(kt=d[14])*ne+(St=d[15])*Ae,u[13]=Ke*x+rt*F+kt*ue+St*Ie,u[14]=Ke*S+rt*j+kt*he+St*Ze,u[15]=Ke*T+rt*X+kt*pe+St*st,u}Math.hypot||(Math.hypot=function(){for(var u=0,a=arguments.length;a--;)u+=arguments[a]*arguments[a];return Math.sqrt(u)});var nh,D9=S3;function E3(){var u=new eo(3);return eo!=Float32Array&&(u[0]=0,u[1]=0,u[2]=0),u}function k3(u,a,d){var m=new eo(3);return m[0]=u,m[1]=a,m[2]=d,m}function ev(u,a,d){var m=a[0],x=a[1],S=a[2],T=a[3];return u[0]=d[0]*m+d[4]*x+d[8]*S+d[12]*T,u[1]=d[1]*m+d[5]*x+d[9]*S+d[13]*T,u[2]=d[2]*m+d[6]*x+d[10]*S+d[14]*T,u[3]=d[3]*m+d[7]*x+d[11]*S+d[15]*T,u}function T3(){var u=new eo(4);return eo!=Float32Array&&(u[0]=0,u[1]=0,u[2]=0),u[3]=1,u}function P3(u,a){const d=ev([],[u.x,u.y,0,1],a);return new re(d[0]/d[3],d[1]/d[3])}E3(),nh=new eo(4),eo!=Float32Array&&(nh[0]=0,nh[1]=0,nh[2]=0,nh[3]=0),E3(),k3(1,0,0),k3(0,1,0),T3(),T3(),C3(),function(){var u;u=new eo(2),eo!=Float32Array&&(u[0]=0,u[1]=0)}();class I3 extends D1{}fn("HeatmapBucket",I3,{omit:["layers"]});var L9={paint:new Ti({"heatmap-radius":new En(Fe.paint_heatmap["heatmap-radius"]),"heatmap-weight":new En(Fe.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new mn(Fe.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Ya(Fe.paint_heatmap["heatmap-color"]),"heatmap-opacity":new mn(Fe.paint_heatmap["heatmap-opacity"])})};function $1(u,{width:a,height:d},m,x){if(x){if(x instanceof Uint8ClampedArray)x=new Uint8Array(x.buffer);else if(x.length!==a*d*m)throw new RangeError(`mismatched image size. expected: ${x.length} but got: ${a*d*m}`)}else x=new Uint8Array(a*d*m);return u.width=a,u.height=d,u.data=x,u}function M3(u,{width:a,height:d},m){if(a===u.width&&d===u.height)return;const x=$1({},{width:a,height:d},m);B1(u,x,{x:0,y:0},{x:0,y:0},{width:Math.min(u.width,a),height:Math.min(u.height,d)},m),u.width=a,u.height=d,u.data=x.data}function B1(u,a,d,m,x,S){if(x.width===0||x.height===0)return a;if(x.width>u.width||x.height>u.height||d.x>u.width-x.width||d.y>u.height-x.height)throw new RangeError("out of range source coordinates for image copy");if(x.width>a.width||x.height>a.height||m.x>a.width-x.width||m.y>a.height-x.height)throw new RangeError("out of range destination coordinates for image copy");const T=u.data,L=a.data;if(T===L)throw new Error("srcData equals dstData, so image is already copied");for(let F=0;F<x.height;F++){const j=((d.y+F)*u.width+d.x)*S,X=((m.y+F)*a.width+m.x)*S;for(let ne=0;ne<x.width*S;ne++)L[X+ne]=T[j+ne]}return a}class rh{constructor(a,d){$1(this,a,1,d)}resize(a){M3(this,a,1)}clone(){return new rh({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(a,d,m,x,S){B1(a,d,m,x,S,1)}}class $o{constructor(a,d){$1(this,a,4,d)}resize(a){M3(this,a,4)}replace(a,d){d?this.data.set(a):this.data=a instanceof Uint8ClampedArray?new Uint8Array(a.buffer):a}clone(){return new $o({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(a,d,m,x,S){B1(a,d,m,x,S,4)}}function R3(u){const a={},d=u.resolution||256,m=u.clips?u.clips.length:1,x=u.image||new $o({width:d,height:m});if(Math.log(d)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${d}`);const S=(T,L,F)=>{a[u.evaluationKey]=F;const j=u.expression.evaluate(a);x.data[T+L+0]=Math.floor(255*j.r/j.a),x.data[T+L+1]=Math.floor(255*j.g/j.a),x.data[T+L+2]=Math.floor(255*j.b/j.a),x.data[T+L+3]=Math.floor(255*j.a)};if(u.clips)for(let T=0,L=0;T<m;++T,L+=4*d)for(let F=0,j=0;F<d;F++,j+=4){const X=F/(d-1),{start:ne,end:ue}=u.clips[T];S(L,j,ne*(1-X)+ue*X)}else for(let T=0,L=0;T<d;T++,L+=4)S(0,L,T/(d-1));return x}fn("AlphaImage",rh),fn("RGBAImage",$o);var z9={paint:new Ti({"hillshade-illumination-direction":new mn(Fe.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new mn(Fe.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new mn(Fe.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new mn(Fe.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new mn(Fe.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new mn(Fe.paint_hillshade["hillshade-accent-color"])})};const F9=ni([{name:"a_pos",components:2,type:"Int16"}],4),{members:$9}=F9;var tv={exports:{}};function nv(u,a,d){d=d||2;var m,x,S,T,L,F,j,X=a&&a.length,ne=X?a[0]*d:u.length,ue=A3(u,0,ne,d,!0),he=[];if(!ue||ue.next===ue.prev)return he;if(X&&(ue=function(Ae,Ie,Ze,st){var Ke,rt,kt,St=[];for(Ke=0,rt=Ie.length;Ke<rt;Ke++)(kt=A3(Ae,Ie[Ke]*st,Ke<rt-1?Ie[Ke+1]*st:Ae.length,st,!1))===kt.next&&(kt.steiner=!0),St.push(G9(kt));for(St.sort(K9),Ke=0;Ke<St.length;Ke++)Ze=H9(St[Ke],Ze);return Ze}(u,a,ue,d)),u.length>80*d){m=S=u[0],x=T=u[1];for(var pe=d;pe<ne;pe+=d)(L=u[pe])<m&&(m=L),(F=u[pe+1])<x&&(x=F),L>S&&(S=L),F>T&&(T=F);j=(j=Math.max(S-m,T-x))!==0?32767/j:0}return ih(ue,he,d,m,x,j,0),he}function A3(u,a,d,m,x){var S,T;if(x===j1(u,a,d,m)>0)for(S=a;S<d;S+=m)T=D3(S,u[S],u[S+1],T);else for(S=d-m;S>=a;S-=m)T=D3(S,u[S],u[S+1],T);return T&&rv(T,T.next)&&(ah(T),T=T.next),T}function Uu(u,a){if(!u)return u;a||(a=u);var d,m=u;do if(d=!1,m.steiner||!rv(m,m.next)&&Qr(m.prev,m,m.next)!==0)m=m.next;else{if(ah(m),(m=a=m.prev)===m.next)break;d=!0}while(d||m!==a);return a}function ih(u,a,d,m,x,S,T){if(u){!T&&S&&function(X,ne,ue,he){var pe=X;do pe.z===0&&(pe.z=V1(pe.x,pe.y,ne,ue,he)),pe.prevZ=pe.prev,pe.nextZ=pe.next,pe=pe.next;while(pe!==X);pe.prevZ.nextZ=null,pe.prevZ=null,function(Ae){var Ie,Ze,st,Ke,rt,kt,St,un,pn=1;do{for(Ze=Ae,Ae=null,rt=null,kt=0;Ze;){for(kt++,st=Ze,St=0,Ie=0;Ie<pn&&(St++,st=st.nextZ);Ie++);for(un=pn;St>0||un>0&&st;)St!==0&&(un===0||!st||Ze.z<=st.z)?(Ke=Ze,Ze=Ze.nextZ,St--):(Ke=st,st=st.nextZ,un--),rt?rt.nextZ=Ke:Ae=Ke,Ke.prevZ=rt,rt=Ke;Ze=st}rt.nextZ=null,pn*=2}while(kt>1)}(pe)}(u,m,x,S);for(var L,F,j=u;u.prev!==u.next;)if(L=u.prev,F=u.next,S?V9(u,m,x,S):B9(u))a.push(L.i/d|0),a.push(u.i/d|0),a.push(F.i/d|0),ah(u),u=F.next,j=F.next;else if((u=F)===j){T?T===1?ih(u=U9(Uu(u),a,d),a,d,m,x,S,2):T===2&&j9(u,a,d,m,x,S):ih(Uu(u),a,d,m,x,S,1);break}}}function B9(u){var a=u.prev,d=u,m=u.next;if(Qr(a,d,m)>=0)return!1;for(var x=a.x,S=d.x,T=m.x,L=a.y,F=d.y,j=m.y,X=x<S?x<T?x:T:S<T?S:T,ne=L<F?L<j?L:j:F<j?F:j,ue=x>S?x>T?x:T:S>T?S:T,he=L>F?L>j?L:j:F>j?F:j,pe=m.next;pe!==a;){if(pe.x>=X&&pe.x<=ue&&pe.y>=ne&&pe.y<=he&&Qc(x,L,S,F,T,j,pe.x,pe.y)&&Qr(pe.prev,pe,pe.next)>=0)return!1;pe=pe.next}return!0}function V9(u,a,d,m){var x=u.prev,S=u,T=u.next;if(Qr(x,S,T)>=0)return!1;for(var L=x.x,F=S.x,j=T.x,X=x.y,ne=S.y,ue=T.y,he=L<F?L<j?L:j:F<j?F:j,pe=X<ne?X<ue?X:ue:ne<ue?ne:ue,Ae=L>F?L>j?L:j:F>j?F:j,Ie=X>ne?X>ue?X:ue:ne>ue?ne:ue,Ze=V1(he,pe,a,d,m),st=V1(Ae,Ie,a,d,m),Ke=u.prevZ,rt=u.nextZ;Ke&&Ke.z>=Ze&&rt&&rt.z<=st;){if(Ke.x>=he&&Ke.x<=Ae&&Ke.y>=pe&&Ke.y<=Ie&&Ke!==x&&Ke!==T&&Qc(L,X,F,ne,j,ue,Ke.x,Ke.y)&&Qr(Ke.prev,Ke,Ke.next)>=0||(Ke=Ke.prevZ,rt.x>=he&&rt.x<=Ae&&rt.y>=pe&&rt.y<=Ie&&rt!==x&&rt!==T&&Qc(L,X,F,ne,j,ue,rt.x,rt.y)&&Qr(rt.prev,rt,rt.next)>=0))return!1;rt=rt.nextZ}for(;Ke&&Ke.z>=Ze;){if(Ke.x>=he&&Ke.x<=Ae&&Ke.y>=pe&&Ke.y<=Ie&&Ke!==x&&Ke!==T&&Qc(L,X,F,ne,j,ue,Ke.x,Ke.y)&&Qr(Ke.prev,Ke,Ke.next)>=0)return!1;Ke=Ke.prevZ}for(;rt&&rt.z<=st;){if(rt.x>=he&&rt.x<=Ae&&rt.y>=pe&&rt.y<=Ie&&rt!==x&&rt!==T&&Qc(L,X,F,ne,j,ue,rt.x,rt.y)&&Qr(rt.prev,rt,rt.next)>=0)return!1;rt=rt.nextZ}return!0}function U9(u,a,d){var m=u;do{var x=m.prev,S=m.next.next;!rv(x,S)&&O3(x,m,m.next,S)&&oh(x,S)&&oh(S,x)&&(a.push(x.i/d|0),a.push(m.i/d|0),a.push(S.i/d|0),ah(m),ah(m.next),m=u=S),m=m.next}while(m!==u);return Uu(m)}function j9(u,a,d,m,x,S){var T=u;do{for(var L=T.next.next;L!==T.prev;){if(T.i!==L.i&&q9(T,L)){var F=N3(T,L);return T=Uu(T,T.next),F=Uu(F,F.next),ih(T,a,d,m,x,S,0),void ih(F,a,d,m,x,S,0)}L=L.next}T=T.next}while(T!==u)}function K9(u,a){return u.x-a.x}function H9(u,a){var d=function(x,S){var T,L=S,F=x.x,j=x.y,X=-1/0;do{if(j<=L.y&&j>=L.next.y&&L.next.y!==L.y){var ne=L.x+(j-L.y)*(L.next.x-L.x)/(L.next.y-L.y);if(ne<=F&&ne>X&&(X=ne,T=L.x<L.next.x?L:L.next,ne===F))return T}L=L.next}while(L!==S);if(!T)return null;var ue,he=T,pe=T.x,Ae=T.y,Ie=1/0;L=T;do F>=L.x&&L.x>=pe&&F!==L.x&&Qc(j<Ae?F:X,j,pe,Ae,j<Ae?X:F,j,L.x,L.y)&&(ue=Math.abs(j-L.y)/(F-L.x),oh(L,x)&&(ue<Ie||ue===Ie&&(L.x>T.x||L.x===T.x&&W9(T,L)))&&(T=L,Ie=ue)),L=L.next;while(L!==he);return T}(u,a);if(!d)return a;var m=N3(d,u);return Uu(m,m.next),Uu(d,d.next)}function W9(u,a){return Qr(u.prev,u,a.prev)<0&&Qr(a.next,u,u.next)<0}function V1(u,a,d,m,x){return(u=1431655765&((u=858993459&((u=252645135&((u=16711935&((u=(u-d)*x|0)|u<<8))|u<<4))|u<<2))|u<<1))|(a=1431655765&((a=858993459&((a=252645135&((a=16711935&((a=(a-m)*x|0)|a<<8))|a<<4))|a<<2))|a<<1))<<1}function G9(u){var a=u,d=u;do(a.x<d.x||a.x===d.x&&a.y<d.y)&&(d=a),a=a.next;while(a!==u);return d}function Qc(u,a,d,m,x,S,T,L){return(x-T)*(a-L)>=(u-T)*(S-L)&&(u-T)*(m-L)>=(d-T)*(a-L)&&(d-T)*(S-L)>=(x-T)*(m-L)}function q9(u,a){return u.next.i!==a.i&&u.prev.i!==a.i&&!function(d,m){var x=d;do{if(x.i!==d.i&&x.next.i!==d.i&&x.i!==m.i&&x.next.i!==m.i&&O3(x,x.next,d,m))return!0;x=x.next}while(x!==d);return!1}(u,a)&&(oh(u,a)&&oh(a,u)&&function(d,m){var x=d,S=!1,T=(d.x+m.x)/2,L=(d.y+m.y)/2;do x.y>L!=x.next.y>L&&x.next.y!==x.y&&T<(x.next.x-x.x)*(L-x.y)/(x.next.y-x.y)+x.x&&(S=!S),x=x.next;while(x!==d);return S}(u,a)&&(Qr(u.prev,u,a.prev)||Qr(u,a.prev,a))||rv(u,a)&&Qr(u.prev,u,u.next)>0&&Qr(a.prev,a,a.next)>0)}function Qr(u,a,d){return(a.y-u.y)*(d.x-a.x)-(a.x-u.x)*(d.y-a.y)}function rv(u,a){return u.x===a.x&&u.y===a.y}function O3(u,a,d,m){var x=ov(Qr(u,a,d)),S=ov(Qr(u,a,m)),T=ov(Qr(d,m,u)),L=ov(Qr(d,m,a));return x!==S&&T!==L||!(x!==0||!iv(u,d,a))||!(S!==0||!iv(u,m,a))||!(T!==0||!iv(d,u,m))||!(L!==0||!iv(d,a,m))}function iv(u,a,d){return a.x<=Math.max(u.x,d.x)&&a.x>=Math.min(u.x,d.x)&&a.y<=Math.max(u.y,d.y)&&a.y>=Math.min(u.y,d.y)}function ov(u){return u>0?1:u<0?-1:0}function oh(u,a){return Qr(u.prev,u,u.next)<0?Qr(u,a,u.next)>=0&&Qr(u,u.prev,a)>=0:Qr(u,a,u.prev)<0||Qr(u,u.next,a)<0}function N3(u,a){var d=new U1(u.i,u.x,u.y),m=new U1(a.i,a.x,a.y),x=u.next,S=a.prev;return u.next=a,a.prev=u,d.next=x,x.prev=d,m.next=d,d.prev=m,S.next=m,m.prev=S,m}function D3(u,a,d,m){var x=new U1(u,a,d);return m?(x.next=m.next,x.prev=m,m.next.prev=x,m.next=x):(x.prev=x,x.next=x),x}function ah(u){u.next.prev=u.prev,u.prev.next=u.next,u.prevZ&&(u.prevZ.nextZ=u.nextZ),u.nextZ&&(u.nextZ.prevZ=u.prevZ)}function U1(u,a,d){this.i=u,this.x=a,this.y=d,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function j1(u,a,d,m){for(var x=0,S=a,T=d-m;S<d;S+=m)x+=(u[T]-u[S])*(u[S+1]+u[T+1]),T=S;return x}function Z9(u,a,d,m,x){L3(u,a,d||0,m||u.length-1,x||X9)}function L3(u,a,d,m,x){for(;m>d;){if(m-d>600){var S=m-d+1,T=a-d+1,L=Math.log(S),F=.5*Math.exp(2*L/3),j=.5*Math.sqrt(L*F*(S-F)/S)*(T-S/2<0?-1:1);L3(u,a,Math.max(d,Math.floor(a-T*F/S+j)),Math.min(m,Math.floor(a+(S-T)*F/S+j)),x)}var X=u[a],ne=d,ue=m;for(sh(u,d,a),x(u[m],X)>0&&sh(u,d,m);ne<ue;){for(sh(u,ne,ue),ne++,ue--;x(u[ne],X)<0;)ne++;for(;x(u[ue],X)>0;)ue--}x(u[d],X)===0?sh(u,d,ue):sh(u,++ue,m),ue<=a&&(d=ue+1),a<=ue&&(m=ue-1)}}function sh(u,a,d){var m=u[a];u[a]=u[d],u[d]=m}function X9(u,a){return u<a?-1:u>a?1:0}function K1(u,a){const d=u.length;if(d<=1)return[u];const m=[];let x,S;for(let T=0;T<d;T++){const L=q(u[T]);L!==0&&(u[T].area=Math.abs(L),S===void 0&&(S=L<0),S===L<0?(x&&m.push(x),x=[u[T]]):x.push(u[T]))}if(x&&m.push(x),a>1)for(let T=0;T<m.length;T++)m[T].length<=a||(Z9(m[T],a,1,m[T].length-1,Y9),m[T]=m[T].slice(0,a));return m}function Y9(u,a){return a.area-u.area}function H1(u,a,d){const m=d.patternDependencies;let x=!1;for(const S of a){const T=S.paint.get(`${u}-pattern`);T.isConstant()||(x=!0);const L=T.constantOr(null);L&&(x=!0,m[L.to]=!0,m[L.from]=!0)}return x}function W1(u,a,d,m,x){const S=x.patternDependencies;for(const T of a){const L=T.paint.get(`${u}-pattern`).value;if(L.kind!=="constant"){let F=L.evaluate({zoom:m-1},d,{},x.availableImages),j=L.evaluate({zoom:m},d,{},x.availableImages),X=L.evaluate({zoom:m+1},d,{},x.availableImages);F=F&&F.name?F.name:F,j=j&&j.name?j.name:j,X=X&&X.name?X.name:X,S[F]=!0,S[j]=!0,S[X]=!0,d.patterns[T.id]={min:F,mid:j,max:X}}}return d}tv.exports=nv,tv.exports.default=nv,nv.deviation=function(u,a,d,m){var x=a&&a.length,S=Math.abs(j1(u,0,x?a[0]*d:u.length,d));if(x)for(var T=0,L=a.length;T<L;T++)S-=Math.abs(j1(u,a[T]*d,T<L-1?a[T+1]*d:u.length,d));var F=0;for(T=0;T<m.length;T+=3){var j=m[T]*d,X=m[T+1]*d,ne=m[T+2]*d;F+=Math.abs((u[j]-u[ne])*(u[X+1]-u[j+1])-(u[j]-u[X])*(u[ne+1]-u[j+1]))}return S===0&&F===0?0:Math.abs((F-S)/S)},nv.flatten=function(u){for(var a=u[0][0].length,d={vertices:[],holes:[],dimensions:a},m=0,x=0;x<u.length;x++){for(var S=0;S<u[x].length;S++)for(var T=0;T<a;T++)d.vertices.push(u[x][S][T]);x>0&&d.holes.push(m+=u[x-1].length)}return d};class G1{constructor(a){this.zoom=a.zoom,this.overscaling=a.overscaling,this.layers=a.layers,this.layerIds=this.layers.map(d=>d.id),this.index=a.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new dr,this.indexArray=new Qi,this.indexArray2=new Ma,this.programConfigurations=new $u(a.layers,a.zoom),this.segments=new Hn,this.segments2=new Hn,this.stateDependentLayerIds=this.layers.filter(d=>d.isStateDependent()).map(d=>d.id)}populate(a,d,m){this.hasPattern=H1("fill",this.layers,d);const x=this.layers[0].layout.get("fill-sort-key"),S=!x.isConstant(),T=[];for(const{feature:L,id:F,index:j,sourceLayerIndex:X}of a){const ne=this.layers[0]._featureFilter.needGeometry,ue=Vu(L,ne);if(!this.layers[0]._featureFilter.filter(new Rr(this.zoom),ue,m))continue;const he=S?x.evaluate(ue,{},m,d.availableImages):void 0,pe={id:F,properties:L.properties,type:L.type,sourceLayerIndex:X,index:j,geometry:ne?ue.geometry:Bu(L),patterns:{},sortKey:he};T.push(pe)}S&&T.sort((L,F)=>L.sortKey-F.sortKey);for(const L of T){const{geometry:F,index:j,sourceLayerIndex:X}=L;if(this.hasPattern){const ne=W1("fill",this.layers,L,this.zoom,d);this.patternFeatures.push(ne)}else this.addFeature(L,F,j,m,{});d.featureIndex.insert(a[j].feature,F,j,X,this.index)}}update(a,d,m){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(a,d,this.stateDependentLayers,m)}addFeatures(a,d,m){for(const x of this.patternFeatures)this.addFeature(x,x.geometry,x.index,d,m)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(a){this.uploaded||(this.layoutVertexBuffer=a.createVertexBuffer(this.layoutVertexArray,$9),this.indexBuffer=a.createIndexBuffer(this.indexArray),this.indexBuffer2=a.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(a),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(a,d,m,x,S){for(const T of K1(d,500)){let L=0;for(const he of T)L+=he.length;const F=this.segments.prepareSegment(L,this.layoutVertexArray,this.indexArray),j=F.vertexLength,X=[],ne=[];for(const he of T){if(he.length===0)continue;he!==T[0]&&ne.push(X.length/2);const pe=this.segments2.prepareSegment(he.length,this.layoutVertexArray,this.indexArray2),Ae=pe.vertexLength;this.layoutVertexArray.emplaceBack(he[0].x,he[0].y),this.indexArray2.emplaceBack(Ae+he.length-1,Ae),X.push(he[0].x),X.push(he[0].y);for(let Ie=1;Ie<he.length;Ie++)this.layoutVertexArray.emplaceBack(he[Ie].x,he[Ie].y),this.indexArray2.emplaceBack(Ae+Ie-1,Ae+Ie),X.push(he[Ie].x),X.push(he[Ie].y);pe.vertexLength+=he.length,pe.primitiveLength+=he.length}const ue=tv.exports(X,ne);for(let he=0;he<ue.length;he+=3)this.indexArray.emplaceBack(j+ue[he],j+ue[he+1],j+ue[he+2]);F.vertexLength+=L,F.primitiveLength+=ue.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,a,m,S,x)}}fn("FillBucket",G1,{omit:["layers","patternFeatures"]});const Q9=new Ti({"fill-sort-key":new En(Fe.layout_fill["fill-sort-key"])});var J9={paint:new Ti({"fill-antialias":new mn(Fe.paint_fill["fill-antialias"]),"fill-opacity":new En(Fe.paint_fill["fill-opacity"]),"fill-color":new En(Fe.paint_fill["fill-color"]),"fill-outline-color":new En(Fe.paint_fill["fill-outline-color"]),"fill-translate":new mn(Fe.paint_fill["fill-translate"]),"fill-translate-anchor":new mn(Fe.paint_fill["fill-translate-anchor"]),"fill-pattern":new xl(Fe.paint_fill["fill-pattern"])}),layout:Q9};const eD=ni([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),tD=ni([{name:"a_centroid",components:2,type:"Int16"}],4),{members:nD}=eD;var wl={},rD=re,z3=Jc;function Jc(u,a,d,m,x){this.properties={},this.extent=d,this.type=0,this._pbf=u,this._geometry=-1,this._keys=m,this._values=x,u.readFields(iD,this,a)}function iD(u,a,d){u==1?a.id=d.readVarint():u==2?function(m,x){for(var S=m.readVarint()+m.pos;m.pos<S;){var T=x._keys[m.readVarint()],L=x._values[m.readVarint()];x.properties[T]=L}}(d,a):u==3?a.type=d.readVarint():u==4&&(a._geometry=d.pos)}function oD(u){for(var a,d,m=0,x=0,S=u.length,T=S-1;x<S;T=x++)m+=((d=u[T]).x-(a=u[x]).x)*(a.y+d.y);return m}Jc.types=["Unknown","Point","LineString","Polygon"],Jc.prototype.loadGeometry=function(){var u=this._pbf;u.pos=this._geometry;for(var a,d=u.readVarint()+u.pos,m=1,x=0,S=0,T=0,L=[];u.pos<d;){if(x<=0){var F=u.readVarint();m=7&F,x=F>>3}if(x--,m===1||m===2)S+=u.readSVarint(),T+=u.readSVarint(),m===1&&(a&&L.push(a),a=[]),a.push(new rD(S,T));else{if(m!==7)throw new Error("unknown command "+m);a&&a.push(a[0].clone())}}return a&&L.push(a),L},Jc.prototype.bbox=function(){var u=this._pbf;u.pos=this._geometry;for(var a=u.readVarint()+u.pos,d=1,m=0,x=0,S=0,T=1/0,L=-1/0,F=1/0,j=-1/0;u.pos<a;){if(m<=0){var X=u.readVarint();d=7&X,m=X>>3}if(m--,d===1||d===2)(x+=u.readSVarint())<T&&(T=x),x>L&&(L=x),(S+=u.readSVarint())<F&&(F=S),S>j&&(j=S);else if(d!==7)throw new Error("unknown command "+d)}return[T,F,L,j]},Jc.prototype.toGeoJSON=function(u,a,d){var m,x,S=this.extent*Math.pow(2,d),T=this.extent*u,L=this.extent*a,F=this.loadGeometry(),j=Jc.types[this.type];function X(he){for(var pe=0;pe<he.length;pe++){var Ae=he[pe];he[pe]=[360*(Ae.x+T)/S-180,360/Math.PI*Math.atan(Math.exp((180-360*(Ae.y+L)/S)*Math.PI/180))-90]}}switch(this.type){case 1:var ne=[];for(m=0;m<F.length;m++)ne[m]=F[m][0];X(F=ne);break;case 2:for(m=0;m<F.length;m++)X(F[m]);break;case 3:for(F=function(he){var pe=he.length;if(pe<=1)return[he];for(var Ae,Ie,Ze=[],st=0;st<pe;st++){var Ke=oD(he[st]);Ke!==0&&(Ie===void 0&&(Ie=Ke<0),Ie===Ke<0?(Ae&&Ze.push(Ae),Ae=[he[st]]):Ae.push(he[st]))}return Ae&&Ze.push(Ae),Ze}(F),m=0;m<F.length;m++)for(x=0;x<F[m].length;x++)X(F[m][x])}F.length===1?F=F[0]:j="Multi"+j;var ue={type:"Feature",geometry:{type:j,coordinates:F},properties:this.properties};return"id"in this&&(ue.id=this.id),ue};var aD=z3,F3=$3;function $3(u,a){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=u,this._keys=[],this._values=[],this._features=[],u.readFields(sD,this,a),this.length=this._features.length}function sD(u,a,d){u===15?a.version=d.readVarint():u===1?a.name=d.readString():u===5?a.extent=d.readVarint():u===2?a._features.push(d.pos):u===3?a._keys.push(d.readString()):u===4&&a._values.push(function(m){for(var x=null,S=m.readVarint()+m.pos;m.pos<S;){var T=m.readVarint()>>3;x=T===1?m.readString():T===2?m.readFloat():T===3?m.readDouble():T===4?m.readVarint64():T===5?m.readVarint():T===6?m.readSVarint():T===7?m.readBoolean():null}return x}(d))}$3.prototype.feature=function(u){if(u<0||u>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[u];var a=this._pbf.readVarint()+this._pbf.pos;return new aD(this._pbf,a,this.extent,this._keys,this._values)};var lD=F3;function uD(u,a,d){if(u===3){var m=new lD(d,d.readVarint()+d.pos);m.length&&(a[m.name]=m)}}wl.VectorTile=function(u,a){this.layers=u.readFields(uD,{},a)},wl.VectorTileFeature=z3,wl.VectorTileLayer=F3;const cD=wl.VectorTileFeature.types,q1=Math.pow(2,13);function lh(u,a,d,m,x,S,T,L){u.emplaceBack(a,d,2*Math.floor(m*q1)+T,x*q1*2,S*q1*2,Math.round(L))}class Z1{constructor(a){this.zoom=a.zoom,this.overscaling=a.overscaling,this.layers=a.layers,this.layerIds=this.layers.map(d=>d.id),this.index=a.index,this.hasPattern=!1,this.layoutVertexArray=new Qn,this.centroidVertexArray=new bn,this.indexArray=new Qi,this.programConfigurations=new $u(a.layers,a.zoom),this.segments=new Hn,this.stateDependentLayerIds=this.layers.filter(d=>d.isStateDependent()).map(d=>d.id)}populate(a,d,m){this.features=[],this.hasPattern=H1("fill-extrusion",this.layers,d);for(const{feature:x,id:S,index:T,sourceLayerIndex:L}of a){const F=this.layers[0]._featureFilter.needGeometry,j=Vu(x,F);if(!this.layers[0]._featureFilter.filter(new Rr(this.zoom),j,m))continue;const X={id:S,sourceLayerIndex:L,index:T,geometry:F?j.geometry:Bu(x),properties:x.properties,type:x.type,patterns:{}};this.hasPattern?this.features.push(W1("fill-extrusion",this.layers,X,this.zoom,d)):this.addFeature(X,X.geometry,T,m,{}),d.featureIndex.insert(x,X.geometry,T,L,this.index,!0)}}addFeatures(a,d,m){for(const x of this.features){const{geometry:S}=x;this.addFeature(x,S,x.index,d,m)}}update(a,d,m){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(a,d,this.stateDependentLayers,m)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(a){this.uploaded||(this.layoutVertexBuffer=a.createVertexBuffer(this.layoutVertexArray,nD),this.centroidVertexBuffer=a.createVertexBuffer(this.centroidVertexArray,tD.members,!0),this.indexBuffer=a.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(a),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(a,d,m,x,S){const T={x:0,y:0,vertexCount:0};for(const L of K1(d,500)){let F=0;for(const pe of L)F+=pe.length;let j=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const pe of L){if(pe.length===0||fD(pe))continue;let Ae=0;for(let Ie=0;Ie<pe.length;Ie++){const Ze=pe[Ie];if(Ie>=1){const st=pe[Ie-1];if(!dD(Ze,st)){j.vertexLength+4>Hn.MAX_VERTEX_ARRAY_LENGTH&&(j=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const Ke=Ze.sub(st)._perp()._unit(),rt=st.dist(Ze);Ae+rt>32768&&(Ae=0),lh(this.layoutVertexArray,Ze.x,Ze.y,Ke.x,Ke.y,0,0,Ae),lh(this.layoutVertexArray,Ze.x,Ze.y,Ke.x,Ke.y,0,1,Ae),T.x+=2*Ze.x,T.y+=2*Ze.y,T.vertexCount+=2,Ae+=rt,lh(this.layoutVertexArray,st.x,st.y,Ke.x,Ke.y,0,0,Ae),lh(this.layoutVertexArray,st.x,st.y,Ke.x,Ke.y,0,1,Ae),T.x+=2*st.x,T.y+=2*st.y,T.vertexCount+=2;const kt=j.vertexLength;this.indexArray.emplaceBack(kt,kt+2,kt+1),this.indexArray.emplaceBack(kt+1,kt+2,kt+3),j.vertexLength+=4,j.primitiveLength+=2}}}}if(j.vertexLength+F>Hn.MAX_VERTEX_ARRAY_LENGTH&&(j=this.segments.prepareSegment(F,this.layoutVertexArray,this.indexArray)),cD[a.type]!=="Polygon")continue;const X=[],ne=[],ue=j.vertexLength;for(const pe of L)if(pe.length!==0){pe!==L[0]&&ne.push(X.length/2);for(let Ae=0;Ae<pe.length;Ae++){const Ie=pe[Ae];lh(this.layoutVertexArray,Ie.x,Ie.y,0,0,1,1,0),T.x+=Ie.x,T.y+=Ie.y,T.vertexCount+=1,X.push(Ie.x),X.push(Ie.y)}}const he=tv.exports(X,ne);for(let pe=0;pe<he.length;pe+=3)this.indexArray.emplaceBack(ue+he[pe],ue+he[pe+2],ue+he[pe+1]);j.primitiveLength+=he.length/3,j.vertexLength+=F}for(let L=0;L<T.vertexCount;L++)this.centroidVertexArray.emplaceBack(Math.floor(T.x/T.vertexCount),Math.floor(T.y/T.vertexCount));this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,a,m,S,x)}}function dD(u,a){return u.x===a.x&&(u.x<0||u.x>di)||u.y===a.y&&(u.y<0||u.y>di)}function fD(u){return u.every(a=>a.x<0)||u.every(a=>a.x>di)||u.every(a=>a.y<0)||u.every(a=>a.y>di)}fn("FillExtrusionBucket",Z1,{omit:["layers","features"]});var hD={paint:new Ti({"fill-extrusion-opacity":new mn(Fe["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new En(Fe["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new mn(Fe["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new mn(Fe["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new xl(Fe["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new En(Fe["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new En(Fe["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new mn(Fe["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})};function uh(u,a){return u.x*a.x+u.y*a.y}function B3(u,a){if(u.length===1){let d=0;const m=a[d++];let x;for(;!x||m.equals(x);)if(x=a[d++],!x)return 1/0;for(;d<a.length;d++){const S=a[d],T=u[0],L=x.sub(m),F=S.sub(m),j=T.sub(m),X=uh(L,L),ne=uh(L,F),ue=uh(F,F),he=uh(j,L),pe=uh(j,F),Ae=X*ue-ne*ne,Ie=(ue*he-ne*pe)/Ae,Ze=(X*pe-ne*he)/Ae,st=m.z*(1-Ie-Ze)+x.z*Ie+S.z*Ze;if(isFinite(st))return st}return 1/0}{let d=1/0;for(const m of a)d=Math.min(d,m.z);return d}}const pD=ni([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:mD}=pD,vD=ni([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:gD}=vD,yD=wl.VectorTileFeature.types,xD=Math.cos(Math.PI/180*37.5),V3=Math.pow(2,14)/.5;class X1{constructor(a){this.zoom=a.zoom,this.overscaling=a.overscaling,this.layers=a.layers,this.layerIds=this.layers.map(d=>d.id),this.index=a.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(d=>{this.gradients[d.id]={}}),this.layoutVertexArray=new er,this.layoutVertexArray2=new pr,this.indexArray=new Qi,this.programConfigurations=new $u(a.layers,a.zoom),this.segments=new Hn,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(d=>d.isStateDependent()).map(d=>d.id)}populate(a,d,m){this.hasPattern=H1("line",this.layers,d);const x=this.layers[0].layout.get("line-sort-key"),S=!x.isConstant(),T=[];for(const{feature:L,id:F,index:j,sourceLayerIndex:X}of a){const ne=this.layers[0]._featureFilter.needGeometry,ue=Vu(L,ne);if(!this.layers[0]._featureFilter.filter(new Rr(this.zoom),ue,m))continue;const he=S?x.evaluate(ue,{},m):void 0,pe={id:F,properties:L.properties,type:L.type,sourceLayerIndex:X,index:j,geometry:ne?ue.geometry:Bu(L),patterns:{},sortKey:he};T.push(pe)}S&&T.sort((L,F)=>L.sortKey-F.sortKey);for(const L of T){const{geometry:F,index:j,sourceLayerIndex:X}=L;if(this.hasPattern){const ne=W1("line",this.layers,L,this.zoom,d);this.patternFeatures.push(ne)}else this.addFeature(L,F,j,m,{});d.featureIndex.insert(a[j].feature,F,j,X,this.index)}}update(a,d,m){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(a,d,this.stateDependentLayers,m)}addFeatures(a,d,m){for(const x of this.patternFeatures)this.addFeature(x,x.geometry,x.index,d,m)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(a){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=a.createVertexBuffer(this.layoutVertexArray2,gD)),this.layoutVertexBuffer=a.createVertexBuffer(this.layoutVertexArray,mD),this.indexBuffer=a.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(a),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(a){if(a.properties&&Object.prototype.hasOwnProperty.call(a.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(a.properties,"mapbox_clip_end"))return{start:+a.properties.mapbox_clip_start,end:+a.properties.mapbox_clip_end}}addFeature(a,d,m,x,S){const T=this.layers[0].layout,L=T.get("line-join").evaluate(a,{}),F=T.get("line-cap"),j=T.get("line-miter-limit"),X=T.get("line-round-limit");this.lineClips=this.lineFeatureClips(a);for(const ne of d)this.addLine(ne,a,L,F,j,X);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,a,m,S,x)}addLine(a,d,m,x,S,T){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let Ze=0;Ze<a.length-1;Ze++)this.totalDistance+=a[Ze].dist(a[Ze+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const L=yD[d.type]==="Polygon";let F=a.length;for(;F>=2&&a[F-1].equals(a[F-2]);)F--;let j=0;for(;j<F-1&&a[j].equals(a[j+1]);)j++;if(F<(L?3:2))return;m==="bevel"&&(S=1.05);const X=this.overscaling<=16?122880/(512*this.overscaling):0,ne=this.segments.prepareSegment(10*F,this.layoutVertexArray,this.indexArray);let ue,he,pe,Ae,Ie;this.e1=this.e2=-1,L&&(ue=a[F-2],Ie=a[j].sub(ue)._unit()._perp());for(let Ze=j;Ze<F;Ze++){if(pe=Ze===F-1?L?a[j+1]:void 0:a[Ze+1],pe&&a[Ze].equals(pe))continue;Ie&&(Ae=Ie),ue&&(he=ue),ue=a[Ze],Ie=pe?pe.sub(ue)._unit()._perp():Ae,Ae=Ae||Ie;let st=Ae.add(Ie);st.x===0&&st.y===0||st._unit();const Ke=Ae.x*Ie.x+Ae.y*Ie.y,rt=st.x*Ie.x+st.y*Ie.y,kt=rt!==0?1/rt:1/0,St=2*Math.sqrt(2-2*rt),un=rt<xD&&he&&pe,pn=Ae.x*Ie.y-Ae.y*Ie.x>0;if(un&&Ze>j){const Ht=ue.dist(he);if(Ht>2*X){const tn=ue.sub(ue.sub(he)._mult(X/Ht)._round());this.updateDistance(he,tn),this.addCurrentVertex(tn,Ae,0,0,ne),he=tn}}const en=he&&pe;let Zt=en?m:L?"butt":x;if(en&&Zt==="round"&&(kt<T?Zt="miter":kt<=2&&(Zt="fakeround")),Zt==="miter"&&kt>S&&(Zt="bevel"),Zt==="bevel"&&(kt>2&&(Zt="flipbevel"),kt<S&&(Zt="miter")),he&&this.updateDistance(he,ue),Zt==="miter")st._mult(kt),this.addCurrentVertex(ue,st,0,0,ne);else if(Zt==="flipbevel"){if(kt>100)st=Ie.mult(-1);else{const Ht=kt*Ae.add(Ie).mag()/Ae.sub(Ie).mag();st._perp()._mult(Ht*(pn?-1:1))}this.addCurrentVertex(ue,st,0,0,ne),this.addCurrentVertex(ue,st.mult(-1),0,0,ne)}else if(Zt==="bevel"||Zt==="fakeround"){const Ht=-Math.sqrt(kt*kt-1),tn=pn?Ht:0,Yt=pn?0:Ht;if(he&&this.addCurrentVertex(ue,Ae,tn,Yt,ne),Zt==="fakeround"){const Ft=Math.round(180*St/Math.PI/20);for(let wn=1;wn<Ft;wn++){let vn=wn/Ft;if(vn!==.5){const kr=vn-.5;vn+=vn*kr*(vn-1)*((1.0904+Ke*(Ke*(3.55645-1.43519*Ke)-3.2452))*kr*kr+(.848013+Ke*(.215638*Ke-1.06021)))}const Un=Ie.sub(Ae)._mult(vn)._add(Ae)._unit()._mult(pn?-1:1);this.addHalfVertex(ue,Un.x,Un.y,!1,pn,0,ne)}}pe&&this.addCurrentVertex(ue,Ie,-tn,-Yt,ne)}else if(Zt==="butt")this.addCurrentVertex(ue,st,0,0,ne);else if(Zt==="square"){const Ht=he?1:-1;this.addCurrentVertex(ue,st,Ht,Ht,ne)}else Zt==="round"&&(he&&(this.addCurrentVertex(ue,Ae,0,0,ne),this.addCurrentVertex(ue,Ae,1,1,ne,!0)),pe&&(this.addCurrentVertex(ue,Ie,-1,-1,ne,!0),this.addCurrentVertex(ue,Ie,0,0,ne)));if(un&&Ze<F-1){const Ht=ue.dist(pe);if(Ht>2*X){const tn=ue.add(pe.sub(ue)._mult(X/Ht)._round());this.updateDistance(ue,tn),this.addCurrentVertex(tn,Ie,0,0,ne),ue=tn}}}}addCurrentVertex(a,d,m,x,S,T=!1){const L=d.y*x-d.x,F=-d.y-d.x*x;this.addHalfVertex(a,d.x+d.y*m,d.y-d.x*m,T,!1,m,S),this.addHalfVertex(a,L,F,T,!0,-x,S),this.distance>V3/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(a,d,m,x,S,T))}addHalfVertex({x:a,y:d},m,x,S,T,L,F){const j=.5*(this.lineClips?this.scaledDistance*(V3-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((a<<1)+(S?1:0),(d<<1)+(T?1:0),Math.round(63*m)+128,Math.round(63*x)+128,1+(L===0?0:L<0?-1:1)|(63&j)<<2,j>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const X=F.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,X),F.primitiveLength++),T?this.e2=X:this.e1=X}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(a,d){this.distance+=a.dist(d),this.updateScaledDistance()}}fn("LineBucket",X1,{omit:["layers","patternFeatures"]});const _D=new Ti({"line-cap":new mn(Fe.layout_line["line-cap"]),"line-join":new En(Fe.layout_line["line-join"]),"line-miter-limit":new mn(Fe.layout_line["line-miter-limit"]),"line-round-limit":new mn(Fe.layout_line["line-round-limit"]),"line-sort-key":new En(Fe.layout_line["line-sort-key"])});var U3={paint:new Ti({"line-opacity":new En(Fe.paint_line["line-opacity"]),"line-color":new En(Fe.paint_line["line-color"]),"line-translate":new mn(Fe.paint_line["line-translate"]),"line-translate-anchor":new mn(Fe.paint_line["line-translate-anchor"]),"line-width":new En(Fe.paint_line["line-width"]),"line-gap-width":new En(Fe.paint_line["line-gap-width"]),"line-offset":new En(Fe.paint_line["line-offset"]),"line-blur":new En(Fe.paint_line["line-blur"]),"line-dasharray":new Xf(Fe.paint_line["line-dasharray"]),"line-pattern":new xl(Fe.paint_line["line-pattern"]),"line-gradient":new Ya(Fe.paint_line["line-gradient"])}),layout:_D};const j3=new class extends En{possiblyEvaluate(u,a){return a=new Rr(Math.floor(a.zoom),{now:a.now,fadeDuration:a.fadeDuration,zoomHistory:a.zoomHistory,transition:a.transition}),super.possiblyEvaluate(u,a)}evaluate(u,a,d,m){return a=I({},a,{zoom:Math.floor(a.zoom)}),super.evaluate(u,a,d,m)}}(U3.paint.properties["line-width"].specification);function K3(u,a){return a>0?a+2*u:u}j3.useIntegerZoom=!0;const bD=ni([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),wD=ni([{name:"a_projected_pos",components:3,type:"Float32"}],4);ni([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const CD=ni([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);ni([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const H3=ni([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),SD=ni([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function ED(u,a,d){return u.sections.forEach(m=>{m.text=function(x,S,T){const L=S.layout.get("text-transform").evaluate(T,{});return L==="uppercase"?x=x.toLocaleUpperCase():L==="lowercase"&&(x=x.toLocaleLowerCase()),ko.applyArabicShaping&&(x=ko.applyArabicShaping(x)),x}(m.text,a,d)}),u}ni([{name:"triangle",components:3,type:"Uint16"}]),ni([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),ni([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),ni([{type:"Float32",name:"offsetX"}]),ni([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);const ch={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"};var Pi=24,Y1=yr,W3=function(u,a,d,m,x){var S,T,L=8*x-m-1,F=(1<<L)-1,j=F>>1,X=-7,ne=d?x-1:0,ue=d?-1:1,he=u[a+ne];for(ne+=ue,S=he&(1<<-X)-1,he>>=-X,X+=L;X>0;S=256*S+u[a+ne],ne+=ue,X-=8);for(T=S&(1<<-X)-1,S>>=-X,X+=m;X>0;T=256*T+u[a+ne],ne+=ue,X-=8);if(S===0)S=1-j;else{if(S===F)return T?NaN:1/0*(he?-1:1);T+=Math.pow(2,m),S-=j}return(he?-1:1)*T*Math.pow(2,S-m)},G3=function(u,a,d,m,x,S){var T,L,F,j=8*S-x-1,X=(1<<j)-1,ne=X>>1,ue=x===23?Math.pow(2,-24)-Math.pow(2,-77):0,he=m?0:S-1,pe=m?1:-1,Ae=a<0||a===0&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(L=isNaN(a)?1:0,T=X):(T=Math.floor(Math.log(a)/Math.LN2),a*(F=Math.pow(2,-T))<1&&(T--,F*=2),(a+=T+ne>=1?ue/F:ue*Math.pow(2,1-ne))*F>=2&&(T++,F/=2),T+ne>=X?(L=0,T=X):T+ne>=1?(L=(a*F-1)*Math.pow(2,x),T+=ne):(L=a*Math.pow(2,ne-1)*Math.pow(2,x),T=0));x>=8;u[d+he]=255&L,he+=pe,L/=256,x-=8);for(T=T<<x|L,j+=x;j>0;u[d+he]=255&T,he+=pe,T/=256,j-=8);u[d+he-pe]|=128*Ae};function yr(u){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(u)?u:new Uint8Array(u||0),this.pos=0,this.type=0,this.length=this.buf.length}yr.Varint=0,yr.Fixed64=1,yr.Bytes=2,yr.Fixed32=5;var Cl,Q1=4294967296,q3=1/Q1,Z3=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function Is(u){return u.type===yr.Bytes?u.readVarint()+u.pos:u.pos+1}function ed(u,a,d){return d?4294967296*a+(u>>>0):4294967296*(a>>>0)+(u>>>0)}function X3(u,a,d){var m=a<=16383?1:a<=2097151?2:a<=268435455?3:Math.floor(Math.log(a)/(7*Math.LN2));d.realloc(m);for(var x=d.pos-1;x>=u;x--)d.buf[x+m]=d.buf[x]}function kD(u,a){for(var d=0;d<u.length;d++)a.writeVarint(u[d])}function TD(u,a){for(var d=0;d<u.length;d++)a.writeSVarint(u[d])}function PD(u,a){for(var d=0;d<u.length;d++)a.writeFloat(u[d])}function ID(u,a){for(var d=0;d<u.length;d++)a.writeDouble(u[d])}function MD(u,a){for(var d=0;d<u.length;d++)a.writeBoolean(u[d])}function RD(u,a){for(var d=0;d<u.length;d++)a.writeFixed32(u[d])}function AD(u,a){for(var d=0;d<u.length;d++)a.writeSFixed32(u[d])}function OD(u,a){for(var d=0;d<u.length;d++)a.writeFixed64(u[d])}function ND(u,a){for(var d=0;d<u.length;d++)a.writeSFixed64(u[d])}function av(u,a){return(u[a]|u[a+1]<<8|u[a+2]<<16)+16777216*u[a+3]}function td(u,a,d){u[d]=a,u[d+1]=a>>>8,u[d+2]=a>>>16,u[d+3]=a>>>24}function Y3(u,a){return(u[a]|u[a+1]<<8|u[a+2]<<16)+(u[a+3]<<24)}function DD(u,a,d){u===1&&d.readMessage(LD,a)}function LD(u,a,d){if(u===3){const{id:m,bitmap:x,width:S,height:T,left:L,top:F,advance:j}=d.readMessage(zD,{});a.push({id:m,bitmap:new rh({width:S+6,height:T+6},x),metrics:{width:S,height:T,left:L,top:F,advance:j}})}}function zD(u,a,d){u===1?a.id=d.readVarint():u===2?a.bitmap=d.readBytes():u===3?a.width=d.readVarint():u===4?a.height=d.readVarint():u===5?a.left=d.readSVarint():u===6?a.top=d.readSVarint():u===7&&(a.advance=d.readVarint())}function Q3(u){let a=0,d=0;for(const T of u)a+=T.w*T.h,d=Math.max(d,T.w);u.sort((T,L)=>L.h-T.h);const m=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(a/.95)),d),h:1/0}];let x=0,S=0;for(const T of u)for(let L=m.length-1;L>=0;L--){const F=m[L];if(!(T.w>F.w||T.h>F.h)){if(T.x=F.x,T.y=F.y,S=Math.max(S,T.y+T.h),x=Math.max(x,T.x+T.w),T.w===F.w&&T.h===F.h){const j=m.pop();L<m.length&&(m[L]=j)}else T.h===F.h?(F.x+=T.w,F.w-=T.w):T.w===F.w?(F.y+=T.h,F.h-=T.h):(m.push({x:F.x+T.w,y:F.y,w:F.w-T.w,h:T.h}),F.y+=T.h,F.h-=T.h);break}}return{w:x,h:S,fill:a/(x*S)||0}}yr.prototype={destroy:function(){this.buf=null},readFields:function(u,a,d){for(d=d||this.length;this.pos<d;){var m=this.readVarint(),x=m>>3,S=this.pos;this.type=7&m,u(x,a,this),this.pos===S&&this.skip(m)}return a},readMessage:function(u,a){return this.readFields(u,a,this.readVarint()+this.pos)},readFixed32:function(){var u=av(this.buf,this.pos);return this.pos+=4,u},readSFixed32:function(){var u=Y3(this.buf,this.pos);return this.pos+=4,u},readFixed64:function(){var u=av(this.buf,this.pos)+av(this.buf,this.pos+4)*Q1;return this.pos+=8,u},readSFixed64:function(){var u=av(this.buf,this.pos)+Y3(this.buf,this.pos+4)*Q1;return this.pos+=8,u},readFloat:function(){var u=W3(this.buf,this.pos,!0,23,4);return this.pos+=4,u},readDouble:function(){var u=W3(this.buf,this.pos,!0,52,8);return this.pos+=8,u},readVarint:function(u){var a,d,m=this.buf;return a=127&(d=m[this.pos++]),d<128?a:(a|=(127&(d=m[this.pos++]))<<7,d<128?a:(a|=(127&(d=m[this.pos++]))<<14,d<128?a:(a|=(127&(d=m[this.pos++]))<<21,d<128?a:function(x,S,T){var L,F,j=T.buf;if(L=(112&(F=j[T.pos++]))>>4,F<128||(L|=(127&(F=j[T.pos++]))<<3,F<128)||(L|=(127&(F=j[T.pos++]))<<10,F<128)||(L|=(127&(F=j[T.pos++]))<<17,F<128)||(L|=(127&(F=j[T.pos++]))<<24,F<128)||(L|=(1&(F=j[T.pos++]))<<31,F<128))return ed(x,L,S);throw new Error("Expected varint not more than 10 bytes")}(a|=(15&(d=m[this.pos]))<<28,u,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var u=this.readVarint();return u%2==1?(u+1)/-2:u/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var u=this.readVarint()+this.pos,a=this.pos;return this.pos=u,u-a>=12&&Z3?function(d,m,x){return Z3.decode(d.subarray(m,x))}(this.buf,a,u):function(d,m,x){for(var S="",T=m;T<x;){var L,F,j,X=d[T],ne=null,ue=X>239?4:X>223?3:X>191?2:1;if(T+ue>x)break;ue===1?X<128&&(ne=X):ue===2?(192&(L=d[T+1]))==128&&(ne=(31&X)<<6|63&L)<=127&&(ne=null):ue===3?(F=d[T+2],(192&(L=d[T+1]))==128&&(192&F)==128&&((ne=(15&X)<<12|(63&L)<<6|63&F)<=2047||ne>=55296&&ne<=57343)&&(ne=null)):ue===4&&(F=d[T+2],j=d[T+3],(192&(L=d[T+1]))==128&&(192&F)==128&&(192&j)==128&&((ne=(15&X)<<18|(63&L)<<12|(63&F)<<6|63&j)<=65535||ne>=1114112)&&(ne=null)),ne===null?(ne=65533,ue=1):ne>65535&&(ne-=65536,S+=String.fromCharCode(ne>>>10&1023|55296),ne=56320|1023&ne),S+=String.fromCharCode(ne),T+=ue}return S}(this.buf,a,u)},readBytes:function(){var u=this.readVarint()+this.pos,a=this.buf.subarray(this.pos,u);return this.pos=u,a},readPackedVarint:function(u,a){if(this.type!==yr.Bytes)return u.push(this.readVarint(a));var d=Is(this);for(u=u||[];this.pos<d;)u.push(this.readVarint(a));return u},readPackedSVarint:function(u){if(this.type!==yr.Bytes)return u.push(this.readSVarint());var a=Is(this);for(u=u||[];this.pos<a;)u.push(this.readSVarint());return u},readPackedBoolean:function(u){if(this.type!==yr.Bytes)return u.push(this.readBoolean());var a=Is(this);for(u=u||[];this.pos<a;)u.push(this.readBoolean());return u},readPackedFloat:function(u){if(this.type!==yr.Bytes)return u.push(this.readFloat());var a=Is(this);for(u=u||[];this.pos<a;)u.push(this.readFloat());return u},readPackedDouble:function(u){if(this.type!==yr.Bytes)return u.push(this.readDouble());var a=Is(this);for(u=u||[];this.pos<a;)u.push(this.readDouble());return u},readPackedFixed32:function(u){if(this.type!==yr.Bytes)return u.push(this.readFixed32());var a=Is(this);for(u=u||[];this.pos<a;)u.push(this.readFixed32());return u},readPackedSFixed32:function(u){if(this.type!==yr.Bytes)return u.push(this.readSFixed32());var a=Is(this);for(u=u||[];this.pos<a;)u.push(this.readSFixed32());return u},readPackedFixed64:function(u){if(this.type!==yr.Bytes)return u.push(this.readFixed64());var a=Is(this);for(u=u||[];this.pos<a;)u.push(this.readFixed64());return u},readPackedSFixed64:function(u){if(this.type!==yr.Bytes)return u.push(this.readSFixed64());var a=Is(this);for(u=u||[];this.pos<a;)u.push(this.readSFixed64());return u},skip:function(u){var a=7&u;if(a===yr.Varint)for(;this.buf[this.pos++]>127;);else if(a===yr.Bytes)this.pos=this.readVarint()+this.pos;else if(a===yr.Fixed32)this.pos+=4;else{if(a!==yr.Fixed64)throw new Error("Unimplemented type: "+a);this.pos+=8}},writeTag:function(u,a){this.writeVarint(u<<3|a)},realloc:function(u){for(var a=this.length||16;a<this.pos+u;)a*=2;if(a!==this.length){var d=new Uint8Array(a);d.set(this.buf),this.buf=d,this.length=a}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(u){this.realloc(4),td(this.buf,u,this.pos),this.pos+=4},writeSFixed32:function(u){this.realloc(4),td(this.buf,u,this.pos),this.pos+=4},writeFixed64:function(u){this.realloc(8),td(this.buf,-1&u,this.pos),td(this.buf,Math.floor(u*q3),this.pos+4),this.pos+=8},writeSFixed64:function(u){this.realloc(8),td(this.buf,-1&u,this.pos),td(this.buf,Math.floor(u*q3),this.pos+4),this.pos+=8},writeVarint:function(u){(u=+u||0)>268435455||u<0?function(a,d){var m,x;if(a>=0?(m=a%4294967296|0,x=a/4294967296|0):(x=~(-a/4294967296),4294967295^(m=~(-a%4294967296))?m=m+1|0:(m=0,x=x+1|0)),a>=18446744073709552e3||a<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");d.realloc(10),function(S,T,L){L.buf[L.pos++]=127&S|128,S>>>=7,L.buf[L.pos++]=127&S|128,S>>>=7,L.buf[L.pos++]=127&S|128,S>>>=7,L.buf[L.pos++]=127&S|128,L.buf[L.pos]=127&(S>>>=7)}(m,0,d),function(S,T){var L=(7&S)<<4;T.buf[T.pos++]|=L|((S>>>=3)?128:0),S&&(T.buf[T.pos++]=127&S|((S>>>=7)?128:0),S&&(T.buf[T.pos++]=127&S|((S>>>=7)?128:0),S&&(T.buf[T.pos++]=127&S|((S>>>=7)?128:0),S&&(T.buf[T.pos++]=127&S|((S>>>=7)?128:0),S&&(T.buf[T.pos++]=127&S)))))}(x,d)}(u,this):(this.realloc(4),this.buf[this.pos++]=127&u|(u>127?128:0),u<=127||(this.buf[this.pos++]=127&(u>>>=7)|(u>127?128:0),u<=127||(this.buf[this.pos++]=127&(u>>>=7)|(u>127?128:0),u<=127||(this.buf[this.pos++]=u>>>7&127))))},writeSVarint:function(u){this.writeVarint(u<0?2*-u-1:2*u)},writeBoolean:function(u){this.writeVarint(Boolean(u))},writeString:function(u){u=String(u),this.realloc(4*u.length),this.pos++;var a=this.pos;this.pos=function(m,x,S){for(var T,L,F=0;F<x.length;F++){if((T=x.charCodeAt(F))>55295&&T<57344){if(!L){T>56319||F+1===x.length?(m[S++]=239,m[S++]=191,m[S++]=189):L=T;continue}if(T<56320){m[S++]=239,m[S++]=191,m[S++]=189,L=T;continue}T=L-55296<<10|T-56320|65536,L=null}else L&&(m[S++]=239,m[S++]=191,m[S++]=189,L=null);T<128?m[S++]=T:(T<2048?m[S++]=T>>6|192:(T<65536?m[S++]=T>>12|224:(m[S++]=T>>18|240,m[S++]=T>>12&63|128),m[S++]=T>>6&63|128),m[S++]=63&T|128)}return S}(this.buf,u,this.pos);var d=this.pos-a;d>=128&&X3(a,d,this),this.pos=a-1,this.writeVarint(d),this.pos+=d},writeFloat:function(u){this.realloc(4),G3(this.buf,u,this.pos,!0,23,4),this.pos+=4},writeDouble:function(u){this.realloc(8),G3(this.buf,u,this.pos,!0,52,8),this.pos+=8},writeBytes:function(u){var a=u.length;this.writeVarint(a),this.realloc(a);for(var d=0;d<a;d++)this.buf[this.pos++]=u[d]},writeRawMessage:function(u,a){this.pos++;var d=this.pos;u(a,this);var m=this.pos-d;m>=128&&X3(d,m,this),this.pos=d-1,this.writeVarint(m),this.pos+=m},writeMessage:function(u,a,d){this.writeTag(u,yr.Bytes),this.writeRawMessage(a,d)},writePackedVarint:function(u,a){a.length&&this.writeMessage(u,kD,a)},writePackedSVarint:function(u,a){a.length&&this.writeMessage(u,TD,a)},writePackedBoolean:function(u,a){a.length&&this.writeMessage(u,MD,a)},writePackedFloat:function(u,a){a.length&&this.writeMessage(u,PD,a)},writePackedDouble:function(u,a){a.length&&this.writeMessage(u,ID,a)},writePackedFixed32:function(u,a){a.length&&this.writeMessage(u,RD,a)},writePackedSFixed32:function(u,a){a.length&&this.writeMessage(u,AD,a)},writePackedFixed64:function(u,a){a.length&&this.writeMessage(u,OD,a)},writePackedSFixed64:function(u,a){a.length&&this.writeMessage(u,ND,a)},writeBytesField:function(u,a){this.writeTag(u,yr.Bytes),this.writeBytes(a)},writeFixed32Field:function(u,a){this.writeTag(u,yr.Fixed32),this.writeFixed32(a)},writeSFixed32Field:function(u,a){this.writeTag(u,yr.Fixed32),this.writeSFixed32(a)},writeFixed64Field:function(u,a){this.writeTag(u,yr.Fixed64),this.writeFixed64(a)},writeSFixed64Field:function(u,a){this.writeTag(u,yr.Fixed64),this.writeSFixed64(a)},writeVarintField:function(u,a){this.writeTag(u,yr.Varint),this.writeVarint(a)},writeSVarintField:function(u,a){this.writeTag(u,yr.Varint),this.writeSVarint(a)},writeStringField:function(u,a){this.writeTag(u,yr.Bytes),this.writeString(a)},writeFloatField:function(u,a){this.writeTag(u,yr.Fixed32),this.writeFloat(a)},writeDoubleField:function(u,a){this.writeTag(u,yr.Fixed64),this.writeDouble(a)},writeBooleanField:function(u,a){this.writeVarintField(u,Boolean(a))}};class J1{constructor(a,{pixelRatio:d,version:m,stretchX:x,stretchY:S,content:T}){this.paddedRect=a,this.pixelRatio=d,this.stretchX=x,this.stretchY=S,this.content=T,this.version=m}get tl(){return[this.paddedRect.x+1,this.paddedRect.y+1]}get br(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]}}class J3{constructor(a,d){const m={},x={};this.haveRenderCallbacks=[];const S=[];this.addImages(a,m,S),this.addImages(d,x,S);const{w:T,h:L}=Q3(S),F=new $o({width:T||1,height:L||1});for(const j in a){const X=a[j],ne=m[j].paddedRect;$o.copy(X.data,F,{x:0,y:0},{x:ne.x+1,y:ne.y+1},X.data)}for(const j in d){const X=d[j],ne=x[j].paddedRect,ue=ne.x+1,he=ne.y+1,pe=X.data.width,Ae=X.data.height;$o.copy(X.data,F,{x:0,y:0},{x:ue,y:he},X.data),$o.copy(X.data,F,{x:0,y:Ae-1},{x:ue,y:he-1},{width:pe,height:1}),$o.copy(X.data,F,{x:0,y:0},{x:ue,y:he+Ae},{width:pe,height:1}),$o.copy(X.data,F,{x:pe-1,y:0},{x:ue-1,y:he},{width:1,height:Ae}),$o.copy(X.data,F,{x:0,y:0},{x:ue+pe,y:he},{width:1,height:Ae})}this.image=F,this.iconPositions=m,this.patternPositions=x}addImages(a,d,m){for(const x in a){const S=a[x],T={x:0,y:0,w:S.data.width+2,h:S.data.height+2};m.push(T),d[x]=new J1(T,S),S.hasRenderCallback&&this.haveRenderCallbacks.push(x)}}patchUpdatedImages(a,d){a.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const m in a.updatedImages)this.patchUpdatedImage(this.iconPositions[m],a.getImage(m),d),this.patchUpdatedImage(this.patternPositions[m],a.getImage(m),d)}patchUpdatedImage(a,d,m){if(!a||!d||a.version===d.version)return;a.version=d.version;const[x,S]=a.tl;m.update(d.data,void 0,{x,y:S})}}fn("ImagePosition",J1),fn("ImageAtlas",J3),o.WritingMode=void 0,(Cl=o.WritingMode||(o.WritingMode={}))[Cl.none=0]="none",Cl[Cl.horizontal=1]="horizontal",Cl[Cl.vertical=2]="vertical",Cl[Cl.horizontalOnly=3]="horizontalOnly";const sv=-17;class dh{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(a,d){const m=new dh;return m.scale=a||1,m.fontStack=d,m}static forImage(a){const d=new dh;return d.imageName=a,d}}class nd{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(a,d){const m=new nd;for(let x=0;x<a.sections.length;x++){const S=a.sections[x];S.image?m.addImageSection(S):m.addTextSection(S,d)}return m}length(){return this.text.length}getSection(a){return this.sections[this.sectionIndex[a]]}getSectionIndex(a){return this.sectionIndex[a]}getCharCode(a){return this.text.charCodeAt(a)}verticalizePunctuation(){this.text=function(a){let d="";for(let m=0;m<a.length;m++){const x=a.charCodeAt(m+1)||null,S=a.charCodeAt(m-1)||null;d+=x&&Vm(x)&&!ch[a[m+1]]||S&&Vm(S)&&!ch[a[m-1]]||!ch[a[m]]?a[m]:ch[a[m]]}return d}(this.text)}trim(){let a=0;for(let m=0;m<this.text.length&&uv[this.text.charCodeAt(m)];m++)a++;let d=this.text.length;for(let m=this.text.length-1;m>=0&&m>=a&&uv[this.text.charCodeAt(m)];m--)d--;this.text=this.text.substring(a,d),this.sectionIndex=this.sectionIndex.slice(a,d)}substring(a,d){const m=new nd;return m.text=this.text.substring(a,d),m.sectionIndex=this.sectionIndex.slice(a,d),m.sections=this.sections,m}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((a,d)=>Math.max(a,this.sections[d].scale),0)}addTextSection(a,d){this.text+=a.text,this.sections.push(dh.forText(a.scale,a.fontStack||d));const m=this.sections.length-1;for(let x=0;x<a.text.length;++x)this.sectionIndex.push(m)}addImageSection(a){const d=a.image?a.image.name:"";if(d.length===0)return void B("Can't add FormattedSection with an empty image.");const m=this.getNextImageSectionCharCode();m?(this.text+=String.fromCharCode(m),this.sections.push(dh.forImage(d)),this.sectionIndex.push(this.sections.length-1)):B("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function lv(u,a,d,m,x,S,T,L,F,j,X,ne,ue,he,pe,Ae){const Ie=nd.fromFeature(u,x);let Ze;ne===o.WritingMode.vertical&&Ie.verticalizePunctuation();const{processBidirectionalText:st,processStyledBidirectionalText:Ke}=ko;if(st&&Ie.sections.length===1){Ze=[];const St=st(Ie.toString(),ex(Ie,j,S,a,m,he,pe));for(const un of St){const pn=new nd;pn.text=un,pn.sections=Ie.sections;for(let en=0;en<un.length;en++)pn.sectionIndex.push(0);Ze.push(pn)}}else if(Ke){Ze=[];const St=Ke(Ie.text,Ie.sectionIndex,ex(Ie,j,S,a,m,he,pe));for(const un of St){const pn=new nd;pn.text=un[0],pn.sectionIndex=un[1],pn.sections=Ie.sections,Ze.push(pn)}}else Ze=function(St,un){const pn=[],en=St.text;let Zt=0;for(const Ht of un)pn.push(St.substring(Zt,Ht)),Zt=Ht;return Zt<en.length&&pn.push(St.substring(Zt,en.length)),pn}(Ie,ex(Ie,j,S,a,m,he,pe));const rt=[],kt={positionedLines:rt,text:Ie.toString(),top:X[1],bottom:X[1],left:X[0],right:X[0],writingMode:ne,iconsInText:!1,verticalizable:!1};return function(St,un,pn,en,Zt,Ht,tn,Yt,Ft,wn,vn,Un){let kr=0,Or=sv,fi=0,Vo=0;const Ni=Yt==="right"?1:Yt==="left"?0:.5;let ri=0;for(const ii of Zt){ii.trim();const Li=ii.getMaxScale(),Ki=(Li-1)*Pi,to={positionedGlyphs:[],lineOffset:0};St.positionedLines[ri]=to;const ho=to.positionedGlyphs;let po=0;if(!ii.length()){Or+=Ht,++ri;continue}for(let _i=0;_i<ii.length();_i++){const Wn=ii.getSection(_i),Io=ii.getSectionIndex(_i),zi=ii.getCharCode(_i);let Hi=0,la=null,Aa=null,Oa=null,Rs=Pi;const ua=!(Ft===o.WritingMode.horizontal||!vn&&!Kf(zi)||vn&&(uv[zi]||(xi=zi,Jt.Arabic(xi)||Jt["Arabic Supplement"](xi)||Jt["Arabic Extended-A"](xi)||Jt["Arabic Presentation Forms-A"](xi)||Jt["Arabic Presentation Forms-B"](xi))));if(Wn.imageName){const Uo=en[Wn.imageName];if(!Uo)continue;Oa=Wn.imageName,St.iconsInText=St.iconsInText||!0,Aa=Uo.paddedRect;const mo=Uo.displaySize;Wn.scale=Wn.scale*Pi/Un,la={width:mo[0],height:mo[1],left:1,top:-3,advance:ua?mo[1]:mo[0]},Hi=Ki+(Pi-mo[1]*Wn.scale),Rs=la.advance;const As=ua?mo[0]*Wn.scale-Pi*Li:mo[1]*Wn.scale-Pi*Li;As>0&&As>po&&(po=As)}else{const Uo=pn[Wn.fontStack],mo=Uo&&Uo[zi];if(mo&&mo.rect)Aa=mo.rect,la=mo.metrics;else{const As=un[Wn.fontStack],ph=As&&As[zi];if(!ph)continue;la=ph.metrics}Hi=(Li-Wn.scale)*Pi}ua?(St.verticalizable=!0,ho.push({glyph:zi,imageName:Oa,x:kr,y:Or+Hi,vertical:ua,scale:Wn.scale,fontStack:Wn.fontStack,sectionIndex:Io,metrics:la,rect:Aa}),kr+=Rs*Wn.scale+wn):(ho.push({glyph:zi,imageName:Oa,x:kr,y:Or+Hi,vertical:ua,scale:Wn.scale,fontStack:Wn.fontStack,sectionIndex:Io,metrics:la,rect:Aa}),kr+=la.advance*Wn.scale+wn)}ho.length!==0&&(fi=Math.max(kr-wn,fi),BD(ho,0,ho.length-1,Ni,po)),kr=0;const zr=Ht*Li+po;to.lineOffset=Math.max(po,Ki),Or+=zr,Vo=Math.max(zr,Vo),++ri}var xi;const Di=Or-sv,{horizontalAlign:ji,verticalAlign:fo}=tx(tn);(function(ii,Li,Ki,to,ho,po,zr,_i,Wn){const Io=(Li-Ki)*ho;let zi=0;zi=po!==zr?-_i*to-sv:(-to*Wn+.5)*zr;for(const Hi of ii)for(const la of Hi.positionedGlyphs)la.x+=Io,la.y+=zi})(St.positionedLines,Ni,ji,fo,fi,Vo,Ht,Di,Zt.length),St.top+=-fo*Di,St.bottom=St.top+Di,St.left+=-ji*fi,St.right=St.left+fi}(kt,a,d,m,Ze,T,L,F,ne,j,ue,Ae),!function(St){for(const un of St)if(un.positionedGlyphs.length!==0)return!1;return!0}(rt)&&kt}const uv={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},FD={10:!0,32:!0,38:!0,40:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0};function eS(u,a,d,m,x,S){if(a.imageName){const T=m[a.imageName];return T?T.displaySize[0]*a.scale*Pi/S+x:0}{const T=d[a.fontStack],L=T&&T[u];return L?L.metrics.advance*a.scale+x:0}}function tS(u,a,d,m){const x=Math.pow(u-a,2);return m?u<a?x/2:2*x:x+Math.abs(d)*d}function $D(u,a,d){let m=0;return u===10&&(m-=1e4),d&&(m+=150),u!==40&&u!==65288||(m+=50),a!==41&&a!==65289||(m+=50),m}function nS(u,a,d,m,x,S){let T=null,L=tS(a,d,x,S);for(const F of m){const j=tS(a-F.x,d,x,S)+F.badness;j<=L&&(T=F,L=j)}return{index:u,x:a,priorBreak:T,badness:L}}function rS(u){return u?rS(u.priorBreak).concat(u.index):[]}function ex(u,a,d,m,x,S,T){if(S!=="point")return[];if(!u)return[];const L=[],F=function(ue,he,pe,Ae,Ie,Ze){let st=0;for(let Ke=0;Ke<ue.length();Ke++){const rt=ue.getSection(Ke);st+=eS(ue.getCharCode(Ke),rt,Ae,Ie,he,Ze)}return st/Math.max(1,Math.ceil(st/pe))}(u,a,d,m,x,T),j=u.text.indexOf("\u200B")>=0;let X=0;for(let ue=0;ue<u.length();ue++){const he=u.getSection(ue),pe=u.getCharCode(ue);if(uv[pe]||(X+=eS(pe,he,m,x,a,T)),ue<u.length()-1){const Ae=!((ne=pe)<11904||!(Jt["Bopomofo Extended"](ne)||Jt.Bopomofo(ne)||Jt["CJK Compatibility Forms"](ne)||Jt["CJK Compatibility Ideographs"](ne)||Jt["CJK Compatibility"](ne)||Jt["CJK Radicals Supplement"](ne)||Jt["CJK Strokes"](ne)||Jt["CJK Symbols and Punctuation"](ne)||Jt["CJK Unified Ideographs Extension A"](ne)||Jt["CJK Unified Ideographs"](ne)||Jt["Enclosed CJK Letters and Months"](ne)||Jt["Halfwidth and Fullwidth Forms"](ne)||Jt.Hiragana(ne)||Jt["Ideographic Description Characters"](ne)||Jt["Kangxi Radicals"](ne)||Jt["Katakana Phonetic Extensions"](ne)||Jt.Katakana(ne)||Jt["Vertical Forms"](ne)||Jt["Yi Radicals"](ne)||Jt["Yi Syllables"](ne)));(FD[pe]||Ae||he.imageName)&&L.push(nS(ue+1,X,F,L,$D(pe,u.getCharCode(ue+1),Ae&&j),!1))}}var ne;return rS(nS(u.length(),X,F,L,0,!0))}function tx(u){let a=.5,d=.5;switch(u){case"right":case"top-right":case"bottom-right":a=1;break;case"left":case"top-left":case"bottom-left":a=0}switch(u){case"bottom":case"bottom-right":case"bottom-left":d=1;break;case"top":case"top-right":case"top-left":d=0}return{horizontalAlign:a,verticalAlign:d}}function BD(u,a,d,m,x){if(!m&&!x)return;const S=u[d],T=(u[d].x+S.metrics.advance*S.scale)*m;for(let L=a;L<=d;L++)u[L].x-=T,u[L].y+=x}function VD(u,a,d){const{horizontalAlign:m,verticalAlign:x}=tx(d),S=a[0]-u.displaySize[0]*m,T=a[1]-u.displaySize[1]*x;return{image:u,top:T,bottom:T+u.displaySize[1],left:S,right:S+u.displaySize[0]}}function iS(u,a,d,m,x,S){const T=u.image;let L;if(T.content){const Ie=T.content,Ze=T.pixelRatio||1;L=[Ie[0]/Ze,Ie[1]/Ze,T.displaySize[0]-Ie[2]/Ze,T.displaySize[1]-Ie[3]/Ze]}const F=a.left*S,j=a.right*S;let X,ne,ue,he;d==="width"||d==="both"?(he=x[0]+F-m[3],ne=x[0]+j+m[1]):(he=x[0]+(F+j-T.displaySize[0])/2,ne=he+T.displaySize[0]);const pe=a.top*S,Ae=a.bottom*S;return d==="height"||d==="both"?(X=x[1]+pe-m[0],ue=x[1]+Ae+m[2]):(X=x[1]+(pe+Ae-T.displaySize[1])/2,ue=X+T.displaySize[1]),{image:T,top:X,right:ne,bottom:ue,left:he,collisionPadding:L}}const Ms=128;function oS(u,a){const{expression:d}=a;if(d.kind==="constant")return{kind:"constant",layoutSize:d.evaluate(new Rr(u+1))};if(d.kind==="source")return{kind:"source"};{const{zoomStops:m,interpolationType:x}=d;let S=0;for(;S<m.length&&m[S]<=u;)S++;S=Math.max(0,S-1);let T=S;for(;T<m.length&&m[T]<u+1;)T++;T=Math.min(m.length-1,T);const L=m[S],F=m[T];return d.kind==="composite"?{kind:"composite",minZoom:L,maxZoom:F,interpolationType:x}:{kind:"camera",minZoom:L,maxZoom:F,minSize:d.evaluate(new Rr(L)),maxSize:d.evaluate(new Rr(F)),interpolationType:x}}}class Sl extends re{constructor(a,d,m,x){super(a,d),this.angle=m,x!==void 0&&(this.segment=x)}clone(){return new Sl(this.x,this.y,this.angle,this.segment)}}function aS(u,a,d,m,x){if(a.segment===void 0)return!0;let S=a,T=a.segment+1,L=0;for(;L>-d/2;){if(T--,T<0)return!1;L-=u[T].dist(S),S=u[T]}L+=u[T].dist(u[T+1]),T++;const F=[];let j=0;for(;L<d/2;){const X=u[T],ne=u[T+1];if(!ne)return!1;let ue=u[T-1].angleTo(X)-X.angleTo(ne);for(ue=Math.abs((ue+3*Math.PI)%(2*Math.PI)-Math.PI),F.push({distance:L,angleDelta:ue}),j+=ue;L-F[0].distance>m;)j-=F.shift().angleDelta;if(j>x)return!1;T++,L+=X.dist(ne)}return!0}function sS(u){let a=0;for(let d=0;d<u.length-1;d++)a+=u[d].dist(u[d+1]);return a}function lS(u,a,d){return u?.6*a*d:0}function uS(u,a){return Math.max(u?u.right-u.left:0,a?a.right-a.left:0)}function UD(u,a,d,m,x,S){const T=lS(d,x,S),L=uS(d,m)*S;let F=0;const j=sS(u)/2;for(let X=0;X<u.length-1;X++){const ne=u[X],ue=u[X+1],he=ne.dist(ue);if(F+he>j){const pe=(j-F)/he,Ae=gr(ne.x,ue.x,pe),Ie=gr(ne.y,ue.y,pe),Ze=new Sl(Ae,Ie,ue.angleTo(ne),X);return Ze._round(),!T||aS(u,Ze,L,T,a)?Ze:void 0}F+=he}}function jD(u,a,d,m,x,S,T,L,F){const j=lS(m,S,T),X=uS(m,x),ne=X*T,ue=u[0].x===0||u[0].x===F||u[0].y===0||u[0].y===F;return a-ne<a/4&&(a=ne+a/4),cS(u,ue?a/2*L%a:(X/2+2*S)*T*L%a,a,j,d,ne,ue,!1,F)}function cS(u,a,d,m,x,S,T,L,F){const j=S/2,X=sS(u);let ne=0,ue=a-d,he=[];for(let pe=0;pe<u.length-1;pe++){const Ae=u[pe],Ie=u[pe+1],Ze=Ae.dist(Ie),st=Ie.angleTo(Ae);for(;ue+d<ne+Ze;){ue+=d;const Ke=(ue-ne)/Ze,rt=gr(Ae.x,Ie.x,Ke),kt=gr(Ae.y,Ie.y,Ke);if(rt>=0&&rt<F&&kt>=0&&kt<F&&ue-j>=0&&ue+j<=X){const St=new Sl(rt,kt,st,pe);St._round(),m&&!aS(u,St,S,m,x)||he.push(St)}}ne+=Ze}return L||he.length||T||(he=cS(u,ne/2,d,m,x,S,T,!0,F)),he}function dS(u,a,d,m,x){const S=[];for(let T=0;T<u.length;T++){const L=u[T];let F;for(let j=0;j<L.length-1;j++){let X=L[j],ne=L[j+1];X.x<a&&ne.x<a||(X.x<a?X=new re(a,X.y+(a-X.x)/(ne.x-X.x)*(ne.y-X.y))._round():ne.x<a&&(ne=new re(a,X.y+(a-X.x)/(ne.x-X.x)*(ne.y-X.y))._round()),X.y<d&&ne.y<d||(X.y<d?X=new re(X.x+(d-X.y)/(ne.y-X.y)*(ne.x-X.x),d)._round():ne.y<d&&(ne=new re(X.x+(d-X.y)/(ne.y-X.y)*(ne.x-X.x),d)._round()),X.x>=m&&ne.x>=m||(X.x>=m?X=new re(m,X.y+(m-X.x)/(ne.x-X.x)*(ne.y-X.y))._round():ne.x>=m&&(ne=new re(m,X.y+(m-X.x)/(ne.x-X.x)*(ne.y-X.y))._round()),X.y>=x&&ne.y>=x||(X.y>=x?X=new re(X.x+(x-X.y)/(ne.y-X.y)*(ne.x-X.x),x)._round():ne.y>=x&&(ne=new re(X.x+(x-X.y)/(ne.y-X.y)*(ne.x-X.x),x)._round()),F&&X.equals(F[F.length-1])||(F=[X],S.push(F)),F.push(ne)))))}}return S}function fS(u,a,d,m){const x=[],S=u.image,T=S.pixelRatio,L=S.paddedRect.w-2,F=S.paddedRect.h-2,j=u.right-u.left,X=u.bottom-u.top,ne=S.stretchX||[[0,L]],ue=S.stretchY||[[0,F]],he=(Ht,tn)=>Ht+tn[1]-tn[0],pe=ne.reduce(he,0),Ae=ue.reduce(he,0),Ie=L-pe,Ze=F-Ae;let st=0,Ke=pe,rt=0,kt=Ae,St=0,un=Ie,pn=0,en=Ze;if(S.content&&m){const Ht=S.content;st=cv(ne,0,Ht[0]),rt=cv(ue,0,Ht[1]),Ke=cv(ne,Ht[0],Ht[2]),kt=cv(ue,Ht[1],Ht[3]),St=Ht[0]-st,pn=Ht[1]-rt,un=Ht[2]-Ht[0]-Ke,en=Ht[3]-Ht[1]-kt}const Zt=(Ht,tn,Yt,Ft)=>{const wn=dv(Ht.stretch-st,Ke,j,u.left),vn=fv(Ht.fixed-St,un,Ht.stretch,pe),Un=dv(tn.stretch-rt,kt,X,u.top),kr=fv(tn.fixed-pn,en,tn.stretch,Ae),Or=dv(Yt.stretch-st,Ke,j,u.left),fi=fv(Yt.fixed-St,un,Yt.stretch,pe),Vo=dv(Ft.stretch-rt,kt,X,u.top),Ni=fv(Ft.fixed-pn,en,Ft.stretch,Ae),ri=new re(wn,Un),xi=new re(Or,Un),Di=new re(Or,Vo),ji=new re(wn,Vo),fo=new re(vn/T,kr/T),ii=new re(fi/T,Ni/T),Li=a*Math.PI/180;if(Li){const ho=Math.sin(Li),po=Math.cos(Li),zr=[po,-ho,ho,po];ri._matMult(zr),xi._matMult(zr),ji._matMult(zr),Di._matMult(zr)}const Ki=Ht.stretch+Ht.fixed,to=tn.stretch+tn.fixed;return{tl:ri,tr:xi,bl:ji,br:Di,tex:{x:S.paddedRect.x+1+Ki,y:S.paddedRect.y+1+to,w:Yt.stretch+Yt.fixed-Ki,h:Ft.stretch+Ft.fixed-to},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:fo,pixelOffsetBR:ii,minFontScaleX:un/T/j,minFontScaleY:en/T/X,isSDF:d}};if(m&&(S.stretchX||S.stretchY)){const Ht=hS(ne,Ie,pe),tn=hS(ue,Ze,Ae);for(let Yt=0;Yt<Ht.length-1;Yt++){const Ft=Ht[Yt],wn=Ht[Yt+1];for(let vn=0;vn<tn.length-1;vn++)x.push(Zt(Ft,tn[vn],wn,tn[vn+1]))}}else x.push(Zt({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:L+1},{fixed:0,stretch:F+1}));return x}function cv(u,a,d){let m=0;for(const x of u)m+=Math.max(a,Math.min(d,x[1]))-Math.max(a,Math.min(d,x[0]));return m}function hS(u,a,d){const m=[{fixed:-1,stretch:0}];for(const[x,S]of u){const T=m[m.length-1];m.push({fixed:x-T.stretch,stretch:T.stretch}),m.push({fixed:x-T.stretch,stretch:T.stretch+(S-x)})}return m.push({fixed:a+1,stretch:d}),m}function dv(u,a,d,m){return u/a*d+m}function fv(u,a,d,m){return u-a*d/m}fn("Anchor",Sl);class hv{constructor(a,d,m,x,S,T,L,F,j,X){if(this.boxStartIndex=a.length,j){let ne=T.top,ue=T.bottom;const he=T.collisionPadding;he&&(ne-=he[1],ue+=he[3]);let pe=ue-ne;pe>0&&(pe=Math.max(10,pe),this.circleDiameter=pe)}else{let ne=T.top*L-F[0],ue=T.bottom*L+F[2],he=T.left*L-F[3],pe=T.right*L+F[1];const Ae=T.collisionPadding;if(Ae&&(he-=Ae[0]*L,ne-=Ae[1]*L,pe+=Ae[2]*L,ue+=Ae[3]*L),X){const Ie=new re(he,ne),Ze=new re(pe,ne),st=new re(he,ue),Ke=new re(pe,ue),rt=X*Math.PI/180;Ie._rotate(rt),Ze._rotate(rt),st._rotate(rt),Ke._rotate(rt),he=Math.min(Ie.x,Ze.x,st.x,Ke.x),pe=Math.max(Ie.x,Ze.x,st.x,Ke.x),ne=Math.min(Ie.y,Ze.y,st.y,Ke.y),ue=Math.max(Ie.y,Ze.y,st.y,Ke.y)}a.emplaceBack(d.x,d.y,he,ne,pe,ue,m,x,S)}this.boxEndIndex=a.length}}class KD{constructor(a=[],d=HD){if(this.data=a,this.length=this.data.length,this.compare=d,this.length>0)for(let m=(this.length>>1)-1;m>=0;m--)this._down(m)}push(a){this.data.push(a),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const a=this.data[0],d=this.data.pop();return this.length--,this.length>0&&(this.data[0]=d,this._down(0)),a}peek(){return this.data[0]}_up(a){const{data:d,compare:m}=this,x=d[a];for(;a>0;){const S=a-1>>1,T=d[S];if(m(x,T)>=0)break;d[a]=T,a=S}d[a]=x}_down(a){const{data:d,compare:m}=this,x=this.length>>1,S=d[a];for(;a<x;){let T=1+(a<<1),L=d[T];const F=T+1;if(F<this.length&&m(d[F],L)<0&&(T=F,L=d[F]),m(L,S)>=0)break;d[a]=L,a=T}d[a]=S}}function HD(u,a){return u<a?-1:u>a?1:0}function WD(u,a=1,d=!1){let m=1/0,x=1/0,S=-1/0,T=-1/0;const L=u[0];for(let he=0;he<L.length;he++){const pe=L[he];(!he||pe.x<m)&&(m=pe.x),(!he||pe.y<x)&&(x=pe.y),(!he||pe.x>S)&&(S=pe.x),(!he||pe.y>T)&&(T=pe.y)}const F=Math.min(S-m,T-x);let j=F/2;const X=new KD([],GD);if(F===0)return new re(m,x);for(let he=m;he<S;he+=F)for(let pe=x;pe<T;pe+=F)X.push(new rd(he+j,pe+j,j,u));let ne=function(he){let pe=0,Ae=0,Ie=0;const Ze=he[0];for(let st=0,Ke=Ze.length,rt=Ke-1;st<Ke;rt=st++){const kt=Ze[st],St=Ze[rt],un=kt.x*St.y-St.x*kt.y;Ae+=(kt.x+St.x)*un,Ie+=(kt.y+St.y)*un,pe+=3*un}return new rd(Ae/pe,Ie/pe,0,he)}(u),ue=X.length;for(;X.length;){const he=X.pop();(he.d>ne.d||!ne.d)&&(ne=he,d&&console.log("found best %d after %d probes",Math.round(1e4*he.d)/1e4,ue)),he.max-ne.d<=a||(j=he.h/2,X.push(new rd(he.p.x-j,he.p.y-j,j,u)),X.push(new rd(he.p.x+j,he.p.y-j,j,u)),X.push(new rd(he.p.x-j,he.p.y+j,j,u)),X.push(new rd(he.p.x+j,he.p.y+j,j,u)),ue+=4)}return d&&(console.log(`num probes: ${ue}`),console.log(`best distance: ${ne.d}`)),ne.p}function GD(u,a){return a.max-u.max}function rd(u,a,d,m){this.p=new re(u,a),this.h=d,this.d=function(x,S){let T=!1,L=1/0;for(let F=0;F<S.length;F++){const j=S[F];for(let X=0,ne=j.length,ue=ne-1;X<ne;ue=X++){const he=j[X],pe=j[ue];he.y>x.y!=pe.y>x.y&&x.x<(pe.x-he.x)*(x.y-he.y)/(pe.y-he.y)+he.x&&(T=!T),L=Math.min(L,b3(x,he,pe))}}return(T?1:-1)*Math.sqrt(L)}(this.p,m),this.max=this.d+this.h*Math.SQRT2}const nx=Number.POSITIVE_INFINITY;function pS(u,a){return a[1]!==nx?function(d,m,x){let S=0,T=0;switch(m=Math.abs(m),x=Math.abs(x),d){case"top-right":case"top-left":case"top":T=x-7;break;case"bottom-right":case"bottom-left":case"bottom":T=7-x}switch(d){case"top-right":case"bottom-right":case"right":S=-m;break;case"top-left":case"bottom-left":case"left":S=m}return[S,T]}(u,a[0],a[1]):function(d,m){let x=0,S=0;m<0&&(m=0);const T=m/Math.sqrt(2);switch(d){case"top-right":case"top-left":S=T-7;break;case"bottom-right":case"bottom-left":S=7-T;break;case"bottom":S=7-m;break;case"top":S=m-7}switch(d){case"top-right":case"bottom-right":x=-T;break;case"top-left":case"bottom-left":x=T;break;case"left":x=m;break;case"right":x=-m}return[x,S]}(u,a[0])}function rx(u){switch(u){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function qD(u,a,d,m,x,S,T,L,F,j,X){let ne=S.textMaxSize.evaluate(a,{});ne===void 0&&(ne=T);const ue=u.layers[0].layout,he=ue.get("icon-offset").evaluate(a,{},X),pe=vS(d.horizontal),Ae=T/24,Ie=u.tilePixelRatio*Ae,Ze=u.tilePixelRatio*ne/24,st=u.tilePixelRatio*L,Ke=u.tilePixelRatio*ue.get("symbol-spacing"),rt=ue.get("text-padding")*u.tilePixelRatio,kt=function(Ft,wn,vn,Un=1){const kr=Ft.get("icon-padding").evaluate(wn,{},vn),Or=kr&&kr.values;return[Or[0]*Un,Or[1]*Un,Or[2]*Un,Or[3]*Un]}(ue,a,X,u.tilePixelRatio),St=ue.get("text-max-angle")/180*Math.PI,un=ue.get("text-rotation-alignment")!=="viewport"&&ue.get("symbol-placement")!=="point",pn=ue.get("icon-rotation-alignment")==="map"&&ue.get("symbol-placement")!=="point",en=ue.get("symbol-placement"),Zt=Ke/2,Ht=ue.get("icon-text-fit");let tn;m&&Ht!=="none"&&(u.allowVerticalPlacement&&d.vertical&&(tn=iS(m,d.vertical,Ht,ue.get("icon-text-fit-padding"),he,Ae)),pe&&(m=iS(m,pe,Ht,ue.get("icon-text-fit-padding"),he,Ae)));const Yt=(Ft,wn)=>{wn.x<0||wn.x>=di||wn.y<0||wn.y>=di||function(vn,Un,kr,Or,fi,Vo,Ni,ri,xi,Di,ji,fo,ii,Li,Ki,to,ho,po,zr,_i,Wn,Io,zi,Hi,la){const Aa=vn.addToLineVertexArray(Un,kr);let Oa,Rs,ua,Uo,mo=0,As=0,ph=0,AS=0,hx=-1,px=-1;const Os={};let OS=yi.exports(""),mx=0,vx=0;if(ri._unevaluatedLayout.getValue("text-radial-offset")===void 0?[mx,vx]=ri.layout.get("text-offset").evaluate(Wn,{},Hi).map(vo=>vo*Pi):(mx=ri.layout.get("text-radial-offset").evaluate(Wn,{},Hi)*Pi,vx=nx),vn.allowVerticalPlacement&&Or.vertical){const vo=ri.layout.get("text-rotate").evaluate(Wn,{},Hi)+90;ua=new hv(xi,Un,Di,ji,fo,Or.vertical,ii,Li,Ki,vo),Ni&&(Uo=new hv(xi,Un,Di,ji,fo,Ni,ho,po,Ki,vo))}if(fi){const vo=ri.layout.get("icon-rotate").evaluate(Wn,{}),ns=ri.layout.get("icon-text-fit")!=="none",mh=fS(fi,vo,zi,ns),vh=Ni?fS(Ni,vo,zi,ns):void 0;Rs=new hv(xi,Un,Di,ji,fo,fi,ho,po,!1,vo),mo=4*mh.length;const LS=vn.iconSizeData;let Ku=null;LS.kind==="source"?(Ku=[Ms*ri.layout.get("icon-size").evaluate(Wn,{})],Ku[0]>El&&B(`${vn.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):LS.kind==="composite"&&(Ku=[Ms*Io.compositeIconSizes[0].evaluate(Wn,{},Hi),Ms*Io.compositeIconSizes[1].evaluate(Wn,{},Hi)],(Ku[0]>El||Ku[1]>El)&&B(`${vn.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),vn.addSymbols(vn.icon,mh,Ku,_i,zr,Wn,o.WritingMode.none,Un,Aa.lineStartIndex,Aa.lineLength,-1,Hi),hx=vn.icon.placedSymbolArray.length-1,vh&&(As=4*vh.length,vn.addSymbols(vn.icon,vh,Ku,_i,zr,Wn,o.WritingMode.vertical,Un,Aa.lineStartIndex,Aa.lineLength,-1,Hi),px=vn.icon.placedSymbolArray.length-1)}const NS=Object.keys(Or.horizontal);for(const vo of NS){const ns=Or.horizontal[vo];if(!Oa){OS=yi.exports(ns.text);const vh=ri.layout.get("text-rotate").evaluate(Wn,{},Hi);Oa=new hv(xi,Un,Di,ji,fo,ns,ii,Li,Ki,vh)}const mh=ns.positionedLines.length===1;if(ph+=mS(vn,Un,ns,Vo,ri,Ki,Wn,to,Aa,Or.vertical?o.WritingMode.horizontal:o.WritingMode.horizontalOnly,mh?NS:[vo],Os,hx,Io,Hi),mh)break}Or.vertical&&(AS+=mS(vn,Un,Or.vertical,Vo,ri,Ki,Wn,to,Aa,o.WritingMode.vertical,["vertical"],Os,px,Io,Hi));const sL=Oa?Oa.boxStartIndex:vn.collisionBoxArray.length,lL=Oa?Oa.boxEndIndex:vn.collisionBoxArray.length,uL=ua?ua.boxStartIndex:vn.collisionBoxArray.length,cL=ua?ua.boxEndIndex:vn.collisionBoxArray.length,dL=Rs?Rs.boxStartIndex:vn.collisionBoxArray.length,fL=Rs?Rs.boxEndIndex:vn.collisionBoxArray.length,hL=Uo?Uo.boxStartIndex:vn.collisionBoxArray.length,pL=Uo?Uo.boxEndIndex:vn.collisionBoxArray.length;let Na=-1;const yv=(vo,ns)=>vo&&vo.circleDiameter?Math.max(vo.circleDiameter,ns):ns;Na=yv(Oa,Na),Na=yv(ua,Na),Na=yv(Rs,Na),Na=yv(Uo,Na);const DS=Na>-1?1:0;DS&&(Na*=la/Pi),vn.glyphOffsetArray.length>=id.MAX_GLYPHS&&B("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Wn.sortKey!==void 0&&vn.addToSortKeyRanges(vn.symbolInstances.length,Wn.sortKey),vn.symbolInstances.emplaceBack(Un.x,Un.y,Os.right>=0?Os.right:-1,Os.center>=0?Os.center:-1,Os.left>=0?Os.left:-1,Os.vertical||-1,hx,px,OS,sL,lL,uL,cL,dL,fL,hL,pL,Di,ph,AS,mo,As,DS,0,ii,mx,vx,Na)}(u,wn,Ft,d,m,x,tn,u.layers[0],u.collisionBoxArray,a.index,a.sourceLayerIndex,u.index,Ie,[rt,rt,rt,rt],un,F,st,kt,pn,he,a,S,j,X,T)};if(en==="line")for(const Ft of dS(a.geometry,0,0,di,di)){const wn=jD(Ft,Ke,St,d.vertical||pe,m,24,Ze,u.overscaling,di);for(const vn of wn){const Un=pe;Un&&ZD(u,Un.text,Zt,vn)||Yt(Ft,vn)}}else if(en==="line-center"){for(const Ft of a.geometry)if(Ft.length>1){const wn=UD(Ft,St,d.vertical||pe,m,24,Ze);wn&&Yt(Ft,wn)}}else if(a.type==="Polygon")for(const Ft of K1(a.geometry,0)){const wn=WD(Ft,16);Yt(Ft[0],new Sl(wn.x,wn.y,0))}else if(a.type==="LineString")for(const Ft of a.geometry)Yt(Ft,new Sl(Ft[0].x,Ft[0].y,0));else if(a.type==="Point")for(const Ft of a.geometry)for(const wn of Ft)Yt([wn],new Sl(wn.x,wn.y,0))}const El=32640;function mS(u,a,d,m,x,S,T,L,F,j,X,ne,ue,he,pe){const Ae=function(st,Ke,rt,kt,St,un,pn,en){const Zt=kt.layout.get("text-rotate").evaluate(un,{})*Math.PI/180,Ht=[];for(const tn of Ke.positionedLines)for(const Yt of tn.positionedGlyphs){if(!Yt.rect)continue;const Ft=Yt.rect||{};let wn=4,vn=!0,Un=1,kr=0;const Or=(St||en)&&Yt.vertical,fi=Yt.metrics.advance*Yt.scale/2;if(en&&Ke.verticalizable){const zr=(Yt.scale-1)*Pi,_i=(Pi-Yt.metrics.width*Yt.scale)/2;kr=tn.lineOffset/2-(Yt.imageName?-_i:zr)}if(Yt.imageName){const zr=pn[Yt.imageName];vn=zr.sdf,Un=zr.pixelRatio,wn=1/Un}const Vo=St?[Yt.x+fi,Yt.y]:[0,0];let Ni=St?[0,0]:[Yt.x+fi+rt[0],Yt.y+rt[1]-kr],ri=[0,0];Or&&(ri=Ni,Ni=[0,0]);const xi=(Yt.metrics.left-wn)*Yt.scale-fi+Ni[0],Di=(-Yt.metrics.top-wn)*Yt.scale+Ni[1],ji=xi+Ft.w*Yt.scale/Un,fo=Di+Ft.h*Yt.scale/Un,ii=new re(xi,Di),Li=new re(ji,Di),Ki=new re(xi,fo),to=new re(ji,fo);if(Or){const zr=new re(-fi,fi-sv),_i=-Math.PI/2,Wn=12-fi,Io=new re(22-Wn,-(Yt.imageName?Wn:0)),zi=new re(...ri);ii._rotateAround(_i,zr)._add(Io)._add(zi),Li._rotateAround(_i,zr)._add(Io)._add(zi),Ki._rotateAround(_i,zr)._add(Io)._add(zi),to._rotateAround(_i,zr)._add(Io)._add(zi)}if(Zt){const zr=Math.sin(Zt),_i=Math.cos(Zt),Wn=[_i,-zr,zr,_i];ii._matMult(Wn),Li._matMult(Wn),Ki._matMult(Wn),to._matMult(Wn)}const ho=new re(0,0),po=new re(0,0);Ht.push({tl:ii,tr:Li,bl:Ki,br:to,tex:Ft,writingMode:Ke.writingMode,glyphOffset:Vo,sectionIndex:Yt.sectionIndex,isSDF:vn,pixelOffsetTL:ho,pixelOffsetBR:po,minFontScaleX:0,minFontScaleY:0})}return Ht}(0,d,L,x,S,T,m,u.allowVerticalPlacement),Ie=u.textSizeData;let Ze=null;Ie.kind==="source"?(Ze=[Ms*x.layout.get("text-size").evaluate(T,{})],Ze[0]>El&&B(`${u.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):Ie.kind==="composite"&&(Ze=[Ms*he.compositeTextSizes[0].evaluate(T,{},pe),Ms*he.compositeTextSizes[1].evaluate(T,{},pe)],(Ze[0]>El||Ze[1]>El)&&B(`${u.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),u.addSymbols(u.text,Ae,Ze,L,S,T,j,a,F.lineStartIndex,F.lineLength,ue,pe);for(const st of X)ne[st]=u.text.placedSymbolArray.length-1;return 4*Ae.length}function vS(u){for(const a in u)return u[a];return null}function ZD(u,a,d,m){const x=u.compareText;if(a in x){const S=x[a];for(let T=S.length-1;T>=0;T--)if(m.dist(S[T])<d)return!0}else x[a]=[];return x[a].push(m),!1}const XD=wl.VectorTileFeature.types,YD=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function pv(u,a,d,m,x,S,T,L,F,j,X,ne,ue){const he=L?Math.min(El,Math.round(L[0])):0,pe=L?Math.min(El,Math.round(L[1])):0;u.emplaceBack(a,d,Math.round(32*m),Math.round(32*x),S,T,(he<<1)+(F?1:0),pe,16*j,16*X,256*ne,256*ue)}function ix(u,a,d){u.emplaceBack(a.x,a.y,d),u.emplaceBack(a.x,a.y,d),u.emplaceBack(a.x,a.y,d),u.emplaceBack(a.x,a.y,d)}function QD(u){for(const a of u.sections)if(jm(a.text))return!0;return!1}class ox{constructor(a){this.layoutVertexArray=new aa,this.indexArray=new Qi,this.programConfigurations=a,this.segments=new Hn,this.dynamicLayoutVertexArray=new Fo,this.opacityVertexArray=new sa,this.placedSymbolArray=new Dt}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(a,d,m,x){this.isEmpty()||(m&&(this.layoutVertexBuffer=a.createVertexBuffer(this.layoutVertexArray,bD.members),this.indexBuffer=a.createIndexBuffer(this.indexArray,d),this.dynamicLayoutVertexBuffer=a.createVertexBuffer(this.dynamicLayoutVertexArray,wD.members,!0),this.opacityVertexBuffer=a.createVertexBuffer(this.opacityVertexArray,YD,!0),this.opacityVertexBuffer.itemSize=1),(m||x)&&this.programConfigurations.upload(a))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}fn("SymbolBuffers",ox);class ax{constructor(a,d,m){this.layoutVertexArray=new a,this.layoutAttributes=d,this.indexArray=new m,this.segments=new Hn,this.collisionVertexArray=new To}upload(a){this.layoutVertexBuffer=a.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=a.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=a.createVertexBuffer(this.collisionVertexArray,CD.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}fn("CollisionBuffers",ax);class id{constructor(a){this.collisionBoxArray=a.collisionBoxArray,this.zoom=a.zoom,this.overscaling=a.overscaling,this.layers=a.layers,this.layerIds=this.layers.map(T=>T.id),this.index=a.index,this.pixelRatio=a.pixelRatio,this.sourceLayerIndex=a.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=F1([]),this.placementViewportMatrix=F1([]);const d=this.layers[0]._unevaluatedLayout._values;this.textSizeData=oS(this.zoom,d["text-size"]),this.iconSizeData=oS(this.zoom,d["icon-size"]);const m=this.layers[0].layout,x=m.get("symbol-sort-key"),S=m.get("symbol-z-order");this.canOverlap=lx(m,"text-overlap","text-allow-overlap")!=="never"||lx(m,"icon-overlap","icon-allow-overlap")!=="never"||m.get("text-ignore-placement")||m.get("icon-ignore-placement"),this.sortFeaturesByKey=S!=="viewport-y"&&!x.isConstant(),this.sortFeaturesByY=(S==="viewport-y"||S==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,m.get("symbol-placement")==="point"&&(this.writingModes=m.get("text-writing-mode").map(T=>o.WritingMode[T])),this.stateDependentLayerIds=this.layers.filter(T=>T.isStateDependent()).map(T=>T.id),this.sourceID=a.sourceID}createArrays(){this.text=new ox(new $u(this.layers,this.zoom,a=>/^text/.test(a))),this.icon=new ox(new $u(this.layers,this.zoom,a=>/^icon/.test(a))),this.glyphOffsetArray=new qt,this.lineVertexArray=new ln,this.symbolInstances=new rn}calculateGlyphDependencies(a,d,m,x,S){for(let T=0;T<a.length;T++)if(d[a.charCodeAt(T)]=!0,(m||x)&&S){const L=ch[a.charAt(T)];L&&(d[L.charCodeAt(0)]=!0)}}populate(a,d,m){const x=this.layers[0],S=x.layout,T=S.get("text-font"),L=S.get("text-field"),F=S.get("icon-image"),j=(L.value.kind!=="constant"||L.value.value instanceof be&&!L.value.value.isEmpty()||L.value.value.toString().length>0)&&(T.value.kind!=="constant"||T.value.value.length>0),X=F.value.kind!=="constant"||!!F.value.value||Object.keys(F.parameters).length>0,ne=S.get("symbol-sort-key");if(this.features=[],!j&&!X)return;const ue=d.iconDependencies,he=d.glyphDependencies,pe=d.availableImages,Ae=new Rr(this.zoom);for(const{feature:Ie,id:Ze,index:st,sourceLayerIndex:Ke}of a){const rt=x._featureFilter.needGeometry,kt=Vu(Ie,rt);if(!x._featureFilter.filter(Ae,kt,m))continue;let St,un;if(rt||(kt.geometry=Bu(Ie)),j){const en=x.getValueAndResolveTokens("text-field",kt,m,pe),Zt=be.factory(en);QD(Zt)&&(this.hasRTLText=!0),(!this.hasRTLText||Lu()==="unavailable"||this.hasRTLText&&ko.isParsed())&&(St=ED(Zt,x,kt))}if(X){const en=x.getValueAndResolveTokens("icon-image",kt,m,pe);un=en instanceof Oe?en:Oe.fromString(en)}if(!St&&!un)continue;const pn=this.sortFeaturesByKey?ne.evaluate(kt,{},m):void 0;if(this.features.push({id:Ze,text:St,icon:un,index:st,sourceLayerIndex:Ke,geometry:kt.geometry,properties:Ie.properties,type:XD[Ie.type],sortKey:pn}),un&&(ue[un.name]=!0),St){const en=T.evaluate(kt,{},m).join(","),Zt=S.get("text-rotation-alignment")!=="viewport"&&S.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(o.WritingMode.vertical)>=0;for(const Ht of St.sections)if(Ht.image)ue[Ht.image.name]=!0;else{const tn=Wc(St.toString()),Yt=Ht.fontStack||en,Ft=he[Yt]=he[Yt]||{};this.calculateGlyphDependencies(Ht.text,Ft,Zt,this.allowVerticalPlacement,tn)}}}S.get("symbol-placement")==="line"&&(this.features=function(Ie){const Ze={},st={},Ke=[];let rt=0;function kt(en){Ke.push(Ie[en]),rt++}function St(en,Zt,Ht){const tn=st[en];return delete st[en],st[Zt]=tn,Ke[tn].geometry[0].pop(),Ke[tn].geometry[0]=Ke[tn].geometry[0].concat(Ht[0]),tn}function un(en,Zt,Ht){const tn=Ze[Zt];return delete Ze[Zt],Ze[en]=tn,Ke[tn].geometry[0].shift(),Ke[tn].geometry[0]=Ht[0].concat(Ke[tn].geometry[0]),tn}function pn(en,Zt,Ht){const tn=Ht?Zt[0][Zt[0].length-1]:Zt[0][0];return`${en}:${tn.x}:${tn.y}`}for(let en=0;en<Ie.length;en++){const Zt=Ie[en],Ht=Zt.geometry,tn=Zt.text?Zt.text.toString():null;if(!tn){kt(en);continue}const Yt=pn(tn,Ht),Ft=pn(tn,Ht,!0);if(Yt in st&&Ft in Ze&&st[Yt]!==Ze[Ft]){const wn=un(Yt,Ft,Ht),vn=St(Yt,Ft,Ke[wn].geometry);delete Ze[Yt],delete st[Ft],st[pn(tn,Ke[vn].geometry,!0)]=vn,Ke[wn].geometry=null}else Yt in st?St(Yt,Ft,Ht):Ft in Ze?un(Yt,Ft,Ht):(kt(en),Ze[Yt]=rt-1,st[Ft]=rt-1)}return Ke.filter(en=>en.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((Ie,Ze)=>Ie.sortKey-Ze.sortKey)}update(a,d,m){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(a,d,this.layers,m),this.icon.programConfigurations.updatePaintArrays(a,d,this.layers,m))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(a){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(a),this.iconCollisionBox.upload(a)),this.text.upload(a,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(a,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(a,d){const m=this.lineVertexArray.length;if(a.segment!==void 0){let x=a.dist(d[a.segment+1]),S=a.dist(d[a.segment]);const T={};for(let L=a.segment+1;L<d.length;L++)T[L]={x:d[L].x,y:d[L].y,tileUnitDistanceFromAnchor:x},L<d.length-1&&(x+=d[L+1].dist(d[L]));for(let L=a.segment||0;L>=0;L--)T[L]={x:d[L].x,y:d[L].y,tileUnitDistanceFromAnchor:S},L>0&&(S+=d[L-1].dist(d[L]));for(let L=0;L<d.length;L++){const F=T[L];this.lineVertexArray.emplaceBack(F.x,F.y,F.tileUnitDistanceFromAnchor)}}return{lineStartIndex:m,lineLength:this.lineVertexArray.length-m}}addSymbols(a,d,m,x,S,T,L,F,j,X,ne,ue){const he=a.indexArray,pe=a.layoutVertexArray,Ae=a.segments.prepareSegment(4*d.length,pe,he,this.canOverlap?T.sortKey:void 0),Ie=this.glyphOffsetArray.length,Ze=Ae.vertexLength,st=this.allowVerticalPlacement&&L===o.WritingMode.vertical?Math.PI/2:0,Ke=T.text&&T.text.sections;for(let rt=0;rt<d.length;rt++){const{tl:kt,tr:St,bl:un,br:pn,tex:en,pixelOffsetTL:Zt,pixelOffsetBR:Ht,minFontScaleX:tn,minFontScaleY:Yt,glyphOffset:Ft,isSDF:wn,sectionIndex:vn}=d[rt],Un=Ae.vertexLength,kr=Ft[1];pv(pe,F.x,F.y,kt.x,kr+kt.y,en.x,en.y,m,wn,Zt.x,Zt.y,tn,Yt),pv(pe,F.x,F.y,St.x,kr+St.y,en.x+en.w,en.y,m,wn,Ht.x,Zt.y,tn,Yt),pv(pe,F.x,F.y,un.x,kr+un.y,en.x,en.y+en.h,m,wn,Zt.x,Ht.y,tn,Yt),pv(pe,F.x,F.y,pn.x,kr+pn.y,en.x+en.w,en.y+en.h,m,wn,Ht.x,Ht.y,tn,Yt),ix(a.dynamicLayoutVertexArray,F,st),he.emplaceBack(Un,Un+1,Un+2),he.emplaceBack(Un+1,Un+2,Un+3),Ae.vertexLength+=4,Ae.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(Ft[0]),rt!==d.length-1&&vn===d[rt+1].sectionIndex||a.programConfigurations.populatePaintArrays(pe.length,T,T.index,{},ue,Ke&&Ke[vn])}a.placedSymbolArray.emplaceBack(F.x,F.y,Ie,this.glyphOffsetArray.length-Ie,Ze,j,X,F.segment,m?m[0]:0,m?m[1]:0,x[0],x[1],L,0,!1,0,ne)}_addCollisionDebugVertex(a,d,m,x,S,T){return d.emplaceBack(0,0),a.emplaceBack(m.x,m.y,x,S,Math.round(T.x),Math.round(T.y))}addCollisionDebugVertices(a,d,m,x,S,T,L){const F=S.segments.prepareSegment(4,S.layoutVertexArray,S.indexArray),j=F.vertexLength,X=S.layoutVertexArray,ne=S.collisionVertexArray,ue=L.anchorX,he=L.anchorY;this._addCollisionDebugVertex(X,ne,T,ue,he,new re(a,d)),this._addCollisionDebugVertex(X,ne,T,ue,he,new re(m,d)),this._addCollisionDebugVertex(X,ne,T,ue,he,new re(m,x)),this._addCollisionDebugVertex(X,ne,T,ue,he,new re(a,x)),F.vertexLength+=4;const pe=S.indexArray;pe.emplaceBack(j,j+1),pe.emplaceBack(j+1,j+2),pe.emplaceBack(j+2,j+3),pe.emplaceBack(j+3,j),F.primitiveLength+=4}addDebugCollisionBoxes(a,d,m,x){for(let S=a;S<d;S++){const T=this.collisionBoxArray.get(S);this.addCollisionDebugVertices(T.x1,T.y1,T.x2,T.y2,x?this.textCollisionBox:this.iconCollisionBox,T.anchorPoint,m)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new ax(es,H3.members,Ma),this.iconCollisionBox=new ax(es,H3.members,Ma);for(let a=0;a<this.symbolInstances.length;a++){const d=this.symbolInstances.get(a);this.addDebugCollisionBoxes(d.textBoxStartIndex,d.textBoxEndIndex,d,!0),this.addDebugCollisionBoxes(d.verticalTextBoxStartIndex,d.verticalTextBoxEndIndex,d,!0),this.addDebugCollisionBoxes(d.iconBoxStartIndex,d.iconBoxEndIndex,d,!1),this.addDebugCollisionBoxes(d.verticalIconBoxStartIndex,d.verticalIconBoxEndIndex,d,!1)}}_deserializeCollisionBoxesForSymbol(a,d,m,x,S,T,L,F,j){const X={};for(let ne=d;ne<m;ne++){const ue=a.get(ne);X.textBox={x1:ue.x1,y1:ue.y1,x2:ue.x2,y2:ue.y2,anchorPointX:ue.anchorPointX,anchorPointY:ue.anchorPointY},X.textFeatureIndex=ue.featureIndex;break}for(let ne=x;ne<S;ne++){const ue=a.get(ne);X.verticalTextBox={x1:ue.x1,y1:ue.y1,x2:ue.x2,y2:ue.y2,anchorPointX:ue.anchorPointX,anchorPointY:ue.anchorPointY},X.verticalTextFeatureIndex=ue.featureIndex;break}for(let ne=T;ne<L;ne++){const ue=a.get(ne);X.iconBox={x1:ue.x1,y1:ue.y1,x2:ue.x2,y2:ue.y2,anchorPointX:ue.anchorPointX,anchorPointY:ue.anchorPointY},X.iconFeatureIndex=ue.featureIndex;break}for(let ne=F;ne<j;ne++){const ue=a.get(ne);X.verticalIconBox={x1:ue.x1,y1:ue.y1,x2:ue.x2,y2:ue.y2,anchorPointX:ue.anchorPointX,anchorPointY:ue.anchorPointY},X.verticalIconFeatureIndex=ue.featureIndex;break}return X}deserializeCollisionBoxes(a){this.collisionArrays=[];for(let d=0;d<this.symbolInstances.length;d++){const m=this.symbolInstances.get(d);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(a,m.textBoxStartIndex,m.textBoxEndIndex,m.verticalTextBoxStartIndex,m.verticalTextBoxEndIndex,m.iconBoxStartIndex,m.iconBoxEndIndex,m.verticalIconBoxStartIndex,m.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(a,d){const m=a.placedSymbolArray.get(d),x=m.vertexStartIndex+4*m.numGlyphs;for(let S=m.vertexStartIndex;S<x;S+=4)a.indexArray.emplaceBack(S,S+1,S+2),a.indexArray.emplaceBack(S+1,S+2,S+3)}getSortedSymbolIndexes(a){if(this.sortedAngle===a&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;const d=Math.sin(a),m=Math.cos(a),x=[],S=[],T=[];for(let L=0;L<this.symbolInstances.length;++L){T.push(L);const F=this.symbolInstances.get(L);x.push(0|Math.round(d*F.anchorX+m*F.anchorY)),S.push(F.featureIndex)}return T.sort((L,F)=>x[L]-x[F]||S[F]-S[L]),T}addToSortKeyRanges(a,d){const m=this.sortKeyRanges[this.sortKeyRanges.length-1];m&&m.sortKey===d?m.symbolInstanceEnd=a+1:this.sortKeyRanges.push({sortKey:d,symbolInstanceStart:a,symbolInstanceEnd:a+1})}sortFeatures(a){if(this.sortFeaturesByY&&this.sortedAngle!==a&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(a),this.sortedAngle=a,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const d of this.symbolInstanceIndexes){const m=this.symbolInstances.get(d);this.featureSortOrder.push(m.featureIndex),[m.rightJustifiedTextSymbolIndex,m.centerJustifiedTextSymbolIndex,m.leftJustifiedTextSymbolIndex].forEach((x,S,T)=>{x>=0&&T.indexOf(x)===S&&this.addIndicesForPlacedSymbol(this.text,x)}),m.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,m.verticalPlacedTextSymbolIndex),m.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,m.placedIconSymbolIndex),m.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,m.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}fn("SymbolBucket",id,{omit:["layers","collisionBoxArray","features","compareText"]}),id.MAX_GLYPHS=65535,id.addDynamicAttributes=ix;const JD=new Ti({"symbol-placement":new mn(Fe.layout_symbol["symbol-placement"]),"symbol-spacing":new mn(Fe.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new mn(Fe.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new En(Fe.layout_symbol["symbol-sort-key"]),"symbol-z-order":new mn(Fe.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new mn(Fe.layout_symbol["icon-allow-overlap"]),"icon-overlap":new mn(Fe.layout_symbol["icon-overlap"]),"icon-ignore-placement":new mn(Fe.layout_symbol["icon-ignore-placement"]),"icon-optional":new mn(Fe.layout_symbol["icon-optional"]),"icon-rotation-alignment":new mn(Fe.layout_symbol["icon-rotation-alignment"]),"icon-size":new En(Fe.layout_symbol["icon-size"]),"icon-text-fit":new mn(Fe.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new mn(Fe.layout_symbol["icon-text-fit-padding"]),"icon-image":new En(Fe.layout_symbol["icon-image"]),"icon-rotate":new En(Fe.layout_symbol["icon-rotate"]),"icon-padding":new En(Fe.layout_symbol["icon-padding"]),"icon-keep-upright":new mn(Fe.layout_symbol["icon-keep-upright"]),"icon-offset":new En(Fe.layout_symbol["icon-offset"]),"icon-anchor":new En(Fe.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new mn(Fe.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new mn(Fe.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new mn(Fe.layout_symbol["text-rotation-alignment"]),"text-field":new En(Fe.layout_symbol["text-field"]),"text-font":new En(Fe.layout_symbol["text-font"]),"text-size":new En(Fe.layout_symbol["text-size"]),"text-max-width":new En(Fe.layout_symbol["text-max-width"]),"text-line-height":new mn(Fe.layout_symbol["text-line-height"]),"text-letter-spacing":new En(Fe.layout_symbol["text-letter-spacing"]),"text-justify":new En(Fe.layout_symbol["text-justify"]),"text-radial-offset":new En(Fe.layout_symbol["text-radial-offset"]),"text-variable-anchor":new mn(Fe.layout_symbol["text-variable-anchor"]),"text-anchor":new En(Fe.layout_symbol["text-anchor"]),"text-max-angle":new mn(Fe.layout_symbol["text-max-angle"]),"text-writing-mode":new mn(Fe.layout_symbol["text-writing-mode"]),"text-rotate":new En(Fe.layout_symbol["text-rotate"]),"text-padding":new mn(Fe.layout_symbol["text-padding"]),"text-keep-upright":new mn(Fe.layout_symbol["text-keep-upright"]),"text-transform":new En(Fe.layout_symbol["text-transform"]),"text-offset":new En(Fe.layout_symbol["text-offset"]),"text-allow-overlap":new mn(Fe.layout_symbol["text-allow-overlap"]),"text-overlap":new mn(Fe.layout_symbol["text-overlap"]),"text-ignore-placement":new mn(Fe.layout_symbol["text-ignore-placement"]),"text-optional":new mn(Fe.layout_symbol["text-optional"])});var sx={paint:new Ti({"icon-opacity":new En(Fe.paint_symbol["icon-opacity"]),"icon-color":new En(Fe.paint_symbol["icon-color"]),"icon-halo-color":new En(Fe.paint_symbol["icon-halo-color"]),"icon-halo-width":new En(Fe.paint_symbol["icon-halo-width"]),"icon-halo-blur":new En(Fe.paint_symbol["icon-halo-blur"]),"icon-translate":new mn(Fe.paint_symbol["icon-translate"]),"icon-translate-anchor":new mn(Fe.paint_symbol["icon-translate-anchor"]),"text-opacity":new En(Fe.paint_symbol["text-opacity"]),"text-color":new En(Fe.paint_symbol["text-color"],{runtimeType:Fn,getOverride:u=>u.textColor,hasOverride:u=>!!u.textColor}),"text-halo-color":new En(Fe.paint_symbol["text-halo-color"]),"text-halo-width":new En(Fe.paint_symbol["text-halo-width"]),"text-halo-blur":new En(Fe.paint_symbol["text-halo-blur"]),"text-translate":new mn(Fe.paint_symbol["text-translate"]),"text-translate-anchor":new mn(Fe.paint_symbol["text-translate-anchor"])}),layout:JD};class gS{constructor(a){if(a.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=a.property.overrides?a.property.overrides.runtimeType:An,this.defaultValue=a}evaluate(a){if(a.formattedSection){const d=this.defaultValue.property.overrides;if(d&&d.hasOverride(a.formattedSection))return d.getOverride(a.formattedSection)}return a.feature&&a.featureState?this.defaultValue.evaluate(a.feature,a.featureState):this.defaultValue.property.specification.default}eachChild(a){this.defaultValue.isConstant()||a(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}fn("FormatSectionOverride",gS,{omit:["defaultValue"]});class mv extends oa{constructor(a){super(a,sx)}recalculate(a,d){if(super.recalculate(a,d),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){const m=this.layout.get("text-writing-mode");if(m){const x=[];for(const S of m)x.indexOf(S)<0&&x.push(S);this.layout._values["text-writing-mode"]=x}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(a,d,m,x){const S=this.layout.get(a).evaluate(d,{},m,x),T=this._unevaluatedLayout._values[a];return T.isDataDriven()||Cu(T.value)||!S?S:function(L,F){return F.replace(/{([^{}]+)}/g,(j,X)=>X in L?String(L[X]):"")}(d.properties,S)}createBucket(a){return new id(a)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const a of sx.paint.overridableProperties){if(!mv.hasPaintOverride(this.layout,a))continue;const d=this.paint.get(a),m=new gS(d),x=new Bc(m,d.property.specification);let S=null;S=d.value.kind==="constant"||d.value.kind==="source"?new Eu("source",x):new Ff("composite",x,d.value.zoomStops),this.paint._values[a]=new ia(d.property,S,d.parameters)}}_handleOverridablePaintPropertyUpdate(a,d,m){return!(!this.layout||d.isDataDriven()||m.isDataDriven())&&mv.hasPaintOverride(this.layout,a)}static hasPaintOverride(a,d){const m=a.get("text-field"),x=sx.paint.properties[d];let S=!1;const T=L=>{for(const F of L)if(x.overrides&&x.overrides.hasOverride(F))return void(S=!0)};if(m.value.kind==="constant"&&m.value.value instanceof be)T(m.value.value.sections);else if(m.value.kind==="source"){const L=j=>{S||(j instanceof bt&&Be(j.value)===Cn?T(j.value.sections):j instanceof Fc?T(j.sections):j.eachChild(L))},F=m.value;F._styleExpression&&L(F._styleExpression.expression)}return S}}function lx(u,a,d){let m="never";const x=u.get(a);return x?m=x:u.get(d)&&(m="always"),m}var eL={paint:new Ti({"background-color":new mn(Fe.paint_background["background-color"]),"background-pattern":new Xf(Fe.paint_background["background-pattern"]),"background-opacity":new mn(Fe.paint_background["background-opacity"])})},tL={paint:new Ti({"raster-opacity":new mn(Fe.paint_raster["raster-opacity"]),"raster-hue-rotate":new mn(Fe.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new mn(Fe.paint_raster["raster-brightness-min"]),"raster-brightness-max":new mn(Fe.paint_raster["raster-brightness-max"]),"raster-saturation":new mn(Fe.paint_raster["raster-saturation"]),"raster-contrast":new mn(Fe.paint_raster["raster-contrast"]),"raster-resampling":new mn(Fe.paint_raster["raster-resampling"]),"raster-fade-duration":new mn(Fe.paint_raster["raster-fade-duration"])})};class nL extends oa{constructor(a){super(a,{}),this.onAdd=d=>{this.implementation.onAdd&&this.implementation.onAdd(d,d.painter.context.gl)},this.onRemove=d=>{this.implementation.onRemove&&this.implementation.onRemove(d,d.painter.context.gl)},this.implementation=a}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}const rL={circle:class extends oa{constructor(u){super(u,N9)}createBucket(u){return new D1(u)}queryRadius(u){const a=u;return th("circle-radius",this,a)+th("circle-stroke-width",this,a)+Qm(this.paint.get("circle-translate"))}queryIntersectsFeature(u,a,d,m,x,S,T,L){const F=Jm(u,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),S.angle,T),j=this.paint.get("circle-radius").evaluate(a,d)+this.paint.get("circle-stroke-width").evaluate(a,d),X=this.paint.get("circle-pitch-alignment")==="map",ne=X?F:function(he,pe){return he.map(Ae=>P3(Ae,pe))}(F,L),ue=X?j*T:j;for(const he of m)for(const pe of he){const Ae=X?pe:P3(pe,L);let Ie=ue;const Ze=ev([],[pe.x,pe.y,0,1],L);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?Ie*=Ze[3]/S.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(Ie*=S.cameraToCenterDistance/Ze[3]),I9(ne,Ae,Ie))return!0}return!1}},heatmap:class extends oa{constructor(u){super(u,L9),this._updateColorRamp()}createBucket(u){return new I3(u)}_handleSpecialPaintPropertyUpdate(u){u==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=R3({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"}},hillshade:class extends oa{constructor(u){super(u,z9)}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}},fill:class extends oa{constructor(u){super(u,J9)}recalculate(u,a){super.recalculate(u,a);const d=this.paint._values["fill-outline-color"];d.value.kind==="constant"&&d.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(u){return new G1(u)}queryRadius(){return Qm(this.paint.get("fill-translate"))}queryIntersectsFeature(u,a,d,m,x,S,T){return _3(Jm(u,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),S.angle,T),m)}isTileClipped(){return!0}},"fill-extrusion":class extends oa{constructor(u){super(u,hD)}createBucket(u){return new Z1(u)}queryRadius(){return Qm(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(u,a,d,m,x,S,T,L){const F=Jm(u,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),S.angle,T),j=this.paint.get("fill-extrusion-height").evaluate(a,d),X=this.paint.get("fill-extrusion-base").evaluate(a,d),ne=function(he,pe,Ae,Ie){const Ze=[];for(const st of he){const Ke=[st.x,st.y,0,1];ev(Ke,Ke,pe),Ze.push(new re(Ke[0]/Ke[3],Ke[1]/Ke[3]))}return Ze}(F,L),ue=function(he,pe,Ae,Ie){const Ze=[],st=[],Ke=Ie[8]*pe,rt=Ie[9]*pe,kt=Ie[10]*pe,St=Ie[11]*pe,un=Ie[8]*Ae,pn=Ie[9]*Ae,en=Ie[10]*Ae,Zt=Ie[11]*Ae;for(const Ht of he){const tn=[],Yt=[];for(const Ft of Ht){const wn=Ft.x,vn=Ft.y,Un=Ie[0]*wn+Ie[4]*vn+Ie[12],kr=Ie[1]*wn+Ie[5]*vn+Ie[13],Or=Ie[2]*wn+Ie[6]*vn+Ie[14],fi=Ie[3]*wn+Ie[7]*vn+Ie[15],Vo=Or+kt,Ni=fi+St,ri=Un+un,xi=kr+pn,Di=Or+en,ji=fi+Zt,fo=new re((Un+Ke)/Ni,(kr+rt)/Ni);fo.z=Vo/Ni,tn.push(fo);const ii=new re(ri/ji,xi/ji);ii.z=Di/ji,Yt.push(ii)}Ze.push(tn),st.push(Yt)}return[Ze,st]}(m,X,j,L);return function(he,pe,Ae){let Ie=1/0;_3(Ae,pe)&&(Ie=B3(Ae,pe[0]));for(let Ze=0;Ze<pe.length;Ze++){const st=pe[Ze],Ke=he[Ze];for(let rt=0;rt<st.length-1;rt++){const kt=st[rt],St=[kt,st[rt+1],Ke[rt+1],Ke[rt],kt];x3(Ae,St)&&(Ie=Math.min(Ie,B3(Ae,St)))}}return Ie!==1/0&&Ie}(ue[0],ue[1],ne)}},line:class extends oa{constructor(u){super(u,U3),this.gradientVersion=0}_handleSpecialPaintPropertyUpdate(u){u==="line-gradient"&&(this.stepInterpolant=this._transitionablePaint._values["line-gradient"].value.expression._styleExpression.expression instanceof ka,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER)}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(u,a){super.recalculate(u,a),this.paint._values["line-floorwidth"]=j3.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,u)}createBucket(u){return new X1(u)}queryRadius(u){const a=u,d=K3(th("line-width",this,a),th("line-gap-width",this,a)),m=th("line-offset",this,a);return d/2+Math.abs(m)+Qm(this.paint.get("line-translate"))}queryIntersectsFeature(u,a,d,m,x,S,T){const L=Jm(u,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),S.angle,T),F=T/2*K3(this.paint.get("line-width").evaluate(a,d),this.paint.get("line-gap-width").evaluate(a,d)),j=this.paint.get("line-offset").evaluate(a,d);return j&&(m=function(X,ne){const ue=[];for(let he=0;he<X.length;he++){const pe=X[he],Ae=[];for(let Ie=0;Ie<pe.length;Ie++){const Ze=pe[Ie-1],st=pe[Ie],Ke=pe[Ie+1],rt=Ie===0?new re(0,0):st.sub(Ze)._unit()._perp(),kt=Ie===pe.length-1?new re(0,0):Ke.sub(st)._unit()._perp(),St=rt._add(kt)._unit(),un=St.x*kt.x+St.y*kt.y;un!==0&&St._mult(1/un),Ae.push(St._mult(ne)._add(st))}ue.push(Ae)}return ue}(m,j*T)),function(X,ne,ue){for(let he=0;he<ne.length;he++){const pe=ne[he];if(X.length>=3){for(let Ae=0;Ae<pe.length;Ae++)if(Yc(X,pe[Ae]))return!0}if(M9(X,pe,ue))return!0}return!1}(L,m,F)}isTileClipped(){return!0}},symbol:mv,background:class extends oa{constructor(u){super(u,eL)}},raster:class extends oa{constructor(u){super(u,tL)}}};class iL{constructor(a){this._callback=a,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._callback()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._callback()},0))}remove(){delete this._channel,this._callback=()=>{}}}const yS=63710088e-1;class qr{constructor(a,d){if(isNaN(a)||isNaN(d))throw new Error(`Invalid LngLat object: (${a}, ${d})`);if(this.lng=+a,this.lat=+d,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new qr(P(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(a){const d=Math.PI/180,m=this.lat*d,x=a.lat*d,S=Math.sin(m)*Math.sin(x)+Math.cos(m)*Math.cos(x)*Math.cos((a.lng-this.lng)*d);return yS*Math.acos(Math.min(S,1))}toBounds(a=0){const d=360*a/40075017,m=d/Math.cos(Math.PI/180*this.lat);return new ju(new qr(this.lng-m,this.lat-d),new qr(this.lng+m,this.lat+d))}static convert(a){if(a instanceof qr)return a;if(Array.isArray(a)&&(a.length===2||a.length===3))return new qr(Number(a[0]),Number(a[1]));if(!Array.isArray(a)&&typeof a=="object"&&a!==null)return new qr(Number("lng"in a?a.lng:a.lon),Number(a.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}class ju{constructor(a,d){a&&(d?this.setSouthWest(a).setNorthEast(d):a.length===4?this.setSouthWest([a[0],a[1]]).setNorthEast([a[2],a[3]]):this.setSouthWest(a[0]).setNorthEast(a[1]))}setNorthEast(a){return this._ne=a instanceof qr?new qr(a.lng,a.lat):qr.convert(a),this}setSouthWest(a){return this._sw=a instanceof qr?new qr(a.lng,a.lat):qr.convert(a),this}extend(a){const d=this._sw,m=this._ne;let x,S;if(a instanceof qr)x=a,S=a;else{if(!(a instanceof ju))return Array.isArray(a)?a.length===4||a.every(Array.isArray)?this.extend(ju.convert(a)):this.extend(qr.convert(a)):this;if(x=a._sw,S=a._ne,!x||!S)return this}return d||m?(d.lng=Math.min(x.lng,d.lng),d.lat=Math.min(x.lat,d.lat),m.lng=Math.max(S.lng,m.lng),m.lat=Math.max(S.lat,m.lat)):(this._sw=new qr(x.lng,x.lat),this._ne=new qr(S.lng,S.lat)),this}getCenter(){return new qr((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new qr(this.getWest(),this.getNorth())}getSouthEast(){return new qr(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(a){const{lng:d,lat:m}=qr.convert(a);let x=this._sw.lng<=d&&d<=this._ne.lng;return this._sw.lng>this._ne.lng&&(x=this._sw.lng>=d&&d>=this._ne.lng),this._sw.lat<=m&&m<=this._ne.lat&&x}static convert(a){return a instanceof ju?a:a&&new ju(a)}}const xS=2*Math.PI*yS;function _S(u){return xS*Math.cos(u*Math.PI/180)}function bS(u){return(180+u)/360}function wS(u){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u*Math.PI/360)))/360}function CS(u,a){return u/_S(a)}function ux(u){return 360/Math.PI*Math.atan(Math.exp((180-360*u)*Math.PI/180))-90}class vv{constructor(a,d,m=0){this.x=+a,this.y=+d,this.z=+m}static fromLngLat(a,d=0){const m=qr.convert(a);return new vv(bS(m.lng),wS(m.lat),CS(d,m.lat))}toLngLat(){return new qr(360*this.x-180,ux(this.y))}toAltitude(){return this.z*_S(ux(this.y))}meterInMercatorCoordinateUnits(){return 1/xS*(a=ux(this.y),1/Math.cos(a*Math.PI/180));var a}}function SS(u,a,d){var m=2*Math.PI*6378137/256/Math.pow(2,d);return[u*m-2*Math.PI*6378137/2,a*m-2*Math.PI*6378137/2]}class cx{constructor(a,d,m){if(a<0||a>25||m<0||m>=Math.pow(2,a)||d<0||d>=Math.pow(2,a))throw new Error(`x=${d}, y=${m}, z=${a} outside of bounds. 0<=x<${Math.pow(2,a)}, 0<=y<${Math.pow(2,a)} 0<=z<=25 `);this.z=a,this.x=d,this.y=m,this.key=fh(0,a,a,d,m)}equals(a){return this.z===a.z&&this.x===a.x&&this.y===a.y}url(a,d,m){const x=(T=this.y,L=this.z,F=SS(256*(S=this.x),256*(T=Math.pow(2,L)-T-1),L),j=SS(256*(S+1),256*(T+1),L),F[0]+","+F[1]+","+j[0]+","+j[1]);var S,T,L,F,j;const X=function(ne,ue,he){let pe,Ae="";for(let Ie=ne;Ie>0;Ie--)pe=1<<Ie-1,Ae+=(ue&pe?1:0)+(he&pe?2:0);return Ae}(this.z,this.x,this.y);return a[(this.x+this.y)%a.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(m==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,d>1?"@2x":"").replace(/{quadkey}/g,X).replace(/{bbox-epsg-3857}/g,x)}isChildOf(a){const d=this.z-a.z;return d>0&&a.x===this.x>>d&&a.y===this.y>>d}getTilePoint(a){const d=Math.pow(2,this.z);return new re((a.x*d-this.x)*di,(a.y*d-this.y)*di)}toString(){return`${this.z}/${this.x}/${this.y}`}}class ES{constructor(a,d){this.wrap=a,this.canonical=d,this.key=fh(a,d.z,d.z,d.x,d.y)}}class Bo{constructor(a,d,m,x,S){if(a<m)throw new Error(`overscaledZ should be >= z; overscaledZ = ${a}; z = ${m}`);this.overscaledZ=a,this.wrap=d,this.canonical=new cx(m,+x,+S),this.key=fh(d,a,m,x,S)}clone(){return new Bo(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(a){return this.overscaledZ===a.overscaledZ&&this.wrap===a.wrap&&this.canonical.equals(a.canonical)}scaledTo(a){if(a>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${a}; overscaledZ = ${this.overscaledZ}`);const d=this.canonical.z-a;return a>this.canonical.z?new Bo(a,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Bo(a,this.wrap,a,this.canonical.x>>d,this.canonical.y>>d)}calculateScaledKey(a,d){if(a>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${a}; overscaledZ = ${this.overscaledZ}`);const m=this.canonical.z-a;return a>this.canonical.z?fh(this.wrap*+d,a,this.canonical.z,this.canonical.x,this.canonical.y):fh(this.wrap*+d,a,a,this.canonical.x>>m,this.canonical.y>>m)}isChildOf(a){if(a.wrap!==this.wrap)return!1;const d=this.canonical.z-a.canonical.z;return a.overscaledZ===0||a.overscaledZ<this.overscaledZ&&a.canonical.x===this.canonical.x>>d&&a.canonical.y===this.canonical.y>>d}children(a){if(this.overscaledZ>=a)return[new Bo(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const d=this.canonical.z+1,m=2*this.canonical.x,x=2*this.canonical.y;return[new Bo(d,this.wrap,d,m,x),new Bo(d,this.wrap,d,m+1,x),new Bo(d,this.wrap,d,m,x+1),new Bo(d,this.wrap,d,m+1,x+1)]}isLessThan(a){return this.wrap<a.wrap||!(this.wrap>a.wrap)&&(this.overscaledZ<a.overscaledZ||!(this.overscaledZ>a.overscaledZ)&&(this.canonical.x<a.canonical.x||!(this.canonical.x>a.canonical.x)&&this.canonical.y<a.canonical.y))}wrapped(){return new Bo(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(a){return new Bo(this.overscaledZ,a,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new ES(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(a){return this.canonical.getTilePoint(new vv(a.x-this.wrap,a.y))}}function fh(u,a,d,m,x){(u*=2)<0&&(u=-1*u-1);const S=1<<d;return(S*S*u+S*x+m).toString(36)+d.toString(36)+a.toString(36)}fn("CanonicalTileID",cx),fn("OverscaledTileID",Bo,{omit:["posMatrix"]});class kS{constructor(a,d,m){if(this.uid=a,d.height!==d.width)throw new RangeError("DEM tiles must be square");if(m&&m!=="mapbox"&&m!=="terrarium")return void B(`"${m}" is not a valid encoding type. Valid types include "mapbox" and "terrarium".`);this.stride=d.height;const x=this.dim=d.height-2;this.data=new Uint32Array(d.data.buffer),this.encoding=m||"mapbox";for(let S=0;S<x;S++)this.data[this._idx(-1,S)]=this.data[this._idx(0,S)],this.data[this._idx(x,S)]=this.data[this._idx(x-1,S)],this.data[this._idx(S,-1)]=this.data[this._idx(S,0)],this.data[this._idx(S,x)]=this.data[this._idx(S,x-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(x,-1)]=this.data[this._idx(x-1,0)],this.data[this._idx(-1,x)]=this.data[this._idx(0,x-1)],this.data[this._idx(x,x)]=this.data[this._idx(x-1,x-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let S=0;S<x;S++)for(let T=0;T<x;T++){const L=this.get(S,T);L>this.max&&(this.max=L),L<this.min&&(this.min=L)}}get(a,d){const m=new Uint8Array(this.data.buffer),x=4*this._idx(a,d);return(this.encoding==="terrarium"?this._unpackTerrarium:this._unpackMapbox)(m[x],m[x+1],m[x+2])}getUnpackVector(){return this.encoding==="terrarium"?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]}_idx(a,d){if(a<-1||a>=this.dim+1||d<-1||d>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(d+1)*this.stride+(a+1)}_unpackMapbox(a,d,m){return(256*a*256+256*d+m)/10-1e4}_unpackTerrarium(a,d,m){return 256*a+d+m/256-32768}getPixels(){return new $o({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(a,d,m){if(this.dim!==a.dim)throw new Error("dem dimension mismatch");let x=d*this.dim,S=d*this.dim+this.dim,T=m*this.dim,L=m*this.dim+this.dim;switch(d){case-1:x=S-1;break;case 1:S=x+1}switch(m){case-1:T=L-1;break;case 1:L=T+1}const F=-d*this.dim,j=-m*this.dim;for(let X=T;X<L;X++)for(let ne=x;ne<S;ne++)this.data[this._idx(ne,X)]=a.data[this._idx(ne+F,X+j)]}}fn("DEMData",kS);class TS{constructor(a){this._stringToNumber={},this._numberToString=[];for(let d=0;d<a.length;d++){const m=a[d];this._stringToNumber[m]=d,this._numberToString[d]=m}}encode(a){return this._stringToNumber[a]}decode(a){if(a>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${a} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[a]}}class PS{constructor(a,d,m,x,S){this.type="Feature",this._vectorTileFeature=a,a._z=d,a._x=m,a._y=x,this.properties=a.properties,this.id=S}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(a){this._geometry=a}toJSON(){const a={geometry:this.geometry};for(const d in this)d!=="_geometry"&&d!=="_vectorTileFeature"&&(a[d]=this[d]);return a}}class IS{constructor(a,d){this.tileID=a,this.x=a.canonical.x,this.y=a.canonical.y,this.z=a.canonical.z,this.grid=new Du(di,16,0),this.grid3D=new Du(di,16,0),this.featureIndexArray=new Vn,this.promoteId=d}insert(a,d,m,x,S,T){const L=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(m,x,S);const F=T?this.grid3D:this.grid;for(let j=0;j<d.length;j++){const X=d[j],ne=[1/0,1/0,-1/0,-1/0];for(let ue=0;ue<X.length;ue++){const he=X[ue];ne[0]=Math.min(ne[0],he.x),ne[1]=Math.min(ne[1],he.y),ne[2]=Math.max(ne[2],he.x),ne[3]=Math.max(ne[3],he.y)}ne[0]<di&&ne[1]<di&&ne[2]>=0&&ne[3]>=0&&F.insert(L,ne[0],ne[1],ne[2],ne[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new wl.VectorTile(new Y1(this.rawTileData)).layers,this.sourceLayerCoder=new TS(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(a,d,m,x){this.loadVTLayers();const S=a.params||{},T=di/a.tileSize/a.scale,L=jc(S.filter),F=a.queryGeometry,j=a.queryPadding*T,X=RS(F),ne=this.grid.query(X.minX-j,X.minY-j,X.maxX+j,X.maxY+j),ue=RS(a.cameraQueryGeometry),he=this.grid3D.query(ue.minX-j,ue.minY-j,ue.maxX+j,ue.maxY+j,(Ie,Ze,st,Ke)=>function(rt,kt,St,un,pn){for(const Zt of rt)if(kt<=Zt.x&&St<=Zt.y&&un>=Zt.x&&pn>=Zt.y)return!0;const en=[new re(kt,St),new re(kt,pn),new re(un,pn),new re(un,St)];if(rt.length>2){for(const Zt of en)if(Yc(rt,Zt))return!0}for(let Zt=0;Zt<rt.length-1;Zt++)if(A9(rt[Zt],rt[Zt+1],en))return!0;return!1}(a.cameraQueryGeometry,Ie-j,Ze-j,st+j,Ke+j));for(const Ie of he)ne.push(Ie);ne.sort(oL);const pe={};let Ae;for(let Ie=0;Ie<ne.length;Ie++){const Ze=ne[Ie];if(Ze===Ae)continue;Ae=Ze;const st=this.featureIndexArray.get(Ze);let Ke=null;this.loadMatchingFeature(pe,st.bucketIndex,st.sourceLayerIndex,st.featureIndex,L,S.layers,S.availableImages,d,m,x,(rt,kt,St)=>(Ke||(Ke=Bu(rt)),kt.queryIntersectsFeature(F,rt,St,Ke,this.z,a.transform,T,a.pixelPosMatrix)))}return pe}loadMatchingFeature(a,d,m,x,S,T,L,F,j,X,ne){const ue=this.bucketLayerIDs[d];if(T&&!function(Ie,Ze){for(let st=0;st<Ie.length;st++)if(Ze.indexOf(Ie[st])>=0)return!0;return!1}(T,ue))return;const he=this.sourceLayerCoder.decode(m),pe=this.vtLayers[he].feature(x);if(S.needGeometry){const Ie=Vu(pe,!0);if(!S.filter(new Rr(this.tileID.overscaledZ),Ie,this.tileID.canonical))return}else if(!S.filter(new Rr(this.tileID.overscaledZ),pe))return;const Ae=this.getId(pe,he);for(let Ie=0;Ie<ue.length;Ie++){const Ze=ue[Ie];if(T&&T.indexOf(Ze)<0)continue;const st=F[Ze];if(!st)continue;let Ke={};Ae&&X&&(Ke=X.getState(st.sourceLayer||"_geojsonTileLayer",Ae));const rt=I({},j[Ze]);rt.paint=MS(rt.paint,st.paint,pe,Ke,L),rt.layout=MS(rt.layout,st.layout,pe,Ke,L);const kt=!ne||ne(pe,st,Ke);if(!kt)continue;const St=new PS(pe,this.z,this.x,this.y,Ae);St.layer=rt;let un=a[Ze];un===void 0&&(un=a[Ze]=[]),un.push({featureIndex:x,feature:St,intersectionZ:kt})}}lookupSymbolFeatures(a,d,m,x,S,T,L,F){const j={};this.loadVTLayers();const X=jc(S);for(const ne of a)this.loadMatchingFeature(j,m,x,ne,X,T,L,F,d);return j}hasLayer(a){for(const d of this.bucketLayerIDs)for(const m of d)if(a===m)return!0;return!1}getId(a,d){let m=a.id;return this.promoteId&&(m=a.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[d]],typeof m=="boolean"&&(m=Number(m))),m}}function MS(u,a,d,m,x){return M(u,(S,T)=>{const L=a instanceof Fu?a.get(T):null;return L&&L.evaluate?L.evaluate(d,m,x):L})}function RS(u){let a=1/0,d=1/0,m=-1/0,x=-1/0;for(const S of u)a=Math.min(a,S.x),d=Math.min(d,S.y),m=Math.max(m,S.x),x=Math.max(x,S.y);return{minX:a,minY:d,maxX:m,maxY:x}}function oL(u,a){return a-u}var dx;fn("FeatureIndex",IS,{omit:["rawTileData","sourceLayerCoder"]}),o.PerformanceMarkers=void 0,(dx=o.PerformanceMarkers||(o.PerformanceMarkers={})).create="create",dx.load="load",dx.fullLoad="fullLoad";let gv=null,hh=[];const fx=1e3/30,aL={mark(u){performance.mark(u)},frame(u){const a=u;gv!=null&&hh.push(a-gv),gv=a},clearMetrics(){gv=null,hh=[],performance.clearMeasures("loadTime"),performance.clearMeasures("fullLoadTime");for(const u in o.PerformanceMarkers)performance.clearMarks(o.PerformanceMarkers[u])},getPerformanceMetrics(){performance.measure("loadTime",o.PerformanceMarkers.create,o.PerformanceMarkers.load),performance.measure("fullLoadTime",o.PerformanceMarkers.create,o.PerformanceMarkers.fullLoad);const u=performance.getEntriesByName("loadTime")[0].duration,a=performance.getEntriesByName("fullLoadTime")[0].duration,d=hh.length,m=1/(hh.reduce((S,T)=>S+T,0)/d/1e3),x=hh.filter(S=>S>fx).reduce((S,T)=>S+(T-fx)/fx,0);return{loadTime:u,fullLoadTime:a,fps:m,percentDroppedFrames:x/(d+x)*100}}};o.AJAXError=Xe,o.ARRAY_TYPE=eo,o.Actor=class{constructor(u,a,d){this.target=u,this.parent=a,this.mapId=d,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},O(["receive","process"],this),this.invoker=new iL(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=H()?u:window}send(u,a,d,m,x=!1){const S=Math.round(1e18*Math.random()).toString(36).substring(0,10);d&&(this.callbacks[S]=d);const T=Z(this.globalScope)?void 0:[];return this.target.postMessage({id:S,type:u,hasCallback:!!d,targetMapId:m,mustQueue:x,sourceMapId:this.mapId,data:Cs(a,T)},T),{cancel:()=>{d&&delete this.callbacks[S],this.target.postMessage({id:S,type:"<cancel>",targetMapId:m,sourceMapId:this.mapId})}}}receive(u){const a=u.data,d=a.id;if(d&&(!a.targetMapId||this.mapId===a.targetMapId))if(a.type==="<cancel>"){delete this.tasks[d];const m=this.cancelCallbacks[d];delete this.cancelCallbacks[d],m&&m()}else H()||a.mustQueue?(this.tasks[d]=a,this.taskQueue.push(d),this.invoker.trigger()):this.processTask(d,a)}process(){if(!this.taskQueue.length)return;const u=this.taskQueue.shift(),a=this.tasks[u];delete this.tasks[u],this.taskQueue.length&&this.invoker.trigger(),a&&this.processTask(u,a)}processTask(u,a){if(a.type==="<response>"){const d=this.callbacks[u];delete this.callbacks[u],d&&(a.error?d(Za(a.error)):d(null,Za(a.data)))}else{let d=!1;const m=Z(this.globalScope)?void 0:[],x=a.hasCallback?(L,F)=>{d=!0,delete this.cancelCallbacks[u],this.target.postMessage({id:u,type:"<response>",sourceMapId:this.mapId,error:L?Cs(L):null,data:Cs(F,m)},m)}:L=>{d=!0};let S=null;const T=Za(a.data);if(this.parent[a.type])S=this.parent[a.type](a.sourceMapId,T,x);else if(this.parent.getWorkerSource){const L=a.type.split(".");S=this.parent.getWorkerSource(a.sourceMapId,L[0],T.source)[L[1]](T,x)}else x(new Error(`Could not find function ${a.type}`));!d&&S&&S.cancel&&(this.cancelCallbacks[u]=S.cancel)}}remove(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)}},o.AlphaImage=rh,o.CanonicalTileID=cx,o.CollisionBoxArray=gt,o.CollisionCircleLayoutArray=class extends ee{},o.Color=ae,o.DEMData=kS,o.DataConstantProperty=mn,o.DictionaryCoder=TS,o.EXTENT=di,o.ErrorEvent=Ut,o.EvaluationParameters=Rr,o.Event=Wt,o.Evented=Qt,o.FeatureIndex=IS,o.FillBucket=G1,o.FillExtrusionBucket=Z1,o.GeoJSONFeature=PS,o.ImageAtlas=J3,o.ImagePosition=J1,o.LineBucket=X1,o.LineStripIndexArray=class extends Pe{},o.LngLat=qr,o.LngLatBounds=ju,o.MercatorCoordinate=vv,o.ONE_EM=Pi,o.OverscaledTileID=Bo,o.PerformanceUtils=aL,o.PosArray=bn,o.Properties=Ti,o.QuadTriangleArray=class extends fe{},o.RGBAImage=$o,o.RasterBoundsArray=class extends y{},o.RequestPerformance=class{constructor(u){this._marks={start:[u.url,"start"].join("#"),end:[u.url,"end"].join("#"),measure:u.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let u=performance.getEntriesByName(this._marks.measure);return u.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),u=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),u}},o.ResourceType=Tt,o.SegmentVector=Hn,o.SymbolBucket=id,o.Transitionable=Wm,o.TriangleIndexArray=Qi,o.Uniform1f=Ts,o.Uniform1i=class extends ks{constructor(u,a){super(u,a),this.current=0}set(u){this.current!==u&&(this.current=u,this.gl.uniform1i(this.location,u))}},o.Uniform2f=class extends ks{constructor(u,a){super(u,a),this.current=[0,0]}set(u){u[0]===this.current[0]&&u[1]===this.current[1]||(this.current=u,this.gl.uniform2f(this.location,u[0],u[1]))}},o.Uniform3f=class extends ks{constructor(u,a){super(u,a),this.current=[0,0,0]}set(u){u[0]===this.current[0]&&u[1]===this.current[1]&&u[2]===this.current[2]||(this.current=u,this.gl.uniform3f(this.location,u[0],u[1],u[2]))}},o.Uniform4f=Zc,o.UniformColor=m3,o.UniformMatrix4f=class extends ks{constructor(u,a){super(u,a),this.current=T9}set(u){if(u[12]!==this.current[12]||u[0]!==this.current[0])return this.current=u,void this.gl.uniformMatrix4fv(this.location,!1,u);for(let a=1;a<16;a++)if(u[a]!==this.current[a]){this.current=u,this.gl.uniformMatrix4fv(this.location,!1,u);break}}},o.UnwrappedTileID=ES,o.ValidationError=Ge,o.ZoomHistory=Uf,o.add=function(u,a,d){return u[0]=a[0]+d[0],u[1]=a[1]+d[1],u[2]=a[2]+d[2],u},o.addDynamicAttributes=ix,o.asyncAll=function(u,a,d){if(!u.length)return d(null,[]);let m=u.length;const x=new Array(u.length);let S=null;u.forEach((T,L)=>{a(T,(F,j)=>{F&&(S=F),x[L]=j,--m==0&&d(S,x)})})},o.bezier=g,o.bindAll=O,o.cacheEntryPossiblyAdded=function(u){Ne++,Ne>De&&(u.getActor().send("enforceCacheSizeLimit",ke),Ne=0)},o.clamp=w,o.clearTileCache=function(u){const a=caches.delete(ye);u&&a.catch(u).then(()=>u())},o.clipLine=dS,o.clone=function(u){var a=new eo(16);return a[0]=u[0],a[1]=u[1],a[2]=u[2],a[3]=u[3],a[4]=u[4],a[5]=u[5],a[6]=u[6],a[7]=u[7],a[8]=u[8],a[9]=u[9],a[10]=u[10],a[11]=u[11],a[12]=u[12],a[13]=u[13],a[14]=u[14],a[15]=u[15],a},o.clone$1=N,o.clone$2=function(u){var a=new eo(3);return a[0]=u[0],a[1]=u[1],a[2]=u[2],a},o.collisionCircleLayout=SD,o.config=oe,o.copy=function(u,a){return u[0]=a[0],u[1]=a[1],u[2]=a[2],u[3]=a[3],u[4]=a[4],u[5]=a[5],u[6]=a[6],u[7]=a[7],u[8]=a[8],u[9]=a[9],u[10]=a[10],u[11]=a[11],u[12]=a[12],u[13]=a[13],u[14]=a[14],u[15]=a[15],u},o.create=function(){var u=new eo(16);return eo!=Float32Array&&(u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[11]=0,u[12]=0,u[13]=0,u[14]=0),u[0]=1,u[5]=1,u[10]=1,u[15]=1,u},o.create$1=C3,o.createExpression=Su,o.createFilter=jc,o.createLayout=ni,o.createStyleLayer=function(u){return u.type==="custom"?new nL(u):new rL[u.type](u)},o.cross=function(u,a,d){var m=a[0],x=a[1],S=a[2],T=d[0],L=d[1],F=d[2];return u[0]=x*F-S*L,u[1]=S*T-m*F,u[2]=m*L-x*T,u},o.dot=function(u,a){return u[0]*a[0]+u[1]*a[1]+u[2]*a[2]},o.dot$1=function(u,a){return u[0]*a[0]+u[1]*a[1]+u[2]*a[2]+u[3]*a[3]},o.ease=b,o.emitValidationErrors=Hc,o.enforceCacheSizeLimit=function(u){Me(),Re&&Re.then(a=>{a.keys().then(d=>{for(let m=0;m<d.length-u;m++)a.delete(d[m])})})},o.equals=function(u,a){var d=u[0],m=u[1],x=u[2],S=u[3],T=u[4],L=u[5],F=u[6],j=u[7],X=u[8],ne=u[9],ue=u[10],he=u[11],pe=u[12],Ae=u[13],Ie=u[14],Ze=u[15],st=a[0],Ke=a[1],rt=a[2],kt=a[3],St=a[4],un=a[5],pn=a[6],en=a[7],Zt=a[8],Ht=a[9],tn=a[10],Yt=a[11],Ft=a[12],wn=a[13],vn=a[14],Un=a[15];return Math.abs(d-st)<=Ji*Math.max(1,Math.abs(d),Math.abs(st))&&Math.abs(m-Ke)<=Ji*Math.max(1,Math.abs(m),Math.abs(Ke))&&Math.abs(x-rt)<=Ji*Math.max(1,Math.abs(x),Math.abs(rt))&&Math.abs(S-kt)<=Ji*Math.max(1,Math.abs(S),Math.abs(kt))&&Math.abs(T-St)<=Ji*Math.max(1,Math.abs(T),Math.abs(St))&&Math.abs(L-un)<=Ji*Math.max(1,Math.abs(L),Math.abs(un))&&Math.abs(F-pn)<=Ji*Math.max(1,Math.abs(F),Math.abs(pn))&&Math.abs(j-en)<=Ji*Math.max(1,Math.abs(j),Math.abs(en))&&Math.abs(X-Zt)<=Ji*Math.max(1,Math.abs(X),Math.abs(Zt))&&Math.abs(ne-Ht)<=Ji*Math.max(1,Math.abs(ne),Math.abs(Ht))&&Math.abs(ue-tn)<=Ji*Math.max(1,Math.abs(ue),Math.abs(tn))&&Math.abs(he-Yt)<=Ji*Math.max(1,Math.abs(he),Math.abs(Yt))&&Math.abs(pe-Ft)<=Ji*Math.max(1,Math.abs(pe),Math.abs(Ft))&&Math.abs(Ae-wn)<=Ji*Math.max(1,Math.abs(Ae),Math.abs(wn))&&Math.abs(Ie-vn)<=Ji*Math.max(1,Math.abs(Ie),Math.abs(vn))&&Math.abs(Ze-Un)<=Ji*Math.max(1,Math.abs(Ze),Math.abs(Un))},o.evaluateSizeForFeature=function(u,{uSize:a,uSizeT:d},{lowerSize:m,upperSize:x}){return u.kind==="source"?m/Ms:u.kind==="composite"?gr(m/Ms,x/Ms,d):a},o.evaluateSizeForZoom=function(u,a){let d=0,m=0;if(u.kind==="constant")m=u.layoutSize;else if(u.kind!=="source"){const{interpolationType:x,minZoom:S,maxZoom:T}=u,L=x?w(lo.interpolationFactor(x,a,S,T),0,1):0;u.kind==="camera"?m=gr(u.minSize,u.maxSize,L):d=L}return{uSizeT:d,uSize:m}},o.evaluateVariableOffset=pS,o.evented=Zf,o.exported=ge,o.exported$1=Le,o.extend=I,o.filterObject=R,o.fromRotation=function(u,a){var d=Math.sin(a),m=Math.cos(a);return u[0]=m,u[1]=d,u[2]=0,u[3]=-d,u[4]=m,u[5]=0,u[6]=0,u[7]=0,u[8]=1,u},o.fromScaling=function(u,a){return u[0]=a[0],u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=a[1],u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=a[2],u[11]=0,u[12]=0,u[13]=0,u[14]=0,u[15]=1,u},o.getAnchorAlignment=tx,o.getAnchorJustification=rx,o.getArrayBuffer=Ct,o.getImage=it,o.getJSON=function(u,a){return Mt(I(u,{type:"json"}),a)},o.getOverlapMode=lx,o.getRTLTextPluginStatus=Lu,o.getReferrer=Pt,o.getVideo=function(u,a){const d=window.document.createElement("video");d.muted=!0,d.onloadstart=function(){a(null,d)};for(let m=0;m<u.length;m++){const x=window.document.createElement("source");Lt(u[m])||(d.crossOrigin="Anonymous"),x.src=u[m],d.appendChild(x)}return{cancel:()=>{}}},o.identity=F1,o.invert=function(u,a){var d=a[0],m=a[1],x=a[2],S=a[3],T=a[4],L=a[5],F=a[6],j=a[7],X=a[8],ne=a[9],ue=a[10],he=a[11],pe=a[12],Ae=a[13],Ie=a[14],Ze=a[15],st=d*L-m*T,Ke=d*F-x*T,rt=d*j-S*T,kt=m*F-x*L,St=m*j-S*L,un=x*j-S*F,pn=X*Ae-ne*pe,en=X*Ie-ue*pe,Zt=X*Ze-he*pe,Ht=ne*Ie-ue*Ae,tn=ne*Ze-he*Ae,Yt=ue*Ze-he*Ie,Ft=st*Yt-Ke*tn+rt*Ht+kt*Zt-St*en+un*pn;return Ft?(u[0]=(L*Yt-F*tn+j*Ht)*(Ft=1/Ft),u[1]=(x*tn-m*Yt-S*Ht)*Ft,u[2]=(Ae*un-Ie*St+Ze*kt)*Ft,u[3]=(ue*St-ne*un-he*kt)*Ft,u[4]=(F*Zt-T*Yt-j*en)*Ft,u[5]=(d*Yt-x*Zt+S*en)*Ft,u[6]=(Ie*rt-pe*un-Ze*Ke)*Ft,u[7]=(X*un-ue*rt+he*Ke)*Ft,u[8]=(T*tn-L*Zt+j*pn)*Ft,u[9]=(m*Zt-d*tn-S*pn)*Ft,u[10]=(pe*St-Ae*rt+Ze*st)*Ft,u[11]=(ne*rt-X*St-he*st)*Ft,u[12]=(L*en-T*Ht-F*pn)*Ft,u[13]=(d*Ht-m*en+x*pn)*Ft,u[14]=(Ae*Ke-pe*kt-Ie*st)*Ft,u[15]=(X*kt-ne*Ke+ue*st)*Ft,u):null},o.isImageBitmap=Q,o.isSafari=Z,o.isWorker=H,o.keysDifference=function(u,a){const d=[];for(const m in u)m in a||d.push(m);return d},o.lazyLoadRTLTextPlugin=function(){ko.isLoading()||ko.isLoaded()||Lu()!=="deferred"||Hm()},o.makeRequest=Mt,o.mapObject=M,o.mercatorXfromLng=bS,o.mercatorYfromLat=wS,o.mercatorZfromAltitude=CS,o.mul=D9,o.mul$1=function(u,a,d){return u[0]=a[0]*d[0],u[1]=a[1]*d[1],u[2]=a[2]*d[2],u[3]=a[3]*d[3],u},o.multiply=S3,o.nextPowerOfTwo=function(u){return u<=1?1:Math.pow(2,Math.ceil(Math.log(u)/Math.LN2))},o.normalize=function(u,a){var d=a[0],m=a[1],x=a[2],S=d*d+m*m+x*x;return S>0&&(S=1/Math.sqrt(S)),u[0]=a[0]*S,u[1]=a[1]*S,u[2]=a[2]*S,u},o.number=gr,o.ortho=function(u,a,d,m,x,S,T){var L=1/(a-d),F=1/(m-x),j=1/(S-T);return u[0]=-2*L,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=-2*F,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=2*j,u[11]=0,u[12]=(a+d)*L,u[13]=(x+m)*F,u[14]=(T+S)*j,u[15]=1,u},o.parseCacheControl=te,o.parseGlyphPbf=function(u){return new Y1(u).readFields(DD,[])},o.pbf=Y1,o.performSymbolLayout=function(u){u.bucket.createArrays(),u.bucket.tilePixelRatio=di/(512*u.bucket.overscaling),u.bucket.compareText={},u.bucket.iconsNeedLinear=!1;const a=u.bucket.layers[0].layout,d=u.bucket.layers[0]._unevaluatedLayout._values,m={layoutIconSize:d["icon-size"].possiblyEvaluate(new Rr(u.bucket.zoom+1),u.canonical),layoutTextSize:d["text-size"].possiblyEvaluate(new Rr(u.bucket.zoom+1),u.canonical),textMaxSize:d["text-size"].possiblyEvaluate(new Rr(18))};if(u.bucket.textSizeData.kind==="composite"){const{minZoom:F,maxZoom:j}=u.bucket.textSizeData;m.compositeTextSizes=[d["text-size"].possiblyEvaluate(new Rr(F),u.canonical),d["text-size"].possiblyEvaluate(new Rr(j),u.canonical)]}if(u.bucket.iconSizeData.kind==="composite"){const{minZoom:F,maxZoom:j}=u.bucket.iconSizeData;m.compositeIconSizes=[d["icon-size"].possiblyEvaluate(new Rr(F),u.canonical),d["icon-size"].possiblyEvaluate(new Rr(j),u.canonical)]}const x=a.get("text-line-height")*Pi,S=a.get("text-rotation-alignment")!=="viewport"&&a.get("symbol-placement")!=="point",T=a.get("text-keep-upright"),L=a.get("text-size");for(const F of u.bucket.features){const j=a.get("text-font").evaluate(F,{},u.canonical).join(","),X=L.evaluate(F,{},u.canonical),ne=m.layoutTextSize.evaluate(F,{},u.canonical),ue=m.layoutIconSize.evaluate(F,{},u.canonical),he={horizontal:{},vertical:void 0},pe=F.text;let Ae,Ie=[0,0];if(pe){const Ke=pe.toString(),rt=a.get("text-letter-spacing").evaluate(F,{},u.canonical)*Pi,kt=M1(Ke)?rt:0,St=a.get("text-anchor").evaluate(F,{},u.canonical),un=a.get("text-variable-anchor");if(!un){const tn=a.get("text-radial-offset").evaluate(F,{},u.canonical);Ie=tn?pS(St,[tn*Pi,nx]):a.get("text-offset").evaluate(F,{},u.canonical).map(Yt=>Yt*Pi)}let pn=S?"center":a.get("text-justify").evaluate(F,{},u.canonical);const en=a.get("symbol-placement"),Zt=en==="point"?a.get("text-max-width").evaluate(F,{},u.canonical)*Pi:0,Ht=()=>{u.bucket.allowVerticalPlacement&&Wc(Ke)&&(he.vertical=lv(pe,u.glyphMap,u.glyphPositions,u.imagePositions,j,Zt,x,St,"left",kt,Ie,o.WritingMode.vertical,!0,en,ne,X))};if(!S&&un){const tn=pn==="auto"?un.map(Ft=>rx(Ft)):[pn];let Yt=!1;for(let Ft=0;Ft<tn.length;Ft++){const wn=tn[Ft];if(!he.horizontal[wn])if(Yt)he.horizontal[wn]=he.horizontal[0];else{const vn=lv(pe,u.glyphMap,u.glyphPositions,u.imagePositions,j,Zt,x,"center",wn,kt,Ie,o.WritingMode.horizontal,!1,en,ne,X);vn&&(he.horizontal[wn]=vn,Yt=vn.positionedLines.length===1)}}Ht()}else{pn==="auto"&&(pn=rx(St));const tn=lv(pe,u.glyphMap,u.glyphPositions,u.imagePositions,j,Zt,x,St,pn,kt,Ie,o.WritingMode.horizontal,!1,en,ne,X);tn&&(he.horizontal[pn]=tn),Ht(),Wc(Ke)&&S&&T&&(he.vertical=lv(pe,u.glyphMap,u.glyphPositions,u.imagePositions,j,Zt,x,St,pn,kt,Ie,o.WritingMode.vertical,!1,en,ne,X))}}let Ze=!1;if(F.icon&&F.icon.name){const Ke=u.imageMap[F.icon.name];Ke&&(Ae=VD(u.imagePositions[F.icon.name],a.get("icon-offset").evaluate(F,{},u.canonical),a.get("icon-anchor").evaluate(F,{},u.canonical)),Ze=!!Ke.sdf,u.bucket.sdfIcons===void 0?u.bucket.sdfIcons=Ze:u.bucket.sdfIcons!==Ze&&B("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(Ke.pixelRatio!==u.bucket.pixelRatio||a.get("icon-rotate").constantOr(1)!==0)&&(u.bucket.iconsNeedLinear=!0))}const st=vS(he.horizontal)||he.vertical;u.bucket.iconsInText=!!st&&st.iconsInText,(st||Ae)&&qD(u.bucket,F,he,Ae,u.imageMap,m,ne,ue,Ie,Ze,u.canonical)}u.showCollisionBoxes&&u.bucket.generateCollisionDebugBuffers()},o.perspective=function(u,a,d,m,x){var S,T=1/Math.tan(a/2);return u[0]=T/d,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=T,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[11]=-1,u[12]=0,u[13]=0,u[15]=0,x!=null&&x!==1/0?(u[10]=(x+m)*(S=1/(m-x)),u[14]=2*x*m*S):(u[10]=-1,u[14]=-2*m),u},o.pick=function(u,a){const d={};for(let m=0;m<a.length;m++){const x=a[m];x in u&&(d[x]=u[x])}return d},o.plugin=ko,o.pointGeometry=re,o.polygonIntersectsPolygon=x3,o.potpack=Q3,o.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],o.register=fn,o.registerForPluginStateChange=function(u){return u({pluginStatus:Yi,pluginURL:Xa}),Zf.on("pluginStateChange",u),u},o.renderColorRamp=R3,o.rotateX=function(u,a,d){var m=Math.sin(d),x=Math.cos(d),S=a[4],T=a[5],L=a[6],F=a[7],j=a[8],X=a[9],ne=a[10],ue=a[11];return a!==u&&(u[0]=a[0],u[1]=a[1],u[2]=a[2],u[3]=a[3],u[12]=a[12],u[13]=a[13],u[14]=a[14],u[15]=a[15]),u[4]=S*x+j*m,u[5]=T*x+X*m,u[6]=L*x+ne*m,u[7]=F*x+ue*m,u[8]=j*x-S*m,u[9]=X*x-T*m,u[10]=ne*x-L*m,u[11]=ue*x-F*m,u},o.rotateZ=function(u,a,d){var m=Math.sin(d),x=Math.cos(d),S=a[0],T=a[1],L=a[2],F=a[3],j=a[4],X=a[5],ne=a[6],ue=a[7];return a!==u&&(u[8]=a[8],u[9]=a[9],u[10]=a[10],u[11]=a[11],u[12]=a[12],u[13]=a[13],u[14]=a[14],u[15]=a[15]),u[0]=S*x+j*m,u[1]=T*x+X*m,u[2]=L*x+ne*m,u[3]=F*x+ue*m,u[4]=j*x-S*m,u[5]=X*x-T*m,u[6]=ne*x-L*m,u[7]=ue*x-F*m,u},o.scale=function(u,a,d){var m=d[0],x=d[1],S=d[2];return u[0]=a[0]*m,u[1]=a[1]*m,u[2]=a[2]*m,u[3]=a[3]*m,u[4]=a[4]*x,u[5]=a[5]*x,u[6]=a[6]*x,u[7]=a[7]*x,u[8]=a[8]*S,u[9]=a[9]*S,u[10]=a[10]*S,u[11]=a[11]*S,u[12]=a[12],u[13]=a[13],u[14]=a[14],u[15]=a[15],u},o.scale$1=function(u,a,d){return u[0]=a[0]*d,u[1]=a[1]*d,u[2]=a[2]*d,u},o.setCacheLimits=function(u,a){ke=u,De=a},o.setRTLTextPlugin=function(u,a,d=!1){if(Yi===Hf||Yi===Wf||Yi===Gf)throw new Error("setRTLTextPlugin cannot be called multiple times.");Xa=ge.resolveURL(u),Yi=Hf,qf=a,yl(),d||Hm()},o.spec=Fe,o.sphericalToCartesian=function([u,a,d]){return a+=90,a*=Math.PI/180,d*=Math.PI/180,{x:u*Math.cos(a)*Math.sin(d),y:u*Math.sin(a)*Math.sin(d),z:u*Math.cos(d)}},o.sqrLen=function(u){var a=u[0],d=u[1];return a*a+d*d},o.sub=function(u,a,d){return u[0]=a[0]-d[0],u[1]=a[1]-d[1],u[2]=a[2]-d[2],u},o.toEvaluationFeature=Vu,o.transformMat3=function(u,a,d){var m=a[0],x=a[1],S=a[2];return u[0]=m*d[0]+x*d[3]+S*d[6],u[1]=m*d[1]+x*d[4]+S*d[7],u[2]=m*d[2]+x*d[5]+S*d[8],u},o.transformMat4=ev,o.transformMat4$1=function(u,a,d){var m=a[0],x=a[1];return u[0]=d[0]*m+d[4]*x+d[12],u[1]=d[1]*m+d[5]*x+d[13],u},o.translate=function(u,a,d){var m,x,S,T,L,F,j,X,ne,ue,he,pe,Ae=d[0],Ie=d[1],Ze=d[2];return a===u?(u[12]=a[0]*Ae+a[4]*Ie+a[8]*Ze+a[12],u[13]=a[1]*Ae+a[5]*Ie+a[9]*Ze+a[13],u[14]=a[2]*Ae+a[6]*Ie+a[10]*Ze+a[14],u[15]=a[3]*Ae+a[7]*Ie+a[11]*Ze+a[15]):(x=a[1],S=a[2],T=a[3],L=a[4],F=a[5],j=a[6],X=a[7],ne=a[8],ue=a[9],he=a[10],pe=a[11],u[0]=m=a[0],u[1]=x,u[2]=S,u[3]=T,u[4]=L,u[5]=F,u[6]=j,u[7]=X,u[8]=ne,u[9]=ue,u[10]=he,u[11]=pe,u[12]=m*Ae+L*Ie+ne*Ze+a[12],u[13]=x*Ae+F*Ie+ue*Ze+a[13],u[14]=S*Ae+j*Ie+he*Ze+a[14],u[15]=T*Ae+X*Ie+pe*Ze+a[15]),u},o.triggerPluginCompletionEvent=Km,o.unicodeBlockLookup=Jt,o.uniqueId=function(){return A++},o.validateCustomStyleLayer=function(u){const a=[],d=u.id;return d===void 0&&a.push({message:`layers.${d}: missing required property "id"`}),u.render===void 0&&a.push({message:`layers.${d}: missing required method "render"`}),u.renderingMode&&u.renderingMode!=="2d"&&u.renderingMode!=="3d"&&a.push({message:`layers.${d}: property "renderingMode" must be either "2d" or "3d"`}),a},o.validateLight=Vf,o.validateStyle=Nu,o.vectorTile=wl,o.warnOnce=B,o.wrap=P}),l(["./shared"],function(o){function h(me){const K=typeof me;if(K==="number"||K==="boolean"||K==="string"||me==null)return JSON.stringify(me);if(Array.isArray(me)){let ae="[";for(const xe of me)ae+=`${h(xe)},`;return`${ae}]`}const G=Object.keys(me).sort();let ce="{";for(let ae=0;ae<G.length;ae++)ce+=`${JSON.stringify(G[ae])}:${h(me[G[ae]])},`;return`${ce}}`}function p(me){let K="";for(const G of o.refProperties)K+=`/${h(me[G])}`;return K}class g{constructor(K){this.keyCache={},K&&this.replace(K)}replace(K){this._layerConfigs={},this._layers={},this.update(K,[])}update(K,G){for(const ae of K){this._layerConfigs[ae.id]=ae;const xe=this._layers[ae.id]=o.createStyleLayer(ae);xe._featureFilter=o.createFilter(xe.filter),this.keyCache[ae.id]&&delete this.keyCache[ae.id]}for(const ae of G)delete this.keyCache[ae],delete this._layerConfigs[ae],delete this._layers[ae];this.familiesBySource={};const ce=function(ae,xe){const Ee={};for(let Ce=0;Ce<ae.length;Ce++){const Oe=xe&&xe[ae[Ce].id]||p(ae[Ce]);xe&&(xe[ae[Ce].id]=Oe);let He=Ee[Oe];He||(He=Ee[Oe]=[]),He.push(ae[Ce])}const be=[];for(const Ce in Ee)be.push(Ee[Ce]);return be}(Object.values(this._layerConfigs),this.keyCache);for(const ae of ce){const xe=ae.map(We=>this._layers[We.id]),Ee=xe[0];if(Ee.visibility==="none")continue;const be=Ee.source||"";let Ce=this.familiesBySource[be];Ce||(Ce=this.familiesBySource[be]={});const Oe=Ee.sourceLayer||"_geojsonTileLayer";let He=Ce[Oe];He||(He=Ce[Oe]=[]),He.push(xe)}}}class b{constructor(K){const G={},ce=[];for(const be in K){const Ce=K[be],Oe=G[be]={};for(const He in Ce){const We=Ce[+He];if(!We||We.bitmap.width===0||We.bitmap.height===0)continue;const Be={x:0,y:0,w:We.bitmap.width+2,h:We.bitmap.height+2};ce.push(Be),Oe[He]={rect:Be,metrics:We.metrics}}}const{w:ae,h:xe}=o.potpack(ce),Ee=new o.AlphaImage({width:ae||1,height:xe||1});for(const be in K){const Ce=K[be];for(const Oe in Ce){const He=Ce[+Oe];if(!He||He.bitmap.width===0||He.bitmap.height===0)continue;const We=G[be][Oe].rect;o.AlphaImage.copy(He.bitmap,Ee,{x:0,y:0},{x:We.x+1,y:We.y+1},He.bitmap)}}this.image=Ee,this.positions=G}}o.register("GlyphAtlas",b);class w{constructor(K){this.tileID=new o.OverscaledTileID(K.tileID.overscaledZ,K.tileID.wrap,K.tileID.canonical.z,K.tileID.canonical.x,K.tileID.canonical.y),this.uid=K.uid,this.zoom=K.zoom,this.pixelRatio=K.pixelRatio,this.tileSize=K.tileSize,this.source=K.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=K.showCollisionBoxes,this.collectResourceTiming=!!K.collectResourceTiming,this.returnDependencies=!!K.returnDependencies,this.promoteId=K.promoteId}parse(K,G,ce,ae,xe){this.status="parsing",this.data=K,this.collisionBoxArray=new o.CollisionBoxArray;const Ee=new o.DictionaryCoder(Object.keys(K.layers).sort()),be=new o.FeatureIndex(this.tileID,this.promoteId);be.bucketLayerIDs=[];const Ce={},Oe={featureIndex:be,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:ce},He=G.familiesBySource[this.source];for(const on in He){const yn=K.layers[on];if(!yn)continue;yn.version===1&&o.warnOnce(`Vector tile source "${this.source}" layer "${on}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const Bn=Ee.encode(on),Jn=[];for(let Dr=0;Dr<yn.length;Dr++){const or=yn.feature(Dr),Pr=be.getId(or,on);Jn.push({feature:or,id:Pr,index:Dr,sourceLayerIndex:Bn})}for(const Dr of He[on]){const or=Dr[0];or.source!==this.source&&o.warnOnce(`layer.source = ${or.source} does not equal this.source = ${this.source}`),or.minzoom&&this.zoom<Math.floor(or.minzoom)||or.maxzoom&&this.zoom>=or.maxzoom||or.visibility!=="none"&&(P(Dr,this.zoom,ce),(Ce[or.id]=or.createBucket({index:be.bucketLayerIDs.length,layers:Dr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Bn,sourceID:this.source})).populate(Jn,Oe,this.tileID.canonical),be.bucketLayerIDs.push(Dr.map(Pr=>Pr.id)))}}let We,Be,Ot,bt;const Je=o.mapObject(Oe.glyphDependencies,on=>Object.keys(on).map(Number));Object.keys(Je).length?ae.send("getGlyphs",{uid:this.uid,stacks:Je},(on,yn)=>{We||(We=on,Be=yn,gn.call(this))}):Be={};const Rt=Object.keys(Oe.iconDependencies);Rt.length?ae.send("getImages",{icons:Rt,source:this.source,tileID:this.tileID,type:"icons"},(on,yn)=>{We||(We=on,Ot=yn,gn.call(this))}):Ot={};const Bt=Object.keys(Oe.patternDependencies);function gn(){if(We)return xe(We);if(Be&&Ot&&bt){const on=new b(Be),yn=new o.ImageAtlas(Ot,bt);for(const Bn in Ce){const Jn=Ce[Bn];Jn instanceof o.SymbolBucket?(P(Jn.layers,this.zoom,ce),o.performSymbolLayout({bucket:Jn,glyphMap:Be,glyphPositions:on.positions,imageMap:Ot,imagePositions:yn.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Jn.hasPattern&&(Jn instanceof o.LineBucket||Jn instanceof o.FillBucket||Jn instanceof o.FillExtrusionBucket)&&(P(Jn.layers,this.zoom,ce),Jn.addFeatures(Oe,this.tileID.canonical,yn.patternPositions))}this.status="done",xe(null,{buckets:Object.values(Ce).filter(Bn=>!Bn.isEmpty()),featureIndex:be,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:on.image,imageAtlas:yn,glyphMap:this.returnDependencies?Be:null,iconMap:this.returnDependencies?Ot:null,glyphPositions:this.returnDependencies?on.positions:null})}}Bt.length?ae.send("getImages",{icons:Bt,source:this.source,tileID:this.tileID,type:"patterns"},(on,yn)=>{We||(We=on,bt=yn,gn.call(this))}):bt={},gn.call(this)}}function P(me,K,G){const ce=new o.EvaluationParameters(K);for(const ae of me)ae.recalculate(ce,G)}function I(me,K){const G=o.getArrayBuffer(me.request,(ce,ae,xe,Ee)=>{ce?K(ce):ae&&K(null,{vectorTile:new o.vectorTile.VectorTile(new o.pbf(ae)),rawData:ae,cacheControl:xe,expires:Ee})});return()=>{G.cancel(),K()}}class A{constructor(K,G,ce,ae){this.actor=K,this.layerIndex=G,this.availableImages=ce,this.loadVectorData=ae||I,this.loading={},this.loaded={}}loadTile(K,G){const ce=K.uid;this.loading||(this.loading={});const ae=!!(K&&K.request&&K.request.collectResourceTiming)&&new o.RequestPerformance(K.request),xe=this.loading[ce]=new w(K);xe.abort=this.loadVectorData(K,(Ee,be)=>{if(delete this.loading[ce],Ee||!be)return xe.status="done",this.loaded[ce]=xe,G(Ee);const Ce=be.rawData,Oe={};be.expires&&(Oe.expires=be.expires),be.cacheControl&&(Oe.cacheControl=be.cacheControl);const He={};if(ae){const We=ae.finish();We&&(He.resourceTiming=JSON.parse(JSON.stringify(We)))}xe.vectorTile=be.vectorTile,xe.parse(be.vectorTile,this.layerIndex,this.availableImages,this.actor,(We,Be)=>{if(We||!Be)return G(We);G(null,o.extend({rawTileData:Ce.slice(0)},Be,Oe,He))}),this.loaded=this.loaded||{},this.loaded[ce]=xe})}reloadTile(K,G){const ce=this.loaded,ae=K.uid,xe=this;if(ce&&ce[ae]){const Ee=ce[ae];Ee.showCollisionBoxes=K.showCollisionBoxes;const be=(Ce,Oe)=>{const He=Ee.reloadCallback;He&&(delete Ee.reloadCallback,Ee.parse(Ee.vectorTile,xe.layerIndex,this.availableImages,xe.actor,He)),G(Ce,Oe)};Ee.status==="parsing"?Ee.reloadCallback=be:Ee.status==="done"&&(Ee.vectorTile?Ee.parse(Ee.vectorTile,this.layerIndex,this.availableImages,this.actor,be):be())}}abortTile(K,G){const ce=this.loading,ae=K.uid;ce&&ce[ae]&&ce[ae].abort&&(ce[ae].abort(),delete ce[ae]),G()}removeTile(K,G){const ce=this.loaded,ae=K.uid;ce&&ce[ae]&&delete ce[ae],G()}}class O{constructor(){this.loaded={}}loadTile(K,G){const{uid:ce,encoding:ae,rawImageData:xe}=K,Ee=o.isImageBitmap(xe)?this.getImageData(xe):xe,be=new o.DEMData(ce,Ee,ae);this.loaded=this.loaded||{},this.loaded[ce]=be,G(null,be)}getImageData(K){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(K.width,K.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=K.width,this.offscreenCanvas.height=K.height,this.offscreenCanvasContext.drawImage(K,0,0,K.width,K.height);const G=this.offscreenCanvasContext.getImageData(-1,-1,K.width+2,K.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new o.RGBAImage({width:G.width,height:G.height},G.data)}removeTile(K){const G=this.loaded,ce=K.uid;G&&G[ce]&&delete G[ce]}}var M=function me(K,G){var ce,ae=K&&K.type;if(ae==="FeatureCollection")for(ce=0;ce<K.features.length;ce++)me(K.features[ce],G);else if(ae==="GeometryCollection")for(ce=0;ce<K.geometries.length;ce++)me(K.geometries[ce],G);else if(ae==="Feature")me(K.geometry,G);else if(ae==="Polygon")R(K.coordinates,G);else if(ae==="MultiPolygon")for(ce=0;ce<K.coordinates.length;ce++)R(K.coordinates[ce],G);return K};function R(me,K){if(me.length!==0){N(me[0],K);for(var G=1;G<me.length;G++)N(me[G],!K)}}function N(me,K){for(var G=0,ce=0,ae=0,xe=me.length,Ee=xe-1;ae<xe;Ee=ae++){var be=(me[ae][0]-me[Ee][0])*(me[Ee][1]+me[ae][1]),Ce=G+be;ce+=Math.abs(G)>=Math.abs(be)?G-Ce+be:be-Ce+G,G=Ce}G+ce>=0!=!!K&&me.reverse()}const z=o.vectorTile.VectorTileFeature.prototype.toGeoJSON;class B{constructor(K){this._feature=K,this.extent=o.EXTENT,this.type=K.type,this.properties=K.tags,"id"in K&&!isNaN(K.id)&&(this.id=parseInt(K.id,10))}loadGeometry(){if(this._feature.type===1){const K=[];for(const G of this._feature.geometry)K.push([new o.pointGeometry(G[0],G[1])]);return K}{const K=[];for(const G of this._feature.geometry){const ce=[];for(const ae of G)ce.push(new o.pointGeometry(ae[0],ae[1]));K.push(ce)}return K}}toGeoJSON(K,G,ce){return z.call(this,K,G,ce)}}class U{constructor(K){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=o.EXTENT,this.length=K.length,this._features=K}feature(K){return new B(this._features[K])}}var q={exports:{}},H=o.pointGeometry,te=o.vectorTile.VectorTileFeature,Y=le;function le(me,K){this.options=K||{},this.features=me,this.length=me.length}function J(me,K){this.id=typeof me.id=="number"?me.id:void 0,this.type=me.type,this.rawGeometry=me.type===1?[me.geometry]:me.geometry,this.properties=me.tags,this.extent=K||4096}le.prototype.feature=function(me){return new J(this.features[me],this.options.extent)},J.prototype.loadGeometry=function(){var me=this.rawGeometry;this.geometry=[];for(var K=0;K<me.length;K++){for(var G=me[K],ce=[],ae=0;ae<G.length;ae++)ce.push(new H(G[ae][0],G[ae][1]));this.geometry.push(ce)}return this.geometry},J.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var me=this.geometry,K=1/0,G=-1/0,ce=1/0,ae=-1/0,xe=0;xe<me.length;xe++)for(var Ee=me[xe],be=0;be<Ee.length;be++){var Ce=Ee[be];K=Math.min(K,Ce.x),G=Math.max(G,Ce.x),ce=Math.min(ce,Ce.y),ae=Math.max(ae,Ce.y)}return[K,ce,G,ae]},J.prototype.toGeoJSON=te.prototype.toGeoJSON;var Z=o.pbf,Q=Y;function ge(me){var K=new Z;return function(G,ce){for(var ae in G.layers)ce.writeMessage(3,re,G.layers[ae])}(me,K),K.finish()}function re(me,K){var G;K.writeVarintField(15,me.version||1),K.writeStringField(1,me.name||""),K.writeVarintField(5,me.extent||4096);var ce={keys:[],values:[],keycache:{},valuecache:{}};for(G=0;G<me.length;G++)ce.feature=me.feature(G),K.writeMessage(2,de,ce);var ae=ce.keys;for(G=0;G<ae.length;G++)K.writeStringField(3,ae[G]);var xe=ce.values;for(G=0;G<xe.length;G++)K.writeMessage(4,ke,xe[G])}function de(me,K){var G=me.feature;G.id!==void 0&&K.writeVarintField(1,G.id),K.writeMessage(2,oe,me),K.writeVarintField(3,G.type),K.writeMessage(4,Te,G)}function oe(me,K){var G=me.feature,ce=me.keys,ae=me.values,xe=me.keycache,Ee=me.valuecache;for(var be in G.properties){var Ce=G.properties[be],Oe=xe[be];if(Ce!==null){Oe===void 0&&(ce.push(be),xe[be]=Oe=ce.length-1),K.writeVarint(Oe);var He=typeof Ce;He!=="string"&&He!=="boolean"&&He!=="number"&&(Ce=JSON.stringify(Ce));var We=He+":"+Ce,Be=Ee[We];Be===void 0&&(ae.push(Ce),Ee[We]=Be=ae.length-1),K.writeVarint(Be)}}}function ye(me,K){return(K<<3)+(7&me)}function Re(me){return me<<1^me>>31}function Te(me,K){for(var G=me.loadGeometry(),ce=me.type,ae=0,xe=0,Ee=G.length,be=0;be<Ee;be++){var Ce=G[be],Oe=1;ce===1&&(Oe=Ce.length),K.writeVarint(ye(1,Oe));for(var He=ce===3?Ce.length-1:Ce.length,We=0;We<He;We++){We===1&&ce!==1&&K.writeVarint(ye(2,He-1));var Be=Ce[We].x-ae,Ot=Ce[We].y-xe;K.writeVarint(Re(Be)),K.writeVarint(Re(Ot)),ae+=Be,xe+=Ot}ce===3&&K.writeVarint(ye(7,1))}}function ke(me,K){var G=typeof me;G==="string"?K.writeStringField(1,me):G==="boolean"?K.writeBooleanField(7,me):G==="number"&&(me%1!=0?K.writeDoubleField(3,me):me<0?K.writeSVarintField(6,me):K.writeVarintField(5,me))}function De(me,K,G,ce,ae,xe){if(ae-ce<=G)return;const Ee=ce+ae>>1;Me(me,K,Ee,ce,ae,xe%2),De(me,K,G,ce,Ee-1,xe+1),De(me,K,G,Ee+1,ae,xe+1)}function Me(me,K,G,ce,ae,xe){for(;ae>ce;){if(ae-ce>600){const Oe=ae-ce+1,He=G-ce+1,We=Math.log(Oe),Be=.5*Math.exp(2*We/3),Ot=.5*Math.sqrt(We*Be*(Oe-Be)/Oe)*(He-Oe/2<0?-1:1);Me(me,K,G,Math.max(ce,Math.floor(G-He*Be/Oe+Ot)),Math.min(ae,Math.floor(G+(Oe-He)*Be/Oe+Ot)),xe)}const Ee=K[2*G+xe];let be=ce,Ce=ae;for(Ne(me,K,ce,G),K[2*ae+xe]>Ee&&Ne(me,K,ce,ae);be<Ce;){for(Ne(me,K,be,Ce),be++,Ce--;K[2*be+xe]<Ee;)be++;for(;K[2*Ce+xe]>Ee;)Ce--}K[2*ce+xe]===Ee?Ne(me,K,ce,Ce):(Ce++,Ne(me,K,Ce,ae)),Ce<=G&&(ce=Ce+1),G<=Ce&&(ae=Ce-1)}}function Ne(me,K,G,ce){Le(me,G,ce),Le(K,2*G,2*ce),Le(K,2*G+1,2*ce+1)}function Le(me,K,G){const ce=me[K];me[K]=me[G],me[G]=ce}function Ve(me,K,G,ce){const ae=me-G,xe=K-ce;return ae*ae+xe*xe}q.exports=ge,q.exports.fromVectorTileJs=ge,q.exports.fromGeojsonVt=function(me,K){K=K||{};var G={};for(var ce in me)G[ce]=new Q(me[ce].features,K),G[ce].name=ce,G[ce].version=K.version,G[ce].extent=K.extent;return ge({layers:G})},q.exports.GeoJSONWrapper=Q;const qe=me=>me[0],Ue=me=>me[1];class ct{constructor(K,G=qe,ce=Ue,ae=64,xe=Float64Array){this.nodeSize=ae,this.points=K;const Ee=K.length<65536?Uint16Array:Uint32Array,be=this.ids=new Ee(K.length),Ce=this.coords=new xe(2*K.length);for(let Oe=0;Oe<K.length;Oe++)be[Oe]=Oe,Ce[2*Oe]=G(K[Oe]),Ce[2*Oe+1]=ce(K[Oe]);De(be,Ce,ae,0,be.length-1,0)}range(K,G,ce,ae){return function(xe,Ee,be,Ce,Oe,He,We){const Be=[0,xe.length-1,0],Ot=[];let bt,Je;for(;Be.length;){const Rt=Be.pop(),Bt=Be.pop(),gn=Be.pop();if(Bt-gn<=We){for(let Bn=gn;Bn<=Bt;Bn++)bt=Ee[2*Bn],Je=Ee[2*Bn+1],bt>=be&&bt<=Oe&&Je>=Ce&&Je<=He&&Ot.push(xe[Bn]);continue}const on=Math.floor((gn+Bt)/2);bt=Ee[2*on],Je=Ee[2*on+1],bt>=be&&bt<=Oe&&Je>=Ce&&Je<=He&&Ot.push(xe[on]);const yn=(Rt+1)%2;(Rt===0?be<=bt:Ce<=Je)&&(Be.push(gn),Be.push(on-1),Be.push(yn)),(Rt===0?Oe>=bt:He>=Je)&&(Be.push(on+1),Be.push(Bt),Be.push(yn))}return Ot}(this.ids,this.coords,K,G,ce,ae,this.nodeSize)}within(K,G,ce){return function(ae,xe,Ee,be,Ce,Oe){const He=[0,ae.length-1,0],We=[],Be=Ce*Ce;for(;He.length;){const Ot=He.pop(),bt=He.pop(),Je=He.pop();if(bt-Je<=Oe){for(let yn=Je;yn<=bt;yn++)Ve(xe[2*yn],xe[2*yn+1],Ee,be)<=Be&&We.push(ae[yn]);continue}const Rt=Math.floor((Je+bt)/2),Bt=xe[2*Rt],gn=xe[2*Rt+1];Ve(Bt,gn,Ee,be)<=Be&&We.push(ae[Rt]);const on=(Ot+1)%2;(Ot===0?Ee-Ce<=Bt:be-Ce<=gn)&&(He.push(Je),He.push(Rt-1),He.push(on)),(Ot===0?Ee+Ce>=Bt:be+Ce>=gn)&&(He.push(Rt+1),He.push(bt),He.push(on))}return We}(this.ids,this.coords,K,G,ce,this.nodeSize)}}const pt={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:me=>me},Tt=Math.fround||(Xe=new Float32Array(1),me=>(Xe[0]=+me,Xe[0]));var Xe;class Pt{constructor(K){this.options=it(Object.create(pt),K),this.trees=new Array(this.options.maxZoom+1)}load(K){const{log:G,minZoom:ce,maxZoom:ae,nodeSize:xe}=this.options;G&&console.time("total time");const Ee=`prepare ${K.length} points`;G&&console.time(Ee),this.points=K;let be=[];for(let Ce=0;Ce<K.length;Ce++)K[Ce].geometry&&be.push(Mt(K[Ce],Ce));this.trees[ae+1]=new ct(be,ft,xt,xe,Float32Array),G&&console.timeEnd(Ee);for(let Ce=ae;Ce>=ce;Ce--){const Oe=+Date.now();be=this._cluster(be,Ce),this.trees[Ce]=new ct(be,ft,xt,xe,Float32Array),G&&console.log("z%d: %d clusters in %dms",Ce,be.length,+Date.now()-Oe)}return G&&console.timeEnd("total time"),this}getClusters(K,G){let ce=((K[0]+180)%360+360)%360-180;const ae=Math.max(-90,Math.min(90,K[1]));let xe=K[2]===180?180:((K[2]+180)%360+360)%360-180;const Ee=Math.max(-90,Math.min(90,K[3]));if(K[2]-K[0]>=360)ce=-180,xe=180;else if(ce>xe){const He=this.getClusters([ce,ae,180,Ee],G),We=this.getClusters([-180,ae,xe,Ee],G);return He.concat(We)}const be=this.trees[this._limitZoom(G)],Ce=be.range(lt(ce),dt(Ee),lt(xe),dt(ae)),Oe=[];for(const He of Ce){const We=be.points[He];Oe.push(We.numPoints?Ct(We):this.points[We.index])}return Oe}getChildren(K){const G=this._getOriginId(K),ce=this._getOriginZoom(K),ae="No cluster with the specified id.",xe=this.trees[ce];if(!xe)throw new Error(ae);const Ee=xe.points[G];if(!Ee)throw new Error(ae);const be=this.options.radius/(this.options.extent*Math.pow(2,ce-1)),Ce=xe.within(Ee.x,Ee.y,be),Oe=[];for(const He of Ce){const We=xe.points[He];We.parentId===K&&Oe.push(We.numPoints?Ct(We):this.points[We.index])}if(Oe.length===0)throw new Error(ae);return Oe}getLeaves(K,G,ce){const ae=[];return this._appendLeaves(ae,K,G=G||10,ce=ce||0,0),ae}getTile(K,G,ce){const ae=this.trees[this._limitZoom(K)],xe=Math.pow(2,K),{extent:Ee,radius:be}=this.options,Ce=be/Ee,Oe=(ce-Ce)/xe,He=(ce+1+Ce)/xe,We={features:[]};return this._addTileFeatures(ae.range((G-Ce)/xe,Oe,(G+1+Ce)/xe,He),ae.points,G,ce,xe,We),G===0&&this._addTileFeatures(ae.range(1-Ce/xe,Oe,1,He),ae.points,xe,ce,xe,We),G===xe-1&&this._addTileFeatures(ae.range(0,Oe,Ce/xe,He),ae.points,-1,ce,xe,We),We.features.length?We:null}getClusterExpansionZoom(K){let G=this._getOriginZoom(K)-1;for(;G<=this.options.maxZoom;){const ce=this.getChildren(K);if(G++,ce.length!==1)break;K=ce[0].properties.cluster_id}return G}_appendLeaves(K,G,ce,ae,xe){const Ee=this.getChildren(G);for(const be of Ee){const Ce=be.properties;if(Ce&&Ce.cluster?xe+Ce.point_count<=ae?xe+=Ce.point_count:xe=this._appendLeaves(K,Ce.cluster_id,ce,ae,xe):xe<ae?xe++:K.push(be),K.length===ce)break}return xe}_addTileFeatures(K,G,ce,ae,xe,Ee){for(const be of K){const Ce=G[be],Oe=Ce.numPoints;let He,We,Be;if(Oe)He=Lt(Ce),We=Ce.x,Be=Ce.y;else{const Je=this.points[Ce.index];He=Je.properties,We=lt(Je.geometry.coordinates[0]),Be=dt(Je.geometry.coordinates[1])}const Ot={type:1,geometry:[[Math.round(this.options.extent*(We*xe-ce)),Math.round(this.options.extent*(Be*xe-ae))]],tags:He};let bt;Oe?bt=Ce.id:this.options.generateId?bt=Ce.index:this.points[Ce.index].id&&(bt=this.points[Ce.index].id),bt!==void 0&&(Ot.id=bt),Ee.features.push(Ot)}}_limitZoom(K){return Math.max(this.options.minZoom,Math.min(Math.floor(+K),this.options.maxZoom+1))}_cluster(K,G){const ce=[],{radius:ae,extent:xe,reduce:Ee,minPoints:be}=this.options,Ce=ae/(xe*Math.pow(2,G));for(let Oe=0;Oe<K.length;Oe++){const He=K[Oe];if(He.zoom<=G)continue;He.zoom=G;const We=this.trees[G+1],Be=We.within(He.x,He.y,Ce),Ot=He.numPoints||1;let bt=Ot;for(const Je of Be){const Rt=We.points[Je];Rt.zoom>G&&(bt+=Rt.numPoints||1)}if(bt>Ot&&bt>=be){let Je=He.x*Ot,Rt=He.y*Ot,Bt=Ee&&Ot>1?this._map(He,!0):null;const gn=(Oe<<5)+(G+1)+this.points.length;for(const on of Be){const yn=We.points[on];if(yn.zoom<=G)continue;yn.zoom=G;const Bn=yn.numPoints||1;Je+=yn.x*Bn,Rt+=yn.y*Bn,yn.parentId=gn,Ee&&(Bt||(Bt=this._map(He,!0)),Ee(Bt,this._map(yn)))}He.parentId=gn,ce.push(mt(Je/bt,Rt/bt,gn,bt,Bt))}else if(ce.push(He),bt>1)for(const Je of Be){const Rt=We.points[Je];Rt.zoom<=G||(Rt.zoom=G,ce.push(Rt))}}return ce}_getOriginId(K){return K-this.points.length>>5}_getOriginZoom(K){return(K-this.points.length)%32}_map(K,G){if(K.numPoints)return G?it({},K.properties):K.properties;const ce=this.points[K.index].properties,ae=this.options.map(ce);return G&&ae===ce?it({},ae):ae}}function mt(me,K,G,ce,ae){return{x:Tt(me),y:Tt(K),zoom:1/0,id:G,parentId:-1,numPoints:ce,properties:ae}}function Mt(me,K){const[G,ce]=me.geometry.coordinates;return{x:Tt(lt(G)),y:Tt(dt(ce)),zoom:1/0,index:K,parentId:-1}}function Ct(me){return{type:"Feature",id:me.id,properties:Lt(me),geometry:{type:"Point",coordinates:[(K=me.x,360*(K-.5)),ut(me.y)]}};var K}function Lt(me){const K=me.numPoints,G=K>=1e4?`${Math.round(K/1e3)}k`:K>=1e3?Math.round(K/100)/10+"k":K;return it(it({},me.properties),{cluster:!0,cluster_id:me.id,point_count:K,point_count_abbreviated:G})}function lt(me){return me/360+.5}function dt(me){const K=Math.sin(me*Math.PI/180),G=.5-.25*Math.log((1+K)/(1-K))/Math.PI;return G<0?0:G>1?1:G}function ut(me){const K=(180-360*me)*Math.PI/180;return 360*Math.atan(Math.exp(K))/Math.PI-90}function it(me,K){for(const G in K)me[G]=K[G];return me}function ft(me){return me.x}function xt(me){return me.y}function Wt(me,K,G,ce){for(var ae,xe=ce,Ee=G-K>>1,be=G-K,Ce=me[K],Oe=me[K+1],He=me[G],We=me[G+1],Be=K+3;Be<G;Be+=3){var Ot=Ut(me[Be],me[Be+1],Ce,Oe,He,We);if(Ot>xe)ae=Be,xe=Ot;else if(Ot===xe){var bt=Math.abs(Be-Ee);bt<be&&(ae=Be,be=bt)}}xe>ce&&(ae-K>3&&Wt(me,K,ae,ce),me[ae+2]=xe,G-ae>3&&Wt(me,ae,G,ce))}function Ut(me,K,G,ce,ae,xe){var Ee=ae-G,be=xe-ce;if(Ee!==0||be!==0){var Ce=((me-G)*Ee+(K-ce)*be)/(Ee*Ee+be*be);Ce>1?(G=ae,ce=xe):Ce>0&&(G+=Ee*Ce,ce+=be*Ce)}return(Ee=me-G)*Ee+(be=K-ce)*be}function Qt(me,K,G,ce){var ae={id:me===void 0?null:me,type:K,geometry:G,tags:ce,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(xe){var Ee=xe.geometry,be=xe.type;if(be==="Point"||be==="MultiPoint"||be==="LineString")Fe(xe,Ee);else if(be==="Polygon"||be==="MultiLineString")for(var Ce=0;Ce<Ee.length;Ce++)Fe(xe,Ee[Ce]);else if(be==="MultiPolygon")for(Ce=0;Ce<Ee.length;Ce++)for(var Oe=0;Oe<Ee[Ce].length;Oe++)Fe(xe,Ee[Ce][Oe])}(ae),ae}function Fe(me,K){for(var G=0;G<K.length;G+=3)me.minX=Math.min(me.minX,K[G]),me.minY=Math.min(me.minY,K[G+1]),me.maxX=Math.max(me.maxX,K[G]),me.maxY=Math.max(me.maxY,K[G+1])}function Ge(me,K,G,ce){if(K.geometry){var ae=K.geometry.coordinates,xe=K.geometry.type,Ee=Math.pow(G.tolerance/((1<<G.maxZoom)*G.extent),2),be=[],Ce=K.id;if(G.promoteId?Ce=K.properties[G.promoteId]:G.generateId&&(Ce=ce||0),xe==="Point")Xt(ae,be);else if(xe==="MultiPoint")for(var Oe=0;Oe<ae.length;Oe++)Xt(ae[Oe],be);else if(xe==="LineString")dn(ae,be,Ee,!1);else if(xe==="MultiLineString"){if(G.lineMetrics){for(Oe=0;Oe<ae.length;Oe++)dn(ae[Oe],be=[],Ee,!1),me.push(Qt(Ce,"LineString",be,K.properties));return}Vt(ae,be,Ee,!1)}else if(xe==="Polygon")Vt(ae,be,Ee,!0);else{if(xe!=="MultiPolygon"){if(xe==="GeometryCollection"){for(Oe=0;Oe<K.geometry.geometries.length;Oe++)Ge(me,{id:Ce,geometry:K.geometry.geometries[Oe],properties:K.properties},G,ce);return}throw new Error("Input data is not a valid GeoJSON object.")}for(Oe=0;Oe<ae.length;Oe++){var He=[];Vt(ae[Oe],He,Ee,!0),be.push(He)}}me.push(Qt(Ce,xe,be,K.properties))}}function Xt(me,K){K.push(jt(me[0])),K.push(nn(me[1])),K.push(0)}function dn(me,K,G,ce){for(var ae,xe,Ee=0,be=0;be<me.length;be++){var Ce=jt(me[be][0]),Oe=nn(me[be][1]);K.push(Ce),K.push(Oe),K.push(0),be>0&&(Ee+=ce?(ae*Oe-Ce*xe)/2:Math.sqrt(Math.pow(Ce-ae,2)+Math.pow(Oe-xe,2))),ae=Ce,xe=Oe}var He=K.length-3;K[2]=1,Wt(K,0,He,G),K[He+2]=1,K.size=Math.abs(Ee),K.start=0,K.end=K.size}function Vt(me,K,G,ce){for(var ae=0;ae<me.length;ae++){var xe=[];dn(me[ae],xe,G,ce),K.push(xe)}}function jt(me){return me/360+.5}function nn(me){var K=Math.sin(me*Math.PI/180),G=.5-.25*Math.log((1+K)/(1-K))/Math.PI;return G<0?0:G>1?1:G}function _n(me,K,G,ce,ae,xe,Ee,be){if(ce/=K,xe>=(G/=K)&&Ee<ce)return me;if(Ee<G||xe>=ce)return null;for(var Ce=[],Oe=0;Oe<me.length;Oe++){var He=me[Oe],We=He.geometry,Be=He.type,Ot=ae===0?He.minX:He.minY,bt=ae===0?He.maxX:He.maxY;if(Ot>=G&&bt<ce)Ce.push(He);else if(!(bt<G||Ot>=ce)){var Je=[];if(Be==="Point"||Be==="MultiPoint")An(We,Je,G,ce,ae);else if(Be==="LineString")_t(We,Je,G,ce,ae,!1,be.lineMetrics);else if(Be==="MultiLineString")an(We,Je,G,ce,ae,!1);else if(Be==="Polygon")an(We,Je,G,ce,ae,!0);else if(Be==="MultiPolygon")for(var Rt=0;Rt<We.length;Rt++){var Bt=[];an(We[Rt],Bt,G,ce,ae,!0),Bt.length&&Je.push(Bt)}if(Je.length){if(be.lineMetrics&&Be==="LineString"){for(Rt=0;Rt<Je.length;Rt++)Ce.push(Qt(He.id,Be,Je[Rt],He.tags));continue}Be!=="LineString"&&Be!=="MultiLineString"||(Je.length===1?(Be="LineString",Je=Je[0]):Be="MultiLineString"),Be!=="Point"&&Be!=="MultiPoint"||(Be=Je.length===3?"Point":"MultiPoint"),Ce.push(Qt(He.id,Be,Je,He.tags))}}}return Ce.length?Ce:null}function An(me,K,G,ce,ae){for(var xe=0;xe<me.length;xe+=3){var Ee=me[xe+ae];Ee>=G&&Ee<=ce&&(K.push(me[xe]),K.push(me[xe+1]),K.push(me[xe+2]))}}function _t(me,K,G,ce,ae,xe,Ee){for(var be,Ce,Oe=Gt(me),He=ae===0?kn:zt,We=me.start,Be=0;Be<me.length-3;Be+=3){var Ot=me[Be],bt=me[Be+1],Je=me[Be+2],Rt=me[Be+3],Bt=me[Be+4],gn=ae===0?Ot:bt,on=ae===0?Rt:Bt,yn=!1;Ee&&(be=Math.sqrt(Math.pow(Ot-Rt,2)+Math.pow(bt-Bt,2))),gn<G?on>G&&(Ce=He(Oe,Ot,bt,Rt,Bt,G),Ee&&(Oe.start=We+be*Ce)):gn>ce?on<ce&&(Ce=He(Oe,Ot,bt,Rt,Bt,ce),Ee&&(Oe.start=We+be*Ce)):Fn(Oe,Ot,bt,Je),on<G&&gn>=G&&(Ce=He(Oe,Ot,bt,Rt,Bt,G),yn=!0),on>ce&&gn<=ce&&(Ce=He(Oe,Ot,bt,Rt,Bt,ce),yn=!0),!xe&&yn&&(Ee&&(Oe.end=We+be*Ce),K.push(Oe),Oe=Gt(me)),Ee&&(We+=be)}var Bn=me.length-3;Ot=me[Bn],bt=me[Bn+1],Je=me[Bn+2],(gn=ae===0?Ot:bt)>=G&&gn<=ce&&Fn(Oe,Ot,bt,Je),Bn=Oe.length-3,xe&&Bn>=3&&(Oe[Bn]!==Oe[0]||Oe[Bn+1]!==Oe[1])&&Fn(Oe,Oe[0],Oe[1],Oe[2]),Oe.length&&K.push(Oe)}function Gt(me){var K=[];return K.size=me.size,K.start=me.start,K.end=me.end,K}function an(me,K,G,ce,ae,xe){for(var Ee=0;Ee<me.length;Ee++)_t(me[Ee],K,G,ce,ae,xe,!1)}function Fn(me,K,G,ce){me.push(K),me.push(G),me.push(ce)}function kn(me,K,G,ce,ae,xe){var Ee=(xe-K)/(ce-K);return me.push(xe),me.push(G+(ae-G)*Ee),me.push(1),Ee}function zt(me,K,G,ce,ae,xe){var Ee=(xe-G)/(ae-G);return me.push(K+(ce-K)*Ee),me.push(xe),me.push(1),Ee}function Tn(me,K){for(var G=[],ce=0;ce<me.length;ce++){var ae,xe=me[ce],Ee=xe.type;if(Ee==="Point"||Ee==="MultiPoint"||Ee==="LineString")ae=Cn(xe.geometry,K);else if(Ee==="MultiLineString"||Ee==="Polygon"){ae=[];for(var be=0;be<xe.geometry.length;be++)ae.push(Cn(xe.geometry[be],K))}else if(Ee==="MultiPolygon")for(ae=[],be=0;be<xe.geometry.length;be++){for(var Ce=[],Oe=0;Oe<xe.geometry[be].length;Oe++)Ce.push(Cn(xe.geometry[be][Oe],K));ae.push(Ce)}G.push(Qt(xe.id,Ee,ae,xe.tags))}return G}function Cn(me,K){var G=[];G.size=me.size,me.start!==void 0&&(G.start=me.start,G.end=me.end);for(var ce=0;ce<me.length;ce+=3)G.push(me[ce]+K,me[ce+1],me[ce+2]);return G}function hn(me,K){if(me.transformed)return me;var G,ce,ae,xe=1<<me.z,Ee=me.x,be=me.y;for(G=0;G<me.features.length;G++){var Ce=me.features[G],Oe=Ce.geometry,He=Ce.type;if(Ce.geometry=[],He===1)for(ce=0;ce<Oe.length;ce+=2)Ce.geometry.push(Nt(Oe[ce],Oe[ce+1],K,xe,Ee,be));else for(ce=0;ce<Oe.length;ce++){var We=[];for(ae=0;ae<Oe[ce].length;ae+=2)We.push(Nt(Oe[ce][ae],Oe[ce][ae+1],K,xe,Ee,be));Ce.geometry.push(We)}}return me.transformed=!0,me}function Nt(me,K,G,ce,ae,xe){return[Math.round(G*(me*ce-ae)),Math.round(G*(K*ce-xe))]}function ot(me,K,G,ce,ae){for(var xe=K===ae.maxZoom?0:ae.tolerance/((1<<K)*ae.extent),Ee={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:G,y:ce,z:K,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},be=0;be<me.length;be++){Ee.numFeatures++,ht(Ee,me[be],xe,ae);var Ce=me[be].minX,Oe=me[be].minY,He=me[be].maxX,We=me[be].maxY;Ce<Ee.minX&&(Ee.minX=Ce),Oe<Ee.minY&&(Ee.minY=Oe),He>Ee.maxX&&(Ee.maxX=He),We>Ee.maxY&&(Ee.maxY=We)}return Ee}function ht(me,K,G,ce){var ae=K.geometry,xe=K.type,Ee=[];if(xe==="Point"||xe==="MultiPoint")for(var be=0;be<ae.length;be+=3)Ee.push(ae[be]),Ee.push(ae[be+1]),me.numPoints++,me.numSimplified++;else if(xe==="LineString")At(Ee,ae,me,G,!1,!1);else if(xe==="MultiLineString"||xe==="Polygon")for(be=0;be<ae.length;be++)At(Ee,ae[be],me,G,xe==="Polygon",be===0);else if(xe==="MultiPolygon")for(var Ce=0;Ce<ae.length;Ce++){var Oe=ae[Ce];for(be=0;be<Oe.length;be++)At(Ee,Oe[be],me,G,!0,be===0)}if(Ee.length){var He=K.tags||null;if(xe==="LineString"&&ce.lineMetrics){for(var We in He={},K.tags)He[We]=K.tags[We];He.mapbox_clip_start=ae.start/ae.size,He.mapbox_clip_end=ae.end/ae.size}var Be={geometry:Ee,type:xe==="Polygon"||xe==="MultiPolygon"?3:xe==="LineString"||xe==="MultiLineString"?2:1,tags:He};K.id!==null&&(Be.id=K.id),me.features.push(Be)}}function At(me,K,G,ce,ae,xe){var Ee=ce*ce;if(ce>0&&K.size<(ae?Ee:ce))G.numPoints+=K.length/3;else{for(var be=[],Ce=0;Ce<K.length;Ce+=3)(ce===0||K[Ce+2]>Ee)&&(G.numSimplified++,be.push(K[Ce]),be.push(K[Ce+1])),G.numPoints++;ae&&function(Oe,He){for(var We=0,Be=0,Ot=Oe.length,bt=Ot-2;Be<Ot;bt=Be,Be+=2)We+=(Oe[Be]-Oe[bt])*(Oe[Be+1]+Oe[bt+1]);if(We>0===He)for(Be=0,Ot=Oe.length;Be<Ot/2;Be+=2){var Je=Oe[Be],Rt=Oe[Be+1];Oe[Be]=Oe[Ot-2-Be],Oe[Be+1]=Oe[Ot-1-Be],Oe[Ot-2-Be]=Je,Oe[Ot-1-Be]=Rt}}(be,xe),me.push(be)}}function $t(me,K){var G=(K=this.options=function(ae,xe){for(var Ee in xe)ae[Ee]=xe[Ee];return ae}(Object.create(this.options),K)).debug;if(G&&console.time("preprocess data"),K.maxZoom<0||K.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(K.promoteId&&K.generateId)throw new Error("promoteId and generateId cannot be used together.");var ce=function(ae,xe){var Ee=[];if(ae.type==="FeatureCollection")for(var be=0;be<ae.features.length;be++)Ge(Ee,ae.features[be],xe,be);else Ge(Ee,ae.type==="Feature"?ae:{geometry:ae},xe);return Ee}(me,K);this.tiles={},this.tileCoords=[],G&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",K.indexMaxZoom,K.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),ce=function(ae,xe){var Ee=xe.buffer/xe.extent,be=ae,Ce=_n(ae,1,-1-Ee,Ee,0,-1,2,xe),Oe=_n(ae,1,1-Ee,2+Ee,0,-1,2,xe);return(Ce||Oe)&&(be=_n(ae,1,-Ee,1+Ee,0,-1,2,xe)||[],Ce&&(be=Tn(Ce,1).concat(be)),Oe&&(be=be.concat(Tn(Oe,-1)))),be}(ce,K),ce.length&&this.splitTile(ce,0,0,0),G&&(ce.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function cn(me,K,G){return 32*((1<<me)*G+K)+me}function Mn(me,K){const G=me.tileID.canonical;if(!this._geoJSONIndex)return K(null,null);const ce=this._geoJSONIndex.getTile(G.z,G.x,G.y);if(!ce)return K(null,null);const ae=new U(ce.features);let xe=q.exports(ae);xe.byteOffset===0&&xe.byteLength===xe.buffer.byteLength||(xe=new Uint8Array(xe)),K(null,{vectorTile:ae,rawData:xe.buffer})}$t.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},$t.prototype.splitTile=function(me,K,G,ce,ae,xe,Ee){for(var be=[me,K,G,ce],Ce=this.options,Oe=Ce.debug;be.length;){ce=be.pop(),G=be.pop(),K=be.pop(),me=be.pop();var He=1<<K,We=cn(K,G,ce),Be=this.tiles[We];if(!Be&&(Oe>1&&console.time("creation"),Be=this.tiles[We]=ot(me,K,G,ce,Ce),this.tileCoords.push({z:K,x:G,y:ce}),Oe)){Oe>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",K,G,ce,Be.numFeatures,Be.numPoints,Be.numSimplified),console.timeEnd("creation"));var Ot="z"+K;this.stats[Ot]=(this.stats[Ot]||0)+1,this.total++}if(Be.source=me,ae){if(K===Ce.maxZoom||K===ae)continue;var bt=1<<ae-K;if(G!==Math.floor(xe/bt)||ce!==Math.floor(Ee/bt))continue}else if(K===Ce.indexMaxZoom||Be.numPoints<=Ce.indexMaxPoints)continue;if(Be.source=null,me.length!==0){Oe>1&&console.time("clipping");var Je,Rt,Bt,gn,on,yn,Bn=.5*Ce.buffer/Ce.extent,Jn=.5-Bn,Dr=.5+Bn,or=1+Bn;Je=Rt=Bt=gn=null,on=_n(me,He,G-Bn,G+Dr,0,Be.minX,Be.maxX,Ce),yn=_n(me,He,G+Jn,G+or,0,Be.minX,Be.maxX,Ce),me=null,on&&(Je=_n(on,He,ce-Bn,ce+Dr,1,Be.minY,Be.maxY,Ce),Rt=_n(on,He,ce+Jn,ce+or,1,Be.minY,Be.maxY,Ce),on=null),yn&&(Bt=_n(yn,He,ce-Bn,ce+Dr,1,Be.minY,Be.maxY,Ce),gn=_n(yn,He,ce+Jn,ce+or,1,Be.minY,Be.maxY,Ce),yn=null),Oe>1&&console.timeEnd("clipping"),be.push(Je||[],K+1,2*G,2*ce),be.push(Rt||[],K+1,2*G,2*ce+1),be.push(Bt||[],K+1,2*G+1,2*ce),be.push(gn||[],K+1,2*G+1,2*ce+1)}}},$t.prototype.getTile=function(me,K,G){var ce=this.options,ae=ce.extent,xe=ce.debug;if(me<0||me>24)return null;var Ee=1<<me,be=cn(me,K=(K%Ee+Ee)%Ee,G);if(this.tiles[be])return hn(this.tiles[be],ae);xe>1&&console.log("drilling down to z%d-%d-%d",me,K,G);for(var Ce,Oe=me,He=K,We=G;!Ce&&Oe>0;)Oe--,He=Math.floor(He/2),We=Math.floor(We/2),Ce=this.tiles[cn(Oe,He,We)];return Ce&&Ce.source?(xe>1&&console.log("found parent tile z%d-%d-%d",Oe,He,We),xe>1&&console.time("drilling down"),this.splitTile(Ce.source,Oe,He,We,me,K,G),xe>1&&console.timeEnd("drilling down"),this.tiles[be]?hn(this.tiles[be],ae):null):null};class Gn extends A{constructor(K,G,ce,ae){super(K,G,ce,Mn),ae&&(this.loadGeoJSON=ae)}loadData(K,G){var ce;(ce=this._pendingRequest)===null||ce===void 0||ce.cancel(),this._pendingCallback&&this._pendingCallback(null,{abandoned:!0});const ae=!!(K&&K.request&&K.request.collectResourceTiming)&&new o.RequestPerformance(K.request);this._pendingCallback=G,this._pendingRequest=this.loadGeoJSON(K,(xe,Ee)=>{if(delete this._pendingCallback,delete this._pendingRequest,xe||!Ee)return G(xe);if(typeof Ee!="object")return G(new Error(`Input data given to '${K.source}' is not a valid GeoJSON object.`));{M(Ee,!0);try{if(K.filter){const Ce=o.createExpression(K.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Ce.result==="error")throw new Error(Ce.value.map(He=>`${He.key}: ${He.message}`).join(", "));Ee={type:"FeatureCollection",features:Ee.features.filter(He=>Ce.value.evaluate({zoom:0},He))}}this._geoJSONIndex=K.cluster?new Pt(function({superclusterOptions:Ce,clusterProperties:Oe}){if(!Oe||!Ce)return Ce;const He={},We={},Be={accumulated:null,zoom:0},Ot={properties:null},bt=Object.keys(Oe);for(const Je of bt){const[Rt,Bt]=Oe[Je],gn=o.createExpression(Bt),on=o.createExpression(typeof Rt=="string"?[Rt,["accumulated"],["get",Je]]:Rt);He[Je]=gn.value,We[Je]=on.value}return Ce.map=Je=>{Ot.properties=Je;const Rt={};for(const Bt of bt)Rt[Bt]=He[Bt].evaluate(Be,Ot);return Rt},Ce.reduce=(Je,Rt)=>{Ot.properties=Rt;for(const Bt of bt)Be.accumulated=Je[Bt],Je[Bt]=We[Bt].evaluate(Be,Ot)},Ce}(K)).load(Ee.features):function(Ce,Oe){return new $t(Ce,Oe)}(Ee,K.geojsonVtOptions)}catch(Ce){return G(Ce)}this.loaded={};const be={};if(ae){const Ce=ae.finish();Ce&&(be.resourceTiming={},be.resourceTiming[K.source]=JSON.parse(JSON.stringify(Ce)))}G(null,be)}})}reloadTile(K,G){const ce=this.loaded;return ce&&ce[K.uid]?super.reloadTile(K,G):this.loadTile(K,G)}loadGeoJSON(K,G){if(K.request)return o.getJSON(K.request,G);if(typeof K.data=="string")try{G(null,JSON.parse(K.data))}catch{G(new Error(`Input data given to '${K.source}' is not a valid GeoJSON object.`))}else G(new Error(`Input data given to '${K.source}' is not a valid GeoJSON object.`));return{cancel:()=>{}}}removeSource(K,G){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),G()}getClusterExpansionZoom(K,G){try{G(null,this._geoJSONIndex.getClusterExpansionZoom(K.clusterId))}catch(ce){G(ce)}}getClusterChildren(K,G){try{G(null,this._geoJSONIndex.getChildren(K.clusterId))}catch(ce){G(ce)}}getClusterLeaves(K,G){try{G(null,this._geoJSONIndex.getLeaves(K.clusterId,K.limit,K.offset))}catch(ce){G(ce)}}}class qn{constructor(K){this.self=K,this.actor=new o.Actor(K,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:A,geojson:Gn},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=(G,ce)=>{if(this.workerSourceTypes[G])throw new Error(`Worker source with name "${G}" already registered.`);this.workerSourceTypes[G]=ce},this.self.registerRTLTextPlugin=G=>{if(o.plugin.isParsed())throw new Error("RTL text plugin already registered.");o.plugin.applyArabicShaping=G.applyArabicShaping,o.plugin.processBidirectionalText=G.processBidirectionalText,o.plugin.processStyledBidirectionalText=G.processStyledBidirectionalText}}setReferrer(K,G){this.referrer=G}setImages(K,G,ce){this.availableImages[K]=G;for(const ae in this.workerSources[K]){const xe=this.workerSources[K][ae];for(const Ee in xe)xe[Ee].availableImages=G}ce()}setLayers(K,G,ce){this.getLayerIndex(K).replace(G),ce()}updateLayers(K,G,ce){this.getLayerIndex(K).update(G.layers,G.removedIds),ce()}loadTile(K,G,ce){this.getWorkerSource(K,G.type,G.source).loadTile(G,ce)}loadDEMTile(K,G,ce){this.getDEMWorkerSource(K,G.source).loadTile(G,ce)}reloadTile(K,G,ce){this.getWorkerSource(K,G.type,G.source).reloadTile(G,ce)}abortTile(K,G,ce){this.getWorkerSource(K,G.type,G.source).abortTile(G,ce)}removeTile(K,G,ce){this.getWorkerSource(K,G.type,G.source).removeTile(G,ce)}removeDEMTile(K,G){this.getDEMWorkerSource(K,G.source).removeTile(G)}removeSource(K,G,ce){if(!this.workerSources[K]||!this.workerSources[K][G.type]||!this.workerSources[K][G.type][G.source])return;const ae=this.workerSources[K][G.type][G.source];delete this.workerSources[K][G.type][G.source],ae.removeSource!==void 0?ae.removeSource(G,ce):ce()}loadWorkerSource(K,G,ce){try{this.self.importScripts(G.url),ce()}catch(ae){ce(ae.toString())}}syncRTLPluginState(K,G,ce){try{o.plugin.setState(G);const ae=o.plugin.getPluginURL();if(o.plugin.isLoaded()&&!o.plugin.isParsed()&&ae!=null){this.self.importScripts(ae);const xe=o.plugin.isParsed();ce(xe?void 0:new Error(`RTL Text Plugin failed to import scripts from ${ae}`),xe)}}catch(ae){ce(ae.toString())}}getAvailableImages(K){let G=this.availableImages[K];return G||(G=[]),G}getLayerIndex(K){let G=this.layerIndexes[K];return G||(G=this.layerIndexes[K]=new g),G}getWorkerSource(K,G,ce){if(this.workerSources[K]||(this.workerSources[K]={}),this.workerSources[K][G]||(this.workerSources[K][G]={}),!this.workerSources[K][G][ce]){const ae={send:(xe,Ee,be)=>{this.actor.send(xe,Ee,be,K)}};this.workerSources[K][G][ce]=new this.workerSourceTypes[G](ae,this.getLayerIndex(K),this.getAvailableImages(K))}return this.workerSources[K][G][ce]}getDEMWorkerSource(K,G){return this.demWorkerSources[K]||(this.demWorkerSources[K]={}),this.demWorkerSources[K][G]||(this.demWorkerSources[K][G]=new O),this.demWorkerSources[K][G]}enforceCacheSizeLimit(K,G){o.enforceCacheSizeLimit(G)}}return o.isWorker()&&(self.worker=new qn(self)),qn}),l(["./shared"],function(o){var h=p;function p(y){return!function(s){return typeof window>"u"||typeof document>"u"?"not a browser":Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var v,_,k=new Blob([""],{type:"text/javascript"}),D=URL.createObjectURL(k);try{_=new Worker(D),v=!0}catch{v=!1}return _&&_.terminate(),URL.revokeObjectURL(D),v}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var v=document.createElement("canvas");v.width=v.height=1;var _=v.getContext("2d");if(!_)return!1;var k=_.getImageData(0,0,1,1);return k&&k.width===v.width}()?(g[f=s&&s.failIfMajorPerformanceCaveat]===void 0&&(g[f]=function(v){var _,k=function(D){var $=document.createElement("canvas"),V=Object.create(p.webGLContextAttributes);return V.failIfMajorPerformanceCaveat=D,$.getContext("webgl",V)||$.getContext("experimental-webgl",V)}(v);if(!k)return!1;try{_=k.createShader(k.VERTEX_SHADER)}catch{return!1}return!(!_||k.isContextLost())&&(k.shaderSource(_,"void main() {}"),k.compileShader(_),k.getShaderParameter(_,k.COMPILE_STATUS)===!0)}(f)),g[f]?document.documentMode?"insufficient ECMAScript 6 support":void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support";var f}(y)}var g={};function b(y,s){if(Array.isArray(y)){if(!Array.isArray(s)||y.length!==s.length)return!1;for(let f=0;f<y.length;f++)if(!b(y[f],s[f]))return!1;return!0}if(typeof y=="object"&&y!==null&&s!==null){if(typeof s!="object"||Object.keys(y).length!==Object.keys(s).length)return!1;for(const f in y)if(!b(y[f],s[f]))return!1;return!0}return y===s}p.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};class w{static testProp(s){if(!w.docStyle)return s[0];for(let f=0;f<s.length;f++)if(s[f]in w.docStyle)return s[f];return s[0]}static create(s,f,v){const _=window.document.createElement(s);return f!==void 0&&(_.className=f),v&&v.appendChild(_),_}static createNS(s,f){return window.document.createElementNS(s,f)}static disableDrag(){w.docStyle&&w.selectProp&&(w.userSelect=w.docStyle[w.selectProp],w.docStyle[w.selectProp]="none")}static enableDrag(){w.docStyle&&w.selectProp&&(w.docStyle[w.selectProp]=w.userSelect)}static setTransform(s,f){s.style[w.transformProp]=f}static addEventListener(s,f,v,_={}){s.addEventListener(f,v,"passive"in _?_:_.capture)}static removeEventListener(s,f,v,_={}){s.removeEventListener(f,v,"passive"in _?_:_.capture)}static suppressClickInternal(s){s.preventDefault(),s.stopPropagation(),window.removeEventListener("click",w.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",w.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",w.suppressClickInternal,!0)},0)}static mousePos(s,f){const v=s.getBoundingClientRect();return new o.pointGeometry(f.clientX-v.left-s.clientLeft,f.clientY-v.top-s.clientTop)}static touchPos(s,f){const v=s.getBoundingClientRect(),_=[];for(let k=0;k<f.length;k++)_.push(new o.pointGeometry(f[k].clientX-v.left-s.clientLeft,f[k].clientY-v.top-s.clientTop));return _}static mouseButton(s){return s.button}static remove(s){s.parentNode&&s.parentNode.removeChild(s)}}w.docStyle=typeof window<"u"&&window.document&&window.document.documentElement.style,w.selectProp=w.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),w.transformProp=w.testProp(["transform","WebkitTransform"]);class P{constructor(s){this._transformRequestFn=s}transformRequest(s,f){return this._transformRequestFn&&this._transformRequestFn(s,f)||{url:s}}normalizeSpriteURL(s,f,v){const _=function(k){const D=k.match(I);if(!D)throw new Error(`Unable to parse URL "${k}"`);return{protocol:D[1],authority:D[2],path:D[3]||"/",params:D[4]?D[4].split("&"):[]}}(s);return _.path+=`${f}${v}`,function(k){const D=k.params.length?`?${k.params.join("&")}`:"";return`${k.protocol}://${k.authority}${k.path}${D}`}(_)}setTransformRequest(s){this._transformRequestFn=s}}const I=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;class A{constructor(s,f,v,_){this.context=s,this.format=v,this.texture=s.gl.createTexture(),this.update(f,_)}update(s,f,v){const{width:_,height:k}=s,D=!(this.size&&this.size[0]===_&&this.size[1]===k||v),{context:$}=this,{gl:V}=$;if(this.useMipmap=Boolean(f&&f.useMipmap),V.bindTexture(V.TEXTURE_2D,this.texture),$.pixelStoreUnpackFlipY.set(!1),$.pixelStoreUnpack.set(1),$.pixelStoreUnpackPremultiplyAlpha.set(this.format===V.RGBA&&(!f||f.premultiply!==!1)),D)this.size=[_,k],s instanceof HTMLImageElement||s instanceof HTMLCanvasElement||s instanceof HTMLVideoElement||s instanceof ImageData||o.isImageBitmap(s)?V.texImage2D(V.TEXTURE_2D,0,this.format,this.format,V.UNSIGNED_BYTE,s):V.texImage2D(V.TEXTURE_2D,0,this.format,_,k,0,this.format,V.UNSIGNED_BYTE,s.data);else{const{x:W,y:ee}=v||{x:0,y:0};s instanceof HTMLImageElement||s instanceof HTMLCanvasElement||s instanceof HTMLVideoElement||s instanceof ImageData||o.isImageBitmap(s)?V.texSubImage2D(V.TEXTURE_2D,0,W,ee,V.RGBA,V.UNSIGNED_BYTE,s):V.texSubImage2D(V.TEXTURE_2D,0,W,ee,_,k,V.RGBA,V.UNSIGNED_BYTE,s.data)}this.useMipmap&&this.isSizePowerOfTwo()&&V.generateMipmap(V.TEXTURE_2D)}bind(s,f,v){const{context:_}=this,{gl:k}=_;k.bindTexture(k.TEXTURE_2D,this.texture),v!==k.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(v=k.LINEAR),s!==this.filter&&(k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MAG_FILTER,s),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MIN_FILTER,v||s),this.filter=s),f!==this.wrap&&(k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_S,f),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_T,f),this.wrap=f)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:s}=this.context;s.deleteTexture(this.texture),this.texture=null}}function O(y){const{userImage:s}=y;return!!(s&&s.render&&s.render())&&(y.data.replace(new Uint8Array(s.data.buffer)),!0)}class M extends o.Evented{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new o.RGBAImage({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(s){if(this.loaded!==s&&(this.loaded=s,s)){for(const{ids:f,callback:v}of this.requestors)this._notify(f,v);this.requestors=[]}}getImage(s){return this.images[s]}addImage(s,f){if(this.images[s])throw new Error(`Image id ${s} already exist, use updateImage instead`);this._validate(s,f)&&(this.images[s]=f)}_validate(s,f){let v=!0;return this._validateStretch(f.stretchX,f.data&&f.data.width)||(this.fire(new o.ErrorEvent(new Error(`Image "${s}" has invalid "stretchX" value`))),v=!1),this._validateStretch(f.stretchY,f.data&&f.data.height)||(this.fire(new o.ErrorEvent(new Error(`Image "${s}" has invalid "stretchY" value`))),v=!1),this._validateContent(f.content,f)||(this.fire(new o.ErrorEvent(new Error(`Image "${s}" has invalid "content" value`))),v=!1),v}_validateStretch(s,f){if(!s)return!0;let v=0;for(const _ of s){if(_[0]<v||_[1]<_[0]||f<_[1])return!1;v=_[1]}return!0}_validateContent(s,f){return!(s&&(s.length!==4||s[0]<0||f.data.width<s[0]||s[1]<0||f.data.height<s[1]||s[2]<0||f.data.width<s[2]||s[3]<0||f.data.height<s[3]||s[2]<s[0]||s[3]<s[1]))}updateImage(s,f){const v=this.images[s];if(v.data.width!==f.data.width||v.data.height!==f.data.height)throw new Error(`size mismatch between old image (${v.data.width}x${v.data.height}) and new image (${f.data.width}x${f.data.height}).`);f.version=v.version+1,this.images[s]=f,this.updatedImages[s]=!0}removeImage(s){const f=this.images[s];delete this.images[s],delete this.patterns[s],f.userImage&&f.userImage.onRemove&&f.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(s,f){let v=!0;if(!this.isLoaded())for(const _ of s)this.images[_]||(v=!1);this.isLoaded()||v?this._notify(s,f):this.requestors.push({ids:s,callback:f})}_notify(s,f){const v={};for(const _ of s){this.images[_]||this.fire(new o.Event("styleimagemissing",{id:_}));const k=this.images[_];k?v[_]={data:k.data.clone(),pixelRatio:k.pixelRatio,sdf:k.sdf,version:k.version,stretchX:k.stretchX,stretchY:k.stretchY,content:k.content,hasRenderCallback:Boolean(k.userImage&&k.userImage.render)}:o.warnOnce(`Image "${_}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}f(null,v)}getPixelSize(){const{width:s,height:f}=this.atlasImage;return{width:s,height:f}}getPattern(s){const f=this.patterns[s],v=this.getImage(s);if(!v)return null;if(f&&f.position.version===v.version)return f.position;if(f)f.position.version=v.version;else{const _={w:v.data.width+2,h:v.data.height+2,x:0,y:0},k=new o.ImagePosition(_,v);this.patterns[s]={bin:_,position:k}}return this._updatePatternAtlas(),this.patterns[s].position}bind(s){const f=s.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new A(s,this.atlasImage,f.RGBA),this.atlasTexture.bind(f.LINEAR,f.CLAMP_TO_EDGE)}_updatePatternAtlas(){const s=[];for(const k in this.patterns)s.push(this.patterns[k].bin);const{w:f,h:v}=o.potpack(s),_=this.atlasImage;_.resize({width:f||1,height:v||1});for(const k in this.patterns){const{bin:D}=this.patterns[k],$=D.x+1,V=D.y+1,W=this.images[k].data,ee=W.width,ie=W.height;o.RGBAImage.copy(W,_,{x:0,y:0},{x:$,y:V},{width:ee,height:ie}),o.RGBAImage.copy(W,_,{x:0,y:ie-1},{x:$,y:V-1},{width:ee,height:1}),o.RGBAImage.copy(W,_,{x:0,y:0},{x:$,y:V+ie},{width:ee,height:1}),o.RGBAImage.copy(W,_,{x:ee-1,y:0},{x:$-1,y:V},{width:1,height:ie}),o.RGBAImage.copy(W,_,{x:0,y:0},{x:$+ee,y:V},{width:1,height:ie})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(s){for(const f of s){if(this.callbackDispatchedThisFrame[f])continue;this.callbackDispatchedThisFrame[f]=!0;const v=this.images[f];v||o.warnOnce(`Image with ID: "${f}" was not found`),O(v)&&this.updateImage(f,v)}}}const R=1e20;function N(y,s,f,v,_,k,D,$,V){for(let W=s;W<s+v;W++)z(y,f*k+W,k,_,D,$,V);for(let W=f;W<f+_;W++)z(y,W*k+s,1,v,D,$,V)}function z(y,s,f,v,_,k,D){k[0]=0,D[0]=-R,D[1]=R,_[0]=y[s];for(let $=1,V=0,W=0;$<v;$++){_[$]=y[s+$*f];const ee=$*$;do{const ie=k[V];W=(_[$]-_[ie]+ee-ie*ie)/($-ie)/2}while(W<=D[V]&&--V>-1);V++,k[V]=$,D[V]=W,D[V+1]=R}for(let $=0,V=0;$<v;$++){for(;D[V+1]<$;)V++;const W=k[V],ee=$-W;y[s+$*f]=_[W]+ee*ee}}class B{constructor(s,f){this.requestManager=s,this.localIdeographFontFamily=f,this.entries={}}setURL(s){this.url=s}getGlyphs(s,f){const v=[];for(const _ in s)for(const k of s[_])v.push({stack:_,id:k});o.asyncAll(v,({stack:_,id:k},D)=>{let $=this.entries[_];$||($=this.entries[_]={glyphs:{},requests:{},ranges:{}});let V=$.glyphs[k];if(V!==void 0)return void D(null,{stack:_,id:k,glyph:V});if(V=this._tinySDF($,_,k),V)return $.glyphs[k]=V,void D(null,{stack:_,id:k,glyph:V});const W=Math.floor(k/256);if(256*W>65535)return void D(new Error("glyphs > 65535 not supported"));if($.ranges[W])return void D(null,{stack:_,id:k,glyph:V});let ee=$.requests[W];ee||(ee=$.requests[W]=[],B.loadGlyphRange(_,W,this.url,this.requestManager,(ie,fe)=>{if(fe){for(const Se in fe)this._doesCharSupportLocalGlyph(+Se)||($.glyphs[+Se]=fe[+Se]);$.ranges[W]=!0}for(const Se of ee)Se(ie,fe);delete $.requests[W]})),ee.push((ie,fe)=>{ie?D(ie):fe&&D(null,{stack:_,id:k,glyph:fe[k]||null})})},(_,k)=>{if(_)f(_);else if(k){const D={};for(const{stack:$,id:V,glyph:W}of k)(D[$]||(D[$]={}))[V]=W&&{id:W.id,bitmap:W.bitmap.clone(),metrics:W.metrics};f(null,D)}})}_doesCharSupportLocalGlyph(s){return!!this.localIdeographFontFamily&&(o.unicodeBlockLookup["CJK Unified Ideographs"](s)||o.unicodeBlockLookup["Hangul Syllables"](s)||o.unicodeBlockLookup.Hiragana(s)||o.unicodeBlockLookup.Katakana(s))}_tinySDF(s,f,v){const _=this.localIdeographFontFamily;if(!_||!this._doesCharSupportLocalGlyph(v))return;let k=s.tinySDF;if(!k){let $="400";/bold/i.test(f)?$="900":/medium/i.test(f)?$="500":/light/i.test(f)&&($="200"),k=s.tinySDF=new B.TinySDF({fontSize:24,buffer:3,radius:8,cutoff:.25,fontFamily:_,fontWeight:$})}const D=k.draw(String.fromCharCode(v));return{id:v,bitmap:new o.AlphaImage({width:D.width||30,height:D.height||30},D.data),metrics:{width:D.glyphWidth||24,height:D.glyphHeight||24,left:D.glyphLeft||0,top:D.glyphTop-27||-8,advance:D.glyphAdvance||24}}}}B.loadGlyphRange=function(y,s,f,v,_){const k=256*s,D=k+255,$=v.transformRequest(f.replace("{fontstack}",y).replace("{range}",`${k}-${D}`),o.ResourceType.Glyphs);o.getArrayBuffer($,(V,W)=>{if(V)_(V);else if(W){const ee={};for(const ie of o.parseGlyphPbf(W))ee[ie.id]=ie;_(null,ee)}})},B.TinySDF=class{constructor({fontSize:y=24,buffer:s=3,radius:f=8,cutoff:v=.25,fontFamily:_="sans-serif",fontWeight:k="normal",fontStyle:D="normal"}={}){this.buffer=s,this.cutoff=v,this.radius=f;const $=this.size=y+4*s,V=this._createCanvas($),W=this.ctx=V.getContext("2d",{willReadFrequently:!0});W.font=`${D} ${k} ${y}px ${_}`,W.textBaseline="alphabetic",W.textAlign="left",W.fillStyle="black",this.gridOuter=new Float64Array($*$),this.gridInner=new Float64Array($*$),this.f=new Float64Array($),this.z=new Float64Array($+1),this.v=new Uint16Array($)}_createCanvas(y){const s=document.createElement("canvas");return s.width=s.height=y,s}draw(y){const{width:s,actualBoundingBoxAscent:f,actualBoundingBoxDescent:v,actualBoundingBoxLeft:_,actualBoundingBoxRight:k}=this.ctx.measureText(y),D=Math.ceil(f),$=Math.min(this.size-this.buffer,Math.ceil(k-_)),V=Math.min(this.size-this.buffer,D+Math.ceil(v)),W=$+2*this.buffer,ee=V+2*this.buffer,ie=Math.max(W*ee,0),fe=new Uint8ClampedArray(ie),Se={data:fe,width:W,height:ee,glyphWidth:$,glyphHeight:V,glyphTop:D,glyphLeft:0,glyphAdvance:s};if($===0||V===0)return Se;const{ctx:_e,buffer:we,gridInner:$e,gridOuter:je}=this;_e.clearRect(we,we,$,V),_e.fillText(y,we,we+D);const et=_e.getImageData(we,we,$,V);je.fill(R,0,ie),$e.fill(0,0,ie);for(let Pe=0;Pe<V;Pe++)for(let at=0;at<$;at++){const nt=et.data[4*(Pe*$+at)+3]/255;if(nt===0)continue;const gt=(Pe+we)*W+at+we;if(nt===1)je[gt]=0,$e[gt]=R;else{const yt=.5-nt;je[gt]=yt>0?yt*yt:0,$e[gt]=yt<0?yt*yt:0}}N(je,0,0,W,ee,W,this.f,this.v,this.z),N($e,we,we,$,V,W,this.f,this.v,this.z);for(let Pe=0;Pe<ie;Pe++){const at=Math.sqrt(je[Pe])-Math.sqrt($e[Pe]);fe[Pe]=Math.round(255-255*(at/this.radius+this.cutoff))}return Se}};const U=new o.Properties({anchor:new o.DataConstantProperty(o.spec.light.anchor),position:new class{constructor(){this.specification=o.spec.light.position}possiblyEvaluate(y,s){return o.sphericalToCartesian(y.expression.evaluate(s))}interpolate(y,s,f){return{x:o.number(y.x,s.x,f),y:o.number(y.y,s.y,f),z:o.number(y.z,s.z,f)}}},color:new o.DataConstantProperty(o.spec.light.color),intensity:new o.DataConstantProperty(o.spec.light.intensity)}),q="-transition";class H extends o.Evented{constructor(s){super(),this._transitionable=new o.Transitionable(U),this.setLight(s),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(s,f={}){if(!this._validate(o.validateLight,s,f))for(const v in s){const _=s[v];v.endsWith(q)?this._transitionable.setTransition(v.slice(0,-q.length),_):this._transitionable.setValue(v,_)}}updateTransitions(s){this._transitioning=this._transitionable.transitioned(s,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(s){this.properties=this._transitioning.possiblyEvaluate(s)}_validate(s,f,v){return(!v||v.validate!==!1)&&o.emitValidationErrors(this,s.call(o.validateStyle,o.extend({value:f,style:{glyphs:!0,sprite:!0},styleSpec:o.spec})))}}class te{constructor(s,f){this.width=s,this.height=f,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(s,f){const v=s.join(",")+String(f);return this.dashEntry[v]||(this.dashEntry[v]=this.addDash(s,f)),this.dashEntry[v]}getDashRanges(s,f,v){const _=[];let k=s.length%2==1?-s[s.length-1]*v:0,D=s[0]*v,$=!0;_.push({left:k,right:D,isDash:$,zeroLength:s[0]===0});let V=s[0];for(let W=1;W<s.length;W++){$=!$;const ee=s[W];k=V*v,V+=ee,D=V*v,_.push({left:k,right:D,isDash:$,zeroLength:ee===0})}return _}addRoundDash(s,f,v){const _=f/2;for(let k=-v;k<=v;k++){const D=this.width*(this.nextRow+v+k);let $=0,V=s[$];for(let W=0;W<this.width;W++){W/V.right>1&&(V=s[++$]);const ee=Math.abs(W-V.left),ie=Math.abs(W-V.right),fe=Math.min(ee,ie);let Se;const _e=k/v*(_+1);if(V.isDash){const we=_-Math.abs(_e);Se=Math.sqrt(fe*fe+we*we)}else Se=_-Math.sqrt(fe*fe+_e*_e);this.data[D+W]=Math.max(0,Math.min(255,Se+128))}}}addRegularDash(s){for(let $=s.length-1;$>=0;--$){const V=s[$],W=s[$+1];V.zeroLength?s.splice($,1):W&&W.isDash===V.isDash&&(W.left=V.left,s.splice($,1))}const f=s[0],v=s[s.length-1];f.isDash===v.isDash&&(f.left=v.left-this.width,v.right=f.right+this.width);const _=this.width*this.nextRow;let k=0,D=s[k];for(let $=0;$<this.width;$++){$/D.right>1&&(D=s[++k]);const V=Math.abs($-D.left),W=Math.abs($-D.right),ee=Math.min(V,W);this.data[_+$]=Math.max(0,Math.min(255,(D.isDash?ee:-ee)+128))}}addDash(s,f){const v=f?7:0,_=2*v+1;if(this.nextRow+_>this.height)return o.warnOnce("LineAtlas out of space"),null;let k=0;for(let $=0;$<s.length;$++)k+=s[$];if(k!==0){const $=this.width/k,V=this.getDashRanges(s,this.width,$);f?this.addRoundDash(V,$,v):this.addRegularDash(V)}const D={y:(this.nextRow+v+.5)/this.height,height:2*v/this.height,width:k};return this.nextRow+=_,this.dirty=!0,D}bind(s){const f=s.gl;this.texture?(f.bindTexture(f.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,f.texSubImage2D(f.TEXTURE_2D,0,0,0,this.width,this.height,f.ALPHA,f.UNSIGNED_BYTE,this.data))):(this.texture=f.createTexture(),f.bindTexture(f.TEXTURE_2D,this.texture),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,f.REPEAT),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,f.REPEAT),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,f.LINEAR),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,f.LINEAR),f.texImage2D(f.TEXTURE_2D,0,f.ALPHA,this.width,this.height,0,f.ALPHA,f.UNSIGNED_BYTE,this.data))}}class Y{constructor(s,f){this.workerPool=s,this.actors=[],this.currentActor=0,this.id=o.uniqueId();const v=this.workerPool.acquire(this.id);for(let _=0;_<v.length;_++){const k=new Y.Actor(v[_],f,this.id);k.name=`Worker ${_}`,this.actors.push(k)}if(!this.actors.length)throw new Error("No actors found")}broadcast(s,f,v){o.asyncAll(this.actors,(_,k)=>{_.send(s,f,k)},v=v||function(){})}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(){this.actors.forEach(s=>{s.remove()}),this.actors=[],this.workerPool.release(this.id)}}function le(y,s,f){const v=function(_,k){if(_)return f(_);if(k){const D=o.pick(o.extend(k,y),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);k.vector_layers&&(D.vectorLayers=k.vector_layers,D.vectorLayerIds=D.vectorLayers.map($=>$.id)),f(null,D)}};return y.url?o.getJSON(s.transformRequest(y.url,o.ResourceType.Source),v):o.exported.frame(()=>v(null,y))}Y.Actor=o.Actor;class J{constructor(s,f,v){this.bounds=o.LngLatBounds.convert(this.validateBounds(s)),this.minzoom=f||0,this.maxzoom=v||24}validateBounds(s){return Array.isArray(s)&&s.length===4?[Math.max(-180,s[0]),Math.max(-90,s[1]),Math.min(180,s[2]),Math.min(90,s[3])]:[-180,-90,180,90]}contains(s){const f=Math.pow(2,s.z),v=Math.floor(o.mercatorXfromLng(this.bounds.getWest())*f),_=Math.floor(o.mercatorYfromLat(this.bounds.getNorth())*f),k=Math.ceil(o.mercatorXfromLng(this.bounds.getEast())*f),D=Math.ceil(o.mercatorYfromLat(this.bounds.getSouth())*f);return s.x>=v&&s.x<k&&s.y>=_&&s.y<D}}class Z extends o.Evented{constructor(s,f,v,_){if(super(),this.id=s,this.dispatcher=v,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,o.extend(this,o.pick(f,["url","scheme","tileSize","promoteId"])),this._options=o.extend({type:"vector"},f),this._collectResourceTiming=f.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(_)}load(){this._loaded=!1,this.fire(new o.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=le(this._options,this.map._requestManager,(s,f)=>{this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),s?this.fire(new o.ErrorEvent(s)):f&&(o.extend(this,f),f.bounds&&(this.tileBounds=new J(f.bounds,this.minzoom,this.maxzoom)),this.fire(new o.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new o.Event("data",{dataType:"source",sourceDataType:"content"})))})}loaded(){return this._loaded}hasTile(s){return!this.tileBounds||this.tileBounds.contains(s.canonical)}onAdd(s){this.map=s,this.load()}setSourceProperty(s){this._tileJSONRequest&&this._tileJSONRequest.cancel(),s(),this.load()}setTiles(s){return this.setSourceProperty(()=>{this._options.tiles=s}),this}setUrl(s){return this.setSourceProperty(()=>{this.url=s,this._options.url=s}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}serialize(){return o.extend({},this._options)}loadTile(s,f){const v=s.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),_={request:this.map._requestManager.transformRequest(v,o.ResourceType.Tile),uid:s.uid,tileID:s.tileID,zoom:s.tileID.overscaledZ,tileSize:this.tileSize*s.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function k(D,$){return delete s.request,s.aborted?f(null):D&&D.status!==404?f(D):($&&$.resourceTiming&&(s.resourceTiming=$.resourceTiming),this.map._refreshExpiredTiles&&$&&s.setExpiryData($),s.loadVectorData($,this.map.painter),o.cacheEntryPossiblyAdded(this.dispatcher),f(null),void(s.reloadCallback&&(this.loadTile(s,s.reloadCallback),s.reloadCallback=null)))}_.request.collectResourceTiming=this._collectResourceTiming,s.actor&&s.state!=="expired"?s.state==="loading"?s.reloadCallback=f:s.request=s.actor.send("reloadTile",_,k.bind(this)):(s.actor=this.dispatcher.getActor(),s.request=s.actor.send("loadTile",_,k.bind(this)))}abortTile(s){s.request&&(s.request.cancel(),delete s.request),s.actor&&s.actor.send("abortTile",{uid:s.uid,type:this.type,source:this.id},void 0)}unloadTile(s){s.unloadVectorData(),s.actor&&s.actor.send("removeTile",{uid:s.uid,type:this.type,source:this.id},void 0)}hasTransition(){return!1}}class Q extends o.Evented{constructor(s,f,v,_){super(),this.id=s,this.dispatcher=v,this.setEventedParent(_),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=o.extend({type:"raster"},f),o.extend(this,o.pick(f,["url","scheme","tileSize"]))}load(){this._loaded=!1,this.fire(new o.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=le(this._options,this.map._requestManager,(s,f)=>{this._tileJSONRequest=null,this._loaded=!0,s?this.fire(new o.ErrorEvent(s)):f&&(o.extend(this,f),f.bounds&&(this.tileBounds=new J(f.bounds,this.minzoom,this.maxzoom)),this.fire(new o.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new o.Event("data",{dataType:"source",sourceDataType:"content"})))})}loaded(){return this._loaded}onAdd(s){this.map=s,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}serialize(){return o.extend({},this._options)}hasTile(s){return!this.tileBounds||this.tileBounds.contains(s.canonical)}loadTile(s,f){const v=s.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);s.request=o.getImage(this.map._requestManager.transformRequest(v,o.ResourceType.Tile),(_,k,D)=>{if(delete s.request,s.aborted)s.state="unloaded",f(null);else if(_)s.state="errored",f(_);else if(k){this.map._refreshExpiredTiles&&s.setExpiryData(D);const $=this.map.painter.context,V=$.gl;s.texture=this.map.painter.getTileTexture(k.width),s.texture?s.texture.update(k,{useMipmap:!0}):(s.texture=new A($,k,V.RGBA,{useMipmap:!0}),s.texture.bind(V.LINEAR,V.CLAMP_TO_EDGE,V.LINEAR_MIPMAP_NEAREST),$.extTextureFilterAnisotropic&&V.texParameterf(V.TEXTURE_2D,$.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,$.extTextureFilterAnisotropicMax)),s.state="loaded",o.cacheEntryPossiblyAdded(this.dispatcher),f(null)}})}abortTile(s,f){s.request&&(s.request.cancel(),delete s.request),f()}unloadTile(s,f){s.texture&&this.map.painter.saveTileTexture(s.texture),f()}hasTransition(){return!1}}let ge;class re extends Q{constructor(s,f,v,_){super(s,f,v,_),this.type="raster-dem",this.maxzoom=22,this._options=o.extend({type:"raster-dem"},f),this.encoding=f.encoding||"mapbox"}serialize(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}}loadTile(s,f){const v=s.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);function _(k,D){k&&(s.state="errored",f(k)),D&&(s.dem=D,s.needsHillshadePrepare=!0,s.needsTerrainPrepare=!0,s.state="loaded",f(null))}s.request=o.getImage(this.map._requestManager.transformRequest(v,o.ResourceType.Tile),function(k,D){if(delete s.request,s.aborted)s.state="unloaded",f(null);else if(k)s.state="errored",f(k);else if(D){this.map._refreshExpiredTiles&&s.setExpiryData(D),delete D.cacheControl,delete D.expires;const $=o.isImageBitmap(D)&&(ge==null&&(ge=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),ge)?D:o.exported.getImageData(D,1),V={uid:s.uid,coord:s.tileID,source:this.id,rawImageData:$,encoding:this.encoding};s.actor&&s.state!=="expired"||(s.actor=this.dispatcher.getActor(),s.actor.send("loadDEMTile",V,_.bind(this)))}}.bind(this)),s.neighboringTiles=this._getNeighboringTiles(s.tileID)}_getNeighboringTiles(s){const f=s.canonical,v=Math.pow(2,f.z),_=(f.x-1+v)%v,k=f.x===0?s.wrap-1:s.wrap,D=(f.x+1+v)%v,$=f.x+1===v?s.wrap+1:s.wrap,V={};return V[new o.OverscaledTileID(s.overscaledZ,k,f.z,_,f.y).key]={backfilled:!1},V[new o.OverscaledTileID(s.overscaledZ,$,f.z,D,f.y).key]={backfilled:!1},f.y>0&&(V[new o.OverscaledTileID(s.overscaledZ,k,f.z,_,f.y-1).key]={backfilled:!1},V[new o.OverscaledTileID(s.overscaledZ,s.wrap,f.z,f.x,f.y-1).key]={backfilled:!1},V[new o.OverscaledTileID(s.overscaledZ,$,f.z,D,f.y-1).key]={backfilled:!1}),f.y+1<v&&(V[new o.OverscaledTileID(s.overscaledZ,k,f.z,_,f.y+1).key]={backfilled:!1},V[new o.OverscaledTileID(s.overscaledZ,s.wrap,f.z,f.x,f.y+1).key]={backfilled:!1},V[new o.OverscaledTileID(s.overscaledZ,$,f.z,D,f.y+1).key]={backfilled:!1}),V}unloadTile(s){s.demTexture&&this.map.painter.saveTileTexture(s.demTexture),s.fbo&&(s.fbo.destroy(),delete s.fbo),s.dem&&delete s.dem,delete s.neighboringTiles,s.state="unloaded",s.actor&&s.actor.send("removeDEMTile",{uid:s.uid,source:this.id})}}class de extends o.Evented{constructor(s,f,v,_){super(),this.id=s,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._pendingLoads=0,this.actor=v.getActor(),this.setEventedParent(_),this._data=f.data,this._options=o.extend({},f),this._collectResourceTiming=f.collectResourceTiming,f.maxzoom!==void 0&&(this.maxzoom=f.maxzoom),f.type&&(this.type=f.type),f.attribution&&(this.attribution=f.attribution),this.promoteId=f.promoteId;const k=o.EXTENT/this.tileSize;this.workerOptions=o.extend({source:this.id,cluster:f.cluster||!1,geojsonVtOptions:{buffer:(f.buffer!==void 0?f.buffer:128)*k,tolerance:(f.tolerance!==void 0?f.tolerance:.375)*k,extent:o.EXTENT,maxZoom:this.maxzoom,lineMetrics:f.lineMetrics||!1,generateId:f.generateId||!1},superclusterOptions:{maxZoom:f.clusterMaxZoom!==void 0?f.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,f.clusterMinPoints||2),extent:o.EXTENT,radius:(f.clusterRadius||50)*k,log:!1,generateId:f.generateId||!1},clusterProperties:f.clusterProperties,filter:f.filter},f.workerOptions)}load(){this._updateWorkerData("metadata")}onAdd(s){this.map=s,this.load()}setData(s){return this._data=s,this._updateWorkerData("content"),this}getClusterExpansionZoom(s,f){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:s,source:this.id},f),this}getClusterChildren(s,f){return this.actor.send("geojson.getClusterChildren",{clusterId:s,source:this.id},f),this}getClusterLeaves(s,f,v,_){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:s,limit:f,offset:v},_),this}_updateWorkerData(s){const f=o.extend({},this.workerOptions),v=this._data;typeof v=="string"?(f.request=this.map._requestManager.transformRequest(o.exported.resolveURL(v),o.ResourceType.Source),f.request.collectResourceTiming=this._collectResourceTiming):f.data=JSON.stringify(v),this._pendingLoads++,this.fire(new o.Event("dataloading",{dataType:"source"})),this.actor.send(`${this.type}.loadData`,f,(_,k)=>{if(this._pendingLoads--,this._removed||k&&k.abandoned)return void this.fire(new o.Event("dataabort",{dataType:"source",sourceDataType:s}));let D=null;if(k&&k.resourceTiming&&k.resourceTiming[this.id]&&(D=k.resourceTiming[this.id].slice(0)),_)return void this.fire(new o.ErrorEvent(_));const $={dataType:"source",sourceDataType:s};this._collectResourceTiming&&D&&D.length>0&&o.extend($,{resourceTiming:D}),this.fire(new o.Event("data",$))})}loaded(){return this._pendingLoads===0}loadTile(s,f){const v=s.actor?"reloadTile":"loadTile";s.actor=this.actor;const _={type:this.type,uid:s.uid,tileID:s.tileID,zoom:s.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};s.request=this.actor.send(v,_,(k,D)=>(delete s.request,s.unloadVectorData(),s.aborted?f(null):k?f(k):(s.loadVectorData(D,this.map.painter,v==="reloadTile"),f(null))))}abortTile(s){s.request&&(s.request.cancel(),delete s.request),s.aborted=!0}unloadTile(s){s.unloadVectorData(),this.actor.send("removeTile",{uid:s.uid,type:this.type,source:this.id})}onRemove(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})}serialize(){return o.extend({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var oe=o.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class ye extends o.Evented{constructor(s,f,v,_){super(),this.id=s,this.dispatcher=v,this.coordinates=f.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(_),this.options=f}load(s,f){this._loaded=!1,this.fire(new o.Event("dataloading",{dataType:"source"})),this.url=this.options.url,o.getImage(this.map._requestManager.transformRequest(this.url,o.ResourceType.Image),(v,_)=>{this._loaded=!0,v?this.fire(new o.ErrorEvent(v)):_&&(this.image=_,s&&(this.coordinates=s),f&&f(),this._finishLoading())})}loaded(){return this._loaded}updateImage(s){return this.image&&s.url?(this.options.url=s.url,this.load(s.coordinates,()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new o.Event("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(s){this.map=s,this.load()}setCoordinates(s){this.coordinates=s;const f=s.map(o.MercatorCoordinate.fromLngLat);this.tileID=function(_){let k=1/0,D=1/0,$=-1/0,V=-1/0;for(const fe of _)k=Math.min(k,fe.x),D=Math.min(D,fe.y),$=Math.max($,fe.x),V=Math.max(V,fe.y);const W=Math.max($-k,V-D),ee=Math.max(0,Math.floor(-Math.log(W)/Math.LN2)),ie=Math.pow(2,ee);return new o.CanonicalTileID(ee,Math.floor((k+$)/2*ie),Math.floor((D+V)/2*ie))}(f),this.minzoom=this.maxzoom=this.tileID.z;const v=f.map(_=>this.tileID.getTilePoint(_)._round());return this._boundsArray=new o.RasterBoundsArray,this._boundsArray.emplaceBack(v[0].x,v[0].y,0,0),this._boundsArray.emplaceBack(v[1].x,v[1].y,o.EXTENT,0),this._boundsArray.emplaceBack(v[3].x,v[3].y,0,o.EXTENT),this._boundsArray.emplaceBack(v[2].x,v[2].y,o.EXTENT,o.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new o.Event("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const s=this.map.painter.context,f=s.gl;this.boundsBuffer||(this.boundsBuffer=s.createVertexBuffer(this._boundsArray,oe.members)),this.boundsSegments||(this.boundsSegments=o.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new A(s,this.image,f.RGBA),this.texture.bind(f.LINEAR,f.CLAMP_TO_EDGE));for(const v in this.tiles){const _=this.tiles[v];_.state!=="loaded"&&(_.state="loaded",_.texture=this.texture)}}loadTile(s,f){this.tileID&&this.tileID.equals(s.tileID.canonical)?(this.tiles[String(s.tileID.wrap)]=s,s.buckets={},f(null)):(s.state="errored",f(null))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class Re extends ye{constructor(s,f,v,_){super(s,f,v,_),this.roundZoom=!0,this.type="video",this.options=f}load(){this._loaded=!1;const s=this.options;this.urls=[];for(const f of s.urls)this.urls.push(this.map._requestManager.transformRequest(f,o.ResourceType.Source).url);o.getVideo(this.urls,(f,v)=>{this._loaded=!0,f?this.fire(new o.ErrorEvent(f)):v&&(this.video=v,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading())})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(s){if(this.video){const f=this.video.seekable;s<f.start(0)||s>f.end(0)?this.fire(new o.ErrorEvent(new o.ValidationError(`sources.${this.id}`,null,`Playback for this video can be set only between the ${f.start(0)} and ${f.end(0)}-second mark.`))):this.video.currentTime=s}}getVideo(){return this.video}onAdd(s){this.map||(this.map=s,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;const s=this.map.painter.context,f=s.gl;this.boundsBuffer||(this.boundsBuffer=s.createVertexBuffer(this._boundsArray,oe.members)),this.boundsSegments||(this.boundsSegments=o.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(f.LINEAR,f.CLAMP_TO_EDGE),f.texSubImage2D(f.TEXTURE_2D,0,0,0,f.RGBA,f.UNSIGNED_BYTE,this.video)):(this.texture=new A(s,this.video,f.RGBA),this.texture.bind(f.LINEAR,f.CLAMP_TO_EDGE));for(const v in this.tiles){const _=this.tiles[v];_.state!=="loaded"&&(_.state="loaded",_.texture=this.texture)}}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class Te extends ye{constructor(s,f,v,_){super(s,f,v,_),f.coordinates?Array.isArray(f.coordinates)&&f.coordinates.length===4&&!f.coordinates.some(k=>!Array.isArray(k)||k.length!==2||k.some(D=>typeof D!="number"))||this.fire(new o.ErrorEvent(new o.ValidationError(`sources.${s}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new o.ErrorEvent(new o.ValidationError(`sources.${s}`,null,'missing required property "coordinates"'))),f.animate&&typeof f.animate!="boolean"&&this.fire(new o.ErrorEvent(new o.ValidationError(`sources.${s}`,null,'optional "animate" property must be a boolean value'))),f.canvas?typeof f.canvas=="string"||f.canvas instanceof HTMLCanvasElement||this.fire(new o.ErrorEvent(new o.ValidationError(`sources.${s}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new o.ErrorEvent(new o.ValidationError(`sources.${s}`,null,'missing required property "canvas"'))),this.options=f,this.animate=f.animate===void 0||f.animate}load(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new o.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())}getCanvas(){return this.canvas}onAdd(s){this.map=s,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let s=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,s=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,s=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const f=this.map.painter.context,v=f.gl;this.boundsBuffer||(this.boundsBuffer=f.createVertexBuffer(this._boundsArray,oe.members)),this.boundsSegments||(this.boundsSegments=o.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(s||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new A(f,this.canvas,v.RGBA,{premultiply:!0});for(const _ in this.tiles){const k=this.tiles[_];k.state!=="loaded"&&(k.state="loaded",k.texture=this.texture)}}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const s of[this.canvas.width,this.canvas.height])if(isNaN(s)||s<=0)return!0;return!1}}const ke={vector:Z,raster:Q,"raster-dem":re,geojson:de,video:Re,image:ye,canvas:Te};function De(y,s){const f=o.create();return o.translate(f,f,[1,1,0]),o.scale(f,f,[.5*y.width,.5*y.height,1]),o.multiply(f,f,y.calculatePosMatrix(s.toUnwrapped()))}function Me(y,s,f,v,_,k){const D=function(ie,fe,Se){if(ie)for(const _e of ie){const we=fe[_e];if(we&&we.source===Se&&we.type==="fill-extrusion")return!0}else for(const _e in fe){const we=fe[_e];if(we.source===Se&&we.type==="fill-extrusion")return!0}return!1}(_&&_.layers,s,y.id),$=k.maxPitchScaleFactor(),V=y.tilesIn(v,$,D);V.sort(Ne);const W=[];for(const ie of V)W.push({wrappedTileID:ie.tileID.wrapped().key,queryResults:ie.tile.queryRenderedFeatures(s,f,y._state,ie.queryGeometry,ie.cameraQueryGeometry,ie.scale,_,k,$,De(y.transform,ie.tileID))});const ee=function(ie){const fe={},Se={};for(const _e of ie){const we=_e.queryResults,$e=_e.wrappedTileID,je=Se[$e]=Se[$e]||{};for(const et in we){const Pe=we[et],at=je[et]=je[et]||{},nt=fe[et]=fe[et]||[];for(const gt of Pe)at[gt.featureIndex]||(at[gt.featureIndex]=!0,nt.push(gt))}}return fe}(W);for(const ie in ee)ee[ie].forEach(fe=>{const Se=fe.feature,_e=y.getFeatureState(Se.layer["source-layer"],Se.id);Se.source=Se.layer.source,Se.layer["source-layer"]&&(Se.sourceLayer=Se.layer["source-layer"]),Se.state=_e});return ee}function Ne(y,s){const f=y.tileID,v=s.tileID;return f.overscaledZ-v.overscaledZ||f.canonical.y-v.canonical.y||f.wrap-v.wrap||f.canonical.x-v.canonical.x}class Le{constructor(s,f){this.tileID=s,this.uid=o.uniqueId(),this.uses=0,this.tileSize=f,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.textures=[],this.textureCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(s){const f=s+this.timeAdded;f<o.exported.now()||this.fadeEndTime&&f<this.fadeEndTime||(this.fadeEndTime=f)}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(s){this.demTexture&&s.saveTileTexture(this.demTexture),this.textures.forEach(f=>s.saveTileTexture(f)),this.demTexture=null,this.textures=[],this.textureCoords={}}loadVectorData(s,f,v){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",s){s.featureIndex&&(this.latestFeatureIndex=s.featureIndex,s.rawTileData?(this.latestRawTileData=s.rawTileData,this.latestFeatureIndex.rawTileData=s.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=s.collisionBoxArray,this.buckets=function(_,k){const D={};if(!k)return D;for(const $ of _){const V=$.layerIds.map(W=>k.getLayer(W)).filter(Boolean);if(V.length!==0){$.layers=V,$.stateDependentLayerIds&&($.stateDependentLayers=$.stateDependentLayerIds.map(W=>V.filter(ee=>ee.id===W)[0]));for(const W of V)D[W.id]=$}}return D}(s.buckets,f.style),this.hasSymbolBuckets=!1;for(const _ in this.buckets){const k=this.buckets[_];if(k instanceof o.SymbolBucket){if(this.hasSymbolBuckets=!0,!v)break;k.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const _ in this.buckets){const k=this.buckets[_];if(k instanceof o.SymbolBucket&&k.hasRTLText){this.hasRTLText=!0,o.lazyLoadRTLTextPlugin();break}}this.queryPadding=0;for(const _ in this.buckets){const k=this.buckets[_];this.queryPadding=Math.max(this.queryPadding,f.style.getLayer(_).queryRadius(k))}s.imageAtlas&&(this.imageAtlas=s.imageAtlas),s.glyphAtlasImage&&(this.glyphAtlasImage=s.glyphAtlasImage)}else this.collisionBoxArray=new o.CollisionBoxArray}unloadVectorData(){for(const s in this.buckets)this.buckets[s].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(s){return this.buckets[s.id]}upload(s){for(const v in this.buckets){const _=this.buckets[v];_.uploadPending()&&_.upload(s)}const f=s.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new A(s,this.imageAtlas.image,f.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new A(s,this.glyphAtlasImage,f.ALPHA),this.glyphAtlasImage=null)}prepare(s){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(s,this.imageAtlasTexture)}queryRenderedFeatures(s,f,v,_,k,D,$,V,W,ee){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:_,cameraQueryGeometry:k,scale:D,tileSize:this.tileSize,pixelPosMatrix:ee,transform:V,params:$,queryPadding:this.queryPadding*W},s,f,v):{}}querySourceFeatures(s,f){const v=this.latestFeatureIndex;if(!v||!v.rawTileData)return;const _=v.loadVTLayers(),k=f?f.sourceLayer:"",D=_._geojsonTileLayer||_[k];if(!D)return;const $=o.createFilter(f&&f.filter),{z:V,x:W,y:ee}=this.tileID.canonical,ie={z:V,x:W,y:ee};for(let fe=0;fe<D.length;fe++){const Se=D.feature(fe);if($.needGeometry){const $e=o.toEvaluationFeature(Se,!0);if(!$.filter(new o.EvaluationParameters(this.tileID.overscaledZ),$e,this.tileID.canonical))continue}else if(!$.filter(new o.EvaluationParameters(this.tileID.overscaledZ),Se))continue;const _e=v.getId(Se,k),we=new o.GeoJSONFeature(Se,V,W,ee,_e);we.tile=ie,s.push(we)}}hasData(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(s){const f=this.expirationTime;if(s.cacheControl){const v=o.parseCacheControl(s.cacheControl);v["max-age"]&&(this.expirationTime=Date.now()+1e3*v["max-age"])}else s.expires&&(this.expirationTime=new Date(s.expires).getTime());if(this.expirationTime){const v=Date.now();let _=!1;if(this.expirationTime>v)_=!1;else if(f)if(this.expirationTime<f)_=!0;else{const k=this.expirationTime-f;k?this.expirationTime=v+Math.max(k,3e4):_=!0}else _=!0;_?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}}getExpiryTimeout(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-new Date().getTime(),Math.pow(2,31)-1)}setFeatureState(s,f){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(s).length===0)return;const v=this.latestFeatureIndex.loadVTLayers();for(const _ in this.buckets){if(!f.style.hasLayer(_))continue;const k=this.buckets[_],D=k.layers[0].sourceLayer||"_geojsonTileLayer",$=v[D],V=s[D];if(!$||!V||Object.keys(V).length===0)continue;k.update(V,$,this.imageAtlas&&this.imageAtlas.patternPositions||{});const W=f&&f.style&&f.style.getLayer(_);W&&(this.queryPadding=Math.max(this.queryPadding,W.queryRadius(k)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<o.exported.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(s){this.symbolFadeHoldUntil=o.exported.now()+s}setDependencies(s,f){const v={};for(const _ of f)v[_]=!0;this.dependencies[s]=v}hasDependency(s,f){for(const v of s){const _=this.dependencies[v];if(_){for(const k of f)if(_[k])return!0}}return!1}}class Ve{constructor(s,f){this.max=s,this.onRemove=f,this.reset()}reset(){for(const s in this.data)for(const f of this.data[s])f.timeout&&clearTimeout(f.timeout),this.onRemove(f.value);return this.data={},this.order=[],this}add(s,f,v){const _=s.wrapped().key;this.data[_]===void 0&&(this.data[_]=[]);const k={value:f,timeout:void 0};if(v!==void 0&&(k.timeout=setTimeout(()=>{this.remove(s,k)},v)),this.data[_].push(k),this.order.push(_),this.order.length>this.max){const D=this._getAndRemoveByKey(this.order[0]);D&&this.onRemove(D)}return this}has(s){return s.wrapped().key in this.data}getAndRemove(s){return this.has(s)?this._getAndRemoveByKey(s.wrapped().key):null}_getAndRemoveByKey(s){const f=this.data[s].shift();return f.timeout&&clearTimeout(f.timeout),this.data[s].length===0&&delete this.data[s],this.order.splice(this.order.indexOf(s),1),f.value}getByKey(s){const f=this.data[s];return f?f[0].value:null}get(s){return this.has(s)?this.data[s.wrapped().key][0].value:null}remove(s,f){if(!this.has(s))return this;const v=s.wrapped().key,_=f===void 0?0:this.data[v].indexOf(f),k=this.data[v][_];return this.data[v].splice(_,1),k.timeout&&clearTimeout(k.timeout),this.data[v].length===0&&delete this.data[v],this.onRemove(k.value),this.order.splice(this.order.indexOf(v),1),this}setMaxSize(s){for(this.max=s;this.order.length>this.max;){const f=this._getAndRemoveByKey(this.order[0]);f&&this.onRemove(f)}return this}filter(s){const f=[];for(const v in this.data)for(const _ of this.data[v])s(_.value)||f.push(_);for(const v of f)this.remove(v.value.tileID,v)}}class qe{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(s,f,v){const _=String(f);if(this.stateChanges[s]=this.stateChanges[s]||{},this.stateChanges[s][_]=this.stateChanges[s][_]||{},o.extend(this.stateChanges[s][_],v),this.deletedStates[s]===null){this.deletedStates[s]={};for(const k in this.state[s])k!==_&&(this.deletedStates[s][k]=null)}else if(this.deletedStates[s]&&this.deletedStates[s][_]===null){this.deletedStates[s][_]={};for(const k in this.state[s][_])v[k]||(this.deletedStates[s][_][k]=null)}else for(const k in v)this.deletedStates[s]&&this.deletedStates[s][_]&&this.deletedStates[s][_][k]===null&&delete this.deletedStates[s][_][k]}removeFeatureState(s,f,v){if(this.deletedStates[s]===null)return;const _=String(f);if(this.deletedStates[s]=this.deletedStates[s]||{},v&&f!==void 0)this.deletedStates[s][_]!==null&&(this.deletedStates[s][_]=this.deletedStates[s][_]||{},this.deletedStates[s][_][v]=null);else if(f!==void 0)if(this.stateChanges[s]&&this.stateChanges[s][_])for(v in this.deletedStates[s][_]={},this.stateChanges[s][_])this.deletedStates[s][_][v]=null;else this.deletedStates[s][_]=null;else this.deletedStates[s]=null}getState(s,f){const v=String(f),_=o.extend({},(this.state[s]||{})[v],(this.stateChanges[s]||{})[v]);if(this.deletedStates[s]===null)return{};if(this.deletedStates[s]){const k=this.deletedStates[s][f];if(k===null)return{};for(const D in k)delete _[D]}return _}initializeTileState(s,f){s.setFeatureState(this.state,f)}coalesceChanges(s,f){const v={};for(const _ in this.stateChanges){this.state[_]=this.state[_]||{};const k={};for(const D in this.stateChanges[_])this.state[_][D]||(this.state[_][D]={}),o.extend(this.state[_][D],this.stateChanges[_][D]),k[D]=this.state[_][D];v[_]=k}for(const _ in this.deletedStates){this.state[_]=this.state[_]||{};const k={};if(this.deletedStates[_]===null)for(const D in this.state[_])k[D]={},this.state[_][D]={};else for(const D in this.deletedStates[_]){if(this.deletedStates[_][D]===null)this.state[_][D]={};else for(const $ of Object.keys(this.deletedStates[_][D]))delete this.state[_][D][$];k[D]=this.state[_][D]}v[_]=v[_]||{},o.extend(v[_],k)}if(this.stateChanges={},this.deletedStates={},Object.keys(v).length!==0)for(const _ in s)s[_].setFeatureState(v,f)}}class Ue extends o.Evented{constructor(s,f,v){super(),this.id=s,this.dispatcher=v,this.on("data",_=>{_.dataType==="source"&&_.sourceDataType==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&_.dataType==="source"&&_.sourceDataType==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain))}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=function(_,k,D,$){const V=new ke[k.type](_,k,D,$);if(V.id!==_)throw new Error(`Expected Source id to be ${_} instead of ${V.id}`);return o.bindAll(["load","abort","unload","serialize","prepare"],V),V}(s,f,v,this),this._tiles={},this._cache=new Ve(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new qe}onAdd(s){this.map=s,this._maxTileCacheSize=s?s._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(s)}onRemove(s){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(s)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(const s in this._tiles){const f=this._tiles[s];if(f.state!=="loaded"&&f.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const s=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,s&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(s,f){return this._source.loadTile(s,f)}_unloadTile(s){if(this._source.unloadTile)return this._source.unloadTile(s,()=>{})}_abortTile(s){this._source.abortTile&&this._source.abortTile(s,()=>{}),this._source.fire(new o.Event("dataabort",{tile:s,coord:s.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(s){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const f in this._tiles){const v=this._tiles[f];v.upload(s),v.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(s=>s.tileID).sort(ct).map(s=>s.key)}getRenderableIds(s){const f=[];for(const v in this._tiles)this._isIdRenderable(v,s)&&f.push(this._tiles[v]);return s?f.sort((v,_)=>{const k=v.tileID,D=_.tileID,$=new o.pointGeometry(k.canonical.x,k.canonical.y)._rotate(this.transform.angle),V=new o.pointGeometry(D.canonical.x,D.canonical.y)._rotate(this.transform.angle);return k.overscaledZ-D.overscaledZ||V.y-$.y||V.x-$.x}).map(v=>v.tileID.key):f.map(v=>v.tileID).sort(ct).map(v=>v.key)}hasRenderableParent(s){const f=this.findLoadedParent(s,0);return!!f&&this._isIdRenderable(f.tileID.key)}_isIdRenderable(s,f){return this._tiles[s]&&this._tiles[s].hasData()&&!this._coveredTiles[s]&&(f||!this._tiles[s].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const s in this._tiles)this._tiles[s].state!=="errored"&&this._reloadTile(s,"reloading")}}_reloadTile(s,f){const v=this._tiles[s];v&&(v.state!=="loading"&&(v.state=f),this._loadTile(v,this._tileLoaded.bind(this,v,s,f)))}_tileLoaded(s,f,v,_){if(_)return s.state="errored",void(_.status!==404?this._source.fire(new o.ErrorEvent(_,{tile:s})):this.update(this.transform,this.terrain));s.timeAdded=o.exported.now(),v==="expired"&&(s.refreshedUponExpiration=!0),this._setTileReloadTimer(f,s),this.getSource().type==="raster-dem"&&s.dem&&this._backfillDEM(s),this._state.initializeTileState(s,this.map?this.map.painter:null),s.aborted||this._source.fire(new o.Event("data",{dataType:"source",tile:s,coord:s.tileID}))}_backfillDEM(s){const f=this.getRenderableIds();for(let _=0;_<f.length;_++){const k=f[_];if(s.neighboringTiles&&s.neighboringTiles[k]){const D=this.getTileByID(k);v(s,D),v(D,s)}}function v(_,k){_.needsHillshadePrepare=!0,_.needsTerrainPrepare=!0;let D=k.tileID.canonical.x-_.tileID.canonical.x;const $=k.tileID.canonical.y-_.tileID.canonical.y,V=Math.pow(2,_.tileID.canonical.z),W=k.tileID.key;D===0&&$===0||Math.abs($)>1||(Math.abs(D)>1&&(Math.abs(D+V)===1?D+=V:Math.abs(D-V)===1&&(D-=V)),k.dem&&_.dem&&(_.dem.backfillBorder(k.dem,D,$),_.neighboringTiles&&_.neighboringTiles[W]&&(_.neighboringTiles[W].backfilled=!0)))}}getTile(s){return this.getTileByID(s.key)}getTileByID(s){return this._tiles[s]}_retainLoadedChildren(s,f,v,_){for(const k in this._tiles){let D=this._tiles[k];if(_[k]||!D.hasData()||D.tileID.overscaledZ<=f||D.tileID.overscaledZ>v)continue;let $=D.tileID;for(;D&&D.tileID.overscaledZ>f+1;){const W=D.tileID.scaledTo(D.tileID.overscaledZ-1);D=this._tiles[W.key],D&&D.hasData()&&($=W)}let V=$;for(;V.overscaledZ>f;)if(V=V.scaledTo(V.overscaledZ-1),s[V.key]){_[$.key]=$;break}}}findLoadedParent(s,f){if(s.key in this._loadedParentTiles){const v=this._loadedParentTiles[s.key];return v&&v.tileID.overscaledZ>=f?v:null}for(let v=s.overscaledZ-1;v>=f;v--){const _=s.scaledTo(v),k=this._getLoadedTile(_);if(k)return k}}_getLoadedTile(s){const f=this._tiles[s.key];return f&&f.hasData()?f:this._cache.getByKey(s.wrapped().key)}updateCacheSize(s){const f=Math.ceil(s.width/this._source.tileSize)+1,v=Math.ceil(s.height/this._source.tileSize)+1,_=Math.floor(f*v*5),k=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,_):_;this._cache.setMaxSize(k)}handleWrapJump(s){const f=Math.round((s-(this._prevLng===void 0?s:this._prevLng))/360);if(this._prevLng=s,f){const v={};for(const _ in this._tiles){const k=this._tiles[_];k.tileID=k.tileID.unwrapTo(k.tileID.wrap+f),v[k.tileID.key]=k}this._tiles=v;for(const _ in this._timers)clearTimeout(this._timers[_]),delete this._timers[_];for(const _ in this._tiles)this._setTileReloadTimer(_,this._tiles[_])}}update(s,f){if(this.transform=s,this.terrain=f,!this._sourceLoaded||this._paused)return;let v;this.updateCacheSize(s),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?v=s.getVisibleUnwrappedCoordinates(this._source.tileID).map(W=>new o.OverscaledTileID(W.canonical.z,W.wrap,W.canonical.z,W.canonical.x,W.canonical.y)):(v=s.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:f}),this._source.hasTile&&(v=v.filter(W=>this._source.hasTile(W)))):v=[];const _=s.coveringZoomLevel(this._source),k=Math.max(_-Ue.maxOverzooming,this._source.minzoom),D=Math.max(_+Ue.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const W={};for(const ee of v)if(ee.canonical.z>this._source.minzoom){const ie=ee.scaledTo(ee.canonical.z-1);W[ie.key]=ie;const fe=ee.scaledTo(Math.max(this._source.minzoom,Math.min(ee.canonical.z,5)));W[fe.key]=fe}v=v.concat(Object.values(W))}const $=this._updateRetainedTiles(v,_);if(pt(this._source.type)){const W={},ee={},ie=Object.keys($);for(const fe of ie){const Se=$[fe],_e=this._tiles[fe];if(!_e||_e.fadeEndTime&&_e.fadeEndTime<=o.exported.now())continue;const we=this.findLoadedParent(Se,k);we&&(this._addTile(we.tileID),W[we.tileID.key]=we.tileID),ee[fe]=Se}this._retainLoadedChildren(ee,_,D,$);for(const fe in W)$[fe]||(this._coveredTiles[fe]=!0,$[fe]=W[fe]);if(f){const fe={},Se={};for(const _e of v)this._tiles[_e.key].hasData()?fe[_e.key]=_e:Se[_e.key]=_e;for(const _e in Se){const we=Se[_e].children(this._source.maxzoom);this._tiles[we[0].key]&&this._tiles[we[1].key]&&this._tiles[we[2].key]&&this._tiles[we[3].key]&&(fe[we[0].key]=$[we[0].key]=we[0],fe[we[1].key]=$[we[1].key]=we[1],fe[we[2].key]=$[we[2].key]=we[2],fe[we[3].key]=$[we[3].key]=we[3],delete Se[_e])}for(const _e in Se){const we=this.findLoadedParent(Se[_e],this._source.minzoom);if(we){fe[we.tileID.key]=$[we.tileID.key]=we.tileID;for(const $e in fe)fe[$e].isChildOf(we.tileID)&&delete fe[$e]}}for(const _e in this._tiles)fe[_e]||(this._coveredTiles[_e]=!0)}}for(const W in $)this._tiles[W].clearFadeHold();const V=o.keysDifference(this._tiles,$);for(const W of V){const ee=this._tiles[W];ee.hasSymbolBuckets&&!ee.holdingForFade()?ee.setHoldDuration(this.map._fadeDuration):ee.hasSymbolBuckets&&!ee.symbolFadeFinished()||this._removeTile(W)}this._updateLoadedParentTileCache()}releaseSymbolFadeTiles(){for(const s in this._tiles)this._tiles[s].holdingForFade()&&this._removeTile(s)}_updateRetainedTiles(s,f){const v={},_={},k=Math.max(f-Ue.maxOverzooming,this._source.minzoom),D=Math.max(f+Ue.maxUnderzooming,this._source.minzoom),$={};for(const V of s){const W=this._addTile(V);v[V.key]=V,W.hasData()||f<this._source.maxzoom&&($[V.key]=V)}this._retainLoadedChildren($,f,D,v);for(const V of s){let W=this._tiles[V.key];if(W.hasData())continue;if(f+1>this._source.maxzoom){const ie=V.children(this._source.maxzoom)[0],fe=this.getTile(ie);if(fe&&fe.hasData()){v[ie.key]=ie;continue}}else{const ie=V.children(this._source.maxzoom);if(v[ie[0].key]&&v[ie[1].key]&&v[ie[2].key]&&v[ie[3].key])continue}let ee=W.wasRequested();for(let ie=V.overscaledZ-1;ie>=k;--ie){const fe=V.scaledTo(ie);if(_[fe.key]||(_[fe.key]=!0,W=this.getTile(fe),!W&&ee&&(W=this._addTile(fe)),W&&(v[fe.key]=fe,ee=W.wasRequested(),W.hasData())))break}}return v}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const s in this._tiles){const f=[];let v,_=this._tiles[s].tileID;for(;_.overscaledZ>0;){if(_.key in this._loadedParentTiles){v=this._loadedParentTiles[_.key];break}f.push(_.key);const k=_.scaledTo(_.overscaledZ-1);if(v=this._getLoadedTile(k),v)break;_=k}for(const k of f)this._loadedParentTiles[k]=v}}_addTile(s){let f=this._tiles[s.key];if(f)return f;f=this._cache.getAndRemove(s),f&&(this._setTileReloadTimer(s.key,f),f.tileID=s,this._state.initializeTileState(f,this.map?this.map.painter:null),this._cacheTimers[s.key]&&(clearTimeout(this._cacheTimers[s.key]),delete this._cacheTimers[s.key],this._setTileReloadTimer(s.key,f)));const v=f;return f||(f=new Le(s,this._source.tileSize*s.overscaleFactor()),this._loadTile(f,this._tileLoaded.bind(this,f,s.key,f.state))),f.uses++,this._tiles[s.key]=f,v||this._source.fire(new o.Event("dataloading",{tile:f,coord:f.tileID,dataType:"source"})),f}_setTileReloadTimer(s,f){s in this._timers&&(clearTimeout(this._timers[s]),delete this._timers[s]);const v=f.getExpiryTimeout();v&&(this._timers[s]=setTimeout(()=>{this._reloadTile(s,"expired"),delete this._timers[s]},v))}_removeTile(s){const f=this._tiles[s];f&&(f.uses--,delete this._tiles[s],this._timers[s]&&(clearTimeout(this._timers[s]),delete this._timers[s]),f.uses>0||(f.hasData()&&f.state!=="reloading"?this._cache.add(f.tileID,f,f.getExpiryTimeout()):(f.aborted=!0,this._abortTile(f),this._unloadTile(f))))}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const s in this._tiles)this._removeTile(s);this._cache.reset()}tilesIn(s,f,v){const _=[],k=this.transform;if(!k)return _;const D=v?k.getCameraQueryGeometry(s):s,$=s.map(_e=>k.pointCoordinate(_e,this.terrain)),V=D.map(_e=>k.pointCoordinate(_e,this.terrain)),W=this.getIds();let ee=1/0,ie=1/0,fe=-1/0,Se=-1/0;for(const _e of V)ee=Math.min(ee,_e.x),ie=Math.min(ie,_e.y),fe=Math.max(fe,_e.x),Se=Math.max(Se,_e.y);for(let _e=0;_e<W.length;_e++){const we=this._tiles[W[_e]];if(we.holdingForFade())continue;const $e=we.tileID,je=Math.pow(2,k.zoom-we.tileID.overscaledZ),et=f*we.queryPadding*o.EXTENT/we.tileSize/je,Pe=[$e.getTilePoint(new o.MercatorCoordinate(ee,ie)),$e.getTilePoint(new o.MercatorCoordinate(fe,Se))];if(Pe[0].x-et<o.EXTENT&&Pe[0].y-et<o.EXTENT&&Pe[1].x+et>=0&&Pe[1].y+et>=0){const at=$.map(gt=>$e.getTilePoint(gt)),nt=V.map(gt=>$e.getTilePoint(gt));_.push({tile:we,tileID:$e,queryGeometry:at,cameraQueryGeometry:nt,scale:je})}}return _}getVisibleCoordinates(s){const f=this.getRenderableIds(s).map(v=>this._tiles[v].tileID);for(const v of f)v.posMatrix=this.transform.calculatePosMatrix(v.toUnwrapped());return f}hasTransition(){if(this._source.hasTransition())return!0;if(pt(this._source.type))for(const s in this._tiles){const f=this._tiles[s];if(f.fadeEndTime!==void 0&&f.fadeEndTime>=o.exported.now())return!0}return!1}setFeatureState(s,f,v){this._state.updateState(s=s||"_geojsonTileLayer",f,v)}removeFeatureState(s,f,v){this._state.removeFeatureState(s=s||"_geojsonTileLayer",f,v)}getFeatureState(s,f){return this._state.getState(s=s||"_geojsonTileLayer",f)}setDependencies(s,f,v){const _=this._tiles[s];_&&_.setDependencies(f,v)}reloadTilesForDependencies(s,f){for(const v in this._tiles)this._tiles[v].hasDependency(s,f)&&this._reloadTile(v,"reloading");this._cache.filter(v=>!v.hasDependency(s,f))}}function ct(y,s){const f=Math.abs(2*y.wrap)-+(y.wrap<0),v=Math.abs(2*s.wrap)-+(s.wrap<0);return y.overscaledZ-s.overscaledZ||v-f||s.canonical.y-y.canonical.y||s.canonical.x-y.canonical.x}function pt(y){return y==="raster"||y==="image"||y==="video"}Ue.maxOverzooming=10,Ue.maxUnderzooming=3;const Tt="mapboxgl_preloaded_worker_pool";class Xe{constructor(){this.active={}}acquire(s){if(!this.workers)for(this.workers=[];this.workers.length<Xe.workerCount;)this.workers.push(new Worker(Ss.workerUrl));return this.active[s]=!0,this.workers.slice()}release(s){delete this.active[s],this.numActive()===0&&(this.workers.forEach(f=>{f.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[Tt]}numActive(){return Object.keys(this.active).length}}const Pt=Math.floor(o.exported.hardwareConcurrency/2);let mt;function Mt(){return mt||(mt=new Xe),mt}function Ct(y,s){const f={};for(const v in y)v!=="ref"&&(f[v]=y[v]);return o.refProperties.forEach(v=>{v in s&&(f[v]=s[v])}),f}function Lt(y){y=y.slice();const s=Object.create(null);for(let f=0;f<y.length;f++)s[y[f].id]=y[f];for(let f=0;f<y.length;f++)"ref"in y[f]&&(y[f]=Ct(y[f],s[y[f].ref]));return y}Xe.workerCount=Math.max(Math.min(Pt,6),1);const lt={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function dt(y,s,f){f.push({command:lt.addSource,args:[y,s[y]]})}function ut(y,s,f){s.push({command:lt.removeSource,args:[y]}),f[y]=!0}function it(y,s,f,v){ut(y,f,v),dt(y,s,f)}function ft(y,s,f){let v;for(v in y[f])if(Object.prototype.hasOwnProperty.call(y[f],v)&&v!=="data"&&!b(y[f][v],s[f][v]))return!1;for(v in s[f])if(Object.prototype.hasOwnProperty.call(s[f],v)&&v!=="data"&&!b(y[f][v],s[f][v]))return!1;return!0}function xt(y,s,f,v,_,k){let D;for(D in s=s||{},y=y||{})Object.prototype.hasOwnProperty.call(y,D)&&(b(y[D],s[D])||f.push({command:k,args:[v,D,s[D],_]}));for(D in s)Object.prototype.hasOwnProperty.call(s,D)&&!Object.prototype.hasOwnProperty.call(y,D)&&(b(y[D],s[D])||f.push({command:k,args:[v,D,s[D],_]}))}function Wt(y){return y.id}function Ut(y,s){return y[s.id]=s,y}class Qt{constructor(s,f){this.reset(s,f)}reset(s,f){this.points=s||[],this._distances=[0];for(let v=1;v<this.points.length;v++)this._distances[v]=this._distances[v-1]+this.points[v].dist(this.points[v-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(f||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(s){if(this.points.length===1)return this.points[0];s=o.clamp(s,0,1);let f=1,v=this._distances[f];const _=s*this.paddedLength+this.padding;for(;v<_&&f<this._distances.length;)v=this._distances[++f];const k=f-1,D=this._distances[k],$=v-D,V=$>0?(_-D)/$:0;return this.points[k].mult(1-V).add(this.points[f].mult(V))}}function Fe(y,s){let f=!0;return y==="always"||y!=="never"&&s!=="never"||(f=!1),f}class Ge{constructor(s,f,v){const _=this.boxCells=[],k=this.circleCells=[];this.xCellCount=Math.ceil(s/v),this.yCellCount=Math.ceil(f/v);for(let D=0;D<this.xCellCount*this.yCellCount;D++)_.push([]),k.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=s,this.height=f,this.xScale=this.xCellCount/s,this.yScale=this.yCellCount/f,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(s,f,v,_,k){this._forEachCell(f,v,_,k,this._insertBoxCell,this.boxUid++),this.boxKeys.push(s),this.bboxes.push(f),this.bboxes.push(v),this.bboxes.push(_),this.bboxes.push(k)}insertCircle(s,f,v,_){this._forEachCell(f-_,v-_,f+_,v+_,this._insertCircleCell,this.circleUid++),this.circleKeys.push(s),this.circles.push(f),this.circles.push(v),this.circles.push(_)}_insertBoxCell(s,f,v,_,k,D){this.boxCells[k].push(D)}_insertCircleCell(s,f,v,_,k,D){this.circleCells[k].push(D)}_query(s,f,v,_,k,D,$){if(v<0||s>this.width||_<0||f>this.height)return[];const V=[];if(s<=0&&f<=0&&this.width<=v&&this.height<=_){if(k)return[{key:null,x1:s,y1:f,x2:v,y2:_}];for(let W=0;W<this.boxKeys.length;W++)V.push({key:this.boxKeys[W],x1:this.bboxes[4*W],y1:this.bboxes[4*W+1],x2:this.bboxes[4*W+2],y2:this.bboxes[4*W+3]});for(let W=0;W<this.circleKeys.length;W++){const ee=this.circles[3*W],ie=this.circles[3*W+1],fe=this.circles[3*W+2];V.push({key:this.circleKeys[W],x1:ee-fe,y1:ie-fe,x2:ee+fe,y2:ie+fe})}}else this._forEachCell(s,f,v,_,this._queryCell,V,{hitTest:k,overlapMode:D,seenUids:{box:{},circle:{}}},$);return V}query(s,f,v,_){return this._query(s,f,v,_,!1,null)}hitTest(s,f,v,_,k,D){return this._query(s,f,v,_,!0,k,D).length>0}hitTestCircle(s,f,v,_,k){const D=s-v,$=s+v,V=f-v,W=f+v;if($<0||D>this.width||W<0||V>this.height)return!1;const ee=[];return this._forEachCell(D,V,$,W,this._queryCellCircle,ee,{hitTest:!0,overlapMode:_,circle:{x:s,y:f,radius:v},seenUids:{box:{},circle:{}}},k),ee.length>0}_queryCell(s,f,v,_,k,D,$,V){const{seenUids:W,hitTest:ee,overlapMode:ie}=$,fe=this.boxCells[k];if(fe!==null){const _e=this.bboxes;for(const we of fe)if(!W.box[we]){W.box[we]=!0;const $e=4*we,je=this.boxKeys[we];if(s<=_e[$e+2]&&f<=_e[$e+3]&&v>=_e[$e+0]&&_>=_e[$e+1]&&(!V||V(je))&&(!ee||!Fe(ie,je.overlapMode))&&(D.push({key:je,x1:_e[$e],y1:_e[$e+1],x2:_e[$e+2],y2:_e[$e+3]}),ee))return!0}}const Se=this.circleCells[k];if(Se!==null){const _e=this.circles;for(const we of Se)if(!W.circle[we]){W.circle[we]=!0;const $e=3*we,je=this.circleKeys[we];if(this._circleAndRectCollide(_e[$e],_e[$e+1],_e[$e+2],s,f,v,_)&&(!V||V(je))&&(!ee||!Fe(ie,je.overlapMode))){const et=_e[$e],Pe=_e[$e+1],at=_e[$e+2];if(D.push({key:je,x1:et-at,y1:Pe-at,x2:et+at,y2:Pe+at}),ee)return!0}}}return!1}_queryCellCircle(s,f,v,_,k,D,$,V){const{circle:W,seenUids:ee,overlapMode:ie}=$,fe=this.boxCells[k];if(fe!==null){const _e=this.bboxes;for(const we of fe)if(!ee.box[we]){ee.box[we]=!0;const $e=4*we,je=this.boxKeys[we];if(this._circleAndRectCollide(W.x,W.y,W.radius,_e[$e+0],_e[$e+1],_e[$e+2],_e[$e+3])&&(!V||V(je))&&!Fe(ie,je.overlapMode))return D.push(!0),!0}}const Se=this.circleCells[k];if(Se!==null){const _e=this.circles;for(const we of Se)if(!ee.circle[we]){ee.circle[we]=!0;const $e=3*we,je=this.circleKeys[we];if(this._circlesCollide(_e[$e],_e[$e+1],_e[$e+2],W.x,W.y,W.radius)&&(!V||V(je))&&!Fe(ie,je.overlapMode))return D.push(!0),!0}}}_forEachCell(s,f,v,_,k,D,$,V){const W=this._convertToXCellCoord(s),ee=this._convertToYCellCoord(f),ie=this._convertToXCellCoord(v),fe=this._convertToYCellCoord(_);for(let Se=W;Se<=ie;Se++)for(let _e=ee;_e<=fe;_e++)if(k.call(this,s,f,v,_,this.xCellCount*_e+Se,D,$,V))return}_convertToXCellCoord(s){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(s*this.xScale)))}_convertToYCellCoord(s){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(s*this.yScale)))}_circlesCollide(s,f,v,_,k,D){const $=_-s,V=k-f,W=v+D;return W*W>$*$+V*V}_circleAndRectCollide(s,f,v,_,k,D,$){const V=(D-_)/2,W=Math.abs(s-(_+V));if(W>V+v)return!1;const ee=($-k)/2,ie=Math.abs(f-(k+ee));if(ie>ee+v)return!1;if(W<=V||ie<=ee)return!0;const fe=W-V,Se=ie-ee;return fe*fe+Se*Se<=v*v}}function Xt(y,s,f,v,_){const k=o.create();return s?(o.scale(k,k,[1/_,1/_,1]),f||o.rotateZ(k,k,v.angle)):o.multiply(k,v.labelPlaneMatrix,y),k}function dn(y,s,f,v,_){if(s){const k=o.clone(y);return o.scale(k,k,[_,_,1]),f||o.rotateZ(k,k,-v.angle),k}return v.glCoordMatrix}function Vt(y,s,f){let v;f?(v=[y.x,y.y,f(y.x,y.y),1],o.transformMat4(v,v,s)):(v=[y.x,y.y,0,1],Tn(v,v,s));const _=v[3];return{point:new o.pointGeometry(v[0]/_,v[1]/_),signedDistanceFromCamera:_}}function jt(y,s){return .5+y/s*.5}function nn(y,s){const f=y[0]/y[3],v=y[1]/y[3];return f>=-s[0]&&f<=s[0]&&v>=-s[1]&&v<=s[1]}function _n(y,s,f,v,_,k,D,$,V,W){const ee=v?y.textSizeData:y.iconSizeData,ie=o.evaluateSizeForZoom(ee,f.transform.zoom),fe=[256/f.width*2+1,256/f.height*2+1],Se=v?y.text.dynamicLayoutVertexArray:y.icon.dynamicLayoutVertexArray;Se.clear();const _e=y.lineVertexArray,we=v?y.text.placedSymbolArray:y.icon.placedSymbolArray,$e=f.transform.width/f.transform.height;let je=!1;for(let et=0;et<we.length;et++){const Pe=we.get(et);if(Pe.hidden||Pe.writingMode===o.WritingMode.vertical&&!je){zt(Pe.numGlyphs,Se);continue}let at;if(je=!1,W?(at=[Pe.anchorX,Pe.anchorY,W(Pe.anchorX,Pe.anchorY),1],o.transformMat4(at,at,s)):(at=[Pe.anchorX,Pe.anchorY,0,1],Tn(at,at,s)),!nn(at,fe)){zt(Pe.numGlyphs,Se);continue}const nt=jt(f.transform.cameraToCenterDistance,at[3]),gt=o.evaluateSizeForFeature(ee,ie,Pe),yt=D?gt/nt:gt*nt,Dt=new o.pointGeometry(Pe.anchorX,Pe.anchorY),vt=Vt(Dt,_,W).point,rn={},qt=Gt(Pe,yt,!1,$,s,_,k,y.glyphOffsetArray,_e,Se,vt,Dt,rn,$e,V,W);je=qt.useVertical,(qt.notEnoughRoom||je||qt.needsFlipping&&Gt(Pe,yt,!0,$,s,_,k,y.glyphOffsetArray,_e,Se,vt,Dt,rn,$e,V,W).notEnoughRoom)&&zt(Pe.numGlyphs,Se)}v?y.text.dynamicLayoutVertexBuffer.updateData(Se):y.icon.dynamicLayoutVertexBuffer.updateData(Se)}function An(y,s,f,v,_,k,D,$,V,W,ee,ie,fe){const Se=$.glyphStartIndex+$.numGlyphs,_e=$.lineStartIndex,we=$.lineStartIndex+$.lineLength,$e=s.getoffsetX($.glyphStartIndex),je=s.getoffsetX(Se-1),et=Fn(y*$e,f,v,_,k,D,$.segment,_e,we,V,W,ee,ie,fe);if(!et)return null;const Pe=Fn(y*je,f,v,_,k,D,$.segment,_e,we,V,W,ee,ie,fe);return Pe?{first:et,last:Pe}:null}function _t(y,s,f,v){return y===o.WritingMode.horizontal&&Math.abs(f.y-s.y)>Math.abs(f.x-s.x)*v?{useVertical:!0}:(y===o.WritingMode.vertical?s.y<f.y:s.x>f.x)?{needsFlipping:!0}:null}function Gt(y,s,f,v,_,k,D,$,V,W,ee,ie,fe,Se,_e,we){const $e=s/24,je=y.lineOffsetX*$e,et=y.lineOffsetY*$e;let Pe;if(y.numGlyphs>1){const at=y.glyphStartIndex+y.numGlyphs,nt=y.lineStartIndex,gt=y.lineStartIndex+y.lineLength,yt=An($e,$,je,et,f,ee,ie,y,V,k,fe,_e,we);if(!yt)return{notEnoughRoom:!0};const Dt=Vt(yt.first.point,D,we).point,vt=Vt(yt.last.point,D,we).point;if(v&&!f){const rn=_t(y.writingMode,Dt,vt,Se);if(rn)return rn}Pe=[yt.first];for(let rn=y.glyphStartIndex+1;rn<at-1;rn++)Pe.push(Fn($e*$.getoffsetX(rn),je,et,f,ee,ie,y.segment,nt,gt,V,k,fe,_e,we));Pe.push(yt.last)}else{if(v&&!f){const nt=Vt(ie,_,we).point,gt=y.lineStartIndex+y.segment+1,yt=new o.pointGeometry(V.getx(gt),V.gety(gt)),Dt=Vt(yt,_,we),vt=Dt.signedDistanceFromCamera>0?Dt.point:an(ie,yt,nt,1,_,we),rn=_t(y.writingMode,nt,vt,Se);if(rn)return rn}const at=Fn($e*$.getoffsetX(y.glyphStartIndex),je,et,f,ee,ie,y.segment,y.lineStartIndex,y.lineStartIndex+y.lineLength,V,k,fe,_e,we);if(!at)return{notEnoughRoom:!0};Pe=[at]}for(const at of Pe)o.addDynamicAttributes(W,at.point,at.angle);return{}}function an(y,s,f,v,_,k){const D=Vt(y.add(y.sub(s)._unit()),_,k).point,$=f.sub(D);return f.add($._mult(v/$.mag()))}function Fn(y,s,f,v,_,k,D,$,V,W,ee,ie,fe,Se){const _e=v?y-s:y+s;let we=_e>0?1:-1,$e=0;v&&(we*=-1,$e=Math.PI),we<0&&($e+=Math.PI);let je=we>0?$+D:$+D+1,et=_,Pe=_,at=0,nt=0;const gt=Math.abs(_e),yt=[];for(;at+nt<=gt;){if(je+=we,je<$||je>=V)return null;if(Pe=et,yt.push(et),et=ie[je],et===void 0){const ln=new o.pointGeometry(W.getx(je),W.gety(je)),Dn=Vt(ln,ee,Se);if(Dn.signedDistanceFromCamera>0)et=ie[je]=Dn.point;else{const Vn=je-we;et=an(at===0?k:new o.pointGeometry(W.getx(Vn),W.gety(Vn)),ln,Pe,gt-at+1,ee,Se)}}at+=nt,nt=Pe.dist(et)}const Dt=(gt-at)/nt,vt=et.sub(Pe),rn=vt.mult(Dt)._add(Pe);rn._add(vt._unit()._perp()._mult(f*we));const qt=$e+Math.atan2(et.y-Pe.y,et.x-Pe.x);return yt.push(rn),{point:rn,angle:fe?qt:0,path:yt}}const kn=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function zt(y,s){for(let f=0;f<y;f++){const v=s.length;s.resize(v+4),s.float32.set(kn,3*v)}}function Tn(y,s,f){const v=s[0],_=s[1];return y[0]=f[0]*v+f[4]*_+f[12],y[1]=f[1]*v+f[5]*_+f[13],y[3]=f[3]*v+f[7]*_+f[15],y}const Cn=100;class hn{constructor(s,f=new Ge(s.width+200,s.height+200,25),v=new Ge(s.width+200,s.height+200,25)){this.transform=s,this.grid=f,this.ignoredGrid=v,this.pitchfactor=Math.cos(s._pitch)*s.cameraToCenterDistance,this.screenRightBoundary=s.width+Cn,this.screenBottomBoundary=s.height+Cn,this.gridRightBoundary=s.width+200,this.gridBottomBoundary=s.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(s,f,v,_,k,D){const $=this.projectAndGetPerspectiveRatio(_,s.anchorPointX,s.anchorPointY,D),V=v*$.perspectiveRatio,W=s.x1*V+$.point.x,ee=s.y1*V+$.point.y,ie=s.x2*V+$.point.x,fe=s.y2*V+$.point.y;return!this.isInsideGrid(W,ee,ie,fe)||f!=="always"&&this.grid.hitTest(W,ee,ie,fe,f,k)||$.perspectiveRatio<this.perspectiveRatioCutoff?{box:[],offscreen:!1}:{box:[W,ee,ie,fe],offscreen:this.isOffscreen(W,ee,ie,fe)}}placeCollisionCircles(s,f,v,_,k,D,$,V,W,ee,ie,fe,Se,_e){const we=[],$e=new o.pointGeometry(f.anchorX,f.anchorY),je=Vt($e,D,_e),et=jt(this.transform.cameraToCenterDistance,je.signedDistanceFromCamera),Pe=(ee?k/et:k*et)/o.ONE_EM,at=Vt($e,$,_e).point,nt=An(Pe,_,f.lineOffsetX*Pe,f.lineOffsetY*Pe,!1,at,$e,f,v,$,{},!1,_e);let gt=!1,yt=!1,Dt=!0;if(nt){const vt=.5*fe*et+Se,rn=new o.pointGeometry(-100,-100),qt=new o.pointGeometry(this.screenRightBoundary,this.screenBottomBoundary),ln=new Qt,Dn=nt.first,Vn=nt.last;let bn=[];for(let Qn=Dn.path.length-1;Qn>=1;Qn--)bn.push(Dn.path[Qn]);for(let Qn=1;Qn<Vn.path.length;Qn++)bn.push(Vn.path[Qn]);const cr=2.5*vt;if(V){const Qn=bn.map(er=>Vt(er,V,_e));bn=Qn.some(er=>er.signedDistanceFromCamera<=0)?[]:Qn.map(er=>er.point)}let dr=[];if(bn.length>0){const Qn=bn[0].clone(),er=bn[0].clone();for(let pr=1;pr<bn.length;pr++)Qn.x=Math.min(Qn.x,bn[pr].x),Qn.y=Math.min(Qn.y,bn[pr].y),er.x=Math.max(er.x,bn[pr].x),er.y=Math.max(er.y,bn[pr].y);dr=Qn.x>=rn.x&&er.x<=qt.x&&Qn.y>=rn.y&&er.y<=qt.y?[bn]:er.x<rn.x||Qn.x>qt.x||er.y<rn.y||Qn.y>qt.y?[]:o.clipLine([bn],rn.x,rn.y,qt.x,qt.y)}for(const Qn of dr){ln.reset(Qn,.25*vt);let er=0;er=ln.length<=.5*vt?1:Math.ceil(ln.paddedLength/cr)+1;for(let pr=0;pr<er;pr++){const vi=pr/Math.max(er-1,1),aa=ln.lerp(vi),Fo=aa.x+Cn,sa=aa.y+Cn;we.push(Fo,sa,vt,0);const es=Fo-vt,To=sa-vt,Qi=Fo+vt,Ma=sa+vt;if(Dt=Dt&&this.isOffscreen(es,To,Qi,Ma),yt=yt||this.isInsideGrid(es,To,Qi,Ma),s!=="always"&&this.grid.hitTestCircle(Fo,sa,vt,s,ie)&&(gt=!0,!W))return{circles:[],offscreen:!1,collisionDetected:gt}}}}return{circles:!W&&gt||!yt||et<this.perspectiveRatioCutoff?[]:we,offscreen:Dt,collisionDetected:gt}}queryRenderedSymbols(s){if(s.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};const f=[];let v=1/0,_=1/0,k=-1/0,D=-1/0;for(const ee of s){const ie=new o.pointGeometry(ee.x+Cn,ee.y+Cn);v=Math.min(v,ie.x),_=Math.min(_,ie.y),k=Math.max(k,ie.x),D=Math.max(D,ie.y),f.push(ie)}const $=this.grid.query(v,_,k,D).concat(this.ignoredGrid.query(v,_,k,D)),V={},W={};for(const ee of $){const ie=ee.key;if(V[ie.bucketInstanceId]===void 0&&(V[ie.bucketInstanceId]={}),V[ie.bucketInstanceId][ie.featureIndex])continue;const fe=[new o.pointGeometry(ee.x1,ee.y1),new o.pointGeometry(ee.x2,ee.y1),new o.pointGeometry(ee.x2,ee.y2),new o.pointGeometry(ee.x1,ee.y2)];o.polygonIntersectsPolygon(f,fe)&&(V[ie.bucketInstanceId][ie.featureIndex]=!0,W[ie.bucketInstanceId]===void 0&&(W[ie.bucketInstanceId]=[]),W[ie.bucketInstanceId].push(ie.featureIndex))}return W}insertCollisionBox(s,f,v,_,k,D){(v?this.ignoredGrid:this.grid).insert({bucketInstanceId:_,featureIndex:k,collisionGroupID:D,overlapMode:f},s[0],s[1],s[2],s[3])}insertCollisionCircles(s,f,v,_,k,D){const $=v?this.ignoredGrid:this.grid,V={bucketInstanceId:_,featureIndex:k,collisionGroupID:D,overlapMode:f};for(let W=0;W<s.length;W+=4)$.insertCircle(V,s[W],s[W+1],s[W+2])}projectAndGetPerspectiveRatio(s,f,v,_){let k;return _?(k=[f,v,_(f,v),1],o.transformMat4(k,k,s)):(k=[f,v,0,1],Tn(k,k,s)),{point:new o.pointGeometry((k[0]/k[3]+1)/2*this.transform.width+Cn,(-k[1]/k[3]+1)/2*this.transform.height+Cn),perspectiveRatio:.5+this.transform.cameraToCenterDistance/k[3]*.5}}isOffscreen(s,f,v,_){return v<Cn||s>=this.screenRightBoundary||_<Cn||f>this.screenBottomBoundary}isInsideGrid(s,f,v,_){return v>=0&&s<this.gridRightBoundary&&_>=0&&f<this.gridBottomBoundary}getViewportMatrix(){const s=o.identity([]);return o.translate(s,s,[-100,-100,0]),s}}function Nt(y,s,f){return s*(o.EXTENT/(y.tileSize*Math.pow(2,f-y.tileID.overscaledZ)))}class ot{constructor(s,f,v,_){this.opacity=s?Math.max(0,Math.min(1,s.opacity+(s.placed?f:-f))):_&&v?1:0,this.placed=v}isHidden(){return this.opacity===0&&!this.placed}}class ht{constructor(s,f,v,_,k){this.text=new ot(s?s.text:null,f,v,k),this.icon=new ot(s?s.icon:null,f,_,k)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class At{constructor(s,f,v){this.text=s,this.icon=f,this.skipFade=v}}class $t{constructor(){this.invProjMatrix=o.create(),this.viewportMatrix=o.create(),this.circles=[]}}class cn{constructor(s,f,v,_,k){this.bucketInstanceId=s,this.featureIndex=f,this.sourceLayerIndex=v,this.bucketIndex=_,this.tileID=k}}class Mn{constructor(s){this.crossSourceCollisions=s,this.maxGroupID=0,this.collisionGroups={}}get(s){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[s]){const f=++this.maxGroupID;this.collisionGroups[s]={ID:f,predicate:v=>v.collisionGroupID===f}}return this.collisionGroups[s]}}function Gn(y,s,f,v,_){const{horizontalAlign:k,verticalAlign:D}=o.getAnchorAlignment(y),$=-(k-.5)*s,V=-(D-.5)*f,W=o.evaluateVariableOffset(y,v);return new o.pointGeometry($+W[0]*_,V+W[1]*_)}function qn(y,s,f,v,_,k){const{x1:D,x2:$,y1:V,y2:W,anchorPointX:ee,anchorPointY:ie}=y,fe=new o.pointGeometry(s,f);return v&&fe._rotate(_?k:-k),{x1:D+fe.x,y1:V+fe.y,x2:$+fe.x,y2:W+fe.y,anchorPointX:ee,anchorPointY:ie}}class me{constructor(s,f,v,_,k){this.transform=s.clone(),this.terrain=f,this.collisionIndex=new hn(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=v,this.retainedQueryData={},this.collisionGroups=new Mn(_),this.collisionCircleArrays={},this.prevPlacement=k,k&&(k.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(s,f,v,_){const k=v.getBucket(f),D=v.latestFeatureIndex;if(!k||!D||f.id!==k.layerIds[0])return;const $=v.collisionBoxArray,V=k.layers[0].layout,W=Math.pow(2,this.transform.zoom-v.tileID.overscaledZ),ee=v.tileSize/o.EXTENT,ie=this.transform.calculatePosMatrix(v.tileID.toUnwrapped()),fe=V.get("text-pitch-alignment")==="map",Se=V.get("text-rotation-alignment")==="map",_e=Nt(v,1,this.transform.zoom),we=Xt(ie,fe,Se,this.transform,_e);let $e=null;if(fe){const et=dn(ie,fe,Se,this.transform,_e);$e=o.multiply([],this.transform.labelPlaneMatrix,et)}this.retainedQueryData[k.bucketInstanceId]=new cn(k.bucketInstanceId,D,k.sourceLayerIndex,k.index,v.tileID);const je={bucket:k,layout:V,posMatrix:ie,textLabelPlaneMatrix:we,labelToScreenMatrix:$e,scale:W,textPixelRatio:ee,holdingForFade:v.holdingForFade(),collisionBoxArray:$,partiallyEvaluatedTextSize:o.evaluateSizeForZoom(k.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(k.sourceID)};if(_)for(const et of k.sortKeyRanges){const{sortKey:Pe,symbolInstanceStart:at,symbolInstanceEnd:nt}=et;s.push({sortKey:Pe,symbolInstanceStart:at,symbolInstanceEnd:nt,parameters:je})}else s.push({symbolInstanceStart:0,symbolInstanceEnd:k.symbolInstances.length,parameters:je})}attemptAnchorPlacement(s,f,v,_,k,D,$,V,W,ee,ie,fe,Se,_e,we,$e){const je=[fe.textOffset0,fe.textOffset1],et=Gn(s,v,_,je,k),Pe=this.collisionIndex.placeCollisionBox(qn(f,et.x,et.y,D,$,this.transform.angle),ie,V,W,ee.predicate,$e);if((!we||this.collisionIndex.placeCollisionBox(qn(we,et.x,et.y,D,$,this.transform.angle),ie,V,W,ee.predicate,$e).box.length!==0)&&Pe.box.length>0){let at;if(this.prevPlacement&&this.prevPlacement.variableOffsets[fe.crossTileID]&&this.prevPlacement.placements[fe.crossTileID]&&this.prevPlacement.placements[fe.crossTileID].text&&(at=this.prevPlacement.variableOffsets[fe.crossTileID].anchor),fe.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[fe.crossTileID]={textOffset:je,width:v,height:_,anchor:s,textBoxScale:k,prevAnchor:at},this.markUsedJustification(Se,s,fe,_e),Se.allowVerticalPlacement&&(this.markUsedOrientation(Se,_e,fe),this.placedOrientations[fe.crossTileID]=_e),{shift:et,placedGlyphBoxes:Pe}}}placeLayerBucketPart(s,f,v){const{bucket:_,layout:k,posMatrix:D,textLabelPlaneMatrix:$,labelToScreenMatrix:V,textPixelRatio:W,holdingForFade:ee,collisionBoxArray:ie,partiallyEvaluatedTextSize:fe,collisionGroup:Se}=s.parameters,_e=k.get("text-optional"),we=k.get("icon-optional"),$e=o.getOverlapMode(k,"text-overlap","text-allow-overlap"),je=$e==="always",et=o.getOverlapMode(k,"icon-overlap","icon-allow-overlap"),Pe=et==="always",at=k.get("text-rotation-alignment")==="map",nt=k.get("text-pitch-alignment")==="map",gt=k.get("icon-text-fit")!=="none",yt=k.get("symbol-z-order")==="viewport-y",Dt=je&&(Pe||!_.hasIconData()||we),vt=Pe&&(je||!_.hasTextData()||_e);!_.collisionArrays&&ie&&_.deserializeCollisionBoxes(ie);const rn=(qt,ln)=>{if(f[qt.crossTileID])return;if(ee)return void(this.placements[qt.crossTileID]=new At(!1,!1,!1));let Dn=!1,Vn=!1,bn=!0,cr=null,dr={box:null,offscreen:null},Qn={box:null,offscreen:null},er=null,pr=null,vi=null,aa=0,Fo=0,sa=0;ln.textFeatureIndex?aa=ln.textFeatureIndex:qt.useRuntimeCollisionCircles&&(aa=qt.featureIndex),ln.verticalTextFeatureIndex&&(Fo=ln.verticalTextFeatureIndex);const es=this.retainedQueryData[_.bucketInstanceId].tileID,To=this.terrain?(ci,Hn)=>this.terrain.getElevation(es,ci,Hn):null;for(const ci of["textBox","verticalTextBox","iconBox","verticalIconBox"]){const Hn=ln[ci];Hn&&(Hn.elevation=To?To(Hn.anchorPointX,Hn.anchorPointY):0)}const Qi=ln.textBox;if(Qi){const ci=ur=>{let gi=o.WritingMode.horizontal;if(_.allowVerticalPlacement&&!ur&&this.prevPlacement){const yi=this.prevPlacement.placedOrientations[qt.crossTileID];yi&&(this.placedOrientations[qt.crossTileID]=yi,gi=yi,this.markUsedOrientation(_,gi,qt))}return gi},Hn=(ur,gi)=>{if(_.allowVerticalPlacement&&qt.numVerticalGlyphVertices>0&&ln.verticalTextBox){for(const yi of _.writingModes)if(yi===o.WritingMode.vertical?(dr=gi(),Qn=dr):dr=ur(),dr&&dr.box&&dr.box.length)break}else dr=ur()};if(k.get("text-variable-anchor")){let ur=k.get("text-variable-anchor");if(this.prevPlacement&&this.prevPlacement.variableOffsets[qt.crossTileID]){const Ar=this.prevPlacement.variableOffsets[qt.crossTileID];ur.indexOf(Ar.anchor)>0&&(ur=ur.filter(Po=>Po!==Ar.anchor),ur.unshift(Ar.anchor))}const gi=(Ar,Po,Es)=>{const Qf=Ar.x2-Ar.x1,_l=Ar.y2-Ar.y1,Xm=qt.textBoxScale,Jf=gt&&et==="never"?Po:null;let ts={box:[],offscreen:!1};const ks=$e!=="never"?2*ur.length:ur.length;for(let Ts=0;Ts<ks;++Ts){const Zc=this.attemptAnchorPlacement(ur[Ts%ur.length],Ar,Qf,_l,Xm,at,nt,W,D,Se,Ts>=ur.length?$e:"never",qt,_,Es,Jf,To);if(Zc&&(ts=Zc.placedGlyphBoxes,ts&&ts.box&&ts.box.length)){Dn=!0,cr=Zc.shift;break}}return ts};Hn(()=>gi(Qi,ln.iconBox,o.WritingMode.horizontal),()=>{const Ar=ln.verticalTextBox;return _.allowVerticalPlacement&&!(dr&&dr.box&&dr.box.length)&&qt.numVerticalGlyphVertices>0&&Ar?gi(Ar,ln.verticalIconBox,o.WritingMode.vertical):{box:null,offscreen:null}}),dr&&(Dn=dr.box,bn=dr.offscreen);const yi=ci(dr&&dr.box);if(!Dn&&this.prevPlacement){const Ar=this.prevPlacement.variableOffsets[qt.crossTileID];Ar&&(this.variableOffsets[qt.crossTileID]=Ar,this.markUsedJustification(_,Ar.anchor,qt,yi))}}else{const ur=(gi,yi)=>{const Ar=this.collisionIndex.placeCollisionBox(gi,$e,W,D,Se.predicate,To);return Ar&&Ar.box&&Ar.box.length&&(this.markUsedOrientation(_,yi,qt),this.placedOrientations[qt.crossTileID]=yi),Ar};Hn(()=>ur(Qi,o.WritingMode.horizontal),()=>{const gi=ln.verticalTextBox;return _.allowVerticalPlacement&&qt.numVerticalGlyphVertices>0&&gi?ur(gi,o.WritingMode.vertical):{box:null,offscreen:null}}),ci(dr&&dr.box&&dr.box.length)}}if(er=dr,Dn=er&&er.box&&er.box.length>0,bn=er&&er.offscreen,qt.useRuntimeCollisionCircles){const ci=_.text.placedSymbolArray.get(qt.centerJustifiedTextSymbolIndex),Hn=o.evaluateSizeForFeature(_.textSizeData,fe,ci),ur=k.get("text-padding");pr=this.collisionIndex.placeCollisionCircles($e,ci,_.lineVertexArray,_.glyphOffsetArray,Hn,D,$,V,v,nt,Se.predicate,qt.collisionCircleDiameter,ur,To),pr.circles.length&&pr.collisionDetected&&!v&&o.warnOnce("Collisions detected, but collision boxes are not shown"),Dn=je||pr.circles.length>0&&!pr.collisionDetected,bn=bn&&pr.offscreen}if(ln.iconFeatureIndex&&(sa=ln.iconFeatureIndex),ln.iconBox){const ci=Hn=>{const ur=gt&&cr?qn(Hn,cr.x,cr.y,at,nt,this.transform.angle):Hn;return this.collisionIndex.placeCollisionBox(ur,et,W,D,Se.predicate,To)};Qn&&Qn.box&&Qn.box.length&&ln.verticalIconBox?(vi=ci(ln.verticalIconBox),Vn=vi.box.length>0):(vi=ci(ln.iconBox),Vn=vi.box.length>0),bn=bn&&vi.offscreen}const Ma=_e||qt.numHorizontalGlyphVertices===0&&qt.numVerticalGlyphVertices===0,qc=we||qt.numIconVertices===0;if(Ma||qc?qc?Ma||(Vn=Vn&&Dn):Dn=Vn&&Dn:Vn=Dn=Vn&&Dn,Dn&&er&&er.box&&this.collisionIndex.insertCollisionBox(er.box,$e,k.get("text-ignore-placement"),_.bucketInstanceId,Qn&&Qn.box&&Fo?Fo:aa,Se.ID),Vn&&vi&&this.collisionIndex.insertCollisionBox(vi.box,et,k.get("icon-ignore-placement"),_.bucketInstanceId,sa,Se.ID),pr&&(Dn&&this.collisionIndex.insertCollisionCircles(pr.circles,$e,k.get("text-ignore-placement"),_.bucketInstanceId,aa,Se.ID),v)){const ci=_.bucketInstanceId;let Hn=this.collisionCircleArrays[ci];Hn===void 0&&(Hn=this.collisionCircleArrays[ci]=new $t);for(let ur=0;ur<pr.circles.length;ur+=4)Hn.circles.push(pr.circles[ur+0]),Hn.circles.push(pr.circles[ur+1]),Hn.circles.push(pr.circles[ur+2]),Hn.circles.push(pr.collisionDetected?1:0)}if(qt.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(_.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[qt.crossTileID]=new At(Dn||Dt,Vn||vt,bn||_.justReloaded),f[qt.crossTileID]=!0};if(yt){if(s.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");const qt=_.getSortedSymbolIndexes(this.transform.angle);for(let ln=qt.length-1;ln>=0;--ln){const Dn=qt[ln];rn(_.symbolInstances.get(Dn),_.collisionArrays[Dn])}}else for(let qt=s.symbolInstanceStart;qt<s.symbolInstanceEnd;qt++)rn(_.symbolInstances.get(qt),_.collisionArrays[qt]);if(v&&_.bucketInstanceId in this.collisionCircleArrays){const qt=this.collisionCircleArrays[_.bucketInstanceId];o.invert(qt.invProjMatrix,D),qt.viewportMatrix=this.collisionIndex.getViewportMatrix()}_.justReloaded=!1}markUsedJustification(s,f,v,_){let k;k=_===o.WritingMode.vertical?v.verticalPlacedTextSymbolIndex:{left:v.leftJustifiedTextSymbolIndex,center:v.centerJustifiedTextSymbolIndex,right:v.rightJustifiedTextSymbolIndex}[o.getAnchorJustification(f)];const D=[v.leftJustifiedTextSymbolIndex,v.centerJustifiedTextSymbolIndex,v.rightJustifiedTextSymbolIndex,v.verticalPlacedTextSymbolIndex];for(const $ of D)$>=0&&(s.text.placedSymbolArray.get($).crossTileID=k>=0&&$!==k?0:v.crossTileID)}markUsedOrientation(s,f,v){const _=f===o.WritingMode.horizontal||f===o.WritingMode.horizontalOnly?f:0,k=f===o.WritingMode.vertical?f:0,D=[v.leftJustifiedTextSymbolIndex,v.centerJustifiedTextSymbolIndex,v.rightJustifiedTextSymbolIndex];for(const $ of D)s.text.placedSymbolArray.get($).placedOrientation=_;v.verticalPlacedTextSymbolIndex&&(s.text.placedSymbolArray.get(v.verticalPlacedTextSymbolIndex).placedOrientation=k)}commit(s){this.commitTime=s,this.zoomAtLastRecencyCheck=this.transform.zoom;const f=this.prevPlacement;let v=!1;this.prevZoomAdjustment=f?f.zoomAdjustment(this.transform.zoom):0;const _=f?f.symbolFadeChange(s):1,k=f?f.opacities:{},D=f?f.variableOffsets:{},$=f?f.placedOrientations:{};for(const V in this.placements){const W=this.placements[V],ee=k[V];ee?(this.opacities[V]=new ht(ee,_,W.text,W.icon),v=v||W.text!==ee.text.placed||W.icon!==ee.icon.placed):(this.opacities[V]=new ht(null,_,W.text,W.icon,W.skipFade),v=v||W.text||W.icon)}for(const V in k){const W=k[V];if(!this.opacities[V]){const ee=new ht(W,_,!1,!1);ee.isHidden()||(this.opacities[V]=ee,v=v||W.text.placed||W.icon.placed)}}for(const V in D)this.variableOffsets[V]||!this.opacities[V]||this.opacities[V].isHidden()||(this.variableOffsets[V]=D[V]);for(const V in $)this.placedOrientations[V]||!this.opacities[V]||this.opacities[V].isHidden()||(this.placedOrientations[V]=$[V]);if(f&&f.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");v?this.lastPlacementChangeTime=s:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=f?f.lastPlacementChangeTime:s)}updateLayerOpacities(s,f){const v={};for(const _ of f){const k=_.getBucket(s);k&&_.latestFeatureIndex&&s.id===k.layerIds[0]&&this.updateBucketOpacities(k,v,_.collisionBoxArray)}}updateBucketOpacities(s,f,v){s.hasTextData()&&s.text.opacityVertexArray.clear(),s.hasIconData()&&s.icon.opacityVertexArray.clear(),s.hasIconCollisionBoxData()&&s.iconCollisionBox.collisionVertexArray.clear(),s.hasTextCollisionBoxData()&&s.textCollisionBox.collisionVertexArray.clear();const _=s.layers[0].layout,k=new ht(null,0,!1,!1,!0),D=_.get("text-allow-overlap"),$=_.get("icon-allow-overlap"),V=_.get("text-variable-anchor"),W=_.get("text-rotation-alignment")==="map",ee=_.get("text-pitch-alignment")==="map",ie=_.get("icon-text-fit")!=="none",fe=new ht(null,0,D&&($||!s.hasIconData()||_.get("icon-optional")),$&&(D||!s.hasTextData()||_.get("text-optional")),!0);!s.collisionArrays&&v&&(s.hasIconCollisionBoxData()||s.hasTextCollisionBoxData())&&s.deserializeCollisionBoxes(v);const Se=(_e,we,$e)=>{for(let je=0;je<we/4;je++)_e.opacityVertexArray.emplaceBack($e)};for(let _e=0;_e<s.symbolInstances.length;_e++){const we=s.symbolInstances.get(_e),{numHorizontalGlyphVertices:$e,numVerticalGlyphVertices:je,crossTileID:et}=we;let Pe=this.opacities[et];f[et]?Pe=k:Pe||(Pe=fe,this.opacities[et]=Pe),f[et]=!0;const at=we.numIconVertices>0,nt=this.placedOrientations[we.crossTileID],gt=nt===o.WritingMode.vertical,yt=nt===o.WritingMode.horizontal||nt===o.WritingMode.horizontalOnly;if($e>0||je>0){const Dt=Oe(Pe.text);Se(s.text,$e,gt?He:Dt),Se(s.text,je,yt?He:Dt);const vt=Pe.text.isHidden();[we.rightJustifiedTextSymbolIndex,we.centerJustifiedTextSymbolIndex,we.leftJustifiedTextSymbolIndex].forEach(ln=>{ln>=0&&(s.text.placedSymbolArray.get(ln).hidden=vt||gt?1:0)}),we.verticalPlacedTextSymbolIndex>=0&&(s.text.placedSymbolArray.get(we.verticalPlacedTextSymbolIndex).hidden=vt||yt?1:0);const rn=this.variableOffsets[we.crossTileID];rn&&this.markUsedJustification(s,rn.anchor,we,nt);const qt=this.placedOrientations[we.crossTileID];qt&&(this.markUsedJustification(s,"left",we,qt),this.markUsedOrientation(s,qt,we))}if(at){const Dt=Oe(Pe.icon),vt=!(ie&&we.verticalPlacedIconSymbolIndex&&gt);we.placedIconSymbolIndex>=0&&(Se(s.icon,we.numIconVertices,vt?Dt:He),s.icon.placedSymbolArray.get(we.placedIconSymbolIndex).hidden=Pe.icon.isHidden()),we.verticalPlacedIconSymbolIndex>=0&&(Se(s.icon,we.numVerticalIconVertices,vt?He:Dt),s.icon.placedSymbolArray.get(we.verticalPlacedIconSymbolIndex).hidden=Pe.icon.isHidden())}if(s.hasIconCollisionBoxData()||s.hasTextCollisionBoxData()){const Dt=s.collisionArrays[_e];if(Dt){let vt=new o.pointGeometry(0,0);if(Dt.textBox||Dt.verticalTextBox){let qt=!0;if(V){const ln=this.variableOffsets[et];ln?(vt=Gn(ln.anchor,ln.width,ln.height,ln.textOffset,ln.textBoxScale),W&&vt._rotate(ee?this.transform.angle:-this.transform.angle)):qt=!1}Dt.textBox&&K(s.textCollisionBox.collisionVertexArray,Pe.text.placed,!qt||gt,vt.x,vt.y),Dt.verticalTextBox&&K(s.textCollisionBox.collisionVertexArray,Pe.text.placed,!qt||yt,vt.x,vt.y)}const rn=Boolean(!yt&&Dt.verticalIconBox);Dt.iconBox&&K(s.iconCollisionBox.collisionVertexArray,Pe.icon.placed,rn,ie?vt.x:0,ie?vt.y:0),Dt.verticalIconBox&&K(s.iconCollisionBox.collisionVertexArray,Pe.icon.placed,!rn,ie?vt.x:0,ie?vt.y:0)}}}if(s.sortFeatures(this.transform.angle),this.retainedQueryData[s.bucketInstanceId]&&(this.retainedQueryData[s.bucketInstanceId].featureSortOrder=s.featureSortOrder),s.hasTextData()&&s.text.opacityVertexBuffer&&s.text.opacityVertexBuffer.updateData(s.text.opacityVertexArray),s.hasIconData()&&s.icon.opacityVertexBuffer&&s.icon.opacityVertexBuffer.updateData(s.icon.opacityVertexArray),s.hasIconCollisionBoxData()&&s.iconCollisionBox.collisionVertexBuffer&&s.iconCollisionBox.collisionVertexBuffer.updateData(s.iconCollisionBox.collisionVertexArray),s.hasTextCollisionBoxData()&&s.textCollisionBox.collisionVertexBuffer&&s.textCollisionBox.collisionVertexBuffer.updateData(s.textCollisionBox.collisionVertexArray),s.text.opacityVertexArray.length!==s.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${s.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${s.text.layoutVertexArray.length}) / 4`);if(s.icon.opacityVertexArray.length!==s.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${s.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${s.icon.layoutVertexArray.length}) / 4`);if(s.bucketInstanceId in this.collisionCircleArrays){const _e=this.collisionCircleArrays[s.bucketInstanceId];s.placementInvProjMatrix=_e.invProjMatrix,s.placementViewportMatrix=_e.viewportMatrix,s.collisionCircleArray=_e.circles,delete this.collisionCircleArrays[s.bucketInstanceId]}}symbolFadeChange(s){return this.fadeDuration===0?1:(s-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(s){return Math.max(0,(this.transform.zoom-s)/1.5)}hasTransitions(s){return this.stale||s-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(s,f){const v=this.zoomAtLastRecencyCheck===f?1-this.zoomAdjustment(f):1;return this.zoomAtLastRecencyCheck=f,this.commitTime+this.fadeDuration*v>s}setStale(){this.stale=!0}}function K(y,s,f,v,_){y.emplaceBack(s?1:0,f?1:0,v||0,_||0),y.emplaceBack(s?1:0,f?1:0,v||0,_||0),y.emplaceBack(s?1:0,f?1:0,v||0,_||0),y.emplaceBack(s?1:0,f?1:0,v||0,_||0)}const G=Math.pow(2,25),ce=Math.pow(2,24),ae=Math.pow(2,17),xe=Math.pow(2,16),Ee=Math.pow(2,9),be=Math.pow(2,8),Ce=Math.pow(2,1);function Oe(y){if(y.opacity===0&&!y.placed)return 0;if(y.opacity===1&&y.placed)return 4294967295;const s=y.placed?1:0,f=Math.floor(127*y.opacity);return f*G+s*ce+f*ae+s*xe+f*Ee+s*be+f*Ce+s}const He=0;class We{constructor(s){this._sortAcrossTiles=s.layout.get("symbol-z-order")!=="viewport-y"&&!s.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(s,f,v,_,k){const D=this._bucketParts;for(;this._currentTileIndex<s.length;)if(f.getBucketParts(D,_,s[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,k())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,D.sort(($,V)=>$.sortKey-V.sortKey));this._currentPartIndex<D.length;)if(f.placeLayerBucketPart(D[this._currentPartIndex],this._seenCrossTileIDs,v),this._currentPartIndex++,k())return!0;return!1}}class Be{constructor(s,f,v,_,k,D,$,V){this.placement=new me(s,f,D,$,V),this._currentPlacementIndex=v.length-1,this._forceFullPlacement=_,this._showCollisionBoxes=k,this._done=!1}isDone(){return this._done}continuePlacement(s,f,v){const _=o.exported.now(),k=()=>{const D=o.exported.now()-_;return!this._forceFullPlacement&&D>2};for(;this._currentPlacementIndex>=0;){const D=f[s[this._currentPlacementIndex]],$=this.placement.collisionIndex.transform.zoom;if(D.type==="symbol"&&(!D.minzoom||D.minzoom<=$)&&(!D.maxzoom||D.maxzoom>$)){if(this._inProgressLayer||(this._inProgressLayer=new We(D)),this._inProgressLayer.continuePlacement(v[D.source],this.placement,this._showCollisionBoxes,D,k))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(s){return this.placement.commit(s),this.placement}}const Ot=512/o.EXTENT/2;class bt{constructor(s,f,v){this.tileID=s,this.indexedSymbolInstances={},this.bucketInstanceId=v;for(let _=0;_<f.length;_++){const k=f.get(_),D=k.key;this.indexedSymbolInstances[D]||(this.indexedSymbolInstances[D]=[]),this.indexedSymbolInstances[D].push({crossTileID:k.crossTileID,coord:this.getScaledCoordinates(k,s)})}}getScaledCoordinates(s,f){const v=Ot/Math.pow(2,f.canonical.z-this.tileID.canonical.z);return{x:Math.floor((f.canonical.x*o.EXTENT+s.anchorX)*v),y:Math.floor((f.canonical.y*o.EXTENT+s.anchorY)*v)}}findMatches(s,f,v){const _=this.tileID.canonical.z<f.canonical.z?1:Math.pow(2,this.tileID.canonical.z-f.canonical.z);for(let k=0;k<s.length;k++){const D=s.get(k);if(D.crossTileID)continue;const $=this.indexedSymbolInstances[D.key];if(!$)continue;const V=this.getScaledCoordinates(D,f);for(const W of $)if(Math.abs(W.coord.x-V.x)<=_&&Math.abs(W.coord.y-V.y)<=_&&!v[W.crossTileID]){v[W.crossTileID]=!0,D.crossTileID=W.crossTileID;break}}}}class Je{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Rt{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(s){const f=Math.round((s-this.lng)/360);if(f!==0)for(const v in this.indexes){const _=this.indexes[v],k={};for(const D in _){const $=_[D];$.tileID=$.tileID.unwrapTo($.tileID.wrap+f),k[$.tileID.key]=$}this.indexes[v]=k}this.lng=s}addBucket(s,f,v){if(this.indexes[s.overscaledZ]&&this.indexes[s.overscaledZ][s.key]){if(this.indexes[s.overscaledZ][s.key].bucketInstanceId===f.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(s.overscaledZ,this.indexes[s.overscaledZ][s.key])}for(let k=0;k<f.symbolInstances.length;k++)f.symbolInstances.get(k).crossTileID=0;this.usedCrossTileIDs[s.overscaledZ]||(this.usedCrossTileIDs[s.overscaledZ]={});const _=this.usedCrossTileIDs[s.overscaledZ];for(const k in this.indexes){const D=this.indexes[k];if(Number(k)>s.overscaledZ)for(const $ in D){const V=D[$];V.tileID.isChildOf(s)&&V.findMatches(f.symbolInstances,s,_)}else{const $=D[s.scaledTo(Number(k)).key];$&&$.findMatches(f.symbolInstances,s,_)}}for(let k=0;k<f.symbolInstances.length;k++){const D=f.symbolInstances.get(k);D.crossTileID||(D.crossTileID=v.generate(),_[D.crossTileID]=!0)}return this.indexes[s.overscaledZ]===void 0&&(this.indexes[s.overscaledZ]={}),this.indexes[s.overscaledZ][s.key]=new bt(s,f.symbolInstances,f.bucketInstanceId),!0}removeBucketCrossTileIDs(s,f){for(const v in f.indexedSymbolInstances)for(const _ of f.indexedSymbolInstances[v])delete this.usedCrossTileIDs[s][_.crossTileID]}removeStaleBuckets(s){let f=!1;for(const v in this.indexes){const _=this.indexes[v];for(const k in _)s[_[k].bucketInstanceId]||(this.removeBucketCrossTileIDs(v,_[k]),delete _[k],f=!0)}return f}}class Bt{constructor(){this.layerIndexes={},this.crossTileIDs=new Je,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(s,f,v){let _=this.layerIndexes[s.id];_===void 0&&(_=this.layerIndexes[s.id]=new Rt);let k=!1;const D={};_.handleWrapJump(v);for(const $ of f){const V=$.getBucket(s);V&&s.id===V.layerIds[0]&&(V.bucketInstanceId||(V.bucketInstanceId=++this.maxBucketInstanceId),_.addBucket($.tileID,V,this.crossTileIDs)&&(k=!0),D[V.bucketInstanceId]=!0)}return _.removeStaleBuckets(D)&&(k=!0),k}pruneUnusedLayers(s){const f={};s.forEach(v=>{f[v]=!0});for(const v in this.layerIndexes)f[v]||delete this.layerIndexes[v]}}var gn=o.createLayout([{name:"a_pos",type:"Int16",components:2}]);class on extends o.Evented{constructor(s){super(),this.sourceCache=s,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.renderHistory=[],this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,this.renderHistorySize=s._cache.max,s.usedForTerrain=!0,s.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null;for(const s in this._tiles){const f=this._tiles[s];f.textures.forEach(v=>v.destroy()),f.textures=[]}}update(s,f){this.sourceCache.update(s,f),this._renderableTilesKeys=[];for(const v of s.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:f}))this._renderableTilesKeys.push(v.key),this._tiles[v.key]||(v.posMatrix=new Float64Array(16),o.ortho(v.posMatrix,0,o.EXTENT,0,o.EXTENT,0,1),this._tiles[v.key]=new Le(v,this.tileSize))}removeOutdated(s){const f={};this.renderHistory=this.renderHistory.filter((v,_)=>this.renderHistory.indexOf(v)===_).slice(0,this.renderHistorySize);for(const v of this._renderableTilesKeys)f[v]=!0;for(const v of this.renderHistory)f[v]=!0;for(const v in this._tiles)f[v]||(this._tiles[v].clearTextures(s),delete this._tiles[v])}getRenderableTiles(){return this._renderableTilesKeys.map(s=>this.getTileByID(s))}getTileByID(s){return this._tiles[s]}getTerrainCoords(s){const f={};for(const v of this._renderableTilesKeys){const _=this._tiles[v].tileID;if(_.canonical.equals(s.canonical)){const k=s.clone();k.posMatrix=new Float64Array(16),o.ortho(k.posMatrix,0,o.EXTENT,0,o.EXTENT,0,1),f[v]=k}else if(_.canonical.isChildOf(s.canonical)){const k=s.clone();k.posMatrix=new Float64Array(16);const D=_.canonical.z-s.canonical.z,$=_.canonical.x-(_.canonical.x>>D<<D),V=_.canonical.y-(_.canonical.y>>D<<D),W=o.EXTENT>>D;o.ortho(k.posMatrix,0,W,0,W,0,1),o.translate(k.posMatrix,k.posMatrix,[-$*W,-V*W,0]),f[v]=k}else if(s.canonical.isChildOf(_.canonical)){const k=s.clone();k.posMatrix=new Float64Array(16);const D=s.canonical.z-_.canonical.z,$=s.canonical.x-(s.canonical.x>>D<<D),V=s.canonical.y-(s.canonical.y>>D<<D),W=o.EXTENT>>D;o.ortho(k.posMatrix,0,o.EXTENT,0,o.EXTENT,0,1),o.translate(k.posMatrix,k.posMatrix,[$*W,V*W,0]),o.scale(k.posMatrix,k.posMatrix,[1/2**D,1/2**D,0]),f[v]=k}}return f}getSourceTile(s,f){const v=this.sourceCache._source;let _=s.overscaledZ-this.deltaZoom;if(_>v.maxzoom&&(_=v.maxzoom),_<v.minzoom)return null;this._sourceTileCache[s.key]||(this._sourceTileCache[s.key]=s.scaledTo(_).key);let k=this.sourceCache.getTileByID(this._sourceTileCache[s.key]);if((!k||!k.dem)&&f)for(;_>=v.minzoom&&(!k||!k.dem);)k=this.sourceCache.getTileByID(s.scaledTo(_--).key);return k}tilesAfterTime(s=Date.now()){return Object.values(this._tiles).filter(f=>f.timeLoaded>=s)}}class yn{constructor(s,f,v){this.style=s,this.sourceCache=new on(f),this.options=v,this.exaggeration=typeof v.exaggeration=="number"?v.exaggeration:1,this.elevationOffset=typeof v.elevationOffset=="number"?v.elevationOffset:450,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024,this.clearRerenderCache()}getDEMElevation(s,f,v,_=o.EXTENT){if(!(f>=0&&f<_&&v>=0&&v<_))return this.elevationOffset;let k=0;const D=this.getTerrainData(s);if(D.tile&&D.tile.dem){const $=o.transformMat4$1([],[f/_*o.EXTENT,v/_*o.EXTENT],D.u_terrain_matrix),V=[$[0]*D.tile.dem.dim,$[1]*D.tile.dem.dim],W=[Math.floor(V[0]),Math.floor(V[1])],ee=D.tile.dem.get(W[0],W[1]),ie=D.tile.dem.get(W[0],W[1]+1),fe=D.tile.dem.get(W[0]+1,W[1]),Se=D.tile.dem.get(W[0]+1,W[1]+1);k=o.number(o.number(ee,ie,V[0]-W[0]),o.number(fe,Se,V[0]-W[0]),V[1]-W[1])}return k}rememberForRerender(s,f){for(const v in this.sourceCache._tiles){const _=this.sourceCache._tiles[v];(_.tileID.equals(f)||_.tileID.isChildOf(f))&&(s===this.sourceCache.sourceCache.id&&(_.timeLoaded=Date.now()),this._rerender[s]=this._rerender[s]||{},this._rerender[s][_.tileID.key]=!0)}}needsRerender(s,f){return this._rerender[s]&&this._rerender[s][f.key]}clearRerenderCache(){this._rerender={}}getElevation(s,f,v,_=o.EXTENT){return(this.getDEMElevation(s,f,v,_)+this.elevationOffset)*this.exaggeration}getTerrainData(s){if(!this._emptyDemTexture){const _=this.style.map.painter.context,k=new o.RGBAImage({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new A(_,k,_.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new A(_,new o.RGBAImage({width:1,height:1}),_.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(_.gl.NEAREST,_.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=o.identity([])}const f=this.sourceCache.getSourceTile(s,!0);if(f&&f.dem&&(!f.demTexture||f.needsTerrainPrepare)){const _=this.style.map.painter.context;f.demTexture=this.style.map.painter.getTileTexture(f.dem.stride),f.demTexture?f.demTexture.update(f.dem.getPixels(),{premultiply:!1}):f.demTexture=new A(_,f.dem.getPixels(),_.gl.RGBA,{premultiply:!1}),f.demTexture.bind(_.gl.NEAREST,_.gl.CLAMP_TO_EDGE),f.needsTerrainPrepare=!1}const v=f&&f+f.tileID.key+s.key;if(v&&!this._demMatrixCache[v]){const _=this.sourceCache.sourceCache._source.maxzoom;let k=s.canonical.z-f.tileID.canonical.z;s.overscaledZ>s.canonical.z&&(s.canonical.z>=_?k=s.canonical.z-_:o.warnOnce("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const D=s.canonical.x-(s.canonical.x>>k<<k),$=s.canonical.y-(s.canonical.y>>k<<k),V=o.fromScaling(new Float64Array(16),[1/(o.EXTENT<<k),1/(o.EXTENT<<k),0]);o.translate(V,V,[D*o.EXTENT,$*o.EXTENT,0]),this._demMatrixCache[s.key]={matrix:V,coord:s}}return{u_depth:2,u_terrain:3,u_terrain_dim:f&&f.dem&&f.dem.dim||1,u_terrain_matrix:v?this._demMatrixCache[s.key].matrix:this._emptyDemMatrix,u_terrain_unpack:f&&f.dem&&f.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_offset:this.elevationOffset,u_terrain_exaggeration:this.exaggeration,texture:(f&&f.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:f}}getRTTFramebuffer(){const s=this.style.map.painter;if(!this._rttFramebuffer){const f=this.sourceCache.tileSize*this.qualityFactor;this._rttFramebuffer=s.context.createFramebuffer(f,f,!0),this._rttFramebuffer.depthAttachment.set(s.context.createRenderbuffer(s.context.gl.DEPTH_COMPONENT16,f,f))}return this._rttFramebuffer}getFramebuffer(s){const f=this.style.map.painter,v=f.width/devicePixelRatio,_=f.height/devicePixelRatio;return!this._fbo||this._fbo.width===v&&this._fbo.height===_||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new A(f.context,{width:v,height:_,data:null},f.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(f.context.gl.NEAREST,f.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new A(f.context,{width:v,height:_,data:null},f.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(f.context.gl.NEAREST,f.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=f.context.createFramebuffer(v,_,!0),this._fbo.depthAttachment.set(f.context.createRenderbuffer(f.context.gl.DEPTH_COMPONENT16,v,_))),this._fbo.colorAttachment.set(s==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const s=this.style.map.painter.context;if(this._coordsTexture)return this._coordsTexture;const f=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let k=0,D=0;k<this._coordsTextureSize;k++)for(let $=0;$<this._coordsTextureSize;$++,D+=4)f[D+0]=255&$,f[D+1]=255&k,f[D+2]=$>>8<<4|k>>8,f[D+3]=0;const v=new o.RGBAImage({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(f.buffer)),_=new A(s,v,s.gl.RGBA,{premultiply:!1});return _.bind(s.gl.NEAREST,s.gl.CLAMP_TO_EDGE),this._coordsTexture=_,_}pointCoordinate(s){const f=new Uint8Array(4),v=this.style.map.painter,_=v.context,k=_.gl;_.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),k.readPixels(s.x,v.height/devicePixelRatio-s.y-1,1,1,k.RGBA,k.UNSIGNED_BYTE,f),_.bindFramebuffer.set(null);const D=f[0]+(f[2]>>4<<8),$=f[1]+((15&f[2])<<8),V=this.coordsIndex[255-f[3]],W=V&&this.sourceCache.getTileByID(V);if(!W)return null;const ee=this._coordsTextureSize,ie=(1<<W.tileID.canonical.z)*ee;return new o.MercatorCoordinate((W.tileID.canonical.x*ee+D)/ie,(W.tileID.canonical.y*ee+$)/ie,this.getElevation(W.tileID,D,$,ee))}getTerrainMesh(){if(this._mesh)return this._mesh;const s=this.style.map.painter.context,f=new o.PosArray,v=new o.TriangleIndexArray,_=this.meshSize,k=o.EXTENT/_,D=_*_;for(let $=0;$<=_;$++)for(let V=0;V<=_;V++)f.emplaceBack(V*k,$*k);for(let $=0;$<D;$+=_+1)for(let V=0;V<_;V++)v.emplaceBack(V+$,_+V+$+1,_+V+$+2),v.emplaceBack(V+$,_+V+$+2,V+$+1);return this._mesh={indexBuffer:s.createIndexBuffer(v),vertexBuffer:s.createVertexBuffer(f,gn.members),segments:o.SegmentVector.simpleSegment(0,0,f.length,v.length)},this._mesh}getMinMaxElevation(s){const f=this.getTerrainData(s).tile,v={minElevation:null,maxElevation:null};return f&&f.dem&&(v.minElevation=(f.dem.min+this.elevationOffset)*this.exaggeration,v.maxElevation=(f.dem.max+this.elevationOffset)*this.exaggeration),v}}const Bn=(y,s)=>o.emitValidationErrors(y,s&&s.filter(f=>f.identifier!=="source.canvas")),Jn=o.pick(lt,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),Dr=o.pick(lt,["setCenter","setZoom","setBearing","setPitch"]),or=function(){const y={},s=o.spec.$version;for(const f in o.spec.$root){const v=o.spec.$root[f];if(v.required){let _=null;_=f==="version"?s:v.type==="array"?[]:{},_!=null&&(y[f]=_)}}return y}();class Pr extends o.Evented{constructor(s,f={}){super(),this.map=s,this.dispatcher=new Y(Mt(),this),this.imageManager=new M,this.imageManager.setEventedParent(this),this.glyphManager=new B(s._requestManager,f.localIdeographFontFamily),this.lineAtlas=new te(256,512),this.crossTileSymbolIndex=new Bt,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new o.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",o.getReferrer());const v=this;this._rtlTextPluginCallback=Pr.registerForPluginStateChange(_=>{v.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:_.pluginStatus,pluginURL:_.pluginURL},(k,D)=>{if(o.triggerPluginCompletionEvent(k),D&&D.every($=>$))for(const $ in v.sourceCaches)v.sourceCaches[$].reload()})}),this.on("data",_=>{if(_.dataType!=="source"||_.sourceDataType!=="metadata")return;const k=this.sourceCaches[_.sourceId];if(!k)return;const D=k.getSource();if(D&&D.vectorLayerIds)for(const $ in this._layers){const V=this._layers[$];V.source===D.id&&this._validateLayer(V)}})}loadURL(s,f={}){this.fire(new o.Event("dataloading",{dataType:"style"}));const v=typeof f.validate!="boolean"||f.validate,_=this.map._requestManager.transformRequest(s,o.ResourceType.Style);this._request=o.getJSON(_,(k,D)=>{this._request=null,k?this.fire(new o.ErrorEvent(k)):D&&this._load(D,v)})}loadJSON(s,f={}){this.fire(new o.Event("dataloading",{dataType:"style"})),this._request=o.exported.frame(()=>{this._request=null,this._load(s,f.validate!==!1)})}loadEmpty(){this.fire(new o.Event("dataloading",{dataType:"style"})),this._load(or,!1)}_load(s,f){if(f&&Bn(this,o.validateStyle(s)))return;this._loaded=!0,this.stylesheet=s;for(const _ in s.sources)this.addSource(_,s.sources[_],{validate:!1});s.sprite?this._loadSprite(s.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(s.glyphs);const v=Lt(this.stylesheet.layers);this._order=v.map(_=>_.id),this._layers={},this._serializedLayers={};for(let _ of v)_=o.createStyleLayer(_),_.setEventedParent(this,{layer:{id:_.id}}),this._layers[_.id]=_,this._serializedLayers[_.id]=_.serialize();this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new H(this.stylesheet.light),this.setTerrain(this.stylesheet.terrain),this.fire(new o.Event("data",{dataType:"style"})),this.fire(new o.Event("style.load"))}_loadSprite(s){this._spriteRequest=function(f,v,_,k){let D,$,V;const W=_>1?"@2x":"";let ee=o.getJSON(v.transformRequest(v.normalizeSpriteURL(f,W,".json"),o.ResourceType.SpriteJSON),(Se,_e)=>{ee=null,V||(V=Se,D=_e,fe())}),ie=o.getImage(v.transformRequest(v.normalizeSpriteURL(f,W,".png"),o.ResourceType.SpriteImage),(Se,_e)=>{ie=null,V||(V=Se,$=_e,fe())});function fe(){if(V)k(V);else if(D&&$){const Se=o.exported.getImageData($),_e={};for(const we in D){const{width:$e,height:je,x:et,y:Pe,sdf:at,pixelRatio:nt,stretchX:gt,stretchY:yt,content:Dt}=D[we],vt=new o.RGBAImage({width:$e,height:je});o.RGBAImage.copy(Se,vt,{x:et,y:Pe},{x:0,y:0},{width:$e,height:je}),_e[we]={data:vt,pixelRatio:nt,sdf:at,stretchX:gt,stretchY:yt,content:Dt}}k(null,_e)}}return{cancel(){ee&&(ee.cancel(),ee=null),ie&&(ie.cancel(),ie=null)}}}(s,this.map._requestManager,this.map.getPixelRatio(),(f,v)=>{if(this._spriteRequest=null,f)this.fire(new o.ErrorEvent(f));else if(v)for(const _ in v)this.imageManager.addImage(_,v[_]);this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new o.Event("data",{dataType:"style"}))})}_validateLayer(s){const f=this.sourceCaches[s.source];if(!f)return;const v=s.sourceLayer;if(!v)return;const _=f.getSource();(_.type==="geojson"||_.vectorLayerIds&&_.vectorLayerIds.indexOf(v)===-1)&&this.fire(new o.ErrorEvent(new Error(`Source layer "${v}" does not exist on source "${_.id}" as specified by style layer "${s.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const s in this.sourceCaches)if(!this.sourceCaches[s].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeLayers(s){const f=[];for(const v of s){const _=this._layers[v];_.type!=="custom"&&f.push(_.serialize())}return f}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;for(const s in this.sourceCaches)if(this.sourceCaches[s].hasTransition())return!0;for(const s in this._layers)if(this._layers[s].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(s){if(!this._loaded)return;const f=this._changed;if(this._changed){const _=Object.keys(this._updatedLayers),k=Object.keys(this._removedLayers);(_.length||k.length)&&this._updateWorkerLayers(_,k);for(const D in this._updatedSources){const $=this._updatedSources[D];if($==="reload")this._reloadSource(D);else{if($!=="clear")throw new Error(`Invalid action ${$}`);this._clearSource(D)}}this._updateTilesForChangedImages();for(const D in this._updatedPaintProps)this._layers[D].updateTransitions(s);this.light.updateTransitions(s),this._resetUpdates()}const v={};for(const _ in this.sourceCaches){const k=this.sourceCaches[_];v[_]=k.used,k.used=!1}for(const _ of this._order){const k=this._layers[_];k.recalculate(s,this._availableImages),!k.isHidden(s.zoom)&&k.source&&(this.sourceCaches[k.source].used=!0)}for(const _ in v){const k=this.sourceCaches[_];v[_]!==k.used&&k.fire(new o.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:_}))}this.light.recalculate(s),this.z=s.zoom,f&&this.fire(new o.Event("data",{dataType:"style"}))}_updateTilesForChangedImages(){const s=Object.keys(this._changedImages);if(s.length){for(const f in this.sourceCaches)this.sourceCaches[f].reloadTilesForDependencies(["icons","patterns"],s);this._changedImages={}}}_updateWorkerLayers(s,f){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(s),removedIds:f})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}}setTerrain(s){if(this._checkLoaded(),this._terrainDataCallback&&this.off("data",this._terrainDataCallback),this._terrainfreezeElevationCallback&&this.map.off("freezeElevation",this._terrainfreezeElevationCallback),s){const f=this.sourceCaches[s.source];if(!f)throw new Error(`cannot load terrain, because there exists no source with ID: ${s.source}`);this.terrain=new yn(this,f,s),this.map.transform.updateElevation(this.terrain),this._terrainfreezeElevationCallback=v=>{v.freeze?this.map.transform.freezeElevation=!0:(this.map.transform.freezeElevation=!1,this.map.transform.recalculateZoom(this.terrain))},this._terrainDataCallback=v=>{v.tile&&(v.sourceId===s.source?(this.map.transform.updateElevation(this.terrain),this.terrain.rememberForRerender(v.sourceId,v.tile.tileID)):v.source.type==="geojson"&&this.terrain.rememberForRerender(v.sourceId,v.tile.tileID))},this.on("data",this._terrainDataCallback),this.map.on("freezeElevation",this._terrainfreezeElevationCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.map.transform.updateElevation(this.terrain);this.map.fire(new o.Event("terrain",{terrain:s}))}setState(s){if(this._checkLoaded(),Bn(this,o.validateStyle(s)))return!1;(s=o.clone$1(s)).layers=Lt(s.layers);const f=function(_,k){if(!_)return[{command:lt.setStyle,args:[k]}];let D=[];try{if(!b(_.version,k.version))return[{command:lt.setStyle,args:[k]}];b(_.center,k.center)||D.push({command:lt.setCenter,args:[k.center]}),b(_.zoom,k.zoom)||D.push({command:lt.setZoom,args:[k.zoom]}),b(_.bearing,k.bearing)||D.push({command:lt.setBearing,args:[k.bearing]}),b(_.pitch,k.pitch)||D.push({command:lt.setPitch,args:[k.pitch]}),b(_.sprite,k.sprite)||D.push({command:lt.setSprite,args:[k.sprite]}),b(_.glyphs,k.glyphs)||D.push({command:lt.setGlyphs,args:[k.glyphs]}),b(_.transition,k.transition)||D.push({command:lt.setTransition,args:[k.transition]}),b(_.light,k.light)||D.push({command:lt.setLight,args:[k.light]});const $={},V=[];(function(ee,ie,fe,Se){let _e;for(_e in ie=ie||{},ee=ee||{})Object.prototype.hasOwnProperty.call(ee,_e)&&(Object.prototype.hasOwnProperty.call(ie,_e)||ut(_e,fe,Se));for(_e in ie)Object.prototype.hasOwnProperty.call(ie,_e)&&(Object.prototype.hasOwnProperty.call(ee,_e)?b(ee[_e],ie[_e])||(ee[_e].type==="geojson"&&ie[_e].type==="geojson"&&ft(ee,ie,_e)?fe.push({command:lt.setGeoJSONSourceData,args:[_e,ie[_e].data]}):it(_e,ie,fe,Se)):dt(_e,ie,fe))})(_.sources,k.sources,V,$);const W=[];_.layers&&_.layers.forEach(ee=>{$[ee.source]?D.push({command:lt.removeLayer,args:[ee.id]}):W.push(ee)}),D=D.concat(V),function(ee,ie,fe){ie=ie||[];const Se=(ee=ee||[]).map(Wt),_e=ie.map(Wt),we=ee.reduce(Ut,{}),$e=ie.reduce(Ut,{}),je=Se.slice(),et=Object.create(null);let Pe,at,nt,gt,yt,Dt,vt;for(Pe=0,at=0;Pe<Se.length;Pe++)nt=Se[Pe],Object.prototype.hasOwnProperty.call($e,nt)?at++:(fe.push({command:lt.removeLayer,args:[nt]}),je.splice(je.indexOf(nt,at),1));for(Pe=0,at=0;Pe<_e.length;Pe++)nt=_e[_e.length-1-Pe],je[je.length-1-Pe]!==nt&&(Object.prototype.hasOwnProperty.call(we,nt)?(fe.push({command:lt.removeLayer,args:[nt]}),je.splice(je.lastIndexOf(nt,je.length-at),1)):at++,Dt=je[je.length-Pe],fe.push({command:lt.addLayer,args:[$e[nt],Dt]}),je.splice(je.length-Pe,0,nt),et[nt]=!0);for(Pe=0;Pe<_e.length;Pe++)if(nt=_e[Pe],gt=we[nt],yt=$e[nt],!et[nt]&&!b(gt,yt))if(b(gt.source,yt.source)&&b(gt["source-layer"],yt["source-layer"])&&b(gt.type,yt.type)){for(vt in xt(gt.layout,yt.layout,fe,nt,null,lt.setLayoutProperty),xt(gt.paint,yt.paint,fe,nt,null,lt.setPaintProperty),b(gt.filter,yt.filter)||fe.push({command:lt.setFilter,args:[nt,yt.filter]}),b(gt.minzoom,yt.minzoom)&&b(gt.maxzoom,yt.maxzoom)||fe.push({command:lt.setLayerZoomRange,args:[nt,yt.minzoom,yt.maxzoom]}),gt)Object.prototype.hasOwnProperty.call(gt,vt)&&vt!=="layout"&&vt!=="paint"&&vt!=="filter"&&vt!=="metadata"&&vt!=="minzoom"&&vt!=="maxzoom"&&(vt.indexOf("paint.")===0?xt(gt[vt],yt[vt],fe,nt,vt.slice(6),lt.setPaintProperty):b(gt[vt],yt[vt])||fe.push({command:lt.setLayerProperty,args:[nt,vt,yt[vt]]}));for(vt in yt)Object.prototype.hasOwnProperty.call(yt,vt)&&!Object.prototype.hasOwnProperty.call(gt,vt)&&vt!=="layout"&&vt!=="paint"&&vt!=="filter"&&vt!=="metadata"&&vt!=="minzoom"&&vt!=="maxzoom"&&(vt.indexOf("paint.")===0?xt(gt[vt],yt[vt],fe,nt,vt.slice(6),lt.setPaintProperty):b(gt[vt],yt[vt])||fe.push({command:lt.setLayerProperty,args:[nt,vt,yt[vt]]}))}else fe.push({command:lt.removeLayer,args:[nt]}),Dt=je[je.lastIndexOf(nt)+1],fe.push({command:lt.addLayer,args:[yt,Dt]})}(W,k.layers,D)}catch($){console.warn("Unable to compute style diff:",$),D=[{command:lt.setStyle,args:[k]}]}return D}(this.serialize(),s).filter(_=>!(_.command in Dr));if(f.length===0)return!1;const v=f.filter(_=>!(_.command in Jn));if(v.length>0)throw new Error(`Unimplemented: ${v.map(_=>_.command).join(", ")}.`);return f.forEach(_=>{_.command!=="setTransition"&&this[_.command].apply(this,_.args)}),this.stylesheet=s,!0}addImage(s,f){if(this.getImage(s))return this.fire(new o.ErrorEvent(new Error(`An image named "${s}" already exists.`)));this.imageManager.addImage(s,f),this._afterImageUpdated(s)}updateImage(s,f){this.imageManager.updateImage(s,f)}getImage(s){return this.imageManager.getImage(s)}removeImage(s){if(!this.getImage(s))return this.fire(new o.ErrorEvent(new Error(`An image named "${s}" does not exist.`)));this.imageManager.removeImage(s),this._afterImageUpdated(s)}_afterImageUpdated(s){this._availableImages=this.imageManager.listImages(),this._changedImages[s]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new o.Event("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(s,f,v={}){if(this._checkLoaded(),this.sourceCaches[s]!==void 0)throw new Error(`Source "${s}" already exists.`);if(!f.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(f).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(f.type)>=0&&this._validate(o.validateStyle.source,`sources.${s}`,f,null,v))return;this.map&&this.map._collectResourceTiming&&(f.collectResourceTiming=!0);const _=this.sourceCaches[s]=new Ue(s,f,this.dispatcher);_.style=this,_.setEventedParent(this,()=>({isSourceLoaded:this.loaded(),source:_.serialize(),sourceId:s})),_.onAdd(this.map),this._changed=!0}removeSource(s){if(this._checkLoaded(),this.sourceCaches[s]===void 0)throw new Error("There is no source with this ID");for(const v in this._layers)if(this._layers[v].source===s)return this.fire(new o.ErrorEvent(new Error(`Source "${s}" cannot be removed while layer "${v}" is using it.`)));const f=this.sourceCaches[s];delete this.sourceCaches[s],delete this._updatedSources[s],f.fire(new o.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:s})),f.setEventedParent(null),f.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(s,f){if(this._checkLoaded(),this.sourceCaches[s]===void 0)throw new Error(`There is no source with this ID=${s}`);const v=this.sourceCaches[s].getSource();if(v.type!=="geojson")throw new Error(`geojsonSource.type is ${v.type}, which is !== 'geojson`);v.setData(f),this._changed=!0}getSource(s){return this.sourceCaches[s]&&this.sourceCaches[s].getSource()}addLayer(s,f,v={}){this._checkLoaded();const _=s.id;if(this.getLayer(_))return void this.fire(new o.ErrorEvent(new Error(`Layer "${_}" already exists on this map.`)));let k;if(s.type==="custom"){if(Bn(this,o.validateCustomStyleLayer(s)))return;k=o.createStyleLayer(s)}else{if(typeof s.source=="object"&&(this.addSource(_,s.source),s=o.clone$1(s),s=o.extend(s,{source:_})),this._validate(o.validateStyle.layer,`layers.${_}`,s,{arrayIndex:-1},v))return;k=o.createStyleLayer(s),this._validateLayer(k),k.setEventedParent(this,{layer:{id:_}}),this._serializedLayers[k.id]=k.serialize()}const D=f?this._order.indexOf(f):this._order.length;if(f&&D===-1)this.fire(new o.ErrorEvent(new Error(`Cannot add layer "${_}" before non-existing layer "${f}".`)));else{if(this._order.splice(D,0,_),this._layerOrderChanged=!0,this._layers[_]=k,this._removedLayers[_]&&k.source&&k.type!=="custom"){const $=this._removedLayers[_];delete this._removedLayers[_],$.type!==k.type?this._updatedSources[k.source]="clear":(this._updatedSources[k.source]="reload",this.sourceCaches[k.source].pause())}this._updateLayer(k),k.onAdd&&k.onAdd(this.map)}}moveLayer(s,f){if(this._checkLoaded(),this._changed=!0,!this._layers[s])return void this.fire(new o.ErrorEvent(new Error(`The layer '${s}' does not exist in the map's style and cannot be moved.`)));if(s===f)return;const v=this._order.indexOf(s);this._order.splice(v,1);const _=f?this._order.indexOf(f):this._order.length;f&&_===-1?this.fire(new o.ErrorEvent(new Error(`Cannot move layer "${s}" before non-existing layer "${f}".`))):(this._order.splice(_,0,s),this._layerOrderChanged=!0)}removeLayer(s){this._checkLoaded();const f=this._layers[s];if(!f)return void this.fire(new o.ErrorEvent(new Error(`Cannot remove non-existing layer "${s}".`)));f.setEventedParent(null);const v=this._order.indexOf(s);this._order.splice(v,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[s]=f,delete this._layers[s],delete this._serializedLayers[s],delete this._updatedLayers[s],delete this._updatedPaintProps[s],f.onRemove&&f.onRemove(this.map)}getLayer(s){return this._layers[s]}hasLayer(s){return s in this._layers}setLayerZoomRange(s,f,v){this._checkLoaded();const _=this.getLayer(s);_?_.minzoom===f&&_.maxzoom===v||(f!=null&&(_.minzoom=f),v!=null&&(_.maxzoom=v),this._updateLayer(_)):this.fire(new o.ErrorEvent(new Error(`Cannot set the zoom range of non-existing layer "${s}".`)))}setFilter(s,f,v={}){this._checkLoaded();const _=this.getLayer(s);if(_){if(!b(_.filter,f))return f==null?(_.filter=void 0,void this._updateLayer(_)):void(this._validate(o.validateStyle.filter,`layers.${_.id}.filter`,f,null,v)||(_.filter=o.clone$1(f),this._updateLayer(_)))}else this.fire(new o.ErrorEvent(new Error(`Cannot filter non-existing layer "${s}".`)))}getFilter(s){return o.clone$1(this.getLayer(s).filter)}setLayoutProperty(s,f,v,_={}){this._checkLoaded();const k=this.getLayer(s);k?b(k.getLayoutProperty(f),v)||(k.setLayoutProperty(f,v,_),this._updateLayer(k)):this.fire(new o.ErrorEvent(new Error(`Cannot style non-existing layer "${s}".`)))}getLayoutProperty(s,f){const v=this.getLayer(s);if(v)return v.getLayoutProperty(f);this.fire(new o.ErrorEvent(new Error(`Cannot get style of non-existing layer "${s}".`)))}setPaintProperty(s,f,v,_={}){this._checkLoaded();const k=this.getLayer(s);k?b(k.getPaintProperty(f),v)||(k.setPaintProperty(f,v,_)&&this._updateLayer(k),this._changed=!0,this._updatedPaintProps[s]=!0):this.fire(new o.ErrorEvent(new Error(`Cannot style non-existing layer "${s}".`)))}getPaintProperty(s,f){return this.getLayer(s).getPaintProperty(f)}setFeatureState(s,f){this._checkLoaded();const v=s.source,_=s.sourceLayer,k=this.sourceCaches[v];if(k===void 0)return void this.fire(new o.ErrorEvent(new Error(`The source '${v}' does not exist in the map's style.`)));const D=k.getSource().type;D==="geojson"&&_?this.fire(new o.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):D!=="vector"||_?(s.id===void 0&&this.fire(new o.ErrorEvent(new Error("The feature id parameter must be provided."))),k.setFeatureState(_,s.id,f)):this.fire(new o.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(s,f){this._checkLoaded();const v=s.source,_=this.sourceCaches[v];if(_===void 0)return void this.fire(new o.ErrorEvent(new Error(`The source '${v}' does not exist in the map's style.`)));const k=_.getSource().type,D=k==="vector"?s.sourceLayer:void 0;k!=="vector"||D?f&&typeof s.id!="string"&&typeof s.id!="number"?this.fire(new o.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):_.removeFeatureState(D,s.id,f):this.fire(new o.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(s){this._checkLoaded();const f=s.source,v=s.sourceLayer,_=this.sourceCaches[f];if(_!==void 0)return _.getSource().type!=="vector"||v?(s.id===void 0&&this.fire(new o.ErrorEvent(new Error("The feature id parameter must be provided."))),_.getFeatureState(v,s.id)):void this.fire(new o.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new o.ErrorEvent(new Error(`The source '${f}' does not exist in the map's style.`)))}getTransition(){return o.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){return o.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:o.mapObject(this.sourceCaches,s=>s.serialize()),layers:this._serializeLayers(this._order)},s=>s!==void 0)}_updateLayer(s){this._updatedLayers[s.id]=!0,s.source&&!this._updatedSources[s.source]&&this.sourceCaches[s.source].getSource().type!=="raster"&&(this._updatedSources[s.source]="reload",this.sourceCaches[s.source].pause()),this._changed=!0}_flattenAndSortRenderedFeatures(s){const f=D=>this._layers[D].type==="fill-extrusion",v={},_=[];for(let D=this._order.length-1;D>=0;D--){const $=this._order[D];if(f($)){v[$]=D;for(const V of s){const W=V[$];if(W)for(const ee of W)_.push(ee)}}}_.sort((D,$)=>$.intersectionZ-D.intersectionZ);const k=[];for(let D=this._order.length-1;D>=0;D--){const $=this._order[D];if(f($))for(let V=_.length-1;V>=0;V--){const W=_[V].feature;if(v[W.layer.id]<D)break;k.push(W),_.pop()}else for(const V of s){const W=V[$];if(W)for(const ee of W)k.push(ee.feature)}}return k}queryRenderedFeatures(s,f,v){f&&f.filter&&this._validate(o.validateStyle.filter,"queryRenderedFeatures.filter",f.filter,null,f);const _={};if(f&&f.layers){if(!Array.isArray(f.layers))return this.fire(new o.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(const D of f.layers){const $=this._layers[D];if(!$)return this.fire(new o.ErrorEvent(new Error(`The layer '${D}' does not exist in the map's style and cannot be queried for features.`))),[];_[$.source]=!0}}const k=[];f.availableImages=this._availableImages;for(const D in this.sourceCaches)f.layers&&!_[D]||k.push(Me(this.sourceCaches[D],this._layers,this._serializedLayers,s,f,v));return this.placement&&k.push(function(D,$,V,W,ee,ie,fe){const Se={},_e=ie.queryRenderedSymbols(W),we=[];for(const $e of Object.keys(_e).map(Number))we.push(fe[$e]);we.sort(Ne);for(const $e of we){const je=$e.featureIndex.lookupSymbolFeatures(_e[$e.bucketInstanceId],$,$e.bucketIndex,$e.sourceLayerIndex,ee.filter,ee.layers,ee.availableImages,D);for(const et in je){const Pe=Se[et]=Se[et]||[],at=je[et];at.sort((nt,gt)=>{const yt=$e.featureSortOrder;if(yt){const Dt=yt.indexOf(nt.featureIndex);return yt.indexOf(gt.featureIndex)-Dt}return gt.featureIndex-nt.featureIndex});for(const nt of at)Pe.push(nt)}}for(const $e in Se)Se[$e].forEach(je=>{const et=je.feature,Pe=V[D[$e].source].getFeatureState(et.layer["source-layer"],et.id);et.source=et.layer.source,et.layer["source-layer"]&&(et.sourceLayer=et.layer["source-layer"]),et.state=Pe});return Se}(this._layers,this._serializedLayers,this.sourceCaches,s,f,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(k)}querySourceFeatures(s,f){f&&f.filter&&this._validate(o.validateStyle.filter,"querySourceFeatures.filter",f.filter,null,f);const v=this.sourceCaches[s];return v?function(_,k){const D=_.getRenderableIds().map(W=>_.getTileByID(W)),$=[],V={};for(let W=0;W<D.length;W++){const ee=D[W],ie=ee.tileID.canonical.key;V[ie]||(V[ie]=!0,ee.querySourceFeatures($,k))}return $}(v,f):[]}addSourceType(s,f,v){return Pr.getSourceType(s)?v(new Error(`A source type called "${s}" already exists.`)):(Pr.setSourceType(s,f),f.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:s,url:f.workerSourceURL},v):v(null,null))}getLight(){return this.light.getLight()}setLight(s,f={}){this._checkLoaded();const v=this.light.getLight();let _=!1;for(const D in s)if(!b(s[D],v[D])){_=!0;break}if(!_)return;const k={now:o.exported.now(),transition:o.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(s,f),this.light.updateTransitions(k)}_validate(s,f,v,_,k={}){return(!k||k.validate!==!1)&&Bn(this,s.call(o.validateStyle,o.extend({key:f,style:this.serialize(),value:v,styleSpec:o.spec},_)))}_remove(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),o.evented.off("pluginStateChange",this._rtlTextPluginCallback);for(const s in this._layers)this._layers[s].setEventedParent(null);for(const s in this.sourceCaches){const f=this.sourceCaches[s];f.setEventedParent(null),f.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()}_clearSource(s){this.sourceCaches[s].clearTiles()}_reloadSource(s){this.sourceCaches[s].resume(),this.sourceCaches[s].reload()}_updateSources(s){for(const f in this.sourceCaches)this.sourceCaches[f].update(s,this.terrain)}_generateCollisionBoxes(){for(const s in this.sourceCaches)this._reloadSource(s)}_updatePlacement(s,f,v,_,k=!1){let D=!1,$=!1;const V={};for(const W of this._order){const ee=this._layers[W];if(ee.type!=="symbol")continue;if(!V[ee.source]){const fe=this.sourceCaches[ee.source];V[ee.source]=fe.getRenderableIds(!0).map(Se=>fe.getTileByID(Se)).sort((Se,_e)=>_e.tileID.overscaledZ-Se.tileID.overscaledZ||(Se.tileID.isLessThan(_e.tileID)?-1:1))}const ie=this.crossTileSymbolIndex.addLayer(ee,V[ee.source],s.center.lng);D=D||ie}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((k=k||this._layerOrderChanged||v===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(o.exported.now(),s.zoom))&&(this.pauseablePlacement=new Be(s,this.terrain,this._order,k,f,v,_,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,V),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(o.exported.now()),$=!0),D&&this.pauseablePlacement.placement.setStale()),$||D)for(const W of this._order){const ee=this._layers[W];ee.type==="symbol"&&this.placement.updateLayerOpacities(ee,V[ee.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(o.exported.now())}_releaseSymbolFadeTiles(){for(const s in this.sourceCaches)this.sourceCaches[s].releaseSymbolFadeTiles()}getImages(s,f,v){this.imageManager.getImages(f.icons,v),this._updateTilesForChangedImages();const _=this.sourceCaches[f.source];_&&_.setDependencies(f.tileID.key,f.type,f.icons)}getGlyphs(s,f,v){this.glyphManager.getGlyphs(f.stacks,v)}getResource(s,f,v){return o.makeRequest(f,v)}}Pr.getSourceType=function(y){return ke[y]},Pr.setSourceType=function(y,s){ke[y]=s},Pr.registerForPluginStateChange=o.registerForPluginStateChange;var Pn="attribute vec2 a_pos;uniform mat4 u_matrix;varying vec2 v_texture_pos;varying float v_depth;void main() {v_texture_pos=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos,get_elevation(a_pos),1.0);v_depth=gl_Position.z/gl_Position.w;}";const Sn={prelude:Rn(`#ifdef GL_ES
precision mediump float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif`,`#ifdef GL_ES
precision highp float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif
vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0
);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}
#ifdef TERRAIN3D
uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_offset;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;
#endif
const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {
#ifdef TERRAIN3D
highp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));
#else
return 1.0;
#endif
}float calculate_visibility(vec4 pos) {
#ifdef TERRAIN3D
vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;
#else
return 1.0;
#endif
}float ele(vec2 pos) {
#ifdef TERRAIN3D
vec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;
#else
return 0.0;
#endif
}float get_elevation(vec2 pos) {
#ifdef TERRAIN3D
vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return (elevation+u_terrain_offset)*u_terrain_exaggeration;
#else
return 0.0;
#endif
}`),background:Rn(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:Rn(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:Rn(`varying vec3 v_data;varying float v_visibility;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
vec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main(void) {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:Rn("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:Rn(`uniform highp float u_intensity;varying vec2 v_extrude;
#pragma mapbox: define highp float weight
#define GAUSS_COEF 0.3989422804014327
void main() {
#pragma mapbox: initialize highp float weight
float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;
#pragma mapbox: define highp float weight
#pragma mapbox: define mediump float radius
const highp float ZERO=1.0/255.0/16.0;
#define GAUSS_COEF 0.3989422804014327
void main(void) {
#pragma mapbox: initialize highp float weight
#pragma mapbox: initialize mediump float radius
vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}`),heatmapTexture:Rn(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(0.0);
#endif
}`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:Rn("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,get_elevation(a_pos),1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:Rn("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:Rn("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:Rn(`#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_FragColor=color*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`attribute vec2 a_pos;uniform mat4 u_matrix;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:Rn(`varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:Rn(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillPattern:Rn(`#ifdef GL_ES
precision highp float;
#endif
uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:Rn(`varying vec4 v_color;void main() {gl_FragColor=v_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;
#ifdef TERRAIN3D
attribute vec2 a_centroid;
#endif
varying vec4 v_color;
#pragma mapbox: define highp float base
#pragma mapbox: define highp float height
#pragma mapbox: define highp vec4 color
void main() {
#pragma mapbox: initialize highp float base
#pragma mapbox: initialize highp float height
#pragma mapbox: initialize highp vec4 color
vec3 normal=a_normal_ed.xyz;
#ifdef TERRAIN3D
float baseDelta=10.0;float ele=get_elevation(a_centroid);
#else
float baseDelta=0.0;float ele=0.0;
#endif
base=max(0.0,ele+base-baseDelta);height=max(0.0,ele+height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:Rn(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;
#ifdef TERRAIN3D
attribute vec2 a_centroid;
#endif
varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;
#ifdef TERRAIN3D
float baseDelta=10.0;float ele=get_elevation(a_centroid);
#else
float baseDelta=0.0;float ele=0.0;
#endif
base=max(0.0,ele+base-baseDelta);height=max(0.0,ele+height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0
? a_pos
: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:Rn(`#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:Rn(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;
#define PI 3.141592653589793
void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),line:Rn(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
#endif
v_width2=vec2(outset,inset);}`),lineGradient:Rn(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
#endif
v_width2=vec2(outset,inset);}`),linePattern:Rn(`#ifdef GL_ES
precision highp float;
#endif
uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
#endif
v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:Rn(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
#endif
v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:Rn(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:Rn(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float opacity
lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float opacity
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),ele,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),z,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:Rn(`#define SDF_PX 8.0
uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),ele,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),z,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:Rn(`#define SDF_PX 8.0
#define SDF 1.0
#define ICON 0.0
uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),ele,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),z,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:Rn("uniform sampler2D u_texture;varying vec2 v_texture_pos;void main() {gl_FragColor=texture2D(u_texture,v_texture_pos);}",Pn),terrainDepth:Rn("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}",Pn),terrainCoords:Rn("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}",Pn)};function Rn(y,s){const f=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,v=s.match(/attribute ([\w]+) ([\w]+)/g),_=y.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),k=s.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),D=k?k.concat(_):_,$={};return{fragmentSource:y=y.replace(f,(V,W,ee,ie,fe)=>($[fe]=!0,W==="define"?`
#ifndef HAS_UNIFORM_u_${fe}
varying ${ee} ${ie} ${fe};
#else
uniform ${ee} ${ie} u_${fe};
#endif
`:`
#ifdef HAS_UNIFORM_u_${fe}
${ee} ${ie} ${fe} = u_${fe};
#endif
`)),vertexSource:s=s.replace(f,(V,W,ee,ie,fe)=>{const Se=ie==="float"?"vec2":"vec4",_e=fe.match(/color/)?"color":Se;return $[fe]?W==="define"?`
#ifndef HAS_UNIFORM_u_${fe}
uniform lowp float u_${fe}_t;
attribute ${ee} ${Se} a_${fe};
varying ${ee} ${ie} ${fe};
#else
uniform ${ee} ${ie} u_${fe};
#endif
`:_e==="vec4"?`
#ifndef HAS_UNIFORM_u_${fe}
${fe} = a_${fe};
#else
${ee} ${ie} ${fe} = u_${fe};
#endif
`:`
#ifndef HAS_UNIFORM_u_${fe}
${fe} = unpack_mix_${_e}(a_${fe}, u_${fe}_t);
#else
${ee} ${ie} ${fe} = u_${fe};
#endif
`:W==="define"?`
#ifndef HAS_UNIFORM_u_${fe}
uniform lowp float u_${fe}_t;
attribute ${ee} ${Se} a_${fe};
#else
uniform ${ee} ${ie} u_${fe};
#endif
`:_e==="vec4"?`
#ifndef HAS_UNIFORM_u_${fe}
${ee} ${ie} ${fe} = a_${fe};
#else
${ee} ${ie} ${fe} = u_${fe};
#endif
`:`
#ifndef HAS_UNIFORM_u_${fe}
${ee} ${ie} ${fe} = unpack_mix_${_e}(a_${fe}, u_${fe}_t);
#else
${ee} ${ie} ${fe} = u_${fe};
#endif
`}),staticAttributes:v,staticUniforms:D}}class Wr{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(s,f,v,_,k,D,$,V,W){this.context=s;let ee=this.boundPaintVertexBuffers.length!==_.length;for(let ie=0;!ee&&ie<_.length;ie++)this.boundPaintVertexBuffers[ie]!==_[ie]&&(ee=!0);s.extVertexArrayObject&&this.vao&&this.boundProgram===f&&this.boundLayoutVertexBuffer===v&&!ee&&this.boundIndexBuffer===k&&this.boundVertexOffset===D&&this.boundDynamicVertexBuffer===$&&this.boundDynamicVertexBuffer2===V&&this.boundDynamicVertexBuffer3===W?(s.bindVertexArrayOES.set(this.vao),$&&$.bind(),k&&k.dynamicDraw&&k.bind(),V&&V.bind(),W&&W.bind()):this.freshBind(f,v,_,k,D,$,V,W)}freshBind(s,f,v,_,k,D,$,V){let W;const ee=s.numAttributes,ie=this.context,fe=ie.gl;if(ie.extVertexArrayObject)this.vao&&this.destroy(),this.vao=ie.extVertexArrayObject.createVertexArrayOES(),ie.bindVertexArrayOES.set(this.vao),W=0,this.boundProgram=s,this.boundLayoutVertexBuffer=f,this.boundPaintVertexBuffers=v,this.boundIndexBuffer=_,this.boundVertexOffset=k,this.boundDynamicVertexBuffer=D,this.boundDynamicVertexBuffer2=$,this.boundDynamicVertexBuffer3=V;else{W=ie.currentNumAttributes||0;for(let Se=ee;Se<W;Se++)fe.disableVertexAttribArray(Se)}f.enableAttributes(fe,s);for(const Se of v)Se.enableAttributes(fe,s);D&&D.enableAttributes(fe,s),$&&$.enableAttributes(fe,s),V&&V.enableAttributes(fe,s),f.bind(),f.setVertexAttribPointers(fe,s,k);for(const Se of v)Se.bind(),Se.setVertexAttribPointers(fe,s,k);D&&(D.bind(),D.setVertexAttribPointers(fe,s,k)),_&&_.bind(),$&&($.bind(),$.setVertexAttribPointers(fe,s,k)),V&&(V.bind(),V.setVertexAttribPointers(fe,s,k)),ie.currentNumAttributes=ee}destroy(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)}}function vr(y){const s=[];for(let f=0;f<y.length;f++){if(y[f]===null)continue;const v=y[f].split(" ");s.push(v.pop())}return s}class jn{constructor(s,f,v,_,k,D,$){const V=s.gl;this.program=V.createProgram();const W=vr(v.staticAttributes),ee=_?_.getBinderAttributes():[],ie=W.concat(ee),fe=Sn.prelude.staticUniforms?vr(Sn.prelude.staticUniforms):[],Se=v.staticUniforms?vr(v.staticUniforms):[],_e=_?_.getBinderUniforms():[],we=fe.concat(Se).concat(_e),$e=[];for(const yt of we)$e.indexOf(yt)<0&&$e.push(yt);const je=_?_.defines():[];D&&je.push("#define OVERDRAW_INSPECTOR;"),$&&je.push("#define TERRAIN3D;");const et=je.concat(Sn.prelude.fragmentSource,v.fragmentSource).join(`
`),Pe=je.concat(Sn.prelude.vertexSource,v.vertexSource).join(`
`),at=V.createShader(V.FRAGMENT_SHADER);if(V.isContextLost())return void(this.failedToCreate=!0);V.shaderSource(at,et),V.compileShader(at),V.attachShader(this.program,at);const nt=V.createShader(V.VERTEX_SHADER);if(V.isContextLost())return void(this.failedToCreate=!0);V.shaderSource(nt,Pe),V.compileShader(nt),V.attachShader(this.program,nt),this.attributes={};const gt={};this.numAttributes=ie.length;for(let yt=0;yt<this.numAttributes;yt++)ie[yt]&&(V.bindAttribLocation(this.program,yt,ie[yt]),this.attributes[ie[yt]]=yt);V.linkProgram(this.program),V.deleteShader(nt),V.deleteShader(at);for(let yt=0;yt<$e.length;yt++){const Dt=$e[yt];if(Dt&&!gt[Dt]){const vt=V.getUniformLocation(this.program,Dt);vt&&(gt[Dt]=vt)}}this.fixedUniforms=k(s,gt),this.terrainUniforms=((yt,Dt)=>({u_depth:new o.Uniform1i(yt,Dt.u_depth),u_terrain:new o.Uniform1i(yt,Dt.u_terrain),u_terrain_dim:new o.Uniform1f(yt,Dt.u_terrain_dim),u_terrain_matrix:new o.UniformMatrix4f(yt,Dt.u_terrain_matrix),u_terrain_unpack:new o.Uniform4f(yt,Dt.u_terrain_unpack),u_terrain_offset:new o.Uniform1f(yt,Dt.u_terrain_offset),u_terrain_exaggeration:new o.Uniform1f(yt,Dt.u_terrain_exaggeration)}))(s,gt),this.binderUniforms=_?_.getUniforms(s,gt):[]}draw(s,f,v,_,k,D,$,V,W,ee,ie,fe,Se,_e,we,$e,je,et){const Pe=s.gl;if(this.failedToCreate)return;if(s.program.set(this.program),s.setDepthMode(v),s.setStencilMode(_),s.setColorMode(k),s.setCullFace(D),V){s.activeTexture.set(Pe.TEXTURE2),Pe.bindTexture(Pe.TEXTURE_2D,V.depthTexture),s.activeTexture.set(Pe.TEXTURE3),Pe.bindTexture(Pe.TEXTURE_2D,V.texture);for(const nt in this.terrainUniforms)this.terrainUniforms[nt].set(V[nt])}for(const nt in this.fixedUniforms)this.fixedUniforms[nt].set($[nt]);we&&we.setUniforms(s,this.binderUniforms,Se,{zoom:_e});let at=0;switch(f){case Pe.LINES:at=2;break;case Pe.TRIANGLES:at=3;break;case Pe.LINE_STRIP:at=1}for(const nt of fe.get()){const gt=nt.vaos||(nt.vaos={});(gt[W]||(gt[W]=new Wr)).bind(s,this,ee,we?we.getPaintVertexBuffers():[],ie,nt.vertexOffset,$e,je,et),Pe.drawElements(f,nt.primitiveLength*at,Pe.UNSIGNED_SHORT,nt.primitiveOffset*at*2)}}}function Ln(y,s,f){const v=1/Nt(f,1,s.transform.tileZoom),_=Math.pow(2,f.tileID.overscaledZ),k=f.tileSize*Math.pow(2,s.transform.tileZoom)/_,D=k*(f.tileID.canonical.x+f.tileID.wrap*_),$=k*f.tileID.canonical.y;return{u_image:0,u_texsize:f.imageAtlasTexture.size,u_scale:[v,y.fromScale,y.toScale],u_fade:y.t,u_pixel_coord_upper:[D>>16,$>>16],u_pixel_coord_lower:[65535&D,65535&$]}}const Yn=(y,s,f,v)=>{const _=s.style.light,k=_.properties.get("position"),D=[k.x,k.y,k.z],$=o.create$1();_.properties.get("anchor")==="viewport"&&o.fromRotation($,-s.transform.angle),o.transformMat3(D,D,$);const V=_.properties.get("color");return{u_matrix:y,u_lightpos:D,u_lightintensity:_.properties.get("intensity"),u_lightcolor:[V.r,V.g,V.b],u_vertical_gradient:+f,u_opacity:v}},xr=(y,s,f,v,_,k,D)=>o.extend(Yn(y,s,f,v),Ln(k,s,D),{u_height_factor:-Math.pow(2,_.overscaledZ)/D.tileSize/8}),br=y=>({u_matrix:y}),Lr=(y,s,f,v)=>o.extend(br(y),Ln(f,s,v)),so=(y,s)=>({u_matrix:y,u_world:s}),cl=(y,s,f,v,_)=>o.extend(Lr(y,s,f,v),{u_world:_}),Ac=(y,s,f,v)=>{const _=y.transform;let k,D;if(v.paint.get("circle-pitch-alignment")==="map"){const $=Nt(f,1,_.zoom);k=!0,D=[$,$]}else k=!1,D=_.pixelsToGLUnits;return{u_camera_to_center_distance:_.cameraToCenterDistance,u_scale_with_map:+(v.paint.get("circle-pitch-scale")==="map"),u_matrix:y.translatePosMatrix(s.posMatrix,f,v.paint.get("circle-translate"),v.paint.get("circle-translate-anchor")),u_pitch_with_map:+k,u_device_pixel_ratio:y.pixelRatio,u_extrude_scale:D}},Ea=(y,s,f)=>{const v=Nt(f,1,s.zoom),_=Math.pow(2,s.zoom-f.tileID.overscaledZ),k=f.tileID.overscaleFactor();return{u_matrix:y,u_camera_to_center_distance:s.cameraToCenterDistance,u_pixels_to_tile_units:v,u_extrude_scale:[s.pixelsToGLUnits[0]/(v*_),s.pixelsToGLUnits[1]/(v*_)],u_overscale_factor:k}},zn=(y,s,f=1)=>({u_matrix:y,u_color:s,u_overlay:0,u_overlay_scale:f}),Zn=y=>({u_matrix:y}),Ir=(y,s,f,v)=>({u_matrix:y,u_extrude_scale:Nt(s,1,f),u_intensity:v});function ki(y,s){const f=Math.pow(2,s.canonical.z),v=s.canonical.y;return[new o.MercatorCoordinate(0,v/f).toLngLat().lat,new o.MercatorCoordinate(0,(v+1)/f).toLngLat().lat]}const Ga=(y,s,f,v)=>{const _=y.transform;return{u_matrix:Ta(y,s,f,v),u_ratio:1/Nt(s,1,_.zoom),u_device_pixel_ratio:y.pixelRatio,u_units_to_pixels:[1/_.pixelsToGLUnits[0],1/_.pixelsToGLUnits[1]]}},Eo=(y,s,f,v,_)=>o.extend(Ga(y,s,f,_),{u_image:0,u_image_height:v}),_s=(y,s,f,v,_)=>{const k=y.transform,D=gr(s,k);return{u_matrix:Ta(y,s,f,_),u_texsize:s.imageAtlasTexture.size,u_ratio:1/Nt(s,1,k.zoom),u_device_pixel_ratio:y.pixelRatio,u_image:0,u_scale:[D,v.fromScale,v.toScale],u_fade:v.t,u_units_to_pixels:[1/k.pixelsToGLUnits[0],1/k.pixelsToGLUnits[1]]}},ka=(y,s,f,v,_,k)=>{const D=y.lineAtlas,$=gr(s,y.transform),V=f.layout.get("line-cap")==="round",W=D.getDash(v.from,V),ee=D.getDash(v.to,V),ie=W.width*_.fromScale,fe=ee.width*_.toScale;return o.extend(Ga(y,s,f,k),{u_patternscale_a:[$/ie,-W.height/2],u_patternscale_b:[$/fe,-ee.height/2],u_sdfgamma:D.width/(256*Math.min(ie,fe)*y.pixelRatio)/2,u_image:0,u_tex_y_a:W.y,u_tex_y_b:ee.y,u_mix:_.t})};function gr(y,s){return 1/Nt(y,1,s.tileZoom)}function Ta(y,s,f,v){return y.translatePosMatrix(v?v.posMatrix:s.tileID.posMatrix,s,f.paint.get("line-translate"),f.paint.get("line-translate-anchor"))}const gm=(y,s,f,v,_)=>{return{u_matrix:y,u_tl_parent:s,u_scale_parent:f,u_buffer_scale:1,u_fade_t:v.mix,u_opacity:v.opacity*_.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:_.paint.get("raster-brightness-min"),u_brightness_high:_.paint.get("raster-brightness-max"),u_saturation_factor:(D=_.paint.get("raster-saturation"),D>0?1-1/(1.001-D):-D),u_contrast_factor:(k=_.paint.get("raster-contrast"),k>0?1/(1-k):1+k),u_spin_weights:ym(_.paint.get("raster-hue-rotate"))};var k,D};function ym(y){y*=Math.PI/180;const s=Math.sin(y),f=Math.cos(y);return[(2*f+1)/3,(-Math.sqrt(3)*s-f+1)/3,(Math.sqrt(3)*s-f+1)/3]}const Ef=(y,s,f,v,_,k,D,$,V,W)=>{const ee=_.transform;return{u_is_size_zoom_constant:+(y==="constant"||y==="source"),u_is_size_feature_constant:+(y==="constant"||y==="camera"),u_size_t:s?s.uSizeT:0,u_size:s?s.uSize:0,u_camera_to_center_distance:ee.cameraToCenterDistance,u_pitch:ee.pitch/360*2*Math.PI,u_rotate_symbol:+f,u_aspect_ratio:ee.width/ee.height,u_fade_change:_.options.fadeDuration?_.symbolFadeChange:1,u_matrix:k,u_label_plane_matrix:D,u_coord_matrix:$,u_is_text:+V,u_pitch_with_map:+v,u_texsize:W,u_texture:0}},Oc=(y,s,f,v,_,k,D,$,V,W,ee)=>{const ie=_.transform;return o.extend(Ef(y,s,f,v,_,k,D,$,V,W),{u_gamma_scale:v?Math.cos(ie._pitch)*ie.cameraToCenterDistance:1,u_device_pixel_ratio:_.pixelRatio,u_is_halo:+ee})},xm=(y,s,f,v,_,k,D,$,V,W)=>o.extend(Oc(y,s,f,v,_,k,D,$,!0,V,!0),{u_texsize_icon:W,u_texture_icon:1}),p1=(y,s,f)=>({u_matrix:y,u_opacity:s,u_color:f}),m1=(y,s,f,v,_,k)=>o.extend(function(D,$,V,W){const ee=V.imageManager.getPattern(D.from.toString()),ie=V.imageManager.getPattern(D.to.toString()),{width:fe,height:Se}=V.imageManager.getPixelSize(),_e=Math.pow(2,W.tileID.overscaledZ),we=W.tileSize*Math.pow(2,V.transform.tileZoom)/_e,$e=we*(W.tileID.canonical.x+W.tileID.wrap*_e),je=we*W.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:ee.tl,u_pattern_br_a:ee.br,u_pattern_tl_b:ie.tl,u_pattern_br_b:ie.br,u_texsize:[fe,Se],u_mix:$.t,u_pattern_size_a:ee.displaySize,u_pattern_size_b:ie.displaySize,u_scale_a:$.fromScale,u_scale_b:$.toScale,u_tile_units_to_pixels:1/Nt(W,1,V.transform.tileZoom),u_pixel_coord_upper:[$e>>16,je>>16],u_pixel_coord_lower:[65535&$e,65535&je]}}(v,k,f,_),{u_matrix:y,u_opacity:s}),kf={fillExtrusion:(y,s)=>({u_matrix:new o.UniformMatrix4f(y,s.u_matrix),u_lightpos:new o.Uniform3f(y,s.u_lightpos),u_lightintensity:new o.Uniform1f(y,s.u_lightintensity),u_lightcolor:new o.Uniform3f(y,s.u_lightcolor),u_vertical_gradient:new o.Uniform1f(y,s.u_vertical_gradient),u_opacity:new o.Uniform1f(y,s.u_opacity)}),fillExtrusionPattern:(y,s)=>({u_matrix:new o.UniformMatrix4f(y,s.u_matrix),u_lightpos:new o.Uniform3f(y,s.u_lightpos),u_lightintensity:new o.Uniform1f(y,s.u_lightintensity),u_lightcolor:new o.Uniform3f(y,s.u_lightcolor),u_vertical_gradient:new o.Uniform1f(y,s.u_vertical_gradient),u_height_factor:new o.Uniform1f(y,s.u_height_factor),u_image:new o.Uniform1i(y,s.u_image),u_texsize:new o.Uniform2f(y,s.u_texsize),u_pixel_coord_upper:new o.Uniform2f(y,s.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(y,s.u_pixel_coord_lower),u_scale:new o.Uniform3f(y,s.u_scale),u_fade:new o.Uniform1f(y,s.u_fade),u_opacity:new o.Uniform1f(y,s.u_opacity)}),fill:(y,s)=>({u_matrix:new o.UniformMatrix4f(y,s.u_matrix)}),fillPattern:(y,s)=>({u_matrix:new o.UniformMatrix4f(y,s.u_matrix),u_image:new o.Uniform1i(y,s.u_image),u_texsize:new o.Uniform2f(y,s.u_texsize),u_pixel_coord_upper:new o.Uniform2f(y,s.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(y,s.u_pixel_coord_lower),u_scale:new o.Uniform3f(y,s.u_scale),u_fade:new o.Uniform1f(y,s.u_fade)}),fillOutline:(y,s)=>({u_matrix:new o.UniformMatrix4f(y,s.u_matrix),u_world:new o.Uniform2f(y,s.u_world)}),fillOutlinePattern:(y,s)=>({u_matrix:new o.UniformMatrix4f(y,s.u_matrix),u_world:new o.Uniform2f(y,s.u_world),u_image:new o.Uniform1i(y,s.u_image),u_texsize:new o.Uniform2f(y,s.u_texsize),u_pixel_coord_upper:new o.Uniform2f(y,s.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(y,s.u_pixel_coord_lower),u_scale:new o.Uniform3f(y,s.u_scale),u_fade:new o.Uniform1f(y,s.u_fade)}),circle:(y,s)=>({u_camera_to_center_distance:new o.Uniform1f(y,s.u_camera_to_center_distance),u_scale_with_map:new o.Uniform1i(y,s.u_scale_with_map),u_pitch_with_map:new o.Uniform1i(y,s.u_pitch_with_map),u_extrude_scale:new o.Uniform2f(y,s.u_extrude_scale),u_device_pixel_ratio:new o.Uniform1f(y,s.u_device_pixel_ratio),u_matrix:new o.UniformMatrix4f(y,s.u_matrix)}),collisionBox:(y,s)=>({u_matrix:new o.UniformMatrix4f(y,s.u_matrix),u_camera_to_center_distance:new o.Uniform1f(y,s.u_camera_to_center_distance),u_pixels_to_tile_units:new o.Uniform1f(y,s.u_pixels_to_tile_units),u_extrude_scale:new o.Uniform2f(y,s.u_extrude_scale),u_overscale_factor:new o.Uniform1f(y,s.u_overscale_factor)}),collisionCircle:(y,s)=>({u_matrix:new o.UniformMatrix4f(y,s.u_matrix),u_inv_matrix:new o.UniformMatrix4f(y,s.u_inv_matrix),u_camera_to_center_distance:new o.Uniform1f(y,s.u_camera_to_center_distance),u_viewport_size:new o.Uniform2f(y,s.u_viewport_size)}),debug:(y,s)=>({u_color:new o.UniformColor(y,s.u_color),u_matrix:new o.UniformMatrix4f(y,s.u_matrix),u_overlay:new o.Uniform1i(y,s.u_overlay),u_overlay_scale:new o.Uniform1f(y,s.u_overlay_scale)}),clippingMask:(y,s)=>({u_matrix:new o.UniformMatrix4f(y,s.u_matrix)}),heatmap:(y,s)=>({u_extrude_scale:new o.Uniform1f(y,s.u_extrude_scale),u_intensity:new o.Uniform1f(y,s.u_intensity),u_matrix:new o.UniformMatrix4f(y,s.u_matrix)}),heatmapTexture:(y,s)=>({u_matrix:new o.UniformMatrix4f(y,s.u_matrix),u_world:new o.Uniform2f(y,s.u_world),u_image:new o.Uniform1i(y,s.u_image),u_color_ramp:new o.Uniform1i(y,s.u_color_ramp),u_opacity:new o.Uniform1f(y,s.u_opacity)}),hillshade:(y,s)=>({u_matrix:new o.UniformMatrix4f(y,s.u_matrix),u_image:new o.Uniform1i(y,s.u_image),u_latrange:new o.Uniform2f(y,s.u_latrange),u_light:new o.Uniform2f(y,s.u_light),u_shadow:new o.UniformColor(y,s.u_shadow),u_highlight:new o.UniformColor(y,s.u_highlight),u_accent:new o.UniformColor(y,s.u_accent)}),hillshadePrepare:(y,s)=>({u_matrix:new o.UniformMatrix4f(y,s.u_matrix),u_image:new o.Uniform1i(y,s.u_image),u_dimension:new o.Uniform2f(y,s.u_dimension),u_zoom:new o.Uniform1f(y,s.u_zoom),u_unpack:new o.Uniform4f(y,s.u_unpack)}),line:(y,s)=>({u_matrix:new o.UniformMatrix4f(y,s.u_matrix),u_ratio:new o.Uniform1f(y,s.u_ratio),u_device_pixel_ratio:new o.Uniform1f(y,s.u_device_pixel_ratio),u_units_to_pixels:new o.Uniform2f(y,s.u_units_to_pixels)}),lineGradient:(y,s)=>({u_matrix:new o.UniformMatrix4f(y,s.u_matrix),u_ratio:new o.Uniform1f(y,s.u_ratio),u_device_pixel_ratio:new o.Uniform1f(y,s.u_device_pixel_ratio),u_units_to_pixels:new o.Uniform2f(y,s.u_units_to_pixels),u_image:new o.Uniform1i(y,s.u_image),u_image_height:new o.Uniform1f(y,s.u_image_height)}),linePattern:(y,s)=>({u_matrix:new o.UniformMatrix4f(y,s.u_matrix),u_texsize:new o.Uniform2f(y,s.u_texsize),u_ratio:new o.Uniform1f(y,s.u_ratio),u_device_pixel_ratio:new o.Uniform1f(y,s.u_device_pixel_ratio),u_image:new o.Uniform1i(y,s.u_image),u_units_to_pixels:new o.Uniform2f(y,s.u_units_to_pixels),u_scale:new o.Uniform3f(y,s.u_scale),u_fade:new o.Uniform1f(y,s.u_fade)}),lineSDF:(y,s)=>({u_matrix:new o.UniformMatrix4f(y,s.u_matrix),u_ratio:new o.Uniform1f(y,s.u_ratio),u_device_pixel_ratio:new o.Uniform1f(y,s.u_device_pixel_ratio),u_units_to_pixels:new o.Uniform2f(y,s.u_units_to_pixels),u_patternscale_a:new o.Uniform2f(y,s.u_patternscale_a),u_patternscale_b:new o.Uniform2f(y,s.u_patternscale_b),u_sdfgamma:new o.Uniform1f(y,s.u_sdfgamma),u_image:new o.Uniform1i(y,s.u_image),u_tex_y_a:new o.Uniform1f(y,s.u_tex_y_a),u_tex_y_b:new o.Uniform1f(y,s.u_tex_y_b),u_mix:new o.Uniform1f(y,s.u_mix)}),raster:(y,s)=>({u_matrix:new o.UniformMatrix4f(y,s.u_matrix),u_tl_parent:new o.Uniform2f(y,s.u_tl_parent),u_scale_parent:new o.Uniform1f(y,s.u_scale_parent),u_buffer_scale:new o.Uniform1f(y,s.u_buffer_scale),u_fade_t:new o.Uniform1f(y,s.u_fade_t),u_opacity:new o.Uniform1f(y,s.u_opacity),u_image0:new o.Uniform1i(y,s.u_image0),u_image1:new o.Uniform1i(y,s.u_image1),u_brightness_low:new o.Uniform1f(y,s.u_brightness_low),u_brightness_high:new o.Uniform1f(y,s.u_brightness_high),u_saturation_factor:new o.Uniform1f(y,s.u_saturation_factor),u_contrast_factor:new o.Uniform1f(y,s.u_contrast_factor),u_spin_weights:new o.Uniform3f(y,s.u_spin_weights)}),symbolIcon:(y,s)=>({u_is_size_zoom_constant:new o.Uniform1i(y,s.u_is_size_zoom_constant),u_is_size_feature_constant:new o.Uniform1i(y,s.u_is_size_feature_constant),u_size_t:new o.Uniform1f(y,s.u_size_t),u_size:new o.Uniform1f(y,s.u_size),u_camera_to_center_distance:new o.Uniform1f(y,s.u_camera_to_center_distance),u_pitch:new o.Uniform1f(y,s.u_pitch),u_rotate_symbol:new o.Uniform1i(y,s.u_rotate_symbol),u_aspect_ratio:new o.Uniform1f(y,s.u_aspect_ratio),u_fade_change:new o.Uniform1f(y,s.u_fade_change),u_matrix:new o.UniformMatrix4f(y,s.u_matrix),u_label_plane_matrix:new o.UniformMatrix4f(y,s.u_label_plane_matrix),u_coord_matrix:new o.UniformMatrix4f(y,s.u_coord_matrix),u_is_text:new o.Uniform1i(y,s.u_is_text),u_pitch_with_map:new o.Uniform1i(y,s.u_pitch_with_map),u_texsize:new o.Uniform2f(y,s.u_texsize),u_texture:new o.Uniform1i(y,s.u_texture)}),symbolSDF:(y,s)=>({u_is_size_zoom_constant:new o.Uniform1i(y,s.u_is_size_zoom_constant),u_is_size_feature_constant:new o.Uniform1i(y,s.u_is_size_feature_constant),u_size_t:new o.Uniform1f(y,s.u_size_t),u_size:new o.Uniform1f(y,s.u_size),u_camera_to_center_distance:new o.Uniform1f(y,s.u_camera_to_center_distance),u_pitch:new o.Uniform1f(y,s.u_pitch),u_rotate_symbol:new o.Uniform1i(y,s.u_rotate_symbol),u_aspect_ratio:new o.Uniform1f(y,s.u_aspect_ratio),u_fade_change:new o.Uniform1f(y,s.u_fade_change),u_matrix:new o.UniformMatrix4f(y,s.u_matrix),u_label_plane_matrix:new o.UniformMatrix4f(y,s.u_label_plane_matrix),u_coord_matrix:new o.UniformMatrix4f(y,s.u_coord_matrix),u_is_text:new o.Uniform1i(y,s.u_is_text),u_pitch_with_map:new o.Uniform1i(y,s.u_pitch_with_map),u_texsize:new o.Uniform2f(y,s.u_texsize),u_texture:new o.Uniform1i(y,s.u_texture),u_gamma_scale:new o.Uniform1f(y,s.u_gamma_scale),u_device_pixel_ratio:new o.Uniform1f(y,s.u_device_pixel_ratio),u_is_halo:new o.Uniform1i(y,s.u_is_halo)}),symbolTextAndIcon:(y,s)=>({u_is_size_zoom_constant:new o.Uniform1i(y,s.u_is_size_zoom_constant),u_is_size_feature_constant:new o.Uniform1i(y,s.u_is_size_feature_constant),u_size_t:new o.Uniform1f(y,s.u_size_t),u_size:new o.Uniform1f(y,s.u_size),u_camera_to_center_distance:new o.Uniform1f(y,s.u_camera_to_center_distance),u_pitch:new o.Uniform1f(y,s.u_pitch),u_rotate_symbol:new o.Uniform1i(y,s.u_rotate_symbol),u_aspect_ratio:new o.Uniform1f(y,s.u_aspect_ratio),u_fade_change:new o.Uniform1f(y,s.u_fade_change),u_matrix:new o.UniformMatrix4f(y,s.u_matrix),u_label_plane_matrix:new o.UniformMatrix4f(y,s.u_label_plane_matrix),u_coord_matrix:new o.UniformMatrix4f(y,s.u_coord_matrix),u_is_text:new o.Uniform1i(y,s.u_is_text),u_pitch_with_map:new o.Uniform1i(y,s.u_pitch_with_map),u_texsize:new o.Uniform2f(y,s.u_texsize),u_texsize_icon:new o.Uniform2f(y,s.u_texsize_icon),u_texture:new o.Uniform1i(y,s.u_texture),u_texture_icon:new o.Uniform1i(y,s.u_texture_icon),u_gamma_scale:new o.Uniform1f(y,s.u_gamma_scale),u_device_pixel_ratio:new o.Uniform1f(y,s.u_device_pixel_ratio),u_is_halo:new o.Uniform1i(y,s.u_is_halo)}),background:(y,s)=>({u_matrix:new o.UniformMatrix4f(y,s.u_matrix),u_opacity:new o.Uniform1f(y,s.u_opacity),u_color:new o.UniformColor(y,s.u_color)}),backgroundPattern:(y,s)=>({u_matrix:new o.UniformMatrix4f(y,s.u_matrix),u_opacity:new o.Uniform1f(y,s.u_opacity),u_image:new o.Uniform1i(y,s.u_image),u_pattern_tl_a:new o.Uniform2f(y,s.u_pattern_tl_a),u_pattern_br_a:new o.Uniform2f(y,s.u_pattern_br_a),u_pattern_tl_b:new o.Uniform2f(y,s.u_pattern_tl_b),u_pattern_br_b:new o.Uniform2f(y,s.u_pattern_br_b),u_texsize:new o.Uniform2f(y,s.u_texsize),u_mix:new o.Uniform1f(y,s.u_mix),u_pattern_size_a:new o.Uniform2f(y,s.u_pattern_size_a),u_pattern_size_b:new o.Uniform2f(y,s.u_pattern_size_b),u_scale_a:new o.Uniform1f(y,s.u_scale_a),u_scale_b:new o.Uniform1f(y,s.u_scale_b),u_pixel_coord_upper:new o.Uniform2f(y,s.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(y,s.u_pixel_coord_lower),u_tile_units_to_pixels:new o.Uniform1f(y,s.u_tile_units_to_pixels)}),terrain:(y,s)=>({u_matrix:new o.UniformMatrix4f(y,s.u_matrix),u_texture:new o.Uniform1i(y,s.u_texture)}),terrainDepth:(y,s)=>({u_matrix:new o.UniformMatrix4f(y,s.u_matrix)}),terrainCoords:(y,s)=>({u_matrix:new o.UniformMatrix4f(y,s.u_matrix),u_texture:new o.Uniform1i(y,s.u_texture),u_terrain_coords_id:new o.Uniform1f(y,s.u_terrain_coords_id)})};class Tf{constructor(s,f,v){this.context=s;const _=s.gl;this.buffer=_.createBuffer(),this.dynamicDraw=Boolean(v),this.context.unbindVAO(),s.bindElementBuffer.set(this.buffer),_.bufferData(_.ELEMENT_ARRAY_BUFFER,f.arrayBuffer,this.dynamicDraw?_.DYNAMIC_DRAW:_.STATIC_DRAW),this.dynamicDraw||delete f.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(s){const f=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),f.bufferSubData(f.ELEMENT_ARRAY_BUFFER,0,s.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Pf={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class If{constructor(s,f,v,_){this.length=f.length,this.attributes=v,this.itemSize=f.bytesPerElement,this.dynamicDraw=_,this.context=s;const k=s.gl;this.buffer=k.createBuffer(),s.bindVertexBuffer.set(this.buffer),k.bufferData(k.ARRAY_BUFFER,f.arrayBuffer,this.dynamicDraw?k.DYNAMIC_DRAW:k.STATIC_DRAW),this.dynamicDraw||delete f.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(s){if(s.length!==this.length)throw new Error(`Length of new data is ${s.length}, which doesn't match current length of ${this.length}`);const f=this.context.gl;this.bind(),f.bufferSubData(f.ARRAY_BUFFER,0,s.arrayBuffer)}enableAttributes(s,f){for(let v=0;v<this.attributes.length;v++){const _=f.attributes[this.attributes[v].name];_!==void 0&&s.enableVertexAttribArray(_)}}setVertexAttribPointers(s,f,v){for(let _=0;_<this.attributes.length;_++){const k=this.attributes[_],D=f.attributes[k.name];D!==void 0&&s.vertexAttribPointer(D,k.components,s[Pf[k.type]],!1,this.itemSize,k.offset+this.itemSize*(v||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class ar{constructor(s){this.gl=s.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(s){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class _m extends ar{getDefault(){return o.Color.transparent}set(s){const f=this.current;(s.r!==f.r||s.g!==f.g||s.b!==f.b||s.a!==f.a||this.dirty)&&(this.gl.clearColor(s.r,s.g,s.b,s.a),this.current=s,this.dirty=!1)}}class v1 extends ar{getDefault(){return 1}set(s){(s!==this.current||this.dirty)&&(this.gl.clearDepth(s),this.current=s,this.dirty=!1)}}class _u extends ar{getDefault(){return 0}set(s){(s!==this.current||this.dirty)&&(this.gl.clearStencil(s),this.current=s,this.dirty=!1)}}class bu extends ar{getDefault(){return[!0,!0,!0,!0]}set(s){const f=this.current;(s[0]!==f[0]||s[1]!==f[1]||s[2]!==f[2]||s[3]!==f[3]||this.dirty)&&(this.gl.colorMask(s[0],s[1],s[2],s[3]),this.current=s,this.dirty=!1)}}class bm extends ar{getDefault(){return!0}set(s){(s!==this.current||this.dirty)&&(this.gl.depthMask(s),this.current=s,this.dirty=!1)}}class lo extends ar{getDefault(){return 255}set(s){(s!==this.current||this.dirty)&&(this.gl.stencilMask(s),this.current=s,this.dirty=!1)}}class Mf extends ar{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(s){const f=this.current;(s.func!==f.func||s.ref!==f.ref||s.mask!==f.mask||this.dirty)&&(this.gl.stencilFunc(s.func,s.ref,s.mask),this.current=s,this.dirty=!1)}}class Nc extends ar{getDefault(){const s=this.gl;return[s.KEEP,s.KEEP,s.KEEP]}set(s){const f=this.current;(s[0]!==f[0]||s[1]!==f[1]||s[2]!==f[2]||this.dirty)&&(this.gl.stencilOp(s[0],s[1],s[2]),this.current=s,this.dirty=!1)}}class Dc extends ar{getDefault(){return!1}set(s){if(s===this.current&&!this.dirty)return;const f=this.gl;s?f.enable(f.STENCIL_TEST):f.disable(f.STENCIL_TEST),this.current=s,this.dirty=!1}}class Rf extends ar{getDefault(){return[0,1]}set(s){const f=this.current;(s[0]!==f[0]||s[1]!==f[1]||this.dirty)&&(this.gl.depthRange(s[0],s[1]),this.current=s,this.dirty=!1)}}class Af extends ar{getDefault(){return!1}set(s){if(s===this.current&&!this.dirty)return;const f=this.gl;s?f.enable(f.DEPTH_TEST):f.disable(f.DEPTH_TEST),this.current=s,this.dirty=!1}}class Lc extends ar{getDefault(){return this.gl.LESS}set(s){(s!==this.current||this.dirty)&&(this.gl.depthFunc(s),this.current=s,this.dirty=!1)}}class Of extends ar{getDefault(){return!1}set(s){if(s===this.current&&!this.dirty)return;const f=this.gl;s?f.enable(f.BLEND):f.disable(f.BLEND),this.current=s,this.dirty=!1}}class Nf extends ar{getDefault(){const s=this.gl;return[s.ONE,s.ZERO]}set(s){const f=this.current;(s[0]!==f[0]||s[1]!==f[1]||this.dirty)&&(this.gl.blendFunc(s[0],s[1]),this.current=s,this.dirty=!1)}}class zc extends ar{getDefault(){return o.Color.transparent}set(s){const f=this.current;(s.r!==f.r||s.g!==f.g||s.b!==f.b||s.a!==f.a||this.dirty)&&(this.gl.blendColor(s.r,s.g,s.b,s.a),this.current=s,this.dirty=!1)}}class wm extends ar{getDefault(){return this.gl.FUNC_ADD}set(s){(s!==this.current||this.dirty)&&(this.gl.blendEquation(s),this.current=s,this.dirty=!1)}}class Cm extends ar{getDefault(){return!1}set(s){if(s===this.current&&!this.dirty)return;const f=this.gl;s?f.enable(f.CULL_FACE):f.disable(f.CULL_FACE),this.current=s,this.dirty=!1}}class dl extends ar{getDefault(){return this.gl.BACK}set(s){(s!==this.current||this.dirty)&&(this.gl.cullFace(s),this.current=s,this.dirty=!1)}}class g1 extends ar{getDefault(){return this.gl.CCW}set(s){(s!==this.current||this.dirty)&&(this.gl.frontFace(s),this.current=s,this.dirty=!1)}}class y1 extends ar{getDefault(){return null}set(s){(s!==this.current||this.dirty)&&(this.gl.useProgram(s),this.current=s,this.dirty=!1)}}class x1 extends ar{getDefault(){return this.gl.TEXTURE0}set(s){(s!==this.current||this.dirty)&&(this.gl.activeTexture(s),this.current=s,this.dirty=!1)}}class _1 extends ar{getDefault(){const s=this.gl;return[0,0,s.drawingBufferWidth,s.drawingBufferHeight]}set(s){const f=this.current;(s[0]!==f[0]||s[1]!==f[1]||s[2]!==f[2]||s[3]!==f[3]||this.dirty)&&(this.gl.viewport(s[0],s[1],s[2],s[3]),this.current=s,this.dirty=!1)}}class b1 extends ar{getDefault(){return null}set(s){if(s===this.current&&!this.dirty)return;const f=this.gl;f.bindFramebuffer(f.FRAMEBUFFER,s),this.current=s,this.dirty=!1}}class w1 extends ar{getDefault(){return null}set(s){if(s===this.current&&!this.dirty)return;const f=this.gl;f.bindRenderbuffer(f.RENDERBUFFER,s),this.current=s,this.dirty=!1}}class Df extends ar{getDefault(){return null}set(s){if(s===this.current&&!this.dirty)return;const f=this.gl;f.bindTexture(f.TEXTURE_2D,s),this.current=s,this.dirty=!1}}class Fc extends ar{getDefault(){return null}set(s){if(s===this.current&&!this.dirty)return;const f=this.gl;f.bindBuffer(f.ARRAY_BUFFER,s),this.current=s,this.dirty=!1}}class Lf extends ar{getDefault(){return null}set(s){const f=this.gl;f.bindBuffer(f.ELEMENT_ARRAY_BUFFER,s),this.current=s,this.dirty=!1}}class zf extends ar{constructor(s){super(s),this.vao=s.extVertexArrayObject}getDefault(){return null}set(s){this.vao&&(s!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(s),this.current=s,this.dirty=!1)}}class fl extends ar{getDefault(){return 4}set(s){if(s===this.current&&!this.dirty)return;const f=this.gl;f.pixelStorei(f.UNPACK_ALIGNMENT,s),this.current=s,this.dirty=!1}}class Sm extends ar{getDefault(){return!1}set(s){if(s===this.current&&!this.dirty)return;const f=this.gl;f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,s),this.current=s,this.dirty=!1}}class Em extends ar{getDefault(){return!1}set(s){if(s===this.current&&!this.dirty)return;const f=this.gl;f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,s),this.current=s,this.dirty=!1}}class $c extends ar{constructor(s,f){super(s),this.context=s,this.parent=f}getDefault(){return null}}class bs extends $c{setDirty(){this.dirty=!0}set(s){if(s===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const f=this.gl;f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_2D,s,0),this.current=s,this.dirty=!1}}class km extends $c{set(s){if(s===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const f=this.gl;f.framebufferRenderbuffer(f.FRAMEBUFFER,f.DEPTH_ATTACHMENT,f.RENDERBUFFER,s),this.current=s,this.dirty=!1}}class hl{constructor(s,f,v,_){this.context=s,this.width=f,this.height=v;const k=s.gl,D=this.framebuffer=k.createFramebuffer();if(this.colorAttachment=new bs(s,D),_&&(this.depthAttachment=new km(s,D)),k.checkFramebufferStatus(k.FRAMEBUFFER)!==k.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const s=this.context.gl,f=this.colorAttachment.get();if(f&&s.deleteTexture(f),this.depthAttachment){const v=this.depthAttachment.get();v&&s.deleteRenderbuffer(v)}s.deleteFramebuffer(this.framebuffer)}}class Er{constructor(s,f,v){this.blendFunction=s,this.blendColor=f,this.mask=v}}Er.Replace=[1,0],Er.disabled=new Er(Er.Replace,o.Color.transparent,[!1,!1,!1,!1]),Er.unblended=new Er(Er.Replace,o.Color.transparent,[!0,!0,!0,!0]),Er.alphaBlended=new Er([1,771],o.Color.transparent,[!0,!0,!0,!0]);class Tm{constructor(s){this.gl=s,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new _m(this),this.clearDepth=new v1(this),this.clearStencil=new _u(this),this.colorMask=new bu(this),this.depthMask=new bm(this),this.stencilMask=new lo(this),this.stencilFunc=new Mf(this),this.stencilOp=new Nc(this),this.stencilTest=new Dc(this),this.depthRange=new Rf(this),this.depthTest=new Af(this),this.depthFunc=new Lc(this),this.blend=new Of(this),this.blendFunc=new Nf(this),this.blendColor=new zc(this),this.blendEquation=new wm(this),this.cullFace=new Cm(this),this.cullFaceSide=new dl(this),this.frontFace=new g1(this),this.program=new y1(this),this.activeTexture=new x1(this),this.viewport=new _1(this),this.bindFramebuffer=new b1(this),this.bindRenderbuffer=new w1(this),this.bindTexture=new Df(this),this.bindVertexBuffer=new Fc(this),this.bindElementBuffer=new Lf(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new zf(this),this.pixelStoreUnpack=new fl(this),this.pixelStoreUnpackPremultiplyAlpha=new Sm(this),this.pixelStoreUnpackFlipY=new Em(this),this.extTextureFilterAnisotropic=s.getExtension("EXT_texture_filter_anisotropic")||s.getExtension("MOZ_EXT_texture_filter_anisotropic")||s.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=s.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=s.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(s.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=s.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=s.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=s.getParameter(s.MAX_TEXTURE_SIZE)}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(s,f){return new Tf(this,s,f)}createVertexBuffer(s,f,v){return new If(this,s,f,v)}createRenderbuffer(s,f,v){const _=this.gl,k=_.createRenderbuffer();return this.bindRenderbuffer.set(k),_.renderbufferStorage(_.RENDERBUFFER,s,f,v),this.bindRenderbuffer.set(null),k}createFramebuffer(s,f,v){return new hl(this,s,f,v)}clear({color:s,depth:f}){const v=this.gl;let _=0;s&&(_|=v.COLOR_BUFFER_BIT,this.clearColor.set(s),this.colorMask.set([!0,!0,!0,!0])),f!==void 0&&(_|=v.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(f),this.depthMask.set(!0)),v.clear(_)}setCullFace(s){s.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(s.mode),this.frontFace.set(s.frontFace))}setDepthMode(s){s.func!==this.gl.ALWAYS||s.mask?(this.depthTest.set(!0),this.depthFunc.set(s.func),this.depthMask.set(s.mask),this.depthRange.set(s.range)):this.depthTest.set(!1)}setStencilMode(s){s.test.func!==this.gl.ALWAYS||s.mask?(this.stencilTest.set(!0),this.stencilMask.set(s.mask),this.stencilOp.set([s.fail,s.depthFail,s.pass]),this.stencilFunc.set({func:s.test.func,ref:s.ref,mask:s.test.mask})):this.stencilTest.set(!1)}setColorMode(s){b(s.blendFunction,Er.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(s.blendFunction),this.blendColor.set(s.blendColor)),this.colorMask.set(s.mask)}unbindVAO(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)}}class Xn{constructor(s,f,v){this.func=s,this.mask=f,this.range=v}}Xn.ReadOnly=!1,Xn.ReadWrite=!0,Xn.disabled=new Xn(519,Xn.ReadOnly,[0,1]);const sr=7680;class wr{constructor(s,f,v,_,k,D){this.test=s,this.ref=f,this.mask=v,this.fail=_,this.depthFail=k,this.pass=D}}wr.disabled=new wr({func:519,mask:0},0,0,sr,sr,sr);class Mr{constructor(s,f,v){this.enable=s,this.mode=f,this.frontFace=v}}let wu;function pl(y,s,f,v,_,k,D){const $=y.context,V=$.gl,W=y.useProgram("collisionBox"),ee=[];let ie=0,fe=0;for(let Pe=0;Pe<v.length;Pe++){const at=v[Pe],nt=s.getTile(at),gt=nt.getBucket(f);if(!gt)continue;let yt=at.posMatrix;_[0]===0&&_[1]===0||(yt=y.translatePosMatrix(at.posMatrix,nt,_,k));const Dt=D?gt.textCollisionBox:gt.iconCollisionBox,vt=gt.collisionCircleArray;if(vt.length>0){const rn=o.create(),qt=yt;o.mul(rn,gt.placementInvProjMatrix,y.transform.glCoordMatrix),o.mul(rn,rn,gt.placementViewportMatrix),ee.push({circleArray:vt,circleOffset:fe,transform:qt,invTransform:rn,coord:at}),ie+=vt.length/4,fe=ie}Dt&&W.draw($,V.LINES,Xn.disabled,wr.disabled,y.colorModeForRenderPass(),Mr.disabled,Ea(yt,y.transform,nt),y.style.terrain&&y.style.terrain.getTerrainData(at),f.id,Dt.layoutVertexBuffer,Dt.indexBuffer,Dt.segments,null,y.transform.zoom,null,null,Dt.collisionVertexBuffer)}if(!D||!ee.length)return;const Se=y.useProgram("collisionCircle"),_e=new o.CollisionCircleLayoutArray;_e.resize(4*ie),_e._trim();let we=0;for(const Pe of ee)for(let at=0;at<Pe.circleArray.length/4;at++){const nt=4*at,gt=Pe.circleArray[nt+0],yt=Pe.circleArray[nt+1],Dt=Pe.circleArray[nt+2],vt=Pe.circleArray[nt+3];_e.emplace(we++,gt,yt,Dt,vt,0),_e.emplace(we++,gt,yt,Dt,vt,1),_e.emplace(we++,gt,yt,Dt,vt,2),_e.emplace(we++,gt,yt,Dt,vt,3)}(!wu||wu.length<2*ie)&&(wu=function(Pe){const at=2*Pe,nt=new o.QuadTriangleArray;nt.resize(at),nt._trim();for(let gt=0;gt<at;gt++){const yt=6*gt;nt.uint16[yt+0]=4*gt+0,nt.uint16[yt+1]=4*gt+1,nt.uint16[yt+2]=4*gt+2,nt.uint16[yt+3]=4*gt+2,nt.uint16[yt+4]=4*gt+3,nt.uint16[yt+5]=4*gt+0}return nt}(ie));const $e=$.createIndexBuffer(wu,!0),je=$.createVertexBuffer(_e,o.collisionCircleLayout.members,!0);for(const Pe of ee){const at={u_matrix:Pe.transform,u_inv_matrix:Pe.invTransform,u_camera_to_center_distance:(et=y.transform).cameraToCenterDistance,u_viewport_size:[et.width,et.height]};Se.draw($,V.TRIANGLES,Xn.disabled,wr.disabled,y.colorModeForRenderPass(),Mr.disabled,at,y.style.terrain&&y.style.terrain.getTerrainData(Pe.coord),f.id,je,$e,o.SegmentVector.simpleSegment(0,2*Pe.circleOffset,Pe.circleArray.length,Pe.circleArray.length/2),null,y.transform.zoom,null,null,null)}var et;je.destroy(),$e.destroy()}Mr.disabled=new Mr(!1,1029,2305),Mr.backCCW=new Mr(!0,1029,2305);const C1=o.identity(new Float32Array(16));function S1(y,s,f,v,_,k){const{horizontalAlign:D,verticalAlign:$}=o.getAnchorAlignment(y),V=-(D-.5)*s,W=-($-.5)*f,ee=o.evaluateVariableOffset(y,v);return new o.pointGeometry((V/_+ee[0])*k,(W/_+ee[1])*k)}function Pm(y,s,f,v,_,k,D,$,V,W,ee){const ie=y.text.placedSymbolArray,fe=y.text.dynamicLayoutVertexArray,Se=y.icon.dynamicLayoutVertexArray,_e={};fe.clear();for(let we=0;we<ie.length;we++){const $e=ie.get(we),je=y.allowVerticalPlacement&&!$e.placedOrientation,et=$e.hidden||!$e.crossTileID||je?null:v[$e.crossTileID];if(et){const Pe=new o.pointGeometry($e.anchorX,$e.anchorY),at=Vt(Pe,f?D:k,ee),nt=jt(_.cameraToCenterDistance,at.signedDistanceFromCamera);let gt=o.evaluateSizeForFeature(y.textSizeData,V,$e)*nt/o.ONE_EM;f&&(gt*=y.tilePixelRatio/$);const{width:yt,height:Dt,anchor:vt,textOffset:rn,textBoxScale:qt}=et,ln=S1(vt,yt,Dt,rn,qt,gt),Dn=f?Vt(Pe.add(ln),k,ee).point:at.point.add(s?ln.rotate(-_.angle):ln),Vn=y.allowVerticalPlacement&&$e.placedOrientation===o.WritingMode.vertical?Math.PI/2:0;for(let bn=0;bn<$e.numGlyphs;bn++)o.addDynamicAttributes(fe,Dn,Vn);W&&$e.associatedIconIndex>=0&&(_e[$e.associatedIconIndex]={shiftedAnchor:Dn,angle:Vn})}else zt($e.numGlyphs,fe)}if(W){Se.clear();const we=y.icon.placedSymbolArray;for(let $e=0;$e<we.length;$e++){const je=we.get($e);if(je.hidden)zt(je.numGlyphs,Se);else{const et=_e[$e];if(et)for(let Pe=0;Pe<je.numGlyphs;Pe++)o.addDynamicAttributes(Se,et.shiftedAnchor,et.angle);else zt(je.numGlyphs,Se)}}y.icon.dynamicLayoutVertexBuffer.updateData(Se)}y.text.dynamicLayoutVertexBuffer.updateData(fe)}function E1(y,s,f){return f.iconsInText&&s?"symbolTextAndIcon":y?"symbolSDF":"symbolIcon"}function Bc(y,s,f,v,_,k,D,$,V,W,ee,ie){const fe=y.context,Se=fe.gl,_e=y.transform,we=$==="map",$e=V==="map",je=$!=="viewport"&&f.layout.get("symbol-placement")!=="point",et=we&&!$e&&!je,Pe=!f.layout.get("symbol-sort-key").isConstant();let at=!1;const nt=y.depthModeForSublayer(0,Xn.ReadOnly),gt=f.layout.get("text-variable-anchor"),yt=[];for(const Dt of v){const vt=s.getTile(Dt),rn=vt.getBucket(f);if(!rn)continue;const qt=_?rn.text:rn.icon;if(!qt||!qt.segments.get().length)continue;const ln=qt.programConfigurations.get(f.id),Dn=_||rn.sdfIcons,Vn=_?rn.textSizeData:rn.iconSizeData,bn=$e||_e.pitch!==0,cr=y.useProgram(E1(Dn,_,rn),ln),dr=o.evaluateSizeForZoom(Vn,_e.zoom),Qn=y.style.terrain&&y.style.terrain.getTerrainData(Dt);let er,pr,vi,aa,Fo=[0,0],sa=null;if(_){if(pr=vt.glyphAtlasTexture,vi=Se.LINEAR,er=vt.glyphAtlasTexture.size,rn.iconsInText){Fo=vt.imageAtlasTexture.size,sa=vt.imageAtlasTexture;const Po=Vn.kind==="composite"||Vn.kind==="camera";aa=bn||y.options.rotating||y.options.zooming||Po?Se.LINEAR:Se.NEAREST}}else{const Po=f.layout.get("icon-size").constantOr(0)!==1||rn.iconsNeedLinear;pr=vt.imageAtlasTexture,vi=Dn||y.options.rotating||y.options.zooming||Po||bn?Se.LINEAR:Se.NEAREST,er=vt.imageAtlasTexture.size}const es=Nt(vt,1,y.transform.zoom),To=Xt(Dt.posMatrix,$e,we,y.transform,es),Qi=dn(Dt.posMatrix,$e,we,y.transform,es),Ma=gt&&rn.hasTextData(),qc=f.layout.get("icon-text-fit")!=="none"&&Ma&&rn.hasIconData();if(je){const Po=y.style.terrain?(Qf,_l)=>y.style.terrain.getElevation(Dt,Qf,_l):null,Es=f.layout.get("text-rotation-alignment")==="map";_n(rn,Dt.posMatrix,y,_,To,Qi,$e,W,Es,Po)}const ci=y.translatePosMatrix(Dt.posMatrix,vt,k,D),Hn=je||_&&gt||qc?C1:To,ur=y.translatePosMatrix(Qi,vt,k,D,!0),gi=Dn&&f.paint.get(_?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let yi;yi=Dn?rn.iconsInText?xm(Vn.kind,dr,et,$e,y,ci,Hn,ur,er,Fo):Oc(Vn.kind,dr,et,$e,y,ci,Hn,ur,_,er,!0):Ef(Vn.kind,dr,et,$e,y,ci,Hn,ur,_,er);const Ar={program:cr,buffers:qt,uniformValues:yi,atlasTexture:pr,atlasTextureIcon:sa,atlasInterpolation:vi,atlasInterpolationIcon:aa,isSDF:Dn,hasHalo:gi};if(Pe&&rn.canOverlap){at=!0;const Po=qt.segments.get();for(const Es of Po)yt.push({segments:new o.SegmentVector([Es]),sortKey:Es.sortKey,state:Ar,terrainData:Qn})}else yt.push({segments:qt.segments,sortKey:0,state:Ar,terrainData:Qn})}at&&yt.sort((Dt,vt)=>Dt.sortKey-vt.sortKey);for(const Dt of yt){const vt=Dt.state;if(fe.activeTexture.set(Se.TEXTURE0),vt.atlasTexture.bind(vt.atlasInterpolation,Se.CLAMP_TO_EDGE),vt.atlasTextureIcon&&(fe.activeTexture.set(Se.TEXTURE1),vt.atlasTextureIcon&&vt.atlasTextureIcon.bind(vt.atlasInterpolationIcon,Se.CLAMP_TO_EDGE)),vt.isSDF){const rn=vt.uniformValues;vt.hasHalo&&(rn.u_is_halo=1,Cu(vt.buffers,Dt.segments,f,y,vt.program,nt,ee,ie,rn,Dt.terrainData)),rn.u_is_halo=0}Cu(vt.buffers,Dt.segments,f,y,vt.program,nt,ee,ie,vt.uniformValues,Dt.terrainData)}}function Cu(y,s,f,v,_,k,D,$,V,W){const ee=v.context;_.draw(ee,ee.gl.TRIANGLES,k,D,$,Mr.disabled,V,W,f.id,y.layoutVertexBuffer,y.indexBuffer,s,f.paint,v.transform.zoom,y.programConfigurations.get(f.id),y.dynamicLayoutVertexBuffer,y.opacityVertexBuffer)}function Su(y,s,f,v,_,k,D){const $=y.context.gl,V=f.paint.get("fill-pattern"),W=V&&V.constantOr(1),ee=f.getCrossfadeParameters();let ie,fe,Se,_e,we;D?(fe=W&&!f.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",ie=$.LINES):(fe=W?"fillPattern":"fill",ie=$.TRIANGLES);for(const $e of v){const je=s.getTile($e);if(W&&!je.patternsLoaded())continue;const et=je.getBucket(f);if(!et)continue;const Pe=et.programConfigurations.get(f.id),at=y.useProgram(fe,Pe),nt=y.style.terrain&&y.style.terrain.getTerrainData($e);W&&(y.context.activeTexture.set($.TEXTURE0),je.imageAtlasTexture.bind($.LINEAR,$.CLAMP_TO_EDGE),Pe.updatePaintBuffers(ee));const gt=V.constantOr(null);if(gt&&je.imageAtlas){const vt=je.imageAtlas,rn=vt.patternPositions[gt.to.toString()],qt=vt.patternPositions[gt.from.toString()];rn&&qt&&Pe.setConstantPatternPositions(rn,qt)}const yt=nt?$e:null,Dt=y.translatePosMatrix(yt?yt.posMatrix:$e.posMatrix,je,f.paint.get("fill-translate"),f.paint.get("fill-translate-anchor"));if(D){_e=et.indexBuffer2,we=et.segments2;const vt=[$.drawingBufferWidth,$.drawingBufferHeight];Se=fe==="fillOutlinePattern"&&W?cl(Dt,y,ee,je,vt):so(Dt,vt)}else _e=et.indexBuffer,we=et.segments,Se=W?Lr(Dt,y,ee,je):br(Dt);at.draw(y.context,ie,_,y.stencilModeForClipping($e),k,Mr.disabled,Se,nt,f.id,et.layoutVertexBuffer,_e,we,f.paint,y.transform.zoom,Pe)}}function Eu(y,s,f,v,_,k,D){const $=y.context,V=$.gl,W=f.paint.get("fill-extrusion-pattern"),ee=W.constantOr(1),ie=f.getCrossfadeParameters(),fe=f.paint.get("fill-extrusion-opacity");for(const Se of v){const _e=s.getTile(Se),we=_e.getBucket(f);if(!we)continue;const $e=y.style.terrain&&y.style.terrain.getTerrainData(Se),je=we.programConfigurations.get(f.id),et=y.useProgram(ee?"fillExtrusionPattern":"fillExtrusion",je);ee&&(y.context.activeTexture.set(V.TEXTURE0),_e.imageAtlasTexture.bind(V.LINEAR,V.CLAMP_TO_EDGE),je.updatePaintBuffers(ie));const Pe=W.constantOr(null);if(Pe&&_e.imageAtlas){const yt=_e.imageAtlas,Dt=yt.patternPositions[Pe.to.toString()],vt=yt.patternPositions[Pe.from.toString()];Dt&&vt&&je.setConstantPatternPositions(Dt,vt)}const at=y.translatePosMatrix(Se.posMatrix,_e,f.paint.get("fill-extrusion-translate"),f.paint.get("fill-extrusion-translate-anchor")),nt=f.paint.get("fill-extrusion-vertical-gradient"),gt=ee?xr(at,y,nt,fe,Se,ie,_e):Yn(at,y,nt,fe);et.draw($,$.gl.TRIANGLES,_,k,D,Mr.backCCW,gt,$e,f.id,we.layoutVertexBuffer,we.indexBuffer,we.segments,f.paint,y.transform.zoom,je,y.style.terrain&&we.centroidVertexBuffer)}}function Ff(y,s,f,v,_,k,D){const $=y.context,V=$.gl,W=f.fbo;if(!W)return;const ee=y.useProgram("hillshade"),ie=y.style.terrain&&y.style.terrain.getTerrainData(s);$.activeTexture.set(V.TEXTURE0),V.bindTexture(V.TEXTURE_2D,W.colorAttachment.get()),ee.draw($,V.TRIANGLES,_,k,D,Mr.disabled,((fe,Se,_e,we)=>{const $e=_e.paint.get("hillshade-shadow-color"),je=_e.paint.get("hillshade-highlight-color"),et=_e.paint.get("hillshade-accent-color");let Pe=_e.paint.get("hillshade-illumination-direction")*(Math.PI/180);_e.paint.get("hillshade-illumination-anchor")==="viewport"&&(Pe-=fe.transform.angle);const at=!fe.options.moving;return{u_matrix:we?we.posMatrix:fe.transform.calculatePosMatrix(Se.tileID.toUnwrapped(),at),u_image:0,u_latrange:ki(0,Se.tileID),u_light:[_e.paint.get("hillshade-exaggeration"),Pe],u_shadow:$e,u_highlight:je,u_accent:et}})(y,f,v,ie?s:null),ie,v.id,y.rasterBoundsBuffer,y.quadTriangleIndexBuffer,y.rasterBoundsSegments)}function Im(y,s,f,v,_,k){const D=y.context,$=D.gl,V=s.dem;if(V&&V.data){const W=V.dim,ee=V.stride,ie=V.getPixels();if(D.activeTexture.set($.TEXTURE1),D.pixelStoreUnpackPremultiplyAlpha.set(!1),s.demTexture=s.demTexture||y.getTileTexture(ee),s.demTexture){const Se=s.demTexture;Se.update(ie,{premultiply:!1}),Se.bind($.NEAREST,$.CLAMP_TO_EDGE)}else s.demTexture=new A(D,ie,$.RGBA,{premultiply:!1}),s.demTexture.bind($.NEAREST,$.CLAMP_TO_EDGE);D.activeTexture.set($.TEXTURE0);let fe=s.fbo;if(!fe){const Se=new A(D,{width:W,height:W,data:null},$.RGBA);Se.bind($.LINEAR,$.CLAMP_TO_EDGE),fe=s.fbo=D.createFramebuffer(W,W,!0),fe.colorAttachment.set(Se.texture)}D.bindFramebuffer.set(fe.framebuffer),D.viewport.set([0,0,W,W]),y.useProgram("hillshadePrepare").draw(D,$.TRIANGLES,v,_,k,Mr.disabled,((Se,_e)=>{const we=_e.stride,$e=o.create();return o.ortho($e,0,o.EXTENT,-o.EXTENT,0,0,1),o.translate($e,$e,[0,-o.EXTENT,0]),{u_matrix:$e,u_image:1,u_dimension:[we,we],u_zoom:Se.overscaledZ,u_unpack:_e.getUnpackVector()}})(s.tileID,V),null,f.id,y.rasterBoundsBuffer,y.quadTriangleIndexBuffer,y.rasterBoundsSegments),s.needsHillshadePrepare=!1}}function Vc(y,s,f,v,_,k){const D=v.paint.get("raster-fade-duration");if(!k&&D>0){const $=o.exported.now(),V=($-y.timeAdded)/D,W=s?($-s.timeAdded)/D:-1,ee=f.getSource(),ie=_.coveringZoomLevel({tileSize:ee.tileSize,roundZoom:ee.roundZoom}),fe=!s||Math.abs(s.tileID.overscaledZ-ie)>Math.abs(y.tileID.overscaledZ-ie),Se=fe&&y.refreshedUponExpiration?1:o.clamp(fe?V:1-W,0,1);return y.refreshedUponExpiration&&V>=1&&(y.refreshedUponExpiration=!1),s?{opacity:1,mix:1-Se}:{opacity:Se,mix:0}}return{opacity:1,mix:0}}const Uc=new o.Color(1,0,0,1),zo=new o.Color(0,1,0,1),Mm=new o.Color(0,0,1,1),$f=new o.Color(1,0,1,1),Rm=new o.Color(0,1,1,1);function ws(y,s,f,v){ml(y,0,s+f/2,y.transform.width,f,v)}function ku(y,s,f,v){ml(y,s-f/2,0,f,y.transform.height,v)}function ml(y,s,f,v,_,k){const D=y.context,$=D.gl;$.enable($.SCISSOR_TEST),$.scissor(s*y.pixelRatio,f*y.pixelRatio,v*y.pixelRatio,_*y.pixelRatio),D.clear({color:k}),$.disable($.SCISSOR_TEST)}function k1(y,s,f){const v=y.context,_=v.gl,k=f.posMatrix,D=y.useProgram("debug"),$=Xn.disabled,V=wr.disabled,W=y.colorModeForRenderPass(),ee="$debug",ie=y.style.terrain&&y.style.terrain.getTerrainData(f);v.activeTexture.set(_.TEXTURE0),y.emptyTexture.bind(_.LINEAR,_.CLAMP_TO_EDGE);const fe=s.getTileByID(f.key).latestRawTileData,Se=Math.floor((fe&&fe.byteLength||0)/1024),_e=s.getTile(f).tileSize,we=512/Math.min(_e,512)*(f.overscaledZ/y.transform.zoom)*.5;let $e=f.canonical.toString();f.overscaledZ!==f.canonical.z&&($e+=` => ${f.overscaledZ}`),function(je,et){je.initDebugOverlayCanvas();const Pe=je.debugOverlayCanvas,at=je.context.gl,nt=je.debugOverlayCanvas.getContext("2d");nt.clearRect(0,0,Pe.width,Pe.height),nt.shadowColor="white",nt.shadowBlur=2,nt.lineWidth=1.5,nt.strokeStyle="white",nt.textBaseline="top",nt.font="bold 36px Open Sans, sans-serif",nt.fillText(et,5,5),nt.strokeText(et,5,5),je.debugOverlayTexture.update(Pe),je.debugOverlayTexture.bind(at.LINEAR,at.CLAMP_TO_EDGE)}(y,`${$e} ${Se}kB`),D.draw(v,_.TRIANGLES,$,V,Er.alphaBlended,Mr.disabled,zn(k,o.Color.transparent,we),null,ee,y.debugBuffer,y.quadTriangleIndexBuffer,y.debugSegments),D.draw(v,_.LINE_STRIP,$,V,W,Mr.disabled,zn(k,o.Color.red),ie,ee,y.debugBuffer,y.tileBorderIndexBuffer,y.debugSegments)}function jc(y,s,f){const v=y.context,_=v.gl,k=y.colorModeForRenderPass(),D=new Xn(_.LEQUAL,Xn.ReadWrite,y.depthRangeFor3D),$=y.useProgram("terrain"),V=s.getTerrainMesh(),W=s.getTerrainData(f.tileID);v.bindFramebuffer.set(null),v.viewport.set([0,0,y.width,y.height]),v.activeTexture.set(_.TEXTURE0),_.bindTexture(_.TEXTURE_2D,s.getRTTFramebuffer().colorAttachment.get());const ee=y.transform.calculatePosMatrix(f.tileID.toUnwrapped());$.draw(v,_.TRIANGLES,D,wr.disabled,k,Mr.backCCW,{u_matrix:ee,u_texture:0},W,"terrain",V.vertexBuffer,V.indexBuffer,V.segments)}function Am(y,s,f,v){const _=y.context,k=f.tileSize*s.qualityFactor;f.textures[v]||(f.textures[v]=y.getTileTexture(k)||new A(_,{width:k,height:k,data:null},_.gl.RGBA),f.textures[v].bind(_.gl.LINEAR,_.gl.CLAMP_TO_EDGE),v===0&&s.sourceCache.renderHistory.unshift(f.tileID.key));const D=s.getRTTFramebuffer();D.colorAttachment.set(f.textures[v].texture),_.bindFramebuffer.set(D.framebuffer),_.viewport.set([0,0,k,k])}class Om{constructor(s){this._coordsDescendingInv={},this._coordsDescendingInvStr={},this.painter=s,this._renderToTexture={background:!0,fill:!0,line:!0,raster:!0},this._coordsDescendingInv={},this._coordsDescendingInvStr={},this._stacks=[],this._prevType=null,this._rerender={},this._renderableTiles=s.style.terrain.sourceCache.getRenderableTiles(),this._init()}_init(){const s=this.painter.style,f=s.terrain;for(const v in s.sourceCaches){this._coordsDescendingInv[v]={};const _=s.sourceCaches[v].getVisibleCoordinates();for(const k of _){const D=f.sourceCache.getTerrainCoords(k);for(const $ in D)this._coordsDescendingInv[v][$]||(this._coordsDescendingInv[v][$]=[]),this._coordsDescendingInv[v][$].push(D[$])}}for(const v of s._order){const _=s._layers[v],k=_.source;if(this._renderToTexture[_.type]&&!this._coordsDescendingInvStr[k]){this._coordsDescendingInvStr[k]={};for(const D in this._coordsDescendingInv[k])this._coordsDescendingInvStr[k][D]=this._coordsDescendingInv[k][D].map($=>$.key).sort().join()}}return this._renderableTiles.forEach(v=>{for(const _ in this._coordsDescendingInvStr){const k=this._coordsDescendingInvStr[_][v.tileID.key];k&&k!==v.textureCoords[_]&&v.clearTextures(this.painter),f.needsRerender(_,v.tileID)&&v.clearTextures(this.painter)}this._rerender[v.tileID.key]=!v.textures.length}),f.clearRerenderCache(),f.sourceCache.removeOutdated(this.painter),this}renderLayer(s){const f=s.type,v=this.painter,_=v.style._order,k=v.currentLayer,D=k+1===_.length;if(this._renderToTexture[f]&&(this._prevType&&this._renderToTexture[this._prevType]||this._stacks.push([]),this._prevType=f,this._stacks[this._stacks.length-1].push(_[k]),!D))return!0;if(this._renderToTexture[this._prevType]||f==="hillshade"||this._renderToTexture[f]&&D){this._prevType=f;const $=this._stacks.length-1,V=this._stacks[$]||[];for(const W of this._renderableTiles){if(Am(v,v.style.terrain,W,$),this._rerender[W.tileID.key]){v.context.clear({color:o.Color.transparent});for(let ee=0;ee<V.length;ee++){const ie=v.style._layers[V[ee]],fe=ie.source?this._coordsDescendingInv[ie.source][W.tileID.key]:[W.tileID];v._renderTileClippingMasks(ie,fe),v.renderLayer(v,v.style.sourceCaches[ie.source],ie,fe),ie.source&&(W.textureCoords[ie.source]=this._coordsDescendingInvStr[ie.source][W.tileID.key])}}jc(v,v.style.terrain,W)}if(f==="hillshade"){this._stacks.push([_[k]]);for(const W of this._renderableTiles){const ee=this._coordsDescendingInv[s.source][W.tileID.key];Am(v,v.style.terrain,W,this._stacks.length-1),v.context.clear({color:o.Color.transparent}),v._renderTileClippingMasks(s,ee),v.renderLayer(v,v.style.sourceCaches[s.source],s,ee),jc(v,v.style.terrain,W)}return!0}return this._renderToTexture[f]}return!1}}const Tu={symbol:function(y,s,f,v,_){if(y.renderPass!=="translucent")return;const k=wr.disabled,D=y.colorModeForRenderPass();f.layout.get("text-variable-anchor")&&function($,V,W,ee,ie,fe,Se){const _e=V.transform,we=ie==="map",$e=fe==="map";for(const je of $){const et=ee.getTile(je),Pe=et.getBucket(W);if(!Pe||!Pe.text||!Pe.text.segments.get().length)continue;const at=o.evaluateSizeForZoom(Pe.textSizeData,_e.zoom),nt=Nt(et,1,V.transform.zoom),gt=Xt(je.posMatrix,$e,we,V.transform,nt),yt=W.layout.get("icon-text-fit")!=="none"&&Pe.hasIconData();if(at){const Dt=Math.pow(2,_e.zoom-et.tileID.overscaledZ);Pm(Pe,we,$e,Se,_e,gt,je.posMatrix,Dt,at,yt,V.style.terrain?(vt,rn)=>V.style.terrain.getElevation(je,vt,rn):null)}}}(v,y,f,s,f.layout.get("text-rotation-alignment"),f.layout.get("text-pitch-alignment"),_),f.paint.get("icon-opacity").constantOr(1)!==0&&Bc(y,s,f,v,!1,f.paint.get("icon-translate"),f.paint.get("icon-translate-anchor"),f.layout.get("icon-rotation-alignment"),f.layout.get("icon-pitch-alignment"),f.layout.get("icon-keep-upright"),k,D),f.paint.get("text-opacity").constantOr(1)!==0&&Bc(y,s,f,v,!0,f.paint.get("text-translate"),f.paint.get("text-translate-anchor"),f.layout.get("text-rotation-alignment"),f.layout.get("text-pitch-alignment"),f.layout.get("text-keep-upright"),k,D),s.map.showCollisionBoxes&&(pl(y,s,f,v,f.paint.get("text-translate"),f.paint.get("text-translate-anchor"),!0),pl(y,s,f,v,f.paint.get("icon-translate"),f.paint.get("icon-translate-anchor"),!1))},circle:function(y,s,f,v){if(y.renderPass!=="translucent")return;const _=f.paint.get("circle-opacity"),k=f.paint.get("circle-stroke-width"),D=f.paint.get("circle-stroke-opacity"),$=!f.layout.get("circle-sort-key").isConstant();if(_.constantOr(1)===0&&(k.constantOr(1)===0||D.constantOr(1)===0))return;const V=y.context,W=V.gl,ee=y.depthModeForSublayer(0,Xn.ReadOnly),ie=wr.disabled,fe=y.colorModeForRenderPass(),Se=[];for(let _e=0;_e<v.length;_e++){const we=v[_e],$e=s.getTile(we),je=$e.getBucket(f);if(!je)continue;const et=je.programConfigurations.get(f.id),Pe=y.useProgram("circle",et),at=je.layoutVertexBuffer,nt=je.indexBuffer,gt=y.style.terrain&&y.style.terrain.getTerrainData(we),yt={programConfiguration:et,program:Pe,layoutVertexBuffer:at,indexBuffer:nt,uniformValues:Ac(y,we,$e,f),terrainData:gt};if($){const Dt=je.segments.get();for(const vt of Dt)Se.push({segments:new o.SegmentVector([vt]),sortKey:vt.sortKey,state:yt})}else Se.push({segments:je.segments,sortKey:0,state:yt})}$&&Se.sort((_e,we)=>_e.sortKey-we.sortKey);for(const _e of Se){const{programConfiguration:we,program:$e,layoutVertexBuffer:je,indexBuffer:et,uniformValues:Pe,terrainData:at}=_e.state;$e.draw(V,W.TRIANGLES,ee,ie,fe,Mr.disabled,Pe,at,f.id,je,et,_e.segments,f.paint,y.transform.zoom,we)}},heatmap:function(y,s,f,v){if(f.paint.get("heatmap-opacity")!==0)if(y.renderPass==="offscreen"){const _=y.context,k=_.gl,D=wr.disabled,$=new Er([k.ONE,k.ONE],o.Color.transparent,[!0,!0,!0,!0]);(function(V,W,ee){const ie=V.gl;V.activeTexture.set(ie.TEXTURE1),V.viewport.set([0,0,W.width/4,W.height/4]);let fe=ee.heatmapFbo;if(fe)ie.bindTexture(ie.TEXTURE_2D,fe.colorAttachment.get()),V.bindFramebuffer.set(fe.framebuffer);else{const Se=ie.createTexture();ie.bindTexture(ie.TEXTURE_2D,Se),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_WRAP_S,ie.CLAMP_TO_EDGE),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_WRAP_T,ie.CLAMP_TO_EDGE),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_MIN_FILTER,ie.LINEAR),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_MAG_FILTER,ie.LINEAR),fe=ee.heatmapFbo=V.createFramebuffer(W.width/4,W.height/4,!1),function(_e,we,$e,je){const et=_e.gl;et.texImage2D(et.TEXTURE_2D,0,et.RGBA,we.width/4,we.height/4,0,et.RGBA,_e.extRenderToTextureHalfFloat?_e.extTextureHalfFloat.HALF_FLOAT_OES:et.UNSIGNED_BYTE,null),je.colorAttachment.set($e)}(V,W,Se,fe)}})(_,y,f),_.clear({color:o.Color.transparent});for(let V=0;V<v.length;V++){const W=v[V];if(s.hasRenderableParent(W))continue;const ee=s.getTile(W),ie=ee.getBucket(f);if(!ie)continue;const fe=ie.programConfigurations.get(f.id),Se=y.useProgram("heatmap",fe),{zoom:_e}=y.transform;Se.draw(_,k.TRIANGLES,Xn.disabled,D,$,Mr.disabled,Ir(W.posMatrix,ee,_e,f.paint.get("heatmap-intensity")),null,f.id,ie.layoutVertexBuffer,ie.indexBuffer,ie.segments,f.paint,y.transform.zoom,fe)}_.viewport.set([0,0,y.width,y.height])}else y.renderPass==="translucent"&&(y.context.setColorMode(y.colorModeForRenderPass()),function(_,k){const D=_.context,$=D.gl,V=k.heatmapFbo;if(!V)return;D.activeTexture.set($.TEXTURE0),$.bindTexture($.TEXTURE_2D,V.colorAttachment.get()),D.activeTexture.set($.TEXTURE1);let W=k.colorRampTexture;W||(W=k.colorRampTexture=new A(D,k.colorRamp,$.RGBA)),W.bind($.LINEAR,$.CLAMP_TO_EDGE),_.useProgram("heatmapTexture").draw(D,$.TRIANGLES,Xn.disabled,wr.disabled,_.colorModeForRenderPass(),Mr.disabled,((ee,ie,fe,Se)=>{const _e=o.create();o.ortho(_e,0,ee.width,ee.height,0,0,1);const we=ee.context.gl;return{u_matrix:_e,u_world:[we.drawingBufferWidth,we.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:ie.paint.get("heatmap-opacity")}})(_,k),null,k.id,_.viewportBuffer,_.quadTriangleIndexBuffer,_.viewportSegments,k.paint,_.transform.zoom)}(y,f))},line:function(y,s,f,v){if(y.renderPass!=="translucent")return;const _=f.paint.get("line-opacity"),k=f.paint.get("line-width");if(_.constantOr(1)===0||k.constantOr(1)===0)return;const D=y.depthModeForSublayer(0,Xn.ReadOnly),$=y.colorModeForRenderPass(),V=f.paint.get("line-dasharray"),W=f.paint.get("line-pattern"),ee=W.constantOr(1),ie=f.paint.get("line-gradient"),fe=f.getCrossfadeParameters(),Se=ee?"linePattern":V?"lineSDF":ie?"lineGradient":"line",_e=y.context,we=_e.gl;let $e=!0;for(const je of v){const et=s.getTile(je);if(ee&&!et.patternsLoaded())continue;const Pe=et.getBucket(f);if(!Pe)continue;const at=Pe.programConfigurations.get(f.id),nt=y.context.program.get(),gt=y.useProgram(Se,at),yt=$e||gt.program!==nt,Dt=y.style.terrain&&y.style.terrain.getTerrainData(je),vt=W.constantOr(null);if(vt&&et.imageAtlas){const ln=et.imageAtlas,Dn=ln.patternPositions[vt.to.toString()],Vn=ln.patternPositions[vt.from.toString()];Dn&&Vn&&at.setConstantPatternPositions(Dn,Vn)}const rn=Dt?je:null,qt=ee?_s(y,et,f,fe,rn):V?ka(y,et,f,V,fe,rn):ie?Eo(y,et,f,Pe.lineClipsArray.length,rn):Ga(y,et,f,rn);if(ee)_e.activeTexture.set(we.TEXTURE0),et.imageAtlasTexture.bind(we.LINEAR,we.CLAMP_TO_EDGE),at.updatePaintBuffers(fe);else if(V&&(yt||y.lineAtlas.dirty))_e.activeTexture.set(we.TEXTURE0),y.lineAtlas.bind(_e);else if(ie){const ln=Pe.gradients[f.id];let Dn=ln.texture;if(f.gradientVersion!==ln.version){let Vn=256;if(f.stepInterpolant){const bn=s.getSource().maxzoom,cr=je.canonical.z===bn?Math.ceil(1<<y.transform.maxZoom-je.canonical.z):1;Vn=o.clamp(o.nextPowerOfTwo(Pe.maxLineLength/o.EXTENT*1024*cr),256,_e.maxTextureSize)}ln.gradient=o.renderColorRamp({expression:f.gradientExpression(),evaluationKey:"lineProgress",resolution:Vn,image:ln.gradient||void 0,clips:Pe.lineClipsArray}),ln.texture?ln.texture.update(ln.gradient):ln.texture=new A(_e,ln.gradient,we.RGBA),ln.version=f.gradientVersion,Dn=ln.texture}_e.activeTexture.set(we.TEXTURE0),Dn.bind(f.stepInterpolant?we.NEAREST:we.LINEAR,we.CLAMP_TO_EDGE)}gt.draw(_e,we.TRIANGLES,D,y.stencilModeForClipping(je),$,Mr.disabled,qt,Dt,f.id,Pe.layoutVertexBuffer,Pe.indexBuffer,Pe.segments,f.paint,y.transform.zoom,at,Pe.layoutVertexBuffer2),$e=!1}},fill:function(y,s,f,v){const _=f.paint.get("fill-color"),k=f.paint.get("fill-opacity");if(k.constantOr(1)===0)return;const D=y.colorModeForRenderPass(),$=f.paint.get("fill-pattern"),V=y.opaquePassEnabledForLayer()&&!$.constantOr(1)&&_.constantOr(o.Color.transparent).a===1&&k.constantOr(0)===1?"opaque":"translucent";if(y.renderPass===V){const W=y.depthModeForSublayer(1,y.renderPass==="opaque"?Xn.ReadWrite:Xn.ReadOnly);Su(y,s,f,v,W,D,!1)}if(y.renderPass==="translucent"&&f.paint.get("fill-antialias")){const W=y.depthModeForSublayer(f.getPaintProperty("fill-outline-color")?2:0,Xn.ReadOnly);Su(y,s,f,v,W,D,!0)}},"fill-extrusion":function(y,s,f,v){const _=f.paint.get("fill-extrusion-opacity");if(_!==0&&y.renderPass==="translucent"){const k=new Xn(y.context.gl.LEQUAL,Xn.ReadWrite,y.depthRangeFor3D);if(_!==1||f.paint.get("fill-extrusion-pattern").constantOr(1))Eu(y,s,f,v,k,wr.disabled,Er.disabled),Eu(y,s,f,v,k,y.stencilModeFor3D(),y.colorModeForRenderPass());else{const D=y.colorModeForRenderPass();Eu(y,s,f,v,k,wr.disabled,D)}}},hillshade:function(y,s,f,v){if(y.renderPass!=="offscreen"&&y.renderPass!=="translucent")return;const _=y.context,k=y.depthModeForSublayer(0,Xn.ReadOnly),D=y.colorModeForRenderPass(),[$,V]=y.renderPass==="translucent"?y.stencilConfigForOverlap(v):[{},v];for(const W of V){const ee=s.getTile(W);ee.needsHillshadePrepare!==void 0&&ee.needsHillshadePrepare&&y.renderPass==="offscreen"?Im(y,ee,f,k,wr.disabled,D):y.renderPass==="translucent"&&Ff(y,W,ee,f,k,$[W.overscaledZ],D)}_.viewport.set([0,0,y.width,y.height])},raster:function(y,s,f,v){if(y.renderPass!=="translucent"||f.paint.get("raster-opacity")===0||!v.length)return;const _=y.context,k=_.gl,D=s.getSource(),$=y.useProgram("raster"),V=y.colorModeForRenderPass(),[W,ee]=D instanceof ye?[{},v]:y.stencilConfigForOverlap(v),ie=ee[ee.length-1].overscaledZ,fe=!y.options.moving;for(const Se of ee){const _e=y.depthModeForSublayer(Se.overscaledZ-ie,f.paint.get("raster-opacity")===1?Xn.ReadWrite:Xn.ReadOnly,k.LESS),we=s.getTile(Se);we.registerFadeDuration(f.paint.get("raster-fade-duration"));const $e=s.findLoadedParent(Se,0),je=Vc(we,$e,s,f,y.transform,y.style.terrain);let et,Pe;const at=f.paint.get("raster-resampling")==="nearest"?k.NEAREST:k.LINEAR;_.activeTexture.set(k.TEXTURE0),we.texture.bind(at,k.CLAMP_TO_EDGE,k.LINEAR_MIPMAP_NEAREST),_.activeTexture.set(k.TEXTURE1),$e?($e.texture.bind(at,k.CLAMP_TO_EDGE,k.LINEAR_MIPMAP_NEAREST),et=Math.pow(2,$e.tileID.overscaledZ-we.tileID.overscaledZ),Pe=[we.tileID.canonical.x*et%1,we.tileID.canonical.y*et%1]):we.texture.bind(at,k.CLAMP_TO_EDGE,k.LINEAR_MIPMAP_NEAREST);const nt=y.style.terrain&&y.style.terrain.getTerrainData(Se),gt=nt?Se:null,yt=gt?gt.posMatrix:y.transform.calculatePosMatrix(Se.toUnwrapped(),fe),Dt=gm(yt,Pe||[0,0],et||1,je,f);D instanceof ye?$.draw(_,k.TRIANGLES,_e,wr.disabled,V,Mr.disabled,Dt,nt,f.id,D.boundsBuffer,y.quadTriangleIndexBuffer,D.boundsSegments):$.draw(_,k.TRIANGLES,_e,W[Se.overscaledZ],V,Mr.disabled,Dt,nt,f.id,y.rasterBoundsBuffer,y.quadTriangleIndexBuffer,y.rasterBoundsSegments)}},background:function(y,s,f,v){const _=f.paint.get("background-color"),k=f.paint.get("background-opacity");if(k===0)return;const D=y.context,$=D.gl,V=y.transform,W=V.tileSize,ee=f.paint.get("background-pattern");if(y.isPatternMissing(ee))return;const ie=!ee&&_.a===1&&k===1&&y.opaquePassEnabledForLayer()?"opaque":"translucent";if(y.renderPass!==ie)return;const fe=wr.disabled,Se=y.depthModeForSublayer(0,ie==="opaque"?Xn.ReadWrite:Xn.ReadOnly),_e=y.colorModeForRenderPass(),we=y.useProgram(ee?"backgroundPattern":"background"),$e=v||V.coveringTiles({tileSize:W,terrain:y.style.terrain});ee&&(D.activeTexture.set($.TEXTURE0),y.imageManager.bind(y.context));const je=f.getCrossfadeParameters();for(const et of $e){const Pe=v?et.posMatrix:y.transform.calculatePosMatrix(et.toUnwrapped()),at=ee?m1(Pe,k,y,ee,{tileID:et,tileSize:W},je):p1(Pe,k,_),nt=y.style.terrain&&y.style.terrain.getTerrainData(et);we.draw(D,$.TRIANGLES,Se,fe,_e,Mr.disabled,at,nt,f.id,y.tileExtentBuffer,y.quadTriangleIndexBuffer,y.tileExtentSegments)}},debug:function(y,s,f){for(let v=0;v<f.length;v++)k1(y,s,f[v])},custom:function(y,s,f){const v=y.context,_=f.implementation;if(y.renderPass==="offscreen"){const k=_.prerender;k&&(y.setCustomLayerDefaults(),v.setColorMode(y.colorModeForRenderPass()),k.call(_,v.gl,y.transform.customLayerMatrix()),v.setDirty(),y.setBaseState())}else if(y.renderPass==="translucent"){y.setCustomLayerDefaults(),v.setColorMode(y.colorModeForRenderPass()),v.setStencilMode(wr.disabled);const k=_.renderingMode==="3d"?new Xn(y.context.gl.LEQUAL,Xn.ReadWrite,y.depthRangeFor3D):y.depthModeForSublayer(0,Xn.ReadOnly);v.setDepthMode(k),_.render(v.gl,y.transform.customLayerMatrix()),v.setDirty(),y.setBaseState(),v.bindFramebuffer.set(null)}}};class Bf{constructor(s,f){this.context=new Tm(s),this.transform=f,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:o.create(),renderTime:0},this.setup(),this.numSublayers=Ue.maxUnderzooming+Ue.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Bt,this.gpuTimers={}}resize(s,f,v){if(this.width=s*v,this.height=f*v,this.pixelRatio=v,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const _ of this.style._order)this.style._layers[_].resize()}setup(){const s=this.context,f=new o.PosArray;f.emplaceBack(0,0),f.emplaceBack(o.EXTENT,0),f.emplaceBack(0,o.EXTENT),f.emplaceBack(o.EXTENT,o.EXTENT),this.tileExtentBuffer=s.createVertexBuffer(f,gn.members),this.tileExtentSegments=o.SegmentVector.simpleSegment(0,0,4,2);const v=new o.PosArray;v.emplaceBack(0,0),v.emplaceBack(o.EXTENT,0),v.emplaceBack(0,o.EXTENT),v.emplaceBack(o.EXTENT,o.EXTENT),this.debugBuffer=s.createVertexBuffer(v,gn.members),this.debugSegments=o.SegmentVector.simpleSegment(0,0,4,5);const _=new o.RasterBoundsArray;_.emplaceBack(0,0,0,0),_.emplaceBack(o.EXTENT,0,o.EXTENT,0),_.emplaceBack(0,o.EXTENT,0,o.EXTENT),_.emplaceBack(o.EXTENT,o.EXTENT,o.EXTENT,o.EXTENT),this.rasterBoundsBuffer=s.createVertexBuffer(_,oe.members),this.rasterBoundsSegments=o.SegmentVector.simpleSegment(0,0,4,2);const k=new o.PosArray;k.emplaceBack(0,0),k.emplaceBack(1,0),k.emplaceBack(0,1),k.emplaceBack(1,1),this.viewportBuffer=s.createVertexBuffer(k,gn.members),this.viewportSegments=o.SegmentVector.simpleSegment(0,0,4,2);const D=new o.LineStripIndexArray;D.emplaceBack(0),D.emplaceBack(1),D.emplaceBack(3),D.emplaceBack(2),D.emplaceBack(0),this.tileBorderIndexBuffer=s.createIndexBuffer(D);const $=new o.TriangleIndexArray;$.emplaceBack(0,1,2),$.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=s.createIndexBuffer($),this.emptyTexture=new A(s,{width:1,height:1,data:new Uint8Array([0,0,0,0])},s.gl.RGBA);const V=this.context.gl;this.stencilClearMode=new wr({func:V.ALWAYS,mask:0},0,255,V.ZERO,V.ZERO,V.ZERO)}clearStencil(){const s=this.context,f=s.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const v=o.create();o.ortho(v,0,this.width,this.height,0,0,1),o.scale(v,v,[f.drawingBufferWidth,f.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(s,f.TRIANGLES,Xn.disabled,this.stencilClearMode,Er.disabled,Mr.disabled,Zn(v),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(s,f){if(this.currentStencilSource===s.source||!s.isTileClipped()||!f||!f.length)return;this.currentStencilSource=s.source;const v=this.context,_=v.gl;this.nextStencilID+f.length>256&&this.clearStencil(),v.setColorMode(Er.disabled),v.setDepthMode(Xn.disabled);const k=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const D of f){const $=this._tileClippingMaskIDs[D.key]=this.nextStencilID++,V=this.style.terrain&&this.style.terrain.getTerrainData(D);k.draw(v,_.TRIANGLES,Xn.disabled,new wr({func:_.ALWAYS,mask:0},$,255,_.KEEP,_.KEEP,_.REPLACE),Er.disabled,Mr.disabled,Zn(D.posMatrix),V,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const s=this.nextStencilID++,f=this.context.gl;return new wr({func:f.NOTEQUAL,mask:255},s,255,f.KEEP,f.KEEP,f.REPLACE)}stencilModeForClipping(s){const f=this.context.gl;return new wr({func:f.EQUAL,mask:255},this._tileClippingMaskIDs[s.key],0,f.KEEP,f.KEEP,f.REPLACE)}stencilConfigForOverlap(s){const f=this.context.gl,v=s.sort((D,$)=>$.overscaledZ-D.overscaledZ),_=v[v.length-1].overscaledZ,k=v[0].overscaledZ-_+1;if(k>1){this.currentStencilSource=void 0,this.nextStencilID+k>256&&this.clearStencil();const D={};for(let $=0;$<k;$++)D[$+_]=new wr({func:f.GEQUAL,mask:255},$+this.nextStencilID,255,f.KEEP,f.KEEP,f.REPLACE);return this.nextStencilID+=k,[D,v]}return[{[_]:wr.disabled},v]}colorModeForRenderPass(){const s=this.context.gl;return this._showOverdrawInspector?new Er([s.CONSTANT_COLOR,s.ONE],new o.Color(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Er.unblended:Er.alphaBlended}depthModeForSublayer(s,f,v){if(!this.opaquePassEnabledForLayer())return Xn.disabled;const _=1-((1+this.currentLayer)*this.numSublayers+s)*this.depthEpsilon;return new Xn(v||this.context.gl.LEQUAL,f,[_,_])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(s,f){this.style=s,this.options=f,this.lineAtlas=s.lineAtlas,this.imageManager=s.imageManager,this.glyphManager=s.glyphManager,this.symbolFadeChange=s.placement.symbolFadeChange(o.exported.now()),this.imageManager.beginFrame();const v=this.style._order,_=this.style.sourceCaches,k=this.style.terrain&&new Om(this);for(const W in _){const ee=_[W];ee.used&&ee.prepare(this.context)}const D={},$={},V={};for(const W in _){const ee=_[W];D[W]=ee.getVisibleCoordinates(),$[W]=D[W].slice().reverse(),V[W]=ee.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let W=0;W<v.length;W++)if(this.style._layers[v[W]].is3D()){this.opaquePassCutoff=W;break}if(k){this.opaquePassCutoff=0;const W=this.style.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime);(this.terrainFacilitator.dirty||!o.equals(this.terrainFacilitator.matrix,this.transform.projMatrix)||W.length)&&(o.copy(this.terrainFacilitator.matrix,this.transform.projMatrix),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(ee,ie){const fe=ee.context,Se=fe.gl,_e=Er.unblended,we=new Xn(Se.LEQUAL,Xn.ReadWrite,[0,1]),$e=ie.getTerrainMesh(),je=ie.sourceCache.getRenderableTiles(),et=ee.useProgram("terrainDepth");fe.bindFramebuffer.set(ie.getFramebuffer("depth").framebuffer),fe.viewport.set([0,0,ee.width/devicePixelRatio,ee.height/devicePixelRatio]),fe.clear({color:o.Color.transparent,depth:1});for(const Pe of je){const at=ie.getTerrainData(Pe.tileID),nt=ee.transform.calculatePosMatrix(Pe.tileID.toUnwrapped());et.draw(fe,Se.TRIANGLES,we,wr.disabled,_e,Mr.backCCW,{u_matrix:nt},at,"terrain",$e.vertexBuffer,$e.indexBuffer,$e.segments)}fe.bindFramebuffer.set(null),fe.viewport.set([0,0,ee.width,ee.height])}(this,this.style.terrain),function(ee,ie){const fe=ee.context,Se=fe.gl,_e=Er.unblended,we=new Xn(Se.LEQUAL,Xn.ReadWrite,[0,1]),$e=ie.getTerrainMesh(),je=ie.getCoordsTexture(),et=ie.sourceCache.getRenderableTiles(),Pe=ee.useProgram("terrainCoords");fe.bindFramebuffer.set(ie.getFramebuffer("coords").framebuffer),fe.viewport.set([0,0,ee.width/devicePixelRatio,ee.height/devicePixelRatio]),fe.clear({color:o.Color.transparent,depth:1}),ie.coordsIndex=[];for(const at of et){const nt=ie.getTerrainData(at.tileID);fe.activeTexture.set(Se.TEXTURE0),Se.bindTexture(Se.TEXTURE_2D,je.texture);const gt=ee.transform.calculatePosMatrix(at.tileID.toUnwrapped());Pe.draw(fe,Se.TRIANGLES,we,wr.disabled,_e,Mr.backCCW,{u_matrix:gt,u_terrain_coords_id:(255-ie.coordsIndex.length)/255,u_texture:0},nt,"terrain",$e.vertexBuffer,$e.indexBuffer,$e.segments),ie.coordsIndex.push(at.tileID.key)}fe.bindFramebuffer.set(null),fe.viewport.set([0,0,ee.width,ee.height])}(this,this.style.terrain))}this.renderPass="offscreen";for(const W of v){const ee=this.style._layers[W];if(!ee.hasOffscreenPass()||ee.isHidden(this.transform.zoom))continue;const ie=$[ee.source];(ee.type==="custom"||ie.length)&&this.renderLayer(this,_[ee.source],ee,ie)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:f.showOverdrawInspector?o.Color.black:o.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=f.showOverdrawInspector,this.depthRangeFor3D=[0,1-(s._order.length+2)*this.numSublayers*this.depthEpsilon],!k)for(this.renderPass="opaque",this.currentLayer=v.length-1;this.currentLayer>=0;this.currentLayer--){const W=this.style._layers[v[this.currentLayer]],ee=_[W.source],ie=D[W.source];this._renderTileClippingMasks(W,ie),this.renderLayer(this,ee,W,ie)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<v.length;this.currentLayer++){const W=this.style._layers[v[this.currentLayer]],ee=_[W.source];if(k&&k.renderLayer(W))continue;const ie=(W.type==="symbol"?V:$)[W.source];this._renderTileClippingMasks(W,D[W.source]),this.renderLayer(this,ee,W,ie)}if(this.options.showTileBoundaries){let W,ee;Object.values(this.style._layers).forEach(ie=>{ie.source&&!ie.isHidden(this.transform.zoom)&&(ie.source!==(ee&&ee.id)&&(ee=this.style.sourceCaches[ie.source]),(!W||W.getSource().maxzoom<ee.getSource().maxzoom)&&(W=ee))}),W&&Tu.debug(this,W,W.getVisibleCoordinates())}this.options.showPadding&&function(W){const ee=W.transform.padding;ws(W,W.transform.height-(ee.top||0),3,Uc),ws(W,ee.bottom||0,3,zo),ku(W,ee.left||0,3,Mm),ku(W,W.transform.width-(ee.right||0),3,$f);const ie=W.transform.centerPoint;(function(fe,Se,_e,we){ml(fe,Se-1,_e-10,2,20,we),ml(fe,Se-10,_e-1,20,2,we)})(W,ie.x,W.transform.height-ie.y,Rm)}(this),this.context.setDefault()}renderLayer(s,f,v,_){v.isHidden(this.transform.zoom)||(v.type==="background"||v.type==="custom"||(_||[]).length)&&(this.id=v.id,this.gpuTimingStart(v),Tu[v.type](s,f,v,_,this.style.placement.variableOffsets),this.gpuTimingEnd())}gpuTimingStart(s){if(!this.options.gpuTiming)return;const f=this.context.extTimerQuery;let v=this.gpuTimers[s.id];v||(v=this.gpuTimers[s.id]={calls:0,cpuTime:0,query:f.createQueryEXT()}),v.calls++,f.beginQueryEXT(f.TIME_ELAPSED_EXT,v.query)}gpuTimingEnd(){if(!this.options.gpuTiming)return;const s=this.context.extTimerQuery;s.endQueryEXT(s.TIME_ELAPSED_EXT)}collectGpuTimers(){const s=this.gpuTimers;return this.gpuTimers={},s}queryGpuTimers(s){const f={};for(const v in s){const _=s[v],k=this.context.extTimerQuery,D=k.getQueryObjectEXT(_.query,k.QUERY_RESULT_EXT)/1e6;k.deleteQueryEXT(_.query),f[v]=D}return f}translatePosMatrix(s,f,v,_,k){if(!v[0]&&!v[1])return s;const D=k?_==="map"?this.transform.angle:0:_==="viewport"?-this.transform.angle:0;if(D){const W=Math.sin(D),ee=Math.cos(D);v=[v[0]*ee-v[1]*W,v[0]*W+v[1]*ee]}const $=[k?v[0]:Nt(f,v[0],this.transform.zoom),k?v[1]:Nt(f,v[1],this.transform.zoom),0],V=new Float32Array(16);return o.translate(V,s,$),V}saveTileTexture(s){const f=this._tileTextures[s.size[0]];f?f.push(s):this._tileTextures[s.size[0]]=[s]}getTileTexture(s){const f=this._tileTextures[s];return f&&f.length>0?f.pop():null}isPatternMissing(s){if(!s)return!1;if(!s.from||!s.to)return!0;const f=this.imageManager.getPattern(s.from.toString()),v=this.imageManager.getPattern(s.to.toString());return!f||!v}useProgram(s,f){this.cache=this.cache||{};const v=s+(f?f.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.terrain?"/terrain":"");return this.cache[v]||(this.cache[v]=new jn(this.context,s,Sn[s],f,kf[s],this._showOverdrawInspector,this.style.terrain)),this.cache[v]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const s=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(s.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new A(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}}class Kc{constructor(s,f){this.points=s,this.planes=f}static fromInvProjectionMatrix(s,f,v){const _=Math.pow(2,v),k=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map($=>{const V=1/($=o.transformMat4([],$,s))[3]/f*_;return o.mul$1($,$,[V,V,1/$[3],V])}),D=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map($=>{const V=o.sub([],k[$[0]],k[$[1]]),W=o.sub([],k[$[2]],k[$[1]]),ee=o.normalize([],o.cross([],V,W)),ie=-o.dot(ee,k[$[1]]);return ee.concat(ie)});return new Kc(k,D)}}class Pu{constructor(s,f){this.min=s,this.max=f,this.center=o.scale$1([],o.add([],this.min,this.max),.5)}quadrant(s){const f=[s%2==0,s<2],v=o.clone$2(this.min),_=o.clone$2(this.max);for(let k=0;k<f.length;k++)v[k]=f[k]?this.min[k]:this.center[k],_[k]=f[k]?this.center[k]:this.max[k];return _[2]=this.max[2],new Pu(v,_)}distanceX(s){return Math.max(Math.min(this.max[0],s[0]),this.min[0])-s[0]}distanceY(s){return Math.max(Math.min(this.max[1],s[1]),this.min[1])-s[1]}intersects(s){const f=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]];let v=!0;for(let _=0;_<s.planes.length;_++){const k=s.planes[_];let D=0;for(let $=0;$<f.length;$++)o.dot$1(k,f[$])>=0&&D++;if(D===0)return 0;D!==f.length&&(v=!1)}if(v)return 2;for(let _=0;_<3;_++){let k=Number.MAX_VALUE,D=-Number.MAX_VALUE;for(let $=0;$<s.points.length;$++){const V=s.points[$][_]-this.min[_];k=Math.min(k,V),D=Math.max(D,V)}if(D<0||k>this.max[_]-this.min[_])return 0}return 1}}class vl{constructor(s=0,f=0,v=0,_=0){if(isNaN(s)||s<0||isNaN(f)||f<0||isNaN(v)||v<0||isNaN(_)||_<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=s,this.bottom=f,this.left=v,this.right=_}interpolate(s,f,v){return f.top!=null&&s.top!=null&&(this.top=o.number(s.top,f.top,v)),f.bottom!=null&&s.bottom!=null&&(this.bottom=o.number(s.bottom,f.bottom,v)),f.left!=null&&s.left!=null&&(this.left=o.number(s.left,f.left,v)),f.right!=null&&s.right!=null&&(this.right=o.number(s.right,f.right,v)),this}getCenter(s,f){const v=o.clamp((this.left+s-this.right)/2,0,s),_=o.clamp((this.top+f-this.bottom)/2,0,f);return new o.pointGeometry(v,_)}equals(s){return this.top===s.top&&this.bottom===s.bottom&&this.left===s.left&&this.right===s.right}clone(){return new vl(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}class Iu{constructor(s,f,v,_,k){this.tileSize=512,this.maxValidLatitude=85.051129,this.freezeElevation=!1,this._renderWorldCopies=k===void 0||!!k,this._minZoom=s||0,this._maxZoom=f||22,this._minPitch=v==null?0:v,this._maxPitch=_==null?60:_,this.setMaxBounds(),this.width=0,this.height=0,this._center=new o.LngLat(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new vl,this._posMatrixCache={},this._alignedPosMatrixCache={}}clone(){const s=new Iu(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return s.tileSize=this.tileSize,s.latRange=this.latRange,s.width=this.width,s.height=this.height,s._center=this._center,s._elevation=this._elevation,s.zoom=this.zoom,s.angle=this.angle,s._fov=this._fov,s._pitch=this._pitch,s._unmodified=this._unmodified,s._edgeInsets=this._edgeInsets.clone(),s._calcMatrices(),s}get minZoom(){return this._minZoom}set minZoom(s){this._minZoom!==s&&(this._minZoom=s,this.zoom=Math.max(this.zoom,s))}get maxZoom(){return this._maxZoom}set maxZoom(s){this._maxZoom!==s&&(this._maxZoom=s,this.zoom=Math.min(this.zoom,s))}get minPitch(){return this._minPitch}set minPitch(s){this._minPitch!==s&&(this._minPitch=s,this.pitch=Math.max(this.pitch,s))}get maxPitch(){return this._maxPitch}set maxPitch(s){this._maxPitch!==s&&(this._maxPitch=s,this.pitch=Math.min(this.pitch,s))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(s){s===void 0?s=!0:s===null&&(s=!1),this._renderWorldCopies=s}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new o.pointGeometry(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(s){const f=-o.wrap(s,-180,180)*Math.PI/180;var v;this.angle!==f&&(this._unmodified=!1,this.angle=f,this._calcMatrices(),this.rotationMatrix=(v=new o.ARRAY_TYPE(4),o.ARRAY_TYPE!=Float32Array&&(v[1]=0,v[2]=0),v[0]=1,v[3]=1,v),function(_,k,D){var $=k[0],V=k[1],W=k[2],ee=k[3],ie=Math.sin(D),fe=Math.cos(D);_[0]=$*fe+W*ie,_[1]=V*fe+ee*ie,_[2]=$*-ie+W*fe,_[3]=V*-ie+ee*fe}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(s){const f=o.clamp(s,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==f&&(this._unmodified=!1,this._pitch=f,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(s){s=Math.max(.01,Math.min(60,s)),this._fov!==s&&(this._unmodified=!1,this._fov=s/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(s){const f=Math.min(Math.max(s,this.minZoom),this.maxZoom);this._zoom!==f&&(this._unmodified=!1,this._zoom=f,this.scale=this.zoomScale(f),this.tileZoom=Math.floor(f),this.zoomFraction=f-this.tileZoom,this._constrain(),this._calcMatrices())}get center(){return this._center}set center(s){s.lat===this._center.lat&&s.lng===this._center.lng||(this._unmodified=!1,this._center=s,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(s){s!==this._elevation&&(this._elevation=s,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(s){this._edgeInsets.equals(s)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,s,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(s){return this._edgeInsets.equals(s)}interpolatePadding(s,f,v){this._unmodified=!1,this._edgeInsets.interpolate(s,f,v),this._constrain(),this._calcMatrices()}coveringZoomLevel(s){const f=(s.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/s.tileSize));return Math.max(0,f)}getVisibleUnwrappedCoordinates(s){const f=[new o.UnwrappedTileID(0,s)];if(this._renderWorldCopies){const v=this.pointCoordinate(new o.pointGeometry(0,0)),_=this.pointCoordinate(new o.pointGeometry(this.width,0)),k=this.pointCoordinate(new o.pointGeometry(this.width,this.height)),D=this.pointCoordinate(new o.pointGeometry(0,this.height)),$=Math.floor(Math.min(v.x,_.x,k.x,D.x)),V=Math.floor(Math.max(v.x,_.x,k.x,D.x)),W=1;for(let ee=$-W;ee<=V+W;ee++)ee!==0&&f.push(new o.UnwrappedTileID(ee,s))}return f}coveringTiles(s){var f,v;let _=this.coveringZoomLevel(s);const k=_;if(s.minzoom!==void 0&&_<s.minzoom)return[];s.maxzoom!==void 0&&_>s.maxzoom&&(_=s.maxzoom);const D=this.pointCoordinate(this.getCameraPoint()),$=o.MercatorCoordinate.fromLngLat(this.center),V=Math.pow(2,_),W=[V*D.x,V*D.y,0],ee=[V*$.x,V*$.y,0],ie=Kc.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,_);let fe=s.minzoom||0;!s.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(fe=_);const Se=s.terrain?2/Math.min(this.tileSize,s.tileSize)*this.tileSize:3,_e=Pe=>({aabb:new Pu([Pe*V,0,0],[(Pe+1)*V,V,0]),zoom:0,x:0,y:0,wrap:Pe,fullyVisible:!1}),we=[],$e=[],je=_,et=s.reparseOverscaled?k:_;if(this._renderWorldCopies)for(let Pe=1;Pe<=3;Pe++)we.push(_e(-Pe)),we.push(_e(Pe));for(we.push(_e(0));we.length>0;){const Pe=we.pop(),at=Pe.x,nt=Pe.y;let gt=Pe.fullyVisible;if(!gt){const ln=Pe.aabb.intersects(ie);if(ln===0)continue;gt=ln===2}const yt=s.terrain?W:ee,Dt=Pe.aabb.distanceX(yt),vt=Pe.aabb.distanceY(yt),rn=Math.max(Math.abs(Dt),Math.abs(vt)),qt=Se+(1<<je-Pe.zoom)-2;if(Pe.zoom===je||rn>qt&&Pe.zoom>=fe){const ln=je-Pe.zoom,Dn=W[0]-.5-(at<<ln),Vn=W[1]-.5-(nt<<ln);$e.push({tileID:new o.OverscaledTileID(Pe.zoom===je?et:Pe.zoom,Pe.wrap,Pe.zoom,at,nt),distanceSq:o.sqrLen([ee[0]-.5-at,ee[1]-.5-nt]),tileDistanceToCamera:Math.sqrt(Dn*Dn+Vn*Vn)})}else for(let ln=0;ln<4;ln++){const Dn=(at<<1)+ln%2,Vn=(nt<<1)+(ln>>1),bn=Pe.zoom+1;let cr=Pe.aabb.quadrant(ln);if(s.terrain){const dr=new o.OverscaledTileID(bn,Pe.wrap,bn,Dn,Vn),Qn=s.terrain.getMinMaxElevation(dr),er=(f=Qn.minElevation)!==null&&f!==void 0?f:this.elevation,pr=(v=Qn.maxElevation)!==null&&v!==void 0?v:this.elevation;cr=new Pu([cr.min[0],cr.min[1],er],[cr.max[0],cr.max[1],pr])}we.push({aabb:cr,zoom:bn,x:Dn,y:Vn,wrap:Pe.wrap,fullyVisible:gt})}}return $e.sort((Pe,at)=>Pe.distanceSq-at.distanceSq).map(Pe=>Pe.tileID)}resize(s,f){this.width=s,this.height=f,this.pixelsToGLUnits=[2/s,-2/f],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(s){return Math.pow(2,s)}scaleZoom(s){return Math.log(s)/Math.LN2}project(s){const f=o.clamp(s.lat,-this.maxValidLatitude,this.maxValidLatitude);return new o.pointGeometry(o.mercatorXfromLng(s.lng)*this.worldSize,o.mercatorYfromLat(f)*this.worldSize)}unproject(s){return new o.MercatorCoordinate(s.x/this.worldSize,s.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}updateElevation(s){this.freezeElevation||(this.elevation=s?this.getElevation(this._center,s):0)}getElevation(s,f){const v=o.MercatorCoordinate.fromLngLat(s),_=(1<<this.tileZoom)*o.EXTENT,k=v.x*_,D=v.y*_,$=Math.floor(k/o.EXTENT),V=Math.floor(D/o.EXTENT),W=new o.OverscaledTileID(this.tileZoom,0,this.tileZoom,$,V);return f.getElevation(W,k%o.EXTENT,D%o.EXTENT,o.EXTENT)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(s){const f=this.pointLocation(this.centerPoint,s),v=this.getElevation(f,s);if(!(this.elevation-v))return;const _=this.getCameraPosition(),k=o.MercatorCoordinate.fromLngLat(_.lngLat,_.altitude),D=o.MercatorCoordinate.fromLngLat(f,v),$=k.x-D.x,V=k.y-D.y,W=k.z-D.z,ee=Math.sqrt($*$+V*V+W*W),ie=this.scaleZoom(this.cameraToCenterDistance/ee/this.tileSize);this._elevation=v,this._center=f,this.zoom=ie}setLocationAtPoint(s,f){const v=this.pointCoordinate(f),_=this.pointCoordinate(this.centerPoint),k=this.locationCoordinate(s),D=new o.MercatorCoordinate(k.x-(v.x-_.x),k.y-(v.y-_.y));this.center=this.coordinateLocation(D),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(s,f){return f?this.coordinatePoint(this.locationCoordinate(s),this.getElevation(s,f),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(s))}pointLocation(s,f){return this.coordinateLocation(this.pointCoordinate(s,f))}locationCoordinate(s){return o.MercatorCoordinate.fromLngLat(s)}coordinateLocation(s){return s&&s.toLngLat()}pointCoordinate(s,f){if(f){const fe=f.pointCoordinate(s);if(fe!=null)return fe}const v=[s.x,s.y,0,1],_=[s.x,s.y,1,1];o.transformMat4(v,v,this.pixelMatrixInverse),o.transformMat4(_,_,this.pixelMatrixInverse);const k=v[3],D=_[3],$=v[1]/k,V=_[1]/D,W=v[2]/k,ee=_[2]/D,ie=W===ee?0:(0-W)/(ee-W);return new o.MercatorCoordinate(o.number(v[0]/k,_[0]/D,ie)/this.worldSize,o.number($,V,ie)/this.worldSize)}coordinatePoint(s,f=0,v=this.pixelMatrix){const _=[s.x*this.worldSize,s.y*this.worldSize,f,1];return o.transformMat4(_,_,v),new o.pointGeometry(_[0]/_[3],_[1]/_[3])}getBounds(){const s=Math.max(0,this.height/2-this.getHorizon());return new o.LngLatBounds().extend(this.pointLocation(new o.pointGeometry(0,s))).extend(this.pointLocation(new o.pointGeometry(this.width,s))).extend(this.pointLocation(new o.pointGeometry(this.width,this.height))).extend(this.pointLocation(new o.pointGeometry(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new o.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(s){s?(this.lngRange=[s.getWest(),s.getEast()],this.latRange=[s.getSouth(),s.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])}calculatePosMatrix(s,f=!1){const v=s.key,_=f?this._alignedPosMatrixCache:this._posMatrixCache;if(_[v])return _[v];const k=s.canonical,D=this.worldSize/this.zoomScale(k.z),$=k.x+Math.pow(2,k.z)*s.wrap,V=o.identity(new Float64Array(16));return o.translate(V,V,[$*D,k.y*D,0]),o.scale(V,V,[D/o.EXTENT,D/o.EXTENT,1]),o.multiply(V,f?this.alignedProjMatrix:this.projMatrix,V),_[v]=new Float32Array(V),_[v]}customLayerMatrix(){return this.mercatorMatrix.slice()}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let s,f,v,_,k=-90,D=90,$=-180,V=180;const W=this.size,ee=this._unmodified;if(this.latRange){const Se=this.latRange;k=o.mercatorYfromLat(Se[1])*this.worldSize,D=o.mercatorYfromLat(Se[0])*this.worldSize,s=D-k<W.y?W.y/(D-k):0}if(this.lngRange){const Se=this.lngRange;$=o.wrap(o.mercatorXfromLng(Se[0])*this.worldSize,0,this.worldSize),V=o.wrap(o.mercatorXfromLng(Se[1])*this.worldSize,0,this.worldSize),V<$&&(V+=this.worldSize),f=V-$<W.x?W.x/(V-$):0}const ie=this.point,fe=Math.max(f||0,s||0);if(fe)return this.center=this.unproject(new o.pointGeometry(f?(V+$)/2:ie.x,s?(D+k)/2:ie.y)),this.zoom+=this.scaleZoom(fe),this._unmodified=ee,void(this._constraining=!1);if(this.latRange){const Se=ie.y,_e=W.y/2;Se-_e<k&&(_=k+_e),Se+_e>D&&(_=D-_e)}if(this.lngRange){const Se=($+V)/2,_e=o.wrap(ie.x,Se-this.worldSize/2,Se+this.worldSize/2),we=W.x/2;_e-we<$&&(v=$+we),_e+we>V&&(v=V-we)}v===void 0&&_===void 0||(this.center=this.unproject(new o.pointGeometry(v!==void 0?v:ie.x,_!==void 0?_:ie.y)).wrap()),this._unmodified=ee,this._constraining=!1}_calcMatrices(){if(!this.height)return;const s=this.centerOffset,f=this.point.x,v=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=o.mercatorZfromAltitude(1,this.center.lat)*this.worldSize;let _=o.identity(new Float64Array(16));o.scale(_,_,[this.width/2,-this.height/2,1]),o.translate(_,_,[1,-1,0]),this.labelPlaneMatrix=_,_=o.identity(new Float64Array(16)),o.scale(_,_,[1,-1,1]),o.translate(_,_,[-1,-1,0]),o.scale(_,_,[2/this.width,2/this.height,1]),this.glCoordMatrix=_,this.cameraToSeaLevelDistance=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch);const k=Math.PI/2+this._pitch,D=this._fov*(.5+s.y/this.height),$=Math.sin(D)*this.cameraToSeaLevelDistance/Math.sin(o.clamp(Math.PI-k-D,.01,Math.PI-.01)),V=this.getHorizon(),W=2*Math.atan(V/this.cameraToCenterDistance)*(.5+s.y/(2*V)),ee=Math.sin(W)*this.cameraToSeaLevelDistance/Math.sin(o.clamp(Math.PI-k-W,.01,Math.PI-.01)),ie=Math.cos(Math.PI/2-this._pitch)*$+this.cameraToSeaLevelDistance,fe=Math.cos(Math.PI/2-this._pitch)*ee+this.cameraToSeaLevelDistance,Se=1.01*Math.min(ie,fe),_e=this.height/50;_=new Float64Array(16),o.perspective(_,this._fov,this.width/this.height,_e,Se),_[8]=2*-s.x/this.width,_[9]=2*s.y/this.height,o.scale(_,_,[1,-1,1]),o.translate(_,_,[0,0,-this.cameraToCenterDistance]),o.rotateX(_,_,this._pitch),o.rotateZ(_,_,this.angle),o.translate(_,_,[-f,-v,0]),this.mercatorMatrix=o.scale([],_,[this.worldSize,this.worldSize,this.worldSize]),o.scale(_,_,[1,1,this._pixelPerMeter]),this.pixelMatrix=o.multiply(new Float64Array(16),this.labelPlaneMatrix,_),o.translate(_,_,[0,0,-this.elevation]),this.projMatrix=_,this.invProjMatrix=o.invert([],_),this.pixelMatrix3D=o.multiply(new Float64Array(16),this.labelPlaneMatrix,_);const we=this.width%2/2,$e=this.height%2/2,je=Math.cos(this.angle),et=Math.sin(this.angle),Pe=f-Math.round(f)+je*we+et*$e,at=v-Math.round(v)+je*$e+et*we,nt=new Float64Array(_);if(o.translate(nt,nt,[Pe>.5?Pe-1:Pe,at>.5?at-1:at,0]),this.alignedProjMatrix=nt,_=o.invert(new Float64Array(16),this.pixelMatrix),!_)throw new Error("failed to invert matrix");this.pixelMatrixInverse=_,this._posMatrixCache={},this._alignedPosMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const s=this.pointCoordinate(new o.pointGeometry(0,0)),f=[s.x*this.worldSize,s.y*this.worldSize,0,1];return o.transformMat4(f,f,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const s=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new o.pointGeometry(0,s))}getCameraQueryGeometry(s){const f=this.getCameraPoint();if(s.length===1)return[s[0],f];{let v=f.x,_=f.y,k=f.x,D=f.y;for(const $ of s)v=Math.min(v,$.x),_=Math.min(_,$.y),k=Math.max(k,$.x),D=Math.max(D,$.y);return[new o.pointGeometry(v,_),new o.pointGeometry(k,_),new o.pointGeometry(k,D),new o.pointGeometry(v,D),new o.pointGeometry(v,_)]}}}class Nm{constructor(s){this._hashName=s&&encodeURIComponent(s),o.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=function(f,v){let _=!1,k=null;const D=()=>{k=null,_&&(f(),k=setTimeout(D,300),_=!1)};return()=>(_=!0,k||D(),k)}(this._updateHashUnthrottled.bind(this))}addTo(s){return this._map=s,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this}getHashString(s){const f=this._map.getCenter(),v=Math.round(100*this._map.getZoom())/100,_=Math.ceil((v*Math.LN2+Math.log(512/360/.5))/Math.LN10),k=Math.pow(10,_),D=Math.round(f.lng*k)/k,$=Math.round(f.lat*k)/k,V=this._map.getBearing(),W=this._map.getPitch();let ee="";if(ee+=s?`/${D}/${$}/${v}`:`${v}/${$}/${D}`,(V||W)&&(ee+="/"+Math.round(10*V)/10),W&&(ee+=`/${Math.round(W)}`),this._hashName){const ie=this._hashName;let fe=!1;const Se=window.location.hash.slice(1).split("&").map(_e=>{const we=_e.split("=")[0];return we===ie?(fe=!0,`${we}=${ee}`):_e}).filter(_e=>_e);return fe||Se.push(`${ie}=${ee}`),`#${Se.join("&")}`}return`#${ee}`}_getCurrentHash(){const s=window.location.hash.replace("#","");if(this._hashName){let f;return s.split("&").map(v=>v.split("=")).forEach(v=>{v[0]===this._hashName&&(f=v)}),(f&&f[1]||"").split("/")}return s.split("/")}_onHashChange(){const s=this._getCurrentHash();if(s.length>=3&&!s.some(f=>isNaN(f))){const f=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(s[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+s[2],+s[1]],zoom:+s[0],bearing:f,pitch:+(s[4]||0)}),!0}return!1}_updateHashUnthrottled(){const s=window.location.href.replace(/(#.+)?$/,this.getHashString());try{window.history.replaceState(window.history.state,null,s)}catch{}}}const Mu={linearity:.3,easing:o.bezier(0,0,.3,1)},Dm=o.extend({deceleration:2500,maxSpeed:1400},Mu),Lm=o.extend({deceleration:20,maxSpeed:1400},Mu),zm=o.extend({deceleration:1e3,maxSpeed:360},Mu),gl=o.extend({deceleration:1e3,maxSpeed:90},Mu);class Fm{constructor(s){this._map=s,this.clear()}clear(){this._inertiaBuffer=[]}record(s){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:o.exported.now(),settings:s})}_drainInertiaBuffer(){const s=this._inertiaBuffer,f=o.exported.now();for(;s.length>0&&f-s[0].time>160;)s.shift()}_onMoveEnd(s){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const f={zoom:0,bearing:0,pitch:0,pan:new o.pointGeometry(0,0),pinchAround:void 0,around:void 0};for(const{settings:k}of this._inertiaBuffer)f.zoom+=k.zoomDelta||0,f.bearing+=k.bearingDelta||0,f.pitch+=k.pitchDelta||0,k.panDelta&&f.pan._add(k.panDelta),k.around&&(f.around=k.around),k.pinchAround&&(f.pinchAround=k.pinchAround);const v=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,_={};if(f.pan.mag()){const k=Au(f.pan.mag(),v,o.extend({},Dm,s||{}));_.offset=f.pan.mult(k.amount/f.pan.mag()),_.center=this._map.transform.center,Ru(_,k)}if(f.zoom){const k=Au(f.zoom,v,Lm);_.zoom=this._map.transform.zoom+k.amount,Ru(_,k)}if(f.bearing){const k=Au(f.bearing,v,zm);_.bearing=this._map.transform.bearing+o.clamp(k.amount,-179,179),Ru(_,k)}if(f.pitch){const k=Au(f.pitch,v,gl);_.pitch=this._map.transform.pitch+k.amount,Ru(_,k)}if(_.zoom||_.bearing){const k=f.pinchAround===void 0?f.around:f.pinchAround;_.around=k?this._map.unproject(k):this._map.getCenter()}return this.clear(),o.extend(_,{noMoveStart:!0})}}function Ru(y,s){(!y.duration||y.duration<s.duration)&&(y.duration=s.duration,y.easing=s.easing)}function Au(y,s,f){const{maxSpeed:v,linearity:_,deceleration:k}=f,D=o.clamp(y*_/(s/1e3),-v,v),$=Math.abs(D)/(k*_);return{easing:f.easing,duration:1e3*$,amount:D*($/2)}}class uo extends o.Event{constructor(s,f,v,_={}){const k=w.mousePos(f.getCanvasContainer(),v),D=f.unproject(k);super(s,o.extend({point:k,lngLat:D,originalEvent:v},_)),this._defaultPrevented=!1,this.target=f}preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}}class Ou extends o.Event{constructor(s,f,v){const _=s==="touchend"?v.changedTouches:v.touches,k=w.touchPos(f.getCanvasContainer(),_),D=k.map(V=>f.unproject(V)),$=k.reduce((V,W,ee,ie)=>V.add(W.div(ie.length)),new o.pointGeometry(0,0));super(s,{points:k,point:$,lngLats:D,lngLat:f.unproject($),originalEvent:v}),this._defaultPrevented=!1}preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}}class co extends o.Event{constructor(s,f,v){super(s,{originalEvent:v}),this._defaultPrevented=!1}preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}}class T1{constructor(s,f){this._map=s,this._clickTolerance=f.clickTolerance}reset(){delete this._mousedownPos}wheel(s){return this._firePreventable(new co(s.type,this._map,s))}mousedown(s,f){return this._mousedownPos=f,this._firePreventable(new uo(s.type,this._map,s))}mouseup(s){this._map.fire(new uo(s.type,this._map,s))}click(s,f){this._mousedownPos&&this._mousedownPos.dist(f)>=this._clickTolerance||this._map.fire(new uo(s.type,this._map,s))}dblclick(s){return this._firePreventable(new uo(s.type,this._map,s))}mouseover(s){this._map.fire(new uo(s.type,this._map,s))}mouseout(s){this._map.fire(new uo(s.type,this._map,s))}touchstart(s){return this._firePreventable(new Ou(s.type,this._map,s))}touchmove(s){this._map.fire(new Ou(s.type,this._map,s))}touchend(s){this._map.fire(new Ou(s.type,this._map,s))}touchcancel(s){this._map.fire(new Ou(s.type,this._map,s))}_firePreventable(s){if(this._map.fire(s),s.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class qa{constructor(s){this._map=s}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(s){this._map.fire(new uo(s.type,this._map,s))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new uo("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(s){this._delayContextMenu?this._contextMenuEvent=s:this._ignoreContextMenu||this._map.fire(new uo(s.type,this._map,s)),this._map.listens("contextmenu")&&s.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class $m{constructor(s,f){this._map=s,this._el=s.getCanvasContainer(),this._container=s.getContainer(),this._clickTolerance=f.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(s,f){this.isEnabled()&&s.shiftKey&&s.button===0&&(w.disableDrag(),this._startPos=this._lastPos=f,this._active=!0)}mousemoveWindow(s,f){if(!this._active)return;const v=f;if(this._lastPos.equals(v)||!this._box&&v.dist(this._startPos)<this._clickTolerance)return;const _=this._startPos;this._lastPos=v,this._box||(this._box=w.create("div","maplibregl-boxzoom mapboxgl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair","mapboxgl-crosshair"),this._fireEvent("boxzoomstart",s));const k=Math.min(_.x,v.x),D=Math.max(_.x,v.x),$=Math.min(_.y,v.y),V=Math.max(_.y,v.y);w.setTransform(this._box,`translate(${k}px,${$}px)`),this._box.style.width=D-k+"px",this._box.style.height=V-$+"px"}mouseupWindow(s,f){if(!this._active||s.button!==0)return;const v=this._startPos,_=f;if(this.reset(),w.suppressClick(),v.x!==_.x||v.y!==_.y)return this._map.fire(new o.Event("boxzoomend",{originalEvent:s})),{cameraAnimation:k=>k.fitScreenCoordinates(v,_,this._map.getBearing(),{linear:!0})};this._fireEvent("boxzoomcancel",s)}keydown(s){this._active&&s.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",s))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair","mapboxgl-crosshair"),this._box&&(w.remove(this._box),this._box=null),w.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(s,f){return this._map.fire(new o.Event(s,{originalEvent:f}))}}function Pa(y,s){if(y.length!==s.length)throw new Error(`The number of touches and points are not equal - touches ${y.length}, points ${s.length}`);const f={};for(let v=0;v<y.length;v++)f[y[v].identifier]=s[v];return f}class Nu{constructor(s){this.reset(),this.numTouches=s.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(s,f,v){(this.centroid||v.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=s.timeStamp),v.length===this.numTouches&&(this.centroid=function(_){const k=new o.pointGeometry(0,0);for(const D of _)k._add(D);return k.div(_.length)}(f),this.touches=Pa(v,f)))}touchmove(s,f,v){if(this.aborted||!this.centroid)return;const _=Pa(v,f);for(const k in this.touches){const D=this.touches[k],$=_[k];(!$||$.dist(D)>30)&&(this.aborted=!0)}}touchend(s,f,v){if((!this.centroid||s.timeStamp-this.startTime>500)&&(this.aborted=!0),v.length===0){const _=!this.aborted&&this.centroid;if(this.reset(),_)return _}}}class Vf{constructor(s){this.singleTap=new Nu(s),this.numTaps=s.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(s,f,v){this.singleTap.touchstart(s,f,v)}touchmove(s,f,v){this.singleTap.touchmove(s,f,v)}touchend(s,f,v){const _=this.singleTap.touchend(s,f,v);if(_){const k=s.timeStamp-this.lastTime<500,D=!this.lastTap||this.lastTap.dist(_)<30;if(k&&D||this.reset(),this.count++,this.lastTime=s.timeStamp,this.lastTap=_,this.count===this.numTaps)return this.reset(),_}}}class P1{constructor(){this._zoomIn=new Vf({numTouches:1,numTaps:2}),this._zoomOut=new Vf({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(s,f,v){this._zoomIn.touchstart(s,f,v),this._zoomOut.touchstart(s,f,v)}touchmove(s,f,v){this._zoomIn.touchmove(s,f,v),this._zoomOut.touchmove(s,f,v)}touchend(s,f,v){const _=this._zoomIn.touchend(s,f,v),k=this._zoomOut.touchend(s,f,v);return _?(this._active=!0,s.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:D=>D.easeTo({duration:300,zoom:D.getZoom()+1,around:D.unproject(_)},{originalEvent:s})}):k?(this._active=!0,s.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:D=>D.easeTo({duration:300,zoom:D.getZoom()-1,around:D.unproject(k)},{originalEvent:s})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}const I1={0:1,2:2};class Hc{constructor(s){this.reset(),this._clickTolerance=s.clickTolerance||1}reset(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton}_correctButton(s,f){return!1}_move(s,f){return{}}mousedown(s,f){if(this._lastPoint)return;const v=w.mouseButton(s);this._correctButton(s,v)&&(this._lastPoint=f,this._eventButton=v)}mousemoveWindow(s,f){const v=this._lastPoint;if(v){if(s.preventDefault(),function(_,k){const D=I1[k];return _.buttons===void 0||(_.buttons&D)!==D}(s,this._eventButton))this.reset();else if(this._moved||!(f.dist(v)<this._clickTolerance))return this._moved=!0,this._lastPoint=f,this._move(v,f)}}mouseupWindow(s){this._lastPoint&&w.mouseButton(s)===this._eventButton&&(this._moved&&w.suppressClick(),this.reset())}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Du extends Hc{mousedown(s,f){super.mousedown(s,f),this._lastPoint&&(this._active=!0)}_correctButton(s,f){return f===0&&!s.ctrlKey}_move(s,f){return{around:f,panDelta:f.sub(s)}}}class Ia extends Hc{_correctButton(s,f){return f===0&&s.ctrlKey||f===2}_move(s,f){const v=.8*(f.x-s.x);if(v)return this._active=!0,{bearingDelta:v}}contextmenu(s){s.preventDefault()}}class fn extends Hc{_correctButton(s,f){return f===0&&s.ctrlKey||f===2}_move(s,f){const v=-.5*(f.y-s.y);if(v)return this._active=!0,{pitchDelta:v}}contextmenu(s){s.preventDefault()}}class Bm{constructor(s,f){this._minTouches=s.cooperativeGestures?2:1,this._clickTolerance=s.clickTolerance||1,this._map=f,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new o.pointGeometry(0,0),setTimeout(()=>{this._cancelCooperativeMessage=!1},200)}touchstart(s,f,v){return this._calculateTransform(s,f,v)}touchmove(s,f,v){if(this._map._cooperativeGestures&&(this._minTouches===2&&v.length<2&&!this._cancelCooperativeMessage?this._map._onCooperativeGesture(s,!1,v.length):this._cancelCooperativeMessage||(this._cancelCooperativeMessage=!0)),this._active&&!(v.length<this._minTouches))return s.preventDefault(),this._calculateTransform(s,f,v)}touchend(s,f,v){this._calculateTransform(s,f,v),this._active&&v.length<this._minTouches&&this.reset()}touchcancel(){this.reset()}_calculateTransform(s,f,v){v.length>0&&(this._active=!0);const _=Pa(v,f),k=new o.pointGeometry(0,0),D=new o.pointGeometry(0,0);let $=0;for(const W in _){const ee=_[W],ie=this._touches[W];ie&&(k._add(ee),D._add(ee.sub(ie)),$++,_[W]=ee)}if(this._touches=_,$<this._minTouches||!D.mag())return;const V=D.div($);return this._sum._add(V),this._sum.mag()<this._clickTolerance?void 0:{around:k.div($),panDelta:V}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Cs{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}_start(s){}_move(s,f,v){return{}}touchstart(s,f,v){this._firstTwoTouches||v.length<2||(this._firstTwoTouches=[v[0].identifier,v[1].identifier],this._start([f[0],f[1]]))}touchmove(s,f,v){if(!this._firstTwoTouches)return;s.preventDefault();const[_,k]=this._firstTwoTouches,D=Za(v,f,_),$=Za(v,f,k);if(!D||!$)return;const V=this._aroundCenter?null:D.add($).div(2);return this._move([D,$],V,s)}touchend(s,f,v){if(!this._firstTwoTouches)return;const[_,k]=this._firstTwoTouches,D=Za(v,f,_),$=Za(v,f,k);D&&$||(this._active&&w.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(s){this._enabled=!0,this._aroundCenter=!!s&&s.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}function Za(y,s,f){for(let v=0;v<y.length;v++)if(y[v].identifier===f)return s[v]}function Uf(y,s){return Math.log(y/s)/Math.LN2}class Jt extends Cs{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(s){this._startDistance=this._distance=s[0].dist(s[1])}_move(s,f){const v=this._distance;if(this._distance=s[0].dist(s[1]),this._active||!(Math.abs(Uf(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Uf(this._distance,v),pinchAround:f}}}function Wc(y,s){return 180*y.angleWith(s)/Math.PI}class M1 extends Cs{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(s){this._startVector=this._vector=s[0].sub(s[1]),this._minDiameter=s[0].dist(s[1])}_move(s,f){const v=this._vector;if(this._vector=s[0].sub(s[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Wc(this._vector,v),pinchAround:f}}_isBelowThreshold(s){this._minDiameter=Math.min(this._minDiameter,s.mag());const f=25/(Math.PI*this._minDiameter)*360,v=Wc(s,this._startVector);return Math.abs(v)<f}}function jf(y){return Math.abs(y.y)>Math.abs(y.x)}class Kf extends Cs{constructor(s){super(),this._map=s}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(s,f,v){super.touchstart(s,f,v),this._currentTouchCount=v.length}_start(s){this._lastPoints=s,jf(s[0].sub(s[1]))&&(this._valid=!1)}_move(s,f,v){if(this._map._cooperativeGestures&&this._currentTouchCount<3)return;const _=s[0].sub(this._lastPoints[0]),k=s[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(_,k,v.timeStamp),this._valid?(this._lastPoints=s,this._active=!0,{pitchDelta:(_.y+k.y)/2*-.5}):void 0}gestureBeginsVertically(s,f,v){if(this._valid!==void 0)return this._valid;const _=s.mag()>=2,k=f.mag()>=2;if(!_&&!k)return;if(!_||!k)return this._firstMove===void 0&&(this._firstMove=v),v-this._firstMove<100&&void 0;const D=s.y>0==f.y>0;return jf(s)&&jf(f)&&D}}const Vm={panStep:100,bearingStep:15,pitchStep:10};class Um{constructor(){const s=Vm;this._panStep=s.panStep,this._bearingStep=s.bearingStep,this._pitchStep=s.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(s){if(s.altKey||s.ctrlKey||s.metaKey)return;let f=0,v=0,_=0,k=0,D=0;switch(s.keyCode){case 61:case 107:case 171:case 187:f=1;break;case 189:case 109:case 173:f=-1;break;case 37:s.shiftKey?v=-1:(s.preventDefault(),k=-1);break;case 39:s.shiftKey?v=1:(s.preventDefault(),k=1);break;case 38:s.shiftKey?_=1:(s.preventDefault(),D=-1);break;case 40:s.shiftKey?_=-1:(s.preventDefault(),D=1);break;default:return}return this._rotationDisabled&&(v=0,_=0),{cameraAnimation:$=>{const V=$.getZoom();$.easeTo({duration:300,easeId:"keyboardHandler",easing:R1,zoom:f?Math.round(V)+f*(s.shiftKey?2:1):V,bearing:$.getBearing()+v*this._bearingStep,pitch:$.getPitch()+_*this._pitchStep,offset:[-k*this._panStep,-D*this._panStep],center:$.getCenter()},{originalEvent:s})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function R1(y){return y*(2-y)}const jm=4.000244140625;class Hf{constructor(s,f){this._map=s,this._el=s.getCanvasContainer(),this._handler=f,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222,o.bindAll(["_onTimeout"],this)}setZoomRate(s){this._defaultZoomRate=s}setWheelZoomRate(s){this._wheelZoomRate=s}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(s){this.isEnabled()||(this._enabled=!0,this._aroundCenter=s&&s.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}wheel(s){if(!this.isEnabled())return;if(this._map._cooperativeGestures){if(!this._map._metaPress)return;s.preventDefault()}let f=s.deltaMode===WheelEvent.DOM_DELTA_LINE?40*s.deltaY:s.deltaY;const v=o.exported.now(),_=v-(this._lastWheelEventTime||0);this._lastWheelEventTime=v,f!==0&&f%jm==0?this._type="wheel":f!==0&&Math.abs(f)<4?this._type="trackpad":_>400?(this._type=null,this._lastValue=f,this._timeout=setTimeout(this._onTimeout,40,s)):this._type||(this._type=Math.abs(_*f)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,f+=this._lastValue)),s.shiftKey&&f&&(f/=4),this._type&&(this._lastWheelEvent=s,this._delta-=f,this._active||this._start(s)),s.preventDefault()}_onTimeout(s){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(s)}_start(s){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const f=w.mousePos(this._el,s);this._around=o.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(f)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const s=this._map.transform;if(this._delta!==0){const $=this._type==="wheel"&&Math.abs(this._delta)>jm?this._wheelZoomRate:this._defaultZoomRate;let V=2/(1+Math.exp(-Math.abs(this._delta*$)));this._delta<0&&V!==0&&(V=1/V);const W=typeof this._targetZoom=="number"?s.zoomScale(this._targetZoom):s.scale;this._targetZoom=Math.min(s.maxZoom,Math.max(s.minZoom,s.scaleZoom(W*V))),this._type==="wheel"&&(this._startZoom=s.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const f=typeof this._targetZoom=="number"?this._targetZoom:s.zoom,v=this._startZoom,_=this._easing;let k,D=!1;if(this._type==="wheel"&&v&&_){const $=Math.min((o.exported.now()-this._lastWheelEventTime)/200,1),V=_($);k=o.number(v,f,V),$<1?this._frameId||(this._frameId=!0):D=!0}else k=f,D=!0;return this._active=!0,D&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._handler._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!D,zoomDelta:k-s.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(s){let f=o.ease;if(this._prevEase){const v=this._prevEase,_=(o.exported.now()-v.start)/v.duration,k=v.easing(_+.01)-v.easing(_),D=.27/Math.sqrt(k*k+1e-4)*.01,$=Math.sqrt(.0729-D*D);f=o.bezier(D,$,.25,1)}return this._prevEase={start:o.exported.now(),duration:s,easing:f},f}reset(){this._active=!1}}class Wf{constructor(s,f){this._clickZoom=s,this._tapZoom=f}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Gf{constructor(){this.reset()}reset(){this._active=!1}dblclick(s,f){return s.preventDefault(),{cameraAnimation:v=>{v.easeTo({duration:300,zoom:v.getZoom()+(s.shiftKey?-1:1),around:v.unproject(f)},{originalEvent:s})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class qf{constructor(){this._tap=new Vf({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()}touchstart(s,f,v){this._swipePoint||(this._tapTime&&s.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?v.length>0&&(this._swipePoint=f[0],this._swipeTouch=v[0].identifier):this._tap.touchstart(s,f,v))}touchmove(s,f,v){if(this._tapTime){if(this._swipePoint){if(v[0].identifier!==this._swipeTouch)return;const _=f[0],k=_.y-this._swipePoint.y;return this._swipePoint=_,s.preventDefault(),this._active=!0,{zoomDelta:k/128}}}else this._tap.touchmove(s,f,v)}touchend(s,f,v){this._tapTime?this._swipePoint&&v.length===0&&this.reset():this._tap.touchend(s,f,v)&&(this._tapTime=s.timeStamp)}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Yi{constructor(s,f,v){this._el=s,this._mousePan=f,this._touchPan=v}enable(s){this._inertiaOptions=s||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan","mapboxgl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan","mapboxgl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Xa{constructor(s,f,v){this._pitchWithRotate=s.pitchWithRotate,this._mouseRotate=f,this._mousePitch=v}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class Km{constructor(s,f,v,_){this._el=s,this._touchZoom=f,this._touchRotate=v,this._tapDragZoom=_,this._rotationDisabled=!1,this._enabled=!0}enable(s){this._touchZoom.enable(s),this._rotationDisabled||this._touchRotate.enable(s),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate","mapboxgl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate","mapboxgl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}const yl=y=>y.zoom||y.drag||y.pitch||y.rotate;class Zf extends o.Event{}function Lu(y){return y.panDelta&&y.panDelta.mag()||y.zoomDelta||y.bearingDelta||y.pitchDelta}class Hm{constructor(s,f){this._map=s,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Fm(s),this._bearingSnap=f.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(f),o.bindAll(["handleEvent","handleWindowEvent"],this);const v=this._el;this._listeners=[[v,"touchstart",{passive:!0}],[v,"touchmove",{passive:!1}],[v,"touchend",void 0],[v,"touchcancel",void 0],[v,"mousedown",void 0],[v,"mousemove",void 0],[v,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[v,"mouseover",void 0],[v,"mouseout",void 0],[v,"dblclick",void 0],[v,"click",void 0],[v,"keydown",{capture:!1}],[v,"keyup",void 0],[v,"wheel",{passive:!1}],[v,"contextmenu",void 0],[window,"blur",void 0]];for(const[_,k,D]of this._listeners)w.addEventListener(_,k,_===document?this.handleWindowEvent:this.handleEvent,D)}destroy(){for(const[s,f,v]of this._listeners)w.removeEventListener(s,f,s===document?this.handleWindowEvent:this.handleEvent,v)}_addDefaultHandlers(s){const f=this._map,v=f.getCanvasContainer();this._add("mapEvent",new T1(f,s));const _=f.boxZoom=new $m(f,s);this._add("boxZoom",_);const k=new P1,D=new Gf;f.doubleClickZoom=new Wf(D,k),this._add("tapZoom",k),this._add("clickZoom",D);const $=new qf;this._add("tapDragZoom",$);const V=f.touchPitch=new Kf(f);this._add("touchPitch",V);const W=new Ia(s),ee=new fn(s);f.dragRotate=new Xa(s,W,ee),this._add("mouseRotate",W,["mousePitch"]),this._add("mousePitch",ee,["mouseRotate"]);const ie=new Du(s),fe=new Bm(s,f);f.dragPan=new Yi(v,ie,fe),this._add("mousePan",ie),this._add("touchPan",fe,["touchZoom","touchRotate"]);const Se=new M1,_e=new Jt;f.touchZoomRotate=new Km(v,_e,Se,$),this._add("touchRotate",Se,["touchPan","touchZoom"]),this._add("touchZoom",_e,["touchPan","touchRotate"]);const we=f.scrollZoom=new Hf(f,this);this._add("scrollZoom",we,["mousePan"]);const $e=f.keyboard=new Um;this._add("keyboard",$e),this._add("blockableMapEvent",new qa(f));for(const je of["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"])s.interactive&&s[je]&&f[je].enable(s[je])}_add(s,f,v){this._handlers.push({handlerName:s,handler:f,allowed:v}),this._handlersById[s]=f}stop(s){if(!this._updatingCamera){for(const{handler:f}of this._handlers)f.reset();this._inertia.clear(),this._fireEvents({},{},s),this._changes=[]}}isActive(){for(const{handler:s}of this._handlers)if(s.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return Boolean(yl(this._eventsInProgress))||this.isZooming()}_blockedByActive(s,f,v){for(const _ in s)if(_!==v&&(!f||f.indexOf(_)<0))return!0;return!1}handleWindowEvent(s){this.handleEvent(s,`${s.type}Window`)}_getMapTouches(s){const f=[];for(const v of s)this._el.contains(v.target)&&f.push(v);return f}handleEvent(s,f){if(s.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const v=s.type==="renderFrame"?void 0:s,_={needsRenderFrame:!1},k={},D={},$=s.touches,V=$?this._getMapTouches($):void 0,W=V?w.touchPos(this._el,V):w.mousePos(this._el,s);for(const{handlerName:fe,handler:Se,allowed:_e}of this._handlers){if(!Se.isEnabled())continue;let we;this._blockedByActive(D,_e,fe)?Se.reset():Se[f||s.type]&&(we=Se[f||s.type](s,W,V),this.mergeHandlerResult(_,k,we,fe,v),we&&we.needsRenderFrame&&this._triggerRenderFrame()),(we||Se.isActive())&&(D[fe]=Se)}const ee={};for(const fe in this._previousActiveHandlers)D[fe]||(ee[fe]=v);this._previousActiveHandlers=D,(Object.keys(ee).length||Lu(_))&&(this._changes.push([_,k,ee]),this._triggerRenderFrame()),(Object.keys(D).length||Lu(_))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:ie}=_;ie&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],ie(this._map))}mergeHandlerResult(s,f,v,_,k){if(!v)return;o.extend(s,v);const D={handlerName:_,originalEvent:v.originalEvent||k};v.zoomDelta!==void 0&&(f.zoom=D),v.panDelta!==void 0&&(f.drag=D),v.pitchDelta!==void 0&&(f.pitch=D),v.bearingDelta!==void 0&&(f.rotate=D)}_applyChanges(){const s={},f={},v={};for(const[_,k,D]of this._changes)_.panDelta&&(s.panDelta=(s.panDelta||new o.pointGeometry(0,0))._add(_.panDelta)),_.zoomDelta&&(s.zoomDelta=(s.zoomDelta||0)+_.zoomDelta),_.bearingDelta&&(s.bearingDelta=(s.bearingDelta||0)+_.bearingDelta),_.pitchDelta&&(s.pitchDelta=(s.pitchDelta||0)+_.pitchDelta),_.around!==void 0&&(s.around=_.around),_.pinchAround!==void 0&&(s.pinchAround=_.pinchAround),_.noInertia&&(s.noInertia=_.noInertia),o.extend(f,k),o.extend(v,D);this._updateMapTransform(s,f,v),this._changes=[]}_updateMapTransform(s,f,v){const _=this._map,k=_.transform,D=_.style&&_.style.terrain;if(!(Lu(s)||D&&this._drag))return this._fireEvents(f,v,!0);let{panDelta:$,zoomDelta:V,bearingDelta:W,pitchDelta:ee,around:ie,pinchAround:fe}=s;fe!==void 0&&(ie=fe),_._stop(!0),ie=ie||_.transform.centerPoint;const Se=k.pointLocation($?ie.sub($):ie);W&&(k.bearing+=W),ee&&(k.pitch+=ee),V&&(k.zoom+=V),D?f.drag&&!this._drag?(this._drag={center:k.centerPoint,lngLat:k.pointLocation(ie),point:ie,handlerName:f.drag.handlerName},_.fire(new o.Event("freezeElevation",{freeze:!0}))):this._drag&&v[this._drag.handlerName]?(_.fire(new o.Event("freezeElevation",{freeze:!1})),this._drag=null):f.drag&&this._drag&&(k.center=k.pointLocation(k.centerPoint.sub($))):k.setLocationAtPoint(Se,ie),this._map._update(),s.noInertia||this._inertia.record(s),this._fireEvents(f,v,!0)}_fireEvents(s,f,v){const _=yl(this._eventsInProgress),k=yl(s),D={};for(const ee in s){const{originalEvent:ie}=s[ee];this._eventsInProgress[ee]||(D[`${ee}start`]=ie),this._eventsInProgress[ee]=s[ee]}!_&&k&&this._fireEvent("movestart",k.originalEvent);for(const ee in D)this._fireEvent(ee,D[ee]);k&&this._fireEvent("move",k.originalEvent);for(const ee in s){const{originalEvent:ie}=s[ee];this._fireEvent(ee,ie)}const $={};let V;for(const ee in this._eventsInProgress){const{handlerName:ie,originalEvent:fe}=this._eventsInProgress[ee];this._handlersById[ie].isActive()||(delete this._eventsInProgress[ee],V=f[ie]||fe,$[`${ee}end`]=V)}for(const ee in $)this._fireEvent(ee,$[ee]);const W=yl(this._eventsInProgress);if(v&&(_||k)&&!W){this._updatingCamera=!0;const ee=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),ie=fe=>fe!==0&&-this._bearingSnap<fe&&fe<this._bearingSnap;ee?(ie(ee.bearing||this._map.getBearing())&&(ee.bearing=0),this._map.easeTo(ee,{originalEvent:V})):(this._map.fire(new o.Event("moveend",{originalEvent:V})),ie(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}}_fireEvent(s,f){this._map.fire(new o.Event(s,f?{originalEvent:f}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(s=>{delete this._frameId,this.handleEvent(new Zf("renderFrame",{timeStamp:s})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}const ko={extend:(y,...s)=>o.extend(y,...s),run(y){y()},logToElement(y,s=!1,f="log"){const v=window.document.getElementById(f);v&&(s&&(v.innerHTML=""),v.innerHTML+=`<br>${y}`)}};class Rr extends o.Evented{constructor(s,f){super(),this._moving=!1,this._zooming=!1,this.transform=s,this._bearingSnap=f.bearingSnap,o.bindAll(["_renderFrameCallback"],this)}getCenter(){return new o.LngLat(this.transform.center.lng,this.transform.center.lat)}setCenter(s,f){return this.jumpTo({center:s},f)}panBy(s,f,v){return s=o.pointGeometry.convert(s).mult(-1),this.panTo(this.transform.center,o.extend({offset:s},f),v)}panTo(s,f,v){return this.easeTo(o.extend({center:s},f),v)}getZoom(){return this.transform.zoom}setZoom(s,f){return this.jumpTo({zoom:s},f),this}zoomTo(s,f,v){return this.easeTo(o.extend({zoom:s},f),v)}zoomIn(s,f){return this.zoomTo(this.getZoom()+1,s,f),this}zoomOut(s,f){return this.zoomTo(this.getZoom()-1,s,f),this}getBearing(){return this.transform.bearing}setBearing(s,f){return this.jumpTo({bearing:s},f),this}getPadding(){return this.transform.padding}setPadding(s,f){return this.jumpTo({padding:s},f),this}rotateTo(s,f,v){return this.easeTo(o.extend({bearing:s},f),v)}resetNorth(s,f){return this.rotateTo(0,o.extend({duration:1e3},s),f),this}resetNorthPitch(s,f){return this.easeTo(o.extend({bearing:0,pitch:0,duration:1e3},s),f),this}snapToNorth(s,f){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(s,f):this}getPitch(){return this.transform.pitch}setPitch(s,f){return this.jumpTo({pitch:s},f),this}cameraForBounds(s,f){s=o.LngLatBounds.convert(s);const v=f&&f.bearing||0;return this._cameraForBoxAndBearing(s.getNorthWest(),s.getSouthEast(),v,f)}_cameraForBoxAndBearing(s,f,v,_){const k={top:0,bottom:0,right:0,left:0};if(typeof(_=o.extend({padding:k,offset:[0,0],maxZoom:this.transform.maxZoom},_)).padding=="number"){const nt=_.padding;_.padding={top:nt,bottom:nt,right:nt,left:nt}}_.padding=o.extend(k,_.padding);const D=this.transform,$=D.padding,V=D.project(o.LngLat.convert(s)),W=D.project(o.LngLat.convert(f)),ee=V.rotate(-v*Math.PI/180),ie=W.rotate(-v*Math.PI/180),fe=new o.pointGeometry(Math.max(ee.x,ie.x),Math.max(ee.y,ie.y)),Se=new o.pointGeometry(Math.min(ee.x,ie.x),Math.min(ee.y,ie.y)),_e=fe.sub(Se),we=(D.width-($.left+$.right+_.padding.left+_.padding.right))/_e.x,$e=(D.height-($.top+$.bottom+_.padding.top+_.padding.bottom))/_e.y;if($e<0||we<0)return void o.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const je=Math.min(D.scaleZoom(D.scale*Math.min(we,$e)),_.maxZoom),et=o.pointGeometry.convert(_.offset),Pe=new o.pointGeometry((_.padding.left-_.padding.right)/2,(_.padding.top-_.padding.bottom)/2).rotate(v*Math.PI/180),at=et.add(Pe).mult(D.scale/D.zoomScale(je));return{center:D.unproject(V.add(W).div(2).sub(at)),zoom:je,bearing:v}}fitBounds(s,f,v){return this._fitInternal(this.cameraForBounds(s,f),f,v)}fitScreenCoordinates(s,f,v,_,k){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(o.pointGeometry.convert(s)),this.transform.pointLocation(o.pointGeometry.convert(f)),v,_),_,k)}_fitInternal(s,f,v){return s?(delete(f=o.extend(s,f)).padding,f.linear?this.easeTo(f,v):this.flyTo(f,v)):this}jumpTo(s,f){this.stop();const v=this.transform;let _=!1,k=!1,D=!1;return"zoom"in s&&v.zoom!==+s.zoom&&(_=!0,v.zoom=+s.zoom),s.center!==void 0&&(v.center=o.LngLat.convert(s.center)),"bearing"in s&&v.bearing!==+s.bearing&&(k=!0,v.bearing=+s.bearing),"pitch"in s&&v.pitch!==+s.pitch&&(D=!0,v.pitch=+s.pitch),s.padding==null||v.isPaddingEqual(s.padding)||(v.padding=s.padding),this.fire(new o.Event("movestart",f)).fire(new o.Event("move",f)),_&&this.fire(new o.Event("zoomstart",f)).fire(new o.Event("zoom",f)).fire(new o.Event("zoomend",f)),k&&this.fire(new o.Event("rotatestart",f)).fire(new o.Event("rotate",f)).fire(new o.Event("rotateend",f)),D&&this.fire(new o.Event("pitchstart",f)).fire(new o.Event("pitch",f)).fire(new o.Event("pitchend",f)),this.fire(new o.Event("moveend",f))}calculateCameraOptionsFromTo(s,f,v,_=0){const k=o.MercatorCoordinate.fromLngLat(s,f),D=o.MercatorCoordinate.fromLngLat(v,_),$=D.x-k.x,V=D.y-k.y,W=D.z-k.z,ee=Math.hypot($,V,W);if(ee===0)throw new Error("Can't calculate camera options with same From and To");const ie=Math.hypot($,V),fe=this.transform.scaleZoom(this.transform.cameraToCenterDistance/ee/this.transform.tileSize),Se=180*Math.atan2($,-V)/Math.PI;let _e=180*Math.acos(ie/ee)/Math.PI;return _e=W<0?90-_e:90+_e,{center:D.toLngLat(),zoom:fe,pitch:_e,bearing:Se}}easeTo(s,f){this._stop(!1,s.easeId),((s=o.extend({offset:[0,0],duration:500,easing:o.ease},s)).animate===!1||!s.essential&&o.exported.prefersReducedMotion)&&(s.duration=0);const v=this.transform,_=this.getZoom(),k=this.getBearing(),D=this.getPitch(),$=this.getPadding(),V="zoom"in s?+s.zoom:_,W="bearing"in s?this._normalizeBearing(s.bearing,k):k,ee="pitch"in s?+s.pitch:D,ie="padding"in s?s.padding:v.padding,fe=o.pointGeometry.convert(s.offset);let Se=v.centerPoint.add(fe);const _e=v.pointLocation(Se),we=o.LngLat.convert(s.center||_e);this._normalizeCenter(we);const $e=v.project(_e),je=v.project(we).sub($e),et=v.zoomScale(V-_);let Pe,at;s.around&&(Pe=o.LngLat.convert(s.around),at=v.locationPoint(Pe));const nt={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||V!==_,this._rotating=this._rotating||k!==W,this._pitching=this._pitching||ee!==D,this._padding=!v.isPaddingEqual(ie),this._easeId=s.easeId,this._prepareEase(f,s.noMoveStart,nt),this._ease(gt=>{if(this._zooming&&(v.zoom=o.number(_,V,gt)),this._rotating&&(v.bearing=o.number(k,W,gt)),this._pitching&&(v.pitch=o.number(D,ee,gt)),this._padding&&(v.interpolatePadding($,ie,gt),Se=v.centerPoint.add(fe)),Pe)v.setLocationAtPoint(Pe,at);else{const yt=v.zoomScale(v.zoom-_),Dt=V>_?Math.min(2,et):Math.max(.5,et),vt=Math.pow(Dt,1-gt),rn=v.unproject($e.add(je.mult(gt*vt)).mult(yt));v.setLocationAtPoint(v.renderWorldCopies?rn.wrap():rn,Se)}this._fireMoveEvents(f)},gt=>{this._afterEase(f,gt)},s),this}_prepareEase(s,f,v={}){this._moving=!0,this.fire(new o.Event("freezeElevation",{freeze:!0})),f||v.moving||this.fire(new o.Event("movestart",s)),this._zooming&&!v.zooming&&this.fire(new o.Event("zoomstart",s)),this._rotating&&!v.rotating&&this.fire(new o.Event("rotatestart",s)),this._pitching&&!v.pitching&&this.fire(new o.Event("pitchstart",s))}_fireMoveEvents(s){this.fire(new o.Event("move",s)),this._zooming&&this.fire(new o.Event("zoom",s)),this._rotating&&this.fire(new o.Event("rotate",s)),this._pitching&&this.fire(new o.Event("pitch",s))}_afterEase(s,f){if(this._easeId&&f&&this._easeId===f)return;delete this._easeId,this.fire(new o.Event("freezeElevation",{freeze:!1}));const v=this._zooming,_=this._rotating,k=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,v&&this.fire(new o.Event("zoomend",s)),_&&this.fire(new o.Event("rotateend",s)),k&&this.fire(new o.Event("pitchend",s)),this.fire(new o.Event("moveend",s))}flyTo(s,f){if(!s.essential&&o.exported.prefersReducedMotion){const bn=o.pick(s,["center","zoom","bearing","pitch","around"]);return this.jumpTo(bn,f)}this.stop(),s=o.extend({offset:[0,0],speed:1.2,curve:1.42,easing:o.ease},s);const v=this.transform,_=this.getZoom(),k=this.getBearing(),D=this.getPitch(),$=this.getPadding(),V="zoom"in s?o.clamp(+s.zoom,v.minZoom,v.maxZoom):_,W="bearing"in s?this._normalizeBearing(s.bearing,k):k,ee="pitch"in s?+s.pitch:D,ie="padding"in s?s.padding:v.padding,fe=v.zoomScale(V-_),Se=o.pointGeometry.convert(s.offset);let _e=v.centerPoint.add(Se);const we=v.pointLocation(_e),$e=o.LngLat.convert(s.center||we);this._normalizeCenter($e);const je=v.project(we),et=v.project($e).sub(je);let Pe=s.curve;const at=Math.max(v.width,v.height),nt=at/fe,gt=et.mag();if("minZoom"in s){const bn=o.clamp(Math.min(s.minZoom,_,V),v.minZoom,v.maxZoom),cr=at/v.zoomScale(bn-_);Pe=Math.sqrt(cr/gt*2)}const yt=Pe*Pe;function Dt(bn){const cr=(nt*nt-at*at+(bn?-1:1)*yt*yt*gt*gt)/(2*(bn?nt:at)*yt*gt);return Math.log(Math.sqrt(cr*cr+1)-cr)}function vt(bn){return(Math.exp(bn)-Math.exp(-bn))/2}function rn(bn){return(Math.exp(bn)+Math.exp(-bn))/2}const qt=Dt(0);let ln=function(bn){return rn(qt)/rn(qt+Pe*bn)},Dn=function(bn){return at*((rn(qt)*(vt(cr=qt+Pe*bn)/rn(cr))-vt(qt))/yt)/gt;var cr},Vn=(Dt(1)-qt)/Pe;if(Math.abs(gt)<1e-6||!isFinite(Vn)){if(Math.abs(at-nt)<1e-6)return this.easeTo(s,f);const bn=nt<at?-1:1;Vn=Math.abs(Math.log(nt/at))/Pe,Dn=function(){return 0},ln=function(cr){return Math.exp(bn*Pe*cr)}}return s.duration="duration"in s?+s.duration:1e3*Vn/("screenSpeed"in s?+s.screenSpeed/Pe:+s.speed),s.maxDuration&&s.duration>s.maxDuration&&(s.duration=0),this._zooming=!0,this._rotating=k!==W,this._pitching=ee!==D,this._padding=!v.isPaddingEqual(ie),this._prepareEase(f,!1),this._ease(bn=>{const cr=bn*Vn,dr=1/ln(cr);v.zoom=bn===1?V:_+v.scaleZoom(dr),this._rotating&&(v.bearing=o.number(k,W,bn)),this._pitching&&(v.pitch=o.number(D,ee,bn)),this._padding&&(v.interpolatePadding($,ie,bn),_e=v.centerPoint.add(Se));const Qn=bn===1?$e:v.unproject(je.add(et.mult(Dn(cr))).mult(dr));v.setLocationAtPoint(v.renderWorldCopies?Qn.wrap():Qn,_e),this._fireMoveEvents(f)},()=>this._afterEase(f),s),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(s,f){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const v=this._onEaseEnd;delete this._onEaseEnd,v.call(this,f)}if(!s){const v=this.handlers;v&&v.stop(!1)}return this}_ease(s,f,v){v.animate===!1||v.duration===0?(s(1),f()):(this._easeStart=o.exported.now(),this._easeOptions=v,this._onEaseFrame=s,this._onEaseEnd=f,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_renderFrameCallback(){const s=Math.min((o.exported.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(s)),s<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()}_normalizeBearing(s,f){s=o.wrap(s,-180,180);const v=Math.abs(s-f);return Math.abs(s-360-f)<v&&(s-=360),Math.abs(s+360-f)<v&&(s+=360),s}_normalizeCenter(s){const f=this.transform;if(!f.renderWorldCopies||f.lngRange)return;const v=s.lng-f.center.lng;s.lng+=v>180?-360:v<-180?360:0}}class zu{constructor(s={}){this.options=s,o.bindAll(["_toggleAttribution","_updateData","_updateCompact","_updateCompactMinimize"],this)}getDefaultPosition(){return"bottom-right"}onAdd(s){return this._map=s,this._compact=this.options&&this.options.compact,this._container=w.create("details","maplibregl-ctrl maplibregl-ctrl-attrib mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=w.create("summary","maplibregl-ctrl-attrib-button mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=w.create("div","maplibregl-ctrl-attrib-inner mapboxgl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){w.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(s,f){const v=this._map._getUIString(`AttributionControl.${f}`);s.title=v,s.setAttribute("aria-label",v)}_toggleAttribution(){this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show","mapboxgl-compact-show")):(this._container.classList.add("maplibregl-compact-show","mapboxgl-compact-show"),this._container.removeAttribute("open")))}_updateData(s){!s||s.sourceDataType!=="metadata"&&s.sourceDataType!=="visibility"&&s.dataType!=="style"&&s.type!=="terrain"||this._updateAttributions()}_updateAttributions(){if(!this._map.style)return;let s=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?s=s.concat(this.options.customAttribution.map(_=>typeof _!="string"?"":_)):typeof this.options.customAttribution=="string"&&s.push(this.options.customAttribution)),this._map.style.stylesheet){const _=this._map.style.stylesheet;this.styleOwner=_.owner,this.styleId=_.id}const f=this._map.style.sourceCaches;for(const _ in f){const k=f[_];if(k.used||k.usedForTerrain){const D=k.getSource();D.attribution&&s.indexOf(D.attribution)<0&&s.push(D.attribution)}}s=s.filter(_=>String(_).trim()),s.sort((_,k)=>_.length-k.length),s=s.filter((_,k)=>{for(let D=k+1;D<s.length;D++)if(s[D].indexOf(_)>=0)return!1;return!0});const v=s.join(" | ");v!==this._attribHTML&&(this._attribHTML=v,s.length?(this._innerContainer.innerHTML=v,this._container.classList.remove("maplibregl-attrib-empty","mapboxgl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty","mapboxgl-attrib-empty"),this._updateCompact(),this._editLink=null)}_updateCompact(){this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","mapboxgl-compact","maplibregl-compact-show","mapboxgl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show","mapboxgl-compact","mapboxgl-compact-show"))}_updateCompactMinimize(){this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show","mapboxgl-compact-show")}}class Gc{constructor(s={}){this.options=s,o.bindAll(["_updateCompact"],this)}getDefaultPosition(){return"bottom-left"}onAdd(s){this._map=s,this._compact=this.options&&this.options.compact,this._container=w.create("div","maplibregl-ctrl mapboxgl-ctrl");const f=w.create("a","maplibregl-ctrl-logo mapboxgl-ctrl-logo");return f.target="_blank",f.rel="noopener nofollow",f.href="https://maplibre.org/",f.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),f.setAttribute("rel","noopener nofollow"),this._container.appendChild(f),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){w.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}_updateCompact(){const s=this._container.children;if(s.length){const f=s[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&f.classList.add("maplibregl-compact","mapboxgl-compact"):f.classList.remove("maplibregl-compact","mapboxgl-compact")}}}class Wm{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(s){const f=++this._id;return this._queue.push({callback:s,id:f,cancelled:!1}),f}remove(s){const f=this._currentlyRunning,v=f?this._queue.concat(f):this._queue;for(const _ of v)if(_.id===s)return void(_.cancelled=!0)}run(s=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const f=this._currentlyRunning=this._queue;this._queue=[];for(const v of f)if(!v.cancelled&&(v.callback(s),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}const Gm={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.enableTerrain":"Enable terrain","TerrainControl.disableTerrain":"Disable terrain"},qm={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:void 0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,fadeDuration:300,crossSourceCollisions:!0},A1={showCompass:!0,showZoom:!0,visualizePitch:!1};class ia{constructor(s,f,v=!1){this._clickTolerance=10,this.element=f,this.mouseRotate=new Ia({clickTolerance:s.dragRotate._mouseRotate._clickTolerance}),this.map=s,v&&(this.mousePitch=new fn({clickTolerance:s.dragRotate._mousePitch._clickTolerance})),o.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),w.addEventListener(f,"mousedown",this.mousedown),w.addEventListener(f,"touchstart",this.touchstart,{passive:!1}),w.addEventListener(f,"touchmove",this.touchmove),w.addEventListener(f,"touchend",this.touchend),w.addEventListener(f,"touchcancel",this.reset)}down(s,f){this.mouseRotate.mousedown(s,f),this.mousePitch&&this.mousePitch.mousedown(s,f),w.disableDrag()}move(s,f){const v=this.map,_=this.mouseRotate.mousemoveWindow(s,f);if(_&&_.bearingDelta&&v.setBearing(v.getBearing()+_.bearingDelta),this.mousePitch){const k=this.mousePitch.mousemoveWindow(s,f);k&&k.pitchDelta&&v.setPitch(v.getPitch()+k.pitchDelta)}}off(){const s=this.element;w.removeEventListener(s,"mousedown",this.mousedown),w.removeEventListener(s,"touchstart",this.touchstart,{passive:!1}),w.removeEventListener(s,"touchmove",this.touchmove),w.removeEventListener(s,"touchend",this.touchend),w.removeEventListener(s,"touchcancel",this.reset),this.offTemp()}offTemp(){w.enableDrag(),w.removeEventListener(window,"mousemove",this.mousemove),w.removeEventListener(window,"mouseup",this.mouseup)}mousedown(s){this.down(o.extend({},s,{ctrlKey:!0,preventDefault:()=>s.preventDefault()}),w.mousePos(this.element,s)),w.addEventListener(window,"mousemove",this.mousemove),w.addEventListener(window,"mouseup",this.mouseup)}mousemove(s){this.move(s,w.mousePos(this.element,s))}mouseup(s){this.mouseRotate.mouseupWindow(s),this.mousePitch&&this.mousePitch.mouseupWindow(s),this.offTemp()}touchstart(s){s.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=w.touchPos(this.element,s.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:()=>s.preventDefault()},this._startPos))}touchmove(s){s.targetTouches.length!==1?this.reset():(this._lastPos=w.touchPos(this.element,s.targetTouches)[0],this.move({preventDefault:()=>s.preventDefault()},this._lastPos))}touchend(s){s.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()}reset(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()}}function Fu(y,s,f){if(y=new o.LngLat(y.lng,y.lat),s){const v=new o.LngLat(y.lng-360,y.lat),_=new o.LngLat(y.lng+360,y.lat),k=f.locationPoint(y).distSqr(s);f.locationPoint(v).distSqr(s)<k?y=v:f.locationPoint(_).distSqr(s)<k&&(y=_)}for(;Math.abs(y.lng-f.center.lng)>180;){const v=f.locationPoint(y);if(v.x>=0&&v.y>=0&&v.x<=f.width&&v.y<=f.height)break;y.lng>f.center.lng?y.lng-=360:y.lng+=360}return y}const mn={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function En(y,s,f){const v=y.classList;for(const _ in mn)v.remove(`maplibregl-${f}-anchor-${_}`,`mapboxgl-${f}-anchor-${_}`);v.add(`maplibregl-${f}-anchor-${s}`,`mapboxgl-${f}-anchor-${s}`)}class xl extends o.Evented{constructor(s,f){if(super(),(s instanceof HTMLElement||f)&&(s=o.extend({element:s},f)),o.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=s&&s.anchor||"center",this._color=s&&s.color||"#3FB1CE",this._scale=s&&s.scale||1,this._draggable=s&&s.draggable||!1,this._clickTolerance=s&&s.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=s&&s.rotation||0,this._rotationAlignment=s&&s.rotationAlignment||"auto",this._pitchAlignment=s&&s.pitchAlignment&&s.pitchAlignment!=="auto"?s.pitchAlignment:this._rotationAlignment,s&&s.element)this._element=s.element,this._offset=o.pointGeometry.convert(s&&s.offset||[0,0]);else{this._defaultMarker=!0,this._element=w.create("div"),this._element.setAttribute("aria-label","Map marker");const v=w.createNS("http://www.w3.org/2000/svg","svg"),_=41,k=27;v.setAttributeNS(null,"display","block"),v.setAttributeNS(null,"height",`${_}px`),v.setAttributeNS(null,"width",`${k}px`),v.setAttributeNS(null,"viewBox",`0 0 ${k} ${_}`);const D=w.createNS("http://www.w3.org/2000/svg","g");D.setAttributeNS(null,"stroke","none"),D.setAttributeNS(null,"stroke-width","1"),D.setAttributeNS(null,"fill","none"),D.setAttributeNS(null,"fill-rule","evenodd");const $=w.createNS("http://www.w3.org/2000/svg","g");$.setAttributeNS(null,"fill-rule","nonzero");const V=w.createNS("http://www.w3.org/2000/svg","g");V.setAttributeNS(null,"transform","translate(3.0, 29.0)"),V.setAttributeNS(null,"fill","#000000");const W=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const et of W){const Pe=w.createNS("http://www.w3.org/2000/svg","ellipse");Pe.setAttributeNS(null,"opacity","0.04"),Pe.setAttributeNS(null,"cx","10.5"),Pe.setAttributeNS(null,"cy","5.80029008"),Pe.setAttributeNS(null,"rx",et.rx),Pe.setAttributeNS(null,"ry",et.ry),V.appendChild(Pe)}const ee=w.createNS("http://www.w3.org/2000/svg","g");ee.setAttributeNS(null,"fill",this._color);const ie=w.createNS("http://www.w3.org/2000/svg","path");ie.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),ee.appendChild(ie);const fe=w.createNS("http://www.w3.org/2000/svg","g");fe.setAttributeNS(null,"opacity","0.25"),fe.setAttributeNS(null,"fill","#000000");const Se=w.createNS("http://www.w3.org/2000/svg","path");Se.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),fe.appendChild(Se);const _e=w.createNS("http://www.w3.org/2000/svg","g");_e.setAttributeNS(null,"transform","translate(6.0, 7.0)"),_e.setAttributeNS(null,"fill","#FFFFFF");const we=w.createNS("http://www.w3.org/2000/svg","g");we.setAttributeNS(null,"transform","translate(8.0, 8.0)");const $e=w.createNS("http://www.w3.org/2000/svg","circle");$e.setAttributeNS(null,"fill","#000000"),$e.setAttributeNS(null,"opacity","0.25"),$e.setAttributeNS(null,"cx","5.5"),$e.setAttributeNS(null,"cy","5.5"),$e.setAttributeNS(null,"r","5.4999962");const je=w.createNS("http://www.w3.org/2000/svg","circle");je.setAttributeNS(null,"fill","#FFFFFF"),je.setAttributeNS(null,"cx","5.5"),je.setAttributeNS(null,"cy","5.5"),je.setAttributeNS(null,"r","5.4999962"),we.appendChild($e),we.appendChild(je),$.appendChild(V),$.appendChild(ee),$.appendChild(fe),$.appendChild(_e),$.appendChild(we),v.appendChild($),v.setAttributeNS(null,"height",_*this._scale+"px"),v.setAttributeNS(null,"width",k*this._scale+"px"),this._element.appendChild(v),this._offset=o.pointGeometry.convert(s&&s.offset||[0,-14])}this._element.classList.add("maplibregl-marker","mapboxgl-marker"),this._element.addEventListener("dragstart",v=>{v.preventDefault()}),this._element.addEventListener("mousedown",v=>{v.preventDefault()}),En(this._element,this._anchor,"marker"),this._popup=null}addTo(s){return this.remove(),this._map=s,s.getCanvasContainer().appendChild(this._element),s.on("move",this._update),s.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),w.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(s){return this._lngLat=o.LngLat.convert(s),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(s){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),s){if(!("offset"in s.options)){const _=Math.sqrt(Math.pow(13.5,2)/2);s.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[_,-1*(38.1-13.5+_)],"bottom-right":[-_,-1*(38.1-13.5+_)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=s,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}_onKeyPress(s){const f=s.code,v=s.charCode||s.keyCode;f!=="Space"&&f!=="Enter"&&v!==32&&v!==13||this.togglePopup()}_onMapClick(s){const f=s.originalEvent.target,v=this._element;this._popup&&(f===v||v.contains(f))&&this.togglePopup()}getPopup(){return this._popup}togglePopup(){const s=this._popup;return s?(s.isOpen()?s.remove():s.addTo(this._map),this):this}_update(s){if(!this._map)return;this._map.transform.renderWorldCopies&&(this._lngLat=Fu(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);let f="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?f=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(f=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let v="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?v="rotateX(0deg)":this._pitchAlignment==="map"&&(v=`rotateX(${this._map.getPitch()}deg)`),s&&s.type!=="moveend"||(this._pos=this._pos.round()),w.setTransform(this._element,`${mn[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${v} ${f}`),this._map.style&&this._map.style.terrain&&!this._opacityTimeout&&(this._opacityTimeout=setTimeout(()=>{const _=this._map.unproject(this._pos),k=40075016686e-3*Math.abs(Math.cos(this._lngLat.lat*Math.PI/180))/Math.pow(2,this._map.transform.tileZoom+8);this._element.style.opacity=_.distanceTo(this._lngLat)>20*k?"0.2":"1.0",this._opacityTimeout=null},100))}getOffset(){return this._offset}setOffset(s){return this._offset=o.pointGeometry.convert(s),this._update(),this}_onMove(s){if(!this._isDragging){const f=this._clickTolerance||this._map._clickTolerance;this._isDragging=s.point.dist(this._pointerdownPos)>=f}this._isDragging&&(this._pos=s.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new o.Event("dragstart"))),this.fire(new o.Event("drag")))}_onUp(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new o.Event("dragend")),this._state="inactive"}_addDragHandler(s){this._element.contains(s.originalEvent.target)&&(s.preventDefault(),this._positionDelta=s.point.sub(this._pos).add(this._offset),this._pointerdownPos=s.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))}setDraggable(s){return this._draggable=!!s,this._map&&(s?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(s){return this._rotation=s||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(s){return this._rotationAlignment=s||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(s){return this._pitchAlignment=s&&s!=="auto"?s:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}}const Xf={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Ya,Ti=0,Qa=!1;const oa={maxWidth:100,unit:"metric"};function Zm(y,s,f){const v=f&&f.maxWidth||100,_=y._container.clientHeight/2,k=y.unproject([0,_]),D=y.unproject([v,_]),$=k.distanceTo(D);if(f&&f.unit==="imperial"){const V=3.2808*$;V>5280?Ja(s,v,V/5280,y._getUIString("ScaleControl.Miles")):Ja(s,v,V,y._getUIString("ScaleControl.Feet"))}else f&&f.unit==="nautical"?Ja(s,v,$/1852,y._getUIString("ScaleControl.NauticalMiles")):$>=1e3?Ja(s,v,$/1e3,y._getUIString("ScaleControl.Kilometers")):Ja(s,v,$,y._getUIString("ScaleControl.Meters"))}function Ja(y,s,f,v){const _=function(k){const D=Math.pow(10,`${Math.floor(k)}`.length-1);let $=k/D;return $=$>=10?10:$>=5?5:$>=3?3:$>=2?2:$>=1?1:function(V){const W=Math.pow(10,Math.ceil(-Math.log(V)/Math.LN10));return Math.round(V*W)/W}($),D*$}(f);y.style.width=s*(_/f)+"px",y.innerHTML=`${_}&nbsp;${v}`}const Gr={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},ni=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Yf(y){if(y){if(typeof y=="number"){const s=Math.round(Math.sqrt(.5*Math.pow(y,2)));return{center:new o.pointGeometry(0,0),top:new o.pointGeometry(0,y),"top-left":new o.pointGeometry(s,s),"top-right":new o.pointGeometry(-s,s),bottom:new o.pointGeometry(0,-y),"bottom-left":new o.pointGeometry(s,-s),"bottom-right":new o.pointGeometry(-s,-s),left:new o.pointGeometry(y,0),right:new o.pointGeometry(-y,0)}}if(y instanceof o.pointGeometry||Array.isArray(y)){const s=o.pointGeometry.convert(y);return{center:s,top:s,"top-left":s,"top-right":s,bottom:s,"bottom-left":s,"bottom-right":s,left:s,right:s}}return{center:o.pointGeometry.convert(y.center||[0,0]),top:o.pointGeometry.convert(y.top||[0,0]),"top-left":o.pointGeometry.convert(y["top-left"]||[0,0]),"top-right":o.pointGeometry.convert(y["top-right"]||[0,0]),bottom:o.pointGeometry.convert(y.bottom||[0,0]),"bottom-left":o.pointGeometry.convert(y["bottom-left"]||[0,0]),"bottom-right":o.pointGeometry.convert(y["bottom-right"]||[0,0]),left:o.pointGeometry.convert(y.left||[0,0]),right:o.pointGeometry.convert(y.right||[0,0])}}return Yf(new o.pointGeometry(0,0))}const Ss={supported:h,setRTLTextPlugin:o.setRTLTextPlugin,getRTLTextPluginStatus:o.getRTLTextPluginStatus,Map:class extends Rr{constructor(y){var s;if(o.PerformanceUtils.mark(o.PerformanceMarkers.create),(y=o.extend({},qm,y)).minZoom!=null&&y.maxZoom!=null&&y.minZoom>y.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(y.minPitch!=null&&y.maxPitch!=null&&y.minPitch>y.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(y.minPitch!=null&&y.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(y.maxPitch!=null&&y.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new Iu(y.minZoom,y.maxZoom,y.minPitch,y.maxPitch,y.renderWorldCopies),{bearingSnap:y.bearingSnap}),this._interactive=y.interactive,this._cooperativeGestures=y.cooperativeGestures,this._maxTileCacheSize=y.maxTileCacheSize,this._failIfMajorPerformanceCaveat=y.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=y.preserveDrawingBuffer,this._antialias=y.antialias,this._trackResize=y.trackResize,this._bearingSnap=y.bearingSnap,this._refreshExpiredTiles=y.refreshExpiredTiles,this._fadeDuration=y.fadeDuration,this._crossSourceCollisions=y.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=y.collectResourceTiming,this._renderTaskQueue=new Wm,this._controls=[],this._mapId=o.uniqueId(),this._locale=o.extend({},Gm,y.locale),this._clickTolerance=y.clickTolerance,this._pixelRatio=(s=y.pixelRatio)!==null&&s!==void 0?s:devicePixelRatio,this._requestManager=new P(y.transformRequest),typeof y.container=="string"){if(this._container=document.getElementById(y.container),!this._container)throw new Error(`Container '${y.container}' not found.`)}else{if(!(y.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=y.container}if(y.maxBounds&&this.setMaxBounds(y.maxBounds),o.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}),typeof window<"u"&&(addEventListener("online",this._onWindowOnline,!1),addEventListener("resize",this._onWindowResize,!1),addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Hm(this,y),this._cooperativeGestures&&this._setupCooperativeGestures(),this._hash=y.hash&&new Nm(typeof y.hash=="string"&&y.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:y.center,zoom:y.zoom,bearing:y.bearing,pitch:y.pitch}),y.bounds&&(this.resize(),this.fitBounds(y.bounds,o.extend({},y.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=y.localIdeographFontFamily,y.style&&this.setStyle(y.style,{localIdeographFontFamily:y.localIdeographFontFamily}),y.attributionControl&&this.addControl(new zu({customAttribution:y.customAttribution})),y.maplibreLogo&&this.addControl(new Gc,y.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",f=>{this._update(f.dataType==="style"),this.fire(new o.Event(`${f.dataType}data`,f))}),this.on("dataloading",f=>{this.fire(new o.Event(`${f.dataType}dataloading`,f))}),this.on("dataabort",f=>{this.fire(new o.Event("sourcedataabort",f))})}_getMapId(){return this._mapId}addControl(y,s){if(s===void 0&&(s=y.getDefaultPosition?y.getDefaultPosition():"top-right"),!y||!y.onAdd)return this.fire(new o.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const f=y.onAdd(this);this._controls.push(y);const v=this._controlPositions[s];return s.indexOf("bottom")!==-1?v.insertBefore(f,v.firstChild):v.appendChild(f),this}removeControl(y){if(!y||!y.onRemove)return this.fire(new o.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const s=this._controls.indexOf(y);return s>-1&&this._controls.splice(s,1),y.onRemove(this),this}hasControl(y){return this._controls.indexOf(y)>-1}calculateCameraOptionsFromTo(y,s,f,v){return v==null&&this.style.terrain&&(v=this.transform.getElevation(f,this.style.terrain)),super.calculateCameraOptionsFromTo(y,s,f,v)}resize(y){const s=this._containerDimensions(),f=s[0],v=s[1];this._resizeCanvas(f,v,this.getPixelRatio()),this.transform.resize(f,v),this.painter.resize(f,v,this.getPixelRatio());const _=!this._moving;return _&&(this.stop(),this.fire(new o.Event("movestart",y)).fire(new o.Event("move",y))),this.fire(new o.Event("resize",y)),_&&this.fire(new o.Event("moveend",y)),this}getPixelRatio(){return this._pixelRatio}setPixelRatio(y){const[s,f]=this._containerDimensions();this._pixelRatio=y,this._resizeCanvas(s,f,y),this.painter.resize(s,f,y)}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(y){return this.transform.setMaxBounds(o.LngLatBounds.convert(y)),this._update()}setMinZoom(y){if((y=y==null?-2:y)>=-2&&y<=this.transform.maxZoom)return this.transform.minZoom=y,this._update(),this.getZoom()<y&&this.setZoom(y),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(y){if((y=y==null?22:y)>=this.transform.minZoom)return this.transform.maxZoom=y,this._update(),this.getZoom()>y&&this.setZoom(y),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(y){if((y=y==null?0:y)<0)throw new Error("minPitch must be greater than or equal to 0");if(y>=0&&y<=this.transform.maxPitch)return this.transform.minPitch=y,this._update(),this.getPitch()<y&&this.setPitch(y),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(y){if((y=y==null?60:y)>85)throw new Error("maxPitch must be less than or equal to 85");if(y>=this.transform.minPitch)return this.transform.maxPitch=y,this._update(),this.getPitch()>y&&this.setPitch(y),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(y){return this.transform.renderWorldCopies=y,this._update()}project(y){return this.transform.locationPoint(o.LngLat.convert(y),this.style&&this.style.terrain)}unproject(y){return this.transform.pointLocation(o.pointGeometry.convert(y),this.style&&this.style.terrain)}isMoving(){return this._moving||this.handlers.isMoving()}isZooming(){return this._zooming||this.handlers.isZooming()}isRotating(){return this._rotating||this.handlers.isRotating()}_createDelegatedListener(y,s,f){if(y==="mouseenter"||y==="mouseover"){let v=!1;return{layer:s,listener:f,delegates:{mousemove:k=>{const D=this.getLayer(s)?this.queryRenderedFeatures(k.point,{layers:[s]}):[];D.length?v||(v=!0,f.call(this,new uo(y,this,k.originalEvent,{features:D}))):v=!1},mouseout:()=>{v=!1}}}}if(y==="mouseleave"||y==="mouseout"){let v=!1;return{layer:s,listener:f,delegates:{mousemove:D=>{(this.getLayer(s)?this.queryRenderedFeatures(D.point,{layers:[s]}):[]).length?v=!0:v&&(v=!1,f.call(this,new uo(y,this,D.originalEvent)))},mouseout:D=>{v&&(v=!1,f.call(this,new uo(y,this,D.originalEvent)))}}}}{const v=_=>{const k=this.getLayer(s)?this.queryRenderedFeatures(_.point,{layers:[s]}):[];k.length&&(_.features=k,f.call(this,_),delete _.features)};return{layer:s,listener:f,delegates:{[y]:v}}}}on(y,s,f){if(f===void 0)return super.on(y,s);const v=this._createDelegatedListener(y,s,f);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[y]=this._delegatedListeners[y]||[],this._delegatedListeners[y].push(v);for(const _ in v.delegates)this.on(_,v.delegates[_]);return this}once(y,s,f){if(f===void 0)return super.once(y,s);const v=this._createDelegatedListener(y,s,f);for(const _ in v.delegates)this.once(_,v.delegates[_]);return this}off(y,s,f){return f===void 0?super.off(y,s):(this._delegatedListeners&&this._delegatedListeners[y]&&(v=>{const _=this._delegatedListeners[y];for(let k=0;k<_.length;k++){const D=_[k];if(D.layer===s&&D.listener===f){for(const $ in D.delegates)this.off($,D.delegates[$]);return _.splice(k,1),this}}})(),this)}queryRenderedFeatures(y,s){if(!this.style)return[];let f;if(s!==void 0||y===void 0||y instanceof o.pointGeometry||Array.isArray(y)||(s=y,y=void 0),s=s||{},(y=y||[[0,0],[this.transform.width,this.transform.height]])instanceof o.pointGeometry||typeof y[0]=="number")f=[o.pointGeometry.convert(y)];else{const v=o.pointGeometry.convert(y[0]),_=o.pointGeometry.convert(y[1]);f=[v,new o.pointGeometry(_.x,v.y),_,new o.pointGeometry(v.x,_.y),v]}return this.style.queryRenderedFeatures(f,s,this.transform)}querySourceFeatures(y,s){return this.style.querySourceFeatures(y,s)}setStyle(y,s){return(s=o.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},s)).diff!==!1&&s.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&y?(this._diffStyle(y,s),this):(this._localIdeographFontFamily=s.localIdeographFontFamily,this._updateStyle(y,s))}setTransformRequest(y){return this._requestManager.setTransformRequest(y),this}_getUIString(y){const s=this._locale[y];if(s==null)throw new Error(`Missing UI string '${y}'`);return s}_updateStyle(y,s){return this.style&&(this.style.setEventedParent(null),this.style._remove()),y?(this.style=new Pr(this,s||{}),this.style.setEventedParent(this,{style:this.style}),typeof y=="string"?this.style.loadURL(y):this.style.loadJSON(y),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Pr(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(y,s){if(typeof y=="string"){const f=this._requestManager.transformRequest(y,o.ResourceType.Style);o.getJSON(f,(v,_)=>{v?this.fire(new o.ErrorEvent(v)):_&&this._updateDiff(_,s)})}else typeof y=="object"&&this._updateDiff(y,s)}_updateDiff(y,s){try{this.style.setState(y)&&this._update(!0)}catch(f){o.warnOnce(`Unable to perform style diff: ${f.message||f.error||f}. Rebuilding the style from scratch.`),this._updateStyle(y,s)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():o.warnOnce("There is no style added to the map.")}addSource(y,s){return this._lazyInitEmptyStyle(),this.style.addSource(y,s),this._update(!0)}isSourceLoaded(y){const s=this.style&&this.style.sourceCaches[y];if(s!==void 0)return s.loaded();this.fire(new o.ErrorEvent(new Error(`There is no source with ID '${y}'`)))}setTerrain(y){return this.style.setTerrain(y),this}getTerrain(){return this.style.terrain&&this.style.terrain.options}areTilesLoaded(){const y=this.style&&this.style.sourceCaches;for(const s in y){const f=y[s]._tiles;for(const v in f){const _=f[v];if(_.state!=="loaded"&&_.state!=="errored")return!1}}return!0}addSourceType(y,s,f){return this._lazyInitEmptyStyle(),this.style.addSourceType(y,s,f)}removeSource(y){return this.style.removeSource(y),this._update(!0)}getSource(y){return this.style.getSource(y)}addImage(y,s,{pixelRatio:f=1,sdf:v=!1,stretchX:_,stretchY:k,content:D}={}){if(this._lazyInitEmptyStyle(),s instanceof HTMLImageElement||o.isImageBitmap(s)){const{width:$,height:V,data:W}=o.exported.getImageData(s);this.style.addImage(y,{data:new o.RGBAImage({width:$,height:V},W),pixelRatio:f,stretchX:_,stretchY:k,content:D,sdf:v,version:0})}else{if(s.width===void 0||s.height===void 0)return this.fire(new o.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:$,height:V,data:W}=s,ee=s;this.style.addImage(y,{data:new o.RGBAImage({width:$,height:V},new Uint8Array(W)),pixelRatio:f,stretchX:_,stretchY:k,content:D,sdf:v,version:0,userImage:ee}),ee.onAdd&&ee.onAdd(this,y)}}}updateImage(y,s){const f=this.style.getImage(y);if(!f)return this.fire(new o.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const v=s instanceof HTMLImageElement||o.isImageBitmap(s)?o.exported.getImageData(s):s,{width:_,height:k,data:D}=v;if(_===void 0||k===void 0)return this.fire(new o.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(_!==f.data.width||k!==f.data.height)return this.fire(new o.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));const $=!(s instanceof HTMLImageElement||o.isImageBitmap(s));f.data.replace(D,$),this.style.updateImage(y,f)}hasImage(y){return y?!!this.style.getImage(y):(this.fire(new o.ErrorEvent(new Error("Missing required image id"))),!1)}removeImage(y){this.style.removeImage(y)}loadImage(y,s){o.getImage(this._requestManager.transformRequest(y,o.ResourceType.Image),s)}listImages(){return this.style.listImages()}addLayer(y,s){return this._lazyInitEmptyStyle(),this.style.addLayer(y,s),this._update(!0)}moveLayer(y,s){return this.style.moveLayer(y,s),this._update(!0)}removeLayer(y){return this.style.removeLayer(y),this._update(!0)}getLayer(y){return this.style.getLayer(y)}setLayerZoomRange(y,s,f){return this.style.setLayerZoomRange(y,s,f),this._update(!0)}setFilter(y,s,f={}){return this.style.setFilter(y,s,f),this._update(!0)}getFilter(y){return this.style.getFilter(y)}setPaintProperty(y,s,f,v={}){return this.style.setPaintProperty(y,s,f,v),this._update(!0)}getPaintProperty(y,s){return this.style.getPaintProperty(y,s)}setLayoutProperty(y,s,f,v={}){return this.style.setLayoutProperty(y,s,f,v),this._update(!0)}getLayoutProperty(y,s){return this.style.getLayoutProperty(y,s)}setLight(y,s={}){return this._lazyInitEmptyStyle(),this.style.setLight(y,s),this._update(!0)}getLight(){return this.style.getLight()}setFeatureState(y,s){return this.style.setFeatureState(y,s),this._update()}removeFeatureState(y,s){return this.style.removeFeatureState(y,s),this._update()}getFeatureState(y){return this.style.getFeatureState(y)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let y=0,s=0;return this._container&&(y=this._container.clientWidth||400,s=this._container.clientHeight||300),[y,s]}_setupContainer(){const y=this._container;y.classList.add("maplibregl-map","mapboxgl-map");const s=this._canvasContainer=w.create("div","maplibregl-canvas-container mapboxgl-canvas-container",y);this._interactive&&s.classList.add("maplibregl-interactive","mapboxgl-interactive"),this._canvas=w.create("canvas","maplibregl-canvas mapboxgl-canvas",s),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map"),this._canvas.setAttribute("role","region");const f=this._containerDimensions();this._resizeCanvas(f[0],f[1],this.getPixelRatio());const v=this._controlContainer=w.create("div","maplibregl-control-container mapboxgl-control-container",y),_=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(k=>{_[k]=w.create("div",`maplibregl-ctrl-${k} mapboxgl-ctrl-${k}`,v)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_setupCooperativeGestures(){const y=this._container;this._metaPress=!1,this._cooperativeGesturesScreen=w.create("div","maplibregl-cooperative-gesture-screen",y);let s="Control",f=typeof this._cooperativeGestures!="boolean"&&this._cooperativeGestures.windowsHelpText?this._cooperativeGestures.windowsHelpText:"Use Ctrl + scroll to zoom the map";navigator.platform.indexOf("Mac")===0&&(f=typeof this._cooperativeGestures!="boolean"&&this._cooperativeGestures.macHelpText?this._cooperativeGestures.macHelpText:"Use \u2318 + scroll to zoom the map",s="Meta"),this._cooperativeGesturesScreen.innerHTML=`
<div class="maplibregl-desktop-message">${f}</div>
<div class="maplibregl-mobile-message">${typeof this._cooperativeGestures!="boolean"&&this._cooperativeGestures.mobileHelpText?this._cooperativeGestures.mobileHelpText:"Use two fingers to move the map"}</div>
`,document.addEventListener("keydown",v=>{v.key===s&&(this._metaPress=!0)}),document.addEventListener("keyup",v=>{v.key===s&&(this._metaPress=!1)}),this._canvasContainer.addEventListener("wheel",v=>{this._onCooperativeGesture(v,this._metaPress,1)},!1),this._canvasContainer.classList.remove("mapboxgl-touch-drag-pan","maplibregl-touch-drag-pan")}_resizeCanvas(y,s,f){this._canvas.width=f*y,this._canvas.height=f*s,this._canvas.style.width=`${y}px`,this._canvas.style.height=`${s}px`}_setupPainter(){const y=o.extend({},h.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),s=this._canvas.getContext("webgl",y)||this._canvas.getContext("experimental-webgl",y);s?(this.painter=new Bf(s,this.transform),o.exported$1.testSupport(s)):this.fire(new o.ErrorEvent(new Error("Failed to initialize WebGL")))}_contextLost(y){y.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new o.Event("webglcontextlost",{originalEvent:y}))}_contextRestored(y){this._setupPainter(),this.resize(),this._update(),this.fire(new o.Event("webglcontextrestored",{originalEvent:y}))}_onMapScroll(y){if(y.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}_onCooperativeGesture(y,s,f){return!s&&f<2&&(this._cooperativeGesturesScreen.classList.add("maplibregl-show"),setTimeout(()=>{this._cooperativeGesturesScreen.classList.remove("maplibregl-show")},100)),!1}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(y){return this.style?(this._styleDirty=this._styleDirty||y,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(y){return this._update(),this._renderTaskQueue.add(y)}_cancelRenderFrame(y){this._renderTaskQueue.remove(y)}_render(y){let s,f=0;const v=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(s=v.createQueryEXT(),v.beginQueryEXT(v.TIME_ELAPSED_EXT,s),f=o.exported.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(y),this._removed)return;let _=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const D=this.transform.zoom,$=o.exported.now();this.style.zoomHistory.update(D,$);const V=new o.EvaluationParameters(D,{now:$,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),W=V.crossFadingFactor();W===1&&W===this._crossFadingFactor||(_=!0,this._crossFadingFactor=W),this.style.update(V)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.style.terrain&&this.style.terrain.sourceCache.update(this.transform,this.style.terrain),this.transform.updateElevation(this.style.terrain),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer")}),this.fire(new o.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,o.PerformanceUtils.mark(o.PerformanceMarkers.load),this.fire(new o.Event("load"))),this.style&&(this.style.hasTransitions()||_)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){const D=o.exported.now()-f;v.endQueryEXT(v.TIME_ELAPSED_EXT,s),setTimeout(()=>{const $=v.getQueryObjectEXT(s,v.QUERY_RESULT_EXT)/1e6;v.deleteQueryEXT(s),this.fire(new o.Event("gpu-timing-frame",{cpuTime:D,gpuTime:$}))},50)}if(this.listens("gpu-timing-layer")){const D=this.painter.collectGpuTimers();setTimeout(()=>{const $=this.painter.queryGpuTimers(D);this.fire(new o.Event("gpu-timing-layer",{layerTimes:$}))},50)}const k=this._sourcesDirty||this._styleDirty||this._placementDirty;return k||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new o.Event("idle")),!this._loaded||this._fullyLoaded||k||(this._fullyLoaded=!0,o.PerformanceUtils.mark(o.PerformanceMarkers.fullLoad)),this}redraw(){return this.style&&(this._frame&&(this._frame.cancel(),this._frame=null),this._render(0)),this}remove(){this._hash&&this._hash.remove();for(const s of this._controls)s.onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&(removeEventListener("resize",this._onWindowResize,!1),removeEventListener("orientationchange",this._onWindowResize,!1),removeEventListener("online",this._onWindowOnline,!1));const y=this.painter.context.gl.getExtension("WEBGL_lose_context");y&&y.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),w.remove(this._canvasContainer),w.remove(this._controlContainer),this._cooperativeGestures&&w.remove(this._cooperativeGesturesScreen),this._container.classList.remove("maplibregl-map","mapboxgl-map"),o.PerformanceUtils.clearMetrics(),this._removed=!0,this.fire(new o.Event("remove"))}triggerRepaint(){this.style&&!this._frame&&(this._frame=o.exported.frame(y=>{o.PerformanceUtils.frame(y),this._frame=null,this._render(y)}))}_onWindowOnline(){this._update()}_onWindowResize(y){this._trackResize&&this.resize({originalEvent:y})._update()}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(y){this._showTileBoundaries!==y&&(this._showTileBoundaries=y,this._update())}get showPadding(){return!!this._showPadding}set showPadding(y){this._showPadding!==y&&(this._showPadding=y,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(y){this._showCollisionBoxes!==y&&(this._showCollisionBoxes=y,y?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(y){this._showOverdrawInspector!==y&&(this._showOverdrawInspector=y,this._update())}get repaint(){return!!this._repaint}set repaint(y){this._repaint!==y&&(this._repaint=y,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(y){this._vertices=y,this._update()}_setCacheLimits(y,s){o.setCacheLimits(y,s)}get version(){return"2.4.0"}},NavigationControl:class{constructor(y){this.options=o.extend({},A1,y),this._container=w.create("div","maplibregl-ctrl maplibregl-ctrl-group mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",s=>s.preventDefault()),this.options.showZoom&&(o.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in mapboxgl-ctrl-zoom-in",s=>this._map.zoomIn({},{originalEvent:s})),w.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out mapboxgl-ctrl-zoom-out",s=>this._map.zoomOut({},{originalEvent:s})),w.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(o.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("maplibregl-ctrl-compass mapboxgl-ctrl-compass",s=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:s}):this._map.resetNorth({},{originalEvent:s})}),this._compassIcon=w.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){const y=this._map.getZoom(),s=y===this._map.getMaxZoom(),f=y===this._map.getMinZoom();this._zoomInButton.disabled=s,this._zoomOutButton.disabled=f,this._zoomInButton.setAttribute("aria-disabled",s.toString()),this._zoomOutButton.setAttribute("aria-disabled",f.toString())}_rotateCompassArrow(){const y=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=y}onAdd(y){return this._map=y,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new ia(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){w.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(y,s){const f=w.create("button",y,this._container);return f.type="button",f.addEventListener("click",s),f}_setButtonTitle(y,s){const f=this._map._getUIString(`NavigationControl.${s}`);y.title=f,y.setAttribute("aria-label",f)}},GeolocateControl:class extends o.Evented{constructor(y){super(),this.options=o.extend({},Xf,y),o.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}onAdd(y){var s;return this._map=y,this._container=w.create("div","maplibregl-ctrl maplibregl-ctrl-group mapboxgl-ctrl mapboxgl-ctrl-group"),s=this._setupUI,Ya!==void 0?s(Ya):window.navigator.permissions!==void 0?window.navigator.permissions.query({name:"geolocation"}).then(f=>{Ya=f.state!=="denied",s(Ya)}):(Ya=!!window.navigator.geolocation,s(Ya)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),w.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Ti=0,Qa=!1}_isOutOfMapMaxBounds(y){const s=this._map.getMaxBounds(),f=y.coords;return s&&(f.longitude<s.getWest()||f.longitude>s.getEast()||f.latitude<s.getSouth()||f.latitude>s.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error","mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error","mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error","mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_onSuccess(y){if(this._map){if(this._isOutOfMapMaxBounds(y))return this._setErrorState(),this.fire(new o.Event("outofmaxbounds",y)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=y,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error","mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error","mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(y),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(y),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale","mapboxgl-user-location-dot-stale"),this.fire(new o.Event("geolocate",y)),this._finish()}}_updateCamera(y){const s=new o.LngLat(y.coords.longitude,y.coords.latitude),f=y.coords.accuracy,v=this._map.getBearing(),_=o.extend({bearing:v},this.options.fitBoundsOptions);this._map.fitBounds(s.toBounds(f),_,{geolocateSource:!0})}_updateMarker(y){if(y){const s=new o.LngLat(y.coords.longitude,y.coords.latitude);this._accuracyCircleMarker.setLngLat(s).addTo(this._map),this._userLocationDotMarker.setLngLat(s).addTo(this._map),this._accuracy=y.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){const y=this._map._container.clientHeight/2,s=this._map.unproject([0,y]),f=this._map.unproject([1,y]),v=s.distanceTo(f),_=Math.ceil(2*this._accuracy/v);this._circleElement.style.width=`${_}px`,this._circleElement.style.height=`${_}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_onError(y){if(this._map){if(this.options.trackUserLocation)if(y.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error","mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error","mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const s=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=s,this._geolocateButton.setAttribute("aria-label",s),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(y.code===3&&Qa)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale","mapboxgl-user-location-dot-stale"),this.fire(new o.Event("error",y)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(y){if(this._container.addEventListener("contextmenu",s=>s.preventDefault()),this._geolocateButton=w.create("button","maplibregl-ctrl-geolocate mapboxgl-ctrl-geolocate",this._container),w.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",y===!1){o.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");const s=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=s,this._geolocateButton.setAttribute("aria-label",s)}else{const s=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=s,this._geolocateButton.setAttribute("aria-label",s)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=w.create("div","maplibregl-user-location-dot mapboxgl-user-location-dot"),this._userLocationDotMarker=new xl(this._dotElement),this._circleElement=w.create("div","maplibregl-user-location-accuracy-circle mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new xl({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",s=>{s.geolocateSource||this._watchState!=="ACTIVE_LOCK"||s.originalEvent&&s.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active"),this.fire(new o.Event("trackuserlocationend")))})}trigger(){if(!this._setup)return o.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new o.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Ti--,Qa=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error","mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error","mapboxgl-ctrl-geolocate-background-error"),this.fire(new o.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new o.Event("trackuserlocationstart"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let y;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Ti++,Ti>1?(y={maximumAge:6e5,timeout:0},Qa=!0):(y=this.options.positionOptions,Qa=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,y)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},AttributionControl:zu,LogoControl:Gc,ScaleControl:class{constructor(y){this.options=o.extend({},oa,y),o.bindAll(["_onMove","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_onMove(){Zm(this._map,this._container,this.options)}onAdd(y){return this._map=y,this._container=w.create("div","maplibregl-ctrl maplibregl-ctrl-scale mapboxgl-ctrl mapboxgl-ctrl-scale",y.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){w.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}setUnit(y){this.options.unit=y,Zm(this._map,this._container,this.options)}},FullscreenControl:class{constructor(y){this._fullscreen=!1,y&&y.container&&(y.container instanceof HTMLElement?this._container=y.container:o.warnOnce("Full screen control 'container' must be a DOM element.")),o.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(y){return this._map=y,this._container||(this._container=this._map.getContainer()),this._controlContainer=w.create("div","maplibregl-ctrl maplibregl-ctrl-group mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",o.warnOnce("This device does not support fullscreen mode.")),this._controlContainer}onRemove(){w.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._changeIcon)}_checkFullscreenSupport(){return!!(document.fullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled)}_setupUI(){const y=this._fullscreenButton=w.create("button","maplibregl-ctrl-fullscreen mapboxgl-ctrl-fullscreen",this._controlContainer);w.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",y).setAttribute("aria-hidden","true"),y.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){const y=this._getTitle();this._fullscreenButton.setAttribute("aria-label",y),this._fullscreenButton.title=y}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_changeIcon(){(window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())}_onClickFullscreen(){this._isFullscreen()?window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen&&window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()}},TerrainControl:class{constructor(y){this.options=y,o.bindAll(["_toggleTerrain","_updateTerrainIcon"],this)}onAdd(y){return this._map=y,this._container=w.create("div","maplibregl-ctrl maplibregl-ctrl-group mapboxgl-ctrl mapboxgl-ctrl-group"),this._terrainButton=w.create("button","maplibregl-ctrl-terrain mapboxgl-ctrl-terrain",this._container),w.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){w.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}_toggleTerrain(){this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()}_updateTerrainIcon(){this._terrainButton.classList.remove("maplibregl-ctrl-terrain","mapboxgl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled","mapboxgl-ctrl-terrain-enabled"),this._map.style.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled","mapboxgl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.disableTerrain")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain","mapboxgl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.enableTerrain"))}},Popup:class extends o.Evented{constructor(y){super(),this.options=o.extend(Object.create(Gr),y),o.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}addTo(y){return this._map&&this.remove(),this._map=y,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer","mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer","mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new o.Event("open")),this}isOpen(){return!!this._map}remove(){return this._content&&w.remove(this._content),this._container&&(w.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new o.Event("close")),this}getLngLat(){return this._lngLat}setLngLat(y){return this._lngLat=o.LngLat.convert(y),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer","mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer","mapboxgl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer","mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer","mapboxgl-track-pointer")),this}getElement(){return this._container}setText(y){return this.setDOMContent(document.createTextNode(y))}setHTML(y){const s=document.createDocumentFragment(),f=document.createElement("body");let v;for(f.innerHTML=y;v=f.firstChild,v;)s.appendChild(v);return this.setDOMContent(s)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(y){return this.options.maxWidth=y,this._update(),this}setDOMContent(y){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=w.create("div","maplibregl-popup-content mapboxgl-popup-content",this._container);return this._content.appendChild(y),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(y){this._container&&this._container.classList.add(y)}removeClassName(y){this._container&&this._container.classList.remove(y)}setOffset(y){return this.options.offset=y,this._update(),this}toggleClassName(y){if(this._container)return this._container.classList.toggle(y)}_createCloseButton(){this.options.closeButton&&(this._closeButton=w.create("button","maplibregl-popup-close-button mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_onMouseUp(y){this._update(y.point)}_onMouseMove(y){this._update(y.point)}_onDrag(y){this._update(y.point)}_update(y){if(!this._map||!this._lngLat&&!this._trackPointer||!this._content||(this._container||(this._container=w.create("div","maplibregl-popup mapboxgl-popup",this._map.getContainer()),this._tip=w.create("div","maplibregl-popup-tip mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(k=>this._container.classList.add(k)),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer","mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Fu(this._lngLat,this._pos,this._map.transform)),this._trackPointer&&!y))return;const s=this._pos=this._trackPointer&&y?y:this._map.project(this._lngLat);let f=this.options.anchor;const v=Yf(this.options.offset);if(!f){const k=this._container.offsetWidth,D=this._container.offsetHeight;let $;$=s.y+v.bottom.y<D?["top"]:s.y>this._map.transform.height-D?["bottom"]:[],s.x<k/2?$.push("left"):s.x>this._map.transform.width-k/2&&$.push("right"),f=$.length===0?"bottom":$.join("-")}const _=s.add(v[f]).round();w.setTransform(this._container,`${mn[f]} translate(${_.x}px,${_.y}px)`),En(this._container,f,"popup")}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const y=this._container.querySelector(ni);y&&y.focus()}_onClose(){this.remove()}},Marker:xl,Style:Pr,LngLat:o.LngLat,LngLatBounds:o.LngLatBounds,Point:o.pointGeometry,MercatorCoordinate:o.MercatorCoordinate,Evented:o.Evented,AJAXError:o.AJAXError,config:o.config,CanvasSource:Te,GeoJSONSource:de,ImageSource:ye,RasterDEMTileSource:re,RasterTileSource:Q,VectorTileSource:Z,VideoSource:Re,prewarm:function(){Mt().acquire(Tt)},clearPrewarmedResources:function(){const y=mt;y&&(y.isPreloaded()&&y.numActive()===1?(y.release(Tt),mt=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get version(){return"2.4.0"},get workerCount(){return Xe.workerCount},set workerCount(y){Xe.workerCount=y},get maxParallelImageRequests(){return o.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(y){o.config.MAX_PARALLEL_IMAGE_REQUESTS=y},clearStorage(y){o.clearTileCache(y)},workerUrl:"",addProtocol(y,s){o.config.REGISTERED_PROTOCOLS[y]=s},removeProtocol(y){delete o.config.REGISTERED_PROTOCOLS[y]}};return ko.extend(Ss,{isSafari:o.isSafari,getPerformanceMetrics:o.PerformanceUtils.getPerformanceMetrics}),Ss});var c=i;return c})})(r9);const ode=r9.exports,ade="modulepreload",sde=function(e){return"/"+e},KT={},lde=function(t,n,r){if(!n||n.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(n.map(l=>{if(l=sde(l),l in KT)return;KT[l]=!0;const c=l.endsWith(".css"),o=c?'[rel="stylesheet"]':"";if(!!r)for(let g=i.length-1;g>=0;g--){const b=i[g];if(b.href===l&&(!c||b.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${o}`))return;const p=document.createElement("link");if(p.rel=c?"stylesheet":ade,c||(p.as="script",p.crossOrigin=""),p.href=l,document.head.appendChild(p),c)return new Promise((g,b)=>{p.addEventListener("load",g),p.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>t())},i3=C.exports.createContext(null),ude=e=>{const[t,n]=C.exports.useState({}),r=C.exports.useCallback((l,c="default")=>{n(o=>{if(c==="current")throw new Error("'current' cannot be used as map id");if(o[c])throw new Error(`Multiple maps with the same id: ${c}`);return{...o,[c]:l}})},[]),i=C.exports.useCallback((l="default")=>{n(c=>{if(c[l]){const o={...c};return delete o[l],o}return c})},[]);return E(i3.Provider,{value:{maps:t,onMapMount:r,onMapUnmount:i},children:e.children})};function o3(){var e;const t=(e=C.exports.useContext(i3))===null||e===void 0?void 0:e.maps,n=C.exports.useContext(Ic);return C.exports.useMemo(()=>({...t,current:n==null?void 0:n.map}),[t,n])}function cde(e){const t=e.clone();return t.pixelsToGLUnits=e.pixelsToGLUnits,t}function HT(e){return{longitude:e.center.lng,latitude:e.center.lat,zoom:e.zoom,pitch:e.pitch,bearing:e.bearing,padding:e.padding}}function WT(e,t){const n=t.viewState||t;let r=!1;if("longitude"in n&&"latitude"in n){const i=e.center;e.center=new i.constructor(n.longitude,n.latitude),r=r||i!==e.center}if("zoom"in n){const i=e.zoom;e.zoom=n.zoom,r=r||i!==e.zoom}if("bearing"in n){const i=e.bearing;e.bearing=n.bearing,r=r||i!==e.bearing}if("pitch"in n){const i=e.pitch;e.pitch=n.pitch,r=r||i!==e.pitch}return n.padding&&!e.isPaddingEqual(n.padding)&&(r=!0,e.padding=n.padding),r}const dde=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function GT(e){if(!e)return null;if(typeof e=="string"||("toJS"in e&&(e=e.toJS()),!e.layers))return e;const t={};for(const r of e.layers)t[r.id]=r;const n=e.layers.map(r=>{const i=t[r.ref];let l=null;if("interactive"in r&&(l={...r},delete l.interactive),i){l=l||{...r},delete l.ref;for(const c of dde)c in i&&(l[c]=i[c])}return l||r});return{...e,layers:n}}function fde(e,t){const n=Array.isArray(e)?e[0]:e?e.x:0,r=Array.isArray(e)?e[1]:e?e.y:0,i=Array.isArray(t)?t[0]:t?t.x:0,l=Array.isArray(t)?t[1]:t?t.y:0;return n===i&&r===l}function ya(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<e.length;n++)if(!ya(e[n],t[n]))return!1;return!0}else if(Array.isArray(t))return!1;if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n)if(!t.hasOwnProperty(i)||!ya(e[i],t[i]))return!1;return!0}return!1}const qT={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"},W_={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"},ZT={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"},hde=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],pde=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class tf{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=i=>{const l=this.props[ZT[i.type]];l&&l(i)},this._onPointerEvent=i=>{(i.type==="mousemove"||i.type==="mouseout")&&this._updateHover(i);const l=this.props[qT[i.type]];if(l){if(this.props.interactiveLayerIds&&i.type!=="mouseover"&&i.type!=="mouseout"){const c=this._hoveredFeatures||this._map.queryRenderedFeatures(i.point,{layers:this.props.interactiveLayerIds});i.features=c}l(i),delete i.features}},this._onCameraEvent=i=>{if(!this._internalUpdate){const l=this.props[W_[i.type]];l&&l(i)}i.type in this._deferredEvents&&(this._deferredEvents[i.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 i=this._updateSize(t),l=this._updateViewState(t,!0);this._updateStyle(t,n),this._updateStyleComponents(t,n),this._updateHandlers(t,n),(r||i||l&&!this._map.isMoving())&&this.redraw()}static reuse(t,n){const r=tf.savedMaps.pop();if(!r)return null;const i=r.map,l=i.getContainer();for(n.className=l.className;l.childNodes.length>0;)n.appendChild(l.childNodes[0]);i._container=n,r.setProps({...t,styleDiffing:!1}),i.resize();const{initialViewState:c}=t;return c&&(c.bounds?i.fitBounds(c.bounds,{...c.fitBoundsOptions,duration:0}):r._updateViewState(c,!1)),i.isStyleLoaded()?i.fire("load"):i.once("styledata",()=>i.fire("load")),r}_initialize(t){const{props:n}=this,r={...n,...n.initialViewState,accessToken:n.mapboxAccessToken||mde()||null,container:t,style:GT(n.mapStyle)},i=r.initialViewState||r.viewState||r;if(Object.assign(r,{center:[i.longitude||0,i.latitude||0],zoom:i.zoom||0,pitch:i.pitch||0,bearing:i.bearing||0}),n.gl){const p=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=p,n.gl)}const l=new this._MapClass(r);i.padding&&l.setPadding(i.padding),n.cursor&&(l.getCanvas().style.cursor=n.cursor),this._createShadowTransform(l);const c=l._render;l._render=p=>{this._inRender=!0,c.call(l,p),this._inRender=!1};const o=l._renderTaskQueue.run;l._renderTaskQueue.run=p=>{o.call(l._renderTaskQueue,p),this._onBeforeRepaint()},l.on("render",()=>this._onAfterRepaint());const h=l.fire;l.fire=this._fireEvent.bind(this,h),l.on("resize",()=>{this._renderTransform.resize(l.transform.width,l.transform.height)}),l.on("styledata",()=>this._updateStyleComponents(this.props,{})),l.on("sourcedata",()=>this._updateStyleComponents(this.props,{}));for(const p in qT)l.on(p,this._onPointerEvent);for(const p in W_)l.on(p,this._onCameraEvent);for(const p in ZT)l.on(p,this._onEvent);this._map=l}recycle(){const n=this.map.getContainer().querySelector("[mapboxgl-children]");n==null||n.remove(),tf.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=cde(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,i=this._renderTransform,{zoom:l,pitch:c,bearing:o}=i,h=r.isMoving();h&&(i.cameraElevationReference="sea");const p=WT(i,{...HT(r.transform),...t});if(h&&(i.cameraElevationReference="ground"),p&&n){const g=this._deferredEvents;g.move=!0,g.zoom||(g.zoom=l!==i.zoom),g.rotate||(g.rotate=o!==i.bearing),g.pitch||(g.pitch=c!==i.pitch)}return h||WT(r.transform,t),p}_updateSettings(t,n){const r=this._map;let i=!1;for(const l of hde)l in t&&!ya(t[l],n[l])&&(i=!0,r[`set${l[0].toUpperCase()}${l.slice(1)}`](t[l]));return i}_updateStyle(t,n){if(t.cursor!==n.cursor&&(this._map.getCanvas().style.cursor=t.cursor),t.mapStyle!==n.mapStyle){const r={diff:t.styleDiffing};return"localIdeographFontFamily"in t&&(r.localIdeographFontFamily=t.localIdeographFontFamily),this._map.setStyle(GT(t.mapStyle),r),!0}return!1}_updateStyleComponents(t,n){const r=this._map;let i=!1;return r.style.loaded()&&("light"in t&&!ya(t.light,n.light)&&(i=!0,r.setLight(t.light)),"fog"in t&&!ya(t.fog,n.fog)&&(i=!0,r.setFog(t.fog)),"terrain"in t&&!ya(t.terrain,n.terrain)&&(!t.terrain||r.getSource(t.terrain.source))&&(i=!0,r.setTerrain(t.terrain))),i}_updateHandlers(t,n){const r=this._map;let i=!1;for(const l of pde){const c=t[l];ya(c,n[l])||(i=!0,c?r[l].enable(c):r[l].disable())}return i}_updateHover(t){var n;const{props:r}=this;if(r.interactiveLayerIds&&(r.onMouseMove||r.onMouseEnter||r.onMouseLeave)){const l=t.type,c=((n=this._hoveredFeatures)===null||n===void 0?void 0:n.length)>0;let o;if(l==="mousemove")try{o=this._map.queryRenderedFeatures(t.point,{layers:r.interactiveLayerIds})}catch{o=[]}else o=[];const h=o.length>0;!h&&c&&(t.type="mouseleave",this._onPointerEvent(t)),this._hoveredFeatures=o,h&&!c&&(t.type="mouseenter",this._onPointerEvent(t)),t.type=l}else this._hoveredFeatures=null}_fireEvent(t,n,r){const i=this._map,l=i.transform,c=typeof n=="string"?n:n.type;return c==="move"&&this._updateViewState(this.props,!1),c in W_&&(typeof n=="object"&&(n.viewState=HT(l)),this._map.isMoving())?(i.transform=this._renderTransform,t.call(i,n,r),i.transform=l,i):(t.call(i,n,r),i)}_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;this._map.transform=this._renderTransform,this._onAfterRepaint=()=>{this._map.transform=n}}}tf.savedMaps=[];function mde(){let e=null;if(typeof location<"u"){const t=/access_token=([^&\/]*)/.exec(location.search);e=t&&t[1]}try{e=e||{}.MapboxAccessToken}catch{}try{e=e||{}.REACT_APP_MAPBOX_ACCESS_TOKEN}catch{}return e}const vde=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"];function gde(e,t){if(!e)return null;const n=e.map,r={getMap:()=>n,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:i=>e.transform.locationPoint(t.LngLat.convert(i)),unproject:i=>e.transform.pointLocation(t.Point.convert(i)),queryTerrainElevation:(i,l)=>{const c=n.transform;n.transform=e.transform;const o=n.queryTerrainElevation(i,l);return n.transform=c,o}};for(const i of yde(n))!(i in r)&&!vde.includes(i)&&(r[i]=n[i].bind(n));return r}function yde(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 xde=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect,_de=["baseApiUrl","maxParallelImageRequests","workerClass","workerCount","workerUrl"];function bde(e,t){for(const n of _de)n in t&&(e[n]=t[n]);t.RTLTextPlugin&&e.getRTLTextPluginStatus&&e.getRTLTextPluginStatus()==="unavailable"&&e.setRTLTextPlugin(t.RTLTextPlugin,n=>{n&&console.error(n)},!1)}const Ic=C.exports.createContext(null),wde={minZoom:0,maxZoom:22,minPitch:0,maxPitch:60,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,mapStyle:{version:8,sources:{},layers:[]},styleDiffing:!0,projection:"mercator",renderWorldCopies:!0,onError:e=>console.error(e.error),RTLTextPlugin:"https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.js"},a3=C.exports.forwardRef((e,t)=>{const n=C.exports.useContext(i3),[r,i]=C.exports.useState(null),l=C.exports.useRef(),{current:c}=C.exports.useRef({mapLib:null,map:null});C.exports.useEffect(()=>{const h=e.mapLib;let p=!0,g;return Promise.resolve(h||lde(()=>import("./index.764e1a39.js").then(b=>b.i),[])).then(b=>{if(!!p){if(b.Map||(b=b.default),!b||!b.Map)throw new Error("Invalid mapLib");if(b.supported(e))bde(b,e),e.reuseMaps&&(g=tf.reuse(e,l.current)),g||(g=new tf(b.Map,e,l.current)),c.map=gde(g,b),c.mapLib=b,i(g),n==null||n.onMapMount(c.map,e.id);else throw new Error("Map is not supported by this browser")}}).catch(b=>{e.onError({type:"error",target:null,originalEvent:null,error:b})}),()=>{p=!1,g&&(n==null||n.onMapUnmount(e.id),e.reuseMaps?g.recycle():g.destroy())}},[]),xde(()=>{r&&r.setProps(e)}),C.exports.useImperativeHandle(t,()=>c.map,[r]);const o=C.exports.useMemo(()=>({position:"relative",width:"100%",height:"100%",...e.style}),[e.style]);return E("div",{id:e.id,ref:l,style:o,children:r&&E(Ic.Provider,{value:c,children:E("div",{"mapboxgl-children":"",children:e.children})})})});a3.displayName="Map";a3.defaultProps=wde;const Cde=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function Mc(e,t){if(!e||!t)return;const n=e.style;for(const r in t){const i=t[r];Number.isFinite(i)&&!Cde.test(r)?n[r]=`${i}px`:n[r]=i}}const Sde={draggable:!1,popup:null,rotation:0,rotationAlignment:"auto",pitchAlignment:"auto"};function o9(e){const{map:t,mapLib:n}=C.exports.useContext(Ic),r=C.exports.useRef({props:e});r.current.props=e;const i=C.exports.useMemo(()=>{let l=!1;C.exports.Children.forEach(e.children,h=>{h&&(l=!0)});const c={...e,element:l?document.createElement("div"):null},o=new n.Marker(c).setLngLat([e.longitude,e.latitude]);return o.getElement().addEventListener("click",h=>{var p,g;(g=(p=r.current.props).onClick)===null||g===void 0||g.call(p,{type:"click",target:o,originalEvent:h})}),o.on("dragstart",h=>{var p,g;const b=h;b.lngLat=i.getLngLat(),(g=(p=r.current.props).onDragStart)===null||g===void 0||g.call(p,b)}),o.on("drag",h=>{var p,g;const b=h;b.lngLat=i.getLngLat(),(g=(p=r.current.props).onDrag)===null||g===void 0||g.call(p,b)}),o.on("dragend",h=>{var p,g;const b=h;b.lngLat=i.getLngLat(),(g=(p=r.current.props).onDragEnd)===null||g===void 0||g.call(p,b)}),o},[]);return C.exports.useEffect(()=>(i.addTo(t.getMap()),()=>{i.remove()}),[]),C.exports.useEffect(()=>{Mc(i.getElement(),e.style)},[e.style]),(i.getLngLat().lng!==e.longitude||i.getLngLat().lat!==e.latitude)&&i.setLngLat([e.longitude,e.latitude]),e.offset&&!fde(i.getOffset(),e.offset)&&i.setOffset(e.offset),i.isDraggable()!==e.draggable&&i.setDraggable(e.draggable),i.getRotation()!==e.rotation&&i.setRotation(e.rotation),i.getRotationAlignment()!==e.rotationAlignment&&i.setRotationAlignment(e.rotationAlignment),i.getPitchAlignment()!==e.pitchAlignment&&i.setPitchAlignment(e.pitchAlignment),i.getPopup()!==e.popup&&i.setPopup(e.popup),uu.exports.createPortal(e.children,i.getElement())}o9.defaultProps=Sde;C.exports.memo(o9);function XT(e){return new Set(e?e.trim().split(/\s+/):[])}function Ede(e){const{map:t,mapLib:n}=C.exports.useContext(Ic),r=C.exports.useMemo(()=>document.createElement("div"),[]),i=C.exports.useRef({props:e});i.current.props=e;const l=C.exports.useMemo(()=>{const c={...e},o=new n.Popup(c).setLngLat([e.longitude,e.latitude]);return o.once("open",h=>{var p,g;(g=(p=i.current.props).onOpen)===null||g===void 0||g.call(p,h)}),o},[]);if(C.exports.useEffect(()=>{const c=o=>{var h,p;(p=(h=i.current.props).onClose)===null||p===void 0||p.call(h,o)};return l.on("close",c),l.setDOMContent(r).addTo(t.getMap()),()=>{l.off("close",c),l.isOpen()&&l.remove()}},[]),C.exports.useEffect(()=>{Mc(l.getElement(),e.style)},[e.style]),l.isOpen()&&((l.getLngLat().lng!==e.longitude||l.getLngLat().lat!==e.latitude)&&l.setLngLat([e.longitude,e.latitude]),e.offset&&!ya(l.options.offset,e.offset)&&l.setOffset(e.offset),(l.options.anchor!==e.anchor||l.options.maxWidth!==e.maxWidth)&&(l.options.anchor=e.anchor,l.setMaxWidth(e.maxWidth)),l.options.className!==e.className)){const c=XT(l.options.className),o=XT(e.className);for(const h of c)o.has(h)||l.removeClassName(h);for(const h of o)c.has(h)||l.addClassName(h);l.options.className=e.className}return uu.exports.createPortal(e.children,r)}const kde=C.exports.memo(Ede);function mm(e,t,n,r){const i=C.exports.useContext(Ic),l=C.exports.useMemo(()=>e(i),[]);return C.exports.useEffect(()=>{const c=r||n||t,o=typeof t=="function"&&typeof n=="function"?t:null,h=typeof n=="function"?n:typeof t=="function"?t:null,{map:p}=i;return p.hasControl(l)||(p.addControl(l,c==null?void 0:c.position),o&&o(i)),()=>{h&&h(i),p.hasControl(l)&&p.removeControl(l)}},[]),l}function Tde(e){const t=mm(({mapLib:n})=>new n.AttributionControl(e),{position:e.position});return C.exports.useEffect(()=>{Mc(t._container,e.style)},[e.style]),null}C.exports.memo(Tde);function Pde(e){const t=mm(({mapLib:n})=>new n.FullscreenControl({container:e.containerId&&document.getElementById(e.containerId)}),{position:e.position});return C.exports.useEffect(()=>{Mc(t._controlContainer,e.style)},[e.style]),null}C.exports.memo(Pde);const a9=C.exports.forwardRef((e,t)=>{const n=C.exports.useRef({props:e}),r=mm(({mapLib:i})=>{const l=new i.GeolocateControl(e),c=l._setupUI;return l._setupUI=o=>{l._container.hasChildNodes()||c(o)},l.on("geolocate",o=>{var h,p;(p=(h=n.current.props).onGeolocate)===null||p===void 0||p.call(h,o)}),l.on("error",o=>{var h,p;(p=(h=n.current.props).onError)===null||p===void 0||p.call(h,o)}),l.on("outofmaxbounds",o=>{var h,p;(p=(h=n.current.props).onOutOfMaxBounds)===null||p===void 0||p.call(h,o)}),l.on("trackuserlocationstart",o=>{var h,p;(p=(h=n.current.props).onTrackUserLocationStart)===null||p===void 0||p.call(h,o)}),l.on("trackuserlocationend",o=>{var h,p;(p=(h=n.current.props).onTrackUserLocationEnd)===null||p===void 0||p.call(h,o)}),l},{position:e.position});return n.current.props=e,C.exports.useImperativeHandle(t,()=>({trigger:()=>r.trigger()}),[]),C.exports.useEffect(()=>{Mc(r._container,e.style)},[e.style]),null});a9.displayName="GeolocateControl";C.exports.memo(a9);function Ide(e){const t=mm(({mapLib:n})=>new n.NavigationControl(e),{position:e.position});return C.exports.useEffect(()=>{Mc(t._container,e.style)},[e.style]),null}C.exports.memo(Ide);const Mde={unit:"metric",maxWidth:100};function s9(e){const t=mm(({mapLib:n})=>new n.ScaleControl(e),{position:e.position});return(t.options.unit!==e.unit||t.options.maxWidth!==e.maxWidth)&&(t.options.maxWidth=e.maxWidth,t.setUnit(e.unit)),C.exports.useEffect(()=>{Mc(t._container,e.style)},[e.style]),null}s9.defaultProps=Mde;C.exports.memo(s9);function jy(e,t){if(!e)throw new Error(t)}let Rde=0;function Ade(e,t,n){if(e.style&&e.style._loaded){const r={...n};return delete r.id,delete r.children,e.addSource(t,r),e.getSource(t)}return null}function Ode(e,t,n){jy(t.id===n.id,"source id changed"),jy(t.type===n.type,"source type changed");let r="",i=0;for(const c in t)c!=="children"&&c!=="id"&&!ya(n[c],t[c])&&(r=c,i++);if(!i)return;const l=t.type;if(l==="geojson")e.setData(t.data);else if(l==="image")e.updateImage({url:t.url,coordinates:t.coordinates});else if((l==="canvas"||l==="video")&&i===1&&r==="coordinates")e.setCoordinates(t.coordinates);else if(l==="vector"&&"setUrl"in e)switch(r){case"url":e.setUrl(t.url);break;case"tiles":e.setTiles(t.tiles);break}else console.warn(`Unable to update <Source> prop: ${r}`)}function ap(e){const t=C.exports.useContext(Ic).map.getMap(),n=C.exports.useRef(e),[,r]=C.exports.useState(0),i=C.exports.useMemo(()=>e.id||`jsx-source-${Rde++}`,[]);C.exports.useEffect(()=>{if(t){const c=()=>setTimeout(()=>r(o=>o+1),0);return t.on("styledata",c),c(),()=>{var o;if(t.off("styledata",c),t.style&&t.style._loaded&&t.getSource(i)){const h=(o=t.getStyle())===null||o===void 0?void 0:o.layers;if(h)for(const p of h)p.source===i&&t.removeLayer(p.id);t.removeSource(i)}}}},[t]);let l=t&&t.style&&t.getSource(i);return l?Ode(l,e,n.current):l=Ade(t,i,e),n.current=e,l&&C.exports.Children.map(e.children,c=>c&&C.exports.cloneElement(c,{source:i}))||null}function Nde(e,t,n,r){if(jy(n.id===r.id,"layer id changed"),jy(n.type===r.type,"layer type changed"),n.type==="custom"||r.type==="custom")return;const{layout:i={},paint:l={},filter:c,minzoom:o,maxzoom:h,beforeId:p}=n;if(p!==r.beforeId&&e.moveLayer(t,p),i!==r.layout){const g=r.layout||{};for(const b in i)ya(i[b],g[b])||e.setLayoutProperty(t,b,i[b]);for(const b in g)i.hasOwnProperty(b)||e.setLayoutProperty(t,b,void 0)}if(l!==r.paint){const g=r.paint||{};for(const b in l)ya(l[b],g[b])||e.setPaintProperty(t,b,l[b]);for(const b in g)l.hasOwnProperty(b)||e.setPaintProperty(t,b,void 0)}ya(c,r.filter)||e.setFilter(t,c),(o!==r.minzoom||h!==r.maxzoom)&&e.setLayerZoomRange(t,o,h)}function Dde(e,t,n){if(e.style&&e.style._loaded&&(!("source"in n)||e.getSource(n.source))){const r={...n,id:t};delete r.beforeId,e.addLayer(r,n.beforeId)}}let Lde=0;function tu(e){const t=C.exports.useContext(Ic).map.getMap(),n=C.exports.useRef(e),[,r]=C.exports.useState(0),i=C.exports.useMemo(()=>e.id||`jsx-layer-${Lde++}`,[]);if(C.exports.useEffect(()=>{if(t){const c=()=>r(o=>o+1);return t.on("styledata",c),c(),()=>{t.off("styledata",c),t.style&&t.style._loaded&&t.getLayer(i)&&t.removeLayer(i)}}},[t]),t&&t.style&&t.getLayer(i))try{Nde(t,i,e,n.current)}catch(c){console.warn(c)}else Dde(t,i,e);return n.current=e,null}const zde=e=>({updateCounter:-1,toggleUpdateCounter:()=>{e(t=>{t.updateCounter=t.updateCounter===-1?1:-1})}}),l9=mu(vu(zde)),s3=({onSuccess:e})=>{const{toggleUpdateCounter:t}=l9();return cce({mutationFn:n=>Jo.put(`/api/placement_points/update_status?${n.toString()}`),onSuccess:()=>{t(),e()}})},Fde=()=>{const{filters:e}=Oi(),{prediction:t,categories:n,region:r}=e,{selection:i}=xs(),l=hm(),[c,o]=C.exports.useState(!1),{mutate:h}=s3({onSuccess:()=>{l.invalidateQueries(["table",1,e]),o(!0)}});return Qe($n,{children:[Qe(Br,{type:"primary",block:!0,className:"mt-2",onClick:()=>{const g=new URLSearchParams({status:Fr.approve,"prediction_current[]":t,"categories[]":n,"included[]":[...i.included],"excluded[]":[...i.excluded]});r&&(r.type==="ao"&&g.append("ao[]",r.id),r.type==="rayon"&&g.append("rayon[]",r.id)),h(g)},children:[E("span",{className:"mr-1",children:" \u0412\u0437\u044F\u0442\u044C \u0432 \u0440\u0430\u0431\u043E\u0442\u0443"}),E(oN,{})]}),E(KY,{title:" ",centered:!0,open:c,footer:[E(Br,{type:"primary",onClick:()=>o(!1),children:"\u0425\u043E\u0440\u043E\u0448\u043E"},"ok-button")],children:E(R0,{message:"\u0423\u0441\u043F\u0435\u0448\u043D\u043E",description:"\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0442\u043E\u0447\u043A\u0438 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u044B \u043D\u0430 \u0441\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u0438\u0435. \u041F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u043D\u0430 \u043D\u0438\u0445 \u043C\u043E\u0436\u043D\u043E \u0432\u043E \u0432\u0442\u043E\u0440\u043E\u0439 \u0432\u043A\u043B\u0430\u0434\u043A\u0435",type:"success",showIcon:!0})})]})};function $de(){for(var e=0,t,n,r="";e<arguments.length;)(t=arguments[e++])&&(n=u9(t))&&(r&&(r+=" "),r+=n);return r}function u9(e){if(typeof e=="string")return e;for(var t,n="",r=0;r<e.length;r++)e[r]&&(t=u9(e[r]))&&(n&&(n+=" "),n+=t);return n}var l3="-";function Bde(e){var t=Ude(e);function n(i){var l=i.split(l3);return l[0]===""&&l.length!==1&&l.shift(),c9(l,t)||Vde(i)}function r(i){return e.conflictingClassGroups[i]||[]}return{getClassGroupId:n,getConflictingClassGroupIds:r}}function c9(e,t){var c;if(e.length===0)return t.classGroupId;var n=e[0],r=t.nextPart.get(n),i=r?c9(e.slice(1),r):void 0;if(i)return i;if(t.validators.length!==0){var l=e.join(l3);return(c=t.validators.find(function(o){var h=o.validator;return h(l)}))==null?void 0:c.classGroupId}}var YT=/^\[(.+)\]$/;function Vde(e){if(YT.test(e)){var t=YT.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function Ude(e){var t=e.theme,n=e.prefix,r={nextPart:new Map,validators:[]},i=Kde(Object.entries(e.classGroups),n);return i.forEach(function(l){var c=l[0],o=l[1];kw(o,r,c,t)}),r}function kw(e,t,n,r){e.forEach(function(i){if(typeof i=="string"){var l=i===""?t:QT(t,i);l.classGroupId=n;return}if(typeof i=="function"){if(jde(i)){kw(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(function(c){var o=c[0],h=c[1];kw(h,QT(t,o),n,r)})})}function QT(e,t){var n=e;return t.split(l3).forEach(function(r){n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function jde(e){return e.isThemeGetter}function Kde(e,t){return t?e.map(function(n){var r=n[0],i=n[1],l=i.map(function(c){return typeof c=="string"?t+c:typeof c=="object"?Object.fromEntries(Object.entries(c).map(function(o){var h=o[0],p=o[1];return[t+h,p]})):c});return[r,l]}):e}function Hde(e){if(e<1)return{get:function(){},set:function(){}};var t=0,n=new Map,r=new Map;function i(l,c){n.set(l,c),t++,t>e&&(t=0,r=n,n=new Map)}return{get:function(c){var o=n.get(c);if(o!==void 0)return o;if((o=r.get(c))!==void 0)return i(c,o),o},set:function(c,o){n.has(c)?n.set(c,o):i(c,o)}}}var d9="!";function Wde(e){var t=e.separator||":";return function(r){for(var i=0,l=[],c=0,o=0;o<r.length;o++){var h=r[o];i===0&&h===t[0]&&(t.length===1||r.slice(o,o+t.length)===t)&&(l.push(r.slice(c,o)),c=o+t.length),h==="["?i++:h==="]"&&i--}var p=l.length===0?r:r.substring(c),g=p.startsWith(d9),b=g?p.substring(1):p;return{modifiers:l,hasImportantModifier:g,baseClassName:b}}}function Gde(e){if(e.length<=1)return e;var t=[],n=[];return e.forEach(function(r){var i=r[0]==="[";i?(t.push.apply(t,n.sort().concat([r])),n=[]):n.push(r)}),t.push.apply(t,n.sort()),t}function qde(e){return{cache:Hde(e.cacheSize),splitModifiers:Wde(e),...Bde(e)}}var Zde=/\s+/;function Xde(e,t){var n=t.splitModifiers,r=t.getClassGroupId,i=t.getConflictingClassGroupIds,l=new Set;return e.trim().split(Zde).map(function(c){var o=n(c),h=o.modifiers,p=o.hasImportantModifier,g=o.baseClassName,b=r(g);if(!b)return{isTailwindClass:!1,originalClassName:c};var w=Gde(h).join(":"),P=p?w+d9:w;return{isTailwindClass:!0,modifierId:P,classGroupId:b,originalClassName:c}}).reverse().filter(function(c){if(!c.isTailwindClass)return!0;var o=c.modifierId,h=c.classGroupId,p=o+h;return l.has(p)?!1:(l.add(p),i(h).forEach(function(g){return l.add(o+g)}),!0)}).reverse().map(function(c){return c.originalClassName}).join(" ")}function Yde(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i,l,c=o;function o(p){var g=t[0],b=t.slice(1),w=b.reduce(function(P,I){return I(P)},g());return r=qde(w),i=r.cache.get,l=r.cache.set,c=h,h(p)}function h(p){var g=i(p);if(g)return g;var b=Xde(p,r);return l(p,b),b}return function(){return c($de.apply(null,arguments))}}function Zr(e){var t=function(r){return r[e]||[]};return t.isThemeGetter=!0,t}var f9=/^\[(?:([a-z-]+):)?(.+)\]$/i,Qde=/^\d+\/\d+$/,Jde=new Set(["px","full","screen"]),efe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tfe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh)/,nfe=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function La(e){return sp(e)||Jde.has(e)||Qde.test(e)||Qu(e)}function Qu(e){return Rc(e,"length",sfe)}function rfe(e){return Rc(e,"size",h9)}function ife(e){return Rc(e,"position",h9)}function ofe(e){return Rc(e,"url",lfe)}function G_(e){return Rc(e,"number",sp)}function sp(e){return!Number.isNaN(Number(e))}function Rh(e){return JT(e)||Rc(e,"number",JT)}function bi(e){return f9.test(e)}function Ah(){return!0}function Il(e){return efe.test(e)}function afe(e){return Rc(e,"",ufe)}function Rc(e,t,n){var r=f9.exec(e);return r?r[1]?r[1]===t:n(r[2]):!1}function sfe(e){return tfe.test(e)}function h9(){return!1}function lfe(e){return e.startsWith("url(")}function JT(e){return Number.isInteger(Number(e))}function ufe(e){return nfe.test(e)}function cfe(){var e=Zr("colors"),t=Zr("spacing"),n=Zr("blur"),r=Zr("brightness"),i=Zr("borderColor"),l=Zr("borderRadius"),c=Zr("borderSpacing"),o=Zr("borderWidth"),h=Zr("contrast"),p=Zr("grayscale"),g=Zr("hueRotate"),b=Zr("invert"),w=Zr("gap"),P=Zr("gradientColorStops"),I=Zr("inset"),A=Zr("margin"),O=Zr("opacity"),M=Zr("padding"),R=Zr("saturate"),N=Zr("scale"),z=Zr("sepia"),B=Zr("skew"),U=Zr("space"),q=Zr("translate"),H=function(){return["auto","contain","none"]},te=function(){return["auto","hidden","clip","visible","scroll"]},Y=function(){return["auto",t]},le=function(){return["",La]},J=function(){return["auto",sp,bi]},Z=function(){return["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]},Q=function(){return["solid","dashed","dotted","double","none"]},ge=function(){return["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]},re=function(){return["start","end","center","between","around","evenly"]},de=function(){return["","0",bi]},oe=function(){return["auto","avoid","all","avoid-page","page","left","right","column"]},ye=function(){return[sp,G_]},Re=function(){return[sp,bi]};return{cacheSize:500,theme:{colors:[Ah],spacing:[La],blur:["none","",Il,Qu],brightness:ye(),borderColor:[e],borderRadius:["none","","full",Il,Qu],borderSpacing:[t],borderWidth:le(),contrast:ye(),grayscale:de(),hueRotate:Re(),invert:de(),gap:[t],gradientColorStops:[e],inset:Y(),margin:Y(),opacity:ye(),padding:[t],saturate:ye(),scale:ye(),sepia:de(),skew:Re(),space:[t],translate:[t]},classGroups:{aspect:[{aspect:["auto","square","video",bi]}],container:["container"],columns:[{columns:[Il]}],"break-after":[{"break-after":oe()}],"break-before":[{"break-before":oe()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat(Z(),[bi])}],overflow:[{overflow:te()}],"overflow-x":[{"overflow-x":te()}],"overflow-y":[{"overflow-y":te()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[I]}],"inset-x":[{"inset-x":[I]}],"inset-y":[{"inset-y":[I]}],top:[{top:[I]}],right:[{right:[I]}],bottom:[{bottom:[I]}],left:[{left:[I]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Rh]}],basis:[{basis:[t]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",bi]}],grow:[{grow:de()}],shrink:[{shrink:de()}],order:[{order:["first","last","none",Rh]}],"grid-cols":[{"grid-cols":[Ah]}],"col-start-end":[{col:["auto",{span:[Rh]},bi]}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":[Ah]}],"row-start-end":[{row:["auto",{span:[Rh]},bi]}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",bi]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",bi]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:re()}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:[].concat(re(),["baseline"])}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(re(),["baseline","stretch"])}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[M]}],px:[{px:[M]}],py:[{py:[M]}],pt:[{pt:[M]}],pr:[{pr:[M]}],pb:[{pb:[M]}],pl:[{pl:[M]}],m:[{m:[A]}],mx:[{mx:[A]}],my:[{my:[A]}],mt:[{mt:[A]}],mr:[{mr:[A]}],mb:[{mb:[A]}],ml:[{ml:[A]}],"space-x":[{"space-x":[U]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[U]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",t]}],"min-w":[{"min-w":["min","max","fit",La]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[Il]},Il,Qu]}],h:[{h:[t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",La]}],"max-h":[{"max-h":[t,"min","max","fit"]}],"font-size":[{text:["base",Il,Qu]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",G_]}],"font-family":[{font:[Ah]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Qu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",La]}],"list-style-type":[{list:["none","disc","decimal",bi]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[O]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[O]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(Q(),["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",La]}],"underline-offset":[{"underline-offset":["auto",La]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:[t]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Qu]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap"]}],break:[{break:["normal","words","all","keep"]}],content:[{content:["none",bi]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[O]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(Z(),[ife])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",rfe]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ofe]}],"bg-color":[{bg:[e]}],"gradient-from":[{from:[P]}],"gradient-via":[{via:[P]}],"gradient-to":[{to:[P]}],rounded:[{rounded:[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[O]}],"border-style":[{border:[].concat(Q(),["hidden"])}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[O]}],"divide-style":[{divide:Q()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:[""].concat(Q())}],"outline-offset":[{"outline-offset":[La]}],"outline-w":[{outline:[La]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:le()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[O]}],"ring-offset-w":[{"ring-offset":[La]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Il,afe]}],"shadow-color":[{shadow:[Ah]}],opacity:[{opacity:[O]}],"mix-blend":[{"mix-blend":ge()}],"bg-blend":[{"bg-blend":ge()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[h]}],"drop-shadow":[{"drop-shadow":["","none",Il,bi]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[g]}],invert:[{invert:[b]}],saturate:[{saturate:[R]}],sepia:[{sepia:[z]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[h]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[g]}],"backdrop-invert":[{"backdrop-invert":[b]}],"backdrop-opacity":[{"backdrop-opacity":[O]}],"backdrop-saturate":[{"backdrop-saturate":[R]}],"backdrop-sepia":[{"backdrop-sepia":[z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",bi]}],duration:[{duration:Re()}],ease:[{ease:["linear","in","out","in-out",bi]}],delay:[{delay:Re()}],animate:[{animate:["none","spin","ping","pulse","bounce",bi]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[N]}],"scale-x":[{"scale-x":[N]}],"scale-y":[{"scale-y":[N]}],rotate:[{rotate:[Rh,bi]}],"translate-x":[{"translate-x":[q]}],"translate-y":[{"translate-y":[q]}],"skew-x":[{"skew-x":[B]}],"skew-y":[{"skew-y":[B]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",bi]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",bi]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":[t]}],"scroll-mx":[{"scroll-mx":[t]}],"scroll-my":[{"scroll-my":[t]}],"scroll-mt":[{"scroll-mt":[t]}],"scroll-mr":[{"scroll-mr":[t]}],"scroll-mb":[{"scroll-mb":[t]}],"scroll-ml":[{"scroll-ml":[t]}],"scroll-p":[{"scroll-p":[t]}],"scroll-px":[{"scroll-px":[t]}],"scroll-py":[{"scroll-py":[t]}],"scroll-pt":[{"scroll-pt":[t]}],"scroll-pr":[{"scroll-pr":[t]}],"scroll-pb":[{"scroll-pb":[t]}],"scroll-pl":[{"scroll-pl":[t]}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","pinch-zoom","manipulation",{pan:["x","left","right","y","up","down"]}]}],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",bi]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[La,G_]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-t","rounded-r","rounded-b","rounded-l","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"]}}}var bc=Yde(cfe);const{Text:dfe}=z4,gu=({text:e,className:t,classNameText:n})=>E("div",{className:bc("mb-1",t),children:E(dfe,{type:"secondary",className:bc("uppercase text-xs",n),children:e})});function ffe(e,t,n){n===void 0&&(n={});var r={type:"Feature"};return(n.id===0||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function hfe(e,t,n){n===void 0&&(n={});for(var r=0,i=e;r<i.length;r++){var l=i[r];if(l.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var c=0;c<l[l.length-1].length;c++)if(l[l.length-1][c]!==l[0][c])throw new Error("First and last Position are not equivalent.")}var o={type:"Polygon",coordinates:e};return ffe(o,t,n)}function p9(e,t,n){if(e!==null)for(var r,i,l,c,o,h,p,g=0,b=0,w,P=e.type,I=P==="FeatureCollection",A=P==="Feature",O=I?e.features.length:1,M=0;M<O;M++){p=I?e.features[M].geometry:A?e.geometry:e,w=p?p.type==="GeometryCollection":!1,o=w?p.geometries.length:1;for(var R=0;R<o;R++){var N=0,z=0;if(c=w?p.geometries[R]:p,c!==null){h=c.coordinates;var B=c.type;switch(g=n&&(B==="Polygon"||B==="MultiPolygon")?1:0,B){case null:break;case"Point":if(t(h,b,M,N,z)===!1)return!1;b++,N++;break;case"LineString":case"MultiPoint":for(r=0;r<h.length;r++){if(t(h[r],b,M,N,z)===!1)return!1;b++,B==="MultiPoint"&&N++}B==="LineString"&&N++;break;case"Polygon":case"MultiLineString":for(r=0;r<h.length;r++){for(i=0;i<h[r].length-g;i++){if(t(h[r][i],b,M,N,z)===!1)return!1;b++}B==="MultiLineString"&&N++,B==="Polygon"&&z++}B==="Polygon"&&N++;break;case"MultiPolygon":for(r=0;r<h.length;r++){for(z=0,i=0;i<h[r].length;i++){for(l=0;l<h[r][i].length-g;l++){if(t(h[r][i][l],b,M,N,z)===!1)return!1;b++}z++}N++}break;case"GeometryCollection":for(r=0;r<c.geometries.length;r++)if(p9(c.geometries[r],t,n)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Tw(e){var t=[1/0,1/0,-1/0,-1/0];return p9(e,function(n){t[0]>n[0]&&(t[0]=n[0]),t[1]>n[1]&&(t[1]=n[1]),t[2]<n[0]&&(t[2]=n[0]),t[3]<n[1]&&(t[3]=n[1])}),t}Tw.default=Tw;var Cf={exports:{}};Cf.exports=m9;Cf.exports.parse=m9;Cf.exports.stringify=v9;var eP=/[-+]?([0-9]*\.[0-9]+|[0-9]+)([eE][-+]?[0-9]+)?/,tP=new RegExp("^"+eP.source+"(\\s"+eP.source+"){1,}");function m9(e){var t=e.split(";"),n=t.pop(),r=(t.shift()||"").split("=").pop(),i=0;function l(R){var N=n.substring(i).match(R);return N?(i+=N[0].length,N[0]):null}function c(R){return R&&r.match(/\d+/)&&(R.crs={type:"name",properties:{name:"urn:ogc:def:crs:EPSG::"+r}}),R}function o(){l(/^\s*/)}function h(){o();for(var R=0,N=[],z=[N],B=N,U;U=l(/^(\()/)||l(/^(\))/)||l(/^(,)/)||l(tP);){if(U==="(")z.push(B),B=[],z[z.length-1].push(B),R++;else if(U===")"){if(B.length===0||(B=z.pop(),!B))return null;if(R--,R===0)break}else if(U===",")B=[],z[z.length-1].push(B);else if(!U.split(/\s/g).some(isNaN))Array.prototype.push.apply(B,U.split(/\s/g).map(parseFloat));else return null;o()}return R!==0?null:N}function p(){for(var R=[],N,z;z=l(tP)||l(/^(,)/);)z===","?(R.push(N),N=[]):z.split(/\s/g).some(isNaN)||(N||(N=[]),Array.prototype.push.apply(N,z.split(/\s/g).map(parseFloat))),o();if(N)R.push(N);else return null;return R.length?R:null}function g(){if(!l(/^(point(\sz)?)/i)||(o(),!l(/^(\()/)))return null;var R=p();return!R||(o(),!l(/^(\))/))?null:{type:"Point",coordinates:R[0]}}function b(){if(!l(/^(multipoint)/i))return null;o();var R=n.substring(n.indexOf("(")+1,n.length-1).replace(/\(/g,"").replace(/\)/g,"");n="MULTIPOINT ("+R+")";var N=h();return N?(o(),{type:"MultiPoint",coordinates:N}):null}function w(){if(!l(/^(multilinestring)/i))return null;o();var R=h();return R?(o(),{type:"MultiLineString",coordinates:R}):null}function P(){if(!l(/^(linestring(\sz)?)/i)||(o(),!l(/^(\()/)))return null;var R=p();return!R||!l(/^(\))/)?null:{type:"LineString",coordinates:R}}function I(){if(!l(/^(polygon(\sz)?)/i))return null;o();var R=h();return R?{type:"Polygon",coordinates:R}:null}function A(){if(!l(/^(multipolygon)/i))return null;o();var R=h();return R?{type:"MultiPolygon",coordinates:R}:null}function O(){var R=[],N;if(!l(/^(geometrycollection)/i)||(o(),!l(/^(\()/)))return null;for(;N=M();)R.push(N),o(),l(/^(,)/),o();return l(/^(\))/)?{type:"GeometryCollection",geometries:R}:null}function M(){return g()||P()||I()||b()||w()||A()||O()}return c(M())}function v9(e){e.type==="Feature"&&(e=e.geometry);function t(c){return c.join(" ")}function n(c){return c.map(t).join(", ")}function r(c){return c.map(n).map(l).join(", ")}function i(c){return c.map(r).map(l).join(", ")}function l(c){return"("+c+")"}switch(e.type){case"Point":return"POINT ("+t(e.coordinates)+")";case"LineString":return"LINESTRING ("+n(e.coordinates)+")";case"Polygon":return"POLYGON ("+r(e.coordinates)+")";case"MultiPoint":return"MULTIPOINT ("+n(e.coordinates)+")";case"MultiPolygon":return"MULTIPOLYGON ("+i(e.coordinates)+")";case"MultiLineString":return"MULTILINESTRING ("+r(e.coordinates)+")";case"GeometryCollection":return"GEOMETRYCOLLECTION ("+e.geometries.map(v9).join(", ")+")";default:throw new Error("stringify requires a valid GeoJSON Feature or geometry object as input")}}const{TreeNode:nP}=WO,pfe=e=>e?e.reduce((t,n)=>(t[n.id]=n,t[n.id].type="ao",n.rayons&&n.rayons.forEach(r=>{t[r.id]=r,t[r.id].type="rayon"}),t),{}):{},mfe=({disabled:e})=>{const{map:t}=o3(),{filters:{region:n},setRegion:r}=Oi(),[i,l]=C.exports.useState([]),c=C.exports.useMemo(()=>pfe(i),[i]),[o,h]=C.exports.useState(!1);C.exports.useEffect(()=>{(async()=>{h(!0);try{const w=await Jo.get("/api/ao_rayons");l(w.data)}catch(w){console.error(w)}finally{h(!1)}})()},[]);const p=b=>{if(!b)return;const w=c[b],P=Cf.exports(w.polygon),I=hfe(P.coordinates[0]),A=Tw(I);r({id:b,geometry:I,type:w.type}),t.fitBounds([[A[0],A[1]],[A[2],A[3]]],{padding:20})},g=()=>r(null);return Qe("div",{children:[E(gu,{text:"\u0410\u041E / \u0440\u0430\u0439\u043E\u043D"}),E(WO,{showSearch:!0,style:{width:"100%"},value:n==null?void 0:n.id,dropdownStyle:{maxHeight:400,overflow:"auto"},placeholder:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0410\u041E \u0438\u043B\u0438 \u0440\u0430\u0439\u043E\u043D",allowClear:!0,treeDefaultExpandAll:!1,onChange:p,loading:o,treeNodeFilterProp:"title",onClear:g,notFoundContent:E(ss,{image:ss.PRESENTED_IMAGE_SIMPLE,description:"\u041D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E"}),disabled:e,children:i==null?void 0:i.map(b=>{var w;return E(nP,{value:b.id,title:b.name,children:(w=b.rayons)==null?void 0:w.map(P=>E(nP,{value:P.id,title:P.name},P.id))},b.id)})})]})},vfe=Object.entries(qN).map(([e,t])=>({value:t,label:t})),gfe=({disabled:e})=>{const{filters:t,setCategories:n}=Oi();return Qe("div",{children:[E(gu,{text:"\u041A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u0438"}),E(tl,{mode:"tags",style:{width:"100%"},placeholder:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u0438 \u043B\u043E\u043A\u0430\u0446\u0438\u0439",onChange:n,options:vfe,allowClear:!0,value:t.categories,disabled:e})]})},Vs=({value:e})=>E("span",{className:"text-grey text-xs",children:e}),rP=(e,t)=>{if(Array.isArray(t)){const[n,r]=t;return{...e,[n]:E(Vs,{value:n}),[r]:E(Vs,{value:r})}}else return{...e,[t]:E(Vs,{value:t})}},d1=({title:e,value:t,onChange:n,onAfterChange:r,min:i=0,max:l=100,range:c=!1,step:o=1,disabled:h=!1,onMouseEnter:p,onMouseLeave:g,showZeroMark:b=!1})=>{const w={[i]:E(Vs,{value:i}),[l]:E(Vs,{value:l})},[P,I]=C.exports.useState(t),[A,O]=C.exports.useState(rP(w,t));C.exports.useEffect(()=>{I(t),O(rP(w,t))},[t]);const M=z=>{if(Array.isArray(z)){const[B,U]=z;O({...w,[B]:E(Vs,{value:B}),[U]:E(Vs,{value:U})})}else O({...w,[z]:E(Vs,{value:z})});r==null||r(z)},R=z=>{I(z),n==null||n(z)},N=b?{...A,0:E(Vs,{value:0})}:A;return Qe("div",{onMouseEnter:p,onMouseLeave:g,children:[E(gu,{text:e}),E(TQ,{range:c,value:P,marks:N,onChange:R,onAfterChange:M,min:i,max:l,step:o,disabled:h})]})},yfe=({disabled:e,fullRange:t})=>{const{filters:{prediction:n},setPrediction:r}=Oi(),i=l=>r(l);return C.exports.useEffect(()=>{if(!t)return;const l=t.prediction_current[0],c=t.prediction_current[1];n[0]===rl.prediction[0]&&n[1]===rl.prediction[1]&&r([l,c])},[t]),E(d1,{title:"\u041F\u0440\u043E\u0433\u043D\u043E\u0437\u043D\u044B\u0439 \u0442\u0440\u0430\u0444\u0438\u043A",value:n,onAfterChange:i,min:t==null?void 0:t.prediction_current[0],max:t==null?void 0:t.prediction_current[1],range:!0,disabled:e})},xfe=e=>({mode:Yr.INITIAL,setMode:t=>{e(n=>{n.mode=t})}}),yu=mu(vu(xfe)),_fe=({fullRange:e})=>{const{filters:{deltaTraffic:t},setDeltaTraffic:n}=Oi(),r=i=>n(i);return C.exports.useEffect(()=>{if(!e)return;const i=e.delta_current[0],l=e.delta_current[1];t[0]===rl.deltaTraffic[0]&&t[1]===rl.deltaTraffic[1]&&n([i,l])},[e,t]),E(d1,{title:"\u0420\u0430\u0441\u0445\u043E\u0436\u0434\u0435\u043D\u0438\u0435 \u0444\u0430\u043A\u0442\u0430 \u0441 \u043F\u0440\u043E\u0433\u043D\u043E\u0437\u043E\u043C, %",value:t,onAfterChange:r,min:e==null?void 0:e.delta_current[0],max:e==null?void 0:e.delta_current[1],range:!0,showZeroMark:!0})},bfe=({fullRange:e})=>{const{filters:{factTraffic:t},setFactTraffic:n}=Oi(),r=i=>n(i);return C.exports.useEffect(()=>{if(!e)return;const i=e.fact[0],l=e.fact[1];t[0]===rl.factTraffic[0]&&t[1]===rl.factTraffic[1]&&n([i,l])},[e,t]),E(d1,{title:"\u0424\u0430\u043A\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0442\u0440\u0430\u0444\u0438\u043A",value:t,onAfterChange:r,min:e==null?void 0:e.fact[0],max:e==null?void 0:e.fact[1],range:!0})},wfe=({fullRange:e})=>{const{filters:{age:t},setAge:n}=Oi(),r=i=>n(i);return C.exports.useEffect(()=>{if(!e)return;const i=e.age_day[0],l=e.age_day[1];t[0]===rl.age[0]&&t[1]===rl.age[1]&&n([i,l])},[e,t]),E(d1,{title:"\u0417\u0440\u0435\u043B\u043E\u0441\u0442\u044C \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u0430, \u0434\u043D\u0435\u0439",value:t,onAfterChange:r,min:e==null?void 0:e.age_day[0],max:e==null?void 0:e.age_day[1],range:!0})},Cfe=({disabled:e})=>{const[t,n]=C.exports.useState(!1),{mode:r}=yu();C.exports.useEffect(()=>{const o=setTimeout(()=>n(!1),1500);return()=>clearTimeout(o)},[t]);const{data:i}=Sa(["max-min"],async()=>{const{data:o}=await Jo.get("/api/placement_points/filters/");return o});return E(oo,{title:fce,placement:"right",open:e&&t,onMouseEnter:()=>{n(!0)},onMouseLeave:()=>{n(!1)},children:Qe("div",{className:"space-y-5",children:[E(mfe,{disabled:e}),r===Yr.INITIAL&&Qe($n,{children:[E(gfe,{disabled:e}),E(yfe,{disabled:e,fullRange:i})]}),r===Yr.WORKING&&Qe("div",{className:"space-y-12",children:[E(_fe,{fullRange:i}),E(bfe,{fullRange:i}),E(wfe,{fullRange:i})]})]})})},g9=({width:e=40,height:t=40})=>E("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:t,children:Qe("g",{children:[E("polygon",{style:{fill:"#3B555E"},points:"19.6,24 21.4,24 22.5,23.9 23,23.8 23.5,23.4 23.8,22.9 24,22.3 24,20.4 24,1.9 23.9,1.4 23.6,0.8 23.3,0.4 22.9,0.1 22.3,0 14.2,0 8.9,0 11.2,4.6 19.5,4.5 19.6,4.5 "}),E("polygon",{style:{fill:"#E63941"},points:"13.6,6.4 17.7,6.4 16.2,9.4 14.1,14.2 12.3,18.4 11.7,18.4 9.8,14.5 6.8,8.8 4.5,4.5 4.7,23.9 1.7,24 1,23.8 0.5,23.2 0.2,22.7 0,22.1 0,1.8 0.1,1.3 0.4,0.8 0.8,0.4 1.1,0.2 1.4,0.1 2,0.1 7,0.1 11.9,10.6 "})]})}),Sfe=({width:e=24,height:t=24})=>Qe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:t,children:[E("polygon",{className:"ai-st0",points:"11.4,3.1 11.4,4.6 11.4,17.8 11.1,18.6 10.9,19.2 10.4,19.8 9.9,20.1 9.2,20.3 8.6,20.3 8.2,20.3 7.6,20.3 7,19.8 6.6,19.3 6.2,18.7 5.4,18.7 4.9,18.4 4.4,18 4.1,17.6 3.9,17.1 3.9,16 3.4,15.4 3,14.9 2,13.4 1.8,12.6 1.4,11.8 1.4,9.9 1.4,9 1.9,8.3 2.5,7.7 3,7.3 2.9,6.5 2.8,5.7 3,5.1 3.4,4.7 4.1,4.3 5,4.1 5.6,4 5.6,3.3 5.8,2.7 6.4,1.9 7,1.3 7.6,1.1 8.4,0.9 8.9,0.9 9.4,1.1 10.1,1.5 10.8,2.1 "}),E("polyline",{className:"ai-st0",points:"17.4,3 16.1,4.7 11.5,4.6 "}),E("polyline",{className:"ai-st0",points:"11.2,8.7 16,8.6 19.8,12.3 "}),E("line",{className:"ai-st0",x1:"11.2",y1:"12.2",x2:"13.4",y2:"12.2"}),E("polyline",{className:"ai-st0",points:"11.4,16.6 14.8,16.6 16.4,18.2 "}),Qe("g",{children:[E("circle",{className:"ai-st1",cx:"18.1",cy:"2",r:"1.9"}),E("circle",{className:"ai-st2",cx:"18.1",cy:"1.9",r:"1.1"})]}),Qe("g",{children:[E("circle",{className:"ai-st1",cx:"18.5",cy:"6.5",r:"1.9"}),E("circle",{className:"ai-st2",cx:"18.5",cy:"6.4",r:"1.1"})]}),Qe("g",{children:[E("circle",{className:"ai-st1",cx:"20.8",cy:"13.3",r:"1.9"}),E("circle",{className:"ai-st2",cx:"20.9",cy:"13.3",r:"1.1"})]}),Qe("g",{children:[E("circle",{className:"ai-st1",cx:"15",cy:"12.2",r:"1.9"}),E("circle",{className:"ai-st2",cx:"15",cy:"12.1",r:"1.1"})]}),Qe("g",{children:[E("circle",{className:"ai-st1",cx:"17.4",cy:"19.2",r:"1.9"}),E("circle",{className:"ai-st2",cx:"17.4",cy:"19.2",r:"1.1"})]}),Qe("g",{children:[E("circle",{className:"ai-st1",cx:"13",cy:"22",r:"1.9"}),E("circle",{className:"ai-st2",cx:"13.1",cy:"22",r:"1.1"})]}),E("polyline",{className:"ai-st0",points:"5.9,8.1 4.5,9.5 4.4,11.2 4.8,12.4 6.5,14.8 "})]});const Efe=({width:e=24,height:t=24})=>Qe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"-293 385 24 24",width:e,height:t,className:"ml-[2px] mt-[2px]",children:[E("polyline",{className:"approve-st0",points:"-273.7,390.2 -273.7,388.3 -274,387.5 -274.7,387 -275.8,387 -290.4,387 -291.1,387.2 -291.8,387.6 -292.2,388.3 -292.3,403.6 -292.2,404.4 -291.9,404.9 -291.3,405.2 -290.8,405.3 -275.9,405.3 -275.1,405.2 -274.3,404.9 -273.8,404.3 -273.8,402.3 "}),E("path",{className:"approve-st1",d:"M-287.2,397h-1.2c-0.4,0-0.7-0.3-0.7-0.7v-1.2c0-0.4,0.3-0.7,0.7-0.7h1.2c0.4,0,0.7,0.3,0.7,0.7v1.2 C-286.6,396.7-286.9,397-287.2,397z"}),E("path",{className:"approve-st1",d:"M-287.2,400.5h-1.2c-0.4,0-0.7-0.3-0.7-0.7v-1.2c0-0.4,0.3-0.7,0.7-0.7h1.2c0.4,0,0.7,0.3,0.7,0.7v1.2 C-286.5,400.2-286.8,400.5-287.2,400.5z"}),E("polygon",{className:"approve-st2",points:"-288.7,390.7 -288.3,391.2 -288.2,391.3 -288,391.3 -287.6,391.2 -287.2,390.7 -286.7,390.3 -286.5,390.3 -286.2,390.3 -286,390.5 -285.9,390.9 -286,391.1 -286.4,391.6 -287.9,392.9 -288.1,392.9 -288.3,392.9 -288.6,392.6 -289.6,391.6 -289.8,391.4 -289.8,391 -289.6,390.7 -289.4,390.6 -289.1,390.5 -288.9,390.5 "}),E("polygon",{className:"approve-st3",points:"-283.9,390.9 -279.1,390.9 -278.8,391.1 -278.7,391.3 -278.6,391.8 -278.7,392 -279,392.4 -279.2,392.5 -279.6,392.5 -284,392.5 -284.2,392.5 -284.5,392.3 -284.7,391.9 -284.7,391.7 -284.6,391.5 -284.3,391.1 -284.1,390.9 "}),E("polygon",{className:"approve-st3",points:"-284,394.4 -280,394.4 -279.8,394.6 -279.7,394.8 -279.6,395.2 -279.7,395.5 -279.9,395.9 -280.1,396 -280.4,396 -284.1,396 -284.3,395.9 -284.5,395.7 -284.7,395.4 -284.7,395.2 -284.6,394.9 -284.4,394.6 -284.2,394.4 "}),E("polygon",{className:"approve-st3",points:"-284.1,397.9 -280.9,397.9 -280.7,398.1 -280.6,398.3 -280.6,398.7 -280.6,399 -280.8,399.4 -280.9,399.5 -281.2,399.5 -284.2,399.5 -284.3,399.4 -284.5,399.2 -284.7,398.9 -284.7,398.7 -284.6,398.4 -284.4,398.1 -284.3,397.9 "}),E("polygon",{className:"approve-st2",points:"-274.2,391.7 -273.4,391.6 -273.1,391.7 -273,392.7 -272.6,392.8 -272.1,393 -271.6,393.2 -271.1,392.6 -270.7,392.8 -270.4,393.1 -270.1,393.5 -270,393.7 -270.6,394.2 -270.5,394.6 -270.4,394.9 -270.3,395.4 -269.5,395.4 -269.4,395.7 -269.4,396.2 -269.4,396.4 -269.6,396.7 -269.6,396.9 -270.4,396.8 -270.5,397.3 -270.6,397.7 -270.8,397.9 -270.1,398.6 -270.3,398.9 -270.6,399.2 -271.1,399.5 -271.2,399.6 -271.7,399 -271.7,398.9 -272.1,399 -272.4,399.1 -272.8,399.2 -273,399.3 -273,400 -273.2,400.2 -274.2,400.2 -274.4,400 -274.4,399.3 -274.4,399.1 -275,398.9 -275.5,398.7 -275.9,399.4 -276.2,399.5 -276.5,399.3 -277.1,398.8 -277,398.5 -276.4,397.9 -276.8,397.5 -276.9,397.2 -277.1,396.8 -277.9,396.8 -278,396.3 -278,395.6 -277.8,395.3 -277,395.3 -276.7,394.6 -276.6,394.2 -276.9,393.9 -277.1,393.6 -277.2,393.5 -277.1,393.2 -276.7,392.7 -276.5,392.6 -276.2,392.7 -275.4,393.2 -275.1,392.9 -274.7,392.8 -274.5,392.7 -274.5,391.8 "}),E("circle",{className:"approve-st4",cx:"-273.8",cy:"396",r:"1.8"})]}),kfe=({width:e=24,height:t=24})=>Qe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"-293 385 24 24",width:e,height:t,children:[E("path",{className:"working-st0",d:"M-279.1,402.7"}),E("polyline",{className:"working-st1",points:"-275,391.8 -275,390.5 -275.3,389.9 -276,389.6 -277,389.5 -290.8,389.6 -291.4,389.7 -292.1,390 -292.5,390.4 -292.5,401.4 -292.5,401.9 -292.1,402.3 -291.6,402.5 -291.1,402.6 -280,402.5 "}),E("polyline",{className:"working-st2",points:"-290.8,396 -289.3,396 -288.7,398.4 -287.6,394.3 -286.1,399.7 -285.1,392 -284.2,397 -283.2,395.9 -281.8,396 "}),E("circle",{className:"working-st3",cx:"-277",cy:"397.6",r:"4.6"}),E("circle",{className:"working-st4",cx:"-277.1",cy:"397.5",r:"2.9"}),E("polygon",{className:"working-st3",points:"-270.9,405.7 -269,403.8 -273.5,399.6 -275.4,401 "})]}),y9=()=>{const{mode:e,setMode:t}=yu(),n=i=>{t(i)},r=i=>i===e?"primary":"default";return Qe($n,{children:[E(oo,{title:"\u041E\u0442\u0431\u043E\u0440 \u043B\u043E\u043A\u0430\u0446\u0438\u0439 \u0434\u043B\u044F \u0440\u0430\u0431\u043E\u0442\u044B",children:E(Br,{icon:E(Sfe,{}),type:r(Yr.INITIAL),onClick:()=>n(Yr.INITIAL),className:"flex items-center justify-center",size:"large"})}),E(oo,{title:"\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u043C\u0438 \u043B\u043E\u043A\u0430\u0446\u0438\u0439",children:E(Br,{icon:E(Efe,{}),type:r(Yr.APPROVE_WORKING),onClick:()=>n(Yr.APPROVE_WORKING),className:"flex items-center justify-center",size:"large"})}),E(oo,{title:"\u041C\u043E\u043D\u0438\u0442\u043E\u0440\u0438\u043D\u0433 \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0449\u0438\u0445 \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u043E\u0432",className:"text-center",children:E(Br,{icon:E(kfe,{}),type:r(Yr.WORKING),onClick:()=>n(Yr.WORKING),className:"flex items-center justify-center",size:"large"})})]})},Tfe=()=>Qe("div",{className:"mb-4 flex items-center justify-between",children:[E(g9,{}),E("div",{className:"flex items-center gap-x-3",children:E(y9,{})})]}),Pfe=()=>{const{data:e,isInitialLoading:t}=Hce(),{data:n,isInitialLoading:r}=Wce(),i=t||r,{selection:{excluded:l}}=xs();return Qe("div",{className:"flex items-center justify-between",children:[E("span",{children:"\u041E\u0442\u043E\u0431\u0440\u0430\u043D\u043E \u043B\u043E\u043A\u0430\u0446\u0438\u0439"}),i?E(P4,{}):E("span",{children:`${n-l.size} / ${e}`})]})},Ife={[mr.initial]:!0,[mr.approve]:!1,[mr.working]:!1},Mfe=e=>({isVisible:Ife,toggleVisibility:t=>e(n=>{n.isVisible[t]=!n.isVisible[t]}),setLayersVisibility:t=>e(n=>{t.visible.forEach(r=>{n.isVisible[r]=!0}),t.invisible.forEach(r=>{n.isVisible[r]=!1})})}),Sf=mu(vu(Mfe)),Rfe=C.exports.forwardRef(({isCollapsed:e},t)=>{const n=Kce(),{mode:r}=yu(),{reset:i}=xs(),{isVisible:l,toggleVisibility:c}=Sf();return Qe("div",{className:bc("h-screen p-3 overflow-y-auto shrink-0 border-solid border-border border-0 border-r-[1px] flex flex-col transition-all",e?"basis-0 p-0 -translate-x-[320px]":"basis-[320px] p-3"),ref:t,children:[E(Tfe,{}),Qe("div",{className:"space-y-5 flex flex-col justify-between flex-1",children:[Qe("div",{children:[E(Cfe,{disabled:n}),r===Yr.APPROVE_WORKING&&Qe("div",{className:"mt-4",children:[E(gu,{text:"\u0421\u0442\u0430\u0442\u0443\u0441\u044B"}),Qe("div",{className:"space-y-2",children:[E(xc,{onChange:()=>c(mr.approve),checked:l[mr.approve],children:"\u0421\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u0438\u0435-\u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430"}),E(xc,{className:"!ml-0",onChange:()=>c(mr.working),checked:l[mr.working],children:"\u0420\u0430\u0431\u043E\u0442\u0430\u0435\u0442"})]})]}),r===Yr.INITIAL&&n?E(Br,{block:!0,className:"mt-2",onClick:i,children:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0440\u0443\u0447\u043D\u043E\u0435 \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435"}):null]}),E("div",{children:r===Yr.INITIAL&&Qe($n,{children:[E(Pfe,{}),E(Fde,{})]})})]})]})}),Afe=5,Ofe=3,Nfe="#CC2222",Dfe="#CC2222",x9="#ff7d00",_9="#006e01",Lfe="#b4b4b4",iP={type:"circle",paint:{"circle-stroke-width":.4,"circle-stroke-color":"#fff","circle-opacity":.8}},vm=(e=Nfe,t=Afe)=>({...iP,paint:{...iP.paint,"circle-color":e,"circle-radius":t}}),Oh=vm(),zfe=vm(Lfe,Ofe),Ffe=vm(x9),$fe=vm(_9);vm(Dfe);const b9="#676767",oP={id:"ao",type:"line",source:"ao","source-layer":"public.service_ao",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":b9,"line-width":1.5,"line-opacity":.8}},aP={id:"rayon",type:"line",source:"rayon","source-layer":"public.service_rayon",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":b9,"line-width":.5,"line-opacity":.8}},sP={id:"selected-region",type:"line",source:"selected-region",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":"#CC2222","line-width":4}},Bfe={ao:"okrug_id",rayon:"rayon_id"},u3=()=>{const{filters:{region:e}}=Oi();return C.exports.useMemo(()=>e?["==",["get",Bfe[e.type]],e.id]:null,[e])},lP=["==",["get","status"],Fr.initial],Vfe=()=>{const{filters:e}=Oi(),{prediction:t,categories:n,region:r}=e,{selection:i}=xs(),l=[...i.included],c=[...i.excluded],o=u3(),h=["in",["get","location_id"],["literal",l]],p=["in",["get","location_id"],["literal",c]],g=[[">=",["get","prediction_current"],t[0]],["<=",["get","prediction_current"],t[1]]],b=n.length>0?["in",["get","category"],["literal",n]]:!0,w=["all",lP,["!",p],["any",r?["all",...g,b,o]:["all",...g,b],h]],P=["all",lP,["!",h],["any",["!",r?["all",...g,b,o]:["all",...g,b]],p]];return{match:w,unmatch:P}},Ufe=()=>{const{isVisible:e}=Sf(),{match:t,unmatch:n}=Vfe();return Qe($n,{children:[E(tu,{...Oh,id:mr["initial-unmatch"],source:"points","source-layer":"public.service_placementpoint",layout:{...Oh.layout,visibility:e[mr.initial]?"visible":"none"},filter:n,paint:zfe.paint}),E(tu,{...Oh,id:mr["initial-match"],source:"points","source-layer":"public.service_placementpoint",layout:{...Oh.layout,visibility:e[mr.initial]?"visible":"none"},filter:t,paint:Oh.paint})]})},uP=["==",["get","status"],Fr.approve],jfe=()=>{const{isVisible:e}=Sf(),t=u3(),n=t?["all",uP,t]:uP;return E($n,{children:E(tu,{...Ffe,id:mr.approve,source:"points","source-layer":"public.service_placementpoint",layout:{visibility:e[mr.approve]?"visible":"none"},filter:n})})},cP=["==",["get","status"],Fr.working],Kfe=()=>{const{isVisible:e}=Sf(),t=u3(),{filters:{deltaTraffic:n,factTraffic:r,age:i}}=Oi(),l=[[">=",["get","delta_current"],n[0]],["<=",["get","delta_current"],n[1]]],c=[[">=",["get","fact"],r[0]],["<=",["get","fact"],r[1]]],o=[[">=",["get","age_day"],i[0]],["<=",["get","age_day"],i[1]]],h=t?["all",cP,...l,...c,...o,t]:["all",cP,...l,...c,...o];return E($n,{children:E(tu,{...$fe,id:mr.working,source:"points","source-layer":"public.service_placementpoint",layout:{visibility:e[mr.working]?"visible":"none"},filter:h})})},Hfe=()=>{const{updateCounter:e}=l9();return E($n,{children:Qe(ap,{id:"points",type:"vector",tiles:[`${Uy}/martin/public.service_placementpoint/{z}/{x}/{y}.pbf`],children:[E(Ufe,{}),E(jfe,{}),E(Kfe,{})]},`points-${e}`)})},Wfe=()=>{const{filters:{prediction:e,region:t}}=Oi();return Qe($n,{children:[E(ap,{id:"ao",type:"vector",tiles:[`${Uy}/martin/public.service_ao/{z}/{x}/{y}.pbf`],children:E(tu,{...oP,layout:{...oP.layout}})}),E(ap,{id:"rayon",type:"vector",tiles:[`${Uy}/martin/public.service_rayon/{z}/{x}/{y}.pbf`],children:E(tu,{...aP,layout:{...aP.layout}})}),t&&t.geometry&&E(ap,{id:"selected-region",type:"geojson",data:t.geometry,children:E(tu,{...sP,layout:{...sP.layout,visibility:t?"visible":"none"}})}),E(Hfe,{prediction:e})]})},Gfe=({lat:e,lng:t,onClose:n,children:r})=>E(kde,{longitude:t,latitude:e,onClose:n,closeOnClick:!1,style:{minWidth:"300px"},children:r}),qfe=e=>({clickedPointConfig:null,setClickedPointConfig:(t,n=!0)=>{e(r=>{if(t===null)return r.clickedPointConfig=null,r;r.clickedPointConfig={id:t,shouldSelect:n}})}}),xu=mu(vu(qfe)),Zfe=[{name:"Id",field:"location_id"},{name:"\u0410\u0434\u0440\u0435\u0441",field:"address"},{name:"\u0420\u0430\u0439\u043E\u043D",field:"rayon_id"},{name:"\u041E\u043A\u0440\u0443\u0433",field:"okrug_id"},{name:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",field:"name"},{name:"\u041A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u044F",field:"category"},{name:"\u0421\u0442\u0430\u0442\u0443\u0441",field:"status"},{name:"\u041F\u0440\u043E\u0433\u043D\u043E\u0437\u043D\u044B\u0439 \u0442\u0440\u0430\u0444\u0438\u043A",field:"prediction_current"}],Xfe=[{name:"Id",field:"location_id"},{name:"\u0410\u0434\u0440\u0435\u0441",field:"address"},{name:"\u0420\u0430\u0439\u043E\u043D",field:"rayon_id"},{name:"\u041E\u043A\u0440\u0443\u0433",field:"okrug_id"},{name:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",field:"name"},{name:"\u041A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u044F",field:"category"},{name:"\u0421\u0442\u0430\u0442\u0443\u0441",field:"status"},{name:"\u041F\u0440\u043E\u0433\u043D\u043E\u0437\u043D\u044B\u0439 \u0442\u0440\u0430\u0444\u0438\u043A",field:"prediction_current"},{name:"\u041A\u043E\u043B-\u0432\u043E \u043A\u0432\u0430\u0440\u0442\u0438\u0440",field:"flat_cnt"},{name:"\u0413\u043E\u0434 \u043F\u043E\u0441\u0442\u0440\u043E\u0439\u043A\u0438",field:"year_bld"},{name:"\u041A\u043E\u043B-\u0432\u043E \u044D\u0442\u0430\u0436\u0435\u0439",field:"levels"},{name:"\u041C\u0430\u0442\u0435\u0440\u0438\u0430\u043B \u0441\u0442\u0435\u043D",field:"mat_nes"}],Yfe=[{name:"\u0424\u0430\u043A\u0442",field:"fact"},{name:"\u0420\u0430\u0441\u0445\u043E\u0436\u0434\u0435\u043D\u0438\u0435 \u0441 \u043F\u0440\u043E\u0433\u043D\u043E\u0437\u043E\u043C",field:"delta_current"},{name:"\u0417\u0440\u0435\u043B\u043E\u0441\u0442\u044C",field:"age_day"}],c3=({feature:e,dynamicStatus:t})=>{const n=e.properties.category===qN.residential,r=e.properties.status===Fr.working,i=n?Xfe:Zfe,l=r?[...i,...Yfe]:i;return E("div",{children:l.map(({field:c,name:o})=>{const h=t&&c==="status"?t:e.properties[c];return Qe(lA,{className:bc("p-1"),children:[E(Py,{className:"font-semibold",span:12,children:o}),E(Py,{span:12,children:h})]},c)})})},Qfe=({feature:e})=>{const{include:t,selection:n,exclude:r}=xs(),{setClickedPointConfig:i}=xu(),l=e.layer.id===mr["initial-match"],c=e.properties.location_id;C.exports.useEffect(()=>i(c,l),[e]);const o=(l||n.included.has(c))&&!n.excluded.has(c);return Qe($n,{children:[E(c3,{feature:e}),E(Br,{type:"primary",className:"mt-2 mx-auto",block:!0,onClick:()=>{o?r(c):t(c)},children:o?"\u0418\u0441\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0438\u0437 \u0432\u044B\u0431\u043E\u0440\u043A\u0438":"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0432 \u0432\u044B\u0431\u043E\u0440\u043A\u0443"})]})};let dP=e=>typeof e=="object"&&e!=null&&e.nodeType===1,fP=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",q_=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return fP(n.overflowY,t)||fP(n.overflowX,t)||(r=>{let i=(l=>{if(!l.ownerDocument||!l.ownerDocument.defaultView)return null;try{return l.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(e)}return!1},sg=(e,t,n,r,i,l,c,o)=>l<e&&c>t||l>e&&c<t?0:l<=e&&o<=n||c>=t&&o>=n?l-e-r:c>t&&o<n||l<e&&o>n?c-t+i:0,Jfe=e=>{let t=e.parentElement;return t==null?e.getRootNode().host||null:t},hP=(e,t)=>{var n,r,i,l;if(typeof document>"u")return[];let{scrollMode:c,block:o,inline:h,boundary:p,skipOverflowHiddenElements:g}=t,b=typeof p=="function"?p:J=>J!==p;if(!dP(e))throw new TypeError("Invalid target");let w=document.scrollingElement||document.documentElement,P=[],I=e;for(;dP(I)&&b(I);){if(I=Jfe(I),I===w){P.push(I);break}I!=null&&I===document.body&&q_(I)&&!q_(document.documentElement)||I!=null&&q_(I,g)&&P.push(I)}let A=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,O=(l=(i=window.visualViewport)==null?void 0:i.height)!=null?l:innerHeight,{scrollX:M,scrollY:R}=window,{height:N,width:z,top:B,right:U,bottom:q,left:H}=e.getBoundingClientRect(),te=o==="start"||o==="nearest"?B:o==="end"?q:B+N/2,Y=h==="center"?H+z/2:h==="end"?U:H,le=[];for(let J=0;J<P.length;J++){let Z=P[J],{height:Q,width:ge,top:re,right:de,bottom:oe,left:ye}=Z.getBoundingClientRect();if(c==="if-needed"&&B>=0&&H>=0&&q<=O&&U<=A&&B>=re&&q<=oe&&H>=ye&&U<=de)return le;let Re=getComputedStyle(Z),Te=parseInt(Re.borderLeftWidth,10),ke=parseInt(Re.borderTopWidth,10),De=parseInt(Re.borderRightWidth,10),Me=parseInt(Re.borderBottomWidth,10),Ne=0,Le=0,Ve="offsetWidth"in Z?Z.offsetWidth-Z.clientWidth-Te-De:0,qe="offsetHeight"in Z?Z.offsetHeight-Z.clientHeight-ke-Me:0,Ue="offsetWidth"in Z?Z.offsetWidth===0?0:ge/Z.offsetWidth:0,ct="offsetHeight"in Z?Z.offsetHeight===0?0:Q/Z.offsetHeight:0;if(w===Z)Ne=o==="start"?te:o==="end"?te-O:o==="nearest"?sg(R,R+O,O,ke,Me,R+te,R+te+N,N):te-O/2,Le=h==="start"?Y:h==="center"?Y-A/2:h==="end"?Y-A:sg(M,M+A,A,Te,De,M+Y,M+Y+z,z),Ne=Math.max(0,Ne+R),Le=Math.max(0,Le+M);else{Ne=o==="start"?te-re-ke:o==="end"?te-oe+Me+qe:o==="nearest"?sg(re,oe,Q,ke,Me+qe,te,te+N,N):te-(re+Q/2)+qe/2,Le=h==="start"?Y-ye-Te:h==="center"?Y-(ye+ge/2)+Ve/2:h==="end"?Y-de+De+Ve:sg(ye,de,ge,Te,De+Ve,Y,Y+z,z);let{scrollLeft:pt,scrollTop:Tt}=Z;Ne=Math.max(0,Math.min(Tt+Ne/ct,Z.scrollHeight-Q/ct+qe)),Le=Math.max(0,Math.min(pt+Le/Ue,Z.scrollWidth-ge/Ue+Ve)),te+=Tt-Ne,Y+=pt-Le}le.push({el:Z,top:Ne,left:Le})}return le},ehe=e=>typeof e=="object"&&typeof e.behavior=="function",the=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function nhe(e,t){if(!e.isConnected||!e.ownerDocument.documentElement.contains(e))return;if(ehe(t))return t.behavior(hP(e,t));let n=typeof t=="boolean"||t==null?void 0:t.behavior;for(let{el:r,top:i,left:l}of hP(e,the(t)))r.scroll({top:i,left:l,behavior:n})}function rhe(e,t){const n=window.document.createElement("a");n.href=window.URL.createObjectURL(new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})),n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)}const d3=e=>{rhe("postamates.xlsx",e)},ihe=({provider:e})=>{const[t,n]=C.exports.useState(!1);return e(t,()=>n(!1)),E(oo,{title:"\u0421\u043A\u0430\u0447\u0430\u0442\u044C \u0434\u0430\u043D\u043D\u044B\u0435",children:E(Br,{onClick:i=>{i.stopPropagation(),n(!0)},loading:t,disabled:t,children:E(nle,{})})})},ohe={isOpened:!1,fullScreen:!1},ahe=e=>({tableState:ohe,toggleOpened:t=>{e(n=>{n.tableState.isOpened=t[0]==="opened"})},toggleFullScreen:()=>{e(t=>{t.tableState.fullScreen=!t.tableState.fullScreen})},openTable:()=>{e(t=>{t.tableState.isOpened=!0})}}),f3=mu(vu(ahe)),she=()=>{const{tableState:{fullScreen:e},toggleFullScreen:t}=f3();return E(oo,{title:"\u0420\u0430\u0441\u043A\u0440\u044B\u0442\u044C \u043D\u0430 \u043F\u043E\u043B\u043D\u044B\u0439 \u044D\u043A\u0440\u0430\u043D",placement:"topRight",children:E(Br,{onClick:r=>{r.stopPropagation(),t()},children:e?E(ole,{}):E(lle,{})})})},f1=({leftColumn:e,rightColumn:t,exportProvider:n,classes:r})=>Qe("div",{className:"flex items-center w-full justify-between",children:[Qe("div",{className:r==null?void 0:r.leftColumn,children:[E("span",{className:"py-[5px]",children:"\u0422\u0430\u0431\u043B\u0438\u0446\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043E\u0432"}),e]}),Qe("div",{className:r==null?void 0:r.rightColumn,children:[t,Qe("div",{className:"flex items-center gap-x-1",children:[n&&E(ihe,{provider:n}),E(she,{})]})]})]}),h3=tr.memo(({rowSelection:e,data:t,pageSize:n,isClickedPointLoading:r,page:i,onPageChange:l,columns:c,header:o,fullWidth:h,loading:p})=>{const{clickedPointConfig:g}=xu(),{map:b}=o3(),{tableState:w,toggleOpened:P}=f3(),I={y:w.fullScreen?"calc(100vh - 136px)":"200px",x:"max-content"};return C.exports.useEffect(()=>{if(g===null||r)return;const A=document.querySelector(".scroll-row");A&&nhe(A,{behavior:"smooth"})},[g,t]),E(B5,{bordered:!1,onChange:P,defaultActiveKey:w.isOpened?"opened":null,children:E(B5.Panel,{header:o||E(f1,{}),children:E(Rae,{size:"small",locale:{emptyText:E(ss,{description:"\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445"})},pagination:{pageSize:n,current:i,onChange:l,total:t==null?void 0:t.count,showSizeChanger:!1,position:"bottomCenter"},dataSource:t==null?void 0:t.results,columns:c,rowKey:"location_id",scroll:I,sticky:!0,onRow:A=>({onClick:()=>{const O=Cf.exports(A.geometry);b.flyTo({center:[O.coordinates[0],O.coordinates[1]],zoom:13,essential:!0})}}),rowSelection:e,rowClassName:A=>bc("cursor-pointer",A.location_id===(g==null?void 0:g.id)&&"scroll-row"),"data-fullwidth":h,loading:p})},"opened")})}),w9=[{title:"\u0410\u0434\u0440\u0435\u0441",dataIndex:"address",key:"address",width:200},{title:"\u0420\u0430\u0439\u043E\u043D",dataIndex:"rayon",key:"rayon",width:"120px",ellipsis:!0},{title:"\u041E\u043A\u0440\u0443\u0433",dataIndex:"okrug",key:"okrug",width:"120px",ellipsis:!0},{title:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",dataIndex:"name",key:"name",width:"120px",ellipsis:!0},{title:"\u041A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u044F",dataIndex:"category",key:"category",width:"120px",ellipsis:!0},{title:"\u0421\u0442\u0430\u0442\u0443\u0441",dataIndex:"status",key:"status",width:"120px",ellipsis:!0},{title:"\u041F\u0440\u043E\u0433\u043D\u043E\u0437\u043D\u044B\u0439 \u0442\u0440\u0430\u0444\u0438\u043A",dataIndex:"prediction_current",key:"prediction_current",width:"120px",ellipsis:!0}],h1=30,lhe=(e,t)=>{const{clickedPointConfig:n}=xu(),{data:r,isInitialLoading:i,isFetching:l}=Sa(["clicked-point",n==null?void 0:n.id],async()=>{const c=new URLSearchParams({"location_ids[]":[n.id]}),{data:o}=await Jo.get(`/api/placement_points?${c.toString()}`);return o},{enabled:e,onSuccess:t});return{data:r,isLoading:i||l}},p3=(e,t)=>{const[n,r]=C.exports.useState(),[i,l]=C.exports.useState(!1),{data:c,isLoading:o}=lhe(i,()=>l(!1)),{clickedPointConfig:h}=xu();return C.exports.useEffect(()=>{!e||r(e)},[e]),C.exports.useEffect(()=>{!e||h===null||e.results.find(g=>g.location_id===h.id)||l(!0)},[e,h]),C.exports.useEffect(()=>{!c||(t(p=>p+1),r(p=>{if(p)return{...p,count:p.count+1,results:[c.results[0],...p.results]}}))},[c]),C.exports.useEffect(()=>{h===null&&(t(h1),r(e))},[h,e]),{data:n,isClickedPointLoading:o}},uhe=(e,t)=>{const{filters:{region:n}}=Oi();return Sa(["export-approve-working",n],async()=>{const r=new URLSearchParams({"status[]":[Fr.approve,Fr.working]});return await n3(r,n)},{enabled:e,onSuccess:d3,onSettled:t})},che=e=>({popup:null,setPopup:t=>{e(n=>{if(!t)return n.popup=null,n;n.popup=t})}}),C9=mu(vu(che)),dhe=[{label:Fr.approve,value:Fr.approve},{label:Fr.working,value:Fr.working},{label:Fr.initial,value:Fr.initial}],S9=({value:e,onChange:t,disabled:n})=>E(tl,{style:{width:250},value:e,onChange:l=>{t(l)},options:dhe,disabled:n,placeholder:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0442\u0430\u0442\u0443\u0441",onClick:l=>l.stopPropagation()}),fhe=({selectedIds:e,selectedStatus:t})=>{const n=hm(),{setPopup:r}=C9(),{mutate:i}=s3({onSuccess:()=>{n.invalidateQueries(["approve-working-points"]),r(null)}});return E(Br,{type:"primary",onClick:c=>{c.stopPropagation();const o=new URLSearchParams({status:t,"location_ids[]":e});i(o)},children:"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u0442\u0430\u0442\u0443\u0441"})},hhe=({selectedIds:e,onClearSelected:t})=>{const[n,r]=C.exports.useState(Fr.approve),i=l=>{l.stopPropagation(),t()};return E(f1,{leftColumn:e.length>0&&Qe($n,{children:[E(S9,{value:n,onChange:r}),E(fhe,{selectedIds:e,selectedStatus:n})]}),rightColumn:e.length>0&&E(Br,{onClick:i,children:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0432\u0441\u0435"}),classes:{leftColumn:"flex items-center gap-x-4",rightColumn:"flex item-center gap-x-4"},exportProvider:uhe})},phe=({fullWidth:e})=>{const[t,n]=C.exports.useState(h1),[r,i]=C.exports.useState(1),[l,c]=C.exports.useState([]),{filters:{region:o}}=Oi(),h=()=>c([]),{data:p,isInitialLoading:g}=Sa(["approve-working-points",r,o],async()=>{const A=new URLSearchParams({page:r,page_size:t,"status[]":[Fr.approve,Fr.working]});return await pm(A,o)},{keepPreviousData:!0}),{data:b,isClickedPointLoading:w}=p3(p,n),P=C.exports.useCallback(A=>i(A),[]);return E(h3,{header:E(hhe,{selectedIds:l,onClearSelected:h}),rowSelection:{selectedRowKeys:l,onChange:A=>c(A),hideSelectAll:!0},data:b,onPageChange:P,page:r,pageSize:t,isClickedPointLoading:w,columns:w9,fullWidth:e,loading:g})},mhe=({feature:e})=>{const t=e.properties.location_id,{setClickedPointConfig:n}=xu(),[r,i]=C.exports.useState(e.properties.status);C.exports.useEffect(()=>n(t,!1),[e]);const l=hm(),{mutate:c}=s3({onSuccess:()=>{l.invalidateQueries(["approve-working-points"])}});return Qe($n,{children:[E(c3,{feature:e,dynamicStatus:r}),E("div",{className:"flex justify-center mt-4",children:Qe("div",{className:"flex flex-col items-center",children:[E(gu,{text:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u0441\u0442\u0430\u0442\u0443\u0441"}),E(S9,{value:r,onChange:h=>{i(h);const p=new URLSearchParams({status:h,"location_ids[]":[t]});c(p)}})]})})]})},vhe=({feature:e})=>{const t=e.properties.location_id,{setClickedPointConfig:n}=xu();return C.exports.useEffect(()=>n(t,!1),[e]),E(c3,{feature:e,dynamicStatus:status})},pP=({feature:e})=>{const{mode:t}=yu();return t===Yr.APPROVE_WORKING?E(mhe,{feature:e}):t===Yr.WORKING?E(vhe,{feature:e}):E(Qfe,{feature:e})},ghe=({features:e,onSelect:t})=>E("div",{className:"space-y-2 p-1",children:e.map(n=>Qe(Br,{type:n.layer.id===mr["initial-match"]?"primary":"",className:"flex items-center gap-x-1",block:!0,onClick:()=>t(n),children:[E("span",{children:n.properties.location_id}),E("span",{children:n.properties.category})]},n.properties.location_id))}),yhe=({features:e,lat:t,lng:n,onClose:r})=>{const[i,l]=C.exports.useState(null);return E(Gfe,{lat:t,lng:n,onClose:r,children:(()=>e.length===1?E(pP,{feature:e[0]}):i?E(pP,{feature:i}):E(ghe,{features:e,onSelect:l}))()})},xhe="https://api.mapbox.com/styles/v1/ghermant/cla2nwk5f00el14nxvtjlsi6z/tiles/256/{z}/{x}/{y}@2x?access_token=pk.eyJ1IjoiZ2hlcm1hbnQiLCJhIjoiY2xhMm5zZ3ZrMDF4MDN2bzc5Yjd0ZjZ1dCJ9.fqnvrEqKKBoguR7R6DR7Yw",_he=()=>E(ap,{type:"raster",id:"basemap",tiles:[xhe],tileSize:256,children:E(tu,{type:"raster",source:"basemap",id:"basemap-layer",paint:{}})});function bhe(){const e=async()=>{await Jo.post("accounts/logout/"),r3(!1)},{data:t}=Sa(["profile"],async()=>{const{data:n}=await Jo.get("/accounts/profile");return n});return E("div",{className:"absolute top-[20px] right-[20px]",children:E(x7,{content:Qe($n,{children:[E(gu,{text:t==null?void 0:t.email,classNameText:"lowercase"}),Qe(Br,{type:"primary",block:!0,onClick:e,children:[E("span",{className:"mr-1",children:"\u0412\u044B\u0439\u0442\u0438"}),E(oN,{})]})]}),trigger:"click",placement:"bottomRight",children:E(oo,{title:"\u0412\u044B\u0439\u0442\u0438",placement:"left",children:E(Br,{icon:E(hle,{}),type:"primary",size:"large"})})})})}var whe="Expected a function",mP=0/0,Che="[object Symbol]",She=/^\s+|\s+$/g,Ehe=/^[-+]0x[0-9a-f]+$/i,khe=/^0b[01]+$/i,The=/^0o[0-7]+$/i,Phe=parseInt,Ihe=typeof Us=="object"&&Us&&Us.Object===Object&&Us,Mhe=typeof self=="object"&&self&&self.Object===Object&&self,Rhe=Ihe||Mhe||Function("return this")(),Ahe=Object.prototype,Ohe=Ahe.toString,Nhe=Math.max,Dhe=Math.min,Z_=function(){return Rhe.Date.now()};function Lhe(e,t,n){var r,i,l,c,o,h,p=0,g=!1,b=!1,w=!0;if(typeof e!="function")throw new TypeError(whe);t=vP(t)||0,Pw(n)&&(g=!!n.leading,b="maxWait"in n,l=b?Nhe(vP(n.maxWait)||0,t):l,w="trailing"in n?!!n.trailing:w);function P(U){var q=r,H=i;return r=i=void 0,p=U,c=e.apply(H,q),c}function I(U){return p=U,o=setTimeout(M,t),g?P(U):c}function A(U){var q=U-h,H=U-p,te=t-q;return b?Dhe(te,l-H):te}function O(U){var q=U-h,H=U-p;return h===void 0||q>=t||q<0||b&&H>=l}function M(){var U=Z_();if(O(U))return R(U);o=setTimeout(M,A(U))}function R(U){return o=void 0,w&&r?P(U):(r=i=void 0,c)}function N(){o!==void 0&&clearTimeout(o),p=0,r=h=i=o=void 0}function z(){return o===void 0?c:R(Z_())}function B(){var U=Z_(),q=O(U);if(r=arguments,i=this,h=U,q){if(o===void 0)return I(h);if(b)return o=setTimeout(M,t),P(h)}return o===void 0&&(o=setTimeout(M,t)),c}return B.cancel=N,B.flush=z,B}function Pw(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function zhe(e){return!!e&&typeof e=="object"}function Fhe(e){return typeof e=="symbol"||zhe(e)&&Ohe.call(e)==Che}function vP(e){if(typeof e=="number")return e;if(Fhe(e))return mP;if(Pw(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Pw(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(She,"");var n=khe.test(e);return n||The.test(e)?Phe(e.slice(2),n?2:8):Ehe.test(e)?mP:+e}var $he=Lhe;const gP=({color:e,name:t})=>Qe("div",{className:"flex gap-2 items-center",children:[E("span",{className:"rounded-xl w-3 h-3 inline-block",style:{backgroundColor:e}}),E("span",{children:t})]});function Bhe(){const{mode:e}=yu();return E("div",{className:"absolute bottom-[20px] left-[20px] text-xs text-grey z-10 bg-white-background rounded-xl p-3",children:(()=>e===Yr.APPROVE_WORKING?Qe($n,{children:[E(gu,{text:"\u0421\u0442\u0430\u0442\u0443\u0441 \u043B\u043E\u043A\u0430\u0446\u0438\u0438",className:"text-center"}),Qe("div",{className:"space-y-2",children:[E(gP,{name:"\u0421\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u0438\u0435-\u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430",color:x9}),E(gP,{name:"\u0420\u0430\u0431\u043E\u0442\u0430\u0435\u0442",color:_9})]})]}):null)()})}const Vhe=(e,t)=>{const[n,r]=C.exports.useState(h1),{filters:i}=Oi(),{prediction:l,categories:c,region:o}=i,{selection:{included:h}}=xs(),p=[...h],{data:g,isInitialLoading:b}=Sa(["table",e,i,p],async()=>{const I=new URLSearchParams({page:e,page_size:n,"prediction_current[]":l,"status[]":[Fr.initial],"categories[]":c,"included[]":p});return await pm(I,o)},{keepPreviousData:!0,onError:I=>{I.response.data.detail==="\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430"&&t()}}),{data:w,isClickedPointLoading:P}=p3(g,r);return{data:w,pageSize:n,isClickedPointLoading:P,isDataLoading:b}},Uhe=(e,t)=>{const{filters:n}=Oi(),{prediction:r,status:i,categories:l,region:c}=n,{selection:o}=xs();return Sa(["export-initial",n,o],async()=>{const h=new URLSearchParams({"prediction_current[]":r,"status[]":i,"categories[]":l,"included[]":[...o.included],"excluded[]":[...o.excluded]});return await n3(h,c)},{enabled:e,onSuccess:d3,onSettled:t})},jhe=({fullWidth:e})=>{const{selection:t,include:n,exclude:r}=xs(),{clickedPointConfig:i}=xu(),[l,c]=C.exports.useState(1),{data:o,pageSize:h,isClickedPointLoading:p,isDataLoading:g}=Vhe(l,()=>c(1)),w={selectedRowKeys:C.exports.useCallback(()=>{var R;const I=(R=o==null?void 0:o.results.map(N=>N.location_id))!=null?R:[],A=o==null?void 0:o.results.find(N=>N.location_id===(i==null?void 0:i.id)),O=N=>t.excluded.has(N),M=N=>N===(A==null?void 0:A.id)&&(i==null?void 0:i.shouldSelect)===!1;return[...I.filter(N=>!O(N)&&!M(N)),...t.included]},[o,i,t])(),onSelect:(I,A)=>{const{location_id:O}=I;A?n(O):r(O)},hideSelectAll:!0},P=C.exports.useCallback(I=>c(I),[]);return E(h3,{rowSelection:w,data:o,onPageChange:P,page:l,pageSize:h,isClickedPointLoading:p,columns:w9,fullWidth:e,header:E(f1,{exportProvider:Uhe}),loading:g})},Khe=(e,t)=>{const{filters:{region:n,deltaTraffic:r,factTraffic:i,age:l}}=Oi();return Sa(["export-working",n,r,i,l],async()=>{const c=new URLSearchParams({"status[]":[Fr.working],"delta_current[]":r,"fact[]":i,"age_day[]":l});return await n3(c,n)},{enabled:e,onSuccess:d3,onSettled:t})},Hhe=[{title:"\u0410\u0434\u0440\u0435\u0441",dataIndex:"address",key:"address",width:200},{title:"\u0420\u0430\u0439\u043E\u043D",dataIndex:"rayon",key:"rayon",width:"120px",ellipsis:!0},{title:"\u041E\u043A\u0440\u0443\u0433",dataIndex:"okrug",key:"okrug",width:"120px",ellipsis:!0},{title:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",dataIndex:"name",key:"name",width:"120px",ellipsis:!0},{title:"\u041A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u044F",dataIndex:"category",key:"category",width:"120px",ellipsis:!0},{title:"\u0424\u0430\u043A\u0442",dataIndex:"fact",key:"fact",width:"120px",ellipsis:!0},{title:"\u0420\u0430\u0441\u0445\u043E\u0436\u0434\u0435\u043D\u0438\u0435 \u0441 \u043F\u0440\u043E\u0433\u043D\u043E\u0437\u043E\u043C",dataIndex:"delta_current",key:"delta_current",width:"120px",ellipsis:!0},{title:"\u0417\u0440\u0435\u043B\u043E\u0441\u0442\u044C",dataIndex:"age_day",key:"age_day",width:"120px",ellipsis:!0}],Whe=({fullWidth:e})=>{const[t,n]=C.exports.useState(h1),[r,i]=C.exports.useState(1),{filters:{region:l,deltaTraffic:c,factTraffic:o,age:h}}=Oi(),{data:p,isInitialLoading:g}=Sa(["working-points",r,l,c,o,h],async()=>{const I=new URLSearchParams({page:r,page_size:t,"status[]":[Fr.working],"delta_current[]":c,"fact[]":o,"age_day[]":h});return await pm(I,l)},{keepPreviousData:!0}),{data:b,isClickedPointLoading:w}=p3(p,n),P=C.exports.useCallback(I=>i(I),[]);return E(h3,{data:b,onPageChange:P,page:r,pageSize:t,isClickedPointLoading:w,columns:Hhe,fullWidth:e,header:E(f1,{exportProvider:Khe}),loading:g})},Ghe=({fullWidth:e})=>{const{mode:t}=yu();return t===Yr.APPROVE_WORKING?E(phe,{fullWidth:e}):t===Yr.WORKING?E(Whe,{fullWidth:e}):E(jhe,{fullWidth:e})},qhe=({width:e=24,height:t=24})=>Qe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",width:e,height:t,children:[E("polygon",{points:"23.7,4.1 23.7,6.1 0.1,6.2 0.1,4.1 "}),Qe("g",{children:[E("circle",{cx:"6.3",cy:"5.2",r:"3.1"}),E("circle",{fill:"#fff",cx:"6.3",cy:"5.2",r:"1.4"})]}),E("polygon",{points:"23.6,11.1 23.7,13.1 0,13.1 0,11 "}),Qe("g",{children:[E("circle",{cx:"18.6",cy:"12.1",r:"3.1"}),E("circle",{fill:"#fff",cx:"18.6",cy:"12.1",r:"1.4"})]}),E("polygon",{points:"23.8,18.2 23.9,20.1 0.2,20.2 0.2,18.2 "}),Qe("g",{children:[E("circle",{cx:"10.2",cy:"19.1",r:"3.1"}),E("circle",{fill:"#fff",cx:"10.2",cy:"19.1",r:"1.4"})]})]}),Zhe=({toggleCollapse:e})=>E(Br,{icon:E(qhe,{width:16,height:16}),onClick:e,className:"border-l-0 rounded-bl-none rounded-tl-none absolute top-[100px] flex items-center justify-center"});var E9={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},yP=tr.createContext&&tr.createContext(E9),nu=globalThis&&globalThis.__assign||function(){return nu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},nu.apply(this,arguments)},Xhe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function k9(e){return e&&e.map(function(t,n){return tr.createElement(t.tag,nu({key:n},t.attr),k9(t.child))})}function Yhe(e){return function(t){return E(Qhe,{...nu({attr:nu({},e.attr)},t),children:k9(e.child)})}}function Qhe(e){var t=function(n){var r=e.attr,i=e.size,l=e.title,c=Xhe(e,["attr","size","title"]),o=i||n.size||"1em",h;return n.className&&(h=n.className),e.className&&(h=(h?h+" ":"")+e.className),Qe("svg",{...nu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,c,{className:h,style:nu(nu({color:e.color||n.color},n.style),e.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),children:[l&&E("title",{children:l}),e.children]})};return yP!==void 0?E(yP.Consumer,{children:function(n){return t(n)}}):t(E9)}function Jhe(e){return Yhe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M22 7.999a1 1 0 0 0-.516-.874l-9.022-5a1.003 1.003 0 0 0-.968 0l-8.978 4.96a1 1 0 0 0-.003 1.748l9.022 5.04a.995.995 0 0 0 .973.001l8.978-5A1 1 0 0 0 22 7.999zm-9.977 3.855L5.06 7.965l6.917-3.822 6.964 3.859-6.918 3.852z"}},{tag:"path",attr:{d:"M20.515 11.126 12 15.856l-8.515-4.73-.971 1.748 9 5a1 1 0 0 0 .971 0l9-5-.97-1.748z"}},{tag:"path",attr:{d:"M20.515 15.126 12 19.856l-8.515-4.73-.971 1.748 9 5a1 1 0 0 0 .971 0l9-5-.97-1.748z"}}]})(e)}const epe=()=>{const{toggleVisibility:e,isVisible:t}=Sf(),{mode:n}=yu();return Qe("div",{children:[E(gu,{text:"\u0421\u043B\u043E\u0438",className:"mb-1"}),E("div",{className:"space-y-1 flex flex-col",children:n===Yr.WORKING&&E($n,{children:E(xc,{className:"!ml-0",onChange:()=>e(mr.working),checked:t[mr.working],children:"\u0420\u0430\u0431\u043E\u0442\u0430\u0435\u0442"})})})]})},tpe=()=>E(x7,{content:E(epe,{}),trigger:"click",placement:"leftBottom",children:E(oo,{title:"\u0421\u043B\u043E\u0438",children:E(Br,{className:"absolute bottom-[20px] right-[20px] flex items-center justify-center p-3",children:E(Jhe,{className:"w-4 h-4"})})})});function npe(e,t){const[n,r]=C.exports.useState(e);return C.exports.useEffect(()=>{const i=setTimeout(()=>r(e),t||500);return()=>{clearTimeout(i)}},[e,t]),n}const rpe=()=>{const{map:e}=o3(),[t,n]=C.exports.useState(""),r=npe(t),{data:i}=Sa(["address",r],async()=>(await Jo.get(`/api/placement_points/search_address?page_size=100&address=${r}`)).data),l=C.exports.useMemo(()=>i?i.results.map(h=>({label:h.address,value:`${h.address}$${h.location_id}`,item:h})):[],[i]);return E("div",{children:E(fW,{options:l,style:{width:300},value:t,onChange:h=>{n(h&&h.split("$")[0])},onSelect:(h,p)=>{const g=Cf.exports(p.item.geometry);e.flyTo({center:[g.coordinates[0],g.coordinates[1]],zoom:15,speed:5})},allowClear:!0,onClear:()=>n(""),children:E(Kl,{prefix:E(gle,{}),placeholder:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441 \u0442\u043E\u0447\u043A\u0438",className:"text-ellipsis"})})})},ipe=({isSidebarCollapsed:e})=>Qe("div",{className:"absolute top-[20px] left-[30px] flex items-center gap-x-10",children:[Qe("div",{className:bc("hidden",e&&"flex items-center gap-x-3 "),children:[E(g9,{}),E(y9,{})]}),E(rpe,{})]}),ope=()=>{const e=C.exports.useRef(null),t=C.exports.useRef(null),n=C.exports.useRef(null),{popup:r,setPopup:i}=C9(),{setClickedPointConfig:l}=xu(),{setLayersVisibility:c}=Sf(),{setStatus:o}=Oi(),{mode:h}=yu(),{tableState:p,openTable:g}=f3();C.exports.useEffect(()=>{o(hce[h]),c(pce[h]),i(null),l(null)},[h]);const b=M=>{if(!M.features){i(null),l(null);return}const R=M.features[0];if(!R){i(null),l(null);return}const{lng:N}=M.lngLat;if(R.geometry.type==="Point"){const z=R.geometry.coordinates.slice();for(;Math.abs(N-z[0])>180;)z[0]+=N>z[0]?360:-360;i({features:M.features,coordinates:z})}},w=M=>{!M.features[0]||(e.current.getCanvas().style.cursor="pointer")},P=M=>{!M.features[0]||(e.current.getCanvas().style.cursor="")};C.exports.useEffect(()=>{const M=new ResizeObserver($he(()=>{var R;(R=e==null?void 0:e.current)==null||R.resize()},16));return t.current&&M.observe(t.current),()=>{M.disconnect()}},[t.current]),C.exports.useEffect(()=>{p.fullScreen&&!p.isOpened&&g()},[p.fullScreen]);const[I,A]=C.exports.useState(!1),O=()=>A(M=>!M);return Qe(ude,{children:[E(Rfe,{isCollapsed:I,ref:n}),Qe("div",{className:"flex-1 h-screen flex flex-col ",children:[E("div",{ref:t,className:bc(p.fullScreen?"":"flex-1"),children:Qe(a3,{mapLib:ode,initialViewState:{latitude:55.7558,longitude:37.6173,zoom:9},dragRotate:!1,ref:e,interactiveLayerIds:[mr["initial-match"],mr["initial-unmatch"],mr.approve,mr.working],onClick:b,onMouseEnter:w,onMouseLeave:P,id:"map",children:[r&&E(yhe,{lat:r.coordinates[1],lng:r.coordinates[0],features:r.features,onClose:()=>{i(null),l(null)}}),E(ipe,{isSidebarCollapsed:I}),E(Zhe,{toggleCollapse:O}),E(_he,{}),E(Wfe,{}),E(Bhe,{}),E(bhe,{}),E(tpe,{})]})}),E("div",{className:"w-full border-solid border-border border-0 border-t-[1px]",children:E(Ghe,{fullWidth:I})})]})]})};function ape(){return E(ide,{children:E(ope,{})})}const spe=new Gue;Oce();function lpe(){return E(Yue,{client:spe,children:E(B$,{basename:"/",children:Qe(N$,{children:[E(Fh,{path:"/",element:E(ape,{})}),E(Fh,{path:"/signin",element:E(Qce,{})}),E(Fh,{path:"/verify-user",element:E(ede,{})}),E(Fh,{path:"/register",element:E(rde,{})})]})})})}X_.createRoot(document.getElementById("root")).render(E(tr.StrictMode,{children:E(lpe,{})}));