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.8 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 gB=Object.defineProperty;var yB=(e,t,r)=>t in e?gB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var C6=(e,t,r)=>(yB(e,typeof t!="symbol"?t+"":t,r),r);function MI(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const u of a.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&n(u)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerpolicy&&(a.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?a.credentials="include":i.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var Sl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $C(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},on={};/**
* @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 sv=Symbol.for("react.element"),xB=Symbol.for("react.portal"),_B=Symbol.for("react.fragment"),bB=Symbol.for("react.strict_mode"),wB=Symbol.for("react.profiler"),CB=Symbol.for("react.provider"),SB=Symbol.for("react.context"),EB=Symbol.for("react.forward_ref"),kB=Symbol.for("react.suspense"),TB=Symbol.for("react.memo"),PB=Symbol.for("react.lazy"),S6=Symbol.iterator;function MB(e){return e===null||typeof e!="object"?null:(e=S6&&e[S6]||e["@@iterator"],typeof e=="function"?e:null)}var II={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},RI=Object.assign,OI={};function sh(e,t,r){this.props=e,this.context=t,this.refs=OI,this.updater=r||II}sh.prototype.isReactComponent={};sh.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")};sh.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function AI(){}AI.prototype=sh.prototype;function BC(e,t,r){this.props=e,this.context=t,this.refs=OI,this.updater=r||II}var VC=BC.prototype=new AI;VC.constructor=BC;RI(VC,sh.prototype);VC.isPureReactComponent=!0;var E6=Array.isArray,NI=Object.prototype.hasOwnProperty,jC={current:null},zI={key:!0,ref:!0,__self:!0,__source:!0};function DI(e,t,r){var n,i={},a=null,u=null;if(t!=null)for(n in t.ref!==void 0&&(u=t.ref),t.key!==void 0&&(a=""+t.key),t)NI.call(t,n)&&!zI.hasOwnProperty(n)&&(i[n]=t[n]);var o=arguments.length-2;if(o===1)i.children=r;else if(1<o){for(var f=Array(o),p=0;p<o;p++)f[p]=arguments[p+2];i.children=f}if(e&&e.defaultProps)for(n in o=e.defaultProps,o)i[n]===void 0&&(i[n]=o[n]);return{$$typeof:sv,type:e,key:a,ref:u,props:i,_owner:jC.current}}function IB(e,t){return{$$typeof:sv,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function UC(e){return typeof e=="object"&&e!==null&&e.$$typeof===sv}function RB(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var k6=/\/+/g;function ub(e,t){return typeof e=="object"&&e!==null&&e.key!=null?RB(""+e.key):t.toString(36)}function Uy(e,t,r,n,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var u=!1;if(e===null)u=!0;else switch(a){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case sv:case xB:u=!0}}if(u)return u=e,i=i(u),e=n===""?"."+ub(u,0):n,E6(i)?(r="",e!=null&&(r=e.replace(k6,"$&/")+"/"),Uy(i,t,r,"",function(p){return p})):i!=null&&(UC(i)&&(i=IB(i,r+(!i.key||u&&u.key===i.key?"":(""+i.key).replace(k6,"$&/")+"/")+e)),t.push(i)),1;if(u=0,n=n===""?".":n+":",E6(e))for(var o=0;o<e.length;o++){a=e[o];var f=n+ub(a,o);u+=Uy(a,t,r,f,i)}else if(f=MB(e),typeof f=="function")for(e=f.call(e),o=0;!(a=e.next()).done;)a=a.value,f=n+ub(a,o++),u+=Uy(a,t,r,f,i);else if(a==="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 u}function Zg(e,t,r){if(e==null)return e;var n=[],i=0;return Uy(e,n,"","",function(a){return t.call(r,a,i++)}),n}function OB(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var $o={current:null},Ky={transition:null},AB={ReactCurrentDispatcher:$o,ReactCurrentBatchConfig:Ky,ReactCurrentOwner:jC};on.Children={map:Zg,forEach:function(e,t,r){Zg(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Zg(e,function(){t++}),t},toArray:function(e){return Zg(e,function(t){return t})||[]},only:function(e){if(!UC(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};on.Component=sh;on.Fragment=_B;on.Profiler=wB;on.PureComponent=BC;on.StrictMode=bB;on.Suspense=kB;on.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=AB;on.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=RI({},e.props),i=e.key,a=e.ref,u=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,u=jC.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(f in t)NI.call(t,f)&&!zI.hasOwnProperty(f)&&(n[f]=t[f]===void 0&&o!==void 0?o[f]:t[f])}var f=arguments.length-2;if(f===1)n.children=r;else if(1<f){o=Array(f);for(var p=0;p<f;p++)o[p]=arguments[p+2];n.children=o}return{$$typeof:sv,type:e.type,key:i,ref:a,props:n,_owner:u}};on.createContext=function(e){return e={$$typeof:SB,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:CB,_context:e},e.Consumer=e};on.createElement=DI;on.createFactory=function(e){var t=DI.bind(null,e);return t.type=e,t};on.createRef=function(){return{current:null}};on.forwardRef=function(e){return{$$typeof:EB,render:e}};on.isValidElement=UC;on.lazy=function(e){return{$$typeof:PB,_payload:{_status:-1,_result:e},_init:OB}};on.memo=function(e,t){return{$$typeof:TB,type:e,compare:t===void 0?null:t}};on.startTransition=function(e){var t=Ky.transition;Ky.transition={};try{e()}finally{Ky.transition=t}};on.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};on.useCallback=function(e,t){return $o.current.useCallback(e,t)};on.useContext=function(e){return $o.current.useContext(e)};on.useDebugValue=function(){};on.useDeferredValue=function(e){return $o.current.useDeferredValue(e)};on.useEffect=function(e,t){return $o.current.useEffect(e,t)};on.useId=function(){return $o.current.useId()};on.useImperativeHandle=function(e,t,r){return $o.current.useImperativeHandle(e,t,r)};on.useInsertionEffect=function(e,t){return $o.current.useInsertionEffect(e,t)};on.useLayoutEffect=function(e,t){return $o.current.useLayoutEffect(e,t)};on.useMemo=function(e,t){return $o.current.useMemo(e,t)};on.useReducer=function(e,t,r){return $o.current.useReducer(e,t,r)};on.useRef=function(e){return $o.current.useRef(e)};on.useState=function(e){return $o.current.useState(e)};on.useSyncExternalStore=function(e,t,r){return $o.current.useSyncExternalStore(e,t,r)};on.useTransition=function(){return $o.current.useTransition()};on.version="18.2.0";(function(e){e.exports=on})(C);const tn=$C(C.exports),g0=MI({__proto__:null,default:tn},[C.exports]);var Z2={},Qu={exports:{}},ba={},LI={exports:{}},FI={};/**
* @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 r(oe){return oe.length===0?null:oe[0]}function n(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,ze=ke>>>1;Te<ze;){var Ie=2*(Te+1)-1,Ne=oe[Ie],De=Ie+1,Ve=oe[De];if(0>i(Ne,Re))De<ke&&0>i(Ve,Ne)?(oe[Te]=Ve,oe[De]=Re,Te=De):(oe[Te]=Ne,oe[Ie]=Re,Te=Ie);else if(De<ke&&0>i(Ve,Re))oe[Te]=Ve,oe[De]=Re,Te=De;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 a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,o=u.now();e.unstable_now=function(){return u.now()-o}}var f=[],p=[],v=1,y=null,w=3,k=!1,T=!1,R=!1,A=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,O=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=r(p);ye!==null;){if(ye.callback===null)n(p);else if(ye.startTime<=oe)n(p),ye.sortIndex=ye.expirationTime,t(f,ye);else break;ye=r(p)}}function L(oe){if(R=!1,N(oe),!T)if(r(f)!==null)T=!0,ne(B);else{var ye=r(p);ye!==null&&de(L,ye.startTime-oe)}}function B(oe,ye){T=!1,R&&(R=!1,I(H),H=-1),k=!0;var Re=w;try{for(N(ye),y=r(f);y!==null&&(!(y.expirationTime>ye)||oe&&!le());){var Te=y.callback;if(typeof Te=="function"){y.callback=null,w=y.priorityLevel;var ke=Te(y.expirationTime<=ye);ye=e.unstable_now(),typeof ke=="function"?y.callback=ke:y===r(f)&&n(f),N(ye)}else n(f);y=r(f)}if(y!==null)var ze=!0;else{var Ie=r(p);Ie!==null&&de(L,Ie.startTime-ye),ze=!1}return ze}finally{y=null,w=Re,k=!1}}var j=!1,G=null,H=-1,te=5,Y=-1;function le(){return!(e.unstable_now()-Y<te)}function J(){if(G!==null){var oe=e.unstable_now();Y=oe;var ye=!0;try{ye=G(!0,oe)}finally{ye?Z():(j=!1,G=null)}}else j=!1}var Z;if(typeof O=="function")Z=function(){O(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(){A(J,0)};function ne(oe){G=oe,j||(j=!0,Z())}function de(oe,ye){H=A(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(){T||k||(T=!0,ne(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 r(f)},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:v++,callback:ye,priorityLevel:oe,startTime:Re,expirationTime:ke,sortIndex:-1},Re>Te?(oe.sortIndex=Re,t(p,oe),r(f)===null&&oe===r(p)&&(R?(I(H),H=-1):R=!0,de(L,Re-Te))):(oe.sortIndex=ke,t(f,oe),T||k||(T=!0,ne(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}}}})(FI);(function(e){e.exports=FI})(LI);/**
* @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 $I=C.exports,ga=LI.exports;function Kt(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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 BI=new Set,Sm={};function hd(e,t){Lf(e,t),Lf(e+"Capture",t)}function Lf(e,t){for(Sm[e]=t,e=0;e<t.length;e++)BI.add(t[e])}var Rl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),X2=Object.prototype.hasOwnProperty,NB=/^[: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]*$/,T6={},P6={};function zB(e){return X2.call(P6,e)?!0:X2.call(T6,e)?!1:NB.test(e)?P6[e]=!0:(T6[e]=!0,!1)}function DB(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function LB(e,t,r,n){if(t===null||typeof t>"u"||DB(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Bo(e,t,r,n,i,a,u){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=u}var so={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){so[e]=new Bo(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];so[t]=new Bo(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){so[e]=new Bo(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){so[e]=new Bo(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){so[e]=new Bo(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){so[e]=new Bo(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){so[e]=new Bo(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){so[e]=new Bo(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){so[e]=new Bo(e,5,!1,e.toLowerCase(),null,!1,!1)});var KC=/[\-:]([a-z])/g;function HC(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(KC,HC);so[t]=new Bo(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(KC,HC);so[t]=new Bo(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(KC,HC);so[t]=new Bo(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){so[e]=new Bo(e,1,!1,e.toLowerCase(),null,!1,!1)});so.xlinkHref=new Bo("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){so[e]=new Bo(e,1,!1,e.toLowerCase(),null,!0,!0)});function WC(e,t,r,n){var i=so.hasOwnProperty(t)?so[t]:null;(i!==null?i.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(LB(t,r,i,n)&&(r=null),n||i===null?zB(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):i.mustUseProperty?e[i.propertyName]=r===null?i.type===3?!1:"":r:(t=i.attributeName,n=i.attributeNamespace,r===null?e.removeAttribute(t):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Ul=$I.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Xg=Symbol.for("react.element"),cf=Symbol.for("react.portal"),df=Symbol.for("react.fragment"),qC=Symbol.for("react.strict_mode"),Y2=Symbol.for("react.profiler"),VI=Symbol.for("react.provider"),jI=Symbol.for("react.context"),GC=Symbol.for("react.forward_ref"),Q2=Symbol.for("react.suspense"),J2=Symbol.for("react.suspense_list"),ZC=Symbol.for("react.memo"),yu=Symbol.for("react.lazy"),UI=Symbol.for("react.offscreen"),M6=Symbol.iterator;function Pp(e){return e===null||typeof e!="object"?null:(e=M6&&e[M6]||e["@@iterator"],typeof e=="function"?e:null)}var ui=Object.assign,cb;function Wp(e){if(cb===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);cb=t&&t[1]||""}return`
`+cb+e}var db=!1;function fb(e,t){if(!e||db)return"";db=!0;var r=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 n=p}Reflect.construct(e,[],t)}else{try{t.call()}catch(p){n=p}e.call(t.prototype)}else{try{throw Error()}catch(p){n=p}e()}}catch(p){if(p&&n&&typeof p.stack=="string"){for(var i=p.stack.split(`
`),a=n.stack.split(`
`),u=i.length-1,o=a.length-1;1<=u&&0<=o&&i[u]!==a[o];)o--;for(;1<=u&&0<=o;u--,o--)if(i[u]!==a[o]){if(u!==1||o!==1)do if(u--,o--,0>o||i[u]!==a[o]){var f=`
`+i[u].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),f}while(1<=u&&0<=o);break}}}finally{db=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Wp(e):""}function FB(e){switch(e.tag){case 5:return Wp(e.type);case 16:return Wp("Lazy");case 13:return Wp("Suspense");case 19:return Wp("SuspenseList");case 0:case 2:case 15:return e=fb(e.type,!1),e;case 11:return e=fb(e.type.render,!1),e;case 1:return e=fb(e.type,!0),e;default:return""}}function ew(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 df:return"Fragment";case cf:return"Portal";case Y2:return"Profiler";case qC:return"StrictMode";case Q2:return"Suspense";case J2:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case jI:return(e.displayName||"Context")+".Consumer";case VI:return(e._context.displayName||"Context")+".Provider";case GC:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ZC:return t=e.displayName||null,t!==null?t:ew(e.type)||"Memo";case yu:t=e._payload,e=e._init;try{return ew(e(t))}catch{}}return null}function $B(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 ew(t);case 8:return t===qC?"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 Ku(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function KI(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function BB(e){var t=KI(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(u){n=""+u,a.call(this,u)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(u){n=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Yg(e){e._valueTracker||(e._valueTracker=BB(e))}function HI(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=KI(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function y0(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 tw(e,t){var r=t.checked;return ui({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r!=null?r:e._wrapperState.initialChecked})}function I6(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Ku(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function WI(e,t){t=t.checked,t!=null&&WC(e,"checked",t,!1)}function rw(e,t){WI(e,t);var r=Ku(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?nw(e,t.type,r):t.hasOwnProperty("defaultValue")&&nw(e,t.type,Ku(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function R6(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function nw(e,t,r){(t!=="number"||y0(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var qp=Array.isArray;function Pf(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Ku(r),t=null,i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function iw(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Kt(91));return ui({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function O6(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(Kt(92));if(qp(r)){if(1<r.length)throw Error(Kt(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Ku(r)}}function qI(e,t){var r=Ku(t.value),n=Ku(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function A6(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function GI(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 ow(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?GI(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Qg,ZI=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,i){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Qg=Qg||document.createElement("div"),Qg.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Qg.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Em(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var im={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},VB=["Webkit","ms","Moz","O"];Object.keys(im).forEach(function(e){VB.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),im[t]=im[e]})});function XI(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||im.hasOwnProperty(e)&&im[e]?(""+t).trim():t+"px"}function YI(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=XI(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var jB=ui({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 aw(e,t){if(t){if(jB[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 sw(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 lw=null;function XC(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var uw=null,Mf=null,If=null;function N6(e){if(e=cv(e)){if(typeof uw!="function")throw Error(Kt(280));var t=e.stateNode;t&&(t=R1(t),uw(e.stateNode,e.type,t))}}function QI(e){Mf?If?If.push(e):If=[e]:Mf=e}function JI(){if(Mf){var e=Mf,t=If;if(If=Mf=null,N6(e),t)for(e=0;e<t.length;e++)N6(t[e])}}function eR(e,t){return e(t)}function tR(){}var hb=!1;function rR(e,t,r){if(hb)return e(t,r);hb=!0;try{return eR(e,t,r)}finally{hb=!1,(Mf!==null||If!==null)&&(tR(),JI())}}function km(e,t){var r=e.stateNode;if(r===null)return null;var n=R1(r);if(n===null)return null;r=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(Kt(231,t,typeof r));return r}var cw=!1;if(Rl)try{var Mp={};Object.defineProperty(Mp,"passive",{get:function(){cw=!0}}),window.addEventListener("test",Mp,Mp),window.removeEventListener("test",Mp,Mp)}catch{cw=!1}function UB(e,t,r,n,i,a,u,o,f){var p=Array.prototype.slice.call(arguments,3);try{t.apply(r,p)}catch(v){this.onError(v)}}var om=!1,x0=null,_0=!1,dw=null,KB={onError:function(e){om=!0,x0=e}};function HB(e,t,r,n,i,a,u,o,f){om=!1,x0=null,UB.apply(KB,arguments)}function WB(e,t,r,n,i,a,u,o,f){if(HB.apply(this,arguments),om){if(om){var p=x0;om=!1,x0=null}else throw Error(Kt(198));_0||(_0=!0,dw=p)}}function pd(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function nR(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 z6(e){if(pd(e)!==e)throw Error(Kt(188))}function qB(e){var t=e.alternate;if(!t){if(t=pd(e),t===null)throw Error(Kt(188));return t!==e?null:e}for(var r=e,n=t;;){var i=r.return;if(i===null)break;var a=i.alternate;if(a===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===r)return z6(i),e;if(a===n)return z6(i),t;a=a.sibling}throw Error(Kt(188))}if(r.return!==n.return)r=i,n=a;else{for(var u=!1,o=i.child;o;){if(o===r){u=!0,r=i,n=a;break}if(o===n){u=!0,n=i,r=a;break}o=o.sibling}if(!u){for(o=a.child;o;){if(o===r){u=!0,r=a,n=i;break}if(o===n){u=!0,n=a,r=i;break}o=o.sibling}if(!u)throw Error(Kt(189))}}if(r.alternate!==n)throw Error(Kt(190))}if(r.tag!==3)throw Error(Kt(188));return r.stateNode.current===r?e:t}function iR(e){return e=qB(e),e!==null?oR(e):null}function oR(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=oR(e);if(t!==null)return t;e=e.sibling}return null}var aR=ga.unstable_scheduleCallback,D6=ga.unstable_cancelCallback,GB=ga.unstable_shouldYield,ZB=ga.unstable_requestPaint,wi=ga.unstable_now,XB=ga.unstable_getCurrentPriorityLevel,YC=ga.unstable_ImmediatePriority,sR=ga.unstable_UserBlockingPriority,b0=ga.unstable_NormalPriority,YB=ga.unstable_LowPriority,lR=ga.unstable_IdlePriority,T1=null,Us=null;function QB(e){if(Us&&typeof Us.onCommitFiberRoot=="function")try{Us.onCommitFiberRoot(T1,e,void 0,(e.current.flags&128)===128)}catch{}}var gs=Math.clz32?Math.clz32:tV,JB=Math.log,eV=Math.LN2;function tV(e){return e>>>=0,e===0?32:31-(JB(e)/eV|0)|0}var Jg=64,ey=4194304;function Gp(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 w0(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,a=e.pingedLanes,u=r&268435455;if(u!==0){var o=u&~i;o!==0?n=Gp(o):(a&=u,a!==0&&(n=Gp(a)))}else u=r&~i,u!==0?n=Gp(u):a!==0&&(n=Gp(a));if(n===0)return 0;if(t!==0&&t!==n&&(t&i)===0&&(i=n&-n,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if((n&4)!==0&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-gs(t),i=1<<r,n|=e[r],t&=~i;return n}function rV(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 nV(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var u=31-gs(a),o=1<<u,f=i[u];f===-1?((o&r)===0||(o&n)!==0)&&(i[u]=rV(o,t)):f<=t&&(e.expiredLanes|=o),a&=~o}}function fw(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function uR(){var e=Jg;return Jg<<=1,(Jg&4194240)===0&&(Jg=64),e}function pb(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function lv(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-gs(t),e[t]=r}function iV(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var i=31-gs(r),a=1<<i;t[i]=0,n[i]=-1,e[i]=-1,r&=~a}}function QC(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-gs(r),i=1<<n;i&t|e[n]&t&&(e[n]|=t),r&=~i}}var Tn=0;function cR(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var dR,JC,fR,hR,pR,hw=!1,ty=[],Ou=null,Au=null,Nu=null,Tm=new Map,Pm=new Map,wu=[],oV="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 L6(e,t){switch(e){case"focusin":case"focusout":Ou=null;break;case"dragenter":case"dragleave":Au=null;break;case"mouseover":case"mouseout":Nu=null;break;case"pointerover":case"pointerout":Tm.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pm.delete(t.pointerId)}}function Ip(e,t,r,n,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:a,targetContainers:[i]},t!==null&&(t=cv(t),t!==null&&JC(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function aV(e,t,r,n,i){switch(t){case"focusin":return Ou=Ip(Ou,e,t,r,n,i),!0;case"dragenter":return Au=Ip(Au,e,t,r,n,i),!0;case"mouseover":return Nu=Ip(Nu,e,t,r,n,i),!0;case"pointerover":var a=i.pointerId;return Tm.set(a,Ip(Tm.get(a)||null,e,t,r,n,i)),!0;case"gotpointercapture":return a=i.pointerId,Pm.set(a,Ip(Pm.get(a)||null,e,t,r,n,i)),!0}return!1}function mR(e){var t=Uc(e.target);if(t!==null){var r=pd(t);if(r!==null){if(t=r.tag,t===13){if(t=nR(r),t!==null){e.blockedOn=t,pR(e.priority,function(){fR(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Hy(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=pw(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);lw=n,r.target.dispatchEvent(n),lw=null}else return t=cv(r),t!==null&&JC(t),e.blockedOn=r,!1;t.shift()}return!0}function F6(e,t,r){Hy(e)&&r.delete(t)}function sV(){hw=!1,Ou!==null&&Hy(Ou)&&(Ou=null),Au!==null&&Hy(Au)&&(Au=null),Nu!==null&&Hy(Nu)&&(Nu=null),Tm.forEach(F6),Pm.forEach(F6)}function Rp(e,t){e.blockedOn===t&&(e.blockedOn=null,hw||(hw=!0,ga.unstable_scheduleCallback(ga.unstable_NormalPriority,sV)))}function Mm(e){function t(i){return Rp(i,e)}if(0<ty.length){Rp(ty[0],e);for(var r=1;r<ty.length;r++){var n=ty[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Ou!==null&&Rp(Ou,e),Au!==null&&Rp(Au,e),Nu!==null&&Rp(Nu,e),Tm.forEach(t),Pm.forEach(t),r=0;r<wu.length;r++)n=wu[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<wu.length&&(r=wu[0],r.blockedOn===null);)mR(r),r.blockedOn===null&&wu.shift()}var Rf=Ul.ReactCurrentBatchConfig,C0=!0;function lV(e,t,r,n){var i=Tn,a=Rf.transition;Rf.transition=null;try{Tn=1,e3(e,t,r,n)}finally{Tn=i,Rf.transition=a}}function uV(e,t,r,n){var i=Tn,a=Rf.transition;Rf.transition=null;try{Tn=4,e3(e,t,r,n)}finally{Tn=i,Rf.transition=a}}function e3(e,t,r,n){if(C0){var i=pw(e,t,r,n);if(i===null)Sb(e,t,n,S0,r),L6(e,n);else if(aV(i,e,t,r,n))n.stopPropagation();else if(L6(e,n),t&4&&-1<oV.indexOf(e)){for(;i!==null;){var a=cv(i);if(a!==null&&dR(a),a=pw(e,t,r,n),a===null&&Sb(e,t,n,S0,r),a===i)break;i=a}i!==null&&n.stopPropagation()}else Sb(e,t,n,null,r)}}var S0=null;function pw(e,t,r,n){if(S0=null,e=XC(n),e=Uc(e),e!==null)if(t=pd(e),t===null)e=null;else if(r=t.tag,r===13){if(e=nR(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return S0=e,null}function vR(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(XB()){case YC:return 1;case sR:return 4;case b0:case YB:return 16;case lR:return 536870912;default:return 16}default:return 16}}var Su=null,t3=null,Wy=null;function gR(){if(Wy)return Wy;var e,t=t3,r=t.length,n,i="value"in Su?Su.value:Su.textContent,a=i.length;for(e=0;e<r&&t[e]===i[e];e++);var u=r-e;for(n=1;n<=u&&t[r-n]===i[a-n];n++);return Wy=i.slice(e,1<n?1-n:void 0)}function qy(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 ry(){return!0}function $6(){return!1}function wa(e){function t(r,n,i,a,u){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=a,this.target=u,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(r=e[o],this[o]=r?r(a):a[o]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?ry:$6,this.isPropagationStopped=$6,this}return ui(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=ry)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=ry)},persist:function(){},isPersistent:ry}),t}var lh={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},r3=wa(lh),uv=ui({},lh,{view:0,detail:0}),cV=wa(uv),mb,vb,Op,P1=ui({},uv,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:n3,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!==Op&&(Op&&e.type==="mousemove"?(mb=e.screenX-Op.screenX,vb=e.screenY-Op.screenY):vb=mb=0,Op=e),mb)},movementY:function(e){return"movementY"in e?e.movementY:vb}}),B6=wa(P1),dV=ui({},P1,{dataTransfer:0}),fV=wa(dV),hV=ui({},uv,{relatedTarget:0}),gb=wa(hV),pV=ui({},lh,{animationName:0,elapsedTime:0,pseudoElement:0}),mV=wa(pV),vV=ui({},lh,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gV=wa(vV),yV=ui({},lh,{data:0}),V6=wa(yV),xV={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_V={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"},bV={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wV(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=bV[e])?!!t[e]:!1}function n3(){return wV}var CV=ui({},uv,{key:function(e){if(e.key){var t=xV[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=qy(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?_V[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:n3,charCode:function(e){return e.type==="keypress"?qy(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?qy(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),SV=wa(CV),EV=ui({},P1,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),j6=wa(EV),kV=ui({},uv,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:n3}),TV=wa(kV),PV=ui({},lh,{propertyName:0,elapsedTime:0,pseudoElement:0}),MV=wa(PV),IV=ui({},P1,{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}),RV=wa(IV),OV=[9,13,27,32],i3=Rl&&"CompositionEvent"in window,am=null;Rl&&"documentMode"in document&&(am=document.documentMode);var AV=Rl&&"TextEvent"in window&&!am,yR=Rl&&(!i3||am&&8<am&&11>=am),U6=String.fromCharCode(32),K6=!1;function xR(e,t){switch(e){case"keyup":return OV.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _R(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ff=!1;function NV(e,t){switch(e){case"compositionend":return _R(t);case"keypress":return t.which!==32?null:(K6=!0,U6);case"textInput":return e=t.data,e===U6&&K6?null:e;default:return null}}function zV(e,t){if(ff)return e==="compositionend"||!i3&&xR(e,t)?(e=gR(),Wy=t3=Su=null,ff=!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 yR&&t.locale!=="ko"?null:t.data;default:return null}}var DV={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 H6(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!DV[e.type]:t==="textarea"}function bR(e,t,r,n){QI(n),t=E0(t,"onChange"),0<t.length&&(r=new r3("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var sm=null,Im=null;function LV(e){OR(e,0)}function M1(e){var t=mf(e);if(HI(t))return e}function FV(e,t){if(e==="change")return t}var wR=!1;if(Rl){var yb;if(Rl){var xb="oninput"in document;if(!xb){var W6=document.createElement("div");W6.setAttribute("oninput","return;"),xb=typeof W6.oninput=="function"}yb=xb}else yb=!1;wR=yb&&(!document.documentMode||9<document.documentMode)}function q6(){sm&&(sm.detachEvent("onpropertychange",CR),Im=sm=null)}function CR(e){if(e.propertyName==="value"&&M1(Im)){var t=[];bR(t,Im,e,XC(e)),rR(LV,t)}}function $V(e,t,r){e==="focusin"?(q6(),sm=t,Im=r,sm.attachEvent("onpropertychange",CR)):e==="focusout"&&q6()}function BV(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return M1(Im)}function VV(e,t){if(e==="click")return M1(t)}function jV(e,t){if(e==="input"||e==="change")return M1(t)}function UV(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _s=typeof Object.is=="function"?Object.is:UV;function Rm(e,t){if(_s(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!X2.call(t,i)||!_s(e[i],t[i]))return!1}return!0}function G6(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Z6(e,t){var r=G6(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=G6(r)}}function SR(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?SR(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ER(){for(var e=window,t=y0();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=y0(e.document)}return t}function o3(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 KV(e){var t=ER(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&SR(r.ownerDocument.documentElement,r)){if(n!==null&&o3(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!e.extend&&a>n&&(i=n,n=a,a=i),i=Z6(r,a);var u=Z6(r,n);i&&u&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==u.node||e.focusOffset!==u.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>n?(e.addRange(t),e.extend(u.node,u.offset)):(t.setEnd(u.node,u.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var HV=Rl&&"documentMode"in document&&11>=document.documentMode,hf=null,mw=null,lm=null,vw=!1;function X6(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;vw||hf==null||hf!==y0(n)||(n=hf,"selectionStart"in n&&o3(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),lm&&Rm(lm,n)||(lm=n,n=E0(mw,"onSelect"),0<n.length&&(t=new r3("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=hf)))}function ny(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var pf={animationend:ny("Animation","AnimationEnd"),animationiteration:ny("Animation","AnimationIteration"),animationstart:ny("Animation","AnimationStart"),transitionend:ny("Transition","TransitionEnd")},_b={},kR={};Rl&&(kR=document.createElement("div").style,"AnimationEvent"in window||(delete pf.animationend.animation,delete pf.animationiteration.animation,delete pf.animationstart.animation),"TransitionEvent"in window||delete pf.transitionend.transition);function I1(e){if(_b[e])return _b[e];if(!pf[e])return e;var t=pf[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in kR)return _b[e]=t[r];return e}var TR=I1("animationend"),PR=I1("animationiteration"),MR=I1("animationstart"),IR=I1("transitionend"),RR=new Map,Y6="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 Ju(e,t){RR.set(e,t),hd(t,[e])}for(var bb=0;bb<Y6.length;bb++){var wb=Y6[bb],WV=wb.toLowerCase(),qV=wb[0].toUpperCase()+wb.slice(1);Ju(WV,"on"+qV)}Ju(TR,"onAnimationEnd");Ju(PR,"onAnimationIteration");Ju(MR,"onAnimationStart");Ju("dblclick","onDoubleClick");Ju("focusin","onFocus");Ju("focusout","onBlur");Ju(IR,"onTransitionEnd");Lf("onMouseEnter",["mouseout","mouseover"]);Lf("onMouseLeave",["mouseout","mouseover"]);Lf("onPointerEnter",["pointerout","pointerover"]);Lf("onPointerLeave",["pointerout","pointerover"]);hd("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));hd("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));hd("onBeforeInput",["compositionend","keypress","textInput","paste"]);hd("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));hd("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));hd("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zp="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(" "),GV=new Set("cancel close invalid load scroll toggle".split(" ").concat(Zp));function Q6(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,WB(n,t,void 0,e),e.currentTarget=null}function OR(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],i=n.event;n=n.listeners;e:{var a=void 0;if(t)for(var u=n.length-1;0<=u;u--){var o=n[u],f=o.instance,p=o.currentTarget;if(o=o.listener,f!==a&&i.isPropagationStopped())break e;Q6(i,o,p),a=f}else for(u=0;u<n.length;u++){if(o=n[u],f=o.instance,p=o.currentTarget,o=o.listener,f!==a&&i.isPropagationStopped())break e;Q6(i,o,p),a=f}}}if(_0)throw e=dw,_0=!1,dw=null,e}function Wn(e,t){var r=t[bw];r===void 0&&(r=t[bw]=new Set);var n=e+"__bubble";r.has(n)||(AR(t,e,2,!1),r.add(n))}function Cb(e,t,r){var n=0;t&&(n|=4),AR(r,e,n,t)}var iy="_reactListening"+Math.random().toString(36).slice(2);function Om(e){if(!e[iy]){e[iy]=!0,BI.forEach(function(r){r!=="selectionchange"&&(GV.has(r)||Cb(r,!1,e),Cb(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[iy]||(t[iy]=!0,Cb("selectionchange",!1,t))}}function AR(e,t,r,n){switch(vR(t)){case 1:var i=lV;break;case 4:i=uV;break;default:i=e3}r=i.bind(null,t,r,e),i=void 0,!cw||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,r,{capture:!0,passive:i}):e.addEventListener(t,r,!0):i!==void 0?e.addEventListener(t,r,{passive:i}):e.addEventListener(t,r,!1)}function Sb(e,t,r,n,i){var a=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var u=n.tag;if(u===3||u===4){var o=n.stateNode.containerInfo;if(o===i||o.nodeType===8&&o.parentNode===i)break;if(u===4)for(u=n.return;u!==null;){var f=u.tag;if((f===3||f===4)&&(f=u.stateNode.containerInfo,f===i||f.nodeType===8&&f.parentNode===i))return;u=u.return}for(;o!==null;){if(u=Uc(o),u===null)return;if(f=u.tag,f===5||f===6){n=a=u;continue e}o=o.parentNode}}n=n.return}rR(function(){var p=a,v=XC(r),y=[];e:{var w=RR.get(e);if(w!==void 0){var k=r3,T=e;switch(e){case"keypress":if(qy(r)===0)break e;case"keydown":case"keyup":k=SV;break;case"focusin":T="focus",k=gb;break;case"focusout":T="blur",k=gb;break;case"beforeblur":case"afterblur":k=gb;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":k=B6;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":k=fV;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":k=TV;break;case TR:case PR:case MR:k=mV;break;case IR:k=MV;break;case"scroll":k=cV;break;case"wheel":k=RV;break;case"copy":case"cut":case"paste":k=gV;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":k=j6}var R=(t&4)!==0,A=!R&&e==="scroll",I=R?w!==null?w+"Capture":null:w;R=[];for(var O=p,N;O!==null;){N=O;var L=N.stateNode;if(N.tag===5&&L!==null&&(N=L,I!==null&&(L=km(O,I),L!=null&&R.push(Am(O,L,N)))),A)break;O=O.return}0<R.length&&(w=new k(w,T,null,r,v),y.push({event:w,listeners:R}))}}if((t&7)===0){e:{if(w=e==="mouseover"||e==="pointerover",k=e==="mouseout"||e==="pointerout",w&&r!==lw&&(T=r.relatedTarget||r.fromElement)&&(Uc(T)||T[Ol]))break e;if((k||w)&&(w=v.window===v?v:(w=v.ownerDocument)?w.defaultView||w.parentWindow:window,k?(T=r.relatedTarget||r.toElement,k=p,T=T?Uc(T):null,T!==null&&(A=pd(T),T!==A||T.tag!==5&&T.tag!==6)&&(T=null)):(k=null,T=p),k!==T)){if(R=B6,L="onMouseLeave",I="onMouseEnter",O="mouse",(e==="pointerout"||e==="pointerover")&&(R=j6,L="onPointerLeave",I="onPointerEnter",O="pointer"),A=k==null?w:mf(k),N=T==null?w:mf(T),w=new R(L,O+"leave",k,r,v),w.target=A,w.relatedTarget=N,L=null,Uc(v)===p&&(R=new R(I,O+"enter",T,r,v),R.target=N,R.relatedTarget=A,L=R),A=L,k&&T)t:{for(R=k,I=T,O=0,N=R;N;N=ef(N))O++;for(N=0,L=I;L;L=ef(L))N++;for(;0<O-N;)R=ef(R),O--;for(;0<N-O;)I=ef(I),N--;for(;O--;){if(R===I||I!==null&&R===I.alternate)break t;R=ef(R),I=ef(I)}R=null}else R=null;k!==null&&J6(y,w,k,R,!1),T!==null&&A!==null&&J6(y,A,T,R,!0)}}e:{if(w=p?mf(p):window,k=w.nodeName&&w.nodeName.toLowerCase(),k==="select"||k==="input"&&w.type==="file")var B=FV;else if(H6(w))if(wR)B=jV;else{B=BV;var j=$V}else(k=w.nodeName)&&k.toLowerCase()==="input"&&(w.type==="checkbox"||w.type==="radio")&&(B=VV);if(B&&(B=B(e,p))){bR(y,B,r,v);break e}j&&j(e,w,p),e==="focusout"&&(j=w._wrapperState)&&j.controlled&&w.type==="number"&&nw(w,"number",w.value)}switch(j=p?mf(p):window,e){case"focusin":(H6(j)||j.contentEditable==="true")&&(hf=j,mw=p,lm=null);break;case"focusout":lm=mw=hf=null;break;case"mousedown":vw=!0;break;case"contextmenu":case"mouseup":case"dragend":vw=!1,X6(y,r,v);break;case"selectionchange":if(HV)break;case"keydown":case"keyup":X6(y,r,v)}var G;if(i3)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 ff?xR(e,r)&&(H="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(H="onCompositionStart");H&&(yR&&r.locale!=="ko"&&(ff||H!=="onCompositionStart"?H==="onCompositionEnd"&&ff&&(G=gR()):(Su=v,t3="value"in Su?Su.value:Su.textContent,ff=!0)),j=E0(p,H),0<j.length&&(H=new V6(H,e,null,r,v),y.push({event:H,listeners:j}),G?H.data=G:(G=_R(r),G!==null&&(H.data=G)))),(G=AV?NV(e,r):zV(e,r))&&(p=E0(p,"onBeforeInput"),0<p.length&&(v=new V6("onBeforeInput","beforeinput",null,r,v),y.push({event:v,listeners:p}),v.data=G))}OR(y,t)})}function Am(e,t,r){return{instance:e,listener:t,currentTarget:r}}function E0(e,t){for(var r=t+"Capture",n=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=km(e,r),a!=null&&n.unshift(Am(e,a,i)),a=km(e,t),a!=null&&n.push(Am(e,a,i))),e=e.return}return n}function ef(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function J6(e,t,r,n,i){for(var a=t._reactName,u=[];r!==null&&r!==n;){var o=r,f=o.alternate,p=o.stateNode;if(f!==null&&f===n)break;o.tag===5&&p!==null&&(o=p,i?(f=km(r,a),f!=null&&u.unshift(Am(r,f,o))):i||(f=km(r,a),f!=null&&u.push(Am(r,f,o)))),r=r.return}u.length!==0&&e.push({event:t,listeners:u})}var ZV=/\r\n?/g,XV=/\u0000|\uFFFD/g;function ek(e){return(typeof e=="string"?e:""+e).replace(ZV,`
`).replace(XV,"")}function oy(e,t,r){if(t=ek(t),ek(e)!==t&&r)throw Error(Kt(425))}function k0(){}var gw=null,yw=null;function xw(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 _w=typeof setTimeout=="function"?setTimeout:void 0,YV=typeof clearTimeout=="function"?clearTimeout:void 0,tk=typeof Promise=="function"?Promise:void 0,QV=typeof queueMicrotask=="function"?queueMicrotask:typeof tk<"u"?function(e){return tk.resolve(null).then(e).catch(JV)}:_w;function JV(e){setTimeout(function(){throw e})}function Eb(e,t){var r=t,n=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){e.removeChild(i),Mm(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}while(r);Mm(t)}function zu(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 rk(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var uh=Math.random().toString(36).slice(2),Fs="__reactFiber$"+uh,Nm="__reactProps$"+uh,Ol="__reactContainer$"+uh,bw="__reactEvents$"+uh,ej="__reactListeners$"+uh,tj="__reactHandles$"+uh;function Uc(e){var t=e[Fs];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Ol]||r[Fs]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=rk(e);e!==null;){if(r=e[Fs])return r;e=rk(e)}return t}e=r,r=e.parentNode}return null}function cv(e){return e=e[Fs]||e[Ol],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function mf(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Kt(33))}function R1(e){return e[Nm]||null}var ww=[],vf=-1;function ec(e){return{current:e}}function Xn(e){0>vf||(e.current=ww[vf],ww[vf]=null,vf--)}function Kn(e,t){vf++,ww[vf]=e.current,e.current=t}var Hu={},xo=ec(Hu),Go=ec(!1),td=Hu;function Ff(e,t){var r=e.type.contextTypes;if(!r)return Hu;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Zo(e){return e=e.childContextTypes,e!=null}function T0(){Xn(Go),Xn(xo)}function nk(e,t,r){if(xo.current!==Hu)throw Error(Kt(168));Kn(xo,t),Kn(Go,r)}function NR(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(Kt(108,$B(e)||"Unknown",i));return ui({},r,n)}function P0(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Hu,td=xo.current,Kn(xo,e),Kn(Go,Go.current),!0}function ik(e,t,r){var n=e.stateNode;if(!n)throw Error(Kt(169));r?(e=NR(e,t,td),n.__reactInternalMemoizedMergedChildContext=e,Xn(Go),Xn(xo),Kn(xo,e)):Xn(Go),Kn(Go,r)}var _l=null,O1=!1,kb=!1;function zR(e){_l===null?_l=[e]:_l.push(e)}function rj(e){O1=!0,zR(e)}function tc(){if(!kb&&_l!==null){kb=!0;var e=0,t=Tn;try{var r=_l;for(Tn=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}_l=null,O1=!1}catch(i){throw _l!==null&&(_l=_l.slice(e+1)),aR(YC,tc),i}finally{Tn=t,kb=!1}}return null}var gf=[],yf=0,M0=null,I0=0,Da=[],La=0,rd=null,El=1,kl="";function zc(e,t){gf[yf++]=I0,gf[yf++]=M0,M0=e,I0=t}function DR(e,t,r){Da[La++]=El,Da[La++]=kl,Da[La++]=rd,rd=e;var n=El;e=kl;var i=32-gs(n)-1;n&=~(1<<i),r+=1;var a=32-gs(t)+i;if(30<a){var u=i-i%5;a=(n&(1<<u)-1).toString(32),n>>=u,i-=u,El=1<<32-gs(t)+i|r<<i|n,kl=a+e}else El=1<<a|r<<i|n,kl=e}function a3(e){e.return!==null&&(zc(e,1),DR(e,1,0))}function s3(e){for(;e===M0;)M0=gf[--yf],gf[yf]=null,I0=gf[--yf],gf[yf]=null;for(;e===rd;)rd=Da[--La],Da[La]=null,kl=Da[--La],Da[La]=null,El=Da[--La],Da[La]=null}var va=null,ha=null,ii=!1,ps=null;function LR(e,t){var r=Ba(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function ok(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,va=e,ha=zu(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,va=e,ha=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=rd!==null?{id:El,overflow:kl}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Ba(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,va=e,ha=null,!0):!1;default:return!1}}function Cw(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Sw(e){if(ii){var t=ha;if(t){var r=t;if(!ok(e,t)){if(Cw(e))throw Error(Kt(418));t=zu(r.nextSibling);var n=va;t&&ok(e,t)?LR(n,r):(e.flags=e.flags&-4097|2,ii=!1,va=e)}}else{if(Cw(e))throw Error(Kt(418));e.flags=e.flags&-4097|2,ii=!1,va=e}}}function ak(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;va=e}function ay(e){if(e!==va)return!1;if(!ii)return ak(e),ii=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!xw(e.type,e.memoizedProps)),t&&(t=ha)){if(Cw(e))throw FR(),Error(Kt(418));for(;t;)LR(e,t),t=zu(t.nextSibling)}if(ak(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 r=e.data;if(r==="/$"){if(t===0){ha=zu(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}ha=null}}else ha=va?zu(e.stateNode.nextSibling):null;return!0}function FR(){for(var e=ha;e;)e=zu(e.nextSibling)}function $f(){ha=va=null,ii=!1}function l3(e){ps===null?ps=[e]:ps.push(e)}var nj=Ul.ReactCurrentBatchConfig;function ds(e,t){if(e&&e.defaultProps){t=ui({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}var R0=ec(null),O0=null,xf=null,u3=null;function c3(){u3=xf=O0=null}function d3(e){var t=R0.current;Xn(R0),e._currentValue=t}function Ew(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Of(e,t){O0=e,u3=xf=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(qo=!0),e.firstContext=null)}function Wa(e){var t=e._currentValue;if(u3!==e)if(e={context:e,memoizedValue:t,next:null},xf===null){if(O0===null)throw Error(Kt(308));xf=e,O0.dependencies={lanes:0,firstContext:e}}else xf=xf.next=e;return t}var Kc=null;function f3(e){Kc===null?Kc=[e]:Kc.push(e)}function $R(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,f3(t)):(r.next=i.next,i.next=r),t.interleaved=r,Al(e,n)}function Al(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var xu=!1;function h3(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function BR(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 Pl(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Du(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(vn&2)!==0){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,Al(e,r)}return i=n.interleaved,i===null?(t.next=t,f3(n)):(t.next=i.next,i.next=t),n.interleaved=t,Al(e,r)}function Gy(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,QC(e,r)}}function sk(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var u={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?i=a=u:a=a.next=u,r=r.next}while(r!==null);a===null?i=a=t:a=a.next=t}else i=a=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function A0(e,t,r,n){var i=e.updateQueue;xu=!1;var a=i.firstBaseUpdate,u=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var f=o,p=f.next;f.next=null,u===null?a=p:u.next=p,u=f;var v=e.alternate;v!==null&&(v=v.updateQueue,o=v.lastBaseUpdate,o!==u&&(o===null?v.firstBaseUpdate=p:o.next=p,v.lastBaseUpdate=f))}if(a!==null){var y=i.baseState;u=0,v=p=f=null,o=a;do{var w=o.lane,k=o.eventTime;if((n&w)===w){v!==null&&(v=v.next={eventTime:k,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var T=e,R=o;switch(w=t,k=r,R.tag){case 1:if(T=R.payload,typeof T=="function"){y=T.call(k,y,w);break e}y=T;break e;case 3:T.flags=T.flags&-65537|128;case 0:if(T=R.payload,w=typeof T=="function"?T.call(k,y,w):T,w==null)break e;y=ui({},y,w);break e;case 2:xu=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,w=i.effects,w===null?i.effects=[o]:w.push(o))}else k={eventTime:k,lane:w,tag:o.tag,payload:o.payload,callback:o.callback,next:null},v===null?(p=v=k,f=y):v=v.next=k,u|=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(v===null&&(f=y),i.baseState=f,i.firstBaseUpdate=p,i.lastBaseUpdate=v,t=i.shared.interleaved,t!==null){i=t;do u|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);id|=u,e.lanes=u,e.memoizedState=y}}function lk(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(Kt(191,i));i.call(n)}}}var VR=new $I.Component().refs;function kw(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:ui({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var A1={isMounted:function(e){return(e=e._reactInternals)?pd(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=No(),i=Fu(e),a=Pl(n,i);a.payload=t,r!=null&&(a.callback=r),t=Du(e,a,i),t!==null&&(ys(t,e,i,n),Gy(t,e,i))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=No(),i=Fu(e),a=Pl(n,i);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=Du(e,a,i),t!==null&&(ys(t,e,i,n),Gy(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=No(),n=Fu(e),i=Pl(r,n);i.tag=2,t!=null&&(i.callback=t),t=Du(e,i,n),t!==null&&(ys(t,e,n,r),Gy(t,e,n))}};function uk(e,t,r,n,i,a,u){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,a,u):t.prototype&&t.prototype.isPureReactComponent?!Rm(r,n)||!Rm(i,a):!0}function jR(e,t,r){var n=!1,i=Hu,a=t.contextType;return typeof a=="object"&&a!==null?a=Wa(a):(i=Zo(t)?td:xo.current,n=t.contextTypes,a=(n=n!=null)?Ff(e,i):Hu),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=A1,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function ck(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&A1.enqueueReplaceState(t,t.state,null)}function Tw(e,t,r,n){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs=VR,h3(e);var a=t.contextType;typeof a=="object"&&a!==null?i.context=Wa(a):(a=Zo(t)?td:xo.current,i.context=Ff(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(kw(e,t,a,r),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&&A1.enqueueReplaceState(i,i.state,null),A0(e,r,i,n),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Ap(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(Kt(309));var n=r.stateNode}if(!n)throw Error(Kt(147,e));var i=n,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(u){var o=i.refs;o===VR&&(o=i.refs={}),u===null?delete o[a]:o[a]=u},t._stringRef=a,t)}if(typeof e!="string")throw Error(Kt(284));if(!r._owner)throw Error(Kt(290,e))}return e}function sy(e,t){throw e=Object.prototype.toString.call(t),Error(Kt(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function dk(e){var t=e._init;return t(e._payload)}function UR(e){function t(I,O){if(e){var N=I.deletions;N===null?(I.deletions=[O],I.flags|=16):N.push(O)}}function r(I,O){if(!e)return null;for(;O!==null;)t(I,O),O=O.sibling;return null}function n(I,O){for(I=new Map;O!==null;)O.key!==null?I.set(O.key,O):I.set(O.index,O),O=O.sibling;return I}function i(I,O){return I=$u(I,O),I.index=0,I.sibling=null,I}function a(I,O,N){return I.index=N,e?(N=I.alternate,N!==null?(N=N.index,N<O?(I.flags|=2,O):N):(I.flags|=2,O)):(I.flags|=1048576,O)}function u(I){return e&&I.alternate===null&&(I.flags|=2),I}function o(I,O,N,L){return O===null||O.tag!==6?(O=Ab(N,I.mode,L),O.return=I,O):(O=i(O,N),O.return=I,O)}function f(I,O,N,L){var B=N.type;return B===df?v(I,O,N.props.children,L,N.key):O!==null&&(O.elementType===B||typeof B=="object"&&B!==null&&B.$$typeof===yu&&dk(B)===O.type)?(L=i(O,N.props),L.ref=Ap(I,O,N),L.return=I,L):(L=e0(N.type,N.key,N.props,null,I.mode,L),L.ref=Ap(I,O,N),L.return=I,L)}function p(I,O,N,L){return O===null||O.tag!==4||O.stateNode.containerInfo!==N.containerInfo||O.stateNode.implementation!==N.implementation?(O=Nb(N,I.mode,L),O.return=I,O):(O=i(O,N.children||[]),O.return=I,O)}function v(I,O,N,L,B){return O===null||O.tag!==7?(O=Qc(N,I.mode,L,B),O.return=I,O):(O=i(O,N),O.return=I,O)}function y(I,O,N){if(typeof O=="string"&&O!==""||typeof O=="number")return O=Ab(""+O,I.mode,N),O.return=I,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case Xg:return N=e0(O.type,O.key,O.props,null,I.mode,N),N.ref=Ap(I,null,O),N.return=I,N;case cf:return O=Nb(O,I.mode,N),O.return=I,O;case yu:var L=O._init;return y(I,L(O._payload),N)}if(qp(O)||Pp(O))return O=Qc(O,I.mode,N,null),O.return=I,O;sy(I,O)}return null}function w(I,O,N,L){var B=O!==null?O.key:null;if(typeof N=="string"&&N!==""||typeof N=="number")return B!==null?null:o(I,O,""+N,L);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case Xg:return N.key===B?f(I,O,N,L):null;case cf:return N.key===B?p(I,O,N,L):null;case yu:return B=N._init,w(I,O,B(N._payload),L)}if(qp(N)||Pp(N))return B!==null?null:v(I,O,N,L,null);sy(I,N)}return null}function k(I,O,N,L,B){if(typeof L=="string"&&L!==""||typeof L=="number")return I=I.get(N)||null,o(O,I,""+L,B);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case Xg:return I=I.get(L.key===null?N:L.key)||null,f(O,I,L,B);case cf:return I=I.get(L.key===null?N:L.key)||null,p(O,I,L,B);case yu:var j=L._init;return k(I,O,N,j(L._payload),B)}if(qp(L)||Pp(L))return I=I.get(N)||null,v(O,I,L,B,null);sy(O,L)}return null}function T(I,O,N,L){for(var B=null,j=null,G=O,H=O=0,te=null;G!==null&&H<N.length;H++){G.index>H?(te=G,G=null):te=G.sibling;var Y=w(I,G,N[H],L);if(Y===null){G===null&&(G=te);break}e&&G&&Y.alternate===null&&t(I,G),O=a(Y,O,H),j===null?B=Y:j.sibling=Y,j=Y,G=te}if(H===N.length)return r(I,G),ii&&zc(I,H),B;if(G===null){for(;H<N.length;H++)G=y(I,N[H],L),G!==null&&(O=a(G,O,H),j===null?B=G:j.sibling=G,j=G);return ii&&zc(I,H),B}for(G=n(I,G);H<N.length;H++)te=k(G,I,H,N[H],L),te!==null&&(e&&te.alternate!==null&&G.delete(te.key===null?H:te.key),O=a(te,O,H),j===null?B=te:j.sibling=te,j=te);return e&&G.forEach(function(le){return t(I,le)}),ii&&zc(I,H),B}function R(I,O,N,L){var B=Pp(N);if(typeof B!="function")throw Error(Kt(150));if(N=B.call(N),N==null)throw Error(Kt(151));for(var j=B=null,G=O,H=O=0,te=null,Y=N.next();G!==null&&!Y.done;H++,Y=N.next()){G.index>H?(te=G,G=null):te=G.sibling;var le=w(I,G,Y.value,L);if(le===null){G===null&&(G=te);break}e&&G&&le.alternate===null&&t(I,G),O=a(le,O,H),j===null?B=le:j.sibling=le,j=le,G=te}if(Y.done)return r(I,G),ii&&zc(I,H),B;if(G===null){for(;!Y.done;H++,Y=N.next())Y=y(I,Y.value,L),Y!==null&&(O=a(Y,O,H),j===null?B=Y:j.sibling=Y,j=Y);return ii&&zc(I,H),B}for(G=n(I,G);!Y.done;H++,Y=N.next())Y=k(G,I,H,Y.value,L),Y!==null&&(e&&Y.alternate!==null&&G.delete(Y.key===null?H:Y.key),O=a(Y,O,H),j===null?B=Y:j.sibling=Y,j=Y);return e&&G.forEach(function(J){return t(I,J)}),ii&&zc(I,H),B}function A(I,O,N,L){if(typeof N=="object"&&N!==null&&N.type===df&&N.key===null&&(N=N.props.children),typeof N=="object"&&N!==null){switch(N.$$typeof){case Xg:e:{for(var B=N.key,j=O;j!==null;){if(j.key===B){if(B=N.type,B===df){if(j.tag===7){r(I,j.sibling),O=i(j,N.props.children),O.return=I,I=O;break e}}else if(j.elementType===B||typeof B=="object"&&B!==null&&B.$$typeof===yu&&dk(B)===j.type){r(I,j.sibling),O=i(j,N.props),O.ref=Ap(I,j,N),O.return=I,I=O;break e}r(I,j);break}else t(I,j);j=j.sibling}N.type===df?(O=Qc(N.props.children,I.mode,L,N.key),O.return=I,I=O):(L=e0(N.type,N.key,N.props,null,I.mode,L),L.ref=Ap(I,O,N),L.return=I,I=L)}return u(I);case cf:e:{for(j=N.key;O!==null;){if(O.key===j)if(O.tag===4&&O.stateNode.containerInfo===N.containerInfo&&O.stateNode.implementation===N.implementation){r(I,O.sibling),O=i(O,N.children||[]),O.return=I,I=O;break e}else{r(I,O);break}else t(I,O);O=O.sibling}O=Nb(N,I.mode,L),O.return=I,I=O}return u(I);case yu:return j=N._init,A(I,O,j(N._payload),L)}if(qp(N))return T(I,O,N,L);if(Pp(N))return R(I,O,N,L);sy(I,N)}return typeof N=="string"&&N!==""||typeof N=="number"?(N=""+N,O!==null&&O.tag===6?(r(I,O.sibling),O=i(O,N),O.return=I,I=O):(r(I,O),O=Ab(N,I.mode,L),O.return=I,I=O),u(I)):r(I,O)}return A}var Bf=UR(!0),KR=UR(!1),dv={},Ks=ec(dv),zm=ec(dv),Dm=ec(dv);function Hc(e){if(e===dv)throw Error(Kt(174));return e}function p3(e,t){switch(Kn(Dm,t),Kn(zm,e),Kn(Ks,dv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ow(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ow(t,e)}Xn(Ks),Kn(Ks,t)}function Vf(){Xn(Ks),Xn(zm),Xn(Dm)}function HR(e){Hc(Dm.current);var t=Hc(Ks.current),r=ow(t,e.type);t!==r&&(Kn(zm,e),Kn(Ks,r))}function m3(e){zm.current===e&&(Xn(Ks),Xn(zm))}var si=ec(0);function N0(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.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 Tb=[];function v3(){for(var e=0;e<Tb.length;e++)Tb[e]._workInProgressVersionPrimary=null;Tb.length=0}var Zy=Ul.ReactCurrentDispatcher,Pb=Ul.ReactCurrentBatchConfig,nd=0,li=null,$i=null,Zi=null,z0=!1,um=!1,Lm=0,ij=0;function mo(){throw Error(Kt(321))}function g3(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!_s(e[r],t[r]))return!1;return!0}function y3(e,t,r,n,i,a){if(nd=a,li=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Zy.current=e===null||e.memoizedState===null?lj:uj,e=r(n,i),um){a=0;do{if(um=!1,Lm=0,25<=a)throw Error(Kt(301));a+=1,Zi=$i=null,t.updateQueue=null,Zy.current=cj,e=r(n,i)}while(um)}if(Zy.current=D0,t=$i!==null&&$i.next!==null,nd=0,Zi=$i=li=null,z0=!1,t)throw Error(Kt(300));return e}function x3(){var e=Lm!==0;return Lm=0,e}function Ls(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Zi===null?li.memoizedState=Zi=e:Zi=Zi.next=e,Zi}function qa(){if($i===null){var e=li.alternate;e=e!==null?e.memoizedState:null}else e=$i.next;var t=Zi===null?li.memoizedState:Zi.next;if(t!==null)Zi=t,$i=e;else{if(e===null)throw Error(Kt(310));$i=e,e={memoizedState:$i.memoizedState,baseState:$i.baseState,baseQueue:$i.baseQueue,queue:$i.queue,next:null},Zi===null?li.memoizedState=Zi=e:Zi=Zi.next=e}return Zi}function Fm(e,t){return typeof t=="function"?t(e):t}function Mb(e){var t=qa(),r=t.queue;if(r===null)throw Error(Kt(311));r.lastRenderedReducer=e;var n=$i,i=n.baseQueue,a=r.pending;if(a!==null){if(i!==null){var u=i.next;i.next=a.next,a.next=u}n.baseQueue=i=a,r.pending=null}if(i!==null){a=i.next,n=n.baseState;var o=u=null,f=null,p=a;do{var v=p.lane;if((nd&v)===v)f!==null&&(f=f.next={lane:0,action:p.action,hasEagerState:p.hasEagerState,eagerState:p.eagerState,next:null}),n=p.hasEagerState?p.eagerState:e(n,p.action);else{var y={lane:v,action:p.action,hasEagerState:p.hasEagerState,eagerState:p.eagerState,next:null};f===null?(o=f=y,u=n):f=f.next=y,li.lanes|=v,id|=v}p=p.next}while(p!==null&&p!==a);f===null?u=n:f.next=o,_s(n,t.memoizedState)||(qo=!0),t.memoizedState=n,t.baseState=u,t.baseQueue=f,r.lastRenderedState=n}if(e=r.interleaved,e!==null){i=e;do a=i.lane,li.lanes|=a,id|=a,i=i.next;while(i!==e)}else i===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Ib(e){var t=qa(),r=t.queue;if(r===null)throw Error(Kt(311));r.lastRenderedReducer=e;var n=r.dispatch,i=r.pending,a=t.memoizedState;if(i!==null){r.pending=null;var u=i=i.next;do a=e(a,u.action),u=u.next;while(u!==i);_s(a,t.memoizedState)||(qo=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,n]}function WR(){}function qR(e,t){var r=li,n=qa(),i=t(),a=!_s(n.memoizedState,i);if(a&&(n.memoizedState=i,qo=!0),n=n.queue,_3(XR.bind(null,r,n,e),[e]),n.getSnapshot!==t||a||Zi!==null&&Zi.memoizedState.tag&1){if(r.flags|=2048,$m(9,ZR.bind(null,r,n,i,t),void 0,null),Xi===null)throw Error(Kt(349));(nd&30)!==0||GR(r,t,i)}return i}function GR(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=li.updateQueue,t===null?(t={lastEffect:null,stores:null},li.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function ZR(e,t,r,n){t.value=r,t.getSnapshot=n,YR(t)&&QR(e)}function XR(e,t,r){return r(function(){YR(t)&&QR(e)})}function YR(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!_s(e,r)}catch{return!0}}function QR(e){var t=Al(e,1);t!==null&&ys(t,e,1,-1)}function fk(e){var t=Ls();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Fm,lastRenderedState:e},t.queue=e,e=e.dispatch=sj.bind(null,li,e),[t.memoizedState,e]}function $m(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=li.updateQueue,t===null?(t={lastEffect:null,stores:null},li.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function JR(){return qa().memoizedState}function Xy(e,t,r,n){var i=Ls();li.flags|=e,i.memoizedState=$m(1|t,r,void 0,n===void 0?null:n)}function N1(e,t,r,n){var i=qa();n=n===void 0?null:n;var a=void 0;if($i!==null){var u=$i.memoizedState;if(a=u.destroy,n!==null&&g3(n,u.deps)){i.memoizedState=$m(t,r,a,n);return}}li.flags|=e,i.memoizedState=$m(1|t,r,a,n)}function hk(e,t){return Xy(8390656,8,e,t)}function _3(e,t){return N1(2048,8,e,t)}function e7(e,t){return N1(4,2,e,t)}function t7(e,t){return N1(4,4,e,t)}function r7(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 n7(e,t,r){return r=r!=null?r.concat([e]):null,N1(4,4,r7.bind(null,t,e),r)}function b3(){}function i7(e,t){var r=qa();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&g3(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function o7(e,t){var r=qa();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&g3(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function a7(e,t,r){return(nd&21)===0?(e.baseState&&(e.baseState=!1,qo=!0),e.memoizedState=r):(_s(r,t)||(r=uR(),li.lanes|=r,id|=r,e.baseState=!0),t)}function oj(e,t){var r=Tn;Tn=r!==0&&4>r?r:4,e(!0);var n=Pb.transition;Pb.transition={};try{e(!1),t()}finally{Tn=r,Pb.transition=n}}function s7(){return qa().memoizedState}function aj(e,t,r){var n=Fu(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},l7(e))u7(t,r);else if(r=$R(e,t,r,n),r!==null){var i=No();ys(r,e,n,i),c7(r,t,n)}}function sj(e,t,r){var n=Fu(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(l7(e))u7(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var u=t.lastRenderedState,o=a(u,r);if(i.hasEagerState=!0,i.eagerState=o,_s(o,u)){var f=t.interleaved;f===null?(i.next=i,f3(t)):(i.next=f.next,f.next=i),t.interleaved=i;return}}catch{}finally{}r=$R(e,t,i,n),r!==null&&(i=No(),ys(r,e,n,i),c7(r,t,n))}}function l7(e){var t=e.alternate;return e===li||t!==null&&t===li}function u7(e,t){um=z0=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function c7(e,t,r){if((r&4194240)!==0){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,QC(e,r)}}var D0={readContext:Wa,useCallback:mo,useContext:mo,useEffect:mo,useImperativeHandle:mo,useInsertionEffect:mo,useLayoutEffect:mo,useMemo:mo,useReducer:mo,useRef:mo,useState:mo,useDebugValue:mo,useDeferredValue:mo,useTransition:mo,useMutableSource:mo,useSyncExternalStore:mo,useId:mo,unstable_isNewReconciler:!1},lj={readContext:Wa,useCallback:function(e,t){return Ls().memoizedState=[e,t===void 0?null:t],e},useContext:Wa,useEffect:hk,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Xy(4194308,4,r7.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Xy(4194308,4,e,t)},useInsertionEffect:function(e,t){return Xy(4,2,e,t)},useMemo:function(e,t){var r=Ls();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Ls();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=aj.bind(null,li,e),[n.memoizedState,e]},useRef:function(e){var t=Ls();return e={current:e},t.memoizedState=e},useState:fk,useDebugValue:b3,useDeferredValue:function(e){return Ls().memoizedState=e},useTransition:function(){var e=fk(!1),t=e[0];return e=oj.bind(null,e[1]),Ls().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=li,i=Ls();if(ii){if(r===void 0)throw Error(Kt(407));r=r()}else{if(r=t(),Xi===null)throw Error(Kt(349));(nd&30)!==0||GR(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,hk(XR.bind(null,n,a,e),[e]),n.flags|=2048,$m(9,ZR.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=Ls(),t=Xi.identifierPrefix;if(ii){var r=kl,n=El;r=(n&~(1<<32-gs(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Lm++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=ij++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},uj={readContext:Wa,useCallback:i7,useContext:Wa,useEffect:_3,useImperativeHandle:n7,useInsertionEffect:e7,useLayoutEffect:t7,useMemo:o7,useReducer:Mb,useRef:JR,useState:function(){return Mb(Fm)},useDebugValue:b3,useDeferredValue:function(e){var t=qa();return a7(t,$i.memoizedState,e)},useTransition:function(){var e=Mb(Fm)[0],t=qa().memoizedState;return[e,t]},useMutableSource:WR,useSyncExternalStore:qR,useId:s7,unstable_isNewReconciler:!1},cj={readContext:Wa,useCallback:i7,useContext:Wa,useEffect:_3,useImperativeHandle:n7,useInsertionEffect:e7,useLayoutEffect:t7,useMemo:o7,useReducer:Ib,useRef:JR,useState:function(){return Ib(Fm)},useDebugValue:b3,useDeferredValue:function(e){var t=qa();return $i===null?t.memoizedState=e:a7(t,$i.memoizedState,e)},useTransition:function(){var e=Ib(Fm)[0],t=qa().memoizedState;return[e,t]},useMutableSource:WR,useSyncExternalStore:qR,useId:s7,unstable_isNewReconciler:!1};function jf(e,t){try{var r="",n=t;do r+=FB(n),n=n.return;while(n);var i=r}catch(a){i=`
Error generating stack: `+a.message+`
`+a.stack}return{value:e,source:t,stack:i,digest:null}}function Rb(e,t,r){return{value:e,source:null,stack:r!=null?r:null,digest:t!=null?t:null}}function Pw(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var dj=typeof WeakMap=="function"?WeakMap:Map;function d7(e,t,r){r=Pl(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){F0||(F0=!0,Fw=n),Pw(e,t)},r}function f7(e,t,r){r=Pl(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=t.value;r.payload=function(){return n(i)},r.callback=function(){Pw(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){Pw(e,t),typeof n!="function"&&(Lu===null?Lu=new Set([this]):Lu.add(this));var u=t.stack;this.componentDidCatch(t.value,{componentStack:u!==null?u:""})}),r}function pk(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new dj;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=Ej.bind(null,e,t,r),t.then(e,e))}function mk(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 vk(e,t,r,n,i){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Pl(-1,1),t.tag=2,Du(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var fj=Ul.ReactCurrentOwner,qo=!1;function Ro(e,t,r,n){t.child=e===null?KR(t,null,r,n):Bf(t,e.child,r,n)}function gk(e,t,r,n,i){r=r.render;var a=t.ref;return Of(t,i),n=y3(e,t,r,n,a,i),r=x3(),e!==null&&!qo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Nl(e,t,i)):(ii&&r&&a3(t),t.flags|=1,Ro(e,t,n,i),t.child)}function yk(e,t,r,n,i){if(e===null){var a=r.type;return typeof a=="function"&&!M3(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,h7(e,t,a,n,i)):(e=e0(r.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var u=a.memoizedProps;if(r=r.compare,r=r!==null?r:Rm,r(u,n)&&e.ref===t.ref)return Nl(e,t,i)}return t.flags|=1,e=$u(a,n),e.ref=t.ref,e.return=t,t.child=e}function h7(e,t,r,n,i){if(e!==null){var a=e.memoizedProps;if(Rm(a,n)&&e.ref===t.ref)if(qo=!1,t.pendingProps=n=a,(e.lanes&i)!==0)(e.flags&131072)!==0&&(qo=!0);else return t.lanes=e.lanes,Nl(e,t,i)}return Mw(e,t,r,n,i)}function p7(e,t,r){var n=t.pendingProps,i=n.children,a=e!==null?e.memoizedState:null;if(n.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Kn(bf,da),da|=r;else{if((r&1073741824)===0)return e=a!==null?a.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Kn(bf,da),da|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,Kn(bf,da),da|=n}else a!==null?(n=a.baseLanes|r,t.memoizedState=null):n=r,Kn(bf,da),da|=n;return Ro(e,t,i,r),t.child}function m7(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Mw(e,t,r,n,i){var a=Zo(r)?td:xo.current;return a=Ff(t,a),Of(t,i),r=y3(e,t,r,n,a,i),n=x3(),e!==null&&!qo?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Nl(e,t,i)):(ii&&n&&a3(t),t.flags|=1,Ro(e,t,r,i),t.child)}function xk(e,t,r,n,i){if(Zo(r)){var a=!0;P0(t)}else a=!1;if(Of(t,i),t.stateNode===null)Yy(e,t),jR(t,r,n),Tw(t,r,n,i),n=!0;else if(e===null){var u=t.stateNode,o=t.memoizedProps;u.props=o;var f=u.context,p=r.contextType;typeof p=="object"&&p!==null?p=Wa(p):(p=Zo(r)?td:xo.current,p=Ff(t,p));var v=r.getDerivedStateFromProps,y=typeof v=="function"||typeof u.getSnapshotBeforeUpdate=="function";y||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(o!==n||f!==p)&&ck(t,u,n,p),xu=!1;var w=t.memoizedState;u.state=w,A0(t,n,u,i),f=t.memoizedState,o!==n||w!==f||Go.current||xu?(typeof v=="function"&&(kw(t,r,v,n),f=t.memoizedState),(o=xu||uk(t,r,o,n,w,f,p))?(y||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=f),u.props=n,u.state=f,u.context=p,n=o):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{u=t.stateNode,BR(e,t),o=t.memoizedProps,p=t.type===t.elementType?o:ds(t.type,o),u.props=p,y=t.pendingProps,w=u.context,f=r.contextType,typeof f=="object"&&f!==null?f=Wa(f):(f=Zo(r)?td:xo.current,f=Ff(t,f));var k=r.getDerivedStateFromProps;(v=typeof k=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(o!==y||w!==f)&&ck(t,u,n,f),xu=!1,w=t.memoizedState,u.state=w,A0(t,n,u,i);var T=t.memoizedState;o!==y||w!==T||Go.current||xu?(typeof k=="function"&&(kw(t,r,k,n),T=t.memoizedState),(p=xu||uk(t,r,p,n,w,T,f)||!1)?(v||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(n,T,f),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(n,T,f)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||o===e.memoizedProps&&w===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&w===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=T),u.props=n,u.state=T,u.context=f,n=p):(typeof u.componentDidUpdate!="function"||o===e.memoizedProps&&w===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&w===e.memoizedState||(t.flags|=1024),n=!1)}return Iw(e,t,r,n,a,i)}function Iw(e,t,r,n,i,a){m7(e,t);var u=(t.flags&128)!==0;if(!n&&!u)return i&&ik(t,r,!1),Nl(e,t,a);n=t.stateNode,fj.current=t;var o=u&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&u?(t.child=Bf(t,e.child,null,a),t.child=Bf(t,null,o,a)):Ro(e,t,o,a),t.memoizedState=n.state,i&&ik(t,r,!0),t.child}function v7(e){var t=e.stateNode;t.pendingContext?nk(e,t.pendingContext,t.pendingContext!==t.context):t.context&&nk(e,t.context,!1),p3(e,t.containerInfo)}function _k(e,t,r,n,i){return $f(),l3(i),t.flags|=256,Ro(e,t,r,n),t.child}var Rw={dehydrated:null,treeContext:null,retryLane:0};function Ow(e){return{baseLanes:e,cachePool:null,transitions:null}}function g7(e,t,r){var n=t.pendingProps,i=si.current,a=!1,u=(t.flags&128)!==0,o;if((o=u)||(o=e!==null&&e.memoizedState===null?!1:(i&2)!==0),o?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Kn(si,i&1),e===null)return Sw(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):(u=n.children,e=n.fallback,a?(n=t.mode,a=t.child,u={mode:"hidden",children:u},(n&1)===0&&a!==null?(a.childLanes=0,a.pendingProps=u):a=L1(u,n,0,null),e=Qc(e,n,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Ow(r),t.memoizedState=Rw,e):w3(t,u));if(i=e.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return hj(e,t,u,n,o,i,r);if(a){a=n.fallback,u=t.mode,i=e.child,o=i.sibling;var f={mode:"hidden",children:n.children};return(u&1)===0&&t.child!==i?(n=t.child,n.childLanes=0,n.pendingProps=f,t.deletions=null):(n=$u(i,f),n.subtreeFlags=i.subtreeFlags&14680064),o!==null?a=$u(o,a):(a=Qc(a,u,r,null),a.flags|=2),a.return=t,n.return=t,n.sibling=a,t.child=n,n=a,a=t.child,u=e.child.memoizedState,u=u===null?Ow(r):{baseLanes:u.baseLanes|r,cachePool:null,transitions:u.transitions},a.memoizedState=u,a.childLanes=e.childLanes&~r,t.memoizedState=Rw,n}return a=e.child,e=a.sibling,n=$u(a,{mode:"visible",children:n.children}),(t.mode&1)===0&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function w3(e,t){return t=L1({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ly(e,t,r,n){return n!==null&&l3(n),Bf(t,e.child,null,r),e=w3(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function hj(e,t,r,n,i,a,u){if(r)return t.flags&256?(t.flags&=-257,n=Rb(Error(Kt(422))),ly(e,t,u,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=n.fallback,i=t.mode,n=L1({mode:"visible",children:n.children},i,0,null),a=Qc(a,i,u,null),a.flags|=2,n.return=t,a.return=t,n.sibling=a,t.child=n,(t.mode&1)!==0&&Bf(t,e.child,null,u),t.child.memoizedState=Ow(u),t.memoizedState=Rw,a);if((t.mode&1)===0)return ly(e,t,u,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var o=n.dgst;return n=o,a=Error(Kt(419)),n=Rb(a,n,void 0),ly(e,t,u,n)}if(o=(u&e.childLanes)!==0,qo||o){if(n=Xi,n!==null){switch(u&-u){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&(n.suspendedLanes|u))!==0?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,Al(e,i),ys(n,e,i,-1))}return P3(),n=Rb(Error(Kt(421))),ly(e,t,u,n)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=kj.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,ha=zu(i.nextSibling),va=t,ii=!0,ps=null,e!==null&&(Da[La++]=El,Da[La++]=kl,Da[La++]=rd,El=e.id,kl=e.overflow,rd=t),t=w3(t,n.children),t.flags|=4096,t)}function bk(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Ew(e.return,t,r)}function Ob(e,t,r,n,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=n,a.tail=r,a.tailMode=i)}function y7(e,t,r){var n=t.pendingProps,i=n.revealOrder,a=n.tail;if(Ro(e,t,n.children,r),n=si.current,(n&2)!==0)n=n&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&&bk(e,r,t);else if(e.tag===19)bk(e,r,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}n&=1}if(Kn(si,n),(t.mode&1)===0)t.memoizedState=null;else switch(i){case"forwards":for(r=t.child,i=null;r!==null;)e=r.alternate,e!==null&&N0(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),Ob(t,!1,i,r,a);break;case"backwards":for(r=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&N0(e)===null){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}Ob(t,!0,r,null,a);break;case"together":Ob(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Yy(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Nl(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),id|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(Kt(153));if(t.child!==null){for(e=t.child,r=$u(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=$u(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function pj(e,t,r){switch(t.tag){case 3:v7(t),$f();break;case 5:HR(t);break;case 1:Zo(t.type)&&P0(t);break;case 4:p3(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,i=t.memoizedProps.value;Kn(R0,n._currentValue),n._currentValue=i;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Kn(si,si.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?g7(e,t,r):(Kn(si,si.current&1),e=Nl(e,t,r),e!==null?e.sibling:null);Kn(si,si.current&1);break;case 19:if(n=(r&t.childLanes)!==0,(e.flags&128)!==0){if(n)return y7(e,t,r);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Kn(si,si.current),n)break;return null;case 22:case 23:return t.lanes=0,p7(e,t,r)}return Nl(e,t,r)}var x7,Aw,_7,b7;x7=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Aw=function(){};_7=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,Hc(Ks.current);var a=null;switch(r){case"input":i=tw(e,i),n=tw(e,n),a=[];break;case"select":i=ui({},i,{value:void 0}),n=ui({},n,{value:void 0}),a=[];break;case"textarea":i=iw(e,i),n=iw(e,n),a=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=k0)}aw(r,n);var u;r=null;for(p in i)if(!n.hasOwnProperty(p)&&i.hasOwnProperty(p)&&i[p]!=null)if(p==="style"){var o=i[p];for(u in o)o.hasOwnProperty(u)&&(r||(r={}),r[u]="")}else p!=="dangerouslySetInnerHTML"&&p!=="children"&&p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&p!=="autoFocus"&&(Sm.hasOwnProperty(p)?a||(a=[]):(a=a||[]).push(p,null));for(p in n){var f=n[p];if(o=i!=null?i[p]:void 0,n.hasOwnProperty(p)&&f!==o&&(f!=null||o!=null))if(p==="style")if(o){for(u in o)!o.hasOwnProperty(u)||f&&f.hasOwnProperty(u)||(r||(r={}),r[u]="");for(u in f)f.hasOwnProperty(u)&&o[u]!==f[u]&&(r||(r={}),r[u]=f[u])}else r||(a||(a=[]),a.push(p,r)),r=f;else p==="dangerouslySetInnerHTML"?(f=f?f.__html:void 0,o=o?o.__html:void 0,f!=null&&o!==f&&(a=a||[]).push(p,f)):p==="children"?typeof f!="string"&&typeof f!="number"||(a=a||[]).push(p,""+f):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&(Sm.hasOwnProperty(p)?(f!=null&&p==="onScroll"&&Wn("scroll",e),a||o===f||(a=[])):(a=a||[]).push(p,f))}r&&(a=a||[]).push("style",r);var p=a;(t.updateQueue=p)&&(t.flags|=4)}};b7=function(e,t,r,n){r!==n&&(t.flags|=4)};function Np(e,t){if(!ii)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function vo(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function mj(e,t,r){var n=t.pendingProps;switch(s3(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vo(t),null;case 1:return Zo(t.type)&&T0(),vo(t),null;case 3:return n=t.stateNode,Vf(),Xn(Go),Xn(xo),v3(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ay(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ps!==null&&(Vw(ps),ps=null))),Aw(e,t),vo(t),null;case 5:m3(t);var i=Hc(Dm.current);if(r=t.type,e!==null&&t.stateNode!=null)_7(e,t,r,n,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(Kt(166));return vo(t),null}if(e=Hc(Ks.current),ay(t)){n=t.stateNode,r=t.type;var a=t.memoizedProps;switch(n[Fs]=t,n[Nm]=a,e=(t.mode&1)!==0,r){case"dialog":Wn("cancel",n),Wn("close",n);break;case"iframe":case"object":case"embed":Wn("load",n);break;case"video":case"audio":for(i=0;i<Zp.length;i++)Wn(Zp[i],n);break;case"source":Wn("error",n);break;case"img":case"image":case"link":Wn("error",n),Wn("load",n);break;case"details":Wn("toggle",n);break;case"input":I6(n,a),Wn("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},Wn("invalid",n);break;case"textarea":O6(n,a),Wn("invalid",n)}aw(r,a),i=null;for(var u in a)if(a.hasOwnProperty(u)){var o=a[u];u==="children"?typeof o=="string"?n.textContent!==o&&(a.suppressHydrationWarning!==!0&&oy(n.textContent,o,e),i=["children",o]):typeof o=="number"&&n.textContent!==""+o&&(a.suppressHydrationWarning!==!0&&oy(n.textContent,o,e),i=["children",""+o]):Sm.hasOwnProperty(u)&&o!=null&&u==="onScroll"&&Wn("scroll",n)}switch(r){case"input":Yg(n),R6(n,a,!0);break;case"textarea":Yg(n),A6(n);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(n.onclick=k0)}n=i,t.updateQueue=n,n!==null&&(t.flags|=4)}else{u=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=GI(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=u.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=u.createElement(r,{is:n.is}):(e=u.createElement(r),r==="select"&&(u=e,n.multiple?u.multiple=!0:n.size&&(u.size=n.size))):e=u.createElementNS(e,r),e[Fs]=t,e[Nm]=n,x7(e,t,!1,!1),t.stateNode=e;e:{switch(u=sw(r,n),r){case"dialog":Wn("cancel",e),Wn("close",e),i=n;break;case"iframe":case"object":case"embed":Wn("load",e),i=n;break;case"video":case"audio":for(i=0;i<Zp.length;i++)Wn(Zp[i],e);i=n;break;case"source":Wn("error",e),i=n;break;case"img":case"image":case"link":Wn("error",e),Wn("load",e),i=n;break;case"details":Wn("toggle",e),i=n;break;case"input":I6(e,n),i=tw(e,n),Wn("invalid",e);break;case"option":i=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},i=ui({},n,{value:void 0}),Wn("invalid",e);break;case"textarea":O6(e,n),i=iw(e,n),Wn("invalid",e);break;default:i=n}aw(r,i),o=i;for(a in o)if(o.hasOwnProperty(a)){var f=o[a];a==="style"?YI(e,f):a==="dangerouslySetInnerHTML"?(f=f?f.__html:void 0,f!=null&&ZI(e,f)):a==="children"?typeof f=="string"?(r!=="textarea"||f!=="")&&Em(e,f):typeof f=="number"&&Em(e,""+f):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Sm.hasOwnProperty(a)?f!=null&&a==="onScroll"&&Wn("scroll",e):f!=null&&WC(e,a,f,u))}switch(r){case"input":Yg(e),R6(e,n,!1);break;case"textarea":Yg(e),A6(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Ku(n.value));break;case"select":e.multiple=!!n.multiple,a=n.value,a!=null?Pf(e,!!n.multiple,a,!1):n.defaultValue!=null&&Pf(e,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=k0)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return vo(t),null;case 6:if(e&&t.stateNode!=null)b7(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(Kt(166));if(r=Hc(Dm.current),Hc(Ks.current),ay(t)){if(n=t.stateNode,r=t.memoizedProps,n[Fs]=t,(a=n.nodeValue!==r)&&(e=va,e!==null))switch(e.tag){case 3:oy(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&oy(n.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Fs]=t,t.stateNode=n}return vo(t),null;case 13:if(Xn(si),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ii&&ha!==null&&(t.mode&1)!==0&&(t.flags&128)===0)FR(),$f(),t.flags|=98560,a=!1;else if(a=ay(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(Kt(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(Kt(317));a[Fs]=t}else $f(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;vo(t),a=!1}else ps!==null&&(Vw(ps),ps=null),a=!0;if(!a)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(si.current&1)!==0?Bi===0&&(Bi=3):P3())),t.updateQueue!==null&&(t.flags|=4),vo(t),null);case 4:return Vf(),Aw(e,t),e===null&&Om(t.stateNode.containerInfo),vo(t),null;case 10:return d3(t.type._context),vo(t),null;case 17:return Zo(t.type)&&T0(),vo(t),null;case 19:if(Xn(si),a=t.memoizedState,a===null)return vo(t),null;if(n=(t.flags&128)!==0,u=a.rendering,u===null)if(n)Np(a,!1);else{if(Bi!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=N0(e),u!==null){for(t.flags|=128,Np(a,!1),n=u.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)a=r,e=n,a.flags&=14680066,u=a.alternate,u===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=u.childLanes,a.lanes=u.lanes,a.child=u.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=u.memoizedProps,a.memoizedState=u.memoizedState,a.updateQueue=u.updateQueue,a.type=u.type,e=u.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Kn(si,si.current&1|2),t.child}e=e.sibling}a.tail!==null&&wi()>Uf&&(t.flags|=128,n=!0,Np(a,!1),t.lanes=4194304)}else{if(!n)if(e=N0(u),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Np(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!ii)return vo(t),null}else 2*wi()-a.renderingStartTime>Uf&&r!==1073741824&&(t.flags|=128,n=!0,Np(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(r=a.last,r!==null?r.sibling=u:t.child=u,a.last=u)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=wi(),t.sibling=null,r=si.current,Kn(si,n?r&1|2:r&1),t):(vo(t),null);case 22:case 23:return T3(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&(t.mode&1)!==0?(da&1073741824)!==0&&(vo(t),t.subtreeFlags&6&&(t.flags|=8192)):vo(t),null;case 24:return null;case 25:return null}throw Error(Kt(156,t.tag))}function vj(e,t){switch(s3(t),t.tag){case 1:return Zo(t.type)&&T0(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vf(),Xn(Go),Xn(xo),v3(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return m3(t),null;case 13:if(Xn(si),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Kt(340));$f()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Xn(si),null;case 4:return Vf(),null;case 10:return d3(t.type._context),null;case 22:case 23:return T3(),null;case 24:return null;default:return null}}var uy=!1,go=!1,gj=typeof WeakSet=="function"?WeakSet:Set,yr=null;function _f(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){hi(e,t,n)}else r.current=null}function Nw(e,t,r){try{r()}catch(n){hi(e,t,n)}}var wk=!1;function yj(e,t){if(gw=C0,e=ER(),o3(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var u=0,o=-1,f=-1,p=0,v=0,y=e,w=null;t:for(;;){for(var k;y!==r||i!==0&&y.nodeType!==3||(o=u+i),y!==a||n!==0&&y.nodeType!==3||(f=u+n),y.nodeType===3&&(u+=y.nodeValue.length),(k=y.firstChild)!==null;)w=y,y=k;for(;;){if(y===e)break t;if(w===r&&++p===i&&(o=u),w===a&&++v===n&&(f=u),(k=y.nextSibling)!==null)break;y=w,w=y.parentNode}y=k}r=o===-1||f===-1?null:{start:o,end:f}}else r=null}r=r||{start:0,end:0}}else r=null;for(yw={focusedElem:e,selectionRange:r},C0=!1,yr=t;yr!==null;)if(t=yr,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,yr=e;else for(;yr!==null;){t=yr;try{var T=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(T!==null){var R=T.memoizedProps,A=T.memoizedState,I=t.stateNode,O=I.getSnapshotBeforeUpdate(t.elementType===t.type?R:ds(t.type,R),A);I.__reactInternalSnapshotBeforeUpdate=O}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(L){hi(t,t.return,L)}if(e=t.sibling,e!==null){e.return=t.return,yr=e;break}yr=t.return}return T=wk,wk=!1,T}function cm(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&Nw(t,r,a)}i=i.next}while(i!==n)}}function z1(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function zw(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function w7(e){var t=e.alternate;t!==null&&(e.alternate=null,w7(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Fs],delete t[Nm],delete t[bw],delete t[ej],delete t[tj])),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 C7(e){return e.tag===5||e.tag===3||e.tag===4}function Ck(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||C7(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 Dw(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=k0));else if(n!==4&&(e=e.child,e!==null))for(Dw(e,t,r),e=e.sibling;e!==null;)Dw(e,t,r),e=e.sibling}function Lw(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Lw(e,t,r),e=e.sibling;e!==null;)Lw(e,t,r),e=e.sibling}var no=null,fs=!1;function du(e,t,r){for(r=r.child;r!==null;)S7(e,t,r),r=r.sibling}function S7(e,t,r){if(Us&&typeof Us.onCommitFiberUnmount=="function")try{Us.onCommitFiberUnmount(T1,r)}catch{}switch(r.tag){case 5:go||_f(r,t);case 6:var n=no,i=fs;no=null,du(e,t,r),no=n,fs=i,no!==null&&(fs?(e=no,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):no.removeChild(r.stateNode));break;case 18:no!==null&&(fs?(e=no,r=r.stateNode,e.nodeType===8?Eb(e.parentNode,r):e.nodeType===1&&Eb(e,r),Mm(e)):Eb(no,r.stateNode));break;case 4:n=no,i=fs,no=r.stateNode.containerInfo,fs=!0,du(e,t,r),no=n,fs=i;break;case 0:case 11:case 14:case 15:if(!go&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,u=a.destroy;a=a.tag,u!==void 0&&((a&2)!==0||(a&4)!==0)&&Nw(r,t,u),i=i.next}while(i!==n)}du(e,t,r);break;case 1:if(!go&&(_f(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(o){hi(r,t,o)}du(e,t,r);break;case 21:du(e,t,r);break;case 22:r.mode&1?(go=(n=go)||r.memoizedState!==null,du(e,t,r),go=n):du(e,t,r);break;default:du(e,t,r)}}function Sk(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new gj),t.forEach(function(n){var i=Tj.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function ls(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var a=e,u=t,o=u;e:for(;o!==null;){switch(o.tag){case 5:no=o.stateNode,fs=!1;break e;case 3:no=o.stateNode.containerInfo,fs=!0;break e;case 4:no=o.stateNode.containerInfo,fs=!0;break e}o=o.return}if(no===null)throw Error(Kt(160));S7(a,u,i),no=null,fs=!1;var f=i.alternate;f!==null&&(f.return=null),i.return=null}catch(p){hi(i,t,p)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)E7(t,e),t=t.sibling}function E7(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ls(t,e),zs(e),n&4){try{cm(3,e,e.return),z1(3,e)}catch(R){hi(e,e.return,R)}try{cm(5,e,e.return)}catch(R){hi(e,e.return,R)}}break;case 1:ls(t,e),zs(e),n&512&&r!==null&&_f(r,r.return);break;case 5:if(ls(t,e),zs(e),n&512&&r!==null&&_f(r,r.return),e.flags&32){var i=e.stateNode;try{Em(i,"")}catch(R){hi(e,e.return,R)}}if(n&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,u=r!==null?r.memoizedProps:a,o=e.type,f=e.updateQueue;if(e.updateQueue=null,f!==null)try{o==="input"&&a.type==="radio"&&a.name!=null&&WI(i,a),sw(o,u);var p=sw(o,a);for(u=0;u<f.length;u+=2){var v=f[u],y=f[u+1];v==="style"?YI(i,y):v==="dangerouslySetInnerHTML"?ZI(i,y):v==="children"?Em(i,y):WC(i,v,y,p)}switch(o){case"input":rw(i,a);break;case"textarea":qI(i,a);break;case"select":var w=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var k=a.value;k!=null?Pf(i,!!a.multiple,k,!1):w!==!!a.multiple&&(a.defaultValue!=null?Pf(i,!!a.multiple,a.defaultValue,!0):Pf(i,!!a.multiple,a.multiple?[]:"",!1))}i[Nm]=a}catch(R){hi(e,e.return,R)}}break;case 6:if(ls(t,e),zs(e),n&4){if(e.stateNode===null)throw Error(Kt(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(R){hi(e,e.return,R)}}break;case 3:if(ls(t,e),zs(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Mm(t.containerInfo)}catch(R){hi(e,e.return,R)}break;case 4:ls(t,e),zs(e);break;case 13:ls(t,e),zs(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(E3=wi())),n&4&&Sk(e);break;case 22:if(v=r!==null&&r.memoizedState!==null,e.mode&1?(go=(p=go)||v,ls(t,e),go=p):ls(t,e),zs(e),n&8192){if(p=e.memoizedState!==null,(e.stateNode.isHidden=p)&&!v&&(e.mode&1)!==0)for(yr=e,v=e.child;v!==null;){for(y=yr=v;yr!==null;){switch(w=yr,k=w.child,w.tag){case 0:case 11:case 14:case 15:cm(4,w,w.return);break;case 1:_f(w,w.return);var T=w.stateNode;if(typeof T.componentWillUnmount=="function"){n=w,r=w.return;try{t=n,T.props=t.memoizedProps,T.state=t.memoizedState,T.componentWillUnmount()}catch(R){hi(n,r,R)}}break;case 5:_f(w,w.return);break;case 22:if(w.memoizedState!==null){kk(y);continue}}k!==null?(k.return=w,yr=k):kk(y)}v=v.sibling}e:for(v=null,y=e;;){if(y.tag===5){if(v===null){v=y;try{i=y.stateNode,p?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(o=y.stateNode,f=y.memoizedProps.style,u=f!=null&&f.hasOwnProperty("display")?f.display:null,o.style.display=XI("display",u))}catch(R){hi(e,e.return,R)}}}else if(y.tag===6){if(v===null)try{y.stateNode.nodeValue=p?"":y.memoizedProps}catch(R){hi(e,e.return,R)}}else if((y.tag!==22&&y.tag!==23||y.memoizedState===null||y===e)&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===e)break e;for(;y.sibling===null;){if(y.return===null||y.return===e)break e;v===y&&(v=null),y=y.return}v===y&&(v=null),y.sibling.return=y.return,y=y.sibling}}break;case 19:ls(t,e),zs(e),n&4&&Sk(e);break;case 21:break;default:ls(t,e),zs(e)}}function zs(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(C7(r)){var n=r;break e}r=r.return}throw Error(Kt(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(Em(i,""),n.flags&=-33);var a=Ck(e);Lw(e,a,i);break;case 3:case 4:var u=n.stateNode.containerInfo,o=Ck(e);Dw(e,o,u);break;default:throw Error(Kt(161))}}catch(f){hi(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xj(e,t,r){yr=e,k7(e)}function k7(e,t,r){for(var n=(e.mode&1)!==0;yr!==null;){var i=yr,a=i.child;if(i.tag===22&&n){var u=i.memoizedState!==null||uy;if(!u){var o=i.alternate,f=o!==null&&o.memoizedState!==null||go;o=uy;var p=go;if(uy=u,(go=f)&&!p)for(yr=i;yr!==null;)u=yr,f=u.child,u.tag===22&&u.memoizedState!==null?Tk(i):f!==null?(f.return=u,yr=f):Tk(i);for(;a!==null;)yr=a,k7(a),a=a.sibling;yr=i,uy=o,go=p}Ek(e)}else(i.subtreeFlags&8772)!==0&&a!==null?(a.return=i,yr=a):Ek(e)}}function Ek(e){for(;yr!==null;){var t=yr;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:go||z1(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!go)if(r===null)n.componentDidMount();else{var i=t.elementType===t.type?r.memoizedProps:ds(t.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&lk(t,a,n);break;case 3:var u=t.updateQueue;if(u!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}lk(t,u,r)}break;case 5:var o=t.stateNode;if(r===null&&t.flags&4){r=o;var f=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":f.autoFocus&&r.focus();break;case"img":f.src&&(r.src=f.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 v=p.memoizedState;if(v!==null){var y=v.dehydrated;y!==null&&Mm(y)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Kt(163))}go||t.flags&512&&zw(t)}catch(w){hi(t,t.return,w)}}if(t===e){yr=null;break}if(r=t.sibling,r!==null){r.return=t.return,yr=r;break}yr=t.return}}function kk(e){for(;yr!==null;){var t=yr;if(t===e){yr=null;break}var r=t.sibling;if(r!==null){r.return=t.return,yr=r;break}yr=t.return}}function Tk(e){for(;yr!==null;){var t=yr;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{z1(4,t)}catch(f){hi(t,r,f)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var i=t.return;try{n.componentDidMount()}catch(f){hi(t,i,f)}}var a=t.return;try{zw(t)}catch(f){hi(t,a,f)}break;case 5:var u=t.return;try{zw(t)}catch(f){hi(t,u,f)}}}catch(f){hi(t,t.return,f)}if(t===e){yr=null;break}var o=t.sibling;if(o!==null){o.return=t.return,yr=o;break}yr=t.return}}var _j=Math.ceil,L0=Ul.ReactCurrentDispatcher,C3=Ul.ReactCurrentOwner,Ka=Ul.ReactCurrentBatchConfig,vn=0,Xi=null,Oi=null,io=0,da=0,bf=ec(0),Bi=0,Bm=null,id=0,D1=0,S3=0,dm=null,Wo=null,E3=0,Uf=1/0,yl=null,F0=!1,Fw=null,Lu=null,cy=!1,Eu=null,$0=0,fm=0,$w=null,Qy=-1,Jy=0;function No(){return(vn&6)!==0?wi():Qy!==-1?Qy:Qy=wi()}function Fu(e){return(e.mode&1)===0?1:(vn&2)!==0&&io!==0?io&-io:nj.transition!==null?(Jy===0&&(Jy=uR()),Jy):(e=Tn,e!==0||(e=window.event,e=e===void 0?16:vR(e.type)),e)}function ys(e,t,r,n){if(50<fm)throw fm=0,$w=null,Error(Kt(185));lv(e,r,n),((vn&2)===0||e!==Xi)&&(e===Xi&&((vn&2)===0&&(D1|=r),Bi===4&&Cu(e,io)),Xo(e,n),r===1&&vn===0&&(t.mode&1)===0&&(Uf=wi()+500,O1&&tc()))}function Xo(e,t){var r=e.callbackNode;nV(e,t);var n=w0(e,e===Xi?io:0);if(n===0)r!==null&&D6(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&D6(r),t===1)e.tag===0?rj(Pk.bind(null,e)):zR(Pk.bind(null,e)),QV(function(){(vn&6)===0&&tc()}),r=null;else{switch(cR(n)){case 1:r=YC;break;case 4:r=sR;break;case 16:r=b0;break;case 536870912:r=lR;break;default:r=b0}r=N7(r,T7.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function T7(e,t){if(Qy=-1,Jy=0,(vn&6)!==0)throw Error(Kt(327));var r=e.callbackNode;if(Af()&&e.callbackNode!==r)return null;var n=w0(e,e===Xi?io:0);if(n===0)return null;if((n&30)!==0||(n&e.expiredLanes)!==0||t)t=B0(e,n);else{t=n;var i=vn;vn|=2;var a=M7();(Xi!==e||io!==t)&&(yl=null,Uf=wi()+500,Yc(e,t));do try{Cj();break}catch(o){P7(e,o)}while(1);c3(),L0.current=a,vn=i,Oi!==null?t=0:(Xi=null,io=0,t=Bi)}if(t!==0){if(t===2&&(i=fw(e),i!==0&&(n=i,t=Bw(e,i))),t===1)throw r=Bm,Yc(e,0),Cu(e,n),Xo(e,wi()),r;if(t===6)Cu(e,n);else{if(i=e.current.alternate,(n&30)===0&&!bj(i)&&(t=B0(e,n),t===2&&(a=fw(e),a!==0&&(n=a,t=Bw(e,a))),t===1))throw r=Bm,Yc(e,0),Cu(e,n),Xo(e,wi()),r;switch(e.finishedWork=i,e.finishedLanes=n,t){case 0:case 1:throw Error(Kt(345));case 2:Dc(e,Wo,yl);break;case 3:if(Cu(e,n),(n&130023424)===n&&(t=E3+500-wi(),10<t)){if(w0(e,0)!==0)break;if(i=e.suspendedLanes,(i&n)!==n){No(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=_w(Dc.bind(null,e,Wo,yl),t);break}Dc(e,Wo,yl);break;case 4:if(Cu(e,n),(n&4194240)===n)break;for(t=e.eventTimes,i=-1;0<n;){var u=31-gs(n);a=1<<u,u=t[u],u>i&&(i=u),n&=~a}if(n=i,n=wi()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*_j(n/1960))-n,10<n){e.timeoutHandle=_w(Dc.bind(null,e,Wo,yl),n);break}Dc(e,Wo,yl);break;case 5:Dc(e,Wo,yl);break;default:throw Error(Kt(329))}}}return Xo(e,wi()),e.callbackNode===r?T7.bind(null,e):null}function Bw(e,t){var r=dm;return e.current.memoizedState.isDehydrated&&(Yc(e,t).flags|=256),e=B0(e,t),e!==2&&(t=Wo,Wo=r,t!==null&&Vw(t)),e}function Vw(e){Wo===null?Wo=e:Wo.push.apply(Wo,e)}function bj(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var i=r[n],a=i.getSnapshot;i=i.value;try{if(!_s(a(),i))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 Cu(e,t){for(t&=~S3,t&=~D1,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-gs(t),n=1<<r;e[r]=-1,t&=~n}}function Pk(e){if((vn&6)!==0)throw Error(Kt(327));Af();var t=w0(e,0);if((t&1)===0)return Xo(e,wi()),null;var r=B0(e,t);if(e.tag!==0&&r===2){var n=fw(e);n!==0&&(t=n,r=Bw(e,n))}if(r===1)throw r=Bm,Yc(e,0),Cu(e,t),Xo(e,wi()),r;if(r===6)throw Error(Kt(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Dc(e,Wo,yl),Xo(e,wi()),null}function k3(e,t){var r=vn;vn|=1;try{return e(t)}finally{vn=r,vn===0&&(Uf=wi()+500,O1&&tc())}}function od(e){Eu!==null&&Eu.tag===0&&(vn&6)===0&&Af();var t=vn;vn|=1;var r=Ka.transition,n=Tn;try{if(Ka.transition=null,Tn=1,e)return e()}finally{Tn=n,Ka.transition=r,vn=t,(vn&6)===0&&tc()}}function T3(){da=bf.current,Xn(bf)}function Yc(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,YV(r)),Oi!==null)for(r=Oi.return;r!==null;){var n=r;switch(s3(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&T0();break;case 3:Vf(),Xn(Go),Xn(xo),v3();break;case 5:m3(n);break;case 4:Vf();break;case 13:Xn(si);break;case 19:Xn(si);break;case 10:d3(n.type._context);break;case 22:case 23:T3()}r=r.return}if(Xi=e,Oi=e=$u(e.current,null),io=da=t,Bi=0,Bm=null,S3=D1=id=0,Wo=dm=null,Kc!==null){for(t=0;t<Kc.length;t++)if(r=Kc[t],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,a=r.pending;if(a!==null){var u=a.next;a.next=i,n.next=u}r.pending=n}Kc=null}return e}function P7(e,t){do{var r=Oi;try{if(c3(),Zy.current=D0,z0){for(var n=li.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}z0=!1}if(nd=0,Zi=$i=li=null,um=!1,Lm=0,C3.current=null,r===null||r.return===null){Bi=1,Bm=t,Oi=null;break}e:{var a=e,u=r.return,o=r,f=t;if(t=io,o.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){var p=f,v=o,y=v.tag;if((v.mode&1)===0&&(y===0||y===11||y===15)){var w=v.alternate;w?(v.updateQueue=w.updateQueue,v.memoizedState=w.memoizedState,v.lanes=w.lanes):(v.updateQueue=null,v.memoizedState=null)}var k=mk(u);if(k!==null){k.flags&=-257,vk(k,u,o,a,t),k.mode&1&&pk(a,p,t),t=k,f=p;var T=t.updateQueue;if(T===null){var R=new Set;R.add(f),t.updateQueue=R}else T.add(f);break e}else{if((t&1)===0){pk(a,p,t),P3();break e}f=Error(Kt(426))}}else if(ii&&o.mode&1){var A=mk(u);if(A!==null){(A.flags&65536)===0&&(A.flags|=256),vk(A,u,o,a,t),l3(jf(f,o));break e}}a=f=jf(f,o),Bi!==4&&(Bi=2),dm===null?dm=[a]:dm.push(a),a=u;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var I=d7(a,f,t);sk(a,I);break e;case 1:o=f;var O=a.type,N=a.stateNode;if((a.flags&128)===0&&(typeof O.getDerivedStateFromError=="function"||N!==null&&typeof N.componentDidCatch=="function"&&(Lu===null||!Lu.has(N)))){a.flags|=65536,t&=-t,a.lanes|=t;var L=f7(a,o,t);sk(a,L);break e}}a=a.return}while(a!==null)}R7(r)}catch(B){t=B,Oi===r&&r!==null&&(Oi=r=r.return);continue}break}while(1)}function M7(){var e=L0.current;return L0.current=D0,e===null?D0:e}function P3(){(Bi===0||Bi===3||Bi===2)&&(Bi=4),Xi===null||(id&268435455)===0&&(D1&268435455)===0||Cu(Xi,io)}function B0(e,t){var r=vn;vn|=2;var n=M7();(Xi!==e||io!==t)&&(yl=null,Yc(e,t));do try{wj();break}catch(i){P7(e,i)}while(1);if(c3(),vn=r,L0.current=n,Oi!==null)throw Error(Kt(261));return Xi=null,io=0,Bi}function wj(){for(;Oi!==null;)I7(Oi)}function Cj(){for(;Oi!==null&&!GB();)I7(Oi)}function I7(e){var t=A7(e.alternate,e,da);e.memoizedProps=e.pendingProps,t===null?R7(e):Oi=t,C3.current=null}function R7(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=mj(r,t,da),r!==null){Oi=r;return}}else{if(r=vj(r,t),r!==null){r.flags&=32767,Oi=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Bi=6,Oi=null;return}}if(t=t.sibling,t!==null){Oi=t;return}Oi=t=e}while(t!==null);Bi===0&&(Bi=5)}function Dc(e,t,r){var n=Tn,i=Ka.transition;try{Ka.transition=null,Tn=1,Sj(e,t,r,n)}finally{Ka.transition=i,Tn=n}return null}function Sj(e,t,r,n){do Af();while(Eu!==null);if((vn&6)!==0)throw Error(Kt(327));r=e.finishedWork;var i=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(Kt(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(iV(e,a),e===Xi&&(Oi=Xi=null,io=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||cy||(cy=!0,N7(b0,function(){return Af(),null})),a=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||a){a=Ka.transition,Ka.transition=null;var u=Tn;Tn=1;var o=vn;vn|=4,C3.current=null,yj(e,r),E7(r,e),KV(yw),C0=!!gw,yw=gw=null,e.current=r,xj(r),ZB(),vn=o,Tn=u,Ka.transition=a}else e.current=r;if(cy&&(cy=!1,Eu=e,$0=i),a=e.pendingLanes,a===0&&(Lu=null),QB(r.stateNode),Xo(e,wi()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)i=t[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(F0)throw F0=!1,e=Fw,Fw=null,e;return($0&1)!==0&&e.tag!==0&&Af(),a=e.pendingLanes,(a&1)!==0?e===$w?fm++:(fm=0,$w=e):fm=0,tc(),null}function Af(){if(Eu!==null){var e=cR($0),t=Ka.transition,r=Tn;try{if(Ka.transition=null,Tn=16>e?16:e,Eu===null)var n=!1;else{if(e=Eu,Eu=null,$0=0,(vn&6)!==0)throw Error(Kt(331));var i=vn;for(vn|=4,yr=e.current;yr!==null;){var a=yr,u=a.child;if((yr.flags&16)!==0){var o=a.deletions;if(o!==null){for(var f=0;f<o.length;f++){var p=o[f];for(yr=p;yr!==null;){var v=yr;switch(v.tag){case 0:case 11:case 15:cm(8,v,a)}var y=v.child;if(y!==null)y.return=v,yr=y;else for(;yr!==null;){v=yr;var w=v.sibling,k=v.return;if(w7(v),v===p){yr=null;break}if(w!==null){w.return=k,yr=w;break}yr=k}}}var T=a.alternate;if(T!==null){var R=T.child;if(R!==null){T.child=null;do{var A=R.sibling;R.sibling=null,R=A}while(R!==null)}}yr=a}}if((a.subtreeFlags&2064)!==0&&u!==null)u.return=a,yr=u;else e:for(;yr!==null;){if(a=yr,(a.flags&2048)!==0)switch(a.tag){case 0:case 11:case 15:cm(9,a,a.return)}var I=a.sibling;if(I!==null){I.return=a.return,yr=I;break e}yr=a.return}}var O=e.current;for(yr=O;yr!==null;){u=yr;var N=u.child;if((u.subtreeFlags&2064)!==0&&N!==null)N.return=u,yr=N;else e:for(u=O;yr!==null;){if(o=yr,(o.flags&2048)!==0)try{switch(o.tag){case 0:case 11:case 15:z1(9,o)}}catch(B){hi(o,o.return,B)}if(o===u){yr=null;break e}var L=o.sibling;if(L!==null){L.return=o.return,yr=L;break e}yr=o.return}}if(vn=i,tc(),Us&&typeof Us.onPostCommitFiberRoot=="function")try{Us.onPostCommitFiberRoot(T1,e)}catch{}n=!0}return n}finally{Tn=r,Ka.transition=t}}return!1}function Mk(e,t,r){t=jf(r,t),t=d7(e,t,1),e=Du(e,t,1),t=No(),e!==null&&(lv(e,1,t),Xo(e,t))}function hi(e,t,r){if(e.tag===3)Mk(e,e,r);else for(;t!==null;){if(t.tag===3){Mk(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Lu===null||!Lu.has(n))){e=jf(r,e),e=f7(t,e,1),t=Du(t,e,1),e=No(),t!==null&&(lv(t,1,e),Xo(t,e));break}}t=t.return}}function Ej(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=No(),e.pingedLanes|=e.suspendedLanes&r,Xi===e&&(io&r)===r&&(Bi===4||Bi===3&&(io&130023424)===io&&500>wi()-E3?Yc(e,0):S3|=r),Xo(e,t)}function O7(e,t){t===0&&((e.mode&1)===0?t=1:(t=ey,ey<<=1,(ey&130023424)===0&&(ey=4194304)));var r=No();e=Al(e,t),e!==null&&(lv(e,t,r),Xo(e,r))}function kj(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),O7(e,r)}function Tj(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(Kt(314))}n!==null&&n.delete(t),O7(e,r)}var A7;A7=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Go.current)qo=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return qo=!1,pj(e,t,r);qo=(e.flags&131072)!==0}else qo=!1,ii&&(t.flags&1048576)!==0&&DR(t,I0,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Yy(e,t),e=t.pendingProps;var i=Ff(t,xo.current);Of(t,r),i=y3(null,t,n,e,i,r);var a=x3();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,Zo(n)?(a=!0,P0(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,h3(t),i.updater=A1,t.stateNode=i,i._reactInternals=t,Tw(t,n,e,r),t=Iw(null,t,n,!0,a,r)):(t.tag=0,ii&&a&&a3(t),Ro(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Yy(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=Mj(n),e=ds(n,e),i){case 0:t=Mw(null,t,n,e,r);break e;case 1:t=xk(null,t,n,e,r);break e;case 11:t=gk(null,t,n,e,r);break e;case 14:t=yk(null,t,n,ds(n.type,e),r);break e}throw Error(Kt(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:ds(n,i),Mw(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:ds(n,i),xk(e,t,n,i,r);case 3:e:{if(v7(t),e===null)throw Error(Kt(387));n=t.pendingProps,a=t.memoizedState,i=a.element,BR(e,t),A0(t,n,null,r);var u=t.memoizedState;if(n=u.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=jf(Error(Kt(423)),t),t=_k(e,t,n,r,i);break e}else if(n!==i){i=jf(Error(Kt(424)),t),t=_k(e,t,n,r,i);break e}else for(ha=zu(t.stateNode.containerInfo.firstChild),va=t,ii=!0,ps=null,r=KR(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if($f(),n===i){t=Nl(e,t,r);break e}Ro(e,t,n,r)}t=t.child}return t;case 5:return HR(t),e===null&&Sw(t),n=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,u=i.children,xw(n,i)?u=null:a!==null&&xw(n,a)&&(t.flags|=32),m7(e,t),Ro(e,t,u,r),t.child;case 6:return e===null&&Sw(t),null;case 13:return g7(e,t,r);case 4:return p3(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Bf(t,null,n,r):Ro(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:ds(n,i),gk(e,t,n,i,r);case 7:return Ro(e,t,t.pendingProps,r),t.child;case 8:return Ro(e,t,t.pendingProps.children,r),t.child;case 12:return Ro(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,a=t.memoizedProps,u=i.value,Kn(R0,n._currentValue),n._currentValue=u,a!==null)if(_s(a.value,u)){if(a.children===i.children&&!Go.current){t=Nl(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var o=a.dependencies;if(o!==null){u=a.child;for(var f=o.firstContext;f!==null;){if(f.context===n){if(a.tag===1){f=Pl(-1,r&-r),f.tag=2;var p=a.updateQueue;if(p!==null){p=p.shared;var v=p.pending;v===null?f.next=f:(f.next=v.next,v.next=f),p.pending=f}}a.lanes|=r,f=a.alternate,f!==null&&(f.lanes|=r),Ew(a.return,r,t),o.lanes|=r;break}f=f.next}}else if(a.tag===10)u=a.type===t.type?null:a.child;else if(a.tag===18){if(u=a.return,u===null)throw Error(Kt(341));u.lanes|=r,o=u.alternate,o!==null&&(o.lanes|=r),Ew(u,r,t),u=a.sibling}else u=a.child;if(u!==null)u.return=a;else for(u=a;u!==null;){if(u===t){u=null;break}if(a=u.sibling,a!==null){a.return=u.return,u=a;break}u=u.return}a=u}Ro(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,Of(t,r),i=Wa(i),n=n(i),t.flags|=1,Ro(e,t,n,r),t.child;case 14:return n=t.type,i=ds(n,t.pendingProps),i=ds(n.type,i),yk(e,t,n,i,r);case 15:return h7(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:ds(n,i),Yy(e,t),t.tag=1,Zo(n)?(e=!0,P0(t)):e=!1,Of(t,r),jR(t,n,i),Tw(t,n,i,r),Iw(null,t,n,!0,e,r);case 19:return y7(e,t,r);case 22:return p7(e,t,r)}throw Error(Kt(156,t.tag))};function N7(e,t){return aR(e,t)}function Pj(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ba(e,t,r,n){return new Pj(e,t,r,n)}function M3(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Mj(e){if(typeof e=="function")return M3(e)?1:0;if(e!=null){if(e=e.$$typeof,e===GC)return 11;if(e===ZC)return 14}return 2}function $u(e,t){var r=e.alternate;return r===null?(r=Ba(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function e0(e,t,r,n,i,a){var u=2;if(n=e,typeof e=="function")M3(e)&&(u=1);else if(typeof e=="string")u=5;else e:switch(e){case df:return Qc(r.children,i,a,t);case qC:u=8,i|=8;break;case Y2:return e=Ba(12,r,t,i|2),e.elementType=Y2,e.lanes=a,e;case Q2:return e=Ba(13,r,t,i),e.elementType=Q2,e.lanes=a,e;case J2:return e=Ba(19,r,t,i),e.elementType=J2,e.lanes=a,e;case UI:return L1(r,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case VI:u=10;break e;case jI:u=9;break e;case GC:u=11;break e;case ZC:u=14;break e;case yu:u=16,n=null;break e}throw Error(Kt(130,e==null?e:typeof e,""))}return t=Ba(u,r,t,i),t.elementType=e,t.type=n,t.lanes=a,t}function Qc(e,t,r,n){return e=Ba(7,e,n,t),e.lanes=r,e}function L1(e,t,r,n){return e=Ba(22,e,n,t),e.elementType=UI,e.lanes=r,e.stateNode={isHidden:!1},e}function Ab(e,t,r){return e=Ba(6,e,null,t),e.lanes=r,e}function Nb(e,t,r){return t=Ba(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ij(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=pb(0),this.expirationTimes=pb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pb(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function I3(e,t,r,n,i,a,u,o,f){return e=new Ij(e,t,r,o,f),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Ba(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},h3(a),e}function Rj(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:cf,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function z7(e){if(!e)return Hu;e=e._reactInternals;e:{if(pd(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(Zo(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Kt(171))}if(e.tag===1){var r=e.type;if(Zo(r))return NR(e,r,t)}return t}function D7(e,t,r,n,i,a,u,o,f){return e=I3(r,n,!0,e,i,a,u,o,f),e.context=z7(null),r=e.current,n=No(),i=Fu(r),a=Pl(n,i),a.callback=t!=null?t:null,Du(r,a,i),e.current.lanes=i,lv(e,i,n),Xo(e,n),e}function F1(e,t,r,n){var i=t.current,a=No(),u=Fu(i);return r=z7(r),t.context===null?t.context=r:t.pendingContext=r,t=Pl(a,u),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Du(i,t,u),e!==null&&(ys(e,i,u,a),Gy(e,i,u)),u}function V0(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 Ik(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function R3(e,t){Ik(e,t),(e=e.alternate)&&Ik(e,t)}function Oj(){return null}var L7=typeof reportError=="function"?reportError:function(e){console.error(e)};function O3(e){this._internalRoot=e}$1.prototype.render=O3.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Kt(409));F1(e,t,null,null)};$1.prototype.unmount=O3.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;od(function(){F1(null,e,null,null)}),t[Ol]=null}};function $1(e){this._internalRoot=e}$1.prototype.unstable_scheduleHydration=function(e){if(e){var t=hR();e={blockedOn:null,target:e,priority:t};for(var r=0;r<wu.length&&t!==0&&t<wu[r].priority;r++);wu.splice(r,0,e),r===0&&mR(e)}};function A3(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function B1(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Rk(){}function Aj(e,t,r,n,i){if(i){if(typeof n=="function"){var a=n;n=function(){var p=V0(u);a.call(p)}}var u=D7(t,n,e,0,null,!1,!1,"",Rk);return e._reactRootContainer=u,e[Ol]=u.current,Om(e.nodeType===8?e.parentNode:e),od(),u}for(;i=e.lastChild;)e.removeChild(i);if(typeof n=="function"){var o=n;n=function(){var p=V0(f);o.call(p)}}var f=I3(e,0,!1,null,null,!1,!1,"",Rk);return e._reactRootContainer=f,e[Ol]=f.current,Om(e.nodeType===8?e.parentNode:e),od(function(){F1(t,f,r,n)}),f}function V1(e,t,r,n,i){var a=r._reactRootContainer;if(a){var u=a;if(typeof i=="function"){var o=i;i=function(){var f=V0(u);o.call(f)}}F1(t,u,e,i)}else u=Aj(r,t,e,i,n);return V0(u)}dR=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Gp(t.pendingLanes);r!==0&&(QC(t,r|1),Xo(t,wi()),(vn&6)===0&&(Uf=wi()+500,tc()))}break;case 13:od(function(){var n=Al(e,1);if(n!==null){var i=No();ys(n,e,1,i)}}),R3(e,1)}};JC=function(e){if(e.tag===13){var t=Al(e,134217728);if(t!==null){var r=No();ys(t,e,134217728,r)}R3(e,134217728)}};fR=function(e){if(e.tag===13){var t=Fu(e),r=Al(e,t);if(r!==null){var n=No();ys(r,e,t,n)}R3(e,t)}};hR=function(){return Tn};pR=function(e,t){var r=Tn;try{return Tn=e,t()}finally{Tn=r}};uw=function(e,t,r){switch(t){case"input":if(rw(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var i=R1(n);if(!i)throw Error(Kt(90));HI(n),rw(n,i)}}}break;case"textarea":qI(e,r);break;case"select":t=r.value,t!=null&&Pf(e,!!r.multiple,t,!1)}};eR=k3;tR=od;var Nj={usingClientEntryPoint:!1,Events:[cv,mf,R1,QI,JI,k3]},zp={findFiberByHostInstance:Uc,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},zj={bundleType:zp.bundleType,version:zp.version,rendererPackageName:zp.rendererPackageName,rendererConfig:zp.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ul.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=iR(e),e===null?null:e.stateNode},findFiberByHostInstance:zp.findFiberByHostInstance||Oj,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 dy=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!dy.isDisabled&&dy.supportsFiber)try{T1=dy.inject(zj),Us=dy}catch{}}ba.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Nj;ba.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!A3(t))throw Error(Kt(200));return Rj(e,t,null,r)};ba.createRoot=function(e,t){if(!A3(e))throw Error(Kt(299));var r=!1,n="",i=L7;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=I3(e,1,!1,null,null,r,!1,n,i),e[Ol]=t.current,Om(e.nodeType===8?e.parentNode:e),new O3(t)};ba.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=iR(t),e=e===null?null:e.stateNode,e};ba.flushSync=function(e){return od(e)};ba.hydrate=function(e,t,r){if(!B1(t))throw Error(Kt(200));return V1(null,e,t,!0,r)};ba.hydrateRoot=function(e,t,r){if(!A3(e))throw Error(Kt(405));var n=r!=null&&r.hydratedSources||null,i=!1,a="",u=L7;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(u=r.onRecoverableError)),t=D7(t,null,e,1,r!=null?r:null,i,!1,a,u),e[Ol]=t.current,Om(e),n)for(e=0;e<n.length;e++)r=n[e],i=r._getVersion,i=i(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,i]:t.mutableSourceEagerHydrationData.push(r,i);return new $1(t)};ba.render=function(e,t,r){if(!B1(t))throw Error(Kt(200));return V1(null,e,t,!1,r)};ba.unmountComponentAtNode=function(e){if(!B1(e))throw Error(Kt(40));return e._reactRootContainer?(od(function(){V1(null,null,e,!1,function(){e._reactRootContainer=null,e[Ol]=null})}),!0):!1};ba.unstable_batchedUpdates=k3;ba.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!B1(r))throw Error(Kt(200));if(e==null||e._reactInternals===void 0)throw Error(Kt(38));return V1(e,t,r,!1,n)};ba.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(r){console.error(r)}}t(),e.exports=ba})(Qu);const ad=$C(Qu.exports),Dj=MI({__proto__:null,default:ad},[Qu.exports]);var Ok=Qu.exports;Z2.createRoot=Ok.createRoot,Z2.hydrateRoot=Ok.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 Vm(){return Vm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vm.apply(this,arguments)}var ku;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ku||(ku={}));const Ak="popstate";function Lj(e){e===void 0&&(e={});function t(n,i){let{pathname:a,search:u,hash:o}=n.location;return jw("",{pathname:a,search:u,hash:o},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:j0(i)}return $j(t,r,null,e)}function Ai(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Fj(){return Math.random().toString(36).substr(2,8)}function Nk(e,t){return{usr:e.state,key:e.key,idx:t}}function jw(e,t,r,n){return r===void 0&&(r=null),Vm({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ch(t):t,{state:r,key:t&&t.key||n||Fj()})}function j0(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function ch(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function $j(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:a=!1}=n,u=i.history,o=ku.Pop,f=null,p=v();p==null&&(p=0,u.replaceState(Vm({},u.state,{idx:p}),""));function v(){return(u.state||{idx:null}).idx}function y(){o=ku.Pop;let A=v(),I=A==null?null:A-p;p=A,f&&f({action:o,location:R.location,delta:I})}function w(A,I){o=ku.Push;let O=jw(R.location,A,I);r&&r(O,A),p=v()+1;let N=Nk(O,p),L=R.createHref(O);try{u.pushState(N,"",L)}catch{i.location.assign(L)}a&&f&&f({action:o,location:R.location,delta:1})}function k(A,I){o=ku.Replace;let O=jw(R.location,A,I);r&&r(O,A),p=v();let N=Nk(O,p),L=R.createHref(O);u.replaceState(N,"",L),a&&f&&f({action:o,location:R.location,delta:0})}function T(A){let I=i.location.origin!=="null"?i.location.origin:i.location.href,O=typeof A=="string"?A:j0(A);return Ai(I,"No window.location.(origin|href) available to create URL for href: "+O),new URL(O,I)}let R={get action(){return o},get location(){return e(i,u)},listen(A){if(f)throw new Error("A history only accepts one active listener");return i.addEventListener(Ak,y),f=A,()=>{i.removeEventListener(Ak,y),f=null}},createHref(A){return t(i,A)},createURL:T,encodeLocation(A){let I=T(A);return{pathname:I.pathname,search:I.search,hash:I.hash}},push:w,replace:k,go(A){return u.go(A)}};return R}var zk;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(zk||(zk={}));function Bj(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?ch(t):t,i=B7(n.pathname||"/",r);if(i==null)return null;let a=F7(e);Vj(a);let u=null;for(let o=0;u==null&&o<a.length;++o)u=Xj(a[o],Jj(i));return u}function F7(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let i=(a,u,o)=>{let f={relativePath:o===void 0?a.path||"":o,caseSensitive:a.caseSensitive===!0,childrenIndex:u,route:a};f.relativePath.startsWith("/")&&(Ai(f.relativePath.startsWith(n),'Absolute route path "'+f.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),f.relativePath=f.relativePath.slice(n.length));let p=Bu([n,f.relativePath]),v=r.concat(f);a.children&&a.children.length>0&&(Ai(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+p+'".')),F7(a.children,t,v,p)),!(a.path==null&&!a.index)&&t.push({path:p,score:Gj(p,a.index),routesMeta:v})};return e.forEach((a,u)=>{var o;if(a.path===""||!((o=a.path)!=null&&o.includes("?")))i(a,u);else for(let f of $7(a.path))i(a,u,f)}),t}function $7(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return i?[a,""]:[a];let u=$7(n.join("/")),o=[];return o.push(...u.map(f=>f===""?a:[a,f].join("/"))),i&&o.push(...u),o.map(f=>e.startsWith("/")&&f===""?"/":f)}function Vj(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Zj(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const jj=/^:\w+$/,Uj=3,Kj=2,Hj=1,Wj=10,qj=-2,Dk=e=>e==="*";function Gj(e,t){let r=e.split("/"),n=r.length;return r.some(Dk)&&(n+=qj),t&&(n+=Kj),r.filter(i=>!Dk(i)).reduce((i,a)=>i+(jj.test(a)?Uj:a===""?Hj:Wj),n)}function Zj(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function Xj(e,t){let{routesMeta:r}=e,n={},i="/",a=[];for(let u=0;u<r.length;++u){let o=r[u],f=u===r.length-1,p=i==="/"?t:t.slice(i.length)||"/",v=Yj({path:o.relativePath,caseSensitive:o.caseSensitive,end:f},p);if(!v)return null;Object.assign(n,v.params);let y=o.route;a.push({params:n,pathname:Bu([i,v.pathname]),pathnameBase:nU(Bu([i,v.pathnameBase])),route:y}),v.pathnameBase!=="/"&&(i=Bu([i,v.pathnameBase]))}return a}function Yj(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Qj(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let a=i[0],u=a.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:n.reduce((p,v,y)=>{if(v==="*"){let w=o[y]||"";u=a.slice(0,a.length-w.length).replace(/(.)\/+$/,"$1")}return p[v]=eU(o[y]||"",v),p},{}),pathname:a,pathnameBase:u,pattern:e}}function Qj(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),N3(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 n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(u,o)=>(n.push(o),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function Jj(e){try{return decodeURI(e)}catch(t){return N3(!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 eU(e,t){try{return decodeURIComponent(e)}catch(r){return N3(!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 ("+r+").")),e}}function B7(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function N3(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function tU(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?ch(e):e;return{pathname:r?r.startsWith("/")?r:rU(r,t):t,search:iU(n),hash:oU(i)}}function rU(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function zb(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function V7(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function j7(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=ch(e):(i=Vm({},e),Ai(!i.pathname||!i.pathname.includes("?"),zb("?","pathname","search",i)),Ai(!i.pathname||!i.pathname.includes("#"),zb("#","pathname","hash",i)),Ai(!i.search||!i.search.includes("#"),zb("#","search","hash",i)));let a=e===""||i.pathname==="",u=a?"/":i.pathname,o;if(n||u==null)o=r;else{let y=t.length-1;if(u.startsWith("..")){let w=u.split("/");for(;w[0]==="..";)w.shift(),y-=1;i.pathname=w.join("/")}o=y>=0?t[y]:"/"}let f=tU(i,o),p=u&&u!=="/"&&u.endsWith("/"),v=(a||u===".")&&r.endsWith("/");return!f.pathname.endsWith("/")&&(p||v)&&(f.pathname+="/"),f}const Bu=e=>e.join("/").replace(/\/\/+/g,"/"),nU=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),iU=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,oU=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function aU(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const sU=["post","put","patch","delete"];[...sU];var j1={exports:{}},U1={};/**
* @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 lU=C.exports,uU=Symbol.for("react.element"),cU=Symbol.for("react.fragment"),dU=Object.prototype.hasOwnProperty,fU=lU.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,hU={key:!0,ref:!0,__self:!0,__source:!0};function U7(e,t,r){var n,i={},a=null,u=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(u=t.ref);for(n in t)dU.call(t,n)&&!hU.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:uU,type:e,key:a,ref:u,props:i,_owner:fU.current}}U1.Fragment=cU;U1.jsx=U7;U1.jsxs=U7;(function(e){e.exports=U1})(j1);const Ar=j1.exports.Fragment,S=j1.exports.jsx,Xe=j1.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 Uw(){return Uw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Uw.apply(this,arguments)}function pU(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const mU=typeof Object.is=="function"?Object.is:pU,{useState:vU,useEffect:gU,useLayoutEffect:yU,useDebugValue:xU}=g0;function _U(e,t,r){const n=t(),[{inst:i},a]=vU({inst:{value:n,getSnapshot:t}});return yU(()=>{i.value=n,i.getSnapshot=t,Db(i)&&a({inst:i})},[e,n,t]),gU(()=>(Db(i)&&a({inst:i}),e(()=>{Db(i)&&a({inst:i})})),[e]),xU(n),n}function Db(e){const t=e.getSnapshot,r=e.value;try{const n=t();return!mU(r,n)}catch{return!0}}function bU(e,t,r){return t()}const wU=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",CU=!wU,SU=CU?bU:_U;"useSyncExternalStore"in g0&&(e=>e.useSyncExternalStore)(g0);const K7=C.exports.createContext(null),z3=C.exports.createContext(null),K1=C.exports.createContext(null),H1=C.exports.createContext(null),dh=C.exports.createContext({outlet:null,matches:[]}),H7=C.exports.createContext(null);function EU(e,t){let{relative:r}=t===void 0?{}:t;fh()||Ai(!1);let{basename:n,navigator:i}=C.exports.useContext(K1),{hash:a,pathname:u,search:o}=W7(e,{relative:r}),f=u;return n!=="/"&&(f=u==="/"?n:Bu([n,u])),i.createHref({pathname:f,search:o,hash:a})}function fh(){return C.exports.useContext(H1)!=null}function fv(){return fh()||Ai(!1),C.exports.useContext(H1).location}function D3(){fh()||Ai(!1);let{basename:e,navigator:t}=C.exports.useContext(K1),{matches:r}=C.exports.useContext(dh),{pathname:n}=fv(),i=JSON.stringify(V7(r).map(o=>o.pathnameBase)),a=C.exports.useRef(!1);return C.exports.useEffect(()=>{a.current=!0}),C.exports.useCallback(function(o,f){if(f===void 0&&(f={}),!a.current)return;if(typeof o=="number"){t.go(o);return}let p=j7(o,JSON.parse(i),n,f.relative==="path");e!=="/"&&(p.pathname=p.pathname==="/"?e:Bu([e,p.pathname])),(f.replace?t.replace:t.push)(p,f.state,f)},[e,t,i,n])}function W7(e,t){let{relative:r}=t===void 0?{}:t,{matches:n}=C.exports.useContext(dh),{pathname:i}=fv(),a=JSON.stringify(V7(n).map(u=>u.pathnameBase));return C.exports.useMemo(()=>j7(e,JSON.parse(a),i,r==="path"),[e,a,i,r])}function kU(e,t){fh()||Ai(!1);let{navigator:r}=C.exports.useContext(K1),n=C.exports.useContext(z3),{matches:i}=C.exports.useContext(dh),a=i[i.length-1],u=a?a.params:{};a&&a.pathname;let o=a?a.pathnameBase:"/";a&&a.route;let f=fv(),p;if(t){var v;let R=typeof t=="string"?ch(t):t;o==="/"||((v=R.pathname)==null?void 0:v.startsWith(o))||Ai(!1),p=R}else p=f;let y=p.pathname||"/",w=o==="/"?y:y.slice(o.length)||"/",k=Bj(e,{pathname:w}),T=IU(k&&k.map(R=>Object.assign({},R,{params:Object.assign({},u,R.params),pathname:Bu([o,r.encodeLocation?r.encodeLocation(R.pathname).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?o:Bu([o,r.encodeLocation?r.encodeLocation(R.pathnameBase).pathname:R.pathnameBase])})),i,n||void 0);return t&&T?S(H1.Provider,{value:{location:Uw({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:ku.Pop},children:T}):T}function TU(){let e=NU(),t=aU(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null;return Xe(Ar,{children:[S("h2",{children:"Unexpected Application Error!"}),S("h3",{style:{fontStyle:"italic"},children:t}),r?S("pre",{style:{padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},children:r}):null,null]})}class PU 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,r){return r.location!==t.location?{error:t.error,location:t.location}:{error:t.error||r.error,location:r.location}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?S(dh.Provider,{value:this.props.routeContext,children:S(H7.Provider,{value:this.state.error,children:this.props.component})}):this.props.children}}function MU(e){let{routeContext:t,match:r,children:n}=e,i=C.exports.useContext(K7);return i&&i.static&&i.staticContext&&r.route.errorElement&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),S(dh.Provider,{value:t,children:n})}function IU(e,t,r){if(t===void 0&&(t=[]),e==null)if(r!=null&&r.errors)e=r.matches;else return null;let n=e,i=r==null?void 0:r.errors;if(i!=null){let a=n.findIndex(u=>u.route.id&&(i==null?void 0:i[u.route.id]));a>=0||Ai(!1),n=n.slice(0,Math.min(n.length,a+1))}return n.reduceRight((a,u,o)=>{let f=u.route.id?i==null?void 0:i[u.route.id]:null,p=r?u.route.errorElement||S(TU,{}):null,v=t.concat(n.slice(0,o+1)),y=()=>S(MU,{match:u,routeContext:{outlet:a,matches:v},children:f?p:u.route.element!==void 0?u.route.element:a});return r&&(u.route.errorElement||o===0)?S(PU,{location:r.location,component:p,error:f,children:y(),routeContext:{outlet:null,matches:v}}):y()},null)}var Lk;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator"})(Lk||(Lk={}));var U0;(function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(U0||(U0={}));function RU(e){let t=C.exports.useContext(z3);return t||Ai(!1),t}function OU(e){let t=C.exports.useContext(dh);return t||Ai(!1),t}function AU(e){let t=OU(),r=t.matches[t.matches.length-1];return r.route.id||Ai(!1),r.route.id}function NU(){var e;let t=C.exports.useContext(H7),r=RU(U0.UseRouteError),n=AU(U0.UseRouteError);return t||((e=r.errors)==null?void 0:e[n])}function W1(e){let{to:t,replace:r,state:n,relative:i}=e;fh()||Ai(!1);let a=C.exports.useContext(z3),u=D3();return C.exports.useEffect(()=>{a&&a.navigation.state!=="idle"||u(t,{replace:r,state:n,relative:i})}),null}function Xp(e){Ai(!1)}function zU(e){let{basename:t="/",children:r=null,location:n,navigationType:i=ku.Pop,navigator:a,static:u=!1}=e;fh()&&Ai(!1);let o=t.replace(/^\/*/,"/"),f=C.exports.useMemo(()=>({basename:o,navigator:a,static:u}),[o,a,u]);typeof n=="string"&&(n=ch(n));let{pathname:p="/",search:v="",hash:y="",state:w=null,key:k="default"}=n,T=C.exports.useMemo(()=>{let R=B7(p,o);return R==null?null:{pathname:R,search:v,hash:y,state:w,key:k}},[o,p,v,y,w,k]);return T==null?null:S(K1.Provider,{value:f,children:S(H1.Provider,{children:r,value:{location:T,navigationType:i}})})}function DU(e){let{children:t,location:r}=e,n=C.exports.useContext(K7),i=n&&!t?n.router.routes:Kw(t);return kU(i,r)}var Fk;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(Fk||(Fk={}));new Promise(()=>{});function Kw(e,t){t===void 0&&(t=[]);let r=[];return C.exports.Children.forEach(e,(n,i)=>{if(!C.exports.isValidElement(n))return;if(n.type===C.exports.Fragment){r.push.apply(r,Kw(n.props.children,t));return}n.type!==Xp&&Ai(!1),!n.props.index||!n.props.children||Ai(!1);let a=[...t,i],u={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,hasErrorBoundary:n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle};n.props.children&&(u.children=Kw(n.props.children,a)),r.push(u)}),r}/**
* 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 LU(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function FU(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function $U(e,t){return e.button===0&&(!t||t==="_self")&&!FU(e)}function Hw(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(i=>[r,i]):[[r,n]])},[]))}function BU(e,t){let r=Hw(e);if(t)for(let n of t.keys())r.has(n)||t.getAll(n).forEach(i=>{r.append(n,i)});return r}const VU=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function jU(e){let{basename:t,children:r,window:n}=e,i=C.exports.useRef();i.current==null&&(i.current=Lj({window:n,v5Compat:!0}));let a=i.current,[u,o]=C.exports.useState({action:a.action,location:a.location});return C.exports.useLayoutEffect(()=>a.listen(o),[a]),S(zU,{basename:t,children:r,location:u.location,navigationType:u.action,navigator:a})}const UU=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ww=C.exports.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:a,replace:u,state:o,target:f,to:p,preventScrollReset:v}=t,y=LU(t,VU),w,k=!1;if(UU&&typeof p=="string"&&/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i.test(p)){w=p;let I=new URL(window.location.href),O=p.startsWith("//")?new URL(I.protocol+p):new URL(p);O.origin===I.origin?p=O.pathname+O.search+O.hash:k=!0}let T=EU(p,{relative:i}),R=KU(p,{replace:u,state:o,target:f,preventScrollReset:v,relative:i});function A(I){n&&n(I),I.defaultPrevented||R(I)}return S("a",{...y,href:w||T,onClick:k||a?n:A,ref:r,target:f})});var $k;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})($k||($k={}));var Bk;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Bk||(Bk={}));function KU(e,t){let{target:r,replace:n,state:i,preventScrollReset:a,relative:u}=t===void 0?{}:t,o=D3(),f=fv(),p=W7(e,{relative:u});return C.exports.useCallback(v=>{if($U(v,r)){v.preventDefault();let y=n!==void 0?n:j0(f)===j0(p);o(e,{replace:y,state:i,preventScrollReset:a,relative:u})}},[f,o,p,n,i,r,e,a,u])}function HU(e){let t=C.exports.useRef(Hw(e)),r=C.exports.useRef(!1),n=fv(),i=C.exports.useMemo(()=>BU(n.search,r.current?null:t.current),[n.search]),a=D3(),u=C.exports.useCallback((o,f)=>{const p=Hw(typeof o=="function"?o(i):o);r.current=!0,a("?"+p,f)},[a,i]);return[i,u]}let Lb=0,Vk=[];function WU(){return Lb+=1,()=>{if(Lb-=1,Lb===0){let e=Vk;Vk=[];for(let t of e)t()}}}let fy=Symbol(),qU=(e,t,r,n)=>{let i={...e};i.set=(...u)=>{e[fy]=t,e.set(...u),delete e[fy]},e.setKey&&(i.setKey=(...u)=>{e[fy]=t,e.setKey(...u),delete e[fy]});let a=r(i,...n);if(a instanceof Promise){let u=WU();return a.finally(u)}return a},GU=(e,t,r)=>(...n)=>qU(e,t,r,n),Io=[],hh=(e,t)=>{let r,n=[],i={lc:0,l:t||0,value:e,set(a){i.value=a,i.notify()},get(){return i.lc||i.listen(()=>{})(),i.value},notify(a){r=n;let u=!Io.length;for(let o=0;o<r.length;o+=2)Io.push(r[o],i.value,a,r[o+1]);if(u){for(let o=0;o<Io.length;o+=4){let f=!1;for(let p=o+7;p<Io.length;p+=4)if(Io[p]<Io[o+3]){f=!0;break}f?Io.push(Io[o],Io[o+1],Io[o+2],Io[o+3]):Io[o](Io[o+1],Io[o+2])}Io.length=0}},listen(a,u){return n===r&&(n=n.slice()),i.lc=n.push(a,u||i.l)/2,()=>{n===r&&(n=n.slice());let o=n.indexOf(a);~o&&(n.splice(o,2),i.lc--)}},subscribe(a,u){let o=i.listen(a,u);return a(i.value),o},off(){}};return i};function ZU(e,t,r){let n=new Set([...t,void 0]);return e.listen((i,a)=>{n.has(a)&&r(i,a)})}var q1={exports:{}},q7={};/**
* @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 Kf=C.exports;function XU(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var YU=typeof Object.is=="function"?Object.is:XU,QU=Kf.useState,JU=Kf.useEffect,eK=Kf.useLayoutEffect,tK=Kf.useDebugValue;function rK(e,t){var r=t(),n=QU({inst:{value:r,getSnapshot:t}}),i=n[0].inst,a=n[1];return eK(function(){i.value=r,i.getSnapshot=t,Fb(i)&&a({inst:i})},[e,r,t]),JU(function(){return Fb(i)&&a({inst:i}),e(function(){Fb(i)&&a({inst:i})})},[e]),tK(r),r}function Fb(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!YU(e,r)}catch{return!0}}function nK(e,t){return t()}var iK=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?nK:rK;q7.useSyncExternalStore=Kf.useSyncExternalStore!==void 0?Kf.useSyncExternalStore:iK;(function(e){e.exports=q7})(q1);function Wu(e,t={}){let r=C.exports.useCallback(i=>t.keys?ZU(e,t.keys,i):e.listen(i),[t.keys,e]),n=e.get.bind(e);return q1.exports.useSyncExternalStore(r,n,n)}function tt(){return tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tt.apply(this,arguments)}function ar(e){return ar=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},ar(e)}function oK(e,t){if(ar(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ar(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function G7(e){var t=oK(e,"string");return ar(t)==="symbol"?t:String(t)}function se(e,t,r){return t=G7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jk(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,G7(n.key),n)}}function Jn(e,t,r){return t&&jk(e.prototype,t),r&&jk(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function qw(e,t){return qw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},qw(e,t)}function vi(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&&qw(e,t)}function K0(e){return K0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},K0(e)}function aK(){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 Nr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sK(e,t){if(t&&(ar(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Nr(e)}function gi(e){var t=aK();return function(){var n=K0(e),i;if(t){var a=K0(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return sK(this,i)}}var Z7={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 r(){for(var n=[],i=0;i<arguments.length;i++){var a=arguments[i];if(!!a){var u=typeof a;if(u==="string"||u==="number")n.push(a);else if(Array.isArray(a)){if(a.length){var o=r.apply(null,a);o&&n.push(o)}}else if(u==="object"){if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]")){n.push(a.toString());continue}for(var f in a)t.call(a,f)&&a[f]&&n.push(f)}}}return n.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Z7);const Qe=Z7.exports;var L3={exports:{}},Pn={};/** @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 Qi=typeof Symbol=="function"&&Symbol.for,F3=Qi?Symbol.for("react.element"):60103,$3=Qi?Symbol.for("react.portal"):60106,G1=Qi?Symbol.for("react.fragment"):60107,Z1=Qi?Symbol.for("react.strict_mode"):60108,X1=Qi?Symbol.for("react.profiler"):60114,Y1=Qi?Symbol.for("react.provider"):60109,Q1=Qi?Symbol.for("react.context"):60110,B3=Qi?Symbol.for("react.async_mode"):60111,J1=Qi?Symbol.for("react.concurrent_mode"):60111,ex=Qi?Symbol.for("react.forward_ref"):60112,tx=Qi?Symbol.for("react.suspense"):60113,lK=Qi?Symbol.for("react.suspense_list"):60120,rx=Qi?Symbol.for("react.memo"):60115,nx=Qi?Symbol.for("react.lazy"):60116,uK=Qi?Symbol.for("react.block"):60121,cK=Qi?Symbol.for("react.fundamental"):60117,dK=Qi?Symbol.for("react.responder"):60118,fK=Qi?Symbol.for("react.scope"):60119;function Ca(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case F3:switch(e=e.type,e){case B3:case J1:case G1:case X1:case Z1:case tx:return e;default:switch(e=e&&e.$$typeof,e){case Q1:case ex:case nx:case rx:case Y1:return e;default:return t}}case $3:return t}}}function X7(e){return Ca(e)===J1}Pn.AsyncMode=B3;Pn.ConcurrentMode=J1;Pn.ContextConsumer=Q1;Pn.ContextProvider=Y1;Pn.Element=F3;Pn.ForwardRef=ex;Pn.Fragment=G1;Pn.Lazy=nx;Pn.Memo=rx;Pn.Portal=$3;Pn.Profiler=X1;Pn.StrictMode=Z1;Pn.Suspense=tx;Pn.isAsyncMode=function(e){return X7(e)||Ca(e)===B3};Pn.isConcurrentMode=X7;Pn.isContextConsumer=function(e){return Ca(e)===Q1};Pn.isContextProvider=function(e){return Ca(e)===Y1};Pn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===F3};Pn.isForwardRef=function(e){return Ca(e)===ex};Pn.isFragment=function(e){return Ca(e)===G1};Pn.isLazy=function(e){return Ca(e)===nx};Pn.isMemo=function(e){return Ca(e)===rx};Pn.isPortal=function(e){return Ca(e)===$3};Pn.isProfiler=function(e){return Ca(e)===X1};Pn.isStrictMode=function(e){return Ca(e)===Z1};Pn.isSuspense=function(e){return Ca(e)===tx};Pn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===G1||e===J1||e===X1||e===Z1||e===tx||e===lK||typeof e=="object"&&e!==null&&(e.$$typeof===nx||e.$$typeof===rx||e.$$typeof===Y1||e.$$typeof===Q1||e.$$typeof===ex||e.$$typeof===cK||e.$$typeof===dK||e.$$typeof===fK||e.$$typeof===uK)};Pn.typeOf=Ca;(function(e){e.exports=Pn})(L3);function lo(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[];return tn.Children.forEach(e,function(n){n==null&&!t.keepEmpty||(Array.isArray(n)?r=r.concat(lo(n)):L3.exports.isFragment(n)&&n.props?r=r.concat(lo(n.props.children,t)):r.push(n))}),r}var Uk={};function hK(e,t){}function pK(e,t,r){!t&&!Uk[r]&&(e(!1,r),Uk[r]=!0)}function Bn(e,t){pK(hK,e,t)}function Kk(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ve(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kk(Object(r),!0).forEach(function(n){se(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kk(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hv(e,t,r){var n=C.exports.useRef({});return(!("value"in n.current)||r(n.current.condition,t))&&(n.current.value=e(),n.current.condition=t),n.current.value}function H0(e,t){typeof e=="function"?e(t):ar(e)==="object"&&e&&"current"in e&&(e.current=t)}function ta(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.filter(function(i){return i});return n.length<=1?n[0]:function(i){t.forEach(function(a){H0(a,i)})}}function Y7(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return hv(function(){return ta.apply(void 0,t)},t,function(n,i){return n.length===i.length&&n.every(function(a,u){return a===i[u]})})}function md(e){var t,r,n=L3.exports.isMemo(e)?e.type.type:e.type;return!(typeof n=="function"&&!((t=n.prototype)!==null&&t!==void 0&&t.render)||typeof e=="function"&&!((r=e.prototype)!==null&&r!==void 0&&r.render))}function jm(e){return e instanceof HTMLElement?e:e instanceof tn.Component?ad.findDOMNode(e):null}var Q7=function(){if(typeof Map<"u")return Map;function e(t,r){var n=-1;return t.some(function(i,a){return i[0]===r?(n=a,!0):!1}),n}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(r){var n=e(this.__entries__,r),i=this.__entries__[n];return i&&i[1]},t.prototype.set=function(r,n){var i=e(this.__entries__,r);~i?this.__entries__[i][1]=n:this.__entries__.push([r,n])},t.prototype.delete=function(r){var n=this.__entries__,i=e(n,r);~i&&n.splice(i,1)},t.prototype.has=function(r){return!!~e(this.__entries__,r)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var i=0,a=this.__entries__;i<a.length;i++){var u=a[i];r.call(n,u[1],u[0])}},t}()}(),Gw=typeof window<"u"&&typeof document<"u"&&window.document===document,W0=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")()}(),mK=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(W0):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),vK=2;function gK(e,t){var r=!1,n=!1,i=0;function a(){r&&(r=!1,e()),n&&o()}function u(){mK(a)}function o(){var f=Date.now();if(r){if(f-i<vK)return;n=!0}else r=!0,n=!1,setTimeout(u,t);i=f}return o}var yK=20,xK=["top","right","bottom","left","width","height","size","weight"],_K=typeof MutationObserver<"u",bK=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=gK(this.refresh.bind(this),yK)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var r=this.observers_,n=r.indexOf(t);~n&&r.splice(n,1),!r.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(r){return r.gatherActive(),r.hasActive()});return t.forEach(function(r){return r.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!Gw||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),_K?(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(){!Gw||!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 r=t.propertyName,n=r===void 0?"":r,i=xK.some(function(a){return!!~n.indexOf(a)});i&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),J7=function(e,t){for(var r=0,n=Object.keys(t);r<n.length;r++){var i=n[r];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},Hf=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||W0},eO=ix(0,0,0,0);function q0(e){return parseFloat(e)||0}function Hk(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.reduce(function(n,i){var a=e["border-"+i+"-width"];return n+q0(a)},0)}function wK(e){for(var t=["top","right","bottom","left"],r={},n=0,i=t;n<i.length;n++){var a=i[n],u=e["padding-"+a];r[a]=q0(u)}return r}function CK(e){var t=e.getBBox();return ix(0,0,t.width,t.height)}function SK(e){var t=e.clientWidth,r=e.clientHeight;if(!t&&!r)return eO;var n=Hf(e).getComputedStyle(e),i=wK(n),a=i.left+i.right,u=i.top+i.bottom,o=q0(n.width),f=q0(n.height);if(n.boxSizing==="border-box"&&(Math.round(o+a)!==t&&(o-=Hk(n,"left","right")+a),Math.round(f+u)!==r&&(f-=Hk(n,"top","bottom")+u)),!kK(e)){var p=Math.round(o+a)-t,v=Math.round(f+u)-r;Math.abs(p)!==1&&(o-=p),Math.abs(v)!==1&&(f-=v)}return ix(i.left,i.top,o,f)}var EK=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof Hf(e).SVGGraphicsElement}:function(e){return e instanceof Hf(e).SVGElement&&typeof e.getBBox=="function"}}();function kK(e){return e===Hf(e).document.documentElement}function TK(e){return Gw?EK(e)?CK(e):SK(e):eO}function PK(e){var t=e.x,r=e.y,n=e.width,i=e.height,a=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,u=Object.create(a.prototype);return J7(u,{x:t,y:r,width:n,height:i,top:r,right:t+n,bottom:i+r,left:t}),u}function ix(e,t,r,n){return{x:e,y:t,width:r,height:n}}var MK=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ix(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=TK(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}(),IK=function(){function e(t,r){var n=PK(r);J7(this,{target:t,contentRect:n})}return e}(),RK=function(){function e(t,r,n){if(this.activeObservations_=[],this.observations_=new Q7,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=r,this.callbackCtx_=n}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 Hf(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)||(r.set(t,new MK(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 Hf(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;!r.has(t)||(r.delete(t),r.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(r){r.isActive()&&t.activeObservations_.push(r)})},e.prototype.broadcastActive=function(){if(!!this.hasActive()){var t=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new IK(n.target,n.broadcastRect())});this.callback_.call(t,r,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),tO=typeof WeakMap<"u"?new WeakMap:new Q7,rO=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 r=bK.getInstance(),n=new RK(t,r,this);tO.set(this,n)}return e}();["observe","unobserve","disconnect"].forEach(function(e){rO.prototype[e]=function(){var t;return(t=tO.get(this))[e].apply(t,arguments)}});var nO=function(){return typeof W0.ResizeObserver<"u"?W0.ResizeObserver:rO}(),Tu=new Map;function OK(e){e.forEach(function(t){var r,n=t.target;(r=Tu.get(n))===null||r===void 0||r.forEach(function(i){return i(n)})})}var iO=new nO(OK);function AK(e,t){Tu.has(e)||(Tu.set(e,new Set),iO.observe(e)),Tu.get(e).add(t)}function NK(e,t){Tu.has(e)&&(Tu.get(e).delete(t),Tu.get(e).size||(iO.unobserve(e),Tu.delete(e)))}var zK=function(e){vi(r,e);var t=gi(r);function r(){return Qn(this,r),t.apply(this,arguments)}return Jn(r,[{key:"render",value:function(){return this.props.children}}]),r}(C.exports.Component),Zw=C.exports.createContext(null);function DK(e){var t=e.children,r=e.onBatchResize,n=C.exports.useRef(0),i=C.exports.useRef([]),a=C.exports.useContext(Zw),u=C.exports.useCallback(function(o,f,p){n.current+=1;var v=n.current;i.current.push({size:o,element:f,data:p}),Promise.resolve().then(function(){v===n.current&&(r==null||r(i.current),i.current=[])}),a==null||a(o,f,p)},[r,a]);return S(Zw.Provider,{value:u,children:t})}function LK(e,t){var r=e.children,n=e.disabled,i=C.exports.useRef(null),a=C.exports.useRef(null),u=C.exports.useContext(Zw),o=typeof r=="function",f=o?r(i):r,p=C.exports.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),v=!o&&C.exports.isValidElement(f)&&md(f),y=v?f.ref:null,w=C.exports.useMemo(function(){return ta(y,i)},[y,i]),k=function(){return jm(i.current)||jm(a.current)};C.exports.useImperativeHandle(t,function(){return k()});var T=C.exports.useRef(e);T.current=e;var R=C.exports.useCallback(function(A){var I=T.current,O=I.onResize,N=I.data,L=A.getBoundingClientRect(),B=L.width,j=L.height,G=A.offsetWidth,H=A.offsetHeight,te=Math.floor(B),Y=Math.floor(j);if(p.current.width!==te||p.current.height!==Y||p.current.offsetWidth!==G||p.current.offsetHeight!==H){var le={width:te,height:Y,offsetWidth:G,offsetHeight:H};p.current=le;var J=G===Math.round(B)?B:G,Z=H===Math.round(j)?j:H,Q=ve(ve({},le),{},{offsetWidth:J,offsetHeight:Z});u==null||u(Q,A,N),O&&Promise.resolve().then(function(){O(Q,A)})}},[]);return C.exports.useEffect(function(){var A=k();return A&&!n&&AK(A,R),function(){return NK(A,R)}},[i.current,n]),S(zK,{ref:a,children:v?C.exports.cloneElement(f,{ref:w}):f})}var FK=C.exports.forwardRef(LK),$K="rc-observer-key";function BK(e,t){var r=e.children,n=typeof r=="function"?[r]:lo(r);return n.map(function(i,a){var u=(i==null?void 0:i.key)||"".concat($K,"-").concat(a);return C.exports.createElement(FK,{...e,key:u,ref:a===0?t:void 0},i)})}var Kl=C.exports.forwardRef(BK);Kl.Collection=DK;function Si(e,t){var r=ve({},e);return Array.isArray(t)&&t.forEach(function(n){delete r[n]}),r}var VK=C.exports.createContext({});const V3=VK;function jK(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Mr(e,t){if(e==null)return{};var r=jK(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(r[n]=e[n]))}return r}function Xw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function UK(e){if(Array.isArray(e))return Xw(e)}function oO(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function j3(e,t){if(!!e){if(typeof e=="string")return Xw(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Xw(e,t)}}function KK(){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 UK(e)||oO(e)||j3(e)||KK()}var Wc="RC_FORM_INTERNAL_HOOKS",Rn=function(){Bn(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},sd=C.exports.createContext({getFieldValue:Rn,getFieldsValue:Rn,getFieldError:Rn,getFieldWarning:Rn,getFieldsError:Rn,isFieldsTouched:Rn,isFieldTouched:Rn,isFieldValidating:Rn,isFieldsValidating:Rn,resetFields:Rn,setFields:Rn,setFieldValue:Rn,setFieldsValue:Rn,validateFields:Rn,submit:Rn,getInternalHooks:function(){return Rn(),{dispatch:Rn,initEntityValue:Rn,registerField:Rn,useSubscribe:Rn,setInitialValues:Rn,destroyForm:Rn,setCallbacks:Rn,registerWatch:Rn,getFields:Rn,setValidateMessages:Rn,setPreserve:Rn,getInitialValue:Rn}}});function Yw(e){return e==null?[]:Array.isArray(e)?e:[e]}function Do(){Do=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(J,Z,Q){J[Z]=Q.value},i=typeof Symbol=="function"?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",o=i.toStringTag||"@@toStringTag";function f(J,Z,Q){return Object.defineProperty(J,Z,{value:Q,enumerable:!0,configurable:!0,writable:!0}),J[Z]}try{f({},"")}catch{f=function(Q,ge,ne){return Q[ge]=ne}}function p(J,Z,Q,ge){var ne=Z&&Z.prototype instanceof w?Z:w,de=Object.create(ne.prototype),oe=new te(ge||[]);return n(de,"_invoke",{value:B(J,Q,oe)}),de}function v(J,Z,Q){try{return{type:"normal",arg:J.call(Z,Q)}}catch(ge){return{type:"throw",arg:ge}}}e.wrap=p;var y={};function w(){}function k(){}function T(){}var R={};f(R,a,function(){return this});var A=Object.getPrototypeOf,I=A&&A(A(Y([])));I&&I!==t&&r.call(I,a)&&(R=I);var O=T.prototype=w.prototype=Object.create(R);function N(J){["next","throw","return"].forEach(function(Z){f(J,Z,function(Q){return this._invoke(Z,Q)})})}function L(J,Z){function Q(ne,de,oe,ye){var Re=v(J[ne],J,de);if(Re.type!=="throw"){var Te=Re.arg,ke=Te.value;return ke&&ar(ke)=="object"&&r.call(ke,"__await")?Z.resolve(ke.__await).then(function(ze){Q("next",ze,oe,ye)},function(ze){Q("throw",ze,oe,ye)}):Z.resolve(ke).then(function(ze){Te.value=ze,oe(Te)},function(ze){return Q("throw",ze,oe,ye)})}ye(Re.arg)}var ge;n(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(ne,de){if(ge==="executing")throw new Error("Generator is already running");if(ge==="completed"){if(ne==="throw")throw de;return le()}for(Q.method=ne,Q.arg=de;;){var oe=Q.delegate;if(oe){var ye=j(oe,Q);if(ye){if(ye===y)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=v(J,Z,Q);if(Re.type==="normal"){if(ge=Q.done?"completed":"suspendedYield",Re.arg===y)continue;return{value:Re.arg,done:Q.done}}Re.type==="throw"&&(ge="completed",Q.method="throw",Q.arg=Re.arg)}}}function j(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,j(J,Z),Z.method==="throw")||Q!=="return"&&(Z.method="throw",Z.arg=new TypeError("The iterator does not provide a '"+Q+"' method")),y;var ne=v(ge,J.iterator,Z.arg);if(ne.type==="throw")return Z.method="throw",Z.arg=ne.arg,Z.delegate=null,y;var de=ne.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,y):de:(Z.method="throw",Z.arg=new TypeError("iterator result is not an object"),Z.delegate=null,y)}function G(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(G,this),this.reset(!0)}function Y(J){if(J){var Z=J[a];if(Z)return Z.call(J);if(typeof J.next=="function")return J;if(!isNaN(J.length)){var Q=-1,ge=function ne(){for(;++Q<J.length;)if(r.call(J,Q))return ne.value=J[Q],ne.done=!1,ne;return ne.value=void 0,ne.done=!0,ne};return ge.next=ge}}return{next:le}}function le(){return{value:void 0,done:!0}}return k.prototype=T,n(O,"constructor",{value:T,configurable:!0}),n(T,"constructor",{value:k,configurable:!0}),k.displayName=f(T,o,"GeneratorFunction"),e.isGeneratorFunction=function(J){var Z=typeof J=="function"&&J.constructor;return!!Z&&(Z===k||(Z.displayName||Z.name)==="GeneratorFunction")},e.mark=function(J){return Object.setPrototypeOf?Object.setPrototypeOf(J,T):(J.__proto__=T,f(J,o,"GeneratorFunction")),J.prototype=Object.create(O),J},e.awrap=function(J){return{__await:J}},N(L.prototype),f(L.prototype,u,function(){return this}),e.AsyncIterator=L,e.async=function(J,Z,Q,ge,ne){ne===void 0&&(ne=Promise);var de=new L(p(J,Z,Q,ge),ne);return e.isGeneratorFunction(Z)?de:de.next().then(function(oe){return oe.done?oe.value:de.next()})},N(O),f(O,o,"Generator"),f(O,a,function(){return this}),f(O,"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 ne(){for(;Q.length;){var de=Q.pop();if(de in Z)return ne.value=de,ne.done=!1,ne}return ne.done=!0,ne}},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"&&r.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 ne=this.tryEntries.length-1;ne>=0;--ne){var de=this.tryEntries[ne],oe=de.completion;if(de.tryLoc==="root")return ge("end");if(de.tryLoc<=this.prev){var ye=r.call(de,"catchLoc"),Re=r.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 ne=this.tryEntries[ge];if(ne.tryLoc<=this.prev&&r.call(ne,"finallyLoc")&&this.prev<ne.finallyLoc){var de=ne;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,y):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),y},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),y}},catch:function(Z){for(var Q=this.tryEntries.length-1;Q>=0;--Q){var ge=this.tryEntries[Q];if(ge.tryLoc===Z){var ne=ge.completion;if(ne.type==="throw"){var de=ne.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),y}},e}function Wk(e,t,r,n,i,a,u){try{var o=e[a](u),f=o.value}catch(p){r(p);return}o.done?t(f):Promise.resolve(f).then(n,i)}function vd(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function u(f){Wk(a,n,i,u,o,"next",f)}function o(f){Wk(a,n,i,u,o,"throw",f)}u(void 0)})}}function qc(){return qc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qc.apply(this,arguments)}function HK(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Um(e,t)}function Qw(e){return Qw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Qw(e)}function Um(e,t){return Um=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Um(e,t)}function WK(){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 t0(e,t,r){return WK()?t0=Reflect.construct.bind():t0=function(i,a,u){var o=[null];o.push.apply(o,a);var f=Function.bind.apply(i,o),p=new f;return u&&Um(p,u.prototype),p},t0.apply(null,arguments)}function qK(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Jw(e){var t=typeof Map=="function"?new Map:void 0;return Jw=function(n){if(n===null||!qK(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(n))return t.get(n);t.set(n,i)}function i(){return t0(n,arguments,Qw(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Um(i,n)},Jw(e)}var GK=/%[sdj%]/g,ZK=function(){};typeof process<"u"&&process.env;function e4(e){if(!e||!e.length)return null;var t={};return e.forEach(function(r){var n=r.field;t[n]=t[n]||[],t[n].push(r)}),t}function pa(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var i=0,a=r.length;if(typeof e=="function")return e.apply(null,r);if(typeof e=="string"){var u=e.replace(GK,function(o){if(o==="%%")return"%";if(i>=a)return o;switch(o){case"%s":return String(r[i++]);case"%d":return Number(r[i++]);case"%j":try{return JSON.stringify(r[i++])}catch{return"[Circular]"}break;default:return o}});return u}return e}function XK(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function Vi(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||XK(t)&&typeof e=="string"&&!e)}function YK(e,t,r){var n=[],i=0,a=e.length;function u(o){n.push.apply(n,o||[]),i++,i===a&&r(n)}e.forEach(function(o){t(o,u)})}function qk(e,t,r){var n=0,i=e.length;function a(u){if(u&&u.length){r(u);return}var o=n;n=n+1,o<i?t(e[o],a):r([])}a([])}function QK(e){var t=[];return Object.keys(e).forEach(function(r){t.push.apply(t,e[r]||[])}),t}var Gk=function(e){HK(t,e);function t(r,n){var i;return i=e.call(this,"Async Validation Error")||this,i.errors=r,i.fields=n,i}return t}(Jw(Error));function JK(e,t,r,n,i){if(t.first){var a=new Promise(function(w,k){var T=function(I){return n(I),I.length?k(new Gk(I,e4(I))):w(i)},R=QK(e);qk(R,r,T)});return a.catch(function(w){return w}),a}var u=t.firstFields===!0?Object.keys(e):t.firstFields||[],o=Object.keys(e),f=o.length,p=0,v=[],y=new Promise(function(w,k){var T=function(A){if(v.push.apply(v,A),p++,p===f)return n(v),v.length?k(new Gk(v,e4(v))):w(i)};o.length||(n(v),w(i)),o.forEach(function(R){var A=e[R];u.indexOf(R)!==-1?qk(A,r,T):YK(A,r,T)})});return y.catch(function(w){return w}),y}function eH(e){return!!(e&&e.message!==void 0)}function tH(e,t){for(var r=e,n=0;n<t.length;n++){if(r==null)return r;r=r[t[n]]}return r}function Zk(e,t){return function(r){var n;return e.fullFields?n=tH(t,e.fullFields):n=t[r.field||e.fullField],eH(r)?(r.field=r.field||e.fullField,r.fieldValue=n,r):{message:typeof r=="function"?r():r,fieldValue:n,field:r.field||e.fullField}}}function Xk(e,t){if(t){for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];typeof n=="object"&&typeof e[r]=="object"?e[r]=qc({},e[r],n):e[r]=n}}return e}var aO=function(t,r,n,i,a,u){t.required&&(!n.hasOwnProperty(t.field)||Vi(r,u||t.type))&&i.push(pa(a.messages.required,t.fullField))},rH=function(t,r,n,i,a){(/^\s+$/.test(r)||r==="")&&i.push(pa(a.messages.whitespace,t.fullField))},hy,nH=function(){if(hy)return hy;var e="[a-fA-F\\d:]",t=function(L){return L&&L.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},r="(?: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}",n="[a-fA-F\\d]{1,4}",i=(`
(?:
(?:`+n+":){7}(?:"+n+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
(?:`+n+":){6}(?:"+r+"|:"+n+`|:)| // 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
(?:`+n+":){5}(?::"+r+"|(?::"+n+`){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
(?:`+n+":){4}(?:(?::"+n+"){0,1}:"+r+"|(?::"+n+`){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
(?:`+n+":){3}(?:(?::"+n+"){0,2}:"+r+"|(?::"+n+`){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
(?:`+n+":){2}(?:(?::"+n+"){0,3}:"+r+"|(?::"+n+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
(?:`+n+":){1}(?:(?::"+n+"){0,4}:"+r+"|(?::"+n+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
(?::(?:(?::`+n+"){0,5}:"+r+"|(?::"+n+`){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(),a=new RegExp("(?:^"+r+"$)|(?:^"+i+"$)"),u=new RegExp("^"+r+"$"),o=new RegExp("^"+i+"$"),f=function(L){return L&&L.exact?a:new RegExp("(?:"+t(L)+r+t(L)+")|(?:"+t(L)+i+t(L)+")","g")};f.v4=function(N){return N&&N.exact?u:new RegExp(""+t(N)+r+t(N),"g")},f.v6=function(N){return N&&N.exact?o:new RegExp(""+t(N)+i+t(N),"g")};var p="(?:(?:[a-z]+:)?//)",v="(?:\\S+(?::\\S*)?@)?",y=f.v4().source,w=f.v6().source,k="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",T="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",R="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",A="(?::\\d{2,5})?",I='(?:[/?#][^\\s"]*)?',O="(?:"+p+"|www\\.)"+v+"(?:localhost|"+y+"|"+w+"|"+k+T+R+")"+A+I;return hy=new RegExp("(?:^"+O+"$)","i"),hy},Yk={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},Yp={integer:function(t){return Yp.number(t)&&parseInt(t,10)===t},float:function(t){return Yp.number(t)&&!Yp.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"&&!Yp.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(Yk.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(nH())},hex:function(t){return typeof t=="string"&&!!t.match(Yk.hex)}},iH=function(t,r,n,i,a){if(t.required&&r===void 0){aO(t,r,n,i,a);return}var u=["integer","float","array","regexp","object","method","email","number","date","url","hex"],o=t.type;u.indexOf(o)>-1?Yp[o](r)||i.push(pa(a.messages.types[o],t.fullField,t.type)):o&&typeof r!==t.type&&i.push(pa(a.messages.types[o],t.fullField,t.type))},oH=function(t,r,n,i,a){var u=typeof t.len=="number",o=typeof t.min=="number",f=typeof t.max=="number",p=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,v=r,y=null,w=typeof r=="number",k=typeof r=="string",T=Array.isArray(r);if(w?y="number":k?y="string":T&&(y="array"),!y)return!1;T&&(v=r.length),k&&(v=r.replace(p,"_").length),u?v!==t.len&&i.push(pa(a.messages[y].len,t.fullField,t.len)):o&&!f&&v<t.min?i.push(pa(a.messages[y].min,t.fullField,t.min)):f&&!o&&v>t.max?i.push(pa(a.messages[y].max,t.fullField,t.max)):o&&f&&(v<t.min||v>t.max)&&i.push(pa(a.messages[y].range,t.fullField,t.min,t.max))},tf="enum",aH=function(t,r,n,i,a){t[tf]=Array.isArray(t[tf])?t[tf]:[],t[tf].indexOf(r)===-1&&i.push(pa(a.messages[tf],t.fullField,t[tf].join(", ")))},sH=function(t,r,n,i,a){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(r)||i.push(pa(a.messages.pattern.mismatch,t.fullField,r,t.pattern));else if(typeof t.pattern=="string"){var u=new RegExp(t.pattern);u.test(r)||i.push(pa(a.messages.pattern.mismatch,t.fullField,r,t.pattern))}}},nn={required:aO,whitespace:rH,type:iH,range:oH,enum:aH,pattern:sH},lH=function(t,r,n,i,a){var u=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Vi(r,"string")&&!t.required)return n();nn.required(t,r,i,u,a,"string"),Vi(r,"string")||(nn.type(t,r,i,u,a),nn.range(t,r,i,u,a),nn.pattern(t,r,i,u,a),t.whitespace===!0&&nn.whitespace(t,r,i,u,a))}n(u)},uH=function(t,r,n,i,a){var u=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Vi(r)&&!t.required)return n();nn.required(t,r,i,u,a),r!==void 0&&nn.type(t,r,i,u,a)}n(u)},cH=function(t,r,n,i,a){var u=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(r===""&&(r=void 0),Vi(r)&&!t.required)return n();nn.required(t,r,i,u,a),r!==void 0&&(nn.type(t,r,i,u,a),nn.range(t,r,i,u,a))}n(u)},dH=function(t,r,n,i,a){var u=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Vi(r)&&!t.required)return n();nn.required(t,r,i,u,a),r!==void 0&&nn.type(t,r,i,u,a)}n(u)},fH=function(t,r,n,i,a){var u=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Vi(r)&&!t.required)return n();nn.required(t,r,i,u,a),Vi(r)||nn.type(t,r,i,u,a)}n(u)},hH=function(t,r,n,i,a){var u=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Vi(r)&&!t.required)return n();nn.required(t,r,i,u,a),r!==void 0&&(nn.type(t,r,i,u,a),nn.range(t,r,i,u,a))}n(u)},pH=function(t,r,n,i,a){var u=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Vi(r)&&!t.required)return n();nn.required(t,r,i,u,a),r!==void 0&&(nn.type(t,r,i,u,a),nn.range(t,r,i,u,a))}n(u)},mH=function(t,r,n,i,a){var u=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(r==null&&!t.required)return n();nn.required(t,r,i,u,a,"array"),r!=null&&(nn.type(t,r,i,u,a),nn.range(t,r,i,u,a))}n(u)},vH=function(t,r,n,i,a){var u=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Vi(r)&&!t.required)return n();nn.required(t,r,i,u,a),r!==void 0&&nn.type(t,r,i,u,a)}n(u)},gH="enum",yH=function(t,r,n,i,a){var u=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Vi(r)&&!t.required)return n();nn.required(t,r,i,u,a),r!==void 0&&nn[gH](t,r,i,u,a)}n(u)},xH=function(t,r,n,i,a){var u=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Vi(r,"string")&&!t.required)return n();nn.required(t,r,i,u,a),Vi(r,"string")||nn.pattern(t,r,i,u,a)}n(u)},_H=function(t,r,n,i,a){var u=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Vi(r,"date")&&!t.required)return n();if(nn.required(t,r,i,u,a),!Vi(r,"date")){var f;r instanceof Date?f=r:f=new Date(r),nn.type(t,f,i,u,a),f&&nn.range(t,f.getTime(),i,u,a)}}n(u)},bH=function(t,r,n,i,a){var u=[],o=Array.isArray(r)?"array":typeof r;nn.required(t,r,i,u,a,o),n(u)},$b=function(t,r,n,i,a){var u=t.type,o=[],f=t.required||!t.required&&i.hasOwnProperty(t.field);if(f){if(Vi(r,u)&&!t.required)return n();nn.required(t,r,i,o,a,u),Vi(r,u)||nn.type(t,r,i,o,a)}n(o)},wH=function(t,r,n,i,a){var u=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Vi(r)&&!t.required)return n();nn.required(t,r,i,u,a)}n(u)},hm={string:lH,method:uH,number:cH,boolean:dH,regexp:fH,integer:hH,float:pH,array:mH,object:vH,enum:yH,pattern:xH,date:_H,url:$b,hex:$b,email:$b,required:bH,any:wH};function t4(){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 r4=t4(),pv=function(){function e(r){this.rules=null,this._messages=r4,this.define(r)}var t=e.prototype;return t.define=function(n){var i=this;if(!n)throw new Error("Cannot configure a schema with no rules");if(typeof n!="object"||Array.isArray(n))throw new Error("Rules must be an object");this.rules={},Object.keys(n).forEach(function(a){var u=n[a];i.rules[a]=Array.isArray(u)?u:[u]})},t.messages=function(n){return n&&(this._messages=Xk(t4(),n)),this._messages},t.validate=function(n,i,a){var u=this;i===void 0&&(i={}),a===void 0&&(a=function(){});var o=n,f=i,p=a;if(typeof f=="function"&&(p=f,f={}),!this.rules||Object.keys(this.rules).length===0)return p&&p(null,o),Promise.resolve(o);function v(R){var A=[],I={};function O(L){if(Array.isArray(L)){var B;A=(B=A).concat.apply(B,L)}else A.push(L)}for(var N=0;N<R.length;N++)O(R[N]);A.length?(I=e4(A),p(A,I)):p(null,o)}if(f.messages){var y=this.messages();y===r4&&(y=t4()),Xk(y,f.messages),f.messages=y}else f.messages=this.messages();var w={},k=f.keys||Object.keys(this.rules);k.forEach(function(R){var A=u.rules[R],I=o[R];A.forEach(function(O){var N=O;typeof N.transform=="function"&&(o===n&&(o=qc({},o)),I=o[R]=N.transform(I)),typeof N=="function"?N={validator:N}:N=qc({},N),N.validator=u.getValidationMethod(N),N.validator&&(N.field=R,N.fullField=N.fullField||R,N.type=u.getType(N),w[R]=w[R]||[],w[R].push({rule:N,value:I,source:o,field:R}))})});var T={};return JK(w,f,function(R,A){var I=R.rule,O=(I.type==="object"||I.type==="array")&&(typeof I.fields=="object"||typeof I.defaultField=="object");O=O&&(I.required||!I.required&&R.value),I.field=R.field;function N(j,G){return qc({},G,{fullField:I.fullField+"."+j,fullFields:I.fullFields?[].concat(I.fullFields,[j]):[j]})}function L(j){j===void 0&&(j=[]);var G=Array.isArray(j)?j:[j];!f.suppressWarning&&G.length&&e.warning("async-validator:",G),G.length&&I.message!==void 0&&(G=[].concat(I.message));var H=G.map(Zk(I,o));if(f.first&&H.length)return T[I.field]=1,A(H);if(!O)A(H);else{if(I.required&&!R.value)return I.message!==void 0?H=[].concat(I.message).map(Zk(I,o)):f.error&&(H=[f.error(I,pa(f.messages.required,I.field))]),A(H);var te={};I.defaultField&&Object.keys(R.value).map(function(J){te[J]=I.defaultField}),te=qc({},te,R.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(f.messages),R.rule.options&&(R.rule.options.messages=f.messages,R.rule.options.error=f.error),le.validate(R.value,R.rule.options||f,function(J){var Z=[];H&&H.length&&Z.push.apply(Z,H),J&&J.length&&Z.push.apply(Z,J),A(Z.length?Z:null)})}}var B;if(I.asyncValidator)B=I.asyncValidator(I,R.value,L,R.source,f);else if(I.validator){try{B=I.validator(I,R.value,L,R.source,f)}catch(j){console.error==null||console.error(j),f.suppressValidatorError||setTimeout(function(){throw j},0),L(j.message)}B===!0?L():B===!1?L(typeof I.message=="function"?I.message(I.fullField||I.field):I.message||(I.fullField||I.field)+" fails"):B instanceof Array?L(B):B instanceof Error&&L(B.message)}B&&B.then&&B.then(function(){return L()},function(j){return L(j)})},function(R){v(R)},o)},t.getType=function(n){if(n.type===void 0&&n.pattern instanceof RegExp&&(n.type="pattern"),typeof n.validator!="function"&&n.type&&!hm.hasOwnProperty(n.type))throw new Error(pa("Unknown rule type %s",n.type));return n.type||"string"},t.getValidationMethod=function(n){if(typeof n.validator=="function")return n.validator;var i=Object.keys(n),a=i.indexOf("message");return a!==-1&&i.splice(a,1),i.length===1&&i[0]==="required"?hm.required:hm[this.getType(n)]||void 0},e}();pv.register=function(t,r){if(typeof r!="function")throw new Error("Cannot register a validator by type, validator is not a function");hm[t]=r};pv.warning=ZK;pv.messages=r4;pv.validators=hm;var la="'${name}' is not a valid ${type}",sO={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:la,method:la,array:la,object:la,number:la,date:la,boolean:la,integer:la,float:la,regexp:la,email:la,url:la,hex:la},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 lO(e,t){for(var r=e,n=0;n<t.length;n+=1){if(r==null)return;r=r[t[n]]}return r}function uO(e){if(Array.isArray(e))return e}function cO(){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 U3(e){return uO(e)||oO(e)||j3(e)||cO()}function dO(e,t,r,n){if(!t.length)return r;var i=U3(t),a=i[0],u=i.slice(1),o;return!e&&typeof a=="number"?o=[]:Array.isArray(e)?o=wt(e):o=ve({},e),n&&r===void 0&&u.length===1?delete o[a][u[0]]:o[a]=dO(o[a],u,r,n),o}function CH(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&n&&r===void 0&&!lO(e,t.slice(0,-1))?e:dO(e,t,r,n)}function ox(e){return Array.isArray(e)?EH(e):ar(e)==="object"&&e!==null?SH(e):e}function SH(e){if(Object.getPrototypeOf(e)===Object.prototype){var t={};for(var r in e)t[r]=ox(e[r]);return t}return e}function EH(e){return e.map(function(t){return ox(t)})}function bi(e){return Yw(e)}function Pu(e,t){var r=lO(e,t);return r}function vu(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=CH(e,t,r,n);return i}function Qk(e,t){var r={};return t.forEach(function(n){var i=Pu(e,n);r=vu(r,n,i)}),r}function pm(e,t){return e&&e.some(function(r){return hO(r,t)})}function Jk(e){return ar(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function fO(e,t){var r=Array.isArray(e)?wt(e):ve({},e);return t&&Object.keys(t).forEach(function(n){var i=r[n],a=t[n],u=Jk(i)&&Jk(a);r[n]=u?fO(i,a||{}):ox(a)}),r}function r0(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.reduce(function(i,a){return fO(i,a)},e)}function hO(e,t){return!e||!t||e.length!==t.length?!1:e.every(function(r,n){return t[n]===r})}function kH(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||ar(e)!=="object"||ar(t)!=="object")return!1;var r=Object.keys(e),n=Object.keys(t),i=new Set([].concat(r,n));return wt(i).every(function(a){var u=e[a],o=t[a];return typeof u=="function"&&typeof o=="function"?!0:u===o})}function TH(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&ar(t.target)==="object"&&e in t.target?t.target[e]:t}function eT(e,t,r){var n=e.length;if(t<0||t>=n||r<0||r>=n)return e;var i=e[t],a=t-r;return a>0?[].concat(wt(e.slice(0,r)),[i],wt(e.slice(r,t)),wt(e.slice(t+1,n))):a<0?[].concat(wt(e.slice(0,t)),wt(e.slice(t+1,r+1)),[i],wt(e.slice(r+1,n))):e}var PH=pv;function MH(e,t){return e.replace(/\$\{\w+\}/g,function(r){var n=r.slice(2,-1);return t[n]})}var tT="CODE_LOGIC_ERROR";function n4(e,t,r,n,i){return i4.apply(this,arguments)}function i4(){return i4=vd(Do().mark(function e(t,r,n,i,a){var u,o,f,p,v,y,w,k,T;return Do().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return u=ve({},n),delete u.ruleIndex,u.validator&&(o=u.validator,u.validator=function(){try{return o.apply(void 0,arguments)}catch(I){return console.error(I),Promise.reject(tT)}}),f=null,u&&u.type==="array"&&u.defaultField&&(f=u.defaultField,delete u.defaultField),p=new PH(se({},t,[u])),v=r0({},sO,i.validateMessages),p.messages(v),y=[],A.prev=9,A.next=12,Promise.resolve(p.validate(se({},t,r),ve({},i)));case 12:A.next=17;break;case 14:A.prev=14,A.t0=A.catch(9),A.t0.errors&&(y=A.t0.errors.map(function(I,O){var N=I.message,L=N===tT?v.default:N;return C.exports.isValidElement(L)?C.exports.cloneElement(L,{key:"error_".concat(O)}):L}));case 17:if(!(!y.length&&f)){A.next=22;break}return A.next=20,Promise.all(r.map(function(I,O){return n4("".concat(t,".").concat(O),I,f,i,a)}));case 20:return w=A.sent,A.abrupt("return",w.reduce(function(I,O){return[].concat(wt(I),wt(O))},[]));case 22:return k=ve(ve({},n),{},{name:t,enum:(n.enum||[]).join(", ")},a),T=y.map(function(I){return typeof I=="string"?MH(I,k):I}),A.abrupt("return",T);case 25:case"end":return A.stop()}},e,null,[[9,14]])})),i4.apply(this,arguments)}function IH(e,t,r,n,i,a){var u=e.join("."),o=r.map(function(v,y){var w=v.validator,k=ve(ve({},v),{},{ruleIndex:y});return w&&(k.validator=function(T,R,A){var I=!1,O=function(){for(var B=arguments.length,j=new Array(B),G=0;G<B;G++)j[G]=arguments[G];Promise.resolve().then(function(){Bn(!I,"Your validator function has already return a promise. `callback` will be ignored."),I||A.apply(void 0,j)})},N=w(T,R,O);I=N&&typeof N.then=="function"&&typeof N.catch=="function",Bn(I,"`callback` is deprecated. Please return a promise instead."),I&&N.then(function(){A()}).catch(function(L){A(L||" ")})}),k}).sort(function(v,y){var w=v.warningOnly,k=v.ruleIndex,T=y.warningOnly,R=y.ruleIndex;return!!w==!!T?k-R:w?1:-1}),f;if(i===!0)f=new Promise(function(){var v=vd(Do().mark(function y(w,k){var T,R,A;return Do().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:T=0;case 1:if(!(T<o.length)){O.next=12;break}return R=o[T],O.next=5,n4(u,t,R,n,a);case 5:if(A=O.sent,!A.length){O.next=9;break}return k([{errors:A,rule:R}]),O.abrupt("return");case 9:T+=1,O.next=1;break;case 12:w([]);case 13:case"end":return O.stop()}},y)}));return function(y,w){return v.apply(this,arguments)}}());else{var p=o.map(function(v){return n4(u,t,v,n,a).then(function(y){return{errors:y,rule:v}})});f=(i?OH(p):RH(p)).then(function(v){return Promise.reject(v)})}return f.catch(function(v){return v}),f}function RH(e){return o4.apply(this,arguments)}function o4(){return o4=vd(Do().mark(function e(t){return Do().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",Promise.all(t).then(function(i){var a,u=(a=[]).concat.apply(a,wt(i));return u}));case 1:case"end":return n.stop()}},e)})),o4.apply(this,arguments)}function OH(e){return a4.apply(this,arguments)}function a4(){return a4=vd(Do().mark(function e(t){var r;return Do().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return r=0,i.abrupt("return",new Promise(function(a){t.forEach(function(u){u.then(function(o){o.errors.length&&a([o]),r+=1,r===t.length&&a([])})})}));case 2:case"end":return i.stop()}},e)})),a4.apply(this,arguments)}var AH=["name"],Ra=[];function rT(e,t,r,n,i,a){return typeof e=="function"?e(t,r,"source"in a?{source:a.source}:{}):n!==i}var K3=function(e){vi(r,e);var t=gi(r);function r(n){var i;if(Qn(this,r),i=t.call(this,n),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=Ra,i.warnings=Ra,i.cancelRegister=function(){var f=i.props,p=f.preserve,v=f.isListField,y=f.name;i.cancelRegisterFunc&&i.cancelRegisterFunc(v,p,bi(y)),i.cancelRegisterFunc=null},i.getNamePath=function(){var f=i.props,p=f.name,v=f.fieldContext,y=v.prefixName,w=y===void 0?[]:y;return p!==void 0?[].concat(wt(w),wt(p)):[]},i.getRules=function(){var f=i.props,p=f.rules,v=p===void 0?[]:p,y=f.fieldContext;return v.map(function(w){return typeof w=="function"?w(y):w})},i.refresh=function(){!i.mounted||i.setState(function(f){var p=f.resetCount;return{resetCount:p+1}})},i.triggerMetaEvent=function(f){var p=i.props.onMetaChange;p==null||p(ve(ve({},i.getMeta()),{},{destroy:f}))},i.onStoreChange=function(f,p,v){var y=i.props,w=y.shouldUpdate,k=y.dependencies,T=k===void 0?[]:k,R=y.onReset,A=v.store,I=i.getNamePath(),O=i.getValue(f),N=i.getValue(A),L=p&&pm(p,I);switch(v.type==="valueUpdate"&&v.source==="external"&&O!==N&&(i.touched=!0,i.dirty=!0,i.validatePromise=null,i.errors=Ra,i.warnings=Ra,i.triggerMetaEvent()),v.type){case"reset":if(!p||L){i.touched=!1,i.dirty=!1,i.validatePromise=null,i.errors=Ra,i.warnings=Ra,i.triggerMetaEvent(),R==null||R(),i.refresh();return}break;case"remove":{if(w){i.reRender();return}break}case"setField":{if(L){var B=v.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||Ra),"warnings"in B&&(i.warnings=B.warnings||Ra),i.dirty=!0,i.triggerMetaEvent(),i.reRender();return}if(w&&!I.length&&rT(w,f,A,O,N,v)){i.reRender();return}break}case"dependenciesUpdate":{var j=T.map(bi);if(j.some(function(G){return pm(v.relatedFields,G)})){i.reRender();return}break}default:if(L||(!T.length||I.length||w)&&rT(w,f,A,O,N,v)){i.reRender();return}break}w===!0&&i.reRender()},i.validateRules=function(f){var p=i.getNamePath(),v=i.getValue(),y=Promise.resolve().then(function(){if(!i.mounted)return[];var w=i.props,k=w.validateFirst,T=k===void 0?!1:k,R=w.messageVariables,A=f||{},I=A.triggerName,O=i.getRules();I&&(O=O.filter(function(L){return L}).filter(function(L){var B=L.validateTrigger;if(!B)return!0;var j=Yw(B);return j.includes(I)}));var N=IH(p,v,O,f,T,R);return N.catch(function(L){return L}).then(function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ra;if(i.validatePromise===y){var B;i.validatePromise=null;var j=[],G=[];(B=L.forEach)===null||B===void 0||B.call(L,function(H){var te=H.rule.warningOnly,Y=H.errors,le=Y===void 0?Ra:Y;te?G.push.apply(G,wt(le)):j.push.apply(j,wt(le))}),i.errors=j,i.warnings=G,i.triggerMetaEvent(),i.reRender()}}),N});return i.validatePromise=y,i.dirty=!0,i.errors=Ra,i.warnings=Ra,i.triggerMetaEvent(),i.reRender(),y},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 f=i.props.fieldContext,p=f.getInternalHooks(Wc),v=p.getInitialValue;return v(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 f={touched:i.isFieldTouched(),validating:i.prevValidating,errors:i.errors,warnings:i.warnings,name:i.getNamePath()};return f},i.getOnlyChild=function(f){if(typeof f=="function"){var p=i.getMeta();return ve(ve({},i.getOnlyChild(f(i.getControlled(),p,i.props.fieldContext))),{},{isFunction:!0})}var v=lo(f);return v.length!==1||!C.exports.isValidElement(v[0])?{child:v,isFunction:!1}:{child:v[0],isFunction:!1}},i.getValue=function(f){var p=i.props.fieldContext.getFieldsValue,v=i.getNamePath();return Pu(f||p(!0),v)},i.getControlled=function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=i.props,v=p.trigger,y=p.validateTrigger,w=p.getValueFromEvent,k=p.normalize,T=p.valuePropName,R=p.getValueProps,A=p.fieldContext,I=y!==void 0?y:A.validateTrigger,O=i.getNamePath(),N=A.getInternalHooks,L=A.getFieldsValue,B=N(Wc),j=B.dispatch,G=i.getValue(),H=R||function(J){return se({},T,J)},te=f[v],Y=ve(ve({},f),H(G));Y[v]=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=TH.apply(void 0,[T].concat(Q)),k&&(J=k(J,G,L(!0))),j({type:"updateValue",namePath:O,value:J}),te&&te.apply(void 0,Q)};var le=Yw(I||[]);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&&j({type:"validateField",namePath:O,triggerName:J})}}),Y},n.fieldContext){var a=n.fieldContext.getInternalHooks,u=a(Wc),o=u.initEntityValue;o(Nr(i))}return i}return Jn(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.shouldUpdate,u=i.fieldContext;if(this.mounted=!0,u){var o=u.getInternalHooks,f=o(Wc),p=f.registerField;this.cancelRegisterFunc=p(this)}a===!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,a=this.getOnlyChild(i),u=a.child,o=a.isFunction,f;return o?f=u:C.exports.isValidElement(u)?f=C.exports.cloneElement(u,this.getControlled(u.props)):(Bn(!u,"`children` of Field is not validate ReactElement."),f=u),S(Ar,{children:f})}}]),r}(C.exports.Component);K3.contextType=sd;K3.defaultProps={trigger:"onChange",valuePropName:"value"};function H3(e){var t=e.name,r=Mr(e,AH),n=C.exports.useContext(sd),i=t!==void 0?bi(t):void 0,a="keep";return r.isListField||(a="_".concat((i||[]).join("_"))),S(K3,{name:i,...r,fieldContext:n},a)}var pO=C.exports.createContext(null),mO=function(t){var r=t.name,n=t.initialValue,i=t.children,a=t.rules,u=t.validateTrigger,o=C.exports.useContext(sd),f=C.exports.useRef({keys:[],id:0}),p=f.current,v=C.exports.useMemo(function(){var T=bi(o.prefixName)||[];return[].concat(wt(T),wt(bi(r)))},[o.prefixName,r]),y=C.exports.useMemo(function(){return ve(ve({},o),{},{prefixName:v})},[o,v]),w=C.exports.useMemo(function(){return{getKey:function(R){var A=v.length,I=R[A];return[p.keys[I],R.slice(A+1)]}}},[v]);if(typeof i!="function")return Bn(!1,"Form.List only accepts function as children."),null;var k=function(R,A,I){var O=I.source;return O==="internal"?!1:R!==A};return S(pO.Provider,{value:w,children:S(sd.Provider,{value:y,children:S(H3,{name:[],shouldUpdate:k,rules:a,validateTrigger:u,initialValue:n,isList:!0,children:function(T,R){var A=T.value,I=A===void 0?[]:A,O=T.onChange,N=o.getFieldValue,L=function(){var H=N(v||[]);return H||[]},B={add:function(H,te){var Y=L();te>=0&&te<=Y.length?(p.keys=[].concat(wt(p.keys.slice(0,te)),[p.id],wt(p.keys.slice(te))),O([].concat(wt(Y.slice(0,te)),[H],wt(Y.slice(te))))):(p.keys=[].concat(wt(p.keys),[p.id]),O([].concat(wt(Y),[H]))),p.id+=1},remove:function(H){var te=L(),Y=new Set(Array.isArray(H)?H:[H]);Y.size<=0||(p.keys=p.keys.filter(function(le,J){return!Y.has(J)}),O(te.filter(function(le,J){return!Y.has(J)})))},move:function(H,te){if(H!==te){var Y=L();H<0||H>=Y.length||te<0||te>=Y.length||(p.keys=eT(p.keys,H,te),O(eT(Y,H,te)))}}},j=I||[];return Array.isArray(j)||(j=[]),i(j.map(function(G,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,R)}})})})};function NH(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,u,o=[],f=!0,p=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;f=!1}else for(;!(f=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);f=!0);}catch(v){p=!0,i=v}finally{try{if(!f&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(p)throw i}}return o}}function Le(e,t){return uO(e)||NH(e,t)||j3(e,t)||cO()}function zH(e){var t=!1,r=e.length,n=[];return e.length?new Promise(function(i,a){e.forEach(function(u,o){u.catch(function(f){return t=!0,f}).then(function(f){r-=1,n[o]=f,!(r>0)&&(t&&a(n),i(n))})})}):Promise.resolve([])}var vO="__@field_split__";function Bb(e){return e.map(function(t){return"".concat(ar(t),":").concat(t)}).join(vO)}var rf=function(){function e(){Qn(this,e),this.kvs=new Map}return Jn(e,[{key:"set",value:function(r,n){this.kvs.set(Bb(r),n)}},{key:"get",value:function(r){return this.kvs.get(Bb(r))}},{key:"update",value:function(r,n){var i=this.get(r),a=n(i);a?this.set(r,a):this.delete(r)}},{key:"delete",value:function(r){this.kvs.delete(Bb(r))}},{key:"map",value:function(r){return wt(this.kvs.entries()).map(function(n){var i=Le(n,2),a=i[0],u=i[1],o=a.split(vO);return r({key:o.map(function(f){var p=f.match(/^([^:]*):(.*)$/),v=Le(p,3),y=v[1],w=v[2];return y==="number"?Number(w):w}),value:u})})}},{key:"toJSON",value:function(){var r={};return this.map(function(n){var i=n.key,a=n.value;return r[i.join(".")]=a,null}),r}}]),e}(),DH=["name","errors"],LH=Jn(function e(t){var r=this;Qn(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:r.getFieldValue,getFieldsValue:r.getFieldsValue,getFieldError:r.getFieldError,getFieldWarning:r.getFieldWarning,getFieldsError:r.getFieldsError,isFieldsTouched:r.isFieldsTouched,isFieldTouched:r.isFieldTouched,isFieldValidating:r.isFieldValidating,isFieldsValidating:r.isFieldsValidating,resetFields:r.resetFields,setFields:r.setFields,setFieldValue:r.setFieldValue,setFieldsValue:r.setFieldsValue,validateFields:r.validateFields,submit:r.submit,_init:!0,getInternalHooks:r.getInternalHooks}},this.getInternalHooks=function(n){return n===Wc?(r.formHooked=!0,{dispatch:r.dispatch,initEntityValue:r.initEntityValue,registerField:r.registerField,useSubscribe:r.useSubscribe,setInitialValues:r.setInitialValues,destroyForm:r.destroyForm,setCallbacks:r.setCallbacks,setValidateMessages:r.setValidateMessages,getFields:r.getFields,setPreserve:r.setPreserve,getInitialValue:r.getInitialValue,registerWatch:r.registerWatch}):(Bn(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)},this.useSubscribe=function(n){r.subscribable=n},this.prevWithoutPreserves=null,this.setInitialValues=function(n,i){if(r.initialValues=n||{},i){var a,u=r0({},n,r.store);(a=r.prevWithoutPreserves)===null||a===void 0||a.map(function(o){var f=o.key;u=vu(u,f,Pu(n,f))}),r.prevWithoutPreserves=null,r.updateStore(u)}},this.destroyForm=function(){var n=new rf;r.getFieldEntities(!0).forEach(function(i){r.isMergedPreserve(i.isPreserve())||n.set(i.getNamePath(),!0)}),r.prevWithoutPreserves=n},this.getInitialValue=function(n){var i=Pu(r.initialValues,n);return n.length?ox(i):i},this.setCallbacks=function(n){r.callbacks=n},this.setValidateMessages=function(n){r.validateMessages=n},this.setPreserve=function(n){r.preserve=n},this.watchList=[],this.registerWatch=function(n){return r.watchList.push(n),function(){r.watchList=r.watchList.filter(function(i){return i!==n})}},this.notifyWatch=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(r.watchList.length){var i=r.getFieldsValue();r.watchList.forEach(function(a){a(i,n)})}},this.timeoutId=null,this.warningUnhooked=function(){},this.updateStore=function(n){r.store=n},this.getFieldEntities=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return n?r.fieldEntities.filter(function(i){return i.getNamePath().length}):r.fieldEntities},this.getFieldsMap=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=new rf;return r.getFieldEntities(n).forEach(function(a){var u=a.getNamePath();i.set(u,a)}),i},this.getFieldEntitiesForNamePathList=function(n){if(!n)return r.getFieldEntities(!0);var i=r.getFieldsMap(!0);return n.map(function(a){var u=bi(a);return i.get(u)||{INVALIDATE_NAME_PATH:bi(a)}})},this.getFieldsValue=function(n,i){if(r.warningUnhooked(),n===!0&&!i)return r.store;var a=r.getFieldEntitiesForNamePathList(Array.isArray(n)?n:null),u=[];return a.forEach(function(o){var f,p="INVALIDATE_NAME_PATH"in o?o.INVALIDATE_NAME_PATH:o.getNamePath();if(!(!n&&((f=o.isListField)===null||f===void 0?void 0:f.call(o))))if(!i)u.push(p);else{var v="getMeta"in o?o.getMeta():null;i(v)&&u.push(p)}}),Qk(r.store,u.map(bi))},this.getFieldValue=function(n){r.warningUnhooked();var i=bi(n);return Pu(r.store,i)},this.getFieldsError=function(n){r.warningUnhooked();var i=r.getFieldEntitiesForNamePathList(n);return i.map(function(a,u){return a&&!("INVALIDATE_NAME_PATH"in a)?{name:a.getNamePath(),errors:a.getErrors(),warnings:a.getWarnings()}:{name:bi(n[u]),errors:[],warnings:[]}})},this.getFieldError=function(n){r.warningUnhooked();var i=bi(n),a=r.getFieldsError([i])[0];return a.errors},this.getFieldWarning=function(n){r.warningUnhooked();var i=bi(n),a=r.getFieldsError([i])[0];return a.warnings},this.isFieldsTouched=function(){r.warningUnhooked();for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var u=i[0],o=i[1],f,p=!1;i.length===0?f=null:i.length===1?Array.isArray(u)?(f=u.map(bi),p=!1):(f=null,p=u):(f=u.map(bi),p=o);var v=r.getFieldEntities(!0),y=function(A){return A.isFieldTouched()};if(!f)return p?v.every(y):v.some(y);var w=new rf;f.forEach(function(R){w.set(R,[])}),v.forEach(function(R){var A=R.getNamePath();f.forEach(function(I){I.every(function(O,N){return A[N]===O})&&w.update(I,function(O){return[].concat(wt(O),[R])})})});var k=function(A){return A.some(y)},T=w.map(function(R){var A=R.value;return A});return p?T.every(k):T.some(k)},this.isFieldTouched=function(n){return r.warningUnhooked(),r.isFieldsTouched([n])},this.isFieldsValidating=function(n){r.warningUnhooked();var i=r.getFieldEntities();if(!n)return i.some(function(u){return u.isFieldValidating()});var a=n.map(bi);return i.some(function(u){var o=u.getNamePath();return pm(a,o)&&u.isFieldValidating()})},this.isFieldValidating=function(n){return r.warningUnhooked(),r.isFieldsValidating([n])},this.resetWithFieldInitialValue=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=new rf,a=r.getFieldEntities(!0);a.forEach(function(f){var p=f.props.initialValue,v=f.getNamePath();if(p!==void 0){var y=i.get(v)||new Set;y.add({entity:f,value:p}),i.set(v,y)}});var u=function(p){p.forEach(function(v){var y=v.props.initialValue;if(y!==void 0){var w=v.getNamePath(),k=r.getInitialValue(w);if(k!==void 0)Bn(!1,"Form already set 'initialValues' with path '".concat(w.join("."),"'. Field can not overwrite it."));else{var T=i.get(w);if(T&&T.size>1)Bn(!1,"Multiple Field with path '".concat(w.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(T){var R=r.getFieldValue(w);(!n.skipExist||R===void 0)&&r.updateStore(vu(r.store,w,wt(T)[0].value))}}}})},o;n.entities?o=n.entities:n.namePathList?(o=[],n.namePathList.forEach(function(f){var p=i.get(f);if(p){var v;(v=o).push.apply(v,wt(wt(p).map(function(y){return y.entity})))}})):o=a,u(o)},this.resetFields=function(n){r.warningUnhooked();var i=r.store;if(!n){r.updateStore(r0({},r.initialValues)),r.resetWithFieldInitialValue(),r.notifyObservers(i,null,{type:"reset"}),r.notifyWatch();return}var a=n.map(bi);a.forEach(function(u){var o=r.getInitialValue(u);r.updateStore(vu(r.store,u,o))}),r.resetWithFieldInitialValue({namePathList:a}),r.notifyObservers(i,a,{type:"reset"}),r.notifyWatch(a)},this.setFields=function(n){r.warningUnhooked();var i=r.store,a=[];n.forEach(function(u){var o=u.name;u.errors;var f=Mr(u,DH),p=bi(o);a.push(p),"value"in f&&r.updateStore(vu(r.store,p,f.value)),r.notifyObservers(i,[p],{type:"setField",data:u})}),r.notifyWatch(a)},this.getFields=function(){var n=r.getFieldEntities(!0),i=n.map(function(a){var u=a.getNamePath(),o=a.getMeta(),f=ve(ve({},o),{},{name:u,value:r.getFieldValue(u)});return Object.defineProperty(f,"originRCField",{value:!0}),f});return i},this.initEntityValue=function(n){var i=n.props.initialValue;if(i!==void 0){var a=n.getNamePath(),u=Pu(r.store,a);u===void 0&&r.updateStore(vu(r.store,a,i))}},this.isMergedPreserve=function(n){var i=n!==void 0?n:r.preserve;return i!=null?i:!0},this.registerField=function(n){r.fieldEntities.push(n);var i=n.getNamePath();if(r.notifyWatch([i]),n.props.initialValue!==void 0){var a=r.store;r.resetWithFieldInitialValue({entities:[n],skipExist:!0}),r.notifyObservers(a,[n.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(u,o){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r.fieldEntities=r.fieldEntities.filter(function(y){return y!==n}),!r.isMergedPreserve(o)&&(!u||f.length>1)){var p=u?void 0:r.getInitialValue(i);if(i.length&&r.getFieldValue(i)!==p&&r.fieldEntities.every(function(y){return!hO(y.getNamePath(),i)})){var v=r.store;r.updateStore(vu(v,i,p,!0)),r.notifyObservers(v,[i],{type:"remove"}),r.triggerDependenciesUpdate(v,i)}}r.notifyWatch([i])}},this.dispatch=function(n){switch(n.type){case"updateValue":{var i=n.namePath,a=n.value;r.updateValue(i,a);break}case"validateField":{var u=n.namePath,o=n.triggerName;r.validateFields([u],{triggerName:o});break}}},this.notifyObservers=function(n,i,a){if(r.subscribable){var u=ve(ve({},a),{},{store:r.getFieldsValue(!0)});r.getFieldEntities().forEach(function(o){var f=o.onStoreChange;f(n,i,u)})}else r.forceRootUpdate()},this.triggerDependenciesUpdate=function(n,i){var a=r.getDependencyChildrenFields(i);return a.length&&r.validateFields(a),r.notifyObservers(n,a,{type:"dependenciesUpdate",relatedFields:[i].concat(wt(a))}),a},this.updateValue=function(n,i){var a=bi(n),u=r.store;r.updateStore(vu(r.store,a,i)),r.notifyObservers(u,[a],{type:"valueUpdate",source:"internal"}),r.notifyWatch([a]);var o=r.triggerDependenciesUpdate(u,a),f=r.callbacks.onValuesChange;if(f){var p=Qk(r.store,[a]);f(p,r.getFieldsValue())}r.triggerOnFieldsChange([a].concat(wt(o)))},this.setFieldsValue=function(n){r.warningUnhooked();var i=r.store;if(n){var a=r0(r.store,n);r.updateStore(a)}r.notifyObservers(i,null,{type:"valueUpdate",source:"external"}),r.notifyWatch()},this.setFieldValue=function(n,i){r.setFields([{name:n,value:i}])},this.getDependencyChildrenFields=function(n){var i=new Set,a=[],u=new rf;r.getFieldEntities().forEach(function(f){var p=f.props.dependencies;(p||[]).forEach(function(v){var y=bi(v);u.update(y,function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return w.add(f),w})})});var o=function f(p){var v=u.get(p)||new Set;v.forEach(function(y){if(!i.has(y)){i.add(y);var w=y.getNamePath();y.isFieldDirty()&&w.length&&(a.push(w),f(w))}})};return o(n),a},this.triggerOnFieldsChange=function(n,i){var a=r.callbacks.onFieldsChange;if(a){var u=r.getFields();if(i){var o=new rf;i.forEach(function(p){var v=p.name,y=p.errors;o.set(v,y)}),u.forEach(function(p){p.errors=o.get(p.name)||p.errors})}var f=u.filter(function(p){var v=p.name;return pm(n,v)});a(f,u)}},this.validateFields=function(n,i){r.warningUnhooked();var a=!!n,u=a?n.map(bi):[],o=[];r.getFieldEntities(!0).forEach(function(v){if(a||u.push(v.getNamePath()),(i==null?void 0:i.recursive)&&a){var y=v.getNamePath();y.every(function(T,R){return n[R]===T||n[R]===void 0})&&u.push(y)}if(!(!v.props.rules||!v.props.rules.length)){var w=v.getNamePath();if(!a||pm(u,w)){var k=v.validateRules(ve({validateMessages:ve(ve({},sO),r.validateMessages)},i));o.push(k.then(function(){return{name:w,errors:[],warnings:[]}}).catch(function(T){var R,A=[],I=[];return(R=T.forEach)===null||R===void 0||R.call(T,function(O){var N=O.rule.warningOnly,L=O.errors;N?I.push.apply(I,wt(L)):A.push.apply(A,wt(L))}),A.length?Promise.reject({name:w,errors:A,warnings:I}):{name:w,errors:A,warnings:I}}))}}});var f=zH(o);r.lastValidatePromise=f,f.catch(function(v){return v}).then(function(v){var y=v.map(function(w){var k=w.name;return k});r.notifyObservers(r.store,y,{type:"validateFinish"}),r.triggerOnFieldsChange(y,v)});var p=f.then(function(){return r.lastValidatePromise===f?Promise.resolve(r.getFieldsValue(u)):Promise.reject([])}).catch(function(v){var y=v.filter(function(w){return w&&w.errors.length});return Promise.reject({values:r.getFieldsValue(u),errorFields:y,outOfDate:r.lastValidatePromise!==f})});return p.catch(function(v){return v}),p},this.submit=function(){r.warningUnhooked(),r.validateFields().then(function(n){var i=r.callbacks.onFinish;if(i)try{i(n)}catch(a){console.error(a)}}).catch(function(n){var i=r.callbacks.onFinishFailed;i&&i(n)})},this.forceRootUpdate=t});function W3(e){var t=C.exports.useRef(),r=C.exports.useState({}),n=Le(r,2),i=n[1];if(!t.current)if(e)t.current=e;else{var a=function(){i({})},u=new LH(a);t.current=u.getForm()}return[t.current]}var s4=C.exports.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),q3=function(t){var r=t.validateMessages,n=t.onFormChange,i=t.onFormFinish,a=t.children,u=C.exports.useContext(s4),o=C.exports.useRef({});return S(s4.Provider,{value:ve(ve({},u),{},{validateMessages:ve(ve({},u.validateMessages),r),triggerFormChange:function(p,v){n&&n(p,{changedFields:v,forms:o.current}),u.triggerFormChange(p,v)},triggerFormFinish:function(p,v){i&&i(p,{values:v,forms:o.current}),u.triggerFormFinish(p,v)},registerForm:function(p,v){p&&(o.current=ve(ve({},o.current),{},se({},p,v))),u.registerForm(p,v)},unregisterForm:function(p){var v=ve({},o.current);delete v[p],o.current=v,u.unregisterForm(p)}}),children:a})},FH=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed"],$H=function(t,r){var n=t.name,i=t.initialValues,a=t.fields,u=t.form,o=t.preserve,f=t.children,p=t.component,v=p===void 0?"form":p,y=t.validateMessages,w=t.validateTrigger,k=w===void 0?"onChange":w,T=t.onValuesChange,R=t.onFieldsChange,A=t.onFinish,I=t.onFinishFailed,O=Mr(t,FH),N=C.exports.useContext(s4),L=W3(u),B=Le(L,1),j=B[0],G=j.getInternalHooks(Wc),H=G.useSubscribe,te=G.setInitialValues,Y=G.setCallbacks,le=G.setValidateMessages,J=G.setPreserve,Z=G.destroyForm;C.exports.useImperativeHandle(r,function(){return j}),C.exports.useEffect(function(){return N.registerForm(n,j),function(){N.unregisterForm(n)}},[N,j,n]),le(ve(ve({},N.validateMessages),y)),Y({onValuesChange:T,onFieldsChange:function(ke){if(N.triggerFormChange(n,ke),R){for(var ze=arguments.length,Ie=new Array(ze>1?ze-1:0),Ne=1;Ne<ze;Ne++)Ie[Ne-1]=arguments[Ne];R.apply(void 0,[ke].concat(Ie))}},onFinish:function(ke){N.triggerFormFinish(n,ke),A&&A(ke)},onFinishFailed:I}),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,ne=typeof f=="function";if(ne){var de=j.getFieldsValue(!0);ge=f(de,j)}else ge=f;H(!ne);var oe=C.exports.useRef();C.exports.useEffect(function(){kH(oe.current||[],a||[])||j.setFields(a||[]),oe.current=a},[a,j]);var ye=C.exports.useMemo(function(){return ve(ve({},j),{},{validateTrigger:k})},[j,k]),Re=S(sd.Provider,{value:ye,children:ge});return v===!1?Re:S(v,{...O,onSubmit:function(ke){ke.preventDefault(),ke.stopPropagation(),j.submit()},onReset:function(ke){var ze;ke.preventDefault(),j.resetFields(),(ze=O.onReset)===null||ze===void 0||ze.call(O,ke)},children:Re})};function nT(e){try{return JSON.stringify(e)}catch{return Math.random()}}function gO(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t[0],i=n===void 0?[]:n,a=t[1],u=C.exports.useState(),o=Le(u,2),f=o[0],p=o[1],v=C.exports.useMemo(function(){return nT(f)},[f]),y=C.exports.useRef(v);y.current=v;var w=C.exports.useContext(sd),k=a||w,T=k&&k._init,R=bi(i),A=C.exports.useRef(R);return A.current=R,C.exports.useEffect(function(){if(!!T){var I=k.getFieldsValue,O=k.getInternalHooks,N=O(Wc),L=N.registerWatch,B=L(function(G){var H=Pu(G,A.current),te=nT(H);y.current!==te&&(y.current=te,p(H))}),j=Pu(I(),A.current);return p(j),B}},[T]),f}var BH=C.exports.forwardRef($H),ph=BH;ph.FormProvider=q3;ph.Field=H3;ph.List=mO;ph.useForm=W3;ph.useWatch=gO;const yO={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 VH={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"},jH={placeholder:"Select time",rangePlaceholder:["Start time","End time"]};const xO=jH;var UH={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"]},VH),timePickerLocale:tt({},xO)};const iT=UH;var ua="${label} is not a valid ${type}",KH={locale:"en",Pagination:yO,DatePicker:iT,TimePicker:xO,Calendar:iT,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:ua,method:ua,array:ua,object:ua,number:ua,date:ua,boolean:ua,integer:ua,float:ua,regexp:ua,email:ua,url:ua,hex:ua},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 zl=KH;var n0=tt({},zl.Modal);function oT(e){e?n0=tt(tt({},n0),e):n0=tt({},zl.Modal)}function _O(){return n0}var HH=C.exports.createContext(void 0);const G3=HH;var WH="internalMark",qH=function(t){var r=t.locale,n=r===void 0?{}:r,i=t.children;t._ANT_MARK__,C.exports.useEffect(function(){return oT(n&&n.Modal),function(){oT()}},[n]);var a=C.exports.useMemo(function(){return tt(tt({},n),{exist:!0})},[n]);return S(G3.Provider,{value:a,children:i})};const GH=qH;var ZH=function(t){var r=t.componentName,n=r===void 0?"global":r,i=t.defaultLocale,a=t.children,u=C.exports.useContext(G3),o=C.exports.useMemo(function(){var p,v=i||zl[n],y=(p=u==null?void 0:u[n])!==null&&p!==void 0?p:{};return tt(tt({},v instanceof Function?v():v),y||{})},[n,i,u]),f=C.exports.useMemo(function(){var p=u&&u.locale;return u&&u.exist&&!p?zl.locale:p},[u]);return a(o,f,u)};const mv=ZH;var bO=function(t,r){var n=C.exports.useContext(G3),i=C.exports.useMemo(function(){var a,u=r||zl[t],o=(a=n==null?void 0:n[t])!==null&&a!==void 0?a:{};return tt(tt({},typeof u=="function"?u():u),o||{})},[t,r,n]);return[i]},XH={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 YH=XH;function oo(e,t){QH(e)&&(e="100%");var r=JH(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(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 py(e){return Math.min(1,Math.max(0,e))}function QH(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function JH(e){return typeof e=="string"&&e.indexOf("%")!==-1}function wO(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function my(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Gc(e){return e.length===1?"0"+e:String(e)}function eW(e,t,r){return{r:oo(e,255)*255,g:oo(t,255)*255,b:oo(r,255)*255}}function aT(e,t,r){e=oo(e,255),t=oo(t,255),r=oo(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),a=0,u=0,o=(n+i)/2;if(n===i)u=0,a=0;else{var f=n-i;switch(u=o>.5?f/(2-n-i):f/(n+i),n){case e:a=(t-r)/f+(t<r?6:0);break;case t:a=(r-e)/f+2;break;case r:a=(e-t)/f+4;break}a/=6}return{h:a,s:u,l:o}}function Vb(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*(6*r):r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function tW(e,t,r){var n,i,a;if(e=oo(e,360),t=oo(t,100),r=oo(r,100),t===0)i=r,a=r,n=r;else{var u=r<.5?r*(1+t):r+t-r*t,o=2*r-u;n=Vb(o,u,e+1/3),i=Vb(o,u,e),a=Vb(o,u,e-1/3)}return{r:n*255,g:i*255,b:a*255}}function G0(e,t,r){e=oo(e,255),t=oo(t,255),r=oo(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),a=0,u=n,o=n-i,f=n===0?0:o/n;if(n===i)a=0;else{switch(n){case e:a=(t-r)/o+(t<r?6:0);break;case t:a=(r-e)/o+2;break;case r:a=(e-t)/o+4;break}a/=6}return{h:a,s:f,v:u}}function rW(e,t,r){e=oo(e,360)*6,t=oo(t,100),r=oo(r,100);var n=Math.floor(e),i=e-n,a=r*(1-t),u=r*(1-i*t),o=r*(1-(1-i)*t),f=n%6,p=[r,u,a,a,o,r][f],v=[o,r,r,u,a,a][f],y=[a,a,o,r,r,u][f];return{r:p*255,g:v*255,b:y*255}}function Z0(e,t,r,n){var i=[Gc(Math.round(e).toString(16)),Gc(Math.round(t).toString(16)),Gc(Math.round(r).toString(16))];return n&&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 nW(e,t,r,n,i){var a=[Gc(Math.round(e).toString(16)),Gc(Math.round(t).toString(16)),Gc(Math.round(r).toString(16)),Gc(iW(n))];return i&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function iW(e){return Math.round(parseFloat(e)*255).toString(16)}function sT(e){return ca(e)/255}function ca(e){return parseInt(e,16)}function oW(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var l4={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 ms(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,a=null,u=!1,o=!1;return typeof e=="string"&&(e=lW(e)),typeof e=="object"&&(vl(e.r)&&vl(e.g)&&vl(e.b)?(t=eW(e.r,e.g,e.b),u=!0,o=String(e.r).substr(-1)==="%"?"prgb":"rgb"):vl(e.h)&&vl(e.s)&&vl(e.v)?(n=my(e.s),i=my(e.v),t=rW(e.h,n,i),u=!0,o="hsv"):vl(e.h)&&vl(e.s)&&vl(e.l)&&(n=my(e.s),a=my(e.l),t=tW(e.h,n,a),u=!0,o="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=wO(r),{ok:u,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:r}}var aW="[-\\+]?\\d+%?",sW="[-\\+]?\\d*\\.\\d+%?",Mu="(?:".concat(sW,")|(?:").concat(aW,")"),jb="[\\s|\\(]+(".concat(Mu,")[,|\\s]+(").concat(Mu,")[,|\\s]+(").concat(Mu,")\\s*\\)?"),Ub="[\\s|\\(]+(".concat(Mu,")[,|\\s]+(").concat(Mu,")[,|\\s]+(").concat(Mu,")[,|\\s]+(").concat(Mu,")\\s*\\)?"),cs={CSS_UNIT:new RegExp(Mu),rgb:new RegExp("rgb"+jb),rgba:new RegExp("rgba"+Ub),hsl:new RegExp("hsl"+jb),hsla:new RegExp("hsla"+Ub),hsv:new RegExp("hsv"+jb),hsva:new RegExp("hsva"+Ub),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 lW(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(l4[e])e=l4[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=cs.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=cs.rgba.exec(e),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=cs.hsl.exec(e),r?{h:r[1],s:r[2],l:r[3]}:(r=cs.hsla.exec(e),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=cs.hsv.exec(e),r?{h:r[1],s:r[2],v:r[3]}:(r=cs.hsva.exec(e),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=cs.hex8.exec(e),r?{r:ca(r[1]),g:ca(r[2]),b:ca(r[3]),a:sT(r[4]),format:t?"name":"hex8"}:(r=cs.hex6.exec(e),r?{r:ca(r[1]),g:ca(r[2]),b:ca(r[3]),format:t?"name":"hex"}:(r=cs.hex4.exec(e),r?{r:ca(r[1]+r[1]),g:ca(r[2]+r[2]),b:ca(r[3]+r[3]),a:sT(r[4]+r[4]),format:t?"name":"hex8"}:(r=cs.hex3.exec(e),r?{r:ca(r[1]+r[1]),g:ca(r[2]+r[2]),b:ca(r[3]+r[3]),format:t?"name":"hex"}:!1)))))))))}function vl(e){return Boolean(cs.CSS_UNIT.exec(String(e)))}var Kb=function(){function e(t,r){t===void 0&&(t=""),r===void 0&&(r={});var n;if(t instanceof e)return t;typeof t=="number"&&(t=oW(t)),this.originalInput=t;var i=ms(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=(n=r.format)!==null&&n!==void 0?n:i.format,this.gradientType=r.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(),r,n,i,a=t.r/255,u=t.g/255,o=t.b/255;return a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),u<=.03928?n=u/12.92:n=Math.pow((u+.055)/1.055,2.4),o<=.03928?i=o/12.92:i=Math.pow((o+.055)/1.055,2.4),.2126*r+.7152*n+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=wO(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=G0(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=G0(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=aT(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=aT(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),Z0(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),nW(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),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(r,", ").concat(n,")"):"rgba(".concat(t,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(r){return"".concat(Math.round(oo(r,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(r){return Math.round(oo(r,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="#"+Z0(this.r,this.g,this.b,!1),r=0,n=Object.entries(l4);r<n.length;r++){var i=n[r],a=i[0],u=i[1];if(t===u)return a}return!1},e.prototype.toString=function(t){var r=Boolean(t);t=t!=null?t:this.format;var n=!1,i=this.a<1&&this.a>=0,a=!r&&i&&(t.startsWith("hex")||t==="name");return a?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||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 r=this.toHsl();return r.l+=t/100,r.l=py(r.l),new e(r)},e.prototype.brighten=function(t){t===void 0&&(t=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),new e(r)},e.prototype.darken=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l-=t/100,r.l=py(r.l),new e(r)},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 r=this.toHsl();return r.s-=t/100,r.s=py(r.s),new e(r)},e.prototype.saturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s+=t/100,r.s=py(r.s),new e(r)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var r=this.toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,new e(r)},e.prototype.mix=function(t,r){r===void 0&&(r=50);var n=this.toRgb(),i=new e(t).toRgb(),a=r/100,u={r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a};return new e(u)},e.prototype.analogous=function(t,r){t===void 0&&(t=6),r===void 0&&(r=30);var n=this.toHsl(),i=360/r,a=[this];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,a.push(new e(n));return a},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 r=this.toHsv(),n=r.h,i=r.s,a=r.v,u=[],o=1/t;t--;)u.push(new e({h:n,s:i,v:a})),a=(a+o)%1;return u},e.prototype.splitcomplement=function(){var t=this.toHsl(),r=t.h;return[this,new e({h:(r+72)%360,s:t.s,l:t.l}),new e({h:(r+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var r=this.toRgb(),n=new e(t).toRgb(),i=r.a+n.a*(1-r.a);return new e({r:(r.r*r.a+n.r*n.a*(1-r.a))/i,g:(r.g*r.a+n.g*n.a*(1-r.a))/i,b:(r.b*r.a+n.b*n.a*(1-r.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 r=this.toHsl(),n=r.h,i=[this],a=360/t,u=1;u<t;u++)i.push(new e({h:(n+u*a)%360,s:r.s,l:r.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}(),vy=2,lT=.16,uW=.05,cW=.05,dW=.15,CO=5,SO=4,fW=[{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 uT(e){var t=e.r,r=e.g,n=e.b,i=G0(t,r,n);return{h:i.h*360,s:i.s,v:i.v}}function gy(e){var t=e.r,r=e.g,n=e.b;return"#".concat(Z0(t,r,n,!1))}function hW(e,t,r){var n=r/100,i={r:(t.r-e.r)*n+e.r,g:(t.g-e.g)*n+e.g,b:(t.b-e.b)*n+e.b};return i}function cT(e,t,r){var n;return Math.round(e.h)>=60&&Math.round(e.h)<=240?n=r?Math.round(e.h)-vy*t:Math.round(e.h)+vy*t:n=r?Math.round(e.h)+vy*t:Math.round(e.h)-vy*t,n<0?n+=360:n>=360&&(n-=360),n}function dT(e,t,r){if(e.h===0&&e.s===0)return e.s;var n;return r?n=e.s-lT*t:t===SO?n=e.s+lT:n=e.s+uW*t,n>1&&(n=1),r&&t===CO&&n>.1&&(n=.1),n<.06&&(n=.06),Number(n.toFixed(2))}function fT(e,t,r){var n;return r?n=e.v+cW*t:n=e.v-dW*t,n>1&&(n=1),Number(n.toFixed(2))}function Km(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[],n=ms(e),i=CO;i>0;i-=1){var a=uT(n),u=gy(ms({h:cT(a,i,!0),s:dT(a,i,!0),v:fT(a,i,!0)}));r.push(u)}r.push(gy(n));for(var o=1;o<=SO;o+=1){var f=uT(n),p=gy(ms({h:cT(f,o),s:dT(f,o),v:fT(f,o)}));r.push(p)}return t.theme==="dark"?fW.map(function(v){var y=v.index,w=v.opacity,k=gy(hW(ms(t.backgroundColor||"#141414"),ms(r[y]),w*100));return k}):r}var Hb={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"},Wb={},qb={};Object.keys(Hb).forEach(function(e){Wb[e]=Km(Hb[e]),Wb[e].primary=Wb[e][5],qb[e]=Km(Hb[e],{theme:"dark",backgroundColor:"#141414"}),qb[e].primary=qb[e][5]});function Lo(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Jc(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var r=t;r;){if(r===e)return!0;r=r.parentNode}return!1}var hT="data-rc-order",pW="rc-util-key",u4=new Map;function EO(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):pW}function ax(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function mW(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function kO(e){return Array.from((u4.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function TO(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Lo())return null;var r=t.csp,n=t.prepend,i=document.createElement("style");i.setAttribute(hT,mW(n)),r!=null&&r.nonce&&(i.nonce=r==null?void 0:r.nonce),i.innerHTML=e;var a=ax(t),u=a.firstChild;if(n){if(n==="queue"){var o=kO(a).filter(function(f){return["prepend","prependQueue"].includes(f.getAttribute(hT))});if(o.length)return a.insertBefore(i,o[o.length-1].nextSibling),i}a.insertBefore(i,u)}else a.appendChild(i);return i}function PO(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=ax(t);return kO(r).find(function(n){return n.getAttribute(EO(t))===e})}function pT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=PO(e,t);if(r){var n=ax(t);n.removeChild(r)}}function vW(e,t){var r=u4.get(e);if(!r||!Jc(document,r)){var n=TO("",t),i=n.parentNode;u4.set(e,i),e.removeChild(n)}}function vv(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=ax(r);vW(n,r);var i=PO(t,r);if(i){var a,u;if((a=r.csp)!==null&&a!==void 0&&a.nonce&&i.nonce!==((u=r.csp)===null||u===void 0?void 0:u.nonce)){var o;i.nonce=(o=r.csp)===null||o===void 0?void 0:o.nonce}return i.innerHTML!==e&&(i.innerHTML=e),i}var f=TO(e,r);return f.setAttribute(EO(r),t),f}function gW(e,t){Bn(e,"[@ant-design/icons] ".concat(t))}function mT(e){return ar(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(ar(e.icon)==="object"||typeof e.icon=="function")}function vT(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,r){var n=e[r];switch(r){case"class":t.className=n,delete t.class;break;default:t[r]=n}return t},{})}function c4(e,t,r){return r?tn.createElement(e.tag,ve(ve({key:t},vT(e.attrs)),r),(e.children||[]).map(function(n,i){return c4(n,"".concat(t,"-").concat(e.tag,"-").concat(i))})):tn.createElement(e.tag,ve({key:t},vT(e.attrs)),(e.children||[]).map(function(n,i){return c4(n,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function MO(e){return Km(e)[0]}function IO(e){return e?Array.isArray(e)?e:[e]:[]}var yW=`
.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);
}
}
`,xW=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yW,r=C.exports.useContext(V3),n=r.csp;C.exports.useEffect(function(){vv(t,"@ant-design-icons",{prepend:!0,csp:n})},[])},_W=["icon","className","onClick","style","primaryColor","secondaryColor"],mm={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function bW(e){var t=e.primaryColor,r=e.secondaryColor;mm.primaryColor=t,mm.secondaryColor=r||MO(t),mm.calculated=!!r}function wW(){return ve({},mm)}var sx=function(t){var r=t.icon,n=t.className,i=t.onClick,a=t.style,u=t.primaryColor,o=t.secondaryColor,f=Mr(t,_W),p=mm;if(u&&(p={primaryColor:u,secondaryColor:o||MO(u)}),xW(),gW(mT(r),"icon should be icon definiton, but got ".concat(r)),!mT(r))return null;var v=r;return v&&typeof v.icon=="function"&&(v=ve(ve({},v),{},{icon:v.icon(p.primaryColor,p.secondaryColor)})),c4(v.icon,"svg-".concat(v.name),ve({className:n,onClick:i,style:a,"data-icon":v.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},f))};sx.displayName="IconReact";sx.getTwoToneColors=wW;sx.setTwoToneColors=bW;const Z3=sx;function RO(e){var t=IO(e),r=Le(t,2),n=r[0],i=r[1];return Z3.setTwoToneColors({primaryColor:n,secondaryColor:i})}function CW(){var e=Z3.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var SW=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];RO("#1890ff");var lx=C.exports.forwardRef(function(e,t){var r,n=e.className,i=e.icon,a=e.spin,u=e.rotate,o=e.tabIndex,f=e.onClick,p=e.twoToneColor,v=Mr(e,SW),y=C.exports.useContext(V3),w=y.prefixCls,k=w===void 0?"anticon":w,T=y.rootClassName,R=Qe(T,k,(r={},se(r,"".concat(k,"-").concat(i.name),!!i.name),se(r,"".concat(k,"-spin"),!!a||i.name==="loading"),r),n),A=o;A===void 0&&f&&(A=-1);var I=u?{msTransform:"rotate(".concat(u,"deg)"),transform:"rotate(".concat(u,"deg)")}:void 0,O=IO(p),N=Le(O,2),L=N[0],B=N[1];return S("span",{...ve(ve({role:"img","aria-label":i.name},v),{},{ref:t,tabIndex:A,onClick:f,className:R}),children:S(Z3,{icon:i,primaryColor:L,secondaryColor:B,style:I})})});lx.displayName="AntdIcon";lx.getTwoToneColor=CW;lx.setTwoToneColor=RO;const dn=lx;var OO=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:YH})})};OO.displayName="CheckCircleFilled";const ux=C.exports.forwardRef(OO);var EW={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 kW=EW;var AO=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:kW})})};AO.displayName="CloseCircleFilled";const gd=C.exports.forwardRef(AO);var TW={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 PW=TW;var NO=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:PW})})};NO.displayName="ExclamationCircleFilled";const cx=C.exports.forwardRef(NO);var MW={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 IW=MW;var zO=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:IW})})};zO.displayName="InfoCircleFilled";const DO=C.exports.forwardRef(zO);var RW={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 OW=RW;var LO=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:OW})})};LO.displayName="LoadingOutlined";const Wf=C.exports.forwardRef(LO);var gv=ve({},Dj),AW=gv.version,NW=gv.render,zW=gv.unmountComponentAtNode,dx;try{var DW=Number((AW||"").split(".")[0]);DW>=18&&(dx=gv.createRoot)}catch{}function gT(e){var t=gv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&ar(t)==="object"&&(t.usingClientEntryPoint=e)}var X0="__rc_react_root__";function LW(e,t){gT(!0);var r=t[X0]||dx(t);gT(!1),r.render(e),t[X0]=r}function FW(e,t){NW(e,t)}function FO(e,t){if(dx){LW(e,t);return}FW(e,t)}function $W(e){return d4.apply(this,arguments)}function d4(){return d4=vd(Do().mark(function e(t){return Do().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",Promise.resolve().then(function(){var i;(i=t[X0])===null||i===void 0||i.unmount(),delete t[X0]}));case 1:case"end":return n.stop()}},e)})),d4.apply(this,arguments)}function BW(e){zW(e)}function $O(e){return f4.apply(this,arguments)}function f4(){return f4=vd(Do().mark(function e(t){return Do().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(dx===void 0){n.next=2;break}return n.abrupt("return",$W(t));case 2:BW(t);case 3:case"end":return n.stop()}},e)})),f4.apply(this,arguments)}function yT(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit".concat(e)]="webkit".concat(t),r["Moz".concat(e)]="moz".concat(t),r["ms".concat(e)]="MS".concat(t),r["O".concat(e)]="o".concat(t.toLowerCase()),r}function VW(e,t){var r={animationend:yT("Animation","AnimationEnd"),transitionend:yT("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete r.animationend.animation,"TransitionEvent"in t||delete r.transitionend.transition),r}var jW=VW(Lo(),typeof window<"u"?window:{}),BO={};if(Lo()){var UW=document.createElement("div");BO=UW.style}var yy={};function VO(e){if(yy[e])return yy[e];var t=jW[e];if(t)for(var r=Object.keys(t),n=r.length,i=0;i<n;i+=1){var a=r[i];if(Object.prototype.hasOwnProperty.call(t,a)&&a in BO)return yy[e]=t[a],yy[e]}return""}var jO=VO("animationend"),UO=VO("transitionend"),KO=!!(jO&&UO),xT=jO||"animationend",_T=UO||"transitionend";function bT(e,t){if(!e)return null;if(ar(e)==="object"){var r=t.replace(/-\w/g,function(n){return n[1].toUpperCase()});return e[r]}return"".concat(e,"-").concat(t)}var lf="none",xy="appear",_y="enter",by="leave",wT="none",bl="prepare",wf="start",Cf="active",X3="end";function Hs(e){var t=C.exports.useRef(!1),r=C.exports.useState(e),n=Le(r,2),i=n[0],a=n[1];C.exports.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]);function u(o,f){f&&t.current||a(o)}return[i,u]}var HO=function(t){return+setTimeout(t,16)},WO=function(t){return clearTimeout(t)};typeof window<"u"&&"requestAnimationFrame"in window&&(HO=function(t){return window.requestAnimationFrame(t)},WO=function(t){return window.cancelAnimationFrame(t)});var CT=0,Y3=new Map;function qO(e){Y3.delete(e)}var rn=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;CT+=1;var n=CT;function i(a){if(a===0)qO(n),t();else{var u=HO(function(){i(a-1)});Y3.set(n,u)}}return i(r),n};rn.cancel=function(e){var t=Y3.get(e);return qO(t),WO(t)};const KW=function(){var e=C.exports.useRef(null);function t(){rn.cancel(e.current)}function r(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var a=rn(function(){i<=1?n({isCanceled:function(){return a!==e.current}}):r(n,i-1)});e.current=a}return C.exports.useEffect(function(){return function(){t()}},[]),[r,t]};var GO=Lo()?C.exports.useLayoutEffect:C.exports.useEffect,ST=[bl,wf,Cf,X3],ZO=!1,HW=!0;function XO(e){return e===Cf||e===X3}const WW=function(e,t){var r=Hs(wT),n=Le(r,2),i=n[0],a=n[1],u=KW(),o=Le(u,2),f=o[0],p=o[1];function v(){a(bl,!0)}return GO(function(){if(i!==wT&&i!==X3){var y=ST.indexOf(i),w=ST[y+1],k=t(i);k===ZO?a(w,!0):f(function(T){function R(){T.isCanceled()||a(w,!0)}k===!0?R():Promise.resolve(k).then(R)})}},[e,i]),C.exports.useEffect(function(){return function(){p()}},[]),[v,i]},qW=function(e){var t=C.exports.useRef(),r=C.exports.useRef(e);r.current=e;var n=C.exports.useCallback(function(u){r.current(u)},[]);function i(u){u&&(u.removeEventListener(_T,n),u.removeEventListener(xT,n))}function a(u){t.current&&t.current!==u&&i(t.current),u&&u!==t.current&&(u.addEventListener(_T,n),u.addEventListener(xT,n),t.current=u)}return C.exports.useEffect(function(){return function(){i(t.current)}},[]),[a,i]};function GW(e,t,r,n){var i=n.motionEnter,a=i===void 0?!0:i,u=n.motionAppear,o=u===void 0?!0:u,f=n.motionLeave,p=f===void 0?!0:f,v=n.motionDeadline,y=n.motionLeaveImmediately,w=n.onAppearPrepare,k=n.onEnterPrepare,T=n.onLeavePrepare,R=n.onAppearStart,A=n.onEnterStart,I=n.onLeaveStart,O=n.onAppearActive,N=n.onEnterActive,L=n.onLeaveActive,B=n.onAppearEnd,j=n.onEnterEnd,G=n.onLeaveEnd,H=n.onVisibleChanged,te=Hs(),Y=Le(te,2),le=Y[0],J=Y[1],Z=Hs(lf),Q=Le(Z,2),ge=Q[0],ne=Q[1],de=Hs(null),oe=Le(de,2),ye=oe[0],Re=oe[1],Te=C.exports.useRef(!1),ke=C.exports.useRef(null);function ze(){return r()}var Ie=C.exports.useRef(!1);function Ne(Ct){var Dt=ze();if(!(Ct&&!Ct.deadline&&Ct.target!==Dt)){var lt=Ie.current,dt;ge===xy&&lt?dt=B==null?void 0:B(Dt,Ct):ge===_y&&lt?dt=j==null?void 0:j(Dt,Ct):ge===by&&lt&&(dt=G==null?void 0:G(Dt,Ct)),ge!==lf&&lt&&dt!==!1&&(ne(lf,!0),Re(null,!0))}}var De=qW(Ne),Ve=Le(De,1),Ge=Ve[0],je=C.exports.useMemo(function(){var Ct,Dt,lt;switch(ge){case xy:return Ct={},se(Ct,bl,w),se(Ct,wf,R),se(Ct,Cf,O),Ct;case _y:return Dt={},se(Dt,bl,k),se(Dt,wf,A),se(Dt,Cf,N),Dt;case by:return lt={},se(lt,bl,T),se(lt,wf,I),se(lt,Cf,L),lt;default:return{}}},[ge]),ct=WW(ge,function(Ct){if(Ct===bl){var Dt=je[bl];return Dt?Dt(ze()):ZO}if(Ye in je){var lt;Re(((lt=je[Ye])===null||lt===void 0?void 0:lt.call(je,ze(),null))||null)}return Ye===Cf&&(Ge(ze()),v>0&&(clearTimeout(ke.current),ke.current=setTimeout(function(){Ne({deadline:!0})},v))),HW}),pt=Le(ct,2),Tt=pt[0],Ye=pt[1],Pt=XO(Ye);Ie.current=Pt,GO(function(){J(t);var Ct=Te.current;if(Te.current=!0,!!e){var Dt;!Ct&&t&&o&&(Dt=xy),Ct&&t&&a&&(Dt=_y),(Ct&&!t&&p||!Ct&&y&&!t&&p)&&(Dt=by),Dt&&(ne(Dt),Tt())}},[t]),C.exports.useEffect(function(){(ge===xy&&!o||ge===_y&&!a||ge===by&&!p)&&ne(lf)},[o,a,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===lf&&((mt.current||le)&&(H==null||H(le)),mt.current=!0)},[le,ge]);var It=ye;return je[bl]&&Ye===wf&&(It=ve({transition:"none"},It)),[ge,Ye,It,le!=null?le:t]}var ZW=function(e){vi(r,e);var t=gi(r);function r(){return Qn(this,r),t.apply(this,arguments)}return Jn(r,[{key:"render",value:function(){return this.props.children}}]),r}(C.exports.Component);function XW(e){var t=e;ar(e)==="object"&&(t=e.transitionSupport);function r(i){return!!(i.motionName&&t)}var n=C.exports.forwardRef(function(i,a){var u=i.visible,o=u===void 0?!0:u,f=i.removeOnLeave,p=f===void 0?!0:f,v=i.forceRender,y=i.children,w=i.motionName,k=i.leavedClassName,T=i.eventProps,R=r(i),A=C.exports.useRef(),I=C.exports.useRef();function O(){try{return A.current instanceof HTMLElement?A.current:jm(I.current)}catch{return null}}var N=GW(R,o,O,i),L=Le(N,4),B=L[0],j=L[1],G=L[2],H=L[3],te=C.exports.useRef(H);H&&(te.current=!0);var Y=C.exports.useCallback(function(de){A.current=de,H0(a,de)},[a]),le,J=ve(ve({},T),{},{visible:o});if(!y)le=null;else if(B===lf||!r(i))H?le=y(ve({},J),Y):!p&&te.current&&k?le=y(ve(ve({},J),{},{className:k}),Y):v||!p&&!k?le=y(ve(ve({},J),{},{style:{display:"none"}}),Y):le=null;else{var Z,Q;j===bl?Q="prepare":XO(j)?Q="active":j===wf&&(Q="start"),le=y(ve(ve({},J),{},{className:Qe(bT(w,B),(Z={},se(Z,bT(w,"".concat(B,"-").concat(Q)),Q),se(Z,w,typeof w=="string"),Z)),style:G}),Y)}if(C.exports.isValidElement(le)&&md(le)){var ge=le,ne=ge.ref;ne||(le=C.exports.cloneElement(le,{ref:Y}))}return S(ZW,{ref:I,children:le})});return n.displayName="CSSMotion",n}const Za=XW(KO);var h4="add",p4="keep",m4="remove",Gb="removed";function YW(e){var t;return e&&ar(e)==="object"&&"key"in e?t=e:t={key:e},ve(ve({},t),{},{key:String(t.key)})}function v4(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(YW)}function QW(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=[],n=0,i=t.length,a=v4(e),u=v4(t);a.forEach(function(p){for(var v=!1,y=n;y<i;y+=1){var w=u[y];if(w.key===p.key){n<y&&(r=r.concat(u.slice(n,y).map(function(k){return ve(ve({},k),{},{status:h4})})),n=y),r.push(ve(ve({},w),{},{status:p4})),n+=1,v=!0;break}}v||r.push(ve(ve({},p),{},{status:m4}))}),n<i&&(r=r.concat(u.slice(n).map(function(p){return ve(ve({},p),{},{status:h4})})));var o={};r.forEach(function(p){var v=p.key;o[v]=(o[v]||0)+1});var f=Object.keys(o).filter(function(p){return o[p]>1});return f.forEach(function(p){r=r.filter(function(v){var y=v.key,w=v.status;return y!==p||w!==m4}),r.forEach(function(v){v.key===p&&(v.status=p4)})}),r}var JW=["component","children","onVisibleChanged","onAllRemoved"],eq=["status"],tq=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function rq(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Za,r=function(n){vi(a,n);var i=gi(a);function a(){var u;Qn(this,a);for(var o=arguments.length,f=new Array(o),p=0;p<o;p++)f[p]=arguments[p];return u=i.call.apply(i,[this].concat(f)),se(Nr(u),"state",{keyEntities:[]}),se(Nr(u),"removeKey",function(v){var y=u.state.keyEntities,w=y.map(function(k){return k.key!==v?k:ve(ve({},k),{},{status:Gb})});return u.setState({keyEntities:w}),w.filter(function(k){var T=k.status;return T!==Gb}).length}),u}return Jn(a,[{key:"render",value:function(){var o=this,f=this.state.keyEntities,p=this.props,v=p.component,y=p.children,w=p.onVisibleChanged,k=p.onAllRemoved,T=Mr(p,JW),R=v||C.exports.Fragment,A={};return tq.forEach(function(I){A[I]=T[I],delete T[I]}),delete T.keys,S(R,{...T,children:f.map(function(I){var O=I.status,N=Mr(I,eq),L=O===h4||O===p4;return C.exports.createElement(t,{...A,key:N.key,visible:L,eventProps:N,onVisibleChanged:function(j){if(w==null||w(j,{key:N.key}),!j){var G=o.removeKey(N.key);G===0&&k&&k()}}},y)})})}}],[{key:"getDerivedStateFromProps",value:function(o,f){var p=o.keys,v=f.keyEntities,y=v4(p),w=QW(v,y);return{keyEntities:w.filter(function(k){var T=v.find(function(R){var A=R.key;return k.key===A});return!(T&&T.status===Gb&&k.status===m4)})}}}]),a}(C.exports.Component);return se(r,"defaultProps",{component:"div"}),r}const YO=rq(KO);var Q3=function(e){vi(r,e);var t=gi(r);function r(){var n;Qn(this,r);for(var i=arguments.length,a=new Array(i),u=0;u<i;u++)a[u]=arguments[u];return n=t.call.apply(t,[this].concat(a)),n.closeTimer=null,n.close=function(o){o&&o.stopPropagation(),n.clearCloseTimer();var f=n.props,p=f.onClose,v=f.noticeKey;p&&p(v)},n.startCloseTimer=function(){n.props.duration&&(n.closeTimer=window.setTimeout(function(){n.close()},n.props.duration*1e3))},n.clearCloseTimer=function(){n.closeTimer&&(clearTimeout(n.closeTimer),n.closeTimer=null)},n}return Jn(r,[{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,a=this.props,u=a.prefixCls,o=a.className,f=a.closable,p=a.closeIcon,v=a.style,y=a.onClick,w=a.children,k=a.holder,T="".concat(u,"-notice"),R=Object.keys(this.props).reduce(function(I,O){return(O.substr(0,5)==="data-"||O.substr(0,5)==="aria-"||O==="role")&&(I[O]=i.props[O]),I},{}),A=Xe("div",{className:Qe(T,o,se({},"".concat(T,"-closable"),f)),style:v,onMouseEnter:this.clearCloseTimer,onMouseLeave:this.startCloseTimer,onClick:y,...R,children:[S("div",{className:"".concat(T,"-content"),children:w}),f?S("a",{tabIndex:0,onClick:this.close,className:"".concat(T,"-close"),children:p||S("span",{className:"".concat(T,"-close-x")})}):null]});return k?ad.createPortal(A,k):A}}]),r}(C.exports.Component);Q3.defaultProps={onClose:function(){},duration:1.5};function J3(e){var t=C.exports.useRef({}),r=C.exports.useState([]),n=Le(r,2),i=n[0],a=n[1];function u(o){var f=!0;e.add(o,function(p,v){var y=v.key;if(p&&(!t.current[y]||f)){var w=S(Q3,{...v,holder:p});t.current[y]=w,a(function(k){var T=k.findIndex(function(A){return A.key===v.key});if(T===-1)return[].concat(wt(k),[w]);var R=wt(k);return R[T]=w,R})}f=!1})}return[u,S(Ar,{children:i})]}var nq=["getContainer"],ET=0,iq=Date.now();function kT(){var e=ET;return ET+=1,"rcNotification_".concat(iq,"_").concat(e)}var qf=function(e){vi(r,e);var t=gi(r);function r(){var n;Qn(this,r);for(var i=arguments.length,a=new Array(i),u=0;u<i;u++)a[u]=arguments[u];return n=t.call.apply(t,[this].concat(a)),n.state={notices:[]},n.hookRefs=new Map,n.add=function(o,f){var p,v=(p=o.key)!==null&&p!==void 0?p:kT(),y=ve(ve({},o),{},{key:v}),w=n.props.maxCount;n.setState(function(k){var T=k.notices,R=T.map(function(I){return I.notice.key}).indexOf(v),A=T.concat();return R!==-1?A.splice(R,1,{notice:y,holderCallback:f}):(w&&T.length>=w&&(y.key=A[0].notice.key,y.updateMark=kT(),y.userPassKey=v,A.shift()),A.push({notice:y,holderCallback:f})),{notices:A}})},n.remove=function(o){n.setState(function(f){var p=f.notices;return{notices:p.filter(function(v){var y=v.notice,w=y.key,k=y.userPassKey,T=k!=null?k:w;return T!==o})}})},n.noticePropsMap={},n}return Jn(r,[{key:"getTransitionName",value:function(){var i=this.props,a=i.prefixCls,u=i.animation,o=this.props.transitionName;return!o&&u&&(o="".concat(a,"-").concat(u)),o}},{key:"render",value:function(){var i=this,a=this.state.notices,u=this.props,o=u.prefixCls,f=u.className,p=u.closeIcon,v=u.style,y=[];return a.forEach(function(w,k){var T=w.notice,R=w.holderCallback,A=k===a.length-1?T.updateMark:void 0,I=T.key,O=T.userPassKey,N=ve(ve(ve({prefixCls:o,closeIcon:p},T),T.props),{},{key:I,noticeKey:O||I,updateMark:A,onClose:function(B){var j;i.remove(B),(j=T.onClose)===null||j===void 0||j.call(T)},onClick:T.onClick,children:T.content});y.push(I),i.noticePropsMap[I]={props:N,holderCallback:R}}),S("div",{className:Qe(o,f),style:v,children:S(YO,{keys:y,motionName:this.getTransitionName(),onVisibleChanged:function(k,T){var R=T.key;k||delete i.noticePropsMap[R]},children:function(w){var k=w.key,T=w.className,R=w.style,A=w.visible,I=i.noticePropsMap[k],O=I.props,N=I.holderCallback;return N?S("div",{className:Qe(T,"".concat(o,"-hook-holder")),style:ve({},R),ref:function(B){typeof k>"u"||(B?(i.hookRefs.set(k,B),N(B,O)):i.hookRefs.delete(k))}},k):S(Q3,{...O,className:Qe(T,O==null?void 0:O.className),style:ve(ve({},R),O==null?void 0:O.style),visible:A})}})})}}]),r}(C.exports.Component);qf.newInstance=void 0;qf.defaultProps={prefixCls:"rc-notification",animation:"fade",style:{top:65,left:"50%"}};qf.newInstance=function(t,r){var n=t||{},i=n.getContainer,a=Mr(n,nq),u=document.createElement("div");if(i){var o=i();o.appendChild(u)}else document.body.appendChild(u);var f=!1;function p(v){f||(f=!0,r({notice:function(w){v.add(w)},removeNotice:function(w){v.remove(w)},component:v,destroy:function(){$O(u),u.parentNode&&u.parentNode.removeChild(u)},useNotification:function(){return J3(v)}}))}FO(S(qf,{...a,ref:p}),u)};function oq(e,t){var r=function(){var i,a,u=null,o={add:function(R,A){u==null||u.component.add(R,A)}},f=J3(o),p=Le(f,2),v=p[0],y=p[1];function w(T){var R=T.prefixCls,A=i("message",R),I=i(),O=T.key||oA(),N=new Promise(function(B){var j=function(){return typeof T.onClose=="function"&&T.onClose(),B(!0)};e(tt(tt({},T),{prefixCls:A,rootPrefixCls:I,getPopupContainer:a}),function(G){var H=G.prefixCls,te=G.instance;u=te,v(t(tt(tt({},T),{key:O,onClose:j}),H))})}),L=function(){u&&u.removeNotice(O)};return L.then=function(B,j){return N.then(B,j)},L.promise=N,L}var k=C.exports.useRef({});return k.current.open=w,lA.forEach(function(T){return cA(k.current,T)}),[k.current,S(rc,{children:function(T){return i=T.getPrefixCls,a=T.getPopupContainer,y}},"holder")]};return r}var Oo,QO=3,JO,aq=1,eA="",g4="move-up",tA=!1,rA,nA,iA=!1;function oA(){return aq++}function sq(e){e.top!==void 0&&(JO=e.top,Oo=null),e.duration!==void 0&&(QO=e.duration),e.prefixCls!==void 0&&(eA=e.prefixCls),e.getContainer!==void 0&&(rA=e.getContainer,Oo=null),e.transitionName!==void 0&&(g4=e.transitionName,Oo=null,tA=!0),e.maxCount!==void 0&&(nA=e.maxCount,Oo=null),e.rtl!==void 0&&(iA=e.rtl)}function aA(e,t){var r=e.prefixCls,n=e.getPopupContainer,i=nS(),a=i.getPrefixCls,u=i.getRootPrefixCls,o=i.getIconPrefixCls,f=a("message",r||eA),p=u(e.rootPrefixCls,f),v=o();if(Oo){t({prefixCls:f,rootPrefixCls:p,iconPrefixCls:v,instance:Oo});return}var y={prefixCls:f,transitionName:tA?g4:"".concat(p,"-").concat(g4),style:{top:JO},getContainer:rA||n,maxCount:nA};qf.newInstance(y,function(w){if(Oo){t({prefixCls:f,rootPrefixCls:p,iconPrefixCls:v,instance:Oo});return}Oo=w,t({prefixCls:f,rootPrefixCls:p,iconPrefixCls:v,instance:w})})}var sA={info:DO,success:ux,error:gd,warning:cx,loading:Wf},lA=Object.keys(sA);function uA(e,t,r){var n,i=e.duration!==void 0?e.duration:QO,a=sA[e.type],u=Qe("".concat(t,"-custom-content"),(n={},se(n,"".concat(t,"-").concat(e.type),e.type),se(n,"".concat(t,"-rtl"),iA===!0),n));return{key:e.key,duration:i,style:e.style||{},className:e.className,content:S(mh,{iconPrefixCls:r,children:Xe("div",{className:u,children:[e.icon||a&&S(a,{}),S("span",{children:e.content})]})}),onClose:e.onClose,onClick:e.onClick}}function lq(e){var t=e.key||oA(),r=new Promise(function(i){var a=function(){return typeof e.onClose=="function"&&e.onClose(),i(!0)};aA(e,function(u){var o=u.prefixCls,f=u.iconPrefixCls,p=u.instance;p.notice(uA(tt(tt({},e),{key:t,onClose:a}),o,f))})}),n=function(){var a;Oo&&(Oo.removeNotice(t),(a=e.onClose)===null||a===void 0||a.call(e))};return n.then=function(i,a){return r.then(i,a)},n.promise=r,n}function uq(e){return Object.prototype.toString.call(e)==="[object Object]"&&!!e.content}var Hm={open:lq,config:sq,destroy:function(t){if(Oo)if(t){var r=Oo,n=r.removeNotice;n(t)}else{var i=Oo,a=i.destroy;a(),Oo=null}}};function cA(e,t){e[t]=function(r,n,i){return uq(r)?e.open(tt(tt({},r),{type:t})):(typeof n=="function"&&(i=n,n=void 0),e.open({content:r,duration:n,type:t,onClose:i}))}}lA.forEach(function(e){return cA(Hm,e)});Hm.warn=Hm.warning;Hm.useMessage=oq(aA,uA);const cq=Hm;var dq={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 fq=dq;var dA=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:fq})})};dA.displayName="CheckCircleOutlined";const eS=C.exports.forwardRef(dA);var hq={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 pq=hq;var fA=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:pq})})};fA.displayName="CloseCircleOutlined";const tS=C.exports.forwardRef(fA);var mq={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 vq=mq;var hA=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:vq})})};hA.displayName="CloseOutlined";const fx=C.exports.forwardRef(hA);var gq={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 yq=gq;var pA=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:yq})})};pA.displayName="ExclamationCircleOutlined";const hx=C.exports.forwardRef(pA);var xq={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 _q=xq;var mA=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:_q})})};mA.displayName="InfoCircleOutlined";const rS=C.exports.forwardRef(mA);function bq(e,t){var r=function(){var i,a=null,u={add:function(T,R){a==null||a.component.add(T,R)}},o=J3(u),f=Le(o,2),p=f[0],v=f[1];function y(k){var T=k.prefixCls,R=i("notification",T);e(tt(tt({},k),{prefixCls:R}),function(A){var I=A.prefixCls,O=A.instance;a=O,p(t(k,I))})}var w=C.exports.useRef({});return w.current.open=y,["success","info","warning","error"].forEach(function(k){w.current[k]=function(T){return w.current.open(tt(tt({},T),{type:k}))}}),[w.current,S(rc,{children:function(k){return i=k.getPrefixCls,v}},"holder")]};return r}globalThis&&globalThis.__awaiter;var Vc={},vA=4.5,gA=24,yA=24,xA="",y4="topRight",_A,bA,wA=!1,CA;function wq(e){var t=e.duration,r=e.placement,n=e.bottom,i=e.top,a=e.getContainer,u=e.closeIcon,o=e.prefixCls;o!==void 0&&(xA=o),t!==void 0&&(vA=t),r!==void 0?y4=r:e.rtl&&(y4="topLeft"),n!==void 0&&(yA=n),i!==void 0&&(gA=i),a!==void 0&&(_A=a),u!==void 0&&(bA=u),e.rtl!==void 0&&(wA=e.rtl),e.maxCount!==void 0&&(CA=e.maxCount)}function Cq(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gA,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yA,n;switch(e){case"top":n={left:"50%",transform:"translateX(-50%)",right:"auto",top:t,bottom:"auto"};break;case"topLeft":n={left:0,top:t,bottom:"auto"};break;case"topRight":n={right:0,top:t,bottom:"auto"};break;case"bottom":n={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:r};break;case"bottomLeft":n={left:0,top:"auto",bottom:r};break;default:n={right:0,top:"auto",bottom:r};break}return n}function SA(e,t){var r=e.placement,n=r===void 0?y4:r,i=e.top,a=e.bottom,u=e.getContainer,o=u===void 0?_A:u,f=e.prefixCls,p=nS(),v=p.getPrefixCls,y=p.getIconPrefixCls,w=v("notification",f||xA),k=y(),T="".concat(w,"-").concat(n),R=Vc[T];if(R){Promise.resolve(R).then(function(I){t({prefixCls:"".concat(w,"-notice"),iconPrefixCls:k,instance:I})});return}var A=Qe("".concat(w,"-").concat(n),se({},"".concat(w,"-rtl"),wA===!0));Vc[T]=new Promise(function(I){qf.newInstance({prefixCls:w,className:A,style:Cq(n,i,a),getContainer:o,maxCount:CA},function(O){I(O),t({prefixCls:"".concat(w,"-notice"),iconPrefixCls:k,instance:O})})})}var Sq={success:eS,info:rS,error:tS,warning:hx};function EA(e,t,r){var n=e.duration,i=e.icon,a=e.type,u=e.description,o=e.message,f=e.btn,p=e.onClose,v=e.onClick,y=e.key,w=e.style,k=e.className,T=e.closeIcon,R=T===void 0?bA:T,A=e.props,I=n===void 0?vA:n,O=null;i?O=S("span",{className:"".concat(t,"-icon"),children:e.icon}):a&&(O=C.exports.createElement(Sq[a]||null,{className:"".concat(t,"-icon ").concat(t,"-icon-").concat(a)}));var N=S("span",{className:"".concat(t,"-close-x"),children:R||S(fx,{className:"".concat(t,"-close-icon")})}),L=!u&&O?S("span",{className:"".concat(t,"-message-single-line-auto-margin")}):null;return{content:S(mh,{iconPrefixCls:r,children:Xe("div",{className:O?"".concat(t,"-with-icon"):"",role:"alert",children:[O,Xe("div",{className:"".concat(t,"-message"),children:[L,o]}),S("div",{className:"".concat(t,"-description"),children:u}),f?S("span",{className:"".concat(t,"-btn"),children:f}):null]})}),duration:I,closable:!0,closeIcon:N,onClose:p,onClick:v,key:y,style:w||{},className:Qe(k,se({},"".concat(t,"-").concat(a),!!a)),props:A}}function Eq(e){SA(e,function(t){var r=t.prefixCls,n=t.iconPrefixCls,i=t.instance;i.notice(EA(e,r,n))})}var Gf={open:Eq,close:function(t){Object.keys(Vc).forEach(function(r){return Promise.resolve(Vc[r]).then(function(n){n.removeNotice(t)})})},config:wq,destroy:function(){Object.keys(Vc).forEach(function(t){Promise.resolve(Vc[t]).then(function(r){r.destroy()}),delete Vc[t]})}};["success","info","warning","error"].forEach(function(e){Gf[e]=function(t){return Gf.open(tt(tt({},t),{type:e}))}});Gf.warn=Gf.warning;Gf.useNotification=bq(SA,EA);const kq=Gf;var Tq=function(t,r){return r||(t?"ant-".concat(t):"ant")},zr=C.exports.createContext({getPrefixCls:Tq}),rc=zr.Consumer,Pq="-ant-".concat(Date.now(),"-").concat(Math.random());function Mq(e,t){var r={},n=function(v,y){var w=v.clone();return w=(y==null?void 0:y(w))||w,w.toRgbString()},i=function(v,y){var w=new Kb(v),k=Km(w.toRgbString());r["".concat(y,"-color")]=n(w),r["".concat(y,"-color-disabled")]=k[1],r["".concat(y,"-color-hover")]=k[4],r["".concat(y,"-color-active")]=k[6],r["".concat(y,"-color-outline")]=w.clone().setAlpha(.2).toRgbString(),r["".concat(y,"-color-deprecated-bg")]=k[0],r["".concat(y,"-color-deprecated-border")]=k[2]};if(t.primaryColor){i(t.primaryColor,"primary");var a=new Kb(t.primaryColor),u=Km(a.toRgbString());u.forEach(function(p,v){r["primary-".concat(v+1)]=p}),r["primary-color-deprecated-l-35"]=n(a,function(p){return p.lighten(35)}),r["primary-color-deprecated-l-20"]=n(a,function(p){return p.lighten(20)}),r["primary-color-deprecated-t-20"]=n(a,function(p){return p.tint(20)}),r["primary-color-deprecated-t-50"]=n(a,function(p){return p.tint(50)}),r["primary-color-deprecated-f-12"]=n(a,function(p){return p.setAlpha(p.getAlpha()*.12)});var o=new Kb(u[0]);r["primary-color-active-deprecated-f-30"]=n(o,function(p){return p.setAlpha(p.getAlpha()*.3)}),r["primary-color-active-deprecated-d-02"]=n(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 f=Object.keys(r).map(function(p){return"--".concat(e,"-").concat(p,": ").concat(r[p],";")});return`
:root {
`.concat(f.join(`
`),`
}
`).trim()}function Iq(e,t){var r=Mq(e,t);Lo()&&vv(r,"".concat(Pq,"-dynamic-theme"))}var x4=C.exports.createContext(!1),kA=function(t){var r=t.children,n=t.disabled,i=C.exports.useContext(x4);return S(x4.Provider,{value:n!=null?n:i,children:r})};const nc=x4;var _4=C.exports.createContext(void 0),TA=function(t){var r=t.children,n=t.size;return S(_4.Consumer,{children:function(i){return S(_4.Provider,{value:n||i,children:r})}})};const Gs=_4;var Rq=["getTargetContainer","getPopupContainer","renderEmpty","pageHeader","input","pagination","form"],Oq="ant",Aq="anticon",Y0,PA;function i0(){return Y0||Oq}function Nq(){return PA||Aq}var zq=function(t){var r=t.prefixCls,n=t.iconPrefixCls,i=t.theme;r!==void 0&&(Y0=r),n!==void 0&&(PA=n),i&&Iq(i0(),i)},nS=function(){return{getPrefixCls:function(r,n){return n||(r?"".concat(i0(),"-").concat(r):i0())},getIconPrefixCls:Nq,getRootPrefixCls:function(r,n){return r||Y0||(n&&n.includes("-")?n.replace(/^(.*)-[^-]*$/,"$1"):i0())}}},Dq=function(t){var r,n,i=t.children,a=t.csp,u=t.autoInsertSpaceInButton,o=t.form,f=t.locale,p=t.componentSize,v=t.direction,y=t.space,w=t.virtual,k=t.dropdownMatchSelectWidth,T=t.legacyLocale,R=t.parentContext,A=t.iconPrefixCls,I=t.componentDisabled,O=C.exports.useCallback(function(H,te){var Y=t.prefixCls;if(te)return te;var le=Y||R.getPrefixCls("");return H?"".concat(le,"-").concat(H):le},[R.getPrefixCls,t.prefixCls]),N=tt(tt({},R),{csp:a,autoInsertSpaceInButton:u,locale:f||T,direction:v,space:y,virtual:w,dropdownMatchSelectWidth:k,getPrefixCls:O});Rq.forEach(function(H){var te=t[H];te&&(N[H]=te)});var L=hv(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:A,csp:a}},[A,a]),j=i,G={};return f&&(G=((r=f.Form)===null||r===void 0?void 0:r.defaultValidateMessages)||((n=zl.Form)===null||n===void 0?void 0:n.defaultValidateMessages)||{}),o&&o.validateMessages&&(G=tt(tt({},G),o.validateMessages)),Object.keys(G).length>0&&(j=S(q3,{validateMessages:G,children:i})),f&&(j=S(GH,{locale:f,_ANT_MARK__:WH,children:j})),(A||a)&&(j=S(V3.Provider,{value:B,children:j})),p&&(j=S(TA,{size:p,children:j})),I!==void 0&&(j=S(kA,{disabled:I,children:j})),S(zr.Provider,{value:L,children:j})},mh=function(t){return C.exports.useEffect(function(){t.direction&&(cq.config({rtl:t.direction==="rtl"}),kq.config({rtl:t.direction==="rtl"}))},[t.direction]),S(mv,{children:function(r,n,i){return S(rc,{children:function(a){return S(Dq,{parentContext:a,legacyLocale:i,...t})}})}})};mh.ConfigContext=zr;mh.SizeContext=Gs;mh.config=zq;function Tl(e,t,r,n){var i=ad.unstable_batchedUpdates?function(u){ad.unstable_batchedUpdates(r,u)}:r;return e.addEventListener&&e.addEventListener(t,i,n),{remove:function(){e.removeEventListener&&e.removeEventListener(t,i,n)}}}function MA(e){return Object.keys(e).reduce(function(t,r){return(r.startsWith("data-")||r.startsWith("aria-")||r==="role")&&!r.startsWith("data-__")&&(t[r]=e[r]),t},{})}var Yo=C.exports.isValidElement;function IA(e){return e&&Yo(e)&&e.type===C.exports.Fragment}function RA(e,t,r){return Yo(e)?C.exports.cloneElement(e,typeof r=="function"?r(e.props||{}):r):t}function Ni(e,t){return RA(e,e,t)}var Lq=function(e){vi(r,e);var t=gi(r);function r(){var n;return Qn(this,r),n=t.apply(this,arguments),n.state={error:void 0,info:{componentStack:""}},n}return Jn(r,[{key:"componentDidCatch",value:function(i,a){this.setState({error:i,info:a})}},{key:"render",value:function(){var i=this.props,a=i.message,u=i.description,o=i.children,f=this.state,p=f.error,v=f.info,y=v&&v.componentStack?v.componentStack:null,w=typeof a>"u"?(p||"").toString():a,k=typeof u>"u"?y:u;return p?S(px,{type:"error",message:w,description:S("pre",{children:k})}):o}}]),r}(C.exports.Component);const Fq=Lq;var $q=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},Bq={success:ux,info:DO,error:gd,warning:cx},Vq={success:eS,info:rS,error:tS,warning:hx},jq=function(t){var r=t.description,n=t.icon,i=t.prefixCls,a=t.type,u=(r?Vq:Bq)[a]||null;return n?RA(n,S("span",{className:"".concat(i,"-icon"),children:n}),function(){return{className:Qe("".concat(i,"-icon"),se({},n.props.className,n.props.className))}}):C.exports.createElement(u,{className:"".concat(i,"-icon")})},Uq=function(t){var r=t.isClosable,n=t.closeText,i=t.prefixCls,a=t.closeIcon,u=t.handleClose;return r?S("button",{type:"button",onClick:u,className:"".concat(i,"-close-icon"),tabIndex:0,children:n?S("span",{className:"".concat(i,"-close-text"),children:n}):a}):null},OA=function(t){var r,n=t.description,i=t.prefixCls,a=t.message,u=t.banner,o=t.className,f=o===void 0?"":o,p=t.style,v=t.onMouseEnter,y=t.onMouseLeave,w=t.onClick,k=t.afterClose,T=t.showIcon,R=t.closable,A=t.closeText,I=t.closeIcon,O=I===void 0?S(fx,{}):I,N=t.action,L=$q(t,["description","prefixCls","message","banner","className","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action"]),B=C.exports.useState(!1),j=Le(B,2),G=j[0],H=j[1],te=C.exports.useRef(),Y=C.exports.useContext(zr),le=Y.getPrefixCls,J=Y.direction,Z=le("alert",i),Q=function(ke){var ze;H(!0),(ze=L.onClose)===null||ze===void 0||ze.call(L,ke)},ge=function(){var ke=L.type;return ke!==void 0?ke:u?"warning":"info"},ne=A?!0:R,de=ge(),oe=u&&T===void 0?!0:T,ye=Qe(Z,"".concat(Z,"-").concat(de),(r={},se(r,"".concat(Z,"-with-description"),!!n),se(r,"".concat(Z,"-no-icon"),!oe),se(r,"".concat(Z,"-banner"),!!u),se(r,"".concat(Z,"-rtl"),J==="rtl"),r),f),Re=MA(L);return S(Za,{visible:!G,motionName:"".concat(Z,"-motion"),motionAppear:!1,motionEnter:!1,onLeaveStart:function(ke){return{maxHeight:ke.offsetHeight}},onLeaveEnd:k,children:function(Te){var ke=Te.className,ze=Te.style;return Xe("div",{ref:te,"data-show":!G,className:Qe(ye,ke),style:tt(tt({},p),ze),onMouseEnter:v,onMouseLeave:y,onClick:w,role:"alert",...Re,children:[oe?S(jq,{description:n,icon:L.icon,prefixCls:Z,type:de}):null,Xe("div",{className:"".concat(Z,"-content"),children:[a?S("div",{className:"".concat(Z,"-message"),children:a}):null,n?S("div",{className:"".concat(Z,"-description"),children:n}):null]}),N?S("div",{className:"".concat(Z,"-action"),children:N}):null,S(Uq,{isClosable:!!ne,closeText:A,prefixCls:Z,closeIcon:O,handleClose:Q})]})}})};OA.ErrorBoundary=Fq;const px=OA;function b4(e){return e!=null&&e===e.window}function Kq(e,t){var r,n;if(typeof window>"u")return 0;var i=t?"scrollTop":"scrollLeft",a=0;return b4(e)?a=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?a=e.documentElement[i]:(e instanceof HTMLElement||e)&&(a=e[i]),e&&!b4(e)&&typeof a!="number"&&(a=(n=((r=e.ownerDocument)!==null&&r!==void 0?r:e).documentElement)===null||n===void 0?void 0:n[i]),a}function Hq(e,t,r,n){var i=r-t;return e/=n/2,e<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t}function Wq(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.getContainer,n=r===void 0?function(){return window}:r,i=t.callback,a=t.duration,u=a===void 0?450:a,o=n(),f=Kq(o,!0),p=Date.now(),v=function y(){var w=Date.now(),k=w-p,T=Hq(k>u?u:k,f,e,u);b4(o)?o.scrollTo(window.pageXOffset,T):o instanceof Document||o.constructor.name==="HTMLDocument"?o.documentElement.scrollTop=T:o.scrollTop=T,k<u?rn(y):typeof i=="function"&&i()};rn(v)}function Wm(e){var t=C.exports.useRef();t.current=e;var r=C.exports.useCallback(function(){for(var n,i=arguments.length,a=new Array(i),u=0;u<i;u++)a[u]=arguments[u];return(n=t.current)===null||n===void 0?void 0:n.call.apply(n,[t].concat(a))},[]);return r}var mi=Lo()?C.exports.useLayoutEffect:C.exports.useEffect,TT=function(t,r){var n=C.exports.useRef(!0);mi(function(){if(!n.current)return t()},r),mi(function(){return n.current=!1,function(){n.current=!0}},[])};function Zb(e){return e!==void 0}function Yi(e,t){var r=t||{},n=r.defaultValue,i=r.value,a=r.onChange,u=r.postState,o=Hs(function(){return Zb(i)?i:Zb(n)?typeof n=="function"?n():n:typeof e=="function"?e():e}),f=Le(o,2),p=f[0],v=f[1],y=i!==void 0?i:p,w=u?u(y):y,k=Wm(a),T=Hs([y]),R=Le(T,2),A=R[0],I=R[1];TT(function(){var N=A[0];p!==N&&k(p,N)},[A]),TT(function(){Zb(i)||v(i)},[i]);var O=Wm(function(N,L){v(N,L),I([y],L)});return[w,O]}const AA=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 r=t.keyCode;if(t.altKey&&!t.ctrlKey||t.metaKey||r>=Et.F1&&r<=Et.F12)return!1;switch(r){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}}},NA=C.exports.createContext(null);function zA(){return C.exports.useContext(NA)}function qq(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,t=C.exports.useState(!1),r=Le(t,2),n=r[0],i=r[1],a=C.exports.useRef(null),u=function(){window.clearTimeout(a.current)};C.exports.useEffect(function(){return u},[]);var o=function(p,v){u(),a.current=window.setTimeout(function(){i(p),v&&v()},e)};return[n,o,u]}function DA(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=C.exports.useRef(null),r=C.exports.useRef(null);C.exports.useEffect(function(){return function(){window.clearTimeout(r.current)}},[]);function n(i){(i||t.current===null)&&(t.current=i),window.clearTimeout(r.current),r.current=window.setTimeout(function(){t.current=null},e)}return[function(){return t.current},n]}function Gq(e,t,r,n){var i=C.exports.useRef(null);i.current={open:t,triggerOpen:r,customizedTrigger:n},C.exports.useEffect(function(){function a(u){var o;if(!((o=i.current)!==null&&o!==void 0&&o.customizedTrigger)){var f=u.target;f.shadowRoot&&u.composed&&(f=u.composedPath()[0]||f),i.current.open&&e().filter(function(p){return p}).every(function(p){return!p.contains(f)&&p!==f})&&i.current.triggerOpen(!1)}}return window.addEventListener("mousedown",a),function(){return window.removeEventListener("mousedown",a)}},[])}var Zq=`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`,Xq=`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`,Yq="".concat(Zq," ").concat(Xq).split(/[\s\n]+/),Qq="aria-",Jq="data-";function PT(e,t){return e.indexOf(t)===0}function qu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r;t===!1?r={aria:!0,data:!0,attr:!0}:t===!0?r={aria:!0}:r=ve({},t);var n={};return Object.keys(e).forEach(function(i){(r.aria&&(i==="role"||PT(i,Qq))||r.data&&PT(i,Jq)||r.attr&&Yq.includes(i))&&(n[i]=e[i])}),n}var eG=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],nf=void 0;function tG(e,t){var r=e.prefixCls,n=e.invalidate,i=e.item,a=e.renderItem,u=e.responsive,o=e.responsiveDisabled,f=e.registerSize,p=e.itemKey,v=e.className,y=e.style,w=e.children,k=e.display,T=e.order,R=e.component,A=R===void 0?"div":R,I=Mr(e,eG),O=u&&!k;function N(H){f(p,H)}C.exports.useEffect(function(){return function(){N(null)}},[]);var L=a&&i!==nf?a(i):w,B;n||(B={opacity:O?0:1,height:O?0:nf,overflowY:O?"hidden":nf,order:u?T:nf,pointerEvents:O?"none":nf,position:O?"absolute":nf});var j={};O&&(j["aria-hidden"]=!0);var G=S(A,{className:Qe(!n&&r,v),style:ve(ve({},B),y),...j,...I,ref:t,children:L});return u&&(G=S(Kl,{onResize:function(te){var Y=te.offsetWidth;N(Y)},disabled:o,children:G})),G}var vm=C.exports.forwardRef(tG);vm.displayName="Item";function rG(){var e=Hs({}),t=Le(e,2),r=t[1],n=C.exports.useRef([]),i=0,a=0;function u(o){var f=i;i+=1,n.current.length<f+1&&(n.current[f]=o);var p=n.current[f];function v(y){n.current[f]=typeof y=="function"?y(n.current[f]):y,rn.cancel(a),a=rn(function(){r({},!0)})}return[p,v]}return u}var nG=["component"],iG=["className"],oG=["className"],aG=function(t,r){var n=C.exports.useContext(Q0);if(!n){var i=t.component,a=i===void 0?"div":i,u=Mr(t,nG);return S(a,{...u,ref:r})}var o=n.className,f=Mr(n,iG),p=t.className,v=Mr(t,oG);return S(Q0.Provider,{value:null,children:S(vm,{ref:r,className:Qe(o,p),...f,...v})})},LA=C.exports.forwardRef(aG);LA.displayName="RawItem";var sG=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Q0=C.exports.createContext(null),FA="responsive",$A="invalidate";function lG(e){return"+ ".concat(e.length," ...")}function uG(e,t){var r=e.prefixCls,n=r===void 0?"rc-overflow":r,i=e.data,a=i===void 0?[]:i,u=e.renderItem,o=e.renderRawItem,f=e.itemKey,p=e.itemWidth,v=p===void 0?10:p,y=e.ssr,w=e.style,k=e.className,T=e.maxCount,R=e.renderRest,A=e.renderRawRest,I=e.suffix,O=e.component,N=O===void 0?"div":O,L=e.itemComponent,B=e.onVisibleChange,j=Mr(e,sG),G=rG(),H=y==="full",te=G(null),Y=Le(te,2),le=Y[0],J=Y[1],Z=le||0,Q=G(new Map),ge=Le(Q,2),ne=ge[0],de=ge[1],oe=G(0),ye=Le(oe,2),Re=ye[0],Te=ye[1],ke=G(0),ze=Le(ke,2),Ie=ze[0],Ne=ze[1],De=G(0),Ve=Le(De,2),Ge=Ve[0],je=Ve[1],ct=C.exports.useState(null),pt=Le(ct,2),Tt=pt[0],Ye=pt[1],Pt=C.exports.useState(null),mt=Le(Pt,2),It=mt[0],Ct=mt[1],Dt=C.exports.useMemo(function(){return It===null&&H?Number.MAX_SAFE_INTEGER:It||0},[It,le]),lt=C.exports.useState(!1),dt=Le(lt,2),ut=dt[0],it=dt[1],ft="".concat(n,"-item"),xt=Math.max(Re,Ie),Wt=T===FA,jt=a.length&&Wt,Qt=T===$A,Fe=jt||typeof T=="number"&&a.length>T,qe=C.exports.useMemo(function(){var ot=a;return jt?le===null&&H?ot=a:ot=a.slice(0,Math.min(a.length,Z/v)):typeof T=="number"&&(ot=a.slice(0,T)),ot},[a,v,le,T,jt]),Xt=C.exports.useMemo(function(){return jt?a.slice(Dt+1):a.slice(qe.length)},[a,qe,jt,Dt]),cr=C.exports.useCallback(function(ot,ht){var Ot;return typeof f=="function"?f(ot):(Ot=f&&(ot==null?void 0:ot[f]))!==null&&Ot!==void 0?Ot:ht},[f]),Vt=C.exports.useCallback(u||function(ot){return ot},[u]);function Ut(ot,ht,Ot){It===ot&&(ht===void 0||ht===Tt)||(Ct(ot),Ot||(it(ot<a.length-1),B==null||B(ot)),ht!==void 0&&Ye(ht))}function rr(ot,ht){J(ht.clientWidth)}function xr(ot,ht){de(function(Ot){var $t=new Map(Ot);return ht===null?$t.delete(ot):$t.set(ot,ht),$t})}function Or(ot,ht){Ne(ht),Te(Ie)}function _t(ot,ht){je(ht)}function qt(ot){return ne.get(cr(qe[ot],ot))}mi(function(){if(Z&&xt&&qe){var ot=Ge,ht=qe.length,Ot=ht-1;if(!ht){Ut(0,null);return}for(var $t=0;$t<ht;$t+=1){var ur=qt($t);if(H&&(ur=ur||0),ur===void 0){Ut($t-1,void 0,!0);break}if(ot+=ur,Ot===0&&ot<=Z||$t===Ot-1&&ot+qt(Ot)<=Z){Ut(Ot,null);break}else if(ot+xt>Z){Ut($t-1,ot-ur-Ge+Ie);break}}I&&qt(0)+Ge>Z&&Ye(null)}},[Z,ne,Ie,Ge,cr,qe]);var or=ut&&!!Xt.length,$r={};Tt!==null&&jt&&($r={position:"absolute",left:Tt,top:0});var kr={prefixCls:ft,responsive:jt,component:L,invalidate:Qt},Lt=o?function(ot,ht){var Ot=cr(ot,ht);return S(Q0.Provider,{value:ve(ve({},kr),{},{order:ht,item:ot,itemKey:Ot,registerSize:xr,display:ht<=Dt}),children:o(ot,ht)},Ot)}:function(ot,ht){var Ot=cr(ot,ht);return C.exports.createElement(vm,{...kr,order:ht,key:Ot,item:ot,renderItem:Vt,itemKey:Ot,registerSize:xr,display:ht<=Dt})},Tr,Cr={order:or?Dt:Number.MAX_SAFE_INTEGER,className:"".concat(ft,"-rest"),registerSize:Or,display:or};if(A)A&&(Tr=S(Q0.Provider,{value:ve(ve({},kr),Cr),children:A(Xt)}));else{var fr=R||lG;Tr=S(vm,{...kr,...Cr,children:typeof fr=="function"?fr(Xt):fr})}var Nt=Xe(N,{className:Qe(!Qt&&n,k),style:w,ref:t,...j,children:[qe.map(Lt),Fe?Tr:null,I&&S(vm,{...kr,responsive:Wt,responsiveDisabled:!jt,order:Dt,className:"".concat(ft,"-suffix"),registerSize:_t,display:!0,style:$r,children:I})]});return Wt&&(Nt=S(Kl,{onResize:rr,disabled:!jt,children:Nt})),Nt}var Ws=C.exports.forwardRef(uG);Ws.displayName="Overflow";Ws.Item=LA;Ws.RESPONSIVE=FA;Ws.INVALIDATE=$A;var J0=function(t){var r=t.className,n=t.customizeIcon,i=t.customizeIconProps,a=t.onMouseDown,u=t.onClick,o=t.children,f;return typeof n=="function"?f=n(i):f=n,S("span",{className:r,onMouseDown:function(v){v.preventDefault(),a&&a(v)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:u,"aria-hidden":!0,children:f!==void 0?f:S("span",{className:Qe(r.split(/\s+/).map(function(p){return"".concat(p,"-icon")})),children:o})})},cG=function(t,r){var n,i,a=t.prefixCls,u=t.id,o=t.inputElement,f=t.disabled,p=t.tabIndex,v=t.autoFocus,y=t.autoComplete,w=t.editable,k=t.activeDescendantId,T=t.value,R=t.maxLength,A=t.onKeyDown,I=t.onMouseDown,O=t.onChange,N=t.onPaste,L=t.onCompositionStart,B=t.onCompositionEnd,j=t.open,G=t.attrs,H=o||S("input",{}),te=H,Y=te.ref,le=te.props,J=le.onKeyDown,Z=le.onChange,Q=le.onMouseDown,ge=le.onCompositionStart,ne=le.onCompositionEnd,de=le.style;return"maxLength"in H.props,H=C.exports.cloneElement(H,ve(ve(ve({type:"search"},le),{},{id:u,ref:ta(r,Y),disabled:f,tabIndex:p,autoComplete:y||"off",autoFocus:v,className:Qe("".concat(a,"-selection-search-input"),(n=H)===null||n===void 0||(i=n.props)===null||i===void 0?void 0:i.className),role:"combobox","aria-expanded":j,"aria-haspopup":"listbox","aria-owns":"".concat(u,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(u,"_list"),"aria-activedescendant":k},G),{},{value:w?T:"",maxLength:R,readOnly:!w,unselectable:w?null:"on",style:ve(ve({},de),{},{opacity:w?null:0}),onKeyDown:function(ye){A(ye),J&&J(ye)},onMouseDown:function(ye){I(ye),Q&&Q(ye)},onChange:function(ye){O(ye),Z&&Z(ye)},onCompositionStart:function(ye){L(ye),ge&&ge(ye)},onCompositionEnd:function(ye){B(ye),ne&&ne(ye)},onPaste:N})),H},iS=C.exports.forwardRef(cG);iS.displayName="Input";function BA(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}var dG=typeof window<"u"&&window.document&&window.document.documentElement,fG=dG;function hG(e){return e!=null}function MT(e){return["string","number"].includes(ar(e))}function VA(e){var t=void 0;return e&&(MT(e.title)?t=e.title.toString():MT(e.label)&&(t=e.label.toString())),t}function pG(e,t){fG?C.exports.useLayoutEffect(e,t):C.exports.useEffect(e,t)}function mG(e){var t;return(t=e.key)!==null&&t!==void 0?t:e.value}var IT=function(t){t.preventDefault(),t.stopPropagation()},vG=function(t){var r=t.id,n=t.prefixCls,i=t.values,a=t.open,u=t.searchValue,o=t.autoClearSearchValue,f=t.inputRef,p=t.placeholder,v=t.disabled,y=t.mode,w=t.showSearch,k=t.autoFocus,T=t.autoComplete,R=t.activeDescendantId,A=t.tabIndex,I=t.removeIcon,O=t.maxTagCount,N=t.maxTagTextLength,L=t.maxTagPlaceholder,B=L===void 0?function(Ye){return"+ ".concat(Ye.length," ...")}:L,j=t.tagRender,G=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),ne=C.exports.useState(0),de=Le(ne,2),oe=de[0],ye=de[1],Re=C.exports.useState(!1),Te=Le(Re,2),ke=Te[0],ze=Te[1],Ie="".concat(n,"-selection"),Ne=a||y==="multiple"&&o===!1||y==="tags"?u:"",De=y==="tags"||y==="multiple"&&o===!1||w&&(a||ke);pG(function(){ye(ge.current.scrollWidth)},[Ne]);function Ve(Ye,Pt,mt,It,Ct){return Xe("span",{className:Qe("".concat(Ie,"-item"),se({},"".concat(Ie,"-item-disabled"),mt)),title:VA(Ye),children:[S("span",{className:"".concat(Ie,"-item-content"),children:Pt}),It&&S(J0,{className:"".concat(Ie,"-item-remove"),onMouseDown:IT,onClick:Ct,customizeIcon:I,children:"\xD7"})]})}function Ge(Ye,Pt,mt,It,Ct){var Dt=function(dt){IT(dt),G(!a)};return S("span",{onMouseDown:Dt,children:j({label:Pt,value:Ye,disabled:mt,closable:It,onClose:Ct})})}function je(Ye){var Pt=Ye.disabled,mt=Ye.label,It=Ye.value,Ct=!v&&!Pt,Dt=mt;if(typeof N=="number"&&(typeof mt=="string"||typeof mt=="number")){var lt=String(Dt);lt.length>N&&(Dt="".concat(lt.slice(0,N),"..."))}var dt=function(it){it&&it.stopPropagation(),H(Ye)};return typeof j=="function"?Ge(It,Dt,Pt,Ct,dt):Ve(Ye,Dt,Pt,Ct,dt)}function ct(Ye){var Pt=typeof B=="function"?B(Ye):B;return Ve({title:Pt},Pt,!1)}var pt=Xe("div",{className:"".concat(Ie,"-search"),style:{width:oe},onFocus:function(){ze(!0)},onBlur:function(){ze(!1)},children:[S(iS,{ref:f,open:a,prefixCls:n,id:r,inputElement:null,disabled:v,autoFocus:k,autoComplete:T,editable:De,activeDescendantId:R,value:Ne,onKeyDown:le,onMouseDown:J,onChange:te,onPaste:Y,onCompositionStart:Z,onCompositionEnd:Q,tabIndex:A,attrs:qu(t,!0)}),Xe("span",{ref:ge,className:"".concat(Ie,"-search-mirror"),"aria-hidden":!0,children:[Ne,"\xA0"]})]}),Tt=S(Ws,{prefixCls:"".concat(Ie,"-overflow"),data:i,renderItem:je,renderRest:ct,suffix:pt,itemKey:mG,maxCount:O});return Xe(Ar,{children:[Tt,!i.length&&!Ne&&S("span",{className:"".concat(Ie,"-placeholder"),children:p})]})},gG=function(t){var r=t.inputElement,n=t.prefixCls,i=t.id,a=t.inputRef,u=t.disabled,o=t.autoFocus,f=t.autoComplete,p=t.activeDescendantId,v=t.mode,y=t.open,w=t.values,k=t.placeholder,T=t.tabIndex,R=t.showSearch,A=t.searchValue,I=t.activeValue,O=t.maxLength,N=t.onInputKeyDown,L=t.onInputMouseDown,B=t.onInputChange,j=t.onInputPaste,G=t.onInputCompositionStart,H=t.onInputCompositionEnd,te=C.exports.useState(!1),Y=Le(te,2),le=Y[0],J=Y[1],Z=v==="combobox",Q=Z||R,ge=w[0],ne=A||"";Z&&I&&!le&&(ne=I),C.exports.useEffect(function(){Z&&J(!1)},[Z,I]);var de=v!=="combobox"&&!y&&!R?!1:!!ne,oe=VA(ge),ye=function(){if(ge)return null;var Te=de?{visibility:"hidden"}:void 0;return S("span",{className:"".concat(n,"-selection-placeholder"),style:Te,children:k})};return Xe(Ar,{children:[S("span",{className:"".concat(n,"-selection-search"),children:S(iS,{ref:a,prefixCls:n,id:i,open:y,inputElement:r,disabled:u,autoFocus:o,autoComplete:f,editable:Q,activeDescendantId:p,value:ne,onKeyDown:N,onMouseDown:L,onChange:function(Te){J(!0),B(Te)},onPaste:j,onCompositionStart:G,onCompositionEnd:H,tabIndex:T,attrs:qu(t,!0),maxLength:Z?O:void 0})}),!Z&&ge&&!de&&S("span",{className:"".concat(n,"-selection-item"),title:oe,children:ge.label}),ye()]})};function yG(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 xG=function(t,r){var n=C.exports.useRef(null),i=C.exports.useRef(!1),a=t.prefixCls,u=t.open,o=t.mode,f=t.showSearch,p=t.tokenWithEnter,v=t.autoClearSearchValue,y=t.onSearch,w=t.onSearchSubmit,k=t.onToggleOpen,T=t.onInputKeyDown,R=t.domRef;C.exports.useImperativeHandle(r,function(){return{focus:function(){n.current.focus()},blur:function(){n.current.blur()}}});var A=DA(0),I=Le(A,2),O=I[0],N=I[1],L=function(de){var oe=de.which;(oe===Et.UP||oe===Et.DOWN)&&de.preventDefault(),T&&T(de),oe===Et.ENTER&&o==="tags"&&!i.current&&!u&&(w==null||w(de.target.value)),yG(oe)&&k(!0)},B=function(){N(!0)},j=C.exports.useRef(null),G=function(de){y(de,!0,i.current)!==!1&&k(!0)},H=function(){i.current=!0},te=function(de){i.current=!1,o!=="combobox"&&G(de.target.value)},Y=function(de){var oe=de.target.value;if(p&&j.current&&/[\r\n]/.test(j.current)){var ye=j.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");oe=oe.replace(ye,j.current)}j.current=null,G(oe)},le=function(de){var oe=de.clipboardData,ye=oe.getData("text");j.current=ye},J=function(de){var oe=de.target;if(oe!==n.current){var ye=document.body.style.msTouchAction!==void 0;ye?setTimeout(function(){n.current.focus()}):n.current.focus()}},Z=function(de){var oe=O();de.target!==n.current&&!oe&&o!=="combobox"&&de.preventDefault(),(o!=="combobox"&&(!f||!oe)||!u)&&(u&&v!==!1&&y("",!0,!1),k())},Q={inputRef:n,onInputKeyDown:L,onInputMouseDown:B,onInputChange:Y,onInputPaste:le,onInputCompositionStart:H,onInputCompositionEnd:te},ge=o==="multiple"||o==="tags"?S(vG,{...t,...Q}):S(gG,{...t,...Q});return S("div",{ref:R,className:"".concat(a,"-selector"),onClick:J,onMouseDown:Z,children:ge})},jA=C.exports.forwardRef(xG);jA.displayName="Selector";var _G=C.exports.forwardRef(function(e,t){var r=e.didUpdate,n=e.getContainer,i=e.children,a=C.exports.useRef(),u=C.exports.useRef();C.exports.useImperativeHandle(t,function(){return{}});var o=C.exports.useRef(!1);return!o.current&&Lo()&&(u.current=n(),a.current=u.current.parentNode,o.current=!0),C.exports.useEffect(function(){r==null||r(e)}),C.exports.useEffect(function(){return u.current.parentNode===null&&a.current!==null&&a.current.appendChild(u.current),function(){var f,p;(f=u.current)===null||f===void 0||(p=f.parentNode)===null||p===void 0||p.removeChild(u.current)}},[]),u.current?ad.createPortal(i,u.current):null});function bG(e,t,r){return r?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function wG(e,t,r){var n=e[t]||{};return ve(ve({},n),r)}function CG(e,t,r,n){for(var i=r.points,a=Object.keys(e),u=0;u<a.length;u+=1){var o=a[u];if(bG(e[o].points,i,n))return"".concat(t,"-placement-").concat(o)}return""}function UA(e){var t=e.prefixCls,r=e.motion,n=e.animation,i=e.transitionName;return r||(n?{motionName:"".concat(t,"-").concat(n)}:i?{motionName:i}:null)}function SG(e){var t=e.prefixCls,r=e.visible,n=e.zIndex,i=e.mask,a=e.maskMotion,u=e.maskAnimation,o=e.maskTransitionName;if(!i)return null;var f={};return(a||o||u)&&(f=ve({motionAppear:!0},UA({motion:a,prefixCls:t,transitionName:o,animation:u}))),S(Za,{...f,visible:r,removeOnLeave:!0,children:function(p){var v=p.className;return S("div",{style:{zIndex:n},className:Qe("".concat(t,"-mask"),v)})}})}function RT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function OT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RT(Object(r),!0).forEach(function(n){EG(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function w4(e){return w4=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},w4(e)}function EG(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Dp,kG={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-",O:"-o-"};function e1(){if(Dp!==void 0)return Dp;Dp="";var e=document.createElement("p").style,t="Transform";for(var r in kG)r+t in e&&(Dp=r);return Dp}function KA(){return e1()?"".concat(e1(),"TransitionProperty"):"transitionProperty"}function mx(){return e1()?"".concat(e1(),"Transform"):"transform"}function AT(e,t){var r=KA();r&&(e.style[r]=t,r!=="transitionProperty"&&(e.style.transitionProperty=t))}function Xb(e,t){var r=mx();r&&(e.style[r]=t,r!=="transform"&&(e.style.transform=t))}function TG(e){return e.style.transitionProperty||e.style[KA()]}function PG(e){var t=window.getComputedStyle(e,null),r=t.getPropertyValue("transform")||t.getPropertyValue(mx());if(r&&r!=="none"){var n=r.replace(/[^0-9\-.,]/g,"").split(",");return{x:parseFloat(n[12]||n[4],0),y:parseFloat(n[13]||n[5],0)}}return{x:0,y:0}}var MG=/matrix\((.*)\)/,IG=/matrix3d\((.*)\)/;function RG(e,t){var r=window.getComputedStyle(e,null),n=r.getPropertyValue("transform")||r.getPropertyValue(mx());if(n&&n!=="none"){var i,a=n.match(MG);if(a)a=a[1],i=a.split(",").map(function(o){return parseFloat(o,10)}),i[4]=t.x,i[5]=t.y,Xb(e,"matrix(".concat(i.join(","),")"));else{var u=n.match(IG)[1];i=u.split(",").map(function(o){return parseFloat(o,10)}),i[12]=t.x,i[13]=t.y,Xb(e,"matrix3d(".concat(i.join(","),")"))}}else Xb(e,"translateX(".concat(t.x,"px) translateY(").concat(t.y,"px) translateZ(0)"))}var OG=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,yv;function NT(e){var t=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=t}function Nf(e,t,r){var n=r;if(w4(t)==="object"){for(var i in t)t.hasOwnProperty(i)&&Nf(e,i,t[i]);return}if(typeof n<"u"){typeof n=="number"&&(n="".concat(n,"px")),e.style[t]=n;return}return yv(e,t)}function AG(e){var t,r,n,i=e.ownerDocument,a=i.body,u=i&&i.documentElement;return t=e.getBoundingClientRect(),r=Math.floor(t.left),n=Math.floor(t.top),r-=u.clientLeft||a.clientLeft||0,n-=u.clientTop||a.clientTop||0,{left:r,top:n}}function HA(e,t){var r=e["page".concat(t?"Y":"X","Offset")],n="scroll".concat(t?"Top":"Left");if(typeof r!="number"){var i=e.document;r=i.documentElement[n],typeof r!="number"&&(r=i.body[n])}return r}function WA(e){return HA(e)}function qA(e){return HA(e,!0)}function qm(e){var t=AG(e),r=e.ownerDocument,n=r.defaultView||r.parentWindow;return t.left+=WA(n),t.top+=qA(n),t}function oS(e){return e!=null&&e==e.window}function GA(e){return oS(e)?e.document:e.nodeType===9?e:e.ownerDocument}function NG(e,t,r){var n=r,i="",a=GA(e);return n=n||a.defaultView.getComputedStyle(e,null),n&&(i=n.getPropertyValue(t)||n[t]),i}var zG=new RegExp("^(".concat(OG,")(?!px)[a-z%]+$"),"i"),DG=/^(top|right|bottom|left)$/,Yb="currentStyle",Qb="runtimeStyle",Ac="left",LG="px";function FG(e,t){var r=e[Yb]&&e[Yb][t];if(zG.test(r)&&!DG.test(t)){var n=e.style,i=n[Ac],a=e[Qb][Ac];e[Qb][Ac]=e[Yb][Ac],n[Ac]=t==="fontSize"?"1em":r||0,r=n.pixelLeft+LG,n[Ac]=i,e[Qb][Ac]=a}return r===""?"auto":r}typeof window<"u"&&(yv=window.getComputedStyle?NG:FG);function wy(e,t){return e==="left"?t.useCssRight?"right":e:t.useCssBottom?"bottom":e}function zT(e){if(e==="left")return"right";if(e==="right")return"left";if(e==="top")return"bottom";if(e==="bottom")return"top"}function DT(e,t,r){Nf(e,"position")==="static"&&(e.style.position="relative");var n=-999,i=-999,a=wy("left",r),u=wy("top",r),o=zT(a),f=zT(u);a!=="left"&&(n=999),u!=="top"&&(i=999);var p="",v=qm(e);("left"in t||"top"in t)&&(p=TG(e)||"",AT(e,"none")),"left"in t&&(e.style[o]="",e.style[a]="".concat(n,"px")),"top"in t&&(e.style[f]="",e.style[u]="".concat(i,"px")),NT(e);var y=qm(e),w={};for(var k in t)if(t.hasOwnProperty(k)){var T=wy(k,r),R=k==="left"?n:i,A=v[k]-y[k];T===k?w[T]=R+A:w[T]=R-A}Nf(e,w),NT(e),("left"in t||"top"in t)&&AT(e,p);var I={};for(var O in t)if(t.hasOwnProperty(O)){var N=wy(O,r),L=t[O]-v[O];O===N?I[N]=w[N]+L:I[N]=w[N]-L}Nf(e,I)}function $G(e,t){var r=qm(e),n=PG(e),i={x:n.x,y:n.y};"left"in t&&(i.x=n.x+t.left-r.left),"top"in t&&(i.y=n.y+t.top-r.top),RG(e,i)}function BG(e,t,r){if(r.ignoreShake){var n=qm(e),i=n.left.toFixed(0),a=n.top.toFixed(0),u=t.left.toFixed(0),o=t.top.toFixed(0);if(i===u&&a===o)return}r.useCssRight||r.useCssBottom?DT(e,t,r):r.useCssTransform&&mx()in document.body.style?$G(e,t):DT(e,t,r)}function aS(e,t){for(var r=0;r<e.length;r++)t(e[r])}function ZA(e){return yv(e,"boxSizing")==="border-box"}var VG=["margin","border","padding"],C4=-1,jG=2,S4=1,UG=0;function KG(e,t,r){var n={},i=e.style,a;for(a in t)t.hasOwnProperty(a)&&(n[a]=i[a],i[a]=t[a]);r.call(e);for(a in t)t.hasOwnProperty(a)&&(i[a]=n[a])}function Qp(e,t,r){var n=0,i,a,u;for(a=0;a<t.length;a++)if(i=t[a],i)for(u=0;u<r.length;u++){var o=void 0;i==="border"?o="".concat(i).concat(r[u],"Width"):o=i+r[u],n+=parseFloat(yv(e,o))||0}return n}var Vs={getParent:function(t){var r=t;do r.nodeType===11&&r.host?r=r.host:r=r.parentNode;while(r&&r.nodeType!==1&&r.nodeType!==9);return r}};aS(["Width","Height"],function(e){Vs["doc".concat(e)]=function(t){var r=t.document;return Math.max(r.documentElement["scroll".concat(e)],r.body["scroll".concat(e)],Vs["viewport".concat(e)](r))},Vs["viewport".concat(e)]=function(t){var r="client".concat(e),n=t.document,i=n.body,a=n.documentElement,u=a[r];return n.compatMode==="CSS1Compat"&&u||i&&i[r]||u}});function LT(e,t,r){var n=r;if(oS(e))return t==="width"?Vs.viewportWidth(e):Vs.viewportHeight(e);if(e.nodeType===9)return t==="width"?Vs.docWidth(e):Vs.docHeight(e);var i=t==="width"?["Left","Right"]:["Top","Bottom"],a=Math.floor(t==="width"?e.getBoundingClientRect().width:e.getBoundingClientRect().height),u=ZA(e),o=0;(a==null||a<=0)&&(a=void 0,o=yv(e,t),(o==null||Number(o)<0)&&(o=e.style[t]||0),o=Math.floor(parseFloat(o))||0),n===void 0&&(n=u?S4:C4);var f=a!==void 0||u,p=a||o;return n===C4?f?p-Qp(e,["border","padding"],i):o:f?n===S4?p:p+(n===jG?-Qp(e,["border"],i):Qp(e,["margin"],i)):o+Qp(e,VG.slice(n),i)}var HG={position:"absolute",visibility:"hidden",display:"block"};function FT(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i=t[0];return i.offsetWidth!==0?n=LT.apply(void 0,t):KG(i,HG,function(){n=LT.apply(void 0,t)}),n}aS(["width","height"],function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);Vs["outer".concat(t)]=function(n,i){return n&&FT(n,e,i?UG:S4)};var r=e==="width"?["Left","Right"]:["Top","Bottom"];Vs[e]=function(n,i){var a=i;if(a!==void 0){if(n){var u=ZA(n);return u&&(a+=Qp(n,["padding","border"],r)),Nf(n,e,a)}return}return n&&FT(n,e,C4)}});function XA(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}var Kr={getWindow:function(t){if(t&&t.document&&t.setTimeout)return t;var r=t.ownerDocument||t;return r.defaultView||r.parentWindow},getDocument:GA,offset:function(t,r,n){if(typeof r<"u")BG(t,r,n||{});else return qm(t)},isWindow:oS,each:aS,css:Nf,clone:function(t){var r,n={};for(r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);var i=t.overflow;if(i)for(r in t)t.hasOwnProperty(r)&&(n.overflow[r]=t.overflow[r]);return n},mix:XA,getWindowScrollLeft:function(t){return WA(t)},getWindowScrollTop:function(t){return qA(t)},merge:function(){for(var t={},r=0;r<arguments.length;r++)Kr.mix(t,r<0||arguments.length<=r?void 0:arguments[r]);return t},viewportWidth:0,viewportHeight:0};XA(Kr,Vs);var Jb=Kr.getParent;function E4(e){if(Kr.isWindow(e)||e.nodeType===9)return null;var t=Kr.getDocument(e),r=t.body,n,i=Kr.css(e,"position"),a=i==="fixed"||i==="absolute";if(!a)return e.nodeName.toLowerCase()==="html"?null:Jb(e);for(n=Jb(e);n&&n!==r&&n.nodeType!==9;n=Jb(n))if(i=Kr.css(n,"position"),i!=="static")return n;return null}var $T=Kr.getParent;function WG(e){if(Kr.isWindow(e)||e.nodeType===9)return!1;var t=Kr.getDocument(e),r=t.body,n=null;for(n=$T(e);n&&n!==r&&n!==t;n=$T(n)){var i=Kr.css(n,"position");if(i==="fixed")return!0}return!1}function sS(e,t){for(var r={left:0,right:1/0,top:0,bottom:1/0},n=E4(e),i=Kr.getDocument(e),a=i.defaultView||i.parentWindow,u=i.body,o=i.documentElement;n;){if((navigator.userAgent.indexOf("MSIE")===-1||n.clientWidth!==0)&&n!==u&&n!==o&&Kr.css(n,"overflow")!=="visible"){var f=Kr.offset(n);f.left+=n.clientLeft,f.top+=n.clientTop,r.top=Math.max(r.top,f.top),r.right=Math.min(r.right,f.left+n.clientWidth),r.bottom=Math.min(r.bottom,f.top+n.clientHeight),r.left=Math.max(r.left,f.left)}else if(n===u||n===o)break;n=E4(n)}var p=null;if(!Kr.isWindow(e)&&e.nodeType!==9){p=e.style.position;var v=Kr.css(e,"position");v==="absolute"&&(e.style.position="fixed")}var y=Kr.getWindowScrollLeft(a),w=Kr.getWindowScrollTop(a),k=Kr.viewportWidth(a),T=Kr.viewportHeight(a),R=o.scrollWidth,A=o.scrollHeight,I=window.getComputedStyle(u);if(I.overflowX==="hidden"&&(R=a.innerWidth),I.overflowY==="hidden"&&(A=a.innerHeight),e.style&&(e.style.position=p),t||WG(e))r.left=Math.max(r.left,y),r.top=Math.max(r.top,w),r.right=Math.min(r.right,y+k),r.bottom=Math.min(r.bottom,w+T);else{var O=Math.max(R,y+k);r.right=Math.min(r.right,O);var N=Math.max(A,w+T);r.bottom=Math.min(r.bottom,N)}return r.top>=0&&r.left>=0&&r.bottom>r.top&&r.right>r.left?r:null}function qG(e,t,r,n){var i=Kr.clone(e),a={width:t.width,height:t.height};return n.adjustX&&i.left<r.left&&(i.left=r.left),n.resizeWidth&&i.left>=r.left&&i.left+a.width>r.right&&(a.width-=i.left+a.width-r.right),n.adjustX&&i.left+a.width>r.right&&(i.left=Math.max(r.right-a.width,r.left)),n.adjustY&&i.top<r.top&&(i.top=r.top),n.resizeHeight&&i.top>=r.top&&i.top+a.height>r.bottom&&(a.height-=i.top+a.height-r.bottom),n.adjustY&&i.top+a.height>r.bottom&&(i.top=Math.max(r.bottom-a.height,r.top)),Kr.mix(i,a)}function lS(e){var t,r,n;if(!Kr.isWindow(e)&&e.nodeType!==9)t=Kr.offset(e),r=Kr.outerWidth(e),n=Kr.outerHeight(e);else{var i=Kr.getWindow(e);t={left:Kr.getWindowScrollLeft(i),top:Kr.getWindowScrollTop(i)},r=Kr.viewportWidth(i),n=Kr.viewportHeight(i)}return t.width=r,t.height=n,t}function BT(e,t){var r=t.charAt(0),n=t.charAt(1),i=e.width,a=e.height,u=e.left,o=e.top;return r==="c"?o+=a/2:r==="b"&&(o+=a),n==="c"?u+=i/2:n==="r"&&(u+=i),{left:u,top:o}}function Cy(e,t,r,n,i){var a=BT(t,r[1]),u=BT(e,r[0]),o=[u.left-a.left,u.top-a.top];return{left:Math.round(e.left-o[0]+n[0]-i[0]),top:Math.round(e.top-o[1]+n[1]-i[1])}}function VT(e,t,r){return e.left<r.left||e.left+t.width>r.right}function jT(e,t,r){return e.top<r.top||e.top+t.height>r.bottom}function GG(e,t,r){return e.left>r.right||e.left+t.width<r.left}function ZG(e,t,r){return e.top>r.bottom||e.top+t.height<r.top}function Sy(e,t,r){var n=[];return Kr.each(e,function(i){n.push(i.replace(t,function(a){return r[a]}))}),n}function Ey(e,t){return e[t]=-e[t],e}function UT(e,t){var r;return/%$/.test(e)?r=parseInt(e.substring(0,e.length-1),10)/100*t:r=parseInt(e,10),r||0}function KT(e,t){e[0]=UT(e[0],t.width),e[1]=UT(e[1],t.height)}function YA(e,t,r,n){var i=r.points,a=r.offset||[0,0],u=r.targetOffset||[0,0],o=r.overflow,f=r.source||e;a=[].concat(a),u=[].concat(u),o=o||{};var p={},v=0,y=!!(o&&o.alwaysByViewport),w=sS(f,y),k=lS(f);KT(a,k),KT(u,t);var T=Cy(k,t,i,a,u),R=Kr.merge(k,T);if(w&&(o.adjustX||o.adjustY)&&n){if(o.adjustX&&VT(T,k,w)){var A=Sy(i,/[lr]/gi,{l:"r",r:"l"}),I=Ey(a,0),O=Ey(u,0),N=Cy(k,t,A,I,O);GG(N,k,w)||(v=1,i=A,a=I,u=O)}if(o.adjustY&&jT(T,k,w)){var L=Sy(i,/[tb]/gi,{t:"b",b:"t"}),B=Ey(a,1),j=Ey(u,1),G=Cy(k,t,L,B,j);ZG(G,k,w)||(v=1,i=L,a=B,u=j)}v&&(T=Cy(k,t,i,a,u),Kr.mix(R,T));var H=VT(T,k,w),te=jT(T,k,w);if(H||te){var Y=i;H&&(Y=Sy(i,/[lr]/gi,{l:"r",r:"l"})),te&&(Y=Sy(i,/[tb]/gi,{t:"b",b:"t"})),i=Y,a=r.offset||[0,0],u=r.targetOffset||[0,0]}p.adjustX=o.adjustX&&H,p.adjustY=o.adjustY&&te,(p.adjustX||p.adjustY)&&(R=qG(T,k,w,p))}return R.width!==k.width&&Kr.css(f,"width",Kr.width(f)+R.width-k.width),R.height!==k.height&&Kr.css(f,"height",Kr.height(f)+R.height-k.height),Kr.offset(f,{left:R.left,top:R.top},{useCssRight:r.useCssRight,useCssBottom:r.useCssBottom,useCssTransform:r.useCssTransform,ignoreShake:r.ignoreShake}),{points:i,offset:a,targetOffset:u,overflow:p}}function XG(e,t){var r=sS(e,t),n=lS(e);return!r||n.left+n.width<=r.left||n.top+n.height<=r.top||n.left>=r.right||n.top>=r.bottom}function uS(e,t,r){var n=r.target||t,i=lS(n),a=!XG(n,r.overflow&&r.overflow.alwaysByViewport);return YA(e,i,r,a)}uS.__getOffsetParent=E4;uS.__getVisibleRectForElement=sS;function YG(e,t,r){var n,i,a=Kr.getDocument(e),u=a.defaultView||a.parentWindow,o=Kr.getWindowScrollLeft(u),f=Kr.getWindowScrollTop(u),p=Kr.viewportWidth(u),v=Kr.viewportHeight(u);"pageX"in t?n=t.pageX:n=o+t.clientX,"pageY"in t?i=t.pageY:i=f+t.clientY;var y={left:n,top:i,width:0,height:0},w=n>=0&&n<=o+p&&i>=0&&i<=f+v,k=[r.points[0],"cc"];return YA(e,y,OT(OT({},r),{},{points:k}),w)}function cS(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=new Set;function i(a,u){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,f=n.has(a);if(Bn(!f,"Warning: There may be circular references"),f)return!1;if(a===u)return!0;if(r&&o>1)return!1;n.add(a);var p=o+1;if(Array.isArray(a)){if(!Array.isArray(u)||a.length!==u.length)return!1;for(var v=0;v<a.length;v++)if(!i(a[v],u[v],p))return!1;return!0}if(a&&u&&ar(a)==="object"&&ar(u)==="object"){var y=Object.keys(a);return y.length!==Object.keys(u).length?!1:y.every(function(w){return i(a[w],u[w],p)})}return!1}return i(e,t)}const dS=function(e){if(!e)return!1;if(e instanceof HTMLElement&&e.offsetParent)return!0;if(e instanceof SVGGraphicsElement&&e.getBBox){var t=e.getBBox(),r=t.width,n=t.height;if(r||n)return!0}if(e instanceof HTMLElement&&e.getBoundingClientRect){var i=e.getBoundingClientRect(),a=i.width,u=i.height;if(a||u)return!0}return!1},QG=function(e,t){var r=tn.useRef(!1),n=tn.useRef(null);function i(){window.clearTimeout(n.current)}function a(u){if(i(),!r.current||u===!0){if(e(u)===!1)return;r.current=!0,n.current=window.setTimeout(function(){r.current=!1},t)}else n.current=window.setTimeout(function(){r.current=!1,a()},t)}return[a,function(){r.current=!1,i()}]};function JG(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 eZ(e,t){e!==document.activeElement&&Jc(t,e)&&typeof e.focus=="function"&&e.focus()}function HT(e,t){var r=null,n=null;function i(u){var o=Le(u,1),f=o[0].target;if(!!document.documentElement.contains(f)){var p=f.getBoundingClientRect(),v=p.width,y=p.height,w=Math.floor(v),k=Math.floor(y);(r!==w||n!==k)&&Promise.resolve().then(function(){t({width:w,height:k})}),r=w,n=k}}var a=new nO(i);return e&&a.observe(e),function(){a.disconnect()}}function WT(e){return typeof e!="function"?null:e()}function qT(e){return ar(e)!=="object"||!e?null:e}var tZ=function(t,r){var n=t.children,i=t.disabled,a=t.target,u=t.align,o=t.onAlign,f=t.monitorWindowResize,p=t.monitorBufferTime,v=p===void 0?0:p,y=tn.useRef({}),w=tn.useRef(),k=tn.Children.only(n),T=tn.useRef({});T.current.disabled=i,T.current.target=a,T.current.align=u,T.current.onAlign=o;var R=QG(function(){var le=T.current,J=le.disabled,Z=le.target,Q=le.align,ge=le.onAlign,ne=w.current;if(!J&&Z&&ne){var de,oe=WT(Z),ye=qT(Z);y.current.element=oe,y.current.point=ye,y.current.align=Q;var Re=document,Te=Re.activeElement;return oe&&dS(oe)?de=uS(ne,oe,Q):ye&&(de=YG(ne,ye,Q)),eZ(Te,ne),ge&&de&&ge(ne,de),!0}return!1},v),A=Le(R,2),I=A[0],O=A[1],N=tn.useState(),L=Le(N,2),B=L[0],j=L[1],G=tn.useState(),H=Le(G,2),te=H[0],Y=H[1];return mi(function(){j(WT(a)),Y(qT(a))}),tn.useEffect(function(){(y.current.element!==B||!JG(y.current.point,te)||!cS(y.current.align,u))&&I()}),tn.useEffect(function(){var le=HT(w.current,I);return le},[w.current]),tn.useEffect(function(){var le=HT(B,I);return le},[B]),tn.useEffect(function(){i?O():I()},[i]),tn.useEffect(function(){if(f){var le=Tl(window,"resize",I);return le.remove}},[f]),tn.useEffect(function(){return function(){O()}},[]),tn.useImperativeHandle(r,function(){return{forceAlign:function(){return I(!0)}}}),tn.isValidElement(k)&&(k=tn.cloneElement(k,{ref:ta(k.ref,w)})),k},QA=tn.forwardRef(tZ);QA.displayName="Align";var GT=["measure","alignPre","align",null,"motion"];const rZ=function(e,t){var r=Hs(null),n=Le(r,2),i=n[0],a=n[1],u=C.exports.useRef();function o(v){a(v,!0)}function f(){rn.cancel(u.current)}function p(v){f(),u.current=rn(function(){o(function(y){switch(i){case"align":return"motion";case"motion":return"stable"}return y}),v==null||v()})}return C.exports.useEffect(function(){o("measure")},[e]),C.exports.useEffect(function(){switch(i){case"measure":t();break}i&&(u.current=rn(vd(Do().mark(function v(){var y,w;return Do().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:y=GT.indexOf(i),w=GT[y+1],w&&y!==-1&&o(w);case 3:case"end":return T.stop()}},v)}))))},[i]),C.exports.useEffect(function(){return function(){f()}},[]),[i,p]},nZ=function(e){var t=C.exports.useState({width:0,height:0}),r=Le(t,2),n=r[0],i=r[1];function a(o){var f=o.offsetWidth,p=o.offsetHeight,v=o.getBoundingClientRect(),y=v.width,w=v.height;Math.abs(f-y)<1&&Math.abs(p-w)<1&&(f=y,p=w),i({width:f,height:p})}var u=C.exports.useMemo(function(){var o={};if(e){var f=n.width,p=n.height;e.indexOf("height")!==-1&&p?o.height=p:e.indexOf("minHeight")!==-1&&p&&(o.minHeight=p),e.indexOf("width")!==-1&&f?o.width=f:e.indexOf("minWidth")!==-1&&f&&(o.minWidth=f)}return o},[e,n]);return[u,a]};var JA=C.exports.forwardRef(function(e,t){var r=e.visible,n=e.prefixCls,i=e.className,a=e.style,u=e.children,o=e.zIndex,f=e.stretch,p=e.destroyPopupOnHide,v=e.forceRender,y=e.align,w=e.point,k=e.getRootDomNode,T=e.getClassNameFromAlign,R=e.onAlign,A=e.onMouseEnter,I=e.onMouseLeave,O=e.onMouseDown,N=e.onTouchStart,L=e.onClick,B=C.exports.useRef(),j=C.exports.useRef(),G=C.exports.useState(),H=Le(G,2),te=H[0],Y=H[1],le=nZ(f),J=Le(le,2),Z=J[0],Q=J[1];function ge(){f&&Q(k())}var ne=rZ(r,ge),de=Le(ne,2),oe=de[0],ye=de[1],Re=C.exports.useState(0),Te=Le(Re,2),ke=Te[0],ze=Te[1],Ie=C.exports.useRef();mi(function(){oe==="alignPre"&&ze(0)},[oe]);function Ne(){return w||k}function De(){var Ye;(Ye=B.current)===null||Ye===void 0||Ye.forceAlign()}function Ve(Ye,Pt){var mt=T(Pt);te!==mt&&Y(mt),ze(function(It){return It+1}),oe==="align"&&(R==null||R(Ye,Pt))}mi(function(){oe==="align"&&(ke<3?De():ye(function(){var Ye;(Ye=Ie.current)===null||Ye===void 0||Ye.call(Ie)}))},[ke]);var Ge=ve({},UA(e));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(Ye){var Pt=Ge[Ye];Ge[Ye]=function(mt,It){return ye(),Pt==null?void 0:Pt(mt,It)}});function je(){return new Promise(function(Ye){Ie.current=Ye})}C.exports.useEffect(function(){!Ge.motionName&&oe==="motion"&&ye()},[Ge.motionName,oe]),C.exports.useImperativeHandle(t,function(){return{forceAlign:De,getElement:function(){return j.current}}});var ct=ve(ve({},Z),{},{zIndex:o,opacity:oe==="motion"||oe==="stable"||!r?void 0:0,pointerEvents:!r&&oe!=="stable"?"none":void 0},a),pt=!0;y!=null&&y.points&&(oe==="align"||oe==="stable")&&(pt=!1);var Tt=u;return C.exports.Children.count(u)>1&&(Tt=S("div",{className:"".concat(n,"-content"),children:u})),S(Za,{visible:r,ref:j,leavedClassName:"".concat(n,"-hidden"),...Ge,onAppearPrepare:je,onEnterPrepare:je,removeOnLeave:p,forceRender:v,children:function(Ye,Pt){var mt=Ye.className,It=Ye.style,Ct=Qe(n,i,te,mt);return S(QA,{target:Ne(),ref:B,monitorWindowResize:!0,disabled:pt,align:y,onAlign:Ve,children:S("div",{ref:Pt,className:Ct,onMouseEnter:A,onMouseLeave:I,onMouseDownCapture:O,onTouchStartCapture:N,onClick:L,style:ve(ve({},It),ct),children:Tt})},"popup")}})});JA.displayName="PopupInner";var eN=C.exports.forwardRef(function(e,t){var r=e.prefixCls,n=e.visible,i=e.zIndex,a=e.children,u=e.mobile;u=u===void 0?{}:u;var o=u.popupClassName,f=u.popupStyle,p=u.popupMotion,v=p===void 0?{}:p,y=u.popupRender,w=e.onClick,k=C.exports.useRef();C.exports.useImperativeHandle(t,function(){return{forceAlign:function(){},getElement:function(){return k.current}}});var T=ve({zIndex:i},f),R=a;return C.exports.Children.count(a)>1&&(R=S("div",{className:"".concat(r,"-content"),children:a})),y&&(R=y(R)),S(Za,{visible:n,ref:k,removeOnLeave:!0,...v,children:function(A,I){var O=A.className,N=A.style,L=Qe(r,o,O);return S("div",{ref:I,className:L,onClick:w,style:ve(ve({},N),T),children:R})}})});eN.displayName="MobilePopupInner";var iZ=["visible","mobile"],tN=C.exports.forwardRef(function(e,t){var r=e.visible,n=e.mobile,i=Mr(e,iZ),a=C.exports.useState(r),u=Le(a,2),o=u[0],f=u[1],p=C.exports.useState(!1),v=Le(p,2),y=v[0],w=v[1],k=ve(ve({},i),{},{visible:o});C.exports.useEffect(function(){f(r),r&&n&&w(AA())},[r,n]);var T=y?S(eN,{...k,mobile:n,ref:t}):S(JA,{...k,ref:t});return Xe("div",{children:[S(SG,{...k}),T]})});tN.displayName="Popup";var ZT=C.exports.createContext(null);function e2(){}function oZ(){return""}function aZ(e){return e?e.ownerDocument:window.document}var sZ=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function lZ(e){var t=function(r){vi(i,r);var n=gi(i);function i(a){var u;Qn(this,i),u=n.call(this,a),se(Nr(u),"popupRef",C.exports.createRef()),se(Nr(u),"triggerRef",C.exports.createRef()),se(Nr(u),"portalContainer",void 0),se(Nr(u),"attachId",void 0),se(Nr(u),"clickOutsideHandler",void 0),se(Nr(u),"touchOutsideHandler",void 0),se(Nr(u),"contextMenuOutsideHandler1",void 0),se(Nr(u),"contextMenuOutsideHandler2",void 0),se(Nr(u),"mouseDownTimeout",void 0),se(Nr(u),"focusTime",void 0),se(Nr(u),"preClickTime",void 0),se(Nr(u),"preTouchTime",void 0),se(Nr(u),"delayTimer",void 0),se(Nr(u),"hasPopupMouseDown",void 0),se(Nr(u),"onMouseEnter",function(f){var p=u.props.mouseEnterDelay;u.fireEvents("onMouseEnter",f),u.delaySetPopupVisible(!0,p,p?null:f)}),se(Nr(u),"onMouseMove",function(f){u.fireEvents("onMouseMove",f),u.setPoint(f)}),se(Nr(u),"onMouseLeave",function(f){u.fireEvents("onMouseLeave",f),u.delaySetPopupVisible(!1,u.props.mouseLeaveDelay)}),se(Nr(u),"onPopupMouseEnter",function(){u.clearDelayTimer()}),se(Nr(u),"onPopupMouseLeave",function(f){var p;f.relatedTarget&&!f.relatedTarget.setTimeout&&Jc((p=u.popupRef.current)===null||p===void 0?void 0:p.getElement(),f.relatedTarget)||u.delaySetPopupVisible(!1,u.props.mouseLeaveDelay)}),se(Nr(u),"onFocus",function(f){u.fireEvents("onFocus",f),u.clearDelayTimer(),u.isFocusToShow()&&(u.focusTime=Date.now(),u.delaySetPopupVisible(!0,u.props.focusDelay))}),se(Nr(u),"onMouseDown",function(f){u.fireEvents("onMouseDown",f),u.preClickTime=Date.now()}),se(Nr(u),"onTouchStart",function(f){u.fireEvents("onTouchStart",f),u.preTouchTime=Date.now()}),se(Nr(u),"onBlur",function(f){u.fireEvents("onBlur",f),u.clearDelayTimer(),u.isBlurToHide()&&u.delaySetPopupVisible(!1,u.props.blurDelay)}),se(Nr(u),"onContextMenu",function(f){f.preventDefault(),u.fireEvents("onContextMenu",f),u.setPopupVisible(!0,f)}),se(Nr(u),"onContextMenuClose",function(){u.isContextMenuToShow()&&u.close()}),se(Nr(u),"onClick",function(f){if(u.fireEvents("onClick",f),u.focusTime){var p;if(u.preClickTime&&u.preTouchTime?p=Math.min(u.preClickTime,u.preTouchTime):u.preClickTime?p=u.preClickTime:u.preTouchTime&&(p=u.preTouchTime),Math.abs(p-u.focusTime)<20)return;u.focusTime=0}u.preClickTime=0,u.preTouchTime=0,u.isClickToShow()&&(u.isClickToHide()||u.isBlurToHide())&&f&&f.preventDefault&&f.preventDefault();var v=!u.state.popupVisible;(u.isClickToHide()&&!v||v&&u.isClickToShow())&&u.setPopupVisible(!u.state.popupVisible,f)}),se(Nr(u),"onPopupMouseDown",function(){if(u.hasPopupMouseDown=!0,clearTimeout(u.mouseDownTimeout),u.mouseDownTimeout=window.setTimeout(function(){u.hasPopupMouseDown=!1},0),u.context){var f;(f=u.context).onPopupMouseDown.apply(f,arguments)}}),se(Nr(u),"onDocumentClick",function(f){if(!(u.props.mask&&!u.props.maskClosable)){var p=f.target,v=u.getRootDomNode(),y=u.getPopupDomNode();(!Jc(v,p)||u.isContextMenuOnly())&&!Jc(y,p)&&!u.hasPopupMouseDown&&u.close()}}),se(Nr(u),"getRootDomNode",function(){var f=u.props.getTriggerDOMNode;if(f)return f(u.triggerRef.current);try{var p=jm(u.triggerRef.current);if(p)return p}catch{}return ad.findDOMNode(Nr(u))}),se(Nr(u),"getPopupClassNameFromAlign",function(f){var p=[],v=u.props,y=v.popupPlacement,w=v.builtinPlacements,k=v.prefixCls,T=v.alignPoint,R=v.getPopupClassNameFromAlign;return y&&w&&p.push(CG(w,k,f,T)),R&&p.push(R(f)),p.join(" ")}),se(Nr(u),"getComponent",function(){var f=u.props,p=f.prefixCls,v=f.destroyPopupOnHide,y=f.popupClassName,w=f.onPopupAlign,k=f.popupMotion,T=f.popupAnimation,R=f.popupTransitionName,A=f.popupStyle,I=f.mask,O=f.maskAnimation,N=f.maskTransitionName,L=f.maskMotion,B=f.zIndex,j=f.popup,G=f.stretch,H=f.alignPoint,te=f.mobile,Y=f.forceRender,le=f.onPopupClick,J=u.state,Z=J.popupVisible,Q=J.point,ge=u.getPopupAlign(),ne={};return u.isMouseEnterToShow()&&(ne.onMouseEnter=u.onPopupMouseEnter),u.isMouseLeaveToHide()&&(ne.onMouseLeave=u.onPopupMouseLeave),ne.onMouseDown=u.onPopupMouseDown,ne.onTouchStart=u.onPopupMouseDown,S(tN,{prefixCls:p,destroyPopupOnHide:v,visible:Z,point:H&&Q,className:y,align:ge,onAlign:w,animation:T,getClassNameFromAlign:u.getPopupClassNameFromAlign,...ne,stretch:G,getRootDomNode:u.getRootDomNode,style:A,mask:I,zIndex:B,transitionName:R,maskAnimation:O,maskTransitionName:N,maskMotion:L,ref:u.popupRef,motion:k,mobile:te,forceRender:Y,onClick:le,children:typeof j=="function"?j():j})}),se(Nr(u),"attachParent",function(f){rn.cancel(u.attachId);var p=u.props,v=p.getPopupContainer,y=p.getDocument,w=u.getRootDomNode(),k;v?(w||v.length===0)&&(k=v(w)):k=y(u.getRootDomNode()).body,k?k.appendChild(f):u.attachId=rn(function(){u.attachParent(f)})}),se(Nr(u),"getContainer",function(){if(!u.portalContainer){var f=u.props.getDocument,p=f(u.getRootDomNode()).createElement("div");p.style.position="absolute",p.style.top="0",p.style.left="0",p.style.width="100%",u.portalContainer=p}return u.attachParent(u.portalContainer),u.portalContainer}),se(Nr(u),"setPoint",function(f){var p=u.props.alignPoint;!p||!f||u.setState({point:{pageX:f.pageX,pageY:f.pageY}})}),se(Nr(u),"handlePortalUpdate",function(){u.state.prevPopupVisible!==u.state.popupVisible&&u.props.afterPopupVisibleChange(u.state.popupVisible)}),se(Nr(u),"triggerContextValue",{onPopupMouseDown:u.onPopupMouseDown});var o;return"popupVisible"in a?o=!!a.popupVisible:o=!!a.defaultPopupVisible,u.state={prevPopupVisible:o,popupVisible:o},sZ.forEach(function(f){u["fire".concat(f)]=function(p){u.fireEvents(f,p)}}),u}return Jn(i,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var u=this.props,o=this.state;if(o.popupVisible){var f;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(f=u.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Tl(f,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(f=f||u.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Tl(f,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(f=f||u.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Tl(f,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Tl(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),rn.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var u;return((u=this.popupRef.current)===null||u===void 0?void 0:u.getElement())||null}},{key:"getPopupAlign",value:function(){var u=this.props,o=u.popupPlacement,f=u.popupAlign,p=u.builtinPlacements;return o&&p?wG(p,o,f):f}},{key:"setPopupVisible",value:function(u,o){var f=this.props.alignPoint,p=this.state.popupVisible;this.clearDelayTimer(),p!==u&&("popupVisible"in this.props||this.setState({popupVisible:u,prevPopupVisible:p}),this.props.onPopupVisibleChange(u)),f&&o&&u&&this.setPoint(o)}},{key:"delaySetPopupVisible",value:function(u,o,f){var p=this,v=o*1e3;if(this.clearDelayTimer(),v){var y=f?{pageX:f.pageX,pageY:f.pageY}:null;this.delayTimer=window.setTimeout(function(){p.setPopupVisible(u,y),p.clearDelayTimer()},v)}else this.setPopupVisible(u,f)}},{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(u){var o=this.props.children.props,f=this.props;return o[u]&&f[u]?this["fire".concat(u)]:o[u]||f[u]}},{key:"isClickToShow",value:function(){var u=this.props,o=u.action,f=u.showAction;return o.indexOf("click")!==-1||f.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var u=this.props.action;return u==="contextMenu"||u.length===1&&u[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var u=this.props,o=u.action,f=u.showAction;return o.indexOf("contextMenu")!==-1||f.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var u=this.props,o=u.action,f=u.hideAction;return o.indexOf("click")!==-1||f.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var u=this.props,o=u.action,f=u.showAction;return o.indexOf("hover")!==-1||f.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var u=this.props,o=u.action,f=u.hideAction;return o.indexOf("hover")!==-1||f.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var u=this.props,o=u.action,f=u.showAction;return o.indexOf("focus")!==-1||f.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var u=this.props,o=u.action,f=u.hideAction;return o.indexOf("focus")!==-1||f.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var u;(u=this.popupRef.current)===null||u===void 0||u.forceAlign()}}},{key:"fireEvents",value:function(u,o){var f=this.props.children.props[u];f&&f(o);var p=this.props[u];p&&p(o)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var u=this.state.popupVisible,o=this.props,f=o.children,p=o.forceRender,v=o.alignPoint,y=o.className,w=o.autoDestroy,k=C.exports.Children.only(f),T={key:"trigger"};this.isContextMenuToShow()?T.onContextMenu=this.onContextMenu:T.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(T.onClick=this.onClick,T.onMouseDown=this.onMouseDown,T.onTouchStart=this.onTouchStart):(T.onClick=this.createTwoChains("onClick"),T.onMouseDown=this.createTwoChains("onMouseDown"),T.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(T.onMouseEnter=this.onMouseEnter,v&&(T.onMouseMove=this.onMouseMove)):T.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?T.onMouseLeave=this.onMouseLeave:T.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(T.onFocus=this.onFocus,T.onBlur=this.onBlur):(T.onFocus=this.createTwoChains("onFocus"),T.onBlur=this.createTwoChains("onBlur"));var R=Qe(k&&k.props&&k.props.className,y);R&&(T.className=R);var A=ve({},T);md(k)&&(A.ref=ta(this.triggerRef,k.ref));var I=C.exports.cloneElement(k,A),O;return(u||this.popupRef.current||p)&&(O=S(e,{getContainer:this.getContainer,didUpdate:this.handlePortalUpdate,children:this.getComponent()},"portal")),!u&&w&&(O=null),Xe(ZT.Provider,{value:this.triggerContextValue,children:[I,O]})}}],[{key:"getDerivedStateFromProps",value:function(u,o){var f=u.popupVisible,p={};return f!==void 0&&o.popupVisible!==f&&(p.popupVisible=f,p.prevPopupVisible=o.popupVisible),p}}]),i}(C.exports.Component);return se(t,"contextType",ZT),se(t,"defaultProps",{prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:oZ,getDocument:aZ,onPopupVisibleChange:e2,afterPopupVisibleChange:e2,onPopupAlign:e2,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 vx=lZ(_G);var uZ=["prefixCls","disabled","visible","children","popupElement","containerWidth","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],cZ=function(t){var r=t===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:r,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:r,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:r,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:r,adjustY:1}}}},dZ=function(t,r){var n=t.prefixCls;t.disabled;var i=t.visible,a=t.children,u=t.popupElement,o=t.containerWidth,f=t.animation,p=t.transitionName,v=t.dropdownStyle,y=t.dropdownClassName,w=t.direction,k=w===void 0?"ltr":w,T=t.placement,R=t.dropdownMatchSelectWidth,A=t.dropdownRender,I=t.dropdownAlign,O=t.getPopupContainer,N=t.empty,L=t.getTriggerDOMNode,B=t.onPopupVisibleChange,j=t.onPopupMouseEnter,G=Mr(t,uZ),H="".concat(n,"-dropdown"),te=u;A&&(te=A(u));var Y=C.exports.useMemo(function(){return cZ(R)},[R]),le=f?"".concat(H,"-").concat(f):p,J=C.exports.useRef(null);C.exports.useImperativeHandle(r,function(){return{getPopupElement:function(){return J.current}}});var Z=ve({minWidth:o},v);return typeof R=="number"?Z.width=R:R&&(Z.width=o),S(vx,{...G,showAction:B?["click"]:[],hideAction:B?["click"]:[],popupPlacement:T||(k==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Y,prefixCls:H,popupTransitionName:le,popup:S("div",{ref:J,onMouseEnter:j,children:te}),popupAlign:I,popupVisible:i,getPopupContainer:O,popupClassName:Qe(y,se({},"".concat(H,"-empty"),N)),popupStyle:Z,getTriggerDOMNode:L,onPopupVisibleChange:B,children:a})},rN=C.exports.forwardRef(dZ);rN.displayName="SelectTrigger";function XT(e,t){var r=e.key,n;return"value"in e&&(n=e.value),r!=null?r:n!==void 0?n:"rc-index-key-".concat(t)}function nN(e,t){var r=e||{},n=r.label,i=r.value,a=r.options;return{label:n||(t?"children":"label"),value:i||"value",options:a||"options"}}function fZ(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.fieldNames,n=t.childrenAsData,i=[],a=nN(r,!1),u=a.label,o=a.value,f=a.options;function p(v,y){v.forEach(function(w){var k=w[u];if(y||!(f in w)){var T=w[o];i.push({key:XT(w,i.length),groupOption:y,data:w,label:k,value:T})}else{var R=k;R===void 0&&n&&(R=w.label),i.push({key:XT(w,i.length),group:!0,data:w,label:R}),p(w[f],!0)}})}return p(e,!1),i}function k4(e){var t=ve({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Bn(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}function hZ(e,t){if(!t||!t.length)return null;var r=!1;function n(a,u){var o=U3(u),f=o[0],p=o.slice(1);if(!f)return[a];var v=a.split(f);return r=r||v.length>1,v.reduce(function(y,w){return[].concat(wt(y),wt(n(w,p)))},[]).filter(function(y){return y})}var i=n(e,t);return r?i:null}var pZ=["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"],mZ=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function T4(e){return e==="tags"||e==="multiple"}var iN=C.exports.forwardRef(function(e,t){var r,n,i=e.id,a=e.prefixCls,u=e.className,o=e.showSearch,f=e.tagRender,p=e.direction,v=e.omitDomProps,y=e.displayValues,w=e.onDisplayValuesChange,k=e.emptyOptions,T=e.notFoundContent,R=T===void 0?"Not Found":T,A=e.onClear,I=e.mode,O=e.disabled,N=e.loading,L=e.getInputElement,B=e.getRawInputElement,j=e.open,G=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,ne=e.tokenSeparators,de=e.allowClear,oe=e.showArrow,ye=e.inputIcon,Re=e.clearIcon,Te=e.OptionList,ke=e.animation,ze=e.transitionName,Ie=e.dropdownStyle,Ne=e.dropdownClassName,De=e.dropdownMatchSelectWidth,Ve=e.dropdownRender,Ge=e.dropdownAlign,je=e.placement,ct=e.getPopupContainer,pt=e.showAction,Tt=pt===void 0?[]:pt,Ye=e.onFocus,Pt=e.onBlur,mt=e.onKeyUp,It=e.onKeyDown,Ct=e.onMouseDown,Dt=Mr(e,pZ),lt=T4(I),dt=(o!==void 0?o:lt)||I==="combobox",ut=ve({},Dt);mZ.forEach(function(Pr){delete ut[Pr]}),v==null||v.forEach(function(Pr){delete ut[Pr]});var it=C.exports.useState(!1),ft=Le(it,2),xt=ft[0],Wt=ft[1];C.exports.useEffect(function(){Wt(AA())},[]);var jt=C.exports.useRef(null),Qt=C.exports.useRef(null),Fe=C.exports.useRef(null),qe=C.exports.useRef(null),Xt=C.exports.useRef(null),cr=qq(),Vt=Le(cr,3),Ut=Vt[0],rr=Vt[1],xr=Vt[2];C.exports.useImperativeHandle(t,function(){var Pr,Sr;return{focus:(Pr=qe.current)===null||Pr===void 0?void 0:Pr.focus,blur:(Sr=qe.current)===null||Sr===void 0?void 0:Sr.blur,scrollTo:function(ei){var yn;return(yn=Xt.current)===null||yn===void 0?void 0:yn.scrollTo(ei)}}});var Or=C.exports.useMemo(function(){var Pr;if(I!=="combobox")return J;var Sr=(Pr=y[0])===null||Pr===void 0?void 0:Pr.value;return typeof Sr=="string"||typeof Sr=="number"?String(Sr):""},[J,I,y]),_t=I==="combobox"&&typeof L=="function"&&L()||null,qt=typeof B=="function"&&B(),or=Y7(Qt,qt==null||(r=qt.props)===null||r===void 0?void 0:r.ref),$r=Yi(void 0,{defaultValue:G,value:j}),kr=Le($r,2),Lt=kr[0],Tr=kr[1],Cr=Lt,fr=!R&&k;(O||fr&&Cr&&I==="combobox")&&(Cr=!1);var Nt=fr?!1:Cr,ot=C.exports.useCallback(function(Pr){var Sr=Pr!==void 0?Pr:!Cr;O||(Tr(Sr),Cr!==Sr&&(H==null||H(Sr)))},[O,Cr,Tr,H]),ht=C.exports.useMemo(function(){return(ne||[]).some(function(Pr){return[`
`,`\r
`].includes(Pr)})},[ne]),Ot=function(Sr,Rr,ei){var yn=!0,Ur=Sr;Y==null||Y(null);var Lr=ei?null:hZ(Sr,ne);return I!=="combobox"&&Lr&&(Ur="",ge==null||ge(Lr),ot(!1),yn=!1),Q&&Or!==Ur&&Q(Ur,{source:Rr?"typing":"effect"}),yn},$t=function(Sr){!Sr||!Sr.trim()||Q(Sr,{source:"submit"})};C.exports.useEffect(function(){!Cr&&!lt&&I!=="combobox"&&Ot("",!1,!1)},[Cr]),C.exports.useEffect(function(){Lt&&O&&Tr(!1),O&&rr(!1)},[O]);var ur=DA(),Ir=Le(ur,2),qr=Ir[0],Gr=Ir[1],me=function(Sr){var Rr=qr(),ei=Sr.which;if(ei===Et.ENTER&&(I!=="combobox"&&Sr.preventDefault(),Cr||ot(!0)),Gr(!!Or),ei===Et.BACKSPACE&&!Rr&&lt&&!Or&&y.length){for(var yn=wt(y),Ur=null,Lr=yn.length-1;Lr>=0;Lr-=1){var Yr=yn[Lr];if(!Yr.disabled){yn.splice(Lr,1),Ur=Yr;break}}Ur&&w(yn,{type:"remove",values:[Ur]})}for(var wn=arguments.length,Sn=new Array(wn>1?wn-1:0),jn=1;jn<wn;jn++)Sn[jn-1]=arguments[jn];if(Cr&&Xt.current){var bo;(bo=Xt.current).onKeyDown.apply(bo,[Sr].concat(Sn))}It==null||It.apply(void 0,[Sr].concat(Sn))},K=function(Sr){for(var Rr=arguments.length,ei=new Array(Rr>1?Rr-1:0),yn=1;yn<Rr;yn++)ei[yn-1]=arguments[yn];if(Cr&&Xt.current){var Ur;(Ur=Xt.current).onKeyUp.apply(Ur,[Sr].concat(ei))}mt==null||mt.apply(void 0,[Sr].concat(ei))},q=function(Sr){var Rr=y.filter(function(ei){return ei!==Sr});w(Rr,{type:"remove",values:[Sr]})},ce=C.exports.useRef(!1),ae=function(){rr(!0),O||(Ye&&!ce.current&&Ye.apply(void 0,arguments),Tt.includes("focus")&&ot(!0)),ce.current=!0},xe=function(){rr(!1,function(){ce.current=!1,ot(!1)}),!O&&(Or&&(I==="tags"?Q(Or,{source:"submit"}):I==="multiple"&&Q("",{source:"blur"})),Pt&&Pt.apply(void 0,arguments))},Ee=[];C.exports.useEffect(function(){return function(){Ee.forEach(function(Pr){return clearTimeout(Pr)}),Ee.splice(0,Ee.length)}},[]);var be=function(Sr){var Rr,ei=Sr.target,yn=(Rr=Fe.current)===null||Rr===void 0?void 0:Rr.getPopupElement();if(yn&&yn.contains(ei)){var Ur=setTimeout(function(){var Sn=Ee.indexOf(Ur);if(Sn!==-1&&Ee.splice(Sn,1),xr(),!xt&&!yn.contains(document.activeElement)){var jn;(jn=qe.current)===null||jn===void 0||jn.focus()}});Ee.push(Ur)}for(var Lr=arguments.length,Yr=new Array(Lr>1?Lr-1:0),wn=1;wn<Lr;wn++)Yr[wn-1]=arguments[wn];Ct==null||Ct.apply(void 0,[Sr].concat(Yr))},Ce=C.exports.useState(null),Ae=Le(Ce,2),He=Ae[0],We=Ae[1],Be=C.exports.useState({}),At=Le(Be,2),bt=At[1];function Je(){bt({})}mi(function(){if(Nt){var Pr,Sr=Math.ceil((Pr=jt.current)===null||Pr===void 0?void 0:Pr.offsetWidth);He!==Sr&&!Number.isNaN(Sr)&&We(Sr)}},[Nt]);var Rt;qt&&(Rt=function(Sr){ot(Sr)}),Gq(function(){var Pr;return[jt.current,(Pr=Fe.current)===null||Pr===void 0?void 0:Pr.getPopupElement()]},Nt,ot,!!qt);var Bt=C.exports.useMemo(function(){return ve(ve({},e),{},{notFoundContent:R,open:Cr,triggerOpen:Nt,id:i,showSearch:dt,multiple:lt,toggleOpen:ot})},[e,R,Nt,Cr,i,dt,lt,ot]),vr=oe!==void 0?oe:N||!lt&&I!=="combobox",ir;vr&&(ir=S(J0,{className:Qe("".concat(a,"-arrow"),se({},"".concat(a,"-arrow-loading"),N)),customizeIcon:ye,customizeIconProps:{loading:N,searchValue:Or,open:Cr,focused:Ut,showSearch:dt}}));var gr,Br=function(){var Sr;A==null||A(),(Sr=qe.current)===null||Sr===void 0||Sr.focus(),w([],{type:"clear",values:y}),Ot("",!1,!1)};!O&&de&&(y.length||Or)&&!(I==="combobox"&&Or==="")&&(gr=S(J0,{className:"".concat(a,"-clear"),onMouseDown:Br,customizeIcon:Re,children:"\xD7"}));var Jr=S(Te,{ref:Xt}),Vn=Qe(a,u,(n={},se(n,"".concat(a,"-focused"),Ut),se(n,"".concat(a,"-multiple"),lt),se(n,"".concat(a,"-single"),!lt),se(n,"".concat(a,"-allow-clear"),de),se(n,"".concat(a,"-show-arrow"),vr),se(n,"".concat(a,"-disabled"),O),se(n,"".concat(a,"-loading"),N),se(n,"".concat(a,"-open"),Cr),se(n,"".concat(a,"-customize-input"),_t),se(n,"".concat(a,"-show-search"),dt),n)),an=S(rN,{ref:Fe,disabled:O,prefixCls:a,visible:Nt,popupElement:Jr,containerWidth:He,animation:ke,transitionName:ze,dropdownStyle:Ie,dropdownClassName:Ne,direction:p,dropdownMatchSelectWidth:De,dropdownRender:Ve,dropdownAlign:Ge,placement:je,getPopupContainer:ct,empty:k,getTriggerDOMNode:function(){return Qt.current},onPopupVisibleChange:Rt,onPopupMouseEnter:Je,children:qt?C.exports.cloneElement(qt,{ref:or}):S(jA,{...e,domRef:Qt,prefixCls:a,inputElement:_t,ref:qe,id:i,showSearch:dt,autoClearSearchValue:Z,mode:I,activeDescendantId:le,tagRender:f,values:y,open:Cr,onToggleOpen:ot,activeValue:te,searchValue:Or,onSearch:Ot,onSearchSubmit:$t,onRemove:q,tokenWithEnter:ht})}),An;return qt?An=an:An=Xe("div",{className:Vn,...ut,ref:jt,onMouseDown:be,onKeyDown:me,onKeyUp:K,onFocus:ae,onBlur:xe,children:[Ut&&!Cr&&S("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite",children:"".concat(y.map(function(Pr){var Sr=Pr.label,Rr=Pr.value;return["number","string"].includes(ar(Sr))?Sr:Rr}).join(", "))}),an,ir,gr]}),S(NA.Provider,{value:Bt,children:An})});const vZ=function(e,t){var r=C.exports.useRef({values:new Map,options:new Map}),n=C.exports.useMemo(function(){var a=r.current,u=a.values,o=a.options,f=e.map(function(y){if(y.label===void 0){var w;return ve(ve({},y),{},{label:(w=u.get(y.value))===null||w===void 0?void 0:w.label})}return y}),p=new Map,v=new Map;return f.forEach(function(y){p.set(y.value,y),v.set(y.value,t.get(y.value)||o.get(y.value))}),r.current.values=p,r.current.options=v,f},[e,t]),i=C.exports.useCallback(function(a){return t.get(a)||r.current.options.get(a)},[t]);return[n,i]};function t2(e,t){return BA(e).join("").toUpperCase().includes(t)}const gZ=function(e,t,r,n,i){return C.exports.useMemo(function(){if(!r||n===!1)return e;var a=t.options,u=t.label,o=t.value,f=[],p=typeof n=="function",v=r.toUpperCase(),y=p?n:function(k,T){return i?t2(T[i],v):T[a]?t2(T[u!=="children"?u:"label"],v):t2(T[o],v)},w=p?function(k){return k4(k)}:function(k){return k};return e.forEach(function(k){if(k[a]){var T=y(r,w(k));if(T)f.push(k);else{var R=k[a].filter(function(A){return y(r,w(A))});R.length&&f.push(ve(ve({},k),{},se({},a,R)))}return}y(r,w(k))&&f.push(k)}),f},[e,n,i,r,t])};var YT=0,yZ=Lo();function xZ(){var e;return yZ?(e=YT,YT+=1):e="TEST_OR_SSR",e}function oN(e){var t=C.exports.useState(),r=Le(t,2),n=r[0],i=r[1];return C.exports.useEffect(function(){i("rc_select_".concat(xZ()))},[]),e||n}var _Z=["children","value"],bZ=["children"];function wZ(e){var t=e,r=t.key,n=t.props,i=n.children,a=n.value,u=Mr(n,_Z);return ve({key:r,value:a!==void 0?a:r,children:i},u)}function aN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return lo(e).map(function(r,n){if(!C.exports.isValidElement(r)||!r.type)return null;var i=r,a=i.type.isSelectOptGroup,u=i.key,o=i.props,f=o.children,p=Mr(o,bZ);return t||!a?wZ(r):ve(ve({key:"__RC_SELECT_GRP__".concat(u===null?n:u,"__"),label:u},p),{},{options:aN(f)})}).filter(function(r){return r})}function CZ(e,t,r,n,i){return C.exports.useMemo(function(){var a=e,u=!e;u&&(a=aN(t));var o=new Map,f=new Map,p=function(w,k,T){T&&typeof T=="string"&&w.set(k[T],k)};function v(y){for(var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,k=0;k<y.length;k+=1){var T=y[k];!T[r.options]||w?(o.set(T[r.value],T),p(f,T,r.label),p(f,T,n),p(f,T,i)):v(T[r.options],!0)}}return v(a),{options:a,valueOptions:o,labelOptions:f}},[e,t,r,n,i])}function QT(e){var t=C.exports.useRef();t.current=e;var r=C.exports.useCallback(function(){return t.current.apply(t,arguments)},[]);return r}var fS=function(){return null};fS.isSelectOptGroup=!0;var hS=function(){return null};hS.isSelectOption=!0;var sN=C.exports.forwardRef(function(e,t){var r=e.height,n=e.offset,i=e.children,a=e.prefixCls,u=e.onInnerResize,o=e.innerProps,f={},p={display:"flex",flexDirection:"column"};return n!==void 0&&(f={height:r,position:"relative",overflow:"hidden"},p=ve(ve({},p),{},{transform:"translateY(".concat(n,"px)"),position:"absolute",left:0,right:0,top:0})),S("div",{style:f,children:S(Kl,{onResize:function(y){var w=y.offsetHeight;w&&u&&u()},children:S("div",{style:p,className:Qe(se({},"".concat(a,"-holder-inner"),a)),ref:t,...o,children:i})})})});sN.displayName="Filler";var SZ=20;function JT(e){return"touches"in e?e.touches[0].pageY:e.pageY}var EZ=function(e){vi(r,e);var t=gi(r);function r(){var n;Qn(this,r);for(var i=arguments.length,a=new Array(i),u=0;u<i;u++)a[u]=arguments[u];return n=t.call.apply(t,[this].concat(a)),n.moveRaf=null,n.scrollbarRef=C.exports.createRef(),n.thumbRef=C.exports.createRef(),n.visibleTimeout=null,n.state={dragging:!1,pageY:null,startTop:null,visible:!1},n.delayHidden=function(){clearTimeout(n.visibleTimeout),n.setState({visible:!0}),n.visibleTimeout=setTimeout(function(){n.setState({visible:!1})},2e3)},n.onScrollbarTouchStart=function(o){o.preventDefault()},n.onContainerMouseDown=function(o){o.stopPropagation(),o.preventDefault()},n.patchEvents=function(){window.addEventListener("mousemove",n.onMouseMove),window.addEventListener("mouseup",n.onMouseUp),n.thumbRef.current.addEventListener("touchmove",n.onMouseMove),n.thumbRef.current.addEventListener("touchend",n.onMouseUp)},n.removeEvents=function(){var o;window.removeEventListener("mousemove",n.onMouseMove),window.removeEventListener("mouseup",n.onMouseUp),(o=n.scrollbarRef.current)===null||o===void 0||o.removeEventListener("touchstart",n.onScrollbarTouchStart),n.thumbRef.current&&(n.thumbRef.current.removeEventListener("touchstart",n.onMouseDown),n.thumbRef.current.removeEventListener("touchmove",n.onMouseMove),n.thumbRef.current.removeEventListener("touchend",n.onMouseUp)),rn.cancel(n.moveRaf)},n.onMouseDown=function(o){var f=n.props.onStartMove;n.setState({dragging:!0,pageY:JT(o),startTop:n.getTop()}),f(),n.patchEvents(),o.stopPropagation(),o.preventDefault()},n.onMouseMove=function(o){var f=n.state,p=f.dragging,v=f.pageY,y=f.startTop,w=n.props.onScroll;if(rn.cancel(n.moveRaf),p){var k=JT(o)-v,T=y+k,R=n.getEnableScrollRange(),A=n.getEnableHeightRange(),I=A?T/A:0,O=Math.ceil(I*R);n.moveRaf=rn(function(){w(O)})}},n.onMouseUp=function(){var o=n.props.onStopMove;n.setState({dragging:!1}),o(),n.removeEvents()},n.getSpinHeight=function(){var o=n.props,f=o.height,p=o.count,v=f/p*10;return v=Math.max(v,SZ),v=Math.min(v,f/2),Math.floor(v)},n.getEnableScrollRange=function(){var o=n.props,f=o.scrollHeight,p=o.height;return f-p||0},n.getEnableHeightRange=function(){var o=n.props.height,f=n.getSpinHeight();return o-f||0},n.getTop=function(){var o=n.props.scrollTop,f=n.getEnableScrollRange(),p=n.getEnableHeightRange();if(o===0||f===0)return 0;var v=o/f;return v*p},n.showScroll=function(){var o=n.props,f=o.height,p=o.scrollHeight;return p>f},n}return Jn(r,[{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,a=i.dragging,u=i.visible,o=this.props.prefixCls,f=this.getSpinHeight(),p=this.getTop(),v=this.showScroll(),y=v&&u;return S("div",{ref:this.scrollbarRef,className:Qe("".concat(o,"-scrollbar"),se({},"".concat(o,"-scrollbar-show"),v)),style:{width:8,top:0,bottom:0,right:0,position:"absolute",display:y?null:"none"},onMouseDown:this.onContainerMouseDown,onMouseMove:this.delayHidden,children:S("div",{ref:this.thumbRef,className:Qe("".concat(o,"-scrollbar-thumb"),se({},"".concat(o,"-scrollbar-thumb-moving"),a)),style:{width:"100%",height:f,top:p,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"},onMouseDown:this.onMouseDown})})}}]),r}(C.exports.Component);function kZ(e){var t=e.children,r=e.setRef,n=C.exports.useCallback(function(i){r(i)},[]);return C.exports.cloneElement(t,{ref:n})}function TZ(e,t,r,n,i,a){var u=a.getKey;return e.slice(t,r+1).map(function(o,f){var p=t+f,v=i(o,p,{}),y=u(o);return S(kZ,{setRef:function(k){return n(o,k)},children:v},y)})}var PZ=function(){function e(){Qn(this,e),this.maps=void 0,this.maps=Object.create(null)}return Jn(e,[{key:"set",value:function(r,n){this.maps[r]=n}},{key:"get",value:function(r){return this.maps[r]}}]),e}();function MZ(e,t,r){var n=C.exports.useState(0),i=Le(n,2),a=i[0],u=i[1],o=C.exports.useRef(new Map),f=C.exports.useRef(new PZ),p=C.exports.useRef();function v(){rn.cancel(p.current)}function y(){v(),p.current=rn(function(){o.current.forEach(function(k,T){if(k&&k.offsetParent){var R=jm(k),A=R.offsetHeight;f.current.get(T)!==A&&f.current.set(T,R.offsetHeight)}}),u(function(k){return k+1})})}function w(k,T){var R=e(k),A=o.current.get(R);T?(o.current.set(R,T),y()):o.current.delete(R),!A!=!T&&(T?t==null||t(k):r==null||r(k))}return C.exports.useEffect(function(){return v},[]),[w,y,f.current,a]}function IZ(e,t,r,n,i,a,u,o){var f=C.exports.useRef();return function(p){if(p==null){o();return}if(rn.cancel(f.current),typeof p=="number")u(p);else if(p&&ar(p)==="object"){var v,y=p.align;"index"in p?v=p.index:v=t.findIndex(function(R){return i(R)===p.key});var w=p.offset,k=w===void 0?0:w,T=function R(A,I){if(!(A<0||!e.current)){var O=e.current.clientHeight,N=!1,L=I;if(O){for(var B=I||y,j=0,G=0,H=0,te=Math.min(t.length,v),Y=0;Y<=te;Y+=1){var le=i(t[Y]);G=j;var J=r.get(le);H=G+(J===void 0?n:J),j=H,Y===v&&J===void 0&&(N=!0)}var Z=null;switch(B){case"top":Z=G-k;break;case"bottom":Z=H-O+k;break;default:{var Q=e.current.scrollTop,ge=Q+O;G<Q?L="top":H>ge&&(L="bottom")}}Z!==null&&Z!==e.current.scrollTop&&u(Z)}f.current=rn(function(){N&&a(),R(A-1,L)},2)}};T(3)}}}function RZ(e,t,r){var n=e.length,i=t.length,a,u;if(n===0&&i===0)return null;n<i?(a=e,u=t):(a=t,u=e);var o={__EMPTY_ITEM__:!0};function f(T){return T!==void 0?r(T):o}for(var p=null,v=Math.abs(n-i)!==1,y=0;y<u.length;y+=1){var w=f(a[y]),k=f(u[y]);if(w!==k){p=y,v=v||w!==f(u[y+1]);break}}return p===null?null:{index:p,multiple:v}}function OZ(e,t,r){var n=C.exports.useState(e),i=Le(n,2),a=i[0],u=i[1],o=C.exports.useState(null),f=Le(o,2),p=f[0],v=f[1];return C.exports.useEffect(function(){var y=RZ(a||[],e||[],t);(y==null?void 0:y.index)!==void 0&&(r==null||r(y.index),v(e[y.index])),u(e)},[e]),[p]}var AZ=(typeof navigator>"u"?"undefined":ar(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const lN=function(e,t){var r=C.exports.useRef(!1),n=C.exports.useRef(null);function i(){clearTimeout(n.current),r.current=!0,n.current=setTimeout(function(){r.current=!1},50)}var a=C.exports.useRef({top:e,bottom:t});return a.current.top=e,a.current.bottom=t,function(u){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,f=u<0&&a.current.top||u>0&&a.current.bottom;return o&&f?(clearTimeout(n.current),r.current=!1):(!f||r.current)&&i(),!r.current&&f}};function NZ(e,t,r,n){var i=C.exports.useRef(0),a=C.exports.useRef(null),u=C.exports.useRef(null),o=C.exports.useRef(!1),f=lN(t,r);function p(y){if(!!e){rn.cancel(a.current);var w=y.deltaY;i.current+=w,u.current=w,!f(w)&&(AZ||y.preventDefault(),a.current=rn(function(){var k=o.current?10:1;n(i.current*k),i.current=0}))}}function v(y){!e||(o.current=y.detail===u.current)}return[p,v]}var zZ=14/15;function DZ(e,t,r){var n=C.exports.useRef(!1),i=C.exports.useRef(0),a=C.exports.useRef(null),u=C.exports.useRef(null),o,f=function(w){if(n.current){var k=Math.ceil(w.touches[0].pageY),T=i.current-k;i.current=k,r(T)&&w.preventDefault(),clearInterval(u.current),u.current=setInterval(function(){T*=zZ,(!r(T,!0)||Math.abs(T)<=.1)&&clearInterval(u.current)},16)}},p=function(){n.current=!1,o()},v=function(w){o(),w.touches.length===1&&!n.current&&(n.current=!0,i.current=Math.ceil(w.touches[0].pageY),a.current=w.target,a.current.addEventListener("touchmove",f),a.current.addEventListener("touchend",p))};o=function(){a.current&&(a.current.removeEventListener("touchmove",f),a.current.removeEventListener("touchend",p))},mi(function(){return e&&t.current.addEventListener("touchstart",v),function(){var y;(y=t.current)===null||y===void 0||y.removeEventListener("touchstart",v),o(),clearInterval(u.current)}},[e])}var LZ=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","component","onScroll","onVisibleChange","innerProps"],FZ=[],$Z={overflowY:"auto",overflowAnchor:"none"};function BZ(e,t){var r=e.prefixCls,n=r===void 0?"rc-virtual-list":r,i=e.className,a=e.height,u=e.itemHeight,o=e.fullHeight,f=o===void 0?!0:o,p=e.style,v=e.data,y=e.children,w=e.itemKey,k=e.virtual,T=e.component,R=T===void 0?"div":T,A=e.onScroll,I=e.onVisibleChange,O=e.innerProps,N=Mr(e,LZ),L=!!(k!==!1&&a&&u),B=L&&v&&u*v.length>a,j=C.exports.useState(0),G=Le(j,2),H=G[0],te=G[1],Y=C.exports.useState(!1),le=Le(Y,2),J=le[0],Z=le[1],Q=Qe(n,i),ge=v||FZ,ne=C.exports.useRef(),de=C.exports.useRef(),oe=C.exports.useRef(),ye=C.exports.useCallback(function(Ut){return typeof w=="function"?w(Ut):Ut==null?void 0:Ut[w]},[w]),Re={getKey:ye};function Te(Ut){te(function(rr){var xr;typeof Ut=="function"?xr=Ut(rr):xr=Ut;var Or=dt(xr);return ne.current.scrollTop=Or,Or})}var ke=C.exports.useRef({start:0,end:ge.length}),ze=C.exports.useRef(),Ie=OZ(ge,ye),Ne=Le(Ie,1),De=Ne[0];ze.current=De;var Ve=MZ(ye,null,null),Ge=Le(Ve,4),je=Ge[0],ct=Ge[1],pt=Ge[2],Tt=Ge[3],Ye=C.exports.useMemo(function(){if(!L)return{scrollHeight:void 0,start:0,end:ge.length-1,offset:void 0};if(!B){var Ut;return{scrollHeight:((Ut=de.current)===null||Ut===void 0?void 0:Ut.offsetHeight)||0,start:0,end:ge.length-1,offset:void 0}}for(var rr=0,xr,Or,_t,qt=ge.length,or=0;or<qt;or+=1){var $r=ge[or],kr=ye($r),Lt=pt.get(kr),Tr=rr+(Lt===void 0?u:Lt);Tr>=H&&xr===void 0&&(xr=or,Or=rr),Tr>H+a&&_t===void 0&&(_t=or),rr=Tr}return xr===void 0&&(xr=0,Or=0,_t=Math.ceil(a/u)),_t===void 0&&(_t=ge.length-1),_t=Math.min(_t+1,ge.length),{scrollHeight:rr,start:xr,end:_t,offset:Or}},[B,L,H,ge,Tt,a]),Pt=Ye.scrollHeight,mt=Ye.start,It=Ye.end,Ct=Ye.offset;ke.current.start=mt,ke.current.end=It;var Dt=Pt-a,lt=C.exports.useRef(Dt);lt.current=Dt;function dt(Ut){var rr=Ut;return Number.isNaN(lt.current)||(rr=Math.min(rr,lt.current)),rr=Math.max(rr,0),rr}var ut=H<=0,it=H>=Dt,ft=lN(ut,it);function xt(Ut){var rr=Ut;Te(rr)}function Wt(Ut){var rr=Ut.currentTarget.scrollTop;rr!==H&&Te(rr),A==null||A(Ut)}var jt=NZ(L,ut,it,function(Ut){Te(function(rr){var xr=rr+Ut;return xr})}),Qt=Le(jt,2),Fe=Qt[0],qe=Qt[1];DZ(L,ne,function(Ut,rr){return ft(Ut,rr)?!1:(Fe({preventDefault:function(){},deltaY:Ut}),!0)}),mi(function(){function Ut(rr){L&&rr.preventDefault()}return ne.current.addEventListener("wheel",Fe),ne.current.addEventListener("DOMMouseScroll",qe),ne.current.addEventListener("MozMousePixelScroll",Ut),function(){ne.current&&(ne.current.removeEventListener("wheel",Fe),ne.current.removeEventListener("DOMMouseScroll",qe),ne.current.removeEventListener("MozMousePixelScroll",Ut))}},[L]);var Xt=IZ(ne,ge,pt,u,ye,ct,Te,function(){var Ut;(Ut=oe.current)===null||Ut===void 0||Ut.delayHidden()});C.exports.useImperativeHandle(t,function(){return{scrollTo:Xt}}),mi(function(){if(I){var Ut=ge.slice(mt,It+1);I(Ut,ge)}},[mt,It,ge]);var cr=TZ(ge,mt,It,je,y,Re),Vt=null;return a&&(Vt=ve(se({},f?"height":"maxHeight",a),$Z),L&&(Vt.overflowY="hidden",J&&(Vt.pointerEvents="none"))),Xe("div",{style:ve(ve({},p),{},{position:"relative"}),className:Q,...N,children:[S(R,{className:"".concat(n,"-holder"),style:Vt,ref:ne,onScroll:Wt,children:S(sN,{prefixCls:n,height:Pt,offset:Ct,onInnerResize:ct,ref:de,innerProps:O,children:cr})}),L&&S(EZ,{ref:oe,prefixCls:n,scrollTop:H,height:a,scrollHeight:Pt,count:ge.length,onScroll:xt,onStartMove:function(){Z(!0)},onStopMove:function(){Z(!1)}})]})}var pS=C.exports.forwardRef(BZ);pS.displayName="List";function VZ(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var uN=C.exports.createContext(null),jZ=["disabled","title","children","style","className"];function eP(e){return typeof e=="string"||typeof e=="number"}var UZ=function(t,r){var n=zA(),i=n.prefixCls,a=n.id,u=n.open,o=n.multiple,f=n.mode,p=n.searchValue,v=n.toggleOpen,y=n.notFoundContent,w=n.onPopupScroll,k=C.exports.useContext(uN),T=k.flattenOptions,R=k.onActiveValue,A=k.defaultActiveFirstOption,I=k.onSelect,O=k.menuItemSelectedIcon,N=k.rawValues,L=k.fieldNames,B=k.virtual,j=k.listHeight,G=k.listItemHeight,H="".concat(i,"-item"),te=hv(function(){return T},[u,T],function(Ie,Ne){return Ne[0]&&Ie[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 De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ve=te.length,Ge=0;Ge<Ve;Ge+=1){var je=(Ne+Ge*De+Ve)%Ve,ct=te[je],pt=ct.group,Tt=ct.data;if(!pt&&!Tt.disabled)return je}return-1},Q=C.exports.useState(function(){return Z(0)}),ge=Le(Q,2),ne=ge[0],de=ge[1],oe=function(Ne){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;de(Ne);var Ve={source:De?"keyboard":"mouse"},Ge=te[Ne];if(!Ge){R(null,-1,Ve);return}R(Ge.value,Ne,Ve)};C.exports.useEffect(function(){oe(A!==!1?Z(0):-1)},[te.length,p]);var ye=C.exports.useCallback(function(Ie){return N.has(Ie)&&f!=="combobox"},[f,wt(N).toString(),N.size]);C.exports.useEffect(function(){var Ie=setTimeout(function(){if(!o&&u&&N.size===1){var De=Array.from(N)[0],Ve=te.findIndex(function(Ge){var je=Ge.data;return je.value===De});Ve!==-1&&(oe(Ve),J(Ve))}});if(u){var Ne;(Ne=Y.current)===null||Ne===void 0||Ne.scrollTo(void 0)}return function(){return clearTimeout(Ie)}},[u,p]);var Re=function(Ne){Ne!==void 0&&I(Ne,{selected:!N.has(Ne)}),o||v(!1)};if(C.exports.useImperativeHandle(r,function(){return{onKeyDown:function(Ne){var De=Ne.which,Ve=Ne.ctrlKey;switch(De){case Et.N:case Et.P:case Et.UP:case Et.DOWN:{var Ge=0;if(De===Et.UP?Ge=-1:De===Et.DOWN?Ge=1:VZ()&&Ve&&(De===Et.N?Ge=1:De===Et.P&&(Ge=-1)),Ge!==0){var je=Z(ne+Ge,Ge);J(je),oe(je,!0)}break}case Et.ENTER:{var ct=te[ne];ct&&!ct.data.disabled?Re(ct.value):Re(void 0),u&&Ne.preventDefault();break}case Et.ESC:v(!1),u&&Ne.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Ne){J(Ne)}}}),te.length===0)return S("div",{role:"listbox",id:"".concat(a,"_list"),className:"".concat(H,"-empty"),onMouseDown:le,children:y});var Te=Object.keys(L).map(function(Ie){return L[Ie]}),ke=function(Ne){return Ne.label},ze=function(Ne){var De=te[Ne];if(!De)return null;var Ve=De.data||{},Ge=Ve.value,je=De.group,ct=qu(Ve,!0),pt=ke(De);return De?C.exports.createElement("div",{"aria-label":typeof pt=="string"&&!je?pt:null,...ct,key:Ne,role:je?"presentation":"option",id:"".concat(a,"_list_").concat(Ne),"aria-selected":ye(Ge)},Ge):null};return Xe(Ar,{children:[Xe("div",{role:"listbox",id:"".concat(a,"_list"),style:{height:0,width:0,overflow:"hidden"},children:[ze(ne-1),ze(ne),ze(ne+1)]}),S(pS,{itemKey:"key",ref:Y,data:te,height:j,itemHeight:G,fullHeight:!1,onMouseDown:le,onScroll:w,virtual:B,children:function(Ie,Ne){var De,Ve=Ie.group,Ge=Ie.groupOption,je=Ie.data,ct=Ie.label,pt=Ie.value,Tt=je.key;if(Ve){var Ye,Pt=(Ye=je.title)!==null&&Ye!==void 0?Ye:eP(ct)?ct.toString():void 0;return S("div",{className:Qe(H,"".concat(H,"-group")),title:Pt,children:ct!==void 0?ct:Tt})}var mt=je.disabled,It=je.title;je.children;var Ct=je.style,Dt=je.className,lt=Mr(je,jZ),dt=Si(lt,Te),ut=ye(pt),it="".concat(H,"-option"),ft=Qe(H,it,Dt,(De={},se(De,"".concat(it,"-grouped"),Ge),se(De,"".concat(it,"-active"),ne===Ne&&!mt),se(De,"".concat(it,"-disabled"),mt),se(De,"".concat(it,"-selected"),ut),De)),xt=ke(Ie),Wt=!O||typeof O=="function"||ut,jt=typeof xt=="number"?xt:xt||pt,Qt=eP(jt)?jt.toString():void 0;return It!==void 0&&(Qt=It),Xe("div",{...qu(dt),"aria-selected":ut,className:ft,title:Qt,onMouseMove:function(){ne===Ne||mt||oe(Ne)},onClick:function(){mt||Re(pt)},style:Ct,children:[S("div",{className:"".concat(it,"-content"),children:jt}),C.exports.isValidElement(O)||ut,Wt&&S(J0,{className:"".concat(H,"-option-state"),customizeIcon:O,customizeIconProps:{isSelected:ut},children:ut?"\u2713":null})]})}})]})},cN=C.exports.forwardRef(UZ);cN.displayName="OptionList";var KZ=["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"],HZ=["inputValue"];function WZ(e){return!e||ar(e)!=="object"}var qZ=C.exports.forwardRef(function(e,t){var r=e.id,n=e.mode,i=e.prefixCls,a=i===void 0?"rc-select":i,u=e.backfill,o=e.fieldNames,f=e.inputValue,p=e.searchValue,v=e.onSearch,y=e.autoClearSearchValue,w=y===void 0?!0:y,k=e.onSelect,T=e.onDeselect,R=e.dropdownMatchSelectWidth,A=R===void 0?!0:R,I=e.filterOption,O=e.filterSort,N=e.optionFilterProp,L=e.optionLabelProp,B=e.options,j=e.children,G=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,ne=e.labelInValue,de=e.onChange,oe=Mr(e,KZ),ye=oN(r),Re=T4(n),Te=!!(!B&&j),ke=C.exports.useMemo(function(){return I===void 0&&n==="combobox"?!1:I},[I,n]),ze=C.exports.useMemo(function(){return nN(o,Te)},[JSON.stringify(o),Te]),Ie=Yi("",{value:p!==void 0?p:f,postState:function(ht){return ht||""}}),Ne=Le(Ie,2),De=Ne[0],Ve=Ne[1],Ge=CZ(B,j,ze,N,L),je=Ge.valueOptions,ct=Ge.labelOptions,pt=Ge.options,Tt=C.exports.useCallback(function(ot){var ht=BA(ot);return ht.map(function(Ot){var $t,ur,Ir,qr,Gr;if(WZ(Ot))$t=Ot;else{var me;Ir=Ot.key,ur=Ot.label,$t=(me=Ot.value)!==null&&me!==void 0?me:Ir}var K=je.get($t);if(K){var q;ur===void 0&&(ur=K==null?void 0:K[L||ze.label]),Ir===void 0&&(Ir=(q=K==null?void 0:K.key)!==null&&q!==void 0?q:$t),qr=K==null?void 0:K.disabled,Gr=K==null?void 0:K.title}return{label:ur,value:$t,key:Ir,disabled:qr,title:Gr}})},[ze,L,je]),Ye=Yi(ge,{value:Q}),Pt=Le(Ye,2),mt=Pt[0],It=Pt[1],Ct=C.exports.useMemo(function(){var ot,ht=Tt(mt);return n==="combobox"&&!((ot=ht[0])!==null&&ot!==void 0&&ot.value)?[]:ht},[mt,Tt,n]),Dt=vZ(Ct,je),lt=Le(Dt,2),dt=lt[0],ut=lt[1],it=C.exports.useMemo(function(){if(!n&&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 Ot;return ve(ve({},ht),{},{label:(Ot=ht.label)!==null&&Ot!==void 0?Ot:ht.value})})},[n,dt]),ft=C.exports.useMemo(function(){return new Set(dt.map(function(ot){return ot.value}))},[dt]);C.exports.useEffect(function(){if(n==="combobox"){var ot,ht=(ot=dt[0])===null||ot===void 0?void 0:ot.value;Ve(hG(ht)?String(ht):"")}},[dt]);var xt=QT(function(ot,ht){var Ot,$t=ht!=null?ht:ot;return Ot={},se(Ot,ze.value,ot),se(Ot,ze.label,$t),Ot}),Wt=C.exports.useMemo(function(){if(n!=="tags")return pt;var ot=wt(pt),ht=function($t){return je.has($t)};return wt(dt).sort(function(Ot,$t){return Ot.value<$t.value?-1:1}).forEach(function(Ot){var $t=Ot.value;ht($t)||ot.push(xt($t,Ot.label))}),ot},[xt,pt,je,dt,n]),jt=gZ(Wt,ze,De,ke,N),Qt=C.exports.useMemo(function(){return n!=="tags"||!De||jt.some(function(ot){return ot[N||"value"]===De})?jt:[xt(De)].concat(wt(jt))},[xt,N,n,jt,De]),Fe=C.exports.useMemo(function(){return O?wt(Qt).sort(function(ot,ht){return O(ot,ht)}):Qt},[Qt,O]),qe=C.exports.useMemo(function(){return fZ(Fe,{fieldNames:ze,childrenAsData:Te})},[Fe,ze,Te]),Xt=function(ht){var Ot=Tt(ht);if(It(Ot),de&&(Ot.length!==dt.length||Ot.some(function(Ir,qr){var Gr;return((Gr=dt[qr])===null||Gr===void 0?void 0:Gr.value)!==(Ir==null?void 0:Ir.value)}))){var $t=ne?Ot:Ot.map(function(Ir){return Ir.value}),ur=Ot.map(function(Ir){return k4(ut(Ir.value))});de(Re?$t:$t[0],Re?ur:ur[0])}},cr=C.exports.useState(null),Vt=Le(cr,2),Ut=Vt[0],rr=Vt[1],xr=C.exports.useState(0),Or=Le(xr,2),_t=Or[0],qt=Or[1],or=G!==void 0?G:n!=="combobox",$r=C.exports.useCallback(function(ot,ht){var Ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},$t=Ot.source,ur=$t===void 0?"keyboard":$t;qt(ht),u&&n==="combobox"&&ot!==null&&ur==="keyboard"&&rr(String(ot))},[u,n]),kr=function(ht,Ot,$t){var ur=function(){var Ee,be=ut(ht);return[ne?{label:be==null?void 0:be[ze.label],value:ht,key:(Ee=be==null?void 0:be.key)!==null&&Ee!==void 0?Ee:ht}:ht,k4(be)]};if(Ot&&k){var Ir=ur(),qr=Le(Ir,2),Gr=qr[0],me=qr[1];k(Gr,me)}else if(!Ot&&T&&$t!=="clear"){var K=ur(),q=Le(K,2),ce=q[0],ae=q[1];T(ce,ae)}},Lt=QT(function(ot,ht){var Ot,$t=Re?ht.selected:!0;$t?Ot=Re?[].concat(wt(dt),[ot]):[ot]:Ot=dt.filter(function(ur){return ur.value!==ot}),Xt(Ot),kr(ot,$t),n==="combobox"?rr(""):(!T4||w)&&(Ve(""),rr(""))}),Tr=function(ht,Ot){Xt(ht);var $t=Ot.type,ur=Ot.values;($t==="remove"||$t==="clear")&&ur.forEach(function(Ir){kr(Ir.value,!1,$t)})},Cr=function(ht,Ot){if(Ve(ht),rr(null),Ot.source==="submit"){var $t=(ht||"").trim();if($t){var ur=Array.from(new Set([].concat(wt(ft),[$t])));Xt(ur),kr($t,!0),Ve("")}return}Ot.source!=="blur"&&(n==="combobox"&&Xt(ht),v==null||v(ht))},fr=function(ht){var Ot=ht;n!=="tags"&&(Ot=ht.map(function(ur){var Ir=ct.get(ur);return Ir==null?void 0:Ir.value}).filter(function(ur){return ur!==void 0}));var $t=Array.from(new Set([].concat(wt(ft),wt(Ot))));Xt($t),$t.forEach(function(ur){kr(ur,!0)})},Nt=C.exports.useMemo(function(){var ot=te!==!1&&A!==!1;return ve(ve({},Ge),{},{flattenOptions:qe,onActiveValue:$r,defaultActiveFirstOption:or,onSelect:Lt,menuItemSelectedIcon:H,rawValues:ft,fieldNames:ze,virtual:ot,listHeight:le,listItemHeight:Z,childrenAsData:Te})},[Ge,qe,$r,or,Lt,H,ft,ze,te,A,le,Z,Te]);return S(uN.Provider,{value:Nt,children:S(iN,{...oe,id:ye,prefixCls:a,ref:t,omitDomProps:HZ,mode:n,displayValues:it,onDisplayValuesChange:Tr,searchValue:De,onSearch:Cr,autoClearSearchValue:w,onSearchSplit:fr,dropdownMatchSelectWidth:A,OptionList:cN,emptyOptions:!qe.length,activeValue:Ut,activeDescendantId:"".concat(ye,"_list_").concat(_t)})})}),mS=qZ;mS.Option=hS;mS.OptGroup=fS;var GZ=function(){var t=C.exports.useContext(zr),r=t.getPrefixCls,n=r("empty-img-default");return S("svg",{className:n,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg",children:Xe("g",{fill:"none",fillRule:"evenodd",children:[Xe("g",{transform:"translate(24 31.67)",children:[S("ellipse",{className:"".concat(n,"-ellipse"),cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),S("path",{className:"".concat(n,"-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"}),S("path",{className:"".concat(n,"-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)"}),S("path",{className:"".concat(n,"-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"}),S("path",{className:"".concat(n,"-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"})]}),S("path",{className:"".concat(n,"-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"}),Xe("g",{className:"".concat(n,"-g"),transform:"translate(149.65 15.383)",children:[S("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),S("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"})]})]})})};const ZZ=GZ;var XZ=function(){var t=C.exports.useContext(zr),r=t.getPrefixCls,n=r("empty-img-simple");return S("svg",{className:n,width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:Xe("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd",children:[S("ellipse",{className:"".concat(n,"-ellipse"),cx:"32",cy:"33",rx:"32",ry:"7"}),Xe("g",{className:"".concat(n,"-g"),fillRule:"nonzero",children:[S("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"}),S("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(n,"-path")})]})]})})};const YZ=XZ;var QZ=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},dN=S(ZZ,{}),fN=S(YZ,{}),vS=function(t){var r=t.className,n=t.prefixCls,i=t.image,a=i===void 0?dN:i,u=t.description,o=t.children,f=t.imageStyle,p=QZ(t,["className","prefixCls","image","description","children","imageStyle"]),v=C.exports.useContext(zr),y=v.getPrefixCls,w=v.direction;return S(mv,{componentName:"Empty",children:function(k){var T,R=y("empty",n),A=typeof u<"u"?u:k.description,I=typeof A=="string"?A:"empty",O=null;return typeof a=="string"?O=S("img",{alt:I,src:a}):O=a,Xe("div",{className:Qe(R,(T={},se(T,"".concat(R,"-normal"),a===fN),se(T,"".concat(R,"-rtl"),w==="rtl"),T),r),...p,children:[S("div",{className:"".concat(R,"-image"),style:f,children:O}),A&&S("div",{className:"".concat(R,"-description"),children:A}),o&&S("div",{className:"".concat(R,"-footer"),children:o})]})}})};vS.PRESENTED_IMAGE_DEFAULT=dN;vS.PRESENTED_IMAGE_SIMPLE=fN;const $s=vS;var JZ=function(t){return S(rc,{children:function(r){var n=r.getPrefixCls,i=n("empty");switch(t){case"Table":case"List":return S($s,{image:$s.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return S($s,{image:$s.PRESENTED_IMAGE_SIMPLE,className:"".concat(i,"-small")});default:return S($s,{})}}})};const gS=JZ;var Gu=C.exports.createContext({labelAlign:"right",vertical:!1,itemRef:function(){}}),hN=C.exports.createContext(null),eX=function(t){var r=Si(t,["prefixCls"]);return S(q3,{...r})},yS=C.exports.createContext({prefixCls:""}),ya=C.exports.createContext({}),P4=function(t){var r=t.children,n=t.status,i=t.override,a=C.exports.useContext(ya),u=C.exports.useMemo(function(){var o=tt({},a);return i&&delete o.isFormItemInput,n&&(delete o.status,delete o.hasFeedback,delete o.feedbackIcon),o},[n,i,a]);return S(ya.Provider,{value:u,children:r})},Sa=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return r},tX=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return r},r2=function(){return{height:0,opacity:0}},tP=function(t){var r=t.scrollHeight;return{height:r,opacity:1}},rX=function(t){return{height:t?t.offsetHeight:0}},n2=function(t,r){return(r==null?void 0:r.deadline)===!0||r.propertyName==="height"},nX={motionName:"ant-motion-collapse",onAppearStart:r2,onEnterStart:r2,onAppearActive:tP,onEnterActive:tP,onLeaveStart:rX,onLeaveActive:r2,onAppearEnd:n2,onEnterEnd:n2,onLeaveEnd:n2,motionDeadline:500};Sa("bottomLeft","bottomRight","topLeft","topRight");var pN=function(t){return t!==void 0&&(t==="topLeft"||t==="topRight")?"slide-down":"slide-up"},Dl=function(t,r,n){return n!==void 0?n:"".concat(t,"-").concat(r)};const Gm=nX;Sa("warning","error","");function Vu(e,t,r){var n;return Qe((n={},se(n,"".concat(e,"-status-success"),t==="success"),se(n,"".concat(e,"-status-warning"),t==="warning"),se(n,"".concat(e,"-status-error"),t==="error"),se(n,"".concat(e,"-status-validating"),t==="validating"),se(n,"".concat(e,"-has-feedback"),r),n))}var xv=function(t,r){return r||t},iX={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 oX=iX;var mN=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:oX})})};mN.displayName="CheckOutlined";const vN=C.exports.forwardRef(mN);var aX={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 sX=aX;var gN=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:sX})})};gN.displayName="DownOutlined";const yN=C.exports.forwardRef(gN);var lX={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 xN=lX;var _N=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:xN})})};_N.displayName="SearchOutlined";const xS=C.exports.forwardRef(_N);function bN(e){var t=e.suffixIcon,r=e.clearIcon,n=e.menuItemSelectedIcon,i=e.removeIcon,a=e.loading,u=e.multiple,o=e.hasFeedback,f=e.prefixCls,p=e.showArrow,v=e.feedbackIcon,y=r!=null?r:S(gd,{}),w=function(O){return Xe(Ar,{children:[p!==!1&&O,o&&v]})},k=null;if(t!==void 0)k=w(t);else if(a)k=w(S(Wf,{spin:!0}));else{var T="".concat(f,"-suffix");k=function(O){var N=O.open,L=O.showSearch;return w(N&&L?S(xS,{className:T}):S(yN,{className:T}))}}var R=null;n!==void 0?R=n:u?R=S(vN,{}):R=null;var A=null;return i!==void 0?A=i:A=S(fx,{}),{clearIcon:y,suffixIcon:k,itemIcon:R,removeIcon:A}}var wN=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},gx=C.exports.createContext(null),vh=function(t,r){var n=C.exports.useContext(gx),i=C.exports.useMemo(function(){var a;if(!n)return"";var u=n.compactDirection,o=n.isFirstItem,f=n.isLastItem,p=u==="vertical"?"-vertical-":"-";return Qe((a={},se(a,"".concat(t,"-compact").concat(p,"item"),!0),se(a,"".concat(t,"-compact").concat(p,"first-item"),o),se(a,"".concat(t,"-compact").concat(p,"last-item"),f),se(a,"".concat(t,"-compact").concat(p,"item-rtl"),r==="rtl"),a))},[t,r,n]);return{compactSize:n==null?void 0:n.compactSize,compactDirection:n==null?void 0:n.compactDirection,compactItemClassnames:i}},t1=function(t){var r=t.children;return S(gx.Provider,{value:null,children:r})},uX=function(t){var r=t.children,n=wN(t,["children"]);return S(gx.Provider,{value:n,children:r})},cX=function(t){var r,n=C.exports.useContext(zr),i=n.getPrefixCls,a=n.direction,u=t.size,o=u===void 0?"middle":u,f=t.direction,p=t.block,v=t.prefixCls,y=t.className,w=t.children,k=wN(t,["size","direction","block","prefixCls","className","children"]),T=i("space-compact",v),R=Qe(T,(r={},se(r,"".concat(T,"-rtl"),a==="rtl"),se(r,"".concat(T,"-block"),p),se(r,"".concat(T,"-vertical"),f==="vertical"),r),y),A=C.exports.useContext(gx),I=lo(w),O=C.exports.useMemo(function(){return I.map(function(N,L){var B=N&&N.key||"".concat(T,"-item-").concat(L);return S(uX,{compactSize:o,compactDirection:f,isFirstItem:L===0&&(!A||(A==null?void 0:A.isFirstItem)),isLastItem:L===I.length-1&&(!A||(A==null?void 0:A.isLastItem)),children:N},B)})},[o,I,A]);return I.length===0?null:S("div",{className:R,...k,children:O})},dX=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},CN="SECRET_COMBOBOX_MODE_DO_NOT_USE",fX=function(t,r){var n,i=t.prefixCls,a=t.bordered,u=a===void 0?!0:a,o=t.className,f=t.getPopupContainer,p=t.dropdownClassName,v=t.popupClassName,y=t.listHeight,w=y===void 0?256:y,k=t.placement,T=t.listItemHeight,R=T===void 0?24:T,A=t.size,I=t.disabled,O=t.notFoundContent,N=t.status,L=t.showArrow,B=dX(t,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","popupClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","showArrow"]),j=C.exports.useContext(zr),G=j.getPopupContainer,H=j.getPrefixCls,te=j.renderEmpty,Y=j.direction,le=j.virtual,J=j.dropdownMatchSelectWidth,Z=C.exports.useContext(Gs),Q=H("select",i),ge=H(),ne=vh(Q,Y),de=ne.compactSize,oe=ne.compactItemClassnames,ye=C.exports.useMemo(function(){var ut=B.mode;if(ut!=="combobox")return ut===CN?"combobox":ut},[B.mode]),Re=ye==="multiple"||ye==="tags",Te=L!==void 0?L:B.loading||!(Re||ye==="combobox"),ke=C.exports.useContext(ya),ze=ke.status,Ie=ke.hasFeedback,Ne=ke.isFormItemInput,De=ke.feedbackIcon,Ve=xv(ze,N),Ge;O!==void 0?Ge=O:ye==="combobox"?Ge=null:Ge=(te||gS)("Select");var je=bN(tt(tt({},B),{multiple:Re,hasFeedback:Ie,feedbackIcon:De,showArrow:Te,prefixCls:Q})),ct=je.suffixIcon,pt=je.itemIcon,Tt=je.removeIcon,Ye=je.clearIcon,Pt=Si(B,["suffixIcon","itemIcon"]),mt=Qe(v||p,se({},"".concat(Q,"-dropdown-").concat(Y),Y==="rtl")),It=de||A||Z,Ct=C.exports.useContext(nc),Dt=I!=null?I:Ct,lt=Qe((n={},se(n,"".concat(Q,"-lg"),It==="large"),se(n,"".concat(Q,"-sm"),It==="small"),se(n,"".concat(Q,"-rtl"),Y==="rtl"),se(n,"".concat(Q,"-borderless"),!u),se(n,"".concat(Q,"-in-form-item"),Ne),n),Vu(Q,Ve,Ie),oe,o),dt=function(){return k!==void 0?k:Y==="rtl"?"bottomRight":"bottomLeft"};return S(mS,{ref:r,virtual:le,dropdownMatchSelectWidth:J,...Pt,transitionName:Dl(ge,pN(k),B.transitionName),listHeight:w,listItemHeight:R,mode:ye,prefixCls:Q,placement:dt(),direction:Y,inputIcon:ct,menuItemSelectedIcon:pt,removeIcon:Tt,clearIcon:Ye,notFoundContent:Ge,className:lt,getPopupContainer:f||G,dropdownClassName:mt,showArrow:Ie||L,disabled:Dt})},yx=C.exports.forwardRef(fX);yx.SECRET_COMBOBOX_MODE_DO_NOT_USE=CN;yx.Option=hS;yx.OptGroup=fS;const Ll=yx;var M4=Ll.Option;function rP(e){return e&&e.type&&(e.type.isSelectOption||e.type.isSelectOptGroup)}var hX=function(t,r){var n=t.prefixCls,i=t.className,a=t.popupClassName,u=t.dropdownClassName,o=t.children,f=t.dataSource,p=lo(o),v;if(p.length===1&&Yo(p[0])&&!rP(p[0])){var y=Le(p,1);v=y[0]}var w=v?function(){return v}:void 0,k;return p.length&&rP(p[0])?k=o:k=f?f.map(function(T){if(Yo(T))return T;switch(ar(T)){case"string":return S(M4,{value:T,children:T},T);case"object":{var R=T.value;return S(M4,{value:R,children:T.text},R)}default:return}}):[],S(rc,{children:function(T){var R=T.getPrefixCls,A=R("select",n);return S(Ll,{ref:r,...Si(t,["dataSource"]),prefixCls:A,popupClassName:a||u,className:Qe("".concat(A,"-auto-complete"),i),mode:Ll.SECRET_COMBOBOX_MODE_DO_NOT_USE,getInputElement:w,children:k})}})},SN=C.exports.forwardRef(hX);SN.Option=M4;const pX=SN;function EN(){var e=C.exports.useReducer(function(n){return n+1},0),t=Le(e,2),r=t[1];return r}var r1=["xxl","xl","lg","md","sm","xs"],ky={xs:"(max-width: 575px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)",xxl:"(min-width: 1600px)"},Nc=new Map,i2=-1,Ty={},mX={matchHandlers:{},dispatch:function(t){return Ty=t,Nc.forEach(function(r){return r(Ty)}),Nc.size>=1},subscribe:function(t){return Nc.size||this.register(),i2+=1,Nc.set(i2,t),t(Ty),i2},unsubscribe:function(t){Nc.delete(t),Nc.size||this.unregister()},unregister:function(){var t=this;Object.keys(ky).forEach(function(r){var n=ky[r],i=t.matchHandlers[n];i==null||i.mql.removeListener(i==null?void 0:i.listener)}),Nc.clear()},register:function(){var t=this;Object.keys(ky).forEach(function(r){var n=ky[r],i=function(o){var f=o.matches;t.dispatch(tt(tt({},Ty),se({},r,f)))},a=window.matchMedia(n);a.addListener(i),t.matchHandlers[n]={mql:a,listener:i},i(a)})}};const n1=mX;function kN(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=C.exports.useRef({}),r=EN();return C.exports.useEffect(function(){var n=n1.subscribe(function(i){t.current=i,e&&r()});return function(){return n1.unsubscribe(n)}},[]),t.current}var Oa={adjustX:1,adjustY:1},Aa=[0,0],TN={left:{points:["cr","cl"],overflow:Oa,offset:[-4,0],targetOffset:Aa},right:{points:["cl","cr"],overflow:Oa,offset:[4,0],targetOffset:Aa},top:{points:["bc","tc"],overflow:Oa,offset:[0,-4],targetOffset:Aa},bottom:{points:["tc","bc"],overflow:Oa,offset:[0,4],targetOffset:Aa},topLeft:{points:["bl","tl"],overflow:Oa,offset:[0,-4],targetOffset:Aa},leftTop:{points:["tr","tl"],overflow:Oa,offset:[-4,0],targetOffset:Aa},topRight:{points:["br","tr"],overflow:Oa,offset:[0,-4],targetOffset:Aa},rightTop:{points:["tl","tr"],overflow:Oa,offset:[4,0],targetOffset:Aa},bottomRight:{points:["tr","br"],overflow:Oa,offset:[0,4],targetOffset:Aa},rightBottom:{points:["bl","br"],overflow:Oa,offset:[4,0],targetOffset:Aa},bottomLeft:{points:["tl","bl"],overflow:Oa,offset:[0,4],targetOffset:Aa},leftBottom:{points:["br","bl"],overflow:Oa,offset:[-4,0],targetOffset:Aa}};function vX(e){var t=e.showArrow,r=e.arrowContent,n=e.children,i=e.prefixCls,a=e.id,u=e.overlayInnerStyle,o=e.className,f=e.style;return Xe("div",{className:Qe("".concat(i,"-content"),o),style:f,children:[t!==!1&&S("div",{className:"".concat(i,"-arrow"),children:r},"arrow"),S("div",{className:"".concat(i,"-inner"),id:a,role:"tooltip",style:u,children:typeof n=="function"?n():n})]})}var gX=function(t,r){var n=t.overlayClassName,i=t.trigger,a=i===void 0?["hover"]:i,u=t.mouseEnterDelay,o=u===void 0?0:u,f=t.mouseLeaveDelay,p=f===void 0?.1:f,v=t.overlayStyle,y=t.prefixCls,w=y===void 0?"rc-tooltip":y,k=t.children,T=t.onVisibleChange,R=t.afterVisibleChange,A=t.transitionName,I=t.animation,O=t.motion,N=t.placement,L=N===void 0?"right":N,B=t.align,j=B===void 0?{}:B,G=t.destroyTooltipOnHide,H=G===void 0?!1:G,te=t.defaultVisible,Y=t.getTooltipContainer,le=t.overlayInnerStyle,J=t.arrowContent,Z=t.overlay,Q=t.id,ge=t.showArrow,ne=Mr(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(r,function(){return de.current});var oe=ve({},ne);"visible"in t&&(oe.popupVisible=t.visible);var ye=function(){return S(vX,{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&&ar(H)==="object"){var ke=H.keepParent;Re=ke===!0,Te=ke===!1}return S(vx,{popupClassName:n,prefixCls:w,popup:ye,action:a,builtinPlacements:TN,popupPlacement:L,ref:de,popupAlign:j,getPopupContainer:Y,onPopupVisibleChange:T,afterPopupVisibleChange:R,popupTransitionName:A,popupAnimation:I,popupMotion:O,defaultPopupVisible:te,destroyPopupOnHide:Re,autoDestroy:Te,mouseLeaveDelay:p,popupStyle:v,mouseEnterDelay:o,...oe,children:k})};const yX=C.exports.forwardRef(gX);Sa("success","processing","error","default","warning");var xX=Sa("pink","red","yellow","orange","cyan","green","blue","purple","geekblue","magenta","volcano","gold","lime"),_X={adjustX:1,adjustY:1},nP={adjustX:0,adjustY:0},bX=[0,0];function iP(e){return typeof e=="boolean"?e?_X:nP:tt(tt({},nP),e)}function PN(e){var t=e.arrowWidth,r=t===void 0?4:t,n=e.horizontalArrowShift,i=n===void 0?16:n,a=e.verticalArrowShift,u=a===void 0?8:a,o=e.autoAdjustOverflow,f=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+r),-4]},leftTop:{points:["tr","cl"],offset:[-4,-(u+r)]},topRight:{points:["br","tc"],offset:[i+r,-4]},rightTop:{points:["tl","cr"],offset:[4,-(u+r)]},bottomRight:{points:["tr","bc"],offset:[i+r,4]},rightBottom:{points:["bl","cr"],offset:[4,u+r]},bottomLeft:{points:["tl","bc"],offset:[-(i+r),4]},leftBottom:{points:["br","cl"],offset:[-4,u+r]}};return Object.keys(p).forEach(function(v){p[v]=f?tt(tt({},p[v]),{overflow:iP(o),targetOffset:bX}):tt(tt({},TN[v]),{overflow:iP(o)}),p[v].ignoreShake=!0}),p}var wX=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},CX=function(t,r){var n={},i=tt({},t);return r.forEach(function(a){t&&a in t&&(n[a]=t[a],delete i[a])}),{picked:n,omitted:i}},oP=new RegExp("^(".concat(xX.join("|"),")(-inverse)?$"));function SX(e,t){var r=e.type;if((r.__ANT_BUTTON===!0||e.type==="button")&&e.props.disabled||r.__ANT_SWITCH===!0&&(e.props.disabled||e.props.loading)||r.__ANT_RADIO===!0&&e.props.disabled){var n=CX(e.props.style,["position","left","right","top","bottom","float","display","zIndex"]),i=n.picked,a=n.omitted,u=tt(tt({display:"inline-block"},i),{cursor:"not-allowed",width:e.props.block?"100%":void 0}),o=tt(tt({},a),{pointerEvents:"none"}),f=Ni(e,{style:o,className:null});return S("span",{style:u,className:Qe(e.props.className,"".concat(t,"-disabled-compatible-wrapper")),children:f})}return e}var EX=C.exports.forwardRef(function(e,t){var r,n=C.exports.useContext(zr),i=n.getPopupContainer,a=n.getPrefixCls,u=n.direction,o=Yi(!1,{value:e.open!==void 0?e.open:e.visible,defaultValue:e.defaultOpen!==void 0?e.defaultOpen:e.defaultVisible}),f=Le(o,2),p=f[0],v=f[1],y=function(){var Ne=e.title,De=e.overlay;return!Ne&&!De&&Ne!==0},w=function(Ne){var De,Ve;v(y()?!1:Ne),y()||((De=e.onOpenChange)===null||De===void 0||De.call(e,Ne),(Ve=e.onVisibleChange)===null||Ve===void 0||Ve.call(e,Ne))},k=function(){var Ne=e.builtinPlacements,De=e.arrowPointAtCenter,Ve=De===void 0?!1:De,Ge=e.autoAdjustOverflow,je=Ge===void 0?!0:Ge;return Ne||PN({arrowPointAtCenter:Ve,autoAdjustOverflow:je})},T=function(Ne,De){var Ve=k(),Ge=Object.keys(Ve).find(function(pt){var Tt,Ye;return Ve[pt].points[0]===((Tt=De.points)===null||Tt===void 0?void 0:Tt[0])&&Ve[pt].points[1]===((Ye=De.points)===null||Ye===void 0?void 0:Ye[1])});if(!!Ge){var je=Ne.getBoundingClientRect(),ct={top:"50%",left:"50%"};/top|Bottom/.test(Ge)?ct.top="".concat(je.height-De.offset[1],"px"):/Top|bottom/.test(Ge)&&(ct.top="".concat(-De.offset[1],"px")),/left|Right/.test(Ge)?ct.left="".concat(je.width-De.offset[0],"px"):/right|Left/.test(Ge)&&(ct.left="".concat(-De.offset[0],"px")),Ne.style.transformOrigin="".concat(ct.left," ").concat(ct.top)}},R=function(){var Ne=e.title,De=e.overlay;return Ne===0?Ne:De||Ne||""},A=e.getPopupContainer,I=e.placement,O=I===void 0?"top":I,N=e.mouseEnterDelay,L=N===void 0?.1:N,B=e.mouseLeaveDelay,j=B===void 0?.1:B,G=wX(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=a("tooltip",H),ne=a(),de=p;!("open"in e)&&!("visible"in e)&&y()&&(de=!1);var oe=SX(Yo(Q)&&!IA(Q)?Q:S("span",{children:Q}),ge),ye=oe.props,Re=!ye.className||typeof ye.className=="string"?Qe(ye.className,se({},te||"".concat(ge,"-open"),!0)):ye.className,Te=Qe(le,(r={},se(r,"".concat(ge,"-rtl"),u==="rtl"),se(r,"".concat(ge,"-").concat(J),J&&oP.test(J)),r)),ke=Z,ze={};return J&&!oP.test(J)&&(ke=tt(tt({},Z),{background:J}),ze={"--antd-arrow-background-color":J}),S(yX,{...G,placement:O,mouseEnterDelay:L,mouseLeaveDelay:j,prefixCls:ge,overlayClassName:Te,getTooltipContainer:A||Y||i,ref:t,builtinPlacements:k(),overlay:R(),visible:de,onVisibleChange:w,onPopupAlign:T,overlayInnerStyle:ke,arrowContent:S("span",{className:"".concat(ge,"-arrow-content"),style:ze}),motion:{motionName:Dl(ne,"zoom-big-fast",e.transitionName),motionDeadline:1e3},children:de?Ni(oe,{className:Re}):oe})});const yo=EX;var aP=function(t){return t?typeof t=="function"?t():t:null},kX=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},TX=function(t){var r=t.title,n=t.content,i=t.prefixCls;return!r&&!n?null:Xe(Ar,{children:[r&&S("div",{className:"".concat(i,"-title"),children:aP(r)}),S("div",{className:"".concat(i,"-inner-content"),children:aP(n)})]})},PX=C.exports.forwardRef(function(e,t){var r=e.prefixCls,n=e.title,i=e.content,a=e._overlay,u=e.placement,o=u===void 0?"top":u,f=e.trigger,p=f===void 0?"hover":f,v=e.mouseEnterDelay,y=v===void 0?.1:v,w=e.mouseLeaveDelay,k=w===void 0?.1:w,T=e.overlayStyle,R=T===void 0?{}:T,A=kX(e,["prefixCls","title","content","_overlay","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),I=C.exports.useContext(zr),O=I.getPrefixCls,N=O("popover",r),L=O();return S(yo,{placement:o,trigger:p,mouseEnterDelay:y,mouseLeaveDelay:k,overlayStyle:R,...A,prefixCls:N,ref:t,overlay:a||S(TX,{prefixCls:N,title:n,content:i}),transitionName:Dl(L,"zoom-big",A.transitionName)})});const _S=PX;var MX={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 IX=MX;var MN=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:IX})})};MN.displayName="EllipsisOutlined";const IN=C.exports.forwardRef(MN);var RN=C.exports.createContext(null);function bS(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function ON(e){var t=C.exports.useContext(RN);return bS(t,e)}var RX=["children","locked"],bs=C.exports.createContext(null);function OX(e,t){var r=ve({},e);return Object.keys(t).forEach(function(n){var i=t[n];i!==void 0&&(r[n]=i)}),r}function Zm(e){var t=e.children,r=e.locked,n=Mr(e,RX),i=C.exports.useContext(bs),a=hv(function(){return OX(i,n)},[i,n],function(u,o){return!r&&(u[0]!==o[0]||!cS(u[1],o[1],!0))});return S(bs.Provider,{value:a,children:t})}var AX=[],AN=C.exports.createContext(null);function xx(){return C.exports.useContext(AN)}var NN=C.exports.createContext(AX);function gh(e){var t=C.exports.useContext(NN);return C.exports.useMemo(function(){return e!==void 0?[].concat(wt(t),[e]):t},[t,e])}var zN=C.exports.createContext(null),wS=C.exports.createContext({});function sP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(dS(e)){var r=e.nodeName.toLowerCase(),n=["input","select","textarea","button"].includes(r)||e.isContentEditable||r==="a"&&!!e.getAttribute("href"),i=e.getAttribute("tabindex"),a=Number(i),u=null;return i&&!Number.isNaN(a)?u=a:n&&u===null&&(u=0),n&&e.disabled&&(u=null),u!==null&&(u>=0||t&&u<0)}return!1}function DN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=wt(e.querySelectorAll("*")).filter(function(n){return sP(n,t)});return sP(e,t)&&r.unshift(e),r}var I4=Et.LEFT,R4=Et.RIGHT,O4=Et.UP,o0=Et.DOWN,a0=Et.ENTER,LN=Et.ESC,Lp=Et.HOME,Fp=Et.END,lP=[O4,o0,I4,R4];function NX(e,t,r,n){var i,a,u,o,f="prev",p="next",v="children",y="parent";if(e==="inline"&&n===a0)return{inlineTrigger:!0};var w=(i={},se(i,O4,f),se(i,o0,p),i),k=(a={},se(a,I4,r?p:f),se(a,R4,r?f:p),se(a,o0,v),se(a,a0,v),a),T=(u={},se(u,O4,f),se(u,o0,p),se(u,a0,v),se(u,LN,y),se(u,I4,r?v:y),se(u,R4,r?y:v),u),R={inline:w,horizontal:k,vertical:T,inlineSub:w,horizontalSub:T,verticalSub:T},A=(o=R["".concat(e).concat(t?"":"Sub")])===null||o===void 0?void 0:o[n];switch(A){case f:return{offset:-1,sibling:!0};case p:return{offset:1,sibling:!0};case y:return{offset:-1,sibling:!1};case v:return{offset:1,sibling:!1};default:return null}}function zX(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function DX(e,t){for(var r=e||document.activeElement;r;){if(t.has(r))return r;r=r.parentElement}return null}function FN(e,t){var r=DN(e,!0);return r.filter(function(n){return t.has(n)})}function uP(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var i=FN(e,t),a=i.length,u=i.findIndex(function(o){return r===o});return n<0?u===-1?u=a-1:u-=1:n>0&&(u+=1),u=(u+a)%a,i[u]}function LX(e,t,r,n,i,a,u,o,f,p){var v=C.exports.useRef(),y=C.exports.useRef();y.current=t;var w=function(){rn.cancel(v.current)};return C.exports.useEffect(function(){return function(){w()}},[]),function(k){var T=k.which;if([].concat(lP,[a0,LN,Lp,Fp]).includes(T)){var R,A,I,O=function(){R=new Set,A=new Map,I=new Map;var ge=a();return ge.forEach(function(ne){var de=document.querySelector("[data-menu-id='".concat(bS(n,ne),"']"));de&&(R.add(de),I.set(de,ne),A.set(ne,de))}),R};O();var N=A.get(t),L=DX(N,R),B=I.get(L),j=NX(e,u(B,!0).length===1,r,T);if(!j&&T!==Lp&&T!==Fp)return;(lP.includes(T)||[Lp,Fp].includes(T))&&k.preventDefault();var G=function(ge){if(ge){var ne=ge,de=ge.querySelector("a");de!=null&&de.getAttribute("href")&&(ne=de);var oe=I.get(ge);o(oe),w(),v.current=rn(function(){y.current===oe&&ne.focus()})}};if([Lp,Fp].includes(T)||j.sibling||!L){var H;!L||e==="inline"?H=i.current:H=zX(L);var te,Y=FN(H,R);T===Lp?te=Y[0]:T===Fp?te=Y[Y.length-1]:te=uP(H,R,L,j.offset),G(te)}else if(j.inlineTrigger)f(B);else if(j.offset>0)f(B,!0),w(),v.current=rn(function(){O();var Q=L.getAttribute("aria-controls"),ge=document.getElementById(Q),ne=uP(ge,R);G(ne)},5);else if(j.offset<0){var le=u(B,!0),J=le[le.length-2],Z=A.get(J);f(J,!1),G(Z)}}p==null||p(k)}}function FX(e){Promise.resolve().then(e)}var CS="__RC_UTIL_PATH_SPLIT__",cP=function(t){return t.join(CS)},$X=function(t){return t.split(CS)},A4="rc-menu-more";function BX(){var e=C.exports.useState({}),t=Le(e,2),r=t[1],n=C.exports.useRef(new Map),i=C.exports.useRef(new Map),a=C.exports.useState([]),u=Le(a,2),o=u[0],f=u[1],p=C.exports.useRef(0),v=C.exports.useRef(!1),y=function(){v.current||r({})},w=C.exports.useCallback(function(N,L){var B=cP(L);i.current.set(B,N),n.current.set(N,B),p.current+=1;var j=p.current;FX(function(){j===p.current&&y()})},[]),k=C.exports.useCallback(function(N,L){var B=cP(L);i.current.delete(B),n.current.delete(N)},[]),T=C.exports.useCallback(function(N){f(N)},[]),R=C.exports.useCallback(function(N,L){var B=n.current.get(N)||"",j=$X(B);return L&&o.includes(j[0])&&j.unshift(A4),j},[o]),A=C.exports.useCallback(function(N,L){return N.some(function(B){var j=R(B,!0);return j.includes(L)})},[R]),I=function(){var L=wt(n.current.keys());return o.length&&L.push(A4),L},O=C.exports.useCallback(function(N){var L="".concat(n.current.get(N)).concat(CS),B=new Set;return wt(i.current.keys()).forEach(function(j){j.startsWith(L)&&B.add(i.current.get(j))}),B},[]);return C.exports.useEffect(function(){return function(){v.current=!0}},[]),{registerPath:w,unregisterPath:k,refreshOverflowKeys:T,isSubPathKey:A,getKeyPath:R,getKeys:I,getSubPathKeys:O}}function uf(e){var t=C.exports.useRef(e);t.current=e;var r=C.exports.useCallback(function(){for(var n,i=arguments.length,a=new Array(i),u=0;u<i;u++)a[u]=arguments[u];return(n=t.current)===null||n===void 0?void 0:n.call.apply(n,[t].concat(a))},[]);return e?r:void 0}var VX=Math.random().toFixed(5).toString().slice(2),dP=0;function jX(e){var t=Yi(e,{value:e}),r=Le(t,2),n=r[0],i=r[1];return C.exports.useEffect(function(){dP+=1;var a="".concat(VX,"-").concat(dP);i("rc-menu-uuid-".concat(a))},[]),n}function $N(e,t,r,n){var i=C.exports.useContext(bs),a=i.activeKey,u=i.onActive,o=i.onInactive,f={active:a===e};return t||(f.onMouseEnter=function(p){r==null||r({key:e,domEvent:p}),u(e)},f.onMouseLeave=function(p){n==null||n({key:e,domEvent:p}),o(e)}),f}var UX=["item"];function i1(e){var t=e.item,r=Mr(e,UX);return Object.defineProperty(r,"item",{get:function(){return Bn(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),r}function BN(e){var t=e.icon,r=e.props,n=e.children,i;return typeof t=="function"?i=C.exports.createElement(t,ve({},r)):i=t,i||n||null}function VN(e){var t=C.exports.useContext(bs),r=t.mode,n=t.rtl,i=t.inlineIndent;if(r!=="inline")return null;var a=e;return n?{paddingRight:a*i}:{paddingLeft:a*i}}var KX=["title","attribute","elementRef"],HX=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],WX=["active"],qX=function(e){vi(r,e);var t=gi(r);function r(){return Qn(this,r),t.apply(this,arguments)}return Jn(r,[{key:"render",value:function(){var i=this.props,a=i.title,u=i.attribute,o=i.elementRef,f=Mr(i,KX),p=Si(f,["eventKey"]);return Bn(!u,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),S(Ws.Item,{...u,title:typeof a=="string"?a:void 0,...p,ref:o})}}]),r}(C.exports.Component),GX=function(t){var r,n=t.style,i=t.className,a=t.eventKey;t.warnKey;var u=t.disabled,o=t.itemIcon,f=t.children,p=t.role,v=t.onMouseEnter,y=t.onMouseLeave,w=t.onClick,k=t.onKeyDown,T=t.onFocus,R=Mr(t,HX),A=ON(a),I=C.exports.useContext(bs),O=I.prefixCls,N=I.onItemClick,L=I.disabled,B=I.overflowDisabled,j=I.itemIcon,G=I.selectedKeys,H=I.onActive,te=C.exports.useContext(wS),Y=te._internalRenderMenuItem,le="".concat(O,"-item"),J=C.exports.useRef(),Z=C.exports.useRef(),Q=L||u,ge=gh(a),ne=function(je){return{key:a,keyPath:wt(ge).reverse(),item:J.current,domEvent:je}},de=o||j,oe=$N(a,Q,v,y),ye=oe.active,Re=Mr(oe,WX),Te=G.includes(a),ke=VN(ge.length),ze=function(je){if(!Q){var ct=ne(je);w==null||w(i1(ct)),N(ct)}},Ie=function(je){if(k==null||k(je),je.which===Et.ENTER){var ct=ne(je);w==null||w(i1(ct)),N(ct)}},Ne=function(je){H(a),T==null||T(je)},De={};t.role==="option"&&(De["aria-selected"]=Te);var Ve=Xe(qX,{ref:J,elementRef:Z,role:p===null?"none":p||"menuitem",tabIndex:u?null:-1,"data-menu-id":B&&A?null:A,...R,...Re,...De,component:"li","aria-disabled":u,style:ve(ve({},ke),n),className:Qe(le,(r={},se(r,"".concat(le,"-active"),ye),se(r,"".concat(le,"-selected"),Te),se(r,"".concat(le,"-disabled"),Q),r),i),onClick:ze,onKeyDown:Ie,onFocus:Ne,children:[f,S(BN,{props:ve(ve({},t),{},{isSelected:Te}),icon:de})]});return Y&&(Ve=Y(Ve,t,{selected:Te})),Ve};function _x(e){var t=e.eventKey,r=xx(),n=gh(t);return C.exports.useEffect(function(){if(r)return r.registerPath(t,n),function(){r.unregisterPath(t,n)}},[n]),r?null:S(GX,{...e})}var ZX=["className","children"],XX=function(t,r){var n=t.className,i=t.children,a=Mr(t,ZX),u=C.exports.useContext(bs),o=u.prefixCls,f=u.mode,p=u.rtl;return S("ul",{className:Qe(o,p&&"".concat(o,"-rtl"),"".concat(o,"-sub"),"".concat(o,"-").concat(f==="inline"?"inline":"vertical"),n),role:"menu",...a,"data-menu-list":!0,ref:r,children:i})},SS=C.exports.forwardRef(XX);SS.displayName="SubMenuList";var YX=["label","children","key","type"];function ES(e,t){return lo(e).map(function(r,n){if(C.exports.isValidElement(r)){var i,a,u=r.key,o=(i=(a=r.props)===null||a===void 0?void 0:a.eventKey)!==null&&i!==void 0?i:u,f=o==null;f&&(o="tmp_key-".concat([].concat(wt(t),[n]).join("-")));var p={key:o,eventKey:o};return C.exports.cloneElement(r,p)}return r})}function N4(e){return(e||[]).map(function(t,r){if(t&&ar(t)==="object"){var n=t,i=n.label,a=n.children,u=n.key,o=n.type,f=Mr(n,YX),p=u!=null?u:"tmp-".concat(r);return a||o==="group"?o==="group"?S(wx,{...f,title:i,children:N4(a)},p):S(bx,{...f,title:i,children:N4(a)},p):o==="divider"?S(kS,{...f},p):S(_x,{...f,children:i},p)}return null}).filter(function(t){return t})}function QX(e,t,r){var n=e;return t&&(n=N4(t)),ES(n,r)}var Iu={adjustX:1,adjustY:1},JX={topLeft:{points:["bl","tl"],overflow:Iu,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Iu,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Iu,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Iu,offset:[4,0]}},eY={topLeft:{points:["bl","tl"],overflow:Iu,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Iu,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Iu,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Iu,offset:[4,0]}};function jN(e,t,r){if(t)return t;if(r)return r[e]||r.other}var tY={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function rY(e){var t=e.prefixCls,r=e.visible,n=e.children,i=e.popup,a=e.popupClassName,u=e.popupOffset,o=e.disabled,f=e.mode,p=e.onVisibleChange,v=C.exports.useContext(bs),y=v.getPopupContainer,w=v.rtl,k=v.subMenuOpenDelay,T=v.subMenuCloseDelay,R=v.builtinPlacements,A=v.triggerSubMenuAction,I=v.forceSubMenuRender,O=v.rootClassName,N=v.motion,L=v.defaultMotions,B=C.exports.useState(!1),j=Le(B,2),G=j[0],H=j[1],te=ve(w?ve({},eY):ve({},JX),R),Y=tY[f],le=jN(f,N,L),J=C.exports.useRef(le);f!=="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=rn(function(){H(r)}),function(){rn.cancel(Q.current)}},[r]),S(vx,{prefixCls:t,popupClassName:Qe("".concat(t,"-popup"),se({},"".concat(t,"-rtl"),w),a,O),stretch:f==="horizontal"?"minWidth":null,getPopupContainer:y,builtinPlacements:te,popupPlacement:Y,popupVisible:G,popup:i,popupAlign:u&&{offset:u},action:o?[]:[A],mouseEnterDelay:k,mouseLeaveDelay:T,onPopupVisibleChange:p,forceRender:I,popupMotion:Z,children:n})}function nY(e){var t=e.id,r=e.open,n=e.keyPath,i=e.children,a="inline",u=C.exports.useContext(bs),o=u.prefixCls,f=u.forceSubMenuRender,p=u.motion,v=u.defaultMotions,y=u.mode,w=C.exports.useRef(!1);w.current=y===a;var k=C.exports.useState(!w.current),T=Le(k,2),R=T[0],A=T[1],I=w.current?r:!1;C.exports.useEffect(function(){w.current&&A(!1)},[y]);var O=ve({},jN(a,p,v));n.length>1&&(O.motionAppear=!1);var N=O.onVisibleChanged;return O.onVisibleChanged=function(L){return!w.current&&!L&&A(!0),N==null?void 0:N(L)},R?null:S(Zm,{mode:a,locked:!w.current,children:S(Za,{visible:I,...O,forceRender:f,removeOnLeave:!1,leavedClassName:"".concat(o,"-hidden"),children:function(L){var B=L.className,j=L.style;return S(SS,{id:t,className:B,style:j,children:i})}})})}var iY=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],oY=["active"],aY=function(t){var r,n=t.style,i=t.className,a=t.title,u=t.eventKey;t.warnKey;var o=t.disabled,f=t.internalPopupClose,p=t.children,v=t.itemIcon,y=t.expandIcon,w=t.popupClassName,k=t.popupOffset,T=t.onClick,R=t.onMouseEnter,A=t.onMouseLeave,I=t.onTitleClick,O=t.onTitleMouseEnter,N=t.onTitleMouseLeave,L=Mr(t,iY),B=ON(u),j=C.exports.useContext(bs),G=j.prefixCls,H=j.mode,te=j.openKeys,Y=j.disabled,le=j.overflowDisabled,J=j.activeKey,Z=j.selectedKeys,Q=j.itemIcon,ge=j.expandIcon,ne=j.onItemClick,de=j.onOpenChange,oe=j.onActive,ye=C.exports.useContext(wS),Re=ye._internalRenderSubMenuItem,Te=C.exports.useContext(zN),ke=Te.isSubPathKey,ze=gh(),Ie="".concat(G,"-submenu"),Ne=Y||o,De=C.exports.useRef(),Ve=C.exports.useRef(),Ge=v||Q,je=y||ge,ct=te.includes(u),pt=!le&&ct,Tt=ke(Z,u),Ye=$N(u,Ne,O,N),Pt=Ye.active,mt=Mr(Ye,oY),It=C.exports.useState(!1),Ct=Le(It,2),Dt=Ct[0],lt=Ct[1],dt=function(xr){Ne||lt(xr)},ut=function(xr){dt(!0),R==null||R({key:u,domEvent:xr})},it=function(xr){dt(!1),A==null||A({key:u,domEvent:xr})},ft=C.exports.useMemo(function(){return Pt||(H!=="inline"?Dt||ke([J],u):!1)},[H,Pt,J,Dt,u,ke]),xt=VN(ze.length),Wt=function(xr){Ne||(I==null||I({key:u,domEvent:xr}),H==="inline"&&de(u,!ct))},jt=uf(function(rr){T==null||T(i1(rr)),ne(rr)}),Qt=function(xr){H!=="inline"&&de(u,xr)},Fe=function(){oe(u)},qe=B&&"".concat(B,"-popup"),Xt=Xe("div",{role:"menuitem",style:xt,className:"".concat(Ie,"-title"),tabIndex:Ne?null:-1,ref:De,title:typeof a=="string"?a:null,"data-menu-id":le&&B?null:B,"aria-expanded":pt,"aria-haspopup":!0,"aria-controls":qe,"aria-disabled":Ne,onClick:Wt,onFocus:Fe,...mt,children:[a,S(BN,{icon:H!=="horizontal"?je:null,props:ve(ve({},t),{},{isOpen:pt,isSubMenu:!0}),children:S("i",{className:"".concat(Ie,"-arrow")})})]}),cr=C.exports.useRef(H);if(H!=="inline"&&ze.length>1?cr.current="vertical":cr.current=H,!le){var Vt=cr.current;Xt=S(rY,{mode:Vt,prefixCls:Ie,visible:!f&&pt&&H!=="inline",popupClassName:w,popupOffset:k,popup:S(Zm,{mode:Vt==="horizontal"?"vertical":Vt,children:S(SS,{id:qe,ref:Ve,children:p})}),disabled:Ne,onVisibleChange:Qt,children:Xt})}var Ut=Xe(Ws.Item,{role:"none",...L,component:"li",style:n,className:Qe(Ie,"".concat(Ie,"-").concat(H),i,(r={},se(r,"".concat(Ie,"-open"),pt),se(r,"".concat(Ie,"-active"),ft),se(r,"".concat(Ie,"-selected"),Tt),se(r,"".concat(Ie,"-disabled"),Ne),r)),onMouseEnter:ut,onMouseLeave:it,children:[Xt,!le&&S(nY,{id:qe,open:pt,keyPath:ze,children:p})]});return Re&&(Ut=Re(Ut,t,{selected:Tt,active:ft,open:pt,disabled:Ne})),S(Zm,{onItemClick:jt,mode:H==="horizontal"?"vertical":H,itemIcon:Ge,expandIcon:je,children:Ut})};function bx(e){var t=e.eventKey,r=e.children,n=gh(t),i=ES(r,n),a=xx();C.exports.useEffect(function(){if(a)return a.registerPath(t,n),function(){a.unregisterPath(t,n)}},[n]);var u;return a?u=i:u=S(aY,{...e,children:i}),S(NN.Provider,{value:n,children:u})}var sY=["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"],of=[],lY=C.exports.forwardRef(function(e,t){var r,n,i=e,a=i.prefixCls,u=a===void 0?"rc-menu":a,o=i.rootClassName,f=i.style,p=i.className,v=i.tabIndex,y=v===void 0?0:v,w=i.items,k=i.children,T=i.direction,R=i.id,A=i.mode,I=A===void 0?"vertical":A,O=i.inlineCollapsed,N=i.disabled,L=i.disabledOverflow,B=i.subMenuOpenDelay,j=B===void 0?.1:B,G=i.subMenuCloseDelay,H=G===void 0?.1:G,te=i.forceSubMenuRender,Y=i.defaultOpenKeys,le=i.openKeys,J=i.activeKey,Z=i.defaultActiveFirst,Q=i.selectable,ge=Q===void 0?!0:Q,ne=i.multiple,de=ne===void 0?!1:ne,oe=i.defaultSelectedKeys,ye=i.selectedKeys,Re=i.onSelect,Te=i.onDeselect,ke=i.inlineIndent,ze=ke===void 0?24:ke,Ie=i.motion,Ne=i.defaultMotions,De=i.triggerSubMenuAction,Ve=De===void 0?"hover":De,Ge=i.builtinPlacements,je=i.itemIcon,ct=i.expandIcon,pt=i.overflowedIndicator,Tt=pt===void 0?"...":pt,Ye=i.overflowedIndicatorPopupClassName,Pt=i.getPopupContainer,mt=i.onClick,It=i.onOpenChange,Ct=i.onKeyDown;i.openAnimation,i.openTransitionName;var Dt=i._internalRenderMenuItem,lt=i._internalRenderSubMenuItem,dt=Mr(i,sY),ut=C.exports.useMemo(function(){return QX(k,w,of)},[k,w]),it=C.exports.useState(!1),ft=Le(it,2),xt=ft[0],Wt=ft[1],jt=C.exports.useRef(),Qt=jX(R),Fe=T==="rtl",qe=Yi(Y,{value:le,postState:function(Lr){return Lr||of}}),Xt=Le(qe,2),cr=Xt[0],Vt=Xt[1],Ut=function(Lr){var Yr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function wn(){Vt(Lr),It==null||It(Lr)}Yr?Qu.exports.flushSync(wn):wn()},rr=C.exports.useState(cr),xr=Le(rr,2),Or=xr[0],_t=xr[1],qt=C.exports.useRef(!1),or=C.exports.useMemo(function(){return(I==="inline"||I==="vertical")&&O?["vertical",O]:[I,!1]},[I,O]),$r=Le(or,2),kr=$r[0],Lt=$r[1],Tr=kr==="inline",Cr=C.exports.useState(kr),fr=Le(Cr,2),Nt=fr[0],ot=fr[1],ht=C.exports.useState(Lt),Ot=Le(ht,2),$t=Ot[0],ur=Ot[1];C.exports.useEffect(function(){ot(kr),ur(Lt),qt.current&&(Tr?Vt(Or):Ut(of))},[kr,Lt]);var Ir=C.exports.useState(0),qr=Le(Ir,2),Gr=qr[0],me=qr[1],K=Gr>=ut.length-1||Nt!=="horizontal"||L;C.exports.useEffect(function(){Tr&&_t(cr)},[cr]),C.exports.useEffect(function(){return qt.current=!0,function(){qt.current=!1}},[]);var q=BX(),ce=q.registerPath,ae=q.unregisterPath,xe=q.refreshOverflowKeys,Ee=q.isSubPathKey,be=q.getKeyPath,Ce=q.getKeys,Ae=q.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?of:ut.slice(Gr+1).map(function(Ur){return Ur.key}))},[Gr,K]);var Be=Yi(J||Z&&((r=ut[0])===null||r===void 0?void 0:r.key),{value:J}),At=Le(Be,2),bt=At[0],Je=At[1],Rt=uf(function(Ur){Je(Ur)}),Bt=uf(function(){Je(void 0)});C.exports.useImperativeHandle(t,function(){return{list:jt.current,focus:function(Lr){var Yr,wn=bt!=null?bt:(Yr=ut.find(function(Zl){return!Zl.props.disabled}))===null||Yr===void 0?void 0:Yr.key;if(wn){var Sn,jn,bo;(Sn=jt.current)===null||Sn===void 0||(jn=Sn.querySelector("li[data-menu-id='".concat(bS(Qt,wn),"']")))===null||jn===void 0||(bo=jn.focus)===null||bo===void 0||bo.call(jn,Lr)}}}});var vr=Yi(oe||[],{value:ye,postState:function(Lr){return Array.isArray(Lr)?Lr:Lr==null?of:[Lr]}}),ir=Le(vr,2),gr=ir[0],Br=ir[1],Jr=function(Lr){if(ge){var Yr=Lr.key,wn=gr.includes(Yr),Sn;de?wn?Sn=gr.filter(function(bo){return bo!==Yr}):Sn=[].concat(wt(gr),[Yr]):Sn=[Yr],Br(Sn);var jn=ve(ve({},Lr),{},{selectedKeys:Sn});wn?Te==null||Te(jn):Re==null||Re(jn)}!de&&cr.length&&Nt!=="inline"&&Ut(of)},Vn=uf(function(Ur){mt==null||mt(i1(Ur)),Jr(Ur)}),an=uf(function(Ur,Lr){var Yr=cr.filter(function(Sn){return Sn!==Ur});if(Lr)Yr.push(Ur);else if(Nt!=="inline"){var wn=Ae(Ur);Yr=Yr.filter(function(Sn){return!wn.has(Sn)})}cS(cr,Yr,!0)||Ut(Yr,!0)}),An=uf(Pt),Pr=function(Lr,Yr){var wn=Yr!=null?Yr:!cr.includes(Lr);an(Lr,wn)},Sr=LX(Nt,bt,Fe,Qt,jt,Ce,be,Je,Pr,Ct);C.exports.useEffect(function(){Wt(!0)},[]);var Rr=C.exports.useMemo(function(){return{_internalRenderMenuItem:Dt,_internalRenderSubMenuItem:lt}},[Dt,lt]),ei=Nt!=="horizontal"||L?ut:ut.map(function(Ur,Lr){return S(Zm,{overflowDisabled:Lr>Gr,children:Ur},Ur.key)}),yn=S(Ws,{id:R,ref:jt,prefixCls:"".concat(u,"-overflow"),component:"ul",itemComponent:_x,className:Qe(u,"".concat(u,"-root"),"".concat(u,"-").concat(Nt),p,(n={},se(n,"".concat(u,"-inline-collapsed"),$t),se(n,"".concat(u,"-rtl"),Fe),n),o),dir:T,style:f,role:"menu",tabIndex:y,data:ei,renderRawItem:function(Lr){return Lr},renderRawRest:function(Lr){var Yr=Lr.length,wn=Yr?ut.slice(-Yr):null;return S(bx,{eventKey:A4,title:Tt,disabled:K,internalPopupClose:Yr===0,popupClassName:Ye,children:wn})},maxCount:Nt!=="horizontal"||L?Ws.INVALIDATE:Ws.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Lr){me(Lr)},onKeyDown:Sr,...dt});return S(wS.Provider,{value:Rr,children:S(RN.Provider,{value:Qt,children:Xe(Zm,{prefixCls:u,rootClassName:o,mode:Nt,openKeys:cr,rtl:Fe,disabled:N,motion:xt?Ie:null,defaultMotions:xt?Ne:null,activeKey:bt,onActive:Rt,onInactive:Bt,selectedKeys:gr,inlineIndent:ze,subMenuOpenDelay:j,subMenuCloseDelay:H,forceSubMenuRender:te,builtinPlacements:Ge,triggerSubMenuAction:Ve,getPopupContainer:An,itemIcon:je,expandIcon:ct,onItemClick:Vn,onOpenChange:an,children:[S(zN.Provider,{value:We,children:yn}),S("div",{style:{display:"none"},"aria-hidden":!0,children:S(AN.Provider,{value:He,children:ut})})]})})})}),uY=["className","title","eventKey","children"],cY=["children"],dY=function(t){var r=t.className,n=t.title;t.eventKey;var i=t.children,a=Mr(t,uY),u=C.exports.useContext(bs),o=u.prefixCls,f="".concat(o,"-item-group");return Xe("li",{role:"presentation",...a,onClick:function(v){return v.stopPropagation()},className:Qe(f,r),children:[S("div",{role:"presentation",className:"".concat(f,"-title"),title:typeof n=="string"?n:void 0,children:n}),S("ul",{role:"group",className:"".concat(f,"-list"),children:i})]})};function wx(e){var t=e.children,r=Mr(e,cY),n=gh(r.eventKey),i=ES(t,n),a=xx();return a?i:S(dY,{...Si(r,["warnKey"]),children:i})}function kS(e){var t=e.className,r=e.style,n=C.exports.useContext(bs),i=n.prefixCls,a=xx();return a?null:S("li",{className:Qe("".concat(i,"-item-divider"),t),style:r})}var _v=lY;_v.Item=_x;_v.SubMenu=bx;_v.ItemGroup=wx;_v.Divider=kS;var fY={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 hY=fY;var UN=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:hY})})};UN.displayName="LeftOutlined";const pY=C.exports.forwardRef(UN);var mY={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 vY=mY;var KN=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:vY})})};KN.displayName="RightOutlined";const TS=C.exports.forwardRef(KN);globalThis&&globalThis.__rest;var HN=C.exports.createContext({}),gY=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},yY=function(t){var r=t.prefixCls,n=t.className,i=t.dashed,a=gY(t,["prefixCls","className","dashed"]),u=C.exports.useContext(zr),o=u.getPrefixCls,f=o("menu",r),p=Qe(se({},"".concat(f,"-item-divider-dashed"),!!i),n);return S(kS,{className:p,...a})};const WN=yY;var xY=C.exports.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});const o1=xY;var _Y=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},PS=function(e){vi(r,e);var t=gi(r);function r(){var n;return Qn(this,r),n=t.apply(this,arguments),n.renderItem=function(i){var a,u=i.siderCollapsed,o,f=n.context,p=f.prefixCls,v=f.firstLevel,y=f.inlineCollapsed,w=f.direction,k=f.disableMenuItemTitleTooltip,T=n.props,R=T.className,A=T.children,I=n.props,O=I.title,N=I.icon,L=I.danger,B=_Y(I,["title","icon","danger"]),j=O;typeof O>"u"?j=v?A:"":O===!1&&(j="");var G={title:j};!u&&!y&&(G.title=null,G.open=!1);var H=lo(A).length,te=Xe(_x,{...B,className:Qe((a={},se(a,"".concat(p,"-item-danger"),L),se(a,"".concat(p,"-item-only-child"),(N?H+1:H)===1),a),R),title:typeof O=="string"?O:void 0,children:[Ni(N,{className:Qe(Yo(N)?(o=N.props)===null||o===void 0?void 0:o.className:"","".concat(p,"-item-icon"))}),n.renderItemChildren(y)]});return k||(te=S(yo,{...G,placement:w==="rtl"?"left":"right",overlayClassName:"".concat(p,"-inline-collapsed-tooltip"),children:te})),te},n}return Jn(r,[{key:"renderItemChildren",value:function(i){var a=this.context,u=a.prefixCls,o=a.firstLevel,f=this.props,p=f.icon,v=f.children,y=S("span",{className:"".concat(u,"-title-content"),children:v});return(!p||Yo(v)&&v.type==="span")&&v&&i&&o&&typeof v=="string"?S("div",{className:"".concat(u,"-inline-collapsed-noicon"),children:v.charAt(0)}):y}},{key:"render",value:function(){return S(HN.Consumer,{children:this.renderItem})}}]),r}(C.exports.Component);PS.contextType=o1;function qN(e){var t,r=e.popupClassName,n=e.icon,i=e.title,a=e.theme,u=C.exports.useContext(o1),o=u.prefixCls,f=u.inlineCollapsed,p=u.antdMenuTheme,v=gh(),y;if(!n)y=f&&!v.length&&i&&typeof i=="string"?S("div",{className:"".concat(o,"-inline-collapsed-noicon"),children:i.charAt(0)}):S("span",{className:"".concat(o,"-title-content"),children:i});else{var w=Yo(i)&&i.type==="span";y=Xe(Ar,{children:[Ni(n,{className:Qe(Yo(n)?(t=n.props)===null||t===void 0?void 0:t.className:"","".concat(o,"-item-icon"))}),w?i:S("span",{className:"".concat(o,"-title-content"),children:i})]})}var k=C.exports.useMemo(function(){return tt(tt({},u),{firstLevel:!1})},[u]);return S(o1.Provider,{value:k,children:S(bx,{...Si(e,["icon"]),title:y,popupClassName:Qe(o,"".concat(o,"-").concat(a||p),r)})})}var bY=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};function z4(e){return(e||[]).map(function(t,r){if(t&&ar(t)==="object"){var n=t,i=n.label,a=n.children,u=n.key,o=n.type,f=bY(n,["label","children","key","type"]),p=u!=null?u:"tmp-".concat(r);return a||o==="group"?o==="group"?S(wx,{...f,title:i,children:z4(a)},p):S(qN,{...f,title:i,children:z4(a)},p):o==="divider"?S(WN,{...f},p):S(PS,{...f,children:i},p)}return null}).filter(function(t){return t})}function wY(e){return C.exports.useMemo(function(){return e&&z4(e)},[e])}var CY=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},a1=C.exports.createContext(null),GN=function(t){var r=t.children,n=CY(t,["children"]),i=C.exports.useContext(a1),a=C.exports.useMemo(function(){return tt(tt({},i),n)},[i,n.prefixCls,n.mode,n.selectable]);return S(a1.Provider,{value:a,children:r})},SY=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},EY=C.exports.forwardRef(function(e,t){var r,n=C.exports.useContext(a1)||{},i=C.exports.useContext(zr),a=i.getPrefixCls,u=i.getPopupContainer,o=i.direction,f=a(),p=e.prefixCls,v=e.className,y=e.theme,w=y===void 0?"light":y,k=e.expandIcon,T=e._internalDisableMenuItemTitleTooltip,R=e.inlineCollapsed,A=e.siderCollapsed,I=e.items,O=e.children,N=e.mode,L=e.selectable,B=e.onClick,j=SY(e,["prefixCls","className","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","mode","selectable","onClick"]),G=Si(j,["collapsedWidth"]),H=wY(I)||O;(r=n.validator)===null||r===void 0||r.call(n,{mode:N});var te=Wm(function(){var oe;B==null||B.apply(void 0,arguments),(oe=n==null?void 0:n.onClick)===null||oe===void 0||oe.call(n)}),Y=n.mode||N,le=L!=null?L:n.selectable,J=C.exports.useMemo(function(){return A!==void 0?A:R},[R,A]),Z={horizontal:{motionName:"".concat(f,"-slide-up")},inline:Gm,other:{motionName:"".concat(f,"-zoom-big")}},Q=a("menu",p||n.prefixCls),ge=Qe("".concat(Q,"-").concat(w),v),ne;typeof k=="function"?ne=k:ne=Ni(k||n.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:T}},[Q,J,w,o,T]);return S(a1.Provider,{value:null,children:S(o1.Provider,{value:de,children:S(_v,{getPopupContainer:u,overflowedIndicator:S(IN,{}),overflowedIndicatorPopupClassName:"".concat(Q,"-").concat(w),mode:Y,selectable:le,onClick:te,...G,inlineCollapsed:J,className:ge,prefixCls:Q,direction:o,defaultMotions:Z,expandIcon:ne,ref:t,children:H})})})}),bv=function(e){vi(r,e);var t=gi(r);function r(){var n;return Qn(this,r),n=t.apply(this,arguments),n.focus=function(i){var a;(a=n.menu)===null||a===void 0||a.focus(i)},n}return Jn(r,[{key:"render",value:function(){var i=this;return S(HN.Consumer,{children:function(a){return S(EY,{ref:function(o){i.menu=o},...i.props,...a})}})}}]),r}(C.exports.Component);bv.Divider=WN;bv.Item=PS;bv.SubMenu=qN;bv.ItemGroup=wx;const ZN=bv;var af={adjustX:1,adjustY:1},sf=[0,0],kY={topLeft:{points:["bl","tl"],overflow:af,offset:[0,-4],targetOffset:sf},topCenter:{points:["bc","tc"],overflow:af,offset:[0,-4],targetOffset:sf},topRight:{points:["br","tr"],overflow:af,offset:[0,-4],targetOffset:sf},bottomLeft:{points:["tl","bl"],overflow:af,offset:[0,4],targetOffset:sf},bottomCenter:{points:["tc","bc"],overflow:af,offset:[0,4],targetOffset:sf},bottomRight:{points:["tr","br"],overflow:af,offset:[0,4],targetOffset:sf}},TY=Et.ESC,PY=Et.TAB;function MY(e){var t=e.visible,r=e.setTriggerVisible,n=e.triggerRef,i=e.onVisibleChange,a=e.autoFocus,u=C.exports.useRef(!1),o=function(){if(t&&n.current){var y,w,k,T;(y=n.current)===null||y===void 0||(w=y.triggerRef)===null||w===void 0||(k=w.current)===null||k===void 0||(T=k.focus)===null||T===void 0||T.call(k),r(!1),typeof i=="function"&&i(!1)}},f=function(){var y,w,k,T,R=DN((y=n.current)===null||y===void 0||(w=y.popupRef)===null||w===void 0||(k=w.current)===null||k===void 0||(T=k.getElement)===null||T===void 0?void 0:T.call(k)),A=R[0];return A!=null&&A.focus?(A.focus(),u.current=!0,!0):!1},p=function(y){switch(y.keyCode){case TY:o();break;case PY:{var w=!1;u.current||(w=f()),w?y.preventDefault():o();break}}};C.exports.useEffect(function(){return t?(window.addEventListener("keydown",p),a&&rn(f,3),function(){window.removeEventListener("keydown",p),u.current=!1}):function(){u.current=!1}},[t])}var IY=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus"];function RY(e,t){var r=e.arrow,n=r===void 0?!1:r,i=e.prefixCls,a=i===void 0?"rc-dropdown":i,u=e.transitionName,o=e.animation,f=e.align,p=e.placement,v=p===void 0?"bottomLeft":p,y=e.placements,w=y===void 0?kY:y,k=e.getPopupContainer,T=e.showAction,R=e.hideAction,A=e.overlayClassName,I=e.overlayStyle,O=e.visible,N=e.trigger,L=N===void 0?["hover"]:N,B=e.autoFocus,j=Mr(e,IY),G=C.exports.useState(),H=Le(G,2),te=H[0],Y=H[1],le="visible"in e?O:te,J=C.exports.useRef(null);C.exports.useImperativeHandle(t,function(){return J.current}),MY({visible:le,setTriggerVisible:Y,triggerRef:J,onVisibleChange:e.onVisibleChange,autoFocus:B});var Z=function(){var ze=e.overlay,Ie;return typeof ze=="function"?Ie=ze():Ie=ze,Ie},Q=function(ze){var Ie=e.onOverlayClick;Y(!1),Ie&&Ie(ze)},ge=function(ze){var Ie=e.onVisibleChange;Y(ze),typeof Ie=="function"&&Ie(ze)},ne=function(){var ze=Z();return Xe(Ar,{children:[n&&S("div",{className:"".concat(a,"-arrow")}),ze]})},de=function(){var ze=e.overlay;return typeof ze=="function"?ne:ne()},oe=function(){var ze=e.minOverlayWidthMatchTrigger,Ie=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?ze:!Ie},ye=function(){var ze=e.openClassName;return ze!==void 0?ze:"".concat(a,"-open")},Re=function(){var ze=e.children,Ie=ze.props?ze.props:{},Ne=Qe(Ie.className,ye());return le&&ze?C.exports.cloneElement(ze,{className:Ne}):ze},Te=R;return!Te&&L.indexOf("contextMenu")!==-1&&(Te=["click"]),S(vx,{...ve(ve({builtinPlacements:w},j),{},{prefixCls:a,ref:J,popupClassName:Qe(A,se({},"".concat(a,"-show-arrow"),n)),popupStyle:I,action:L,showAction:T,hideAction:Te||[],popupPlacement:v,popupAlign:f,popupTransitionName:u,popupAnimation:o,popupVisible:le,stretch:oe()?"minWidth":"",popup:de(),onPopupVisibleChange:ge,onPopupClick:Q,getPopupContainer:k}),children:Re()})}const OY=C.exports.forwardRef(RY);var AY=0,zf={};function s1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,r=AY++,n=t;function i(){n-=1,n<=0?(e(),delete zf[r]):zf[r]=rn(i)}return zf[r]=rn(i),r}s1.cancel=function(t){t!==void 0&&(rn.cancel(zf[t]),delete zf[t])};s1.ids=zf;var o2;function fP(e){return!e||e.offsetParent===null||e.hidden}function NY(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 zY(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 XN=function(e){vi(r,e);var t=gi(r);function r(){var n;return Qn(this,r),n=t.apply(this,arguments),n.containerRef=C.exports.createRef(),n.animationStart=!1,n.destroyed=!1,n.onClick=function(i,a){var u,o,f=n.props,p=f.insertExtraNode,v=f.disabled;if(!(v||!i||fP(i)||i.className.includes("-leave"))){n.extraNode=document.createElement("div");var y=Nr(n),w=y.extraNode,k=n.context.getPrefixCls;w.className="".concat(k(""),"-click-animating-node");var T=n.getAttributeName();if(i.setAttribute(T,"true"),a&&a!=="#fff"&&a!=="#ffffff"&&a!=="rgb(255, 255, 255)"&&a!=="rgba(255, 255, 255, 1)"&&zY(a)&&!/rgba\((?:\d*, ){3}0\)/.test(a)&&a!=="transparent"){w.style.borderColor=a;var R=((u=i.getRootNode)===null||u===void 0?void 0:u.call(i))||i.ownerDocument,A=(o=NY(R))!==null&&o!==void 0?o:R;o2=vv(`
[`.concat(k(""),"-click-animating-without-extra-node='true']::after, .").concat(k(""),`-click-animating-node {
--antd-wave-shadow-color: `).concat(a,`;
}`),"antd-wave",{csp:n.csp,attachTo:A})}p&&i.appendChild(w),["transition","animation"].forEach(function(I){i.addEventListener("".concat(I,"start"),n.onTransitionStart),i.addEventListener("".concat(I,"end"),n.onTransitionEnd)})}},n.onTransitionStart=function(i){if(!n.destroyed){var a=n.containerRef.current;!i||i.target!==a||n.animationStart||n.resetEffect(a)}},n.onTransitionEnd=function(i){!i||i.animationName!=="fadeEffect"||n.resetEffect(i.target)},n.bindAnimationEvent=function(i){if(!(!i||!i.getAttribute||i.getAttribute("disabled")||i.className.includes("disabled"))){var a=function(o){if(!(o.target.tagName==="INPUT"||fP(o.target))){n.resetEffect(i);var f=getComputedStyle(i).getPropertyValue("border-top-color")||getComputedStyle(i).getPropertyValue("border-color")||getComputedStyle(i).getPropertyValue("background-color");n.clickWaveTimeoutId=window.setTimeout(function(){return n.onClick(i,f)},0),s1.cancel(n.animationStartId),n.animationStart=!0,n.animationStartId=s1(function(){n.animationStart=!1},10)}};return i.addEventListener("click",a,!0),{cancel:function(){i.removeEventListener("click",a,!0)}}}},n.renderWave=function(i){var a=i.csp,u=n.props.children;if(n.csp=a,!C.exports.isValidElement(u))return u;var o=n.containerRef;return md(u)&&(o=ta(u.ref,n.containerRef)),Ni(u,{ref:o})},n}return Jn(r,[{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,a=this.props.insertExtraNode;return a?"".concat(i(""),"-click-animating"):"".concat(i(""),"-click-animating-without-extra-node")}},{key:"resetEffect",value:function(i){var a=this;if(!(!i||i===this.extraNode||!(i instanceof Element))){var u=this.props.insertExtraNode,o=this.getAttributeName();i.setAttribute(o,"false"),o2&&(o2.innerHTML=""),u&&this.extraNode&&i.contains(this.extraNode)&&i.removeChild(this.extraNode),["transition","animation"].forEach(function(f){i.removeEventListener("".concat(f,"start"),a.onTransitionStart),i.removeEventListener("".concat(f,"end"),a.onTransitionEnd)})}}},{key:"render",value:function(){return S(rc,{children:this.renderWave})}}]),r}(C.exports.Component);XN.contextType=zr;const DY=XN;var LY=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},YN=C.exports.createContext(void 0),FY=function(t){var r,n=C.exports.useContext(zr),i=n.getPrefixCls,a=n.direction,u=t.prefixCls,o=t.size,f=t.className,p=LY(t,["prefixCls","size","className"]),v=i("btn-group",u),y="";switch(o){case"large":y="lg";break;case"small":y="sm";break}var w=Qe(v,(r={},se(r,"".concat(v,"-").concat(y),y),se(r,"".concat(v,"-rtl"),a==="rtl"),r),f);return S(YN.Provider,{value:o,children:S("div",{...p,className:w})})};const $Y=FY;var a2=function(){return{width:0,opacity:0,transform:"scale(0)"}},s2=function(t){return{width:t.scrollWidth,opacity:1,transform:"scale(1)"}},BY=function(t){var r=t.prefixCls,n=t.loading,i=t.existIcon,a=!!n;return i?S("span",{className:"".concat(r,"-loading-icon"),children:S(Wf,{})}):S(Za,{visible:a,motionName:"".concat(r,"-loading-icon-motion"),removeOnLeave:!0,onAppearStart:a2,onAppearActive:s2,onEnterStart:a2,onEnterActive:s2,onLeaveStart:s2,onLeaveActive:a2,children:function(u,o){var f=u.className,p=u.style;return S("span",{className:"".concat(r,"-loading-icon"),style:p,ref:o,children:S(Wf,{className:f})})}})};const VY=BY;var jY=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},hP=/^[\u4e00-\u9fa5]{2}$/,D4=hP.test.bind(hP);function UY(e){return typeof e=="string"}function l2(e){return e==="text"||e==="link"}function KY(e,t){if(e!=null){var r=t?" ":"";return typeof e!="string"&&typeof e!="number"&&UY(e.type)&&D4(e.props.children)?Ni(e,{children:e.props.children.split("").join(r)}):typeof e=="string"?D4(e)?S("span",{children:e.split("").join(r)}):S("span",{children:e}):IA(e)?S("span",{children:e}):e}}function HY(e,t){var r=!1,n=[];return C.exports.Children.forEach(e,function(i){var a=ar(i),u=a==="string"||a==="number";if(r&&u){var o=n.length-1,f=n[o];n[o]="".concat(f).concat(i)}else n.push(i);r=u}),C.exports.Children.map(n,function(i){return KY(i,t)})}Sa("default","primary","ghost","dashed","link","text");Sa("default","circle","round");Sa("submit","button","reset");function QN(e){return e==="danger"?{danger:!0}:{type:e}}var WY=function(t,r){var n,i=t.loading,a=i===void 0?!1:i,u=t.prefixCls,o=t.type,f=o===void 0?"default":o,p=t.danger,v=t.shape,y=v===void 0?"default":v,w=t.size,k=t.disabled,T=t.className,R=t.children,A=t.icon,I=t.ghost,O=I===void 0?!1:I,N=t.block,L=N===void 0?!1:N,B=t.htmlType,j=B===void 0?"button":B,G=jY(t,["loading","prefixCls","type","danger","shape","size","disabled","className","children","icon","ghost","block","htmlType"]),H=C.exports.useContext(Gs),te=C.exports.useContext(nc),Y=k!=null?k:te,le=C.exports.useContext(YN),J=C.exports.useState(!!a),Z=Le(J,2),Q=Z[0],ge=Z[1],ne=C.exports.useState(!1),de=Le(ne,2),oe=de[0],ye=de[1],Re=C.exports.useContext(zr),Te=Re.getPrefixCls,ke=Re.autoInsertSpaceInButton,ze=Re.direction,Ie=r||C.exports.createRef(),Ne=function(){return C.exports.Children.count(R)===1&&!A&&!l2(f)},De=function(){if(!(!Ie||!Ie.current||ke===!1)){var xt=Ie.current.textContent;Ne()&&D4(xt)?oe||ye(!0):oe&&ye(!1)}},Ve=typeof a=="boolean"?a:(a==null?void 0:a.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(De,[Ie]);var Ge=function(xt){var Wt=t.onClick;if(Q||Y){xt.preventDefault();return}Wt==null||Wt(xt)},je=Te("btn",u),ct=ke!==!1,pt=vh(je,ze),Tt=pt.compactSize,Ye=pt.compactItemClassnames,Pt={large:"lg",small:"sm",middle:void 0},mt=Tt||le||w||H,It=mt&&Pt[mt]||"",Ct=Q?"loading":A,Dt=Si(G,["navigate"]),lt=Qe(je,(n={},se(n,"".concat(je,"-").concat(y),y!=="default"&&y),se(n,"".concat(je,"-").concat(f),f),se(n,"".concat(je,"-").concat(It),It),se(n,"".concat(je,"-icon-only"),!R&&R!==0&&!!Ct),se(n,"".concat(je,"-background-ghost"),O&&!l2(f)),se(n,"".concat(je,"-loading"),Q),se(n,"".concat(je,"-two-chinese-chars"),oe&&ct&&!Q),se(n,"".concat(je,"-block"),L),se(n,"".concat(je,"-dangerous"),!!p),se(n,"".concat(je,"-rtl"),ze==="rtl"),se(n,"".concat(je,"-disabled"),Dt.href!==void 0&&Y),n),Ye,T),dt=A&&!Q?A:S(VY,{existIcon:!!A,prefixCls:je,loading:!!Q}),ut=R||R===0?HY(R,Ne()&&ct):null;if(Dt.href!==void 0)return Xe("a",{...Dt,className:lt,onClick:Ge,ref:Ie,children:[dt,ut]});var it=Xe("button",{...G,type:j,className:lt,onClick:Ge,disabled:Y,ref:Ie,children:[dt,ut]});return l2(f)?it:S(DY,{disabled:!!Q,children:it})},MS=C.exports.forwardRef(WY);MS.Group=$Y;MS.__ANT_BUTTON=!0;const On=MS;var JN=function(t){if(Lo()&&window.document.documentElement){var r=Array.isArray(t)?t:[t],n=window.document.documentElement;return r.some(function(i){return i in n.style})}return!1},qY=function(t,r){if(!JN(t))return!1;var n=document.createElement("div"),i=n.style[t];return n.style[t]=r,n.style[t]!==i};function L4(e,t){return!Array.isArray(e)&&t!==void 0?qY(e,t):JN(e)}var e9=function(){return Lo()&&window.document.documentElement},Py,GY=function(){if(!e9())return!1;if(Py!==void 0)return Py;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),Py=t.scrollHeight===1,document.body.removeChild(t),Py};const t9=function(){var e=C.exports.useState(!1),t=Le(e,2),r=t[0],n=t[1];return C.exports.useEffect(function(){n(GY())},[]),r};function ZY(e){var t=e.className,r=e.direction,n=e.index,i=e.marginDirection,a=e.children,u=e.split,o=e.wrap,f=C.exports.useContext(r9),p=f.horizontalSize,v=f.verticalSize,y=f.latestIndex,w=f.supportFlexGap,k={};return w||(r==="vertical"?n<y&&(k={marginBottom:p/(u?2:1)}):k=tt(tt({},n<y&&se({},i,p/(u?2:1))),o&&{paddingBottom:v})),a==null?null:Xe(Ar,{children:[S("div",{className:t,style:k,children:a}),n<y&&u&&S("span",{className:"".concat(t,"-split"),style:k,children:u})]})}var XY=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},r9=C.exports.createContext({latestIndex:0,horizontalSize:0,verticalSize:0,supportFlexGap:!1}),YY={small:8,middle:16,large:24};function QY(e){return typeof e=="string"?YY[e]:e||0}var JY=function(t){var r,n=C.exports.useContext(zr),i=n.getPrefixCls,a=n.space,u=n.direction,o=t.size,f=o===void 0?(a==null?void 0:a.size)||"small":o,p=t.align,v=t.className,y=t.children,w=t.direction,k=w===void 0?"horizontal":w,T=t.prefixCls,R=t.split,A=t.style,I=t.wrap,O=I===void 0?!1:I,N=XY(t,["size","align","className","children","direction","prefixCls","split","style","wrap"]),L=t9(),B=C.exports.useMemo(function(){return(Array.isArray(f)?f:[f,f]).map(function(ye){return QY(ye)})},[f]),j=Le(B,2),G=j[0],H=j[1],te=lo(y,{keepEmpty:!0}),Y=p===void 0&&k==="horizontal"?"center":p,le=i("space",T),J=Qe(le,"".concat(le,"-").concat(k),(r={},se(r,"".concat(le,"-rtl"),u==="rtl"),se(r,"".concat(le,"-align-").concat(Y),Y),r),v),Z="".concat(le,"-item"),Q=u==="rtl"?"marginLeft":"marginRight",ge=0,ne=te.map(function(ye,Re){ye!=null&&(ge=Re);var Te=ye&&ye.key||"".concat(Z,"-").concat(Re);return S(ZY,{className:Z,direction:k,index:Re,marginDirection:Q,split:R,wrap:O,children:ye},Te)}),de=C.exports.useMemo(function(){return{horizontalSize:G,verticalSize:H,latestIndex:ge,supportFlexGap:L}},[G,H,ge,L]);if(te.length===0)return null;var oe={};return O&&(oe.flexWrap="wrap",L||(oe.marginBottom=-H)),L&&(oe.columnGap=G,oe.rowGap=H),S("div",{className:J,style:tt(tt({},oe),A),...N,children:S(r9.Provider,{value:de,children:ne})})},n9=JY;n9.Compact=cX;const IS=n9;var eQ=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},i9=function(t){var r=C.exports.useContext(zr),n=r.getPopupContainer,i=r.getPrefixCls,a=r.direction,u=t.prefixCls,o=t.type,f=o===void 0?"default":o,p=t.danger,v=t.disabled,y=t.loading,w=t.onClick,k=t.htmlType,T=t.children,R=t.className,A=t.menu,I=t.arrow,O=t.autoFocus,N=t.overlay,L=t.trigger,B=t.align,j=t.visible,G=t.open,H=t.onVisibleChange,te=t.onOpenChange,Y=t.placement,le=t.getPopupContainer,J=t.href,Z=t.icon,Q=Z===void 0?S(IN,{}):Z,ge=t.title,ne=t.buttonsRender,de=ne===void 0?function(It){return It}:ne,oe=t.mouseEnterDelay,ye=t.mouseLeaveDelay,Re=t.overlayClassName,Te=t.overlayStyle,ke=t.destroyPopupOnHide,ze=eQ(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"]),Ie=i("dropdown-button",u),Ne={menu:A,arrow:I,autoFocus:O,align:B,disabled:v,trigger:v?[]:L,onOpenChange:te||H,getPopupContainer:le||n,mouseEnterDelay:oe,mouseLeaveDelay:ye,overlayClassName:Re,overlayStyle:Te,destroyPopupOnHide:ke},De=vh(Ie,a),Ve=De.compactSize,Ge=De.compactItemClassnames,je=Qe(Ie,Ge,R);"overlay"in t&&(Ne.overlay=N),"open"in t?Ne.open=G:"visible"in t&&(Ne.open=j),"placement"in t?Ne.placement=Y:Ne.placement=a==="rtl"?"bottomLeft":"bottomRight";var ct=S(On,{type:f,danger:p,disabled:v,loading:y,onClick:w,htmlType:k,href:J,title:ge,children:T}),pt=S(On,{type:f,danger:p,icon:Q}),Tt=de([ct,pt]),Ye=Le(Tt,2),Pt=Ye[0],mt=Ye[1];return Xe(IS.Compact,{className:je,size:Ve,block:!0,...ze,children:[Pt,S(RS,{...Ne,children:mt})]})};i9.__ANT_BUTTON=!0;const tQ=i9;Sa("topLeft","topCenter","topRight","bottomLeft","bottomCenter","bottomRight","top","bottom");var o9=function(t){var r=C.exports.useContext(zr),n=r.getPopupContainer,i=r.getPrefixCls,a=r.direction,u=function(){var De=i(),Ve=t.placement,Ge=Ve===void 0?"":Ve,je=t.transitionName;return je!==void 0?je:Ge.includes("top")?"".concat(De,"-slide-down"):"".concat(De,"-slide-up")},o=function(){var De=t.placement;if(!De)return a==="rtl"?"bottomRight":"bottomLeft";if(De.includes("Center")){var Ve=De.slice(0,De.indexOf("Center"));return Ve}return De},f=t.menu,p=t.arrow,v=t.prefixCls,y=t.children,w=t.trigger,k=t.disabled,T=t.dropdownRender,R=t.getPopupContainer,A=t.overlayClassName,I=t.visible,O=t.open,N=t.onVisibleChange,L=t.onOpenChange,B=t.mouseEnterDelay,j=B===void 0?.15:B,G=t.mouseLeaveDelay,H=G===void 0?.1:G,te=t.autoAdjustOverflow,Y=te===void 0?!0:te,le=i("dropdown",v),J=C.exports.Children.only(y),Z=Ni(J,{className:Qe("".concat(le,"-trigger"),se({},"".concat(le,"-rtl"),a==="rtl"),J.props.className),disabled:k}),Q=k?[]:w,ge;Q&&Q.includes("contextMenu")&&(ge=!0);var ne=Yi(!1,{value:O!==void 0?O:I}),de=Le(ne,2),oe=de[0],ye=de[1],Re=Wm(function(Ne){N==null||N(Ne),L==null||L(Ne),ye(Ne)}),Te=Qe(A,se({},"".concat(le,"-rtl"),a==="rtl")),ke=PN({arrowPointAtCenter:ar(p)==="object"&&p.pointAtCenter,autoAdjustOverflow:Y}),ze=C.exports.useCallback(function(){ye(!1)},[]),Ie=function(){var De=t.overlay,Ve;return f!=null&&f.items?Ve=S(ZN,{...f}):typeof De=="function"?Ve=De():Ve=De,T&&(Ve=T(Ve)),Ve=C.exports.Children.only(typeof Ve=="string"?S("span",{children:Ve}):Ve),S(GN,{prefixCls:"".concat(le,"-menu"),expandIcon:S("span",{className:"".concat(le,"-menu-submenu-arrow"),children:S(TS,{className:"".concat(le,"-menu-submenu-arrow-icon")})}),mode:"vertical",selectable:!1,onClick:ze,validator:function(je){je.mode},children:S(t1,{children:Ve})})};return S(OY,{alignPoint:ge,...t,mouseEnterDelay:j,mouseLeaveDelay:H,visible:oe,builtinPlacements:ke,arrow:!!p,overlayClassName:Te,prefixCls:le,getPopupContainer:R||n,transitionName:u(),trigger:Q,overlay:Ie,placement:o(),onVisibleChange:Re,children:Z})};o9.Button=tQ;const RS=o9;var rQ=typeof Sl=="object"&&Sl&&Sl.Object===Object&&Sl,a9=rQ,nQ=a9,iQ=typeof self=="object"&&self&&self.Object===Object&&self,oQ=nQ||iQ||Function("return this")(),Zs=oQ,aQ=Zs,sQ=aQ.Symbol,OS=sQ,lQ=Array.isArray,AS=lQ,pP=OS,s9=Object.prototype,uQ=s9.hasOwnProperty,cQ=s9.toString,$p=pP?pP.toStringTag:void 0;function dQ(e){var t=uQ.call(e,$p),r=e[$p];try{e[$p]=void 0;var n=!0}catch{}var i=cQ.call(e);return n&&(t?e[$p]=r:delete e[$p]),i}var fQ=dQ,hQ=Object.prototype,pQ=hQ.toString;function mQ(e){return pQ.call(e)}var vQ=mQ,mP=OS,gQ=fQ,yQ=vQ,xQ="[object Null]",_Q="[object Undefined]",vP=mP?mP.toStringTag:void 0;function bQ(e){return e==null?e===void 0?_Q:xQ:vP&&vP in Object(e)?gQ(e):yQ(e)}var wv=bQ;function wQ(e){return e!=null&&typeof e=="object"}var Cv=wQ,CQ=wv,SQ=Cv,EQ="[object Symbol]";function kQ(e){return typeof e=="symbol"||SQ(e)&&CQ(e)==EQ}var TQ=kQ,PQ=/\s/;function MQ(e){for(var t=e.length;t--&&PQ.test(e.charAt(t)););return t}var IQ=MQ,RQ=IQ,OQ=/^\s+/;function AQ(e){return e&&e.slice(0,RQ(e)+1).replace(OQ,"")}var NQ=AQ;function zQ(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Cx=zQ,DQ=NQ,gP=Cx,LQ=TQ,yP=0/0,FQ=/^[-+]0x[0-9a-f]+$/i,$Q=/^0b[01]+$/i,BQ=/^0o[0-7]+$/i,VQ=parseInt;function jQ(e){if(typeof e=="number")return e;if(LQ(e))return yP;if(gP(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=gP(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=DQ(e);var r=$Q.test(e);return r||BQ.test(e)?VQ(e.slice(2),r?2:8):FQ.test(e)?yP:+e}var UQ=jQ,ld=function(t,r,n,i){var a=n?n.call(i,t,r):void 0;if(a!==void 0)return!!a;if(t===r)return!0;if(typeof t!="object"||!t||typeof r!="object"||!r)return!1;var u=Object.keys(t),o=Object.keys(r);if(u.length!==o.length)return!1;for(var f=Object.prototype.hasOwnProperty.bind(r),p=0;p<u.length;p++){var v=u[p];if(!f(v))return!1;var y=t[v],w=r[v];if(a=n?n.call(i,y,w,v):void 0,a===!1||a===void 0&&y!==w)return!1}return!0},l9=C.exports.createContext(null),KQ=l9.Provider,u9=C.exports.createContext(null),HQ=u9.Provider,NS=function(e){vi(r,e);var t=gi(r);function r(n){var i;Qn(this,r),i=t.call(this,n),i.handleChange=function(u){var o=i.props,f=o.disabled,p=o.onChange;f||("checked"in i.props||i.setState({checked:u.target.checked}),p&&p({target:ve(ve({},i.props),{},{checked:u.target.checked}),stopPropagation:function(){u.stopPropagation()},preventDefault:function(){u.preventDefault()},nativeEvent:u.nativeEvent}))},i.saveInput=function(u){i.input=u};var a="checked"in n?n.checked:n.defaultChecked;return i.state={checked:a},i}return Jn(r,[{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"render",value:function(){var i,a=this.props,u=a.prefixCls,o=a.className,f=a.style,p=a.name,v=a.id,y=a.type,w=a.disabled,k=a.readOnly,T=a.tabIndex,R=a.onClick,A=a.onFocus,I=a.onBlur,O=a.onKeyDown,N=a.onKeyPress,L=a.onKeyUp,B=a.autoFocus,j=a.value,G=a.required,H=Mr(a,["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=Qe(u,o,(i={},se(i,"".concat(u,"-checked"),Y),se(i,"".concat(u,"-disabled"),w),i));return Xe("span",{className:le,style:f,children:[S("input",{name:p,id:v,type:y,required:G,readOnly:k,disabled:w,tabIndex:T,className:"".concat(u,"-input"),checked:!!Y,onClick:R,onFocus:A,onBlur:I,onKeyUp:L,onKeyDown:O,onKeyPress:N,onChange:this.handleChange,autoFocus:B,ref:this.saveInput,value:j,...te}),S("span",{className:"".concat(u,"-inner")})]})}}],[{key:"getDerivedStateFromProps",value:function(i,a){return"checked"in i?ve(ve({},a),{},{checked:i.checked}):null}}]),r}(C.exports.Component);NS.defaultProps={prefixCls:"rc-checkbox",className:"",style:{},type:"checkbox",defaultChecked:!1,onFocus:function(){},onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){}};var WQ=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},qQ=function(t,r){var n,i=C.exports.useContext(l9),a=C.exports.useContext(u9),u=C.exports.useContext(zr),o=u.getPrefixCls,f=u.direction,p=C.exports.useRef(),v=ta(r,p),y=C.exports.useContext(ya),w=y.isFormItemInput,k=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)},T=t.prefixCls,R=t.className,A=t.children,I=t.style,O=t.disabled,N=WQ(t,["prefixCls","className","children","style","disabled"]),L=o("radio",T),B=((i==null?void 0:i.optionType)||a)==="button"?"".concat(L,"-button"):L,j=tt({},N),G=C.exports.useContext(nc);j.disabled=O||G,i&&(j.name=i.name,j.onChange=k,j.checked=t.value===i.value,j.disabled=j.disabled||i.disabled);var H=Qe("".concat(B,"-wrapper"),(n={},se(n,"".concat(B,"-wrapper-checked"),j.checked),se(n,"".concat(B,"-wrapper-disabled"),j.disabled),se(n,"".concat(B,"-wrapper-rtl"),f==="rtl"),se(n,"".concat(B,"-wrapper-in-form-item"),w),n),R);return Xe("label",{className:H,style:I,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,children:[S(NS,{...j,type:"radio",prefixCls:B,ref:v}),A!==void 0?S("span",{children:A}):null]})},GQ=C.exports.forwardRef(qQ);const l1=GQ;var ZQ=C.exports.forwardRef(function(e,t){var r,n=C.exports.useContext(zr),i=n.getPrefixCls,a=n.direction,u=C.exports.useContext(Gs),o=Yi(e.defaultValue,{value:e.value}),f=Le(o,2),p=f[0],v=f[1],y=function(de){var oe=p,ye=de.target.value;"value"in e||v(ye);var Re=e.onChange;Re&&ye!==oe&&Re(de)},w=e.prefixCls,k=e.className,T=k===void 0?"":k,R=e.options,A=e.buttonStyle,I=A===void 0?"outline":A,O=e.disabled,N=e.children,L=e.size,B=e.style,j=e.id,G=e.onMouseEnter,H=e.onMouseLeave,te=e.onFocus,Y=e.onBlur,le=i("radio",w),J="".concat(le,"-group"),Z=N;R&&R.length>0&&(Z=R.map(function(ne){return typeof ne=="string"||typeof ne=="number"?S(l1,{prefixCls:le,disabled:O,value:ne,checked:p===ne,children:ne},ne.toString()):S(l1,{prefixCls:le,disabled:ne.disabled||O,value:ne.value,checked:p===ne.value,style:ne.style,children:ne.label},"radio-group-value-options-".concat(ne.value))}));var Q=L||u,ge=Qe(J,"".concat(J,"-").concat(I),(r={},se(r,"".concat(J,"-").concat(Q),Q),se(r,"".concat(J,"-rtl"),a==="rtl"),r),T);return S("div",{...MA(e),className:ge,style:B,onMouseEnter:G,onMouseLeave:H,onFocus:te,onBlur:Y,id:j,ref:t,children:S(KQ,{value:{onChange:y,value:p,disabled:e.disabled,name:e.name,optionType:e.optionType},children:Z})})});const XQ=C.exports.memo(ZQ);var YQ=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},QQ=function(t,r){var n=C.exports.useContext(zr),i=n.getPrefixCls,a=t.prefixCls,u=YQ(t,["prefixCls"]),o=i("radio",a);return S(HQ,{value:"button",children:S(l1,{prefixCls:o,...u,type:"radio",ref:r})})};const JQ=C.exports.forwardRef(QQ);var Sx=l1;Sx.Button=JQ;Sx.Group=XQ;Sx.__ANT_RADIO=!0;const c9=Sx;var eJ=Zs,tJ=function(){return eJ.Date.now()},rJ=tJ,nJ=Cx,u2=rJ,xP=UQ,iJ="Expected a function",oJ=Math.max,aJ=Math.min;function sJ(e,t,r){var n,i,a,u,o,f,p=0,v=!1,y=!1,w=!0;if(typeof e!="function")throw new TypeError(iJ);t=xP(t)||0,nJ(r)&&(v=!!r.leading,y="maxWait"in r,a=y?oJ(xP(r.maxWait)||0,t):a,w="trailing"in r?!!r.trailing:w);function k(j){var G=n,H=i;return n=i=void 0,p=j,u=e.apply(H,G),u}function T(j){return p=j,o=setTimeout(I,t),v?k(j):u}function R(j){var G=j-f,H=j-p,te=t-G;return y?aJ(te,a-H):te}function A(j){var G=j-f,H=j-p;return f===void 0||G>=t||G<0||y&&H>=a}function I(){var j=u2();if(A(j))return O(j);o=setTimeout(I,R(j))}function O(j){return o=void 0,w&&n?k(j):(n=i=void 0,u)}function N(){o!==void 0&&clearTimeout(o),p=0,n=f=i=o=void 0}function L(){return o===void 0?u:O(u2())}function B(){var j=u2(),G=A(j);if(n=arguments,i=this,f=j,G){if(o===void 0)return T(f);if(y)return clearTimeout(o),o=setTimeout(I,t),k(f)}return o===void 0&&(o=setTimeout(I,t)),u}return B.cancel=N,B.flush=L,B}var lJ=sJ;function d9(e,t){var r=new Set;return e.forEach(function(n){t.has(n)||r.add(n)}),r}function uJ(e){var t=e||{},r=t.disabled,n=t.disableCheckbox,i=t.checkable;return!!(r||n)||i===!1}function cJ(e,t,r,n){for(var i=new Set(e),a=new Set,u=0;u<=r;u+=1){var o=t.get(u)||new Set;o.forEach(function(y){var w=y.key,k=y.node,T=y.children,R=T===void 0?[]:T;i.has(w)&&!n(k)&&R.filter(function(A){return!n(A.node)}).forEach(function(A){i.add(A.key)})})}for(var f=new Set,p=r;p>=0;p-=1){var v=t.get(p)||new Set;v.forEach(function(y){var w=y.parent,k=y.node;if(!(n(k)||!y.parent||f.has(y.parent.key))){if(n(y.parent.node)){f.add(w.key);return}var T=!0,R=!1;(w.children||[]).filter(function(A){return!n(A.node)}).forEach(function(A){var I=A.key,O=i.has(I);T&&!O&&(T=!1),!R&&(O||a.has(I))&&(R=!0)}),T&&i.add(w.key),R&&a.add(w.key),f.add(w.key)}})}return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(d9(a,i))}}function dJ(e,t,r,n,i){for(var a=new Set(e),u=new Set(t),o=0;o<=n;o+=1){var f=r.get(o)||new Set;f.forEach(function(w){var k=w.key,T=w.node,R=w.children,A=R===void 0?[]:R;!a.has(k)&&!u.has(k)&&!i(T)&&A.filter(function(I){return!i(I.node)}).forEach(function(I){a.delete(I.key)})})}u=new Set;for(var p=new Set,v=n;v>=0;v-=1){var y=r.get(v)||new Set;y.forEach(function(w){var k=w.parent,T=w.node;if(!(i(T)||!w.parent||p.has(w.parent.key))){if(i(w.parent.node)){p.add(k.key);return}var R=!0,A=!1;(k.children||[]).filter(function(I){return!i(I.node)}).forEach(function(I){var O=I.key,N=a.has(O);R&&!N&&(R=!1),!A&&(N||u.has(O))&&(A=!0)}),R||a.delete(k.key),A&&u.add(k.key),p.add(k.key)}})}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(d9(u,a))}}function Ml(e,t,r,n){var i=[],a;n?a=n:a=uJ;var u=new Set(e.filter(function(v){var y=!!r[v];return y||i.push(v),y})),o=new Map,f=0;Object.keys(r).forEach(function(v){var y=r[v],w=y.level,k=o.get(w);k||(k=new Set,o.set(w,k)),k.add(y),f=Math.max(f,w)}),Bn(!i.length,"Tree missing follow keys: ".concat(i.slice(0,100).map(function(v){return"'".concat(v,"'")}).join(", ")));var p;return t===!0?p=cJ(u,o,f,a):p=dJ(u,t.halfCheckedKeys,o,f,a),p}var zS=C.exports.createContext(null),fJ=function(t){for(var r=t.prefixCls,n=t.level,i=t.isStart,a=t.isEnd,u="".concat(r,"-indent-unit"),o=[],f=0;f<n;f+=1){var p;o.push(S("span",{className:Qe(u,(p={},se(p,"".concat(u,"-start"),i[f]),se(p,"".concat(u,"-end"),a[f]),p))},f))}return S("span",{"aria-hidden":"true",className:"".concat(r,"-indent"),children:o})};const hJ=C.exports.memo(fJ);var pJ=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],_P="open",bP="close",mJ="---",vJ=function(e){vi(r,e);var t=gi(r);function r(){var n;Qn(this,r);for(var i=arguments.length,a=new Array(i),u=0;u<i;u++)a[u]=arguments[u];return n=t.call.apply(t,[this].concat(a)),n.state={dragNodeHighlight:!1},n.selectHandle=void 0,n.onSelectorClick=function(o){var f=n.props.context.onNodeClick;f(o,Ri(n.props)),n.isSelectable()?n.onSelect(o):n.onCheck(o)},n.onSelectorDoubleClick=function(o){var f=n.props.context.onNodeDoubleClick;f(o,Ri(n.props))},n.onSelect=function(o){if(!n.isDisabled()){var f=n.props.context.onNodeSelect;o.preventDefault(),f(o,Ri(n.props))}},n.onCheck=function(o){if(!n.isDisabled()){var f=n.props,p=f.disableCheckbox,v=f.checked,y=n.props.context.onNodeCheck;if(!(!n.isCheckable()||p)){o.preventDefault();var w=!v;y(o,Ri(n.props),w)}}},n.onMouseEnter=function(o){var f=n.props.context.onNodeMouseEnter;f(o,Ri(n.props))},n.onMouseLeave=function(o){var f=n.props.context.onNodeMouseLeave;f(o,Ri(n.props))},n.onContextMenu=function(o){var f=n.props.context.onNodeContextMenu;f(o,Ri(n.props))},n.onDragStart=function(o){var f=n.props.context.onNodeDragStart;o.stopPropagation(),n.setState({dragNodeHighlight:!0}),f(o,Nr(n));try{o.dataTransfer.setData("text/plain","")}catch{}},n.onDragEnter=function(o){var f=n.props.context.onNodeDragEnter;o.preventDefault(),o.stopPropagation(),f(o,Nr(n))},n.onDragOver=function(o){var f=n.props.context.onNodeDragOver;o.preventDefault(),o.stopPropagation(),f(o,Nr(n))},n.onDragLeave=function(o){var f=n.props.context.onNodeDragLeave;o.stopPropagation(),f(o,Nr(n))},n.onDragEnd=function(o){var f=n.props.context.onNodeDragEnd;o.stopPropagation(),n.setState({dragNodeHighlight:!1}),f(o,Nr(n))},n.onDrop=function(o){var f=n.props.context.onNodeDrop;o.preventDefault(),o.stopPropagation(),n.setState({dragNodeHighlight:!1}),f(o,Nr(n))},n.onExpand=function(o){var f=n.props,p=f.loading,v=f.context.onNodeExpand;p||v(o,Ri(n.props))},n.setSelectHandle=function(o){n.selectHandle=o},n.getNodeState=function(){var o=n.props.expanded;return n.isLeaf()?null:o?_P:bP},n.hasChildren=function(){var o=n.props.eventKey,f=n.props.context.keyEntities,p=f[o]||{},v=p.children;return!!(v||[]).length},n.isLeaf=function(){var o=n.props,f=o.isLeaf,p=o.loaded,v=n.props.context.loadData,y=n.hasChildren();return f===!1?!1:f||!v&&!y||v&&p&&!y},n.isDisabled=function(){var o=n.props.disabled,f=n.props.context.disabled;return!!(f||o)},n.isCheckable=function(){var o=n.props.checkable,f=n.props.context.checkable;return!f||o===!1?!1:f},n.syncLoadData=function(o){var f=o.expanded,p=o.loading,v=o.loaded,y=n.props.context,w=y.loadData,k=y.onNodeLoad;p||w&&f&&!n.isLeaf()&&!n.hasChildren()&&!v&&k(Ri(n.props))},n.isDraggable=function(){var o=n.props,f=o.data,p=o.context.draggable;return!!(p&&(!p.nodeDraggable||p.nodeDraggable(f)))},n.renderDragHandler=function(){var o=n.props.context,f=o.draggable,p=o.prefixCls;return f!=null&&f.icon?S("span",{className:"".concat(p,"-draggable-icon"),children:f.icon}):null},n.renderSwitcherIconDom=function(o){var f=n.props.switcherIcon,p=n.props.context.switcherIcon,v=f||p;return typeof v=="function"?v(ve(ve({},n.props),{},{isLeaf:o})):v},n.renderSwitcher=function(){var o=n.props.expanded,f=n.props.context.prefixCls;if(n.isLeaf()){var p=n.renderSwitcherIconDom(!0);return p!==!1?S("span",{className:Qe("".concat(f,"-switcher"),"".concat(f,"-switcher-noop")),children:p}):null}var v=Qe("".concat(f,"-switcher"),"".concat(f,"-switcher_").concat(o?_P:bP)),y=n.renderSwitcherIconDom(!1);return y!==!1?S("span",{onClick:n.onExpand,className:v,children:y}):null},n.renderCheckbox=function(){var o=n.props,f=o.checked,p=o.halfChecked,v=o.disableCheckbox,y=n.props.context.prefixCls,w=n.isDisabled(),k=n.isCheckable();if(!k)return null;var T=typeof k!="boolean"?k:null;return S("span",{className:Qe("".concat(y,"-checkbox"),f&&"".concat(y,"-checkbox-checked"),!f&&p&&"".concat(y,"-checkbox-indeterminate"),(w||v)&&"".concat(y,"-checkbox-disabled")),onClick:n.onCheck,children:T})},n.renderIcon=function(){var o=n.props.loading,f=n.props.context.prefixCls;return S("span",{className:Qe("".concat(f,"-iconEle"),"".concat(f,"-icon__").concat(n.getNodeState()||"docu"),o&&"".concat(f,"-icon_loading"))})},n.renderSelector=function(){var o=n.state.dragNodeHighlight,f=n.props,p=f.title,v=f.selected,y=f.icon,w=f.loading,k=f.data,T=n.props.context,R=T.prefixCls,A=T.showIcon,I=T.icon,O=T.loadData,N=T.titleRender,L=n.isDisabled(),B="".concat(R,"-node-content-wrapper"),j;if(A){var G=y||I;j=G?S("span",{className:Qe("".concat(R,"-iconEle"),"".concat(R,"-icon__customize")),children:typeof G=="function"?G(n.props):G}):n.renderIcon()}else O&&w&&(j=n.renderIcon());var H;typeof p=="function"?H=p(k):N?H=N(k):H=p;var te=S("span",{className:"".concat(R,"-title"),children:H});return Xe("span",{ref:n.setSelectHandle,title:typeof p=="string"?p:"",className:Qe("".concat(B),"".concat(B,"-").concat(n.getNodeState()||"normal"),!L&&(v||o)&&"".concat(R,"-node-selected")),onMouseEnter:n.onMouseEnter,onMouseLeave:n.onMouseLeave,onContextMenu:n.onContextMenu,onClick:n.onSelectorClick,onDoubleClick:n.onSelectorDoubleClick,children:[j,te,n.renderDropIndicator()]})},n.renderDropIndicator=function(){var o=n.props,f=o.disabled,p=o.eventKey,v=n.props.context,y=v.draggable,w=v.dropLevelOffset,k=v.dropPosition,T=v.prefixCls,R=v.indent,A=v.dropIndicatorRender,I=v.dragOverNodeKey,O=v.direction,N=!!y,L=!f&&N&&I===p;return L?A({dropPosition:k,dropLevelOffset:w,indent:R,prefixCls:T,direction:O}):null},n}return Jn(r,[{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,a=this.props.context.selectable;return typeof i=="boolean"?i:a}},{key:"render",value:function(){var i,a=this.props,u=a.eventKey,o=a.className,f=a.style,p=a.dragOver,v=a.dragOverGapTop,y=a.dragOverGapBottom,w=a.isLeaf,k=a.isStart,T=a.isEnd,R=a.expanded,A=a.selected,I=a.checked,O=a.halfChecked,N=a.loading,L=a.domRef,B=a.active;a.data;var j=a.onMouseMove,G=a.selectable,H=Mr(a,pJ),te=this.props.context,Y=te.prefixCls,le=te.filterTreeNode,J=te.keyEntities,Z=te.dropContainerKey,Q=te.dropTargetKey,ge=te.draggingNodeKey,ne=this.isDisabled(),de=qu(H,{aria:!0,data:!0}),oe=J[u]||{},ye=oe.level,Re=T[T.length-1],Te=this.isDraggable(),ke=!ne&&Te,ze=ge===u,Ie=G!==void 0?{"aria-selected":!!G}:void 0;return Xe("div",{ref:L,className:Qe(o,"".concat(Y,"-treenode"),(i={},se(i,"".concat(Y,"-treenode-disabled"),ne),se(i,"".concat(Y,"-treenode-switcher-").concat(R?"open":"close"),!w),se(i,"".concat(Y,"-treenode-checkbox-checked"),I),se(i,"".concat(Y,"-treenode-checkbox-indeterminate"),O),se(i,"".concat(Y,"-treenode-selected"),A),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",ze),se(i,"drop-target",Q===u),se(i,"drop-container",Z===u),se(i,"drag-over",!ne&&p),se(i,"drag-over-gap-top",!ne&&v),se(i,"drag-over-gap-bottom",!ne&&y),se(i,"filter-node",le&&le(Ri(this.props))),i)),style:f,draggable:ke,"aria-grabbed":ze,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:j,...Ie,...de,children:[S(hJ,{prefixCls:Y,level:ye,isStart:k,isEnd:T}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector()]})}}]),r}(C.exports.Component),ud=function(t){return S(zS.Consumer,{children:function(r){return S(vJ,{...t,context:r})}})};ud.displayName="TreeNode";ud.defaultProps={title:mJ};ud.isTreeNode=1;function Ds(e,t){if(!e)return[];var r=e.slice(),n=r.indexOf(t);return n>=0&&r.splice(n,1),r}function gl(e,t){var r=(e||[]).slice();return r.indexOf(t)===-1&&r.push(t),r}function DS(e){return e.split("-")}function f9(e,t){return"".concat(e,"-").concat(t)}function gJ(e){return e&&e.type&&e.type.isTreeNode}function yJ(e,t){var r=[],n=t[e];function i(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];a.forEach(function(u){var o=u.key,f=u.children;r.push(o),i(f)})}return i(n.children),r}function xJ(e){if(e.parent){var t=DS(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function _J(e){var t=DS(e.pos);return Number(t[t.length-1])===0}function wP(e,t,r,n,i,a,u,o,f,p){var v,y=e.clientX,w=e.clientY,k=e.target.getBoundingClientRect(),T=k.top,R=k.height,A=(p==="rtl"?-1:1)*(((i==null?void 0:i.x)||0)-y),I=(A-12)/n,O=o[r.props.eventKey];if(w<T+R/2){var N=u.findIndex(function(ge){return ge.key===O.key}),L=N<=0?0:N-1,B=u[L].key;O=o[B]}var j=O.key,G=O,H=O.key,te=0,Y=0;if(!f.includes(j))for(var le=0;le<I&&xJ(O);le+=1)O=O.parent,Y+=1;var J=t.props.data,Z=O.node,Q=!0;return _J(O)&&O.level===0&&w<T+R/2&&a({dragNode:J,dropNode:Z,dropPosition:-1})&&O.key===r.props.eventKey?te=-1:(G.children||[]).length&&f.includes(H)?a({dragNode:J,dropNode:Z,dropPosition:0})?te=0:Q=!1:Y===0?I>-1.5?a({dragNode:J,dropNode:Z,dropPosition:1})?te=1:Q=!1:a({dragNode:J,dropNode:Z,dropPosition:0})?te=0:a({dragNode:J,dropNode:Z,dropPosition:1})?te=1:Q=!1:a({dragNode:J,dropNode:Z,dropPosition:1})?te=1:Q=!1,{dropPosition:te,dropLevelOffset:Y,dropTargetKey:O.key,dropTargetPos:O.pos,dragOverNodeKey:H,dropContainerKey:te===0?null:((v=O.parent)===null||v===void 0?void 0:v.key)||null,dropAllowed:Q}}function CP(e,t){if(!!e){var r=t.multiple;return r?e.slice():e.length?[e[0]]:e}}function c2(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(ar(e)==="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return Bn(!1,"`checkedKeys` is not an array or an object"),null;return t}function F4(e,t){var r=new Set;function n(i){if(!r.has(i)){var a=t[i];if(!!a){r.add(i);var u=a.parent,o=a.node;o.disabled||u&&n(u.key)}}}return(e||[]).forEach(function(i){n(i)}),wt(r)}var bJ=["children"];function Sv(e,t){return e!=null?e:t}function u1(e){var t=e||{},r=t.title,n=t._title,i=t.key,a=t.children,u=r||"title";return{title:u,_title:n||[u],key:i||"key",children:a||"children"}}function h9(e){function t(r){var n=lo(r);return n.map(function(i){if(!gJ(i))return Bn(!i,"Tree/TreeNode can only accept TreeNode as children."),null;var a=i.key,u=i.props,o=u.children,f=Mr(u,bJ),p=ve({key:a},f),v=t(o);return v.length&&(p.children=v),p}).filter(function(i){return i})}return t(e)}function d2(e,t,r){var n=u1(r),i=n._title,a=n.key,u=n.children,o=new Set(t===!0?[]:t),f=[];function p(v){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return v.map(function(w,k){for(var T=f9(y?y.pos:"0",k),R=Sv(w[a],T),A,I=0;I<i.length;I+=1){var O=i[I];if(w[O]!==void 0){A=w[O];break}}var N=ve(ve({},Si(w,[].concat(wt(i),[a,u]))),{},{title:A,key:R,parent:y,pos:T,children:null,data:w,isStart:[].concat(wt(y?y.isStart:[]),[k===0]),isEnd:[].concat(wt(y?y.isEnd:[]),[k===v.length-1])});return f.push(N),t===!0||o.has(R)?N.children=p(w[u]||[],N):N.children=[],N})}return p(e),f}function wJ(e,t,r){var n={};ar(r)==="object"?n=r:n={externalGetKey:r},n=n||{};var i=n,a=i.childrenPropName,u=i.externalGetKey,o=i.fieldNames,f=u1(o),p=f.key,v=f.children,y=a||v,w;u?typeof u=="string"?w=function(R){return R[u]}:typeof u=="function"&&(w=function(R){return u(R)}):w=function(R,A){return Sv(R[p],A)};function k(T,R,A,I){var O=T?T[y]:e,N=T?f9(A.pos,R):"0",L=T?[].concat(wt(I),[T]):[];if(T){var B=w(T,N),j={node:T,index:R,pos:N,key:B,parentPos:A.node?A.pos:null,level:A.level+1,nodes:L};t(j)}O&&O.forEach(function(G,H){k(G,H,{node:T,pos:N,level:A?A.level+1:-1},L)})}k(null)}function Ex(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.initWrapper,n=t.processEntity,i=t.onProcessFinished,a=t.externalGetKey,u=t.childrenPropName,o=t.fieldNames,f=arguments.length>2?arguments[2]:void 0,p=a||f,v={},y={},w={posEntities:v,keyEntities:y};return r&&(w=r(w)||w),wJ(e,function(k){var T=k.node,R=k.index,A=k.pos,I=k.key,O=k.parentPos,N=k.level,L=k.nodes,B={node:T,nodes:L,index:R,key:I,pos:A,level:N},j=Sv(I,A);v[A]=B,y[j]=B,B.parent=v[O],B.parent&&(B.parent.children=B.parent.children||[],B.parent.children.push(B)),n&&n(B,w)},{externalGetKey:p,childrenPropName:u,fieldNames:o}),i&&i(w),w}function gm(e,t){var r=t.expandedKeys,n=t.selectedKeys,i=t.loadedKeys,a=t.loadingKeys,u=t.checkedKeys,o=t.halfCheckedKeys,f=t.dragOverNodeKey,p=t.dropPosition,v=t.keyEntities,y=v[e],w={eventKey:e,expanded:r.indexOf(e)!==-1,selected:n.indexOf(e)!==-1,loaded:i.indexOf(e)!==-1,loading:a.indexOf(e)!==-1,checked:u.indexOf(e)!==-1,halfChecked:o.indexOf(e)!==-1,pos:String(y?y.pos:""),dragOver:f===e&&p===0,dragOverGapTop:f===e&&p===-1,dragOverGapBottom:f===e&&p===1};return w}function Ri(e){var t=e.data,r=e.expanded,n=e.selected,i=e.checked,a=e.loaded,u=e.loading,o=e.halfChecked,f=e.dragOver,p=e.dragOverGapTop,v=e.dragOverGapBottom,y=e.pos,w=e.active,k=e.eventKey,T=ve(ve({},t),{},{expanded:r,selected:n,checked:i,loaded:a,loading:u,halfChecked:o,dragOver:f,dragOverGapTop:p,dragOverGapBottom:v,pos:y,active:w,key:k});return"props"in T||Object.defineProperty(T,"props",{get:function(){return Bn(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),T}var CJ=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},p9=C.exports.createContext(null),SJ=function(t,r){var n=t.defaultValue,i=t.children,a=t.options,u=a===void 0?[]:a,o=t.prefixCls,f=t.className,p=t.style,v=t.onChange,y=CJ(t,["defaultValue","children","options","prefixCls","className","style","onChange"]),w=C.exports.useContext(zr),k=w.getPrefixCls,T=w.direction,R=C.exports.useState(y.value||n||[]),A=Le(R,2),I=A[0],O=A[1],N=C.exports.useState([]),L=Le(N,2),B=L[0],j=L[1];C.exports.useEffect(function(){"value"in y&&O(y.value||[])},[y.value]);var G=function(){return u.map(function(de){return typeof de=="string"||typeof de=="number"?{label:de,value:de}:de})},H=function(de){j(function(oe){return oe.filter(function(ye){return ye!==de})})},te=function(de){j(function(oe){return[].concat(wt(oe),[de])})},Y=function(de){var oe=I.indexOf(de.value),ye=wt(I);oe===-1?ye.push(de.value):ye.splice(oe,1),"value"in y||O(ye);var Re=G();v==null||v(ye.filter(function(Te){return B.includes(Te)}).sort(function(Te,ke){var ze=Re.findIndex(function(Ne){return Ne.value===Te}),Ie=Re.findIndex(function(Ne){return Ne.value===ke});return ze-Ie}))},le=k("checkbox",o),J="".concat(le,"-group"),Z=Si(y,["value","disabled"]);u&&u.length>0&&(i=G().map(function(ne){return S(Sf,{prefixCls:le,disabled:"disabled"in ne?ne.disabled:y.disabled,value:ne.value,checked:I.includes(ne.value),onChange:ne.onChange,className:"".concat(J,"-item"),style:ne.style,children:ne.label},ne.value.toString())}));var Q={toggleOption:Y,value:I,disabled:y.disabled,name:y.name,registerValue:te,cancelValue:H},ge=Qe(J,se({},"".concat(J,"-rtl"),T==="rtl"),f);return S("div",{className:ge,style:p,...Z,ref:r,children:S(p9.Provider,{value:Q,children:i})})},EJ=C.exports.forwardRef(SJ);const kJ=C.exports.memo(EJ);var TJ=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},PJ=function(t,r){var n,i,a=t.prefixCls,u=t.className,o=t.children,f=t.indeterminate,p=f===void 0?!1:f,v=t.style,y=t.onMouseEnter,w=t.onMouseLeave,k=t.skipGroup,T=k===void 0?!1:k,R=t.disabled,A=TJ(t,["prefixCls","className","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),I=C.exports.useContext(zr),O=I.getPrefixCls,N=I.direction,L=C.exports.useContext(p9),B=C.exports.useContext(ya),j=B.isFormItemInput,G=C.exports.useContext(nc),H=(i=(L==null?void 0:L.disabled)||R)!==null&&i!==void 0?i:G,te=C.exports.useRef(A.value);C.exports.useEffect(function(){L==null||L.registerValue(A.value)},[]),C.exports.useEffect(function(){if(!T)return A.value!==te.current&&(L==null||L.cancelValue(te.current),L==null||L.registerValue(A.value),te.current=A.value),function(){return L==null?void 0:L.cancelValue(A.value)}},[A.value]);var Y=O("checkbox",a),le=tt({},A);L&&!T&&(le.onChange=function(){A.onChange&&A.onChange.apply(A,arguments),L.toggleOption&&L.toggleOption({label:o,value:A.value})},le.name=L.name,le.checked=L.value.includes(A.value));var J=Qe((n={},se(n,"".concat(Y,"-wrapper"),!0),se(n,"".concat(Y,"-rtl"),N==="rtl"),se(n,"".concat(Y,"-wrapper-checked"),le.checked),se(n,"".concat(Y,"-wrapper-disabled"),H),se(n,"".concat(Y,"-wrapper-in-form-item"),j),n),u),Z=Qe(se({},"".concat(Y,"-indeterminate"),p)),Q=p?"mixed":void 0;return Xe("label",{className:J,style:v,onMouseEnter:y,onMouseLeave:w,children:[S(NS,{"aria-checked":Q,...le,prefixCls:Y,className:Z,disabled:H,ref:r}),o!==void 0&&S("span",{children:o})]})},MJ=C.exports.forwardRef(PJ);const Sf=MJ;var LS=Sf;LS.Group=kJ;LS.__ANT_CHECKBOX=!0;const ed=LS;var IJ=C.exports.createContext({});const m9=IJ;var RJ=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};function OJ(e){return typeof e=="number"?"".concat(e," ").concat(e," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?"0 0 ".concat(e):e}var AJ=["xs","sm","md","lg","xl","xxl"],NJ=C.exports.forwardRef(function(e,t){var r,n=C.exports.useContext(zr),i=n.getPrefixCls,a=n.direction,u=C.exports.useContext(m9),o=u.gutter,f=u.wrap,p=u.supportFlexGap,v=e.prefixCls,y=e.span,w=e.order,k=e.offset,T=e.push,R=e.pull,A=e.className,I=e.children,O=e.flex,N=e.style,L=RJ(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),B=i("col",v),j={};AJ.forEach(function(le){var J,Z={},Q=e[le];typeof Q=="number"?Z.span=Q:ar(Q)==="object"&&(Z=Q||{}),delete L[le],j=tt(tt({},j),(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"),a==="rtl"),J))});var G=Qe(B,(r={},se(r,"".concat(B,"-").concat(y),y!==void 0),se(r,"".concat(B,"-order-").concat(w),w),se(r,"".concat(B,"-offset-").concat(k),k),se(r,"".concat(B,"-push-").concat(T),T),se(r,"".concat(B,"-pull-").concat(R),R),r),A,j),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 O&&(H.flex=OJ(O),f===!1&&!H.minWidth&&(H.minWidth=0)),S("div",{...L,style:tt(tt({},H),N),className:G,ref:t,children:I})});const c1=NJ;var zJ=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};Sa("top","middle","bottom","stretch");Sa("start","end","center","space-around","space-between","space-evenly");function SP(e,t){var r=C.exports.useState(typeof e=="string"?e:""),n=Le(r,2),i=n[0],a=n[1],u=function(){if(typeof e=="string"&&a(e),ar(e)==="object")for(var f=0;f<r1.length;f++){var p=r1[f];if(!!t[p]){var v=e[p];if(v!==void 0){a(v);return}}}};return C.exports.useEffect(function(){u()},[JSON.stringify(e),t]),i}var DJ=C.exports.forwardRef(function(e,t){var r,n=e.prefixCls,i=e.justify,a=e.align,u=e.className,o=e.style,f=e.children,p=e.gutter,v=p===void 0?0:p,y=e.wrap,w=zJ(e,["prefixCls","justify","align","className","style","children","gutter","wrap"]),k=C.exports.useContext(zr),T=k.getPrefixCls,R=k.direction,A=C.exports.useState({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),I=Le(A,2),O=I[0],N=I[1],L=C.exports.useState({xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1}),B=Le(L,2),j=B[0],G=B[1],H=SP(a,j),te=SP(i,j),Y=t9(),le=C.exports.useRef(v);C.exports.useEffect(function(){var Ie=n1.subscribe(function(Ne){G(Ne);var De=le.current||0;(!Array.isArray(De)&&ar(De)==="object"||Array.isArray(De)&&(ar(De[0])==="object"||ar(De[1])==="object"))&&N(Ne)});return function(){return n1.unsubscribe(Ie)}},[]);var J=function(){var Ne=[void 0,void 0],De=Array.isArray(v)?v:[v,void 0];return De.forEach(function(Ve,Ge){if(ar(Ve)==="object")for(var je=0;je<r1.length;je++){var ct=r1[je];if(O[ct]&&Ve[ct]!==void 0){Ne[Ge]=Ve[ct];break}}else Ne[Ge]=Ve}),Ne},Z=T("row",n),Q=J(),ge=Qe(Z,(r={},se(r,"".concat(Z,"-no-wrap"),y===!1),se(r,"".concat(Z,"-").concat(te),te),se(r,"".concat(Z,"-").concat(H),H),se(r,"".concat(Z,"-rtl"),R==="rtl"),r),u),ne={},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&&(ne.marginLeft=de,ne.marginRight=de),Y){var ye=Le(Q,2);ne.rowGap=ye[1]}else oe&&(ne.marginTop=oe,ne.marginBottom=oe);var Re=Le(Q,2),Te=Re[0],ke=Re[1],ze=C.exports.useMemo(function(){return{gutter:[Te,ke],wrap:y,supportFlexGap:Y}},[Te,ke,y,Y]);return S(m9.Provider,{value:ze,children:S("div",{...w,className:ge,style:tt(tt({},ne),o),ref:t,children:f})})});const v9=DJ;var g9=C.exports.forwardRef(function(e,t){var r,n=e.prefixCls,i=e.forceRender,a=e.className,u=e.style,o=e.children,f=e.isActive,p=e.role,v=C.exports.useState(f||i),y=Le(v,2),w=y[0],k=y[1];return C.exports.useEffect(function(){(i||f)&&k(!0)},[i,f]),w?S("div",{ref:t,className:Qe("".concat(n,"-content"),(r={},se(r,"".concat(n,"-content-active"),f),se(r,"".concat(n,"-content-inactive"),!f),r),a),style:u,role:p,children:S("div",{className:"".concat(n,"-content-box"),children:o})}):null});g9.displayName="PanelContent";var LJ=["className","id","style","prefixCls","headerClass","children","isActive","destroyInactivePanel","accordion","forceRender","openMotion","extra","collapsible"],y9=function(e){vi(r,e);var t=gi(r);function r(){var n;Qn(this,r);for(var i=arguments.length,a=new Array(i),u=0;u<i;u++)a[u]=arguments[u];return n=t.call.apply(t,[this].concat(a)),n.onItemClick=function(){var o=n.props,f=o.onItemClick,p=o.panelKey;typeof f=="function"&&f(p)},n.handleKeyPress=function(o){(o.key==="Enter"||o.keyCode===13||o.which===13)&&n.onItemClick()},n.renderIcon=function(){var o=n.props,f=o.showArrow,p=o.expandIcon,v=o.prefixCls,y=o.collapsible;if(!f)return null;var w=typeof p=="function"?p(n.props):S("i",{className:"arrow"});return w&&S("div",{className:"".concat(v,"-expand-icon"),onClick:y==="header"||y==="icon"?n.onItemClick:null,children:w})},n.renderTitle=function(){var o=n.props,f=o.header,p=o.prefixCls,v=o.collapsible;return S("span",{className:"".concat(p,"-header-text"),onClick:v==="header"?n.onItemClick:null,children:f})},n}return Jn(r,[{key:"shouldComponentUpdate",value:function(i){return!ld(this.props,i)}},{key:"render",value:function(){var i,a,u=this.props,o=u.className,f=u.id,p=u.style,v=u.prefixCls,y=u.headerClass,w=u.children,k=u.isActive,T=u.destroyInactivePanel,R=u.accordion,A=u.forceRender,I=u.openMotion,O=u.extra,N=u.collapsible,L=Mr(u,LJ),B=N==="disabled",j=N==="header",G=N==="icon",H=Qe((i={},se(i,"".concat(v,"-item"),!0),se(i,"".concat(v,"-item-active"),k),se(i,"".concat(v,"-item-disabled"),B),i),o),te=Qe("".concat(v,"-header"),(a={},se(a,y,y),se(a,"".concat(v,"-header-collapsible-only"),j),se(a,"".concat(v,"-icon-collapsible-only"),G),a)),Y={className:te,"aria-expanded":k,"aria-disabled":B,onKeyPress:this.handleKeyPress};!j&&!G&&(Y.onClick=this.onItemClick,Y.role=R?"tab":"button",Y.tabIndex=B?-1:0);var le=O!=null&&typeof O!="boolean";return delete L.header,delete L.panelKey,delete L.onItemClick,delete L.showArrow,delete L.expandIcon,Xe("div",{...L,className:H,style:p,id:f,children:[Xe("div",{...Y,children:[this.renderIcon(),this.renderTitle(),le&&S("div",{className:"".concat(v,"-extra"),children:O})]}),S(Za,{visible:k,leavedClassName:"".concat(v,"-content-hidden"),...I,forceRender:A,removeOnLeave:T,children:function(J,Z){var Q=J.className,ge=J.style;return S(g9,{ref:Z,prefixCls:v,className:Q,style:ge,isActive:k,forceRender:A,role:R?"tabpanel":null,children:w})}})]})}}]),r}(C.exports.Component);y9.defaultProps={showArrow:!0,isActive:!1,onItemClick:function(){},headerClass:"",forceRender:!1};function EP(e){var t=e;if(!Array.isArray(t)){var r=ar(t);t=r==="number"||r==="string"?[t]:[]}return t.map(function(n){return String(n)})}var Ev=function(e){vi(r,e);var t=gi(r);function r(n){var i;Qn(this,r),i=t.call(this,n),i.onClickItem=function(f){var p=i.state.activeKey;if(i.props.accordion)p=p[0]===f?[]:[f];else{p=wt(p);var v=p.indexOf(f),y=v>-1;y?p.splice(v,1):p.push(f)}i.setActiveKey(p)},i.getNewChild=function(f,p){if(!f)return null;var v=i.state.activeKey,y=i.props,w=y.prefixCls,k=y.openMotion,T=y.accordion,R=y.destroyInactivePanel,A=y.expandIcon,I=y.collapsible,O=f.key||String(p),N=f.props,L=N.header,B=N.headerClass,j=N.destroyInactivePanel,G=N.collapsible,H=!1;T?H=v[0]===O:H=v.indexOf(O)>-1;var te=G!=null?G:I,Y={key:O,panelKey:O,header:L,headerClass:B,isActive:H,prefixCls:w,destroyInactivePanel:j!=null?j:R,openMotion:k,accordion:T,children:f.props.children,onItemClick:te==="disabled"?null:i.onClickItem,expandIcon:A,collapsible:te};return typeof f.type=="string"?f:(Object.keys(Y).forEach(function(le){typeof Y[le]>"u"&&delete Y[le]}),C.exports.cloneElement(f,Y))},i.getItems=function(){var f=i.props.children;return lo(f).map(i.getNewChild)},i.setActiveKey=function(f){"activeKey"in i.props||i.setState({activeKey:f}),i.props.onChange(i.props.accordion?f[0]:f)};var a=n.activeKey,u=n.defaultActiveKey,o=u;return"activeKey"in n&&(o=a),i.state={activeKey:EP(o)},i}return Jn(r,[{key:"shouldComponentUpdate",value:function(i,a){return!ld(this.props,i)||!ld(this.state,a)}},{key:"render",value:function(){var i,a=this.props,u=a.prefixCls,o=a.className,f=a.style,p=a.accordion,v=Qe((i={},se(i,u,!0),se(i,o,!!o),i));return S("div",{className:v,style:f,role:p?"tablist":null,children:this.getItems()})}}],[{key:"getDerivedStateFromProps",value:function(i){var a={};return"activeKey"in i&&(a.activeKey=EP(i.activeKey)),a}}]),r}(C.exports.Component);Ev.defaultProps={prefixCls:"rc-collapse",onChange:function(){},accordion:!1,destroyInactivePanel:!1};Ev.Panel=y9;Ev.Panel;var FJ=function(t){var r=C.exports.useContext(zr),n=r.getPrefixCls,i=t.prefixCls,a=t.className,u=a===void 0?"":a,o=t.showArrow,f=o===void 0?!0:o,p=n("collapse",i),v=Qe(se({},"".concat(p,"-no-arrow"),!f),u);return S(Ev.Panel,{...t,prefixCls:p,className:v})};const $J=FJ;var x9=function(t){var r,n=C.exports.useContext(zr),i=n.getPrefixCls,a=n.direction,u=t.prefixCls,o=t.className,f=o===void 0?"":o,p=t.bordered,v=p===void 0?!0:p,y=t.ghost,w=t.expandIconPosition,k=w===void 0?"start":w,T=i("collapse",u),R=C.exports.useMemo(function(){return k==="left"?"start":k==="right"?"end":k},[k]),A=function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},j=t.expandIcon,G=j?j(B):S(TS,{rotate:B.isActive?90:void 0});return Ni(G,function(){return{className:Qe(G.props.className,"".concat(T,"-arrow"))}})},I=Qe("".concat(T,"-icon-position-").concat(R),(r={},se(r,"".concat(T,"-borderless"),!v),se(r,"".concat(T,"-rtl"),a==="rtl"),se(r,"".concat(T,"-ghost"),!!y),r),f),O=tt(tt({},Gm),{motionAppear:!1,leavedClassName:"".concat(T,"-content-hidden")}),N=function(){var B=t.children;return lo(B).map(function(j,G){var H;if(!((H=j.props)===null||H===void 0)&&H.disabled){var te=j.key||String(G),Y=j.props,le=Y.disabled,J=Y.collapsible,Z=tt(tt({},Si(j.props,["disabled"])),{key:te,collapsible:J!=null?J:le?"disabled":void 0});return Ni(j,Z)}return j})};return S(Ev,{openMotion:O,...t,expandIcon:A,prefixCls:T,className:I,children:N()})};x9.Panel=$J;const kP=x9;var _9=C.exports.createContext(null),TP=[];function BJ(e,t){var r=C.exports.useState(function(){if(!Lo())return null;var T=document.createElement("div");return T}),n=Le(r,1),i=n[0],a=C.exports.useRef(!1),u=C.exports.useContext(_9),o=C.exports.useState(TP),f=Le(o,2),p=f[0],v=f[1],y=u||(a.current?void 0:function(T){v(function(R){var A=[T].concat(wt(R));return A})});function w(){i.parentElement||document.body.appendChild(i),a.current=!0}function k(){var T;(T=i.parentElement)===null||T===void 0||T.removeChild(i),a.current=!1}return mi(function(){return e?u?u(w):w():k(),k},[e]),mi(function(){p.length&&(p.forEach(function(T){return T()}),v(TP))},[p]),[i,y]}var f2;function d1(e){if(typeof document>"u")return 0;if(e||f2===void 0){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var r=document.createElement("div"),n=r.style;n.position="absolute",n.top="0",n.left="0",n.pointerEvents="none",n.visibility="hidden",n.width="200px",n.height="150px",n.overflow="hidden",r.appendChild(t),document.body.appendChild(r);var i=t.offsetWidth;r.style.overflow="scroll";var a=t.offsetWidth;i===a&&(a=r.clientWidth),document.body.removeChild(r),f2=i-a}return f2}function PP(e){var t=e.match(/^(.*)px$/),r=Number(t==null?void 0:t[1]);return Number.isNaN(r)?d1():r}function MP(e){if(typeof document>"u"||!e||!(e instanceof Element))return{width:0,height:0};var t=getComputedStyle(e,"::-webkit-scrollbar"),r=t.width,n=t.height;return{width:PP(r),height:PP(n)}}function VJ(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var jJ="rc-util-locker-".concat(Date.now()),IP=0;function UJ(e){var t=!!e,r=C.exports.useState(function(){return IP+=1,"".concat(jJ,"_").concat(IP)}),n=Le(r,1),i=n[0];mi(function(){if(t){var a=d1(),u=VJ();vv(`
html body {
overflow-y: hidden;
`.concat(u?"width: calc(100% - ".concat(a,"px);"):"",`
}`),i)}else pT(i);return function(){pT(i)}},[t,i])}var RP=!1;function KJ(e){return typeof e=="boolean"&&(RP=e),RP}var OP=function(t){return t===!1?!1:!Lo()||!t?null:typeof t=="string"?document.querySelector(t):typeof t=="function"?t():t},HJ=C.exports.forwardRef(function(e,t){var r=e.open,n=e.autoLock,i=e.getContainer;e.debug;var a=e.autoDestroy,u=a===void 0?!0:a,o=e.children,f=C.exports.useState(r),p=Le(f,2),v=p[0],y=p[1],w=v||r;C.exports.useEffect(function(){(u||r)&&y(r)},[r,u]);var k=C.exports.useState(function(){return OP(i)}),T=Le(k,2),R=T[0],A=T[1];C.exports.useEffect(function(){var le=OP(i);A(le!=null?le:null)});var I=BJ(w&&!R),O=Le(I,2),N=O[0],L=O[1],B=R!=null?R:N;UJ(n&&r&&Lo()&&(B===N||B===document.body));var j=null;if(o&&md(o)&&t){var G=o;j=G.ref}var H=Y7(j,t);if(!w||!Lo()||R===void 0)return null;var te=B===!1||KJ(),Y=o;return t&&(Y=C.exports.cloneElement(o,{ref:H})),S(_9.Provider,{value:L,children:te?Y:Qu.exports.createPortal(Y,B)})});function f1(e){var t=C.exports.useState(e),r=Le(t,2),n=r[0],i=r[1];return C.exports.useEffect(function(){var a=setTimeout(function(){i(e)},e.length?0:10);return function(){clearTimeout(a)}},[e]),n}var AP=[];function h2(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof e=="string"?e:"".concat(r,"-").concat(n),error:e,errorStatus:t}}function b9(e){var t=e.help,r=e.helpStatus,n=e.errors,i=n===void 0?AP:n,a=e.warnings,u=a===void 0?AP:a,o=e.className,f=e.fieldId,p=e.onVisibleChanged,v=C.exports.useContext(yS),y=v.prefixCls,w=C.exports.useContext(zr),k=w.getPrefixCls,T="".concat(y,"-item-explain"),R=k(),A=f1(i),I=f1(u),O=C.exports.useMemo(function(){return t!=null?[h2(t,r,"help")]:[].concat(wt(A.map(function(L,B){return h2(L,"error","error",B)})),wt(I.map(function(L,B){return h2(L,"warning","warning",B)})))},[t,r,A,I]),N={};return f&&(N.id="".concat(f,"_help")),S(Za,{motionDeadline:Gm.motionDeadline,motionName:"".concat(R,"-show-help"),visible:!!O.length,onVisibleChanged:p,children:function(L){var B=L.className,j=L.style;return S("div",{...N,className:Qe(T,B,o),style:j,role:"alert",children:S(YO,{keys:O,...Gm,motionName:"".concat(R,"-show-help-item"),component:!1,children:function(G){var H=G.key,te=G.error,Y=G.errorStatus,le=G.className,J=G.style;return S("div",{className:Qe(le,se({},"".concat(T,"-").concat(Y),Y)),style:J,children:te},H)}})})}})}function NP(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function zP(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function p2(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var r=getComputedStyle(e,null);return zP(r.overflowY,t)||zP(r.overflowX,t)||function(n){var i=function(a){if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}}(n);return!!i&&(i.clientHeight<n.scrollHeight||i.clientWidth<n.scrollWidth)}(e)}return!1}function My(e,t,r,n,i,a,u,o){return a<e&&u>t||a>e&&u<t?0:a<=e&&o<=r||u>=t&&o>=r?a-e-n:u>t&&o<r||a<e&&o>r?u-t+i:0}var DP=function(e,t){var r=window,n=t.scrollMode,i=t.block,a=t.inline,u=t.boundary,o=t.skipOverflowHiddenElements,f=typeof u=="function"?u:function(Pt){return Pt!==u};if(!NP(e))throw new TypeError("Invalid target");for(var p,v,y=document.scrollingElement||document.documentElement,w=[],k=e;NP(k)&&f(k);){if((k=(v=(p=k).parentElement)==null?p.getRootNode().host||null:v)===y){w.push(k);break}k!=null&&k===document.body&&p2(k)&&!p2(document.documentElement)||k!=null&&p2(k,o)&&w.push(k)}for(var T=r.visualViewport?r.visualViewport.width:innerWidth,R=r.visualViewport?r.visualViewport.height:innerHeight,A=window.scrollX||pageXOffset,I=window.scrollY||pageYOffset,O=e.getBoundingClientRect(),N=O.height,L=O.width,B=O.top,j=O.right,G=O.bottom,H=O.left,te=i==="start"||i==="nearest"?B:i==="end"?G:B+N/2,Y=a==="center"?H+L/2:a==="end"?j:H,le=[],J=0;J<w.length;J++){var Z=w[J],Q=Z.getBoundingClientRect(),ge=Q.height,ne=Q.width,de=Q.top,oe=Q.right,ye=Q.bottom,Re=Q.left;if(n==="if-needed"&&B>=0&&H>=0&&G<=R&&j<=T&&B>=de&&G<=ye&&H>=Re&&j<=oe)return le;var Te=getComputedStyle(Z),ke=parseInt(Te.borderLeftWidth,10),ze=parseInt(Te.borderTopWidth,10),Ie=parseInt(Te.borderRightWidth,10),Ne=parseInt(Te.borderBottomWidth,10),De=0,Ve=0,Ge="offsetWidth"in Z?Z.offsetWidth-Z.clientWidth-ke-Ie:0,je="offsetHeight"in Z?Z.offsetHeight-Z.clientHeight-ze-Ne:0,ct="offsetWidth"in Z?Z.offsetWidth===0?0:ne/Z.offsetWidth:0,pt="offsetHeight"in Z?Z.offsetHeight===0?0:ge/Z.offsetHeight:0;if(y===Z)De=i==="start"?te:i==="end"?te-R:i==="nearest"?My(I,I+R,R,ze,Ne,I+te,I+te+N,N):te-R/2,Ve=a==="start"?Y:a==="center"?Y-T/2:a==="end"?Y-T:My(A,A+T,T,ke,Ie,A+Y,A+Y+L,L),De=Math.max(0,De+I),Ve=Math.max(0,Ve+A);else{De=i==="start"?te-de-ze:i==="end"?te-ye+Ne+je:i==="nearest"?My(de,ye,ge,ze,Ne+je,te,te+N,N):te-(de+ge/2)+je/2,Ve=a==="start"?Y-Re-ke:a==="center"?Y-(Re+ne/2)+Ge/2:a==="end"?Y-oe+Ie+Ge:My(Re,oe,ne,ke,Ie+Ge,Y,Y+L,L);var Tt=Z.scrollLeft,Ye=Z.scrollTop;te+=Ye-(De=Math.max(0,Math.min(Ye+De/pt,Z.scrollHeight-ge/pt+je))),Y+=Tt-(Ve=Math.max(0,Math.min(Tt+Ve/ct,Z.scrollWidth-ne/ct+Ge)))}le.push({el:Z,top:De,left:Ve})}return le};function w9(e){return e===Object(e)&&Object.keys(e).length!==0}function WJ(e,t){t===void 0&&(t="auto");var r="scrollBehavior"in document.body.style;e.forEach(function(n){var i=n.el,a=n.top,u=n.left;i.scroll&&r?i.scroll({top:a,left:u,behavior:t}):(i.scrollTop=a,i.scrollLeft=u)})}function qJ(e){return e===!1?{block:"end",inline:"nearest"}:w9(e)?e:{block:"start",inline:"nearest"}}function GJ(e,t){var r=e.isConnected||e.ownerDocument.documentElement.contains(e);if(w9(t)&&typeof t.behavior=="function")return t.behavior(r?DP(e,t):[]);if(!!r){var n=qJ(t);return WJ(DP(e,n),n.behavior)}}var ZJ=["parentNode"],XJ="form_item";function ym(e){return e===void 0||e===!1?[]:Array.isArray(e)?e:[e]}function C9(e,t){if(!!e.length){var r=e.join("_");if(t)return"".concat(t,"_").concat(r);var n=ZJ.includes(r);return n?"".concat(XJ,"_").concat(r):r}}function LP(e){var t=ym(e);return t.join("_")}function S9(e){var t=W3(),r=Le(t,1),n=r[0],i=C.exports.useRef({}),a=C.exports.useMemo(function(){return e!=null?e:tt(tt({},n),{__INTERNAL__:{itemRef:function(o){return function(f){var p=LP(o);f?i.current[p]=f:delete i.current[p]}}},scrollToField:function(o){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=ym(o),v=C9(p,a.__INTERNAL__.name),y=v?document.getElementById(v):null;y&&GJ(y,tt({scrollMode:"if-needed",block:"nearest"},f))},getFieldInstance:function(o){var f=LP(o);return i.current[f]}})},[e,n]);return[a]}var YJ=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},QJ=function(t,r){var n,i=C.exports.useContext(Gs),a=C.exports.useContext(nc),u=C.exports.useContext(zr),o=u.getPrefixCls,f=u.direction,p=u.form,v=t.prefixCls,y=t.className,w=y===void 0?"":y,k=t.size,T=k===void 0?i:k,R=t.disabled,A=R===void 0?a:R,I=t.form,O=t.colon,N=t.labelAlign,L=t.labelWrap,B=t.labelCol,j=t.wrapperCol,G=t.hideRequiredMark,H=t.layout,te=H===void 0?"horizontal":H,Y=t.scrollToFirstError,le=t.requiredMark,J=t.onFinishFailed,Z=t.name,Q=YJ(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:!G},[G,le,p]),ne=O!=null?O:p==null?void 0:p.colon,de=o("form",v),oe=Qe(de,(n={},se(n,"".concat(de,"-").concat(te),!0),se(n,"".concat(de,"-hide-required-mark"),ge===!1),se(n,"".concat(de,"-rtl"),f==="rtl"),se(n,"".concat(de,"-").concat(T),T),n),w),ye=S9(I),Re=Le(ye,1),Te=Re[0],ke=Te.__INTERNAL__;ke.name=Z;var ze=C.exports.useMemo(function(){return{name:Z,labelAlign:N,labelCol:B,labelWrap:L,wrapperCol:j,vertical:te==="vertical",colon:ne,requiredMark:ge,itemRef:ke.itemRef,form:Te}},[Z,N,B,j,te,ne,ge,Te]);C.exports.useImperativeHandle(r,function(){return Te});var Ie=function(De){J==null||J(De);var Ve={block:"nearest"};Y&&De.errorFields.length&&(ar(Y)==="object"&&(Ve=Y),Te.scrollToField(De.errorFields[0].name,Ve))};return S(kA,{disabled:A,children:S(TA,{size:T,children:S(Gu.Provider,{value:ze,children:S(ph,{id:Z,...Q,name:Z,onFinishFailed:Ie,form:Te,className:oe})})})})},JJ=C.exports.forwardRef(QJ);const eee=JJ;var tee=function(){var t=C.exports.useContext(ya),r=t.status;return{status:r}};const ree=tee;function nee(e){var t=C.exports.useState(e),r=Le(t,2),n=r[0],i=r[1],a=C.exports.useRef(null),u=C.exports.useRef([]),o=C.exports.useRef(!1);C.exports.useEffect(function(){return o.current=!1,function(){o.current=!0,rn.cancel(a.current),a.current=null}},[]);function f(p){o.current||(a.current===null&&(u.current=[],a.current=rn(function(){a.current=null,i(function(v){var y=v;return u.current.forEach(function(w){y=w(y)}),y})})),u.current.push(p))}return[n,f]}function iee(){var e=C.exports.useContext(Gu),t=e.itemRef,r=C.exports.useRef({});function n(i,a){var u=a&&ar(a)==="object"&&a.ref,o=i.join("_");return(r.current.name!==o||r.current.originRef!==u)&&(r.current.name=o,r.current.originRef=u,r.current.ref=ta(t(i),u)),r.current.ref}return n}var oee={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 aee=oee;var E9=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:aee})})};E9.displayName="QuestionCircleOutlined";const see=C.exports.forwardRef(E9);var lee=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};function uee(e){return e?ar(e)==="object"&&!C.exports.isValidElement(e)?e:{title:e}:null}var cee=function(t){var r=t.prefixCls,n=t.label,i=t.htmlFor,a=t.labelCol,u=t.labelAlign,o=t.colon,f=t.required,p=t.requiredMark,v=t.tooltip,y=bO("Form"),w=Le(y,1),k=w[0];return n?S(Gu.Consumer,{children:function(T){var R,A=T.vertical,I=T.labelAlign,O=T.labelCol,N=T.labelWrap,L=T.colon,B,j=a||O||{},G=u||I,H="".concat(r,"-item-label"),te=Qe(H,G==="left"&&"".concat(H,"-left"),j.className,se({},"".concat(H,"-wrap"),!!N)),Y=n,le=o===!0||L!==!1&&o!==!1,J=le&&!A;J&&typeof n=="string"&&n.trim()!==""&&(Y=n.replace(/[:|]\s*$/,""));var Z=uee(v);if(Z){var Q=Z.icon,ge=Q===void 0?S(see,{}):Q,ne=lee(Z,["icon"]),de=S(yo,{...ne,children:C.exports.cloneElement(ge,{className:"".concat(r,"-item-tooltip"),title:""})});Y=Xe(Ar,{children:[Y,de]})}p==="optional"&&!f&&(Y=Xe(Ar,{children:[Y,S("span",{className:"".concat(r,"-item-optional"),title:"",children:(k==null?void 0:k.optional)||((B=zl.Form)===null||B===void 0?void 0:B.optional)})]}));var oe=Qe((R={},se(R,"".concat(r,"-item-required"),f),se(R,"".concat(r,"-item-required-mark-optional"),p==="optional"),se(R,"".concat(r,"-item-no-colon"),!le),R));return S(c1,{...j,className:te,children:S("label",{htmlFor:i,className:oe,title:typeof n=="string"?n:"",children:Y})})}},"label"):null};const dee=cee;var fee=function(t){var r=t.prefixCls,n=t.status,i=t.wrapperCol,a=t.children,u=t.errors,o=t.warnings,f=t._internalItemRender,p=t.extra,v=t.help,y=t.fieldId,w=t.marginBottom,k=t.onErrorVisibleChanged,T="".concat(r,"-item"),R=C.exports.useContext(Gu),A=i||R.wrapperCol||{},I=Qe("".concat(T,"-control"),A.className),O=C.exports.useMemo(function(){return tt({},R)},[R]);delete O.labelCol,delete O.wrapperCol;var N=S("div",{className:"".concat(T,"-control-input"),children:S("div",{className:"".concat(T,"-control-input-content"),children:a})}),L=C.exports.useMemo(function(){return{prefixCls:r,status:n}},[r,n]),B=w!==null||u.length||o.length?Xe("div",{style:{display:"flex",flexWrap:"nowrap"},children:[S(yS.Provider,{value:L,children:S(b9,{fieldId:y,errors:u,warnings:o,help:v,helpStatus:n,className:"".concat(T,"-explain-connected"),onVisibleChanged:k})}),!!w&&S("div",{style:{width:0,height:w}})]}):null,j={};y&&(j.id="".concat(y,"_extra"));var G=p?S("div",{...j,className:"".concat(T,"-extra"),children:p}):null,H=f&&f.mark==="pro_table_render"&&f.render?f.render(t,{input:N,errorList:B,extra:G}):Xe(Ar,{children:[N,B,G]});return S(Gu.Provider,{value:O,children:S(c1,{...A,className:I,children:H})})};const hee=fee;var pee=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},mee={success:ux,warning:cx,error:gd,validating:Wf};function vee(e){var t,r=e.prefixCls,n=e.className,i=e.style,a=e.help,u=e.errors,o=e.warnings,f=e.validateStatus,p=e.meta,v=e.hasFeedback,y=e.hidden,w=e.children,k=e.fieldId,T=e.isRequired,R=e.onSubItemMetaChange,A=pee(e,["prefixCls","className","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","isRequired","onSubItemMetaChange"]),I="".concat(r,"-item"),O=C.exports.useContext(Gu),N=O.requiredMark,L=C.exports.useRef(null),B=f1(u),j=f1(o),G=a!=null,H=!!(G||u.length||o.length),te=C.exports.useState(null),Y=Le(te,2),le=Y[0],J=Y[1];mi(function(){if(H&&L.current){var de=getComputedStyle(L.current);J(parseInt(de.marginBottom,10))}},[H]);var Z=function(oe){oe||J(null)},Q="";f!==void 0?Q=f:p.validating?Q="validating":B.length?Q="error":j.length?Q="warning":p.touched&&(Q="success");var ge=C.exports.useMemo(function(){var de;if(v){var oe=Q&&mee[Q];de=oe?S("span",{className:Qe("".concat(I,"-feedback-icon"),"".concat(I,"-feedback-icon-").concat(Q)),children:S(oe,{})}):null}return{status:Q,hasFeedback:v,feedbackIcon:de,isFormItemInput:!0}},[Q,v]),ne=(t={},se(t,I,!0),se(t,"".concat(I,"-with-help"),G||B.length||j.length),se(t,"".concat(n),!!n),se(t,"".concat(I,"-has-feedback"),Q&&v),se(t,"".concat(I,"-has-success"),Q==="success"),se(t,"".concat(I,"-has-warning"),Q==="warning"),se(t,"".concat(I,"-has-error"),Q==="error"),se(t,"".concat(I,"-is-validating"),Q==="validating"),se(t,"".concat(I,"-hidden"),y),t);return Xe("div",{className:Qe(ne),style:i,ref:L,children:[Xe(v9,{className:"".concat(I,"-row"),...Si(A,["_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:[S(dee,{htmlFor:k,required:T,requiredMark:N,...e,prefixCls:r}),S(hee,{...e,...p,errors:B,warnings:j,prefixCls:r,status:Q,help:a,marginBottom:le,onErrorVisibleChanged:Z,children:S(hN.Provider,{value:R,children:S(ya.Provider,{value:ge,children:w})})})]}),!!le&&S("div",{className:"".concat(I,"-margin-offset"),style:{marginBottom:-le}})]})}var gee="__SPLIT__";Sa("success","warning","error","validating","");var yee=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(r,n){return r===t.childProps[n]})});function xee(e){return e!=null}function FP(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[]}}function _ee(e){var t=e.name,r=e.noStyle,n=e.dependencies,i=e.prefixCls,a=e.shouldUpdate,u=e.rules,o=e.children,f=e.required,p=e.label,v=e.messageVariables,y=e.trigger,w=y===void 0?"onChange":y,k=e.validateTrigger,T=e.hidden,R=C.exports.useContext(zr),A=R.getPrefixCls,I=C.exports.useContext(Gu),O=I.name,N=typeof o=="function",L=C.exports.useContext(hN),B=C.exports.useContext(sd),j=B.validateTrigger,G=k!==void 0?k:j,H=xee(t),te=A("form",i),Y=C.exports.useContext(pO),le=C.exports.useRef(),J=nee({}),Z=Le(J,2),Q=Z[0],ge=Z[1],ne=Hs(function(){return FP()}),de=Le(ne,2),oe=de[0],ye=de[1],Re=function(ct){var pt=Y==null?void 0:Y.getKey(ct.name);if(ye(ct.destroy?FP():ct,!0),r&&L){var Tt=ct.name;if(ct.destroy)Tt=le.current||Tt;else if(pt!==void 0){var Ye=Le(pt,2),Pt=Ye[0],mt=Ye[1];Tt=[Pt].concat(wt(mt)),le.current=Tt}L(ct,Tt)}},Te=function(ct,pt){ge(function(Tt){var Ye=tt({},Tt),Pt=[].concat(wt(ct.name.slice(0,-1)),wt(pt)),mt=Pt.join(gee);return ct.destroy?delete Ye[mt]:Ye[mt]=ct,Ye})},ke=C.exports.useMemo(function(){var je=wt(oe.errors),ct=wt(oe.warnings);return Object.values(Q).forEach(function(pt){je.push.apply(je,wt(pt.errors||[])),ct.push.apply(ct,wt(pt.warnings||[]))}),[je,ct]},[Q,oe.errors,oe.warnings]),ze=Le(ke,2),Ie=ze[0],Ne=ze[1],De=iee();function Ve(je,ct,pt){return r&&!T?je:S(vee,{...e,prefixCls:te,fieldId:ct,isRequired:pt,errors:Ie,warnings:Ne,meta:oe,onSubItemMetaChange:Te,children:je},"row")}if(!H&&!N&&!n)return Ve(o);var Ge={};return typeof p=="string"?Ge.label=p:t&&(Ge.label=String(t)),v&&(Ge=tt(tt({},Ge),v)),S(H3,{...e,messageVariables:Ge,trigger:w,validateTrigger:G,onMetaChange:Re,children:function(je,ct,pt){var Tt=ym(t).length&&ct?ct.name:[],Ye=C9(Tt,O),Pt=f!==void 0?f:!!(u&&u.some(function(ut){if(ut&&ar(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({},je),It=null;if(Array.isArray(o)&&H)It=o;else if(!(N&&(!(a||n)||H))){if(!(n&&!N&&!H))if(Yo(o)){var Ct=tt(tt({},o.props),mt);if(Ct.id||(Ct.id=Ye),e.help||Ie.length>0||Ne.length>0||e.extra){var Dt=[];(e.help||Ie.length>0)&&Dt.push("".concat(Ye,"_help")),e.extra&&Dt.push("".concat(Ye,"_extra")),Ct["aria-describedby"]=Dt.join(" ")}Ie.length>0&&(Ct["aria-invalid"]="true"),Pt&&(Ct["aria-required"]="true"),md(o)&&(Ct.ref=De(Tt,o));var lt=new Set([].concat(wt(ym(w)),wt(ym(G))));lt.forEach(function(ut){Ct[ut]=function(){for(var it,ft,xt,Wt,jt,Qt=arguments.length,Fe=new Array(Qt),qe=0;qe<Qt;qe++)Fe[qe]=arguments[qe];(xt=mt[ut])===null||xt===void 0||(it=xt).call.apply(it,[mt].concat(Fe)),(jt=(Wt=o.props)[ut])===null||jt===void 0||(ft=jt).call.apply(ft,[Wt].concat(Fe))}});var dt=[Ct["aria-required"],Ct["aria-invalid"],Ct["aria-describedby"]];It=S(yee,{value:mt[e.valuePropName||"value"],update:o,childProps:dt,children:Ni(o,Ct)})}else N&&(a||n)&&!H?It=o(pt):It=o}return Ve(It,Ye,Pt)}})}var k9=_ee;k9.useStatus=ree;const bee=k9;var wee=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},Cee=function(t){var r=t.prefixCls,n=t.children,i=wee(t,["prefixCls","children"]),a=C.exports.useContext(zr),u=a.getPrefixCls,o=u("form",r),f=C.exports.useMemo(function(){return{prefixCls:o,status:"error"}},[o]);return S(mO,{...i,children:function(p,v,y){return S(yS.Provider,{value:f,children:n(p.map(function(w){return tt(tt({},w),{fieldKey:w.key})}),v,{errors:y.errors,warnings:y.warnings})})}})};const See=Cee;function Eee(){var e=C.exports.useContext(Gu),t=e.form;return t}var Hl=eee;Hl.Item=bee;Hl.List=See;Hl.ErrorList=b9;Hl.useForm=S9;Hl.useFormInstance=Eee;Hl.useWatch=gO;Hl.Provider=eX;Hl.create=function(){};const hs=Hl;var kee={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 Tee=kee;var T9=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:Tee})})};T9.displayName="EyeOutlined";const Pee=C.exports.forwardRef(T9);function $P(e){var t=e.getBoundingClientRect(),r=document.documentElement;return{left:t.left+(window.pageXOffset||r.scrollLeft)-(r.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||r.scrollTop)-(r.clientTop||document.body.clientTop||0)}}function Mee(){var e=ve({},g0);return e.useId}var BP=0;function Iee(e){var t=C.exports.useState("ssr-id"),r=Le(t,2),n=r[0],i=r[1],a=Mee(),u=a==null?void 0:a();return C.exports.useEffect(function(){if(!a){var o=BP;BP+=1,i("rc_unique_".concat(o))}},[]),e||u||n}function Ree(e){var t=e.prefixCls,r=e.style,n=e.visible,i=e.maskProps,a=e.motionName;return S(Za,{visible:n,motionName:a,leavedClassName:"".concat(t,"-mask-hidden"),children:function(u,o){var f=u.className,p=u.style;return S("div",{ref:o,style:ve(ve({},p),r),className:Qe("".concat(t,"-mask"),f),...i})}},"mask")}function VP(e,t,r){var n=t;return!n&&r&&(n="".concat(e,"-").concat(r)),n}function jP(e,t){var r=e["page".concat(t?"Y":"X","Offset")],n="scroll".concat(t?"Top":"Left");if(typeof r!="number"){var i=e.document;r=i.documentElement[n],typeof r!="number"&&(r=i.body[n])}return r}function Oee(e){var t=e.getBoundingClientRect(),r={left:t.left,top:t.top},n=e.ownerDocument,i=n.defaultView||n.parentWindow;return r.left+=jP(i),r.top+=jP(i,!0),r}const Aee=C.exports.memo(function(e){var t=e.children;return t},function(e,t){var r=t.shouldUpdate;return!r});var UP={width:0,height:0,overflow:"hidden",outline:"none"},Nee=tn.forwardRef(function(e,t){var r=e.prefixCls,n=e.className,i=e.style,a=e.title,u=e.ariaId,o=e.footer,f=e.closable,p=e.closeIcon,v=e.onClose,y=e.children,w=e.bodyStyle,k=e.bodyProps,T=e.modalRender,R=e.onMouseDown,A=e.onMouseUp,I=e.holderRef,O=e.visible,N=e.forceRender,L=e.width,B=e.height,j=C.exports.useRef(),G=C.exports.useRef();tn.useImperativeHandle(t,function(){return{focus:function(){var Q;(Q=j.current)===null||Q===void 0||Q.focus()},changeActive:function(Q){var ge=document,ne=ge.activeElement;Q&&ne===G.current?j.current.focus():!Q&&ne===j.current&&G.current.focus()}}});var H={};L!==void 0&&(H.width=L),B!==void 0&&(H.height=B);var te;o&&(te=S("div",{className:"".concat(r,"-footer"),children:o}));var Y;a&&(Y=S("div",{className:"".concat(r,"-header"),children:S("div",{className:"".concat(r,"-title"),id:u,children:a})}));var le;f&&(le=S("button",{type:"button",onClick:v,"aria-label":"Close",className:"".concat(r,"-close"),children:p||S("span",{className:"".concat(r,"-close-x")})}));var J=Xe("div",{className:"".concat(r,"-content"),children:[le,Y,S("div",{className:"".concat(r,"-body"),style:w,...k,children:y}),te]});return Xe("div",{role:"dialog","aria-labelledby":a?u:null,"aria-modal":"true",ref:I,style:ve(ve({},i),H),className:Qe(r,n),onMouseDown:R,onMouseUp:A,children:[S("div",{tabIndex:0,ref:j,style:UP,"aria-hidden":"true"}),S(Aee,{shouldUpdate:O||N,children:T?T(J):J}),S("div",{tabIndex:0,ref:G,style:UP,"aria-hidden":"true"})]},"dialog-element")}),P9=C.exports.forwardRef(function(e,t){var r=e.prefixCls,n=e.title,i=e.style,a=e.className,u=e.visible,o=e.forceRender,f=e.destroyOnClose,p=e.motionName,v=e.ariaId,y=e.onVisibleChanged,w=e.mousePosition,k=C.exports.useRef(),T=C.exports.useState(),R=Le(T,2),A=R[0],I=R[1],O={};A&&(O.transformOrigin=A);function N(){var L=Oee(k.current);I(w?"".concat(w.x-L.left,"px ").concat(w.y-L.top,"px"):"")}return S(Za,{visible:u,onVisibleChanged:y,onAppearPrepare:N,onEnterPrepare:N,forceRender:o,motionName:p,removeOnLeave:f,ref:k,children:function(L,B){var j=L.className,G=L.style;return S(Nee,{...e,ref:t,title:n,ariaId:v,prefixCls:r,holderRef:B,style:ve(ve(ve({},G),i),O),className:Qe(a,j)})}})});P9.displayName="Content";function zee(e){var t=e.prefixCls,r=t===void 0?"rc-dialog":t,n=e.zIndex,i=e.visible,a=i===void 0?!1:i,u=e.keyboard,o=u===void 0?!0:u,f=e.focusTriggerAfterClose,p=f===void 0?!0:f,v=e.wrapStyle,y=e.wrapClassName,w=e.wrapProps,k=e.onClose,T=e.afterClose,R=e.transitionName,A=e.animation,I=e.closable,O=I===void 0?!0:I,N=e.mask,L=N===void 0?!0:N,B=e.maskTransitionName,j=e.maskAnimation,G=e.maskClosable,H=G===void 0?!0:G,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(a),ne=Le(ge,2),de=ne[0],oe=ne[1],ye=Iee();function Re(){Jc(Z.current,document.activeElement)||(J.current=document.activeElement)}function Te(){if(!Jc(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),L&&J.current&&p){try{J.current.focus({preventScroll:!0})}catch{}J.current=null}de&&(T==null||T())}}function ze(ct){k==null||k(ct)}var Ie=C.exports.useRef(!1),Ne=C.exports.useRef(),De=function(){clearTimeout(Ne.current),Ie.current=!0},Ve=function(){Ne.current=setTimeout(function(){Ie.current=!1})},Ge=null;H&&(Ge=function(pt){Ie.current?Ie.current=!1:Z.current===pt.target&&ze(pt)});function je(ct){if(o&&ct.keyCode===Et.ESC){ct.stopPropagation(),ze(ct);return}a&&ct.keyCode===Et.TAB&&Q.current.changeActive(!ct.shiftKey)}return C.exports.useEffect(function(){a&&(oe(!0),Re())},[a]),C.exports.useEffect(function(){return function(){clearTimeout(Ne.current)}},[]),Xe("div",{className:Qe("".concat(r,"-root"),le),...qu(e,{data:!0}),children:[S(Ree,{prefixCls:r,visible:L&&a,motionName:VP(r,B,j),style:ve({zIndex:n},te),maskProps:Y}),S("div",{tabIndex:-1,onKeyDown:je,className:Qe("".concat(r,"-wrap"),y),ref:Z,onClick:Ge,style:ve(ve({zIndex:n},v),{},{display:de?null:"none"}),...w,children:S(P9,{...e,onMouseDown:De,onMouseUp:Ve,ref:Q,closable:O,ariaId:ye,prefixCls:r,visible:a&&de,onClose:ze,onVisibleChanged:ke,motionName:VP(r,R,A)})})]})}var M9=function(t){var r=t.visible,n=t.getContainer,i=t.forceRender,a=t.destroyOnClose,u=a===void 0?!1:a,o=t.afterClose,f=C.exports.useState(r),p=Le(f,2),v=p[0],y=p[1];return C.exports.useEffect(function(){r&&y(!0)},[r]),!i&&u&&!v?null:S(HJ,{open:r||i||v,autoDestroy:!1,getContainer:n,autoLock:r||v,children:S(zee,{...t,destroyOnClose:u,afterClose:function(){o==null||o(),y(!1)}})})};M9.displayName="Dialog";var Dee=function(t){var r,n=C.exports.useContext(zr),i=n.getPrefixCls,a=n.direction,u=t.prefixCls,o=t.className,f=o===void 0?"":o,p=i("input-group",u),v=Qe(p,(r={},se(r,"".concat(p,"-lg"),t.size==="large"),se(r,"".concat(p,"-sm"),t.size==="small"),se(r,"".concat(p,"-compact"),t.compact),se(r,"".concat(p,"-rtl"),a==="rtl"),r),f),y=C.exports.useContext(ya),w=C.exports.useMemo(function(){return tt(tt({},y),{isFormItemInput:!1})},[y]);return S("span",{className:v,style:t.style,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onFocus:t.onFocus,onBlur:t.onBlur,children:S(ya.Provider,{value:w,children:t.children})})};const Lee=Dee;function s0(e){return!!(e.addonBefore||e.addonAfter)}function I9(e){return!!(e.prefix||e.suffix||e.allowClear)}function KP(e,t,r,n){if(!!r){var i=t;if(t.type==="click"){var a=e.cloneNode(!0);i=Object.create(t,{target:{value:a},currentTarget:{value:a}}),a.value="",r(i);return}if(n!==void 0){i=Object.create(t,{target:{value:e},currentTarget:{value:e}}),e.value=n,r(i);return}r(i)}}function Fee(e,t){if(!!e){e.focus(t);var r=t||{},n=r.cursor;if(n){var i=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(i,i);break;default:e.setSelectionRange(0,i)}}}}function HP(e){return typeof e>"u"||e===null?"":String(e)}var $ee=function(t){var r=t.inputElement,n=t.prefixCls,i=t.prefix,a=t.suffix,u=t.addonBefore,o=t.addonAfter,f=t.className,p=t.style,v=t.affixWrapperClassName,y=t.groupClassName,w=t.wrapperClassName,k=t.disabled,T=t.readOnly,R=t.focused,A=t.triggerFocus,I=t.allowClear,O=t.value,N=t.handleReset,L=t.hidden,B=C.exports.useRef(null),j=function(oe){var ye;(ye=B.current)!==null&&ye!==void 0&&ye.contains(oe.target)&&(A==null||A())},G=function(){var oe;if(!I)return null;var ye=!k&&!T&&O,Re="".concat(n,"-clear-icon"),Te=ar(I)==="object"&&I!==null&&I!==void 0&&I.clearIcon?I.clearIcon:"\u2716";return S("span",{onClick:N,onMouseDown:function(ze){return ze.preventDefault()},className:Qe(Re,(oe={},se(oe,"".concat(Re,"-hidden"),!ye),se(oe,"".concat(Re,"-has-suffix"),!!a),oe)),role:"button",tabIndex:-1,children:Te})},H=C.exports.cloneElement(r,{value:O,hidden:L});if(I9(t)){var te,Y="".concat(n,"-affix-wrapper"),le=Qe(Y,(te={},se(te,"".concat(Y,"-disabled"),k),se(te,"".concat(Y,"-focused"),R),se(te,"".concat(Y,"-readonly"),T),se(te,"".concat(Y,"-input-with-clear-btn"),a&&I&&O),te),!s0(t)&&f,v),J=(a||I)&&Xe("span",{className:"".concat(n,"-suffix"),children:[G(),a]});H=Xe("span",{className:le,style:p,hidden:!s0(t)&&L,onClick:j,ref:B,children:[i&&S("span",{className:"".concat(n,"-prefix"),children:i}),C.exports.cloneElement(r,{style:null,value:O,hidden:null}),J]})}if(s0(t)){var Z="".concat(n,"-group"),Q="".concat(Z,"-addon"),ge=Qe("".concat(n,"-wrapper"),Z,w),ne=Qe("".concat(n,"-group-wrapper"),f,y);return S("span",{className:ne,style:p,hidden:L,children:Xe("span",{className:ge,children:[u&&S("span",{className:Q,children:u}),C.exports.cloneElement(H,{style:null,hidden:null}),o&&S("span",{className:Q,children:o})]})})}return H},Bee=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","inputClassName"],Vee=C.exports.forwardRef(function(e,t){var r=e.autoComplete,n=e.onChange,i=e.onFocus,a=e.onBlur,u=e.onPressEnter,o=e.onKeyDown,f=e.prefixCls,p=f===void 0?"rc-input":f,v=e.disabled,y=e.htmlSize,w=e.className,k=e.maxLength,T=e.suffix,R=e.showCount,A=e.type,I=A===void 0?"text":A,O=e.inputClassName,N=Mr(e,Bee),L=Yi(e.defaultValue,{value:e.value}),B=Le(L,2),j=B[0],G=B[1],H=C.exports.useState(!1),te=Le(H,2),Y=te[0],le=te[1],J=C.exports.useRef(null),Z=function(ke){J.current&&Fee(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,ze,Ie){var Ne;(Ne=J.current)===null||Ne===void 0||Ne.setSelectionRange(ke,ze,Ie)},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&&v?!1:Te})},[v]);var Q=function(ke){e.value===void 0&&G(ke.target.value),J.current&&KP(J.current,ke,n)},ge=function(ke){u&&ke.key==="Enter"&&u(ke),o==null||o(ke)},ne=function(ke){le(!0),i==null||i(ke)},de=function(ke){le(!1),a==null||a(ke)},oe=function(ke){G(""),Z(),J.current&&KP(J.current,ke,n)},ye=function(){var ke=Si(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","affixWrapperClassName","groupClassName","inputClassName","wrapperClassName","htmlSize"]);return S("input",{autoComplete:r,...ke,onChange:Q,onFocus:ne,onBlur:de,onKeyDown:ge,className:Qe(p,se({},"".concat(p,"-disabled"),v),O,!s0(e)&&!I9(e)&&w),ref:J,size:y,type:I})},Re=function(){var ke=Number(k)>0;if(T||R){var ze=HP(j),Ie=wt(ze).length,Ne=ar(R)==="object"?R.formatter({value:ze,count:Ie,maxLength:k}):"".concat(Ie).concat(ke?" / ".concat(k):"");return Xe(Ar,{children:[!!R&&S("span",{className:Qe("".concat(p,"-show-count-suffix"),se({},"".concat(p,"-show-count-has-suffix"),!!T)),children:Ne}),T]})}return null};return S($ee,{...N,prefixCls:p,className:w,inputElement:ye(),handleReset:oe,value:HP(j),focused:Y,triggerFocus:Z,suffix:Re(),disabled:v})});function R9(e,t){var r=C.exports.useRef([]),n=function(){r.current.push(setTimeout(function(){var a,u,o,f;((a=e.current)===null||a===void 0?void 0:a.input)&&((u=e.current)===null||u===void 0?void 0:u.input.getAttribute("type"))==="password"&&((o=e.current)===null||o===void 0?void 0:o.input.hasAttribute("value"))&&((f=e.current)===null||f===void 0||f.input.removeAttribute("value"))}))};return C.exports.useEffect(function(){return t&&n(),function(){return r.current.forEach(function(i){i&&clearTimeout(i)})}},[]),n}function jee(e){return!!(e.prefix||e.suffix||e.allowClear)}var Uee=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};function Kee(e){return typeof e>"u"||e===null?"":String(e)}function m2(e,t,r,n){if(!!r){var i=t;if(t.type==="click"){var a=e.cloneNode(!0);i=Object.create(t,{target:{value:a},currentTarget:{value:a}}),a.value="",r(i);return}if(n!==void 0){i=Object.create(t,{target:{value:e},currentTarget:{value:e}}),e.value=n,r(i);return}r(i)}}function Hee(e,t){if(!!e){e.focus(t);var r=t||{},n=r.cursor;if(n){var i=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(i,i);break;default:e.setSelectionRange(0,i);break}}}}var Wee=C.exports.forwardRef(function(e,t){var r,n,i,a=e.prefixCls,u=e.bordered,o=u===void 0?!0:u,f=e.status,p=e.size,v=e.disabled,y=e.onBlur,w=e.onFocus,k=e.suffix,T=e.allowClear,R=e.addonAfter,A=e.addonBefore,I=e.className,O=e.onChange,N=Uee(e,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","onChange"]),L=tn.useContext(zr),B=L.getPrefixCls,j=L.direction,G=L.input,H=B("input",a),te=C.exports.useRef(null),Y=vh(H,j),le=Y.compactSize,J=Y.compactItemClassnames,Z=tn.useContext(Gs),Q=le||p||Z,ge=tn.useContext(nc),ne=v!=null?v:ge,de=C.exports.useContext(ya),oe=de.status,ye=de.hasFeedback,Re=de.feedbackIcon,Te=xv(oe,f),ke=jee(e)||!!ye,ze=C.exports.useRef(ke);C.exports.useEffect(function(){ke&&ze.current,ze.current=ke},[ke]);var Ie=R9(te,!0),Ne=function(pt){Ie(),y==null||y(pt)},De=function(pt){Ie(),w==null||w(pt)},Ve=function(pt){Ie(),O==null||O(pt)},Ge=(ye||k)&&Xe(Ar,{children:[k,ye&&Re]}),je;return ar(T)==="object"&&(T==null?void 0:T.clearIcon)?je=T:T&&(je={clearIcon:S(gd,{})}),S(Vee,{ref:ta(t,te),prefixCls:H,autoComplete:G==null?void 0:G.autoComplete,...N,disabled:ne||void 0,onBlur:Ne,onFocus:De,suffix:Ge,allowClear:je,className:Qe(I,J),onChange:Ve,addonAfter:R&&S(t1,{children:S(P4,{override:!0,status:!0,children:R})}),addonBefore:A&&S(t1,{children:S(P4,{override:!0,status:!0,children:A})}),inputClassName:Qe((r={},se(r,"".concat(H,"-sm"),Q==="small"),se(r,"".concat(H,"-lg"),Q==="large"),se(r,"".concat(H,"-rtl"),j==="rtl"),se(r,"".concat(H,"-borderless"),!o),r),!ke&&Vu(H,Te)),affixWrapperClassName:Qe((n={},se(n,"".concat(H,"-affix-wrapper-sm"),Q==="small"),se(n,"".concat(H,"-affix-wrapper-lg"),Q==="large"),se(n,"".concat(H,"-affix-wrapper-rtl"),j==="rtl"),se(n,"".concat(H,"-affix-wrapper-borderless"),!o),n),Vu("".concat(H,"-affix-wrapper"),Te,ye)),wrapperClassName:Qe(se({},"".concat(H,"-group-rtl"),j==="rtl")),groupClassName:Qe((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"),j==="rtl"),i),Vu("".concat(H,"-group-wrapper"),Te,ye))})});const FS=Wee;var qee={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 Gee=qee;var O9=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:Gee})})};O9.displayName="EyeInvisibleOutlined";const Zee=C.exports.forwardRef(O9);var Xee=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},Yee=function(t){return t?S(Pee,{}):S(Zee,{})},Qee={click:"onClick",hover:"onMouseOver"},Jee=C.exports.forwardRef(function(e,t){var r=e.visibilityToggle,n=r===void 0?!0:r,i=ar(n)==="object"&&n.visible!==void 0,a=C.exports.useState(function(){return i?n.visible:!1}),u=Le(a,2),o=u[0],f=u[1],p=C.exports.useRef(null);C.exports.useEffect(function(){i&&f(n.visible)},[i,n]);var v=R9(p),y=function(){var R=e.disabled;R||(o&&v(),f(function(A){var I,O=!A;return ar(n)==="object"&&((I=n.onVisibleChange)===null||I===void 0||I.call(n,O)),O}))},w=function(R){var A,I=e.action,O=I===void 0?"click":I,N=e.iconRender,L=N===void 0?Yee:N,B=Qee[O]||"",j=L(o),G=(A={},se(A,B,y),se(A,"className","".concat(R,"-icon")),se(A,"key","passwordIcon"),se(A,"onMouseDown",function(te){te.preventDefault()}),se(A,"onMouseUp",function(te){te.preventDefault()}),A);return C.exports.cloneElement(C.exports.isValidElement(j)?j:S("span",{children:j}),G)},k=function(R){var A=R.getPrefixCls,I=e.className,O=e.prefixCls,N=e.inputPrefixCls,L=e.size,B=Xee(e,["className","prefixCls","inputPrefixCls","size"]),j=A("input",N),G=A("input-password",O),H=n&&w(G),te=Qe(G,I,se({},"".concat(G,"-").concat(L),!!L)),Y=tt(tt({},Si(B,["suffix","iconRender","visibilityToggle"])),{type:o?"text":"password",className:te,prefixCls:j,suffix:H});return L&&(Y.size=L),S(FS,{ref:ta(t,p),...Y})};return S(rc,{children:k})});const ete=Jee;var tte=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},rte=C.exports.forwardRef(function(e,t){var r,n=e.prefixCls,i=e.inputPrefixCls,a=e.className,u=e.size,o=e.suffix,f=e.enterButton,p=f===void 0?!1:f,v=e.addonAfter,y=e.loading,w=e.disabled,k=e.onSearch,T=e.onChange,R=e.onCompositionStart,A=e.onCompositionEnd,I=tte(e,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),O=C.exports.useContext(zr),N=O.getPrefixCls,L=O.direction,B=C.exports.useContext(Gs),j=C.exports.useRef(!1),G=N("input-search",n),H=N("input",i),te=vh(G,L),Y=te.compactSize,le=Y||u||B,J=C.exports.useRef(null),Z=function(De){De&&De.target&&De.type==="click"&&k&&k(De.target.value,De),T&&T(De)},Q=function(De){var Ve;document.activeElement===((Ve=J.current)===null||Ve===void 0?void 0:Ve.input)&&De.preventDefault()},ge=function(De){var Ve,Ge;k&&k((Ge=(Ve=J.current)===null||Ve===void 0?void 0:Ve.input)===null||Ge===void 0?void 0:Ge.value,De)},ne=function(De){j.current||y||ge(De)},de=typeof p=="boolean"?S(xS,{}):null,oe="".concat(G,"-button"),ye,Re=p||{},Te=Re.type&&Re.type.__ANT_BUTTON===!0;Te||Re.type==="button"?ye=Ni(Re,tt({onMouseDown:Q,onClick:function(De){var Ve,Ge;(Ge=(Ve=Re==null?void 0:Re.props)===null||Ve===void 0?void 0:Ve.onClick)===null||Ge===void 0||Ge.call(Ve,De),ge(De)},key:"enterButton"},Te?{className:oe,size:le}:{})):ye=S(On,{className:oe,type:p?"primary":void 0,size:le,disabled:w,onMouseDown:Q,onClick:ge,loading:y,icon:de,children:p},"enterButton"),v&&(ye=[ye,Ni(v,{key:"addonAfter"})]);var ke=Qe(G,(r={},se(r,"".concat(G,"-rtl"),L==="rtl"),se(r,"".concat(G,"-").concat(le),!!le),se(r,"".concat(G,"-with-button"),!!p),r),a),ze=function(De){j.current=!0,R==null||R(De)},Ie=function(De){j.current=!1,A==null||A(De)};return S(FS,{ref:ta(J,t),onPressEnter:ne,...I,size:le,onCompositionStart:ze,onCompositionEnd:Ie,prefixCls:H,addonAfter:ye,suffix:o,onChange:Z,className:ke,disabled:w})});const nte=rte;var ite=`
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;
`,ote=["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"],v2={},Na;function ate(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&v2[r])return v2[r];var n=window.getComputedStyle(e),i=n.getPropertyValue("box-sizing")||n.getPropertyValue("-moz-box-sizing")||n.getPropertyValue("-webkit-box-sizing"),a=parseFloat(n.getPropertyValue("padding-bottom"))+parseFloat(n.getPropertyValue("padding-top")),u=parseFloat(n.getPropertyValue("border-bottom-width"))+parseFloat(n.getPropertyValue("border-top-width")),o=ote.map(function(p){return"".concat(p,":").concat(n.getPropertyValue(p))}).join(";"),f={sizingStyle:o,paddingSize:a,borderSize:u,boxSizing:i};return t&&r&&(v2[r]=f),f}function ste(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Na||(Na=document.createElement("textarea"),Na.setAttribute("tab-index","-1"),Na.setAttribute("aria-hidden","true"),document.body.appendChild(Na)),e.getAttribute("wrap")?Na.setAttribute("wrap",e.getAttribute("wrap")):Na.removeAttribute("wrap");var i=ate(e,t),a=i.paddingSize,u=i.borderSize,o=i.boxSizing,f=i.sizingStyle;Na.setAttribute("style","".concat(f,";").concat(ite)),Na.value=e.value||e.placeholder||"";var p=void 0,v=void 0,y,w=Na.scrollHeight;if(o==="border-box"?w+=u:o==="content-box"&&(w-=a),r!==null||n!==null){Na.value=" ";var k=Na.scrollHeight-a;r!==null&&(p=k*r,o==="border-box"&&(p=p+a+u),w=Math.max(p,w)),n!==null&&(v=k*n,o==="border-box"&&(v=v+a+u),y=w>v?"":"hidden",w=Math.min(v,w))}var T={height:w,overflowY:y,resize:"none"};return p&&(T.minHeight=p),v&&(T.maxHeight=v),T}var lte=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],g2=0,y2=1,x2=2,ute=C.exports.forwardRef(function(e,t){var r=e.prefixCls,n=r===void 0?"rc-textarea":r;e.onPressEnter;var i=e.defaultValue,a=e.value,u=e.autoSize,o=e.onResize,f=e.className,p=e.style,v=e.disabled,y=e.onChange;e.onInternalAutoSize;var w=Mr(e,lte),k=Yi(i,{value:a,postState:function(Ie){return Ie!=null?Ie:""}}),T=Le(k,2),R=T[0],A=T[1],I=function(Ie){A(Ie.target.value),y==null||y(Ie)},O=C.exports.useRef();C.exports.useImperativeHandle(t,function(){return{textArea:O.current}});var N=C.exports.useMemo(function(){return u&&ar(u)==="object"?[u.minRows,u.maxRows]:[]},[u]),L=Le(N,2),B=L[0],j=L[1],G=!!u,H=function(){try{if(document.activeElement===O.current){var Ie=O.current,Ne=Ie.selectionStart,De=Ie.selectionEnd,Ve=Ie.scrollTop;O.current.setSelectionRange(Ne,De),O.current.scrollTop=Ve}}catch{}},te=C.exports.useState(x2),Y=Le(te,2),le=Y[0],J=Y[1],Z=C.exports.useState(),Q=Le(Z,2),ge=Q[0],ne=Q[1],de=function(){J(g2)};mi(function(){G&&de()},[a,B,j,G]),mi(function(){if(le===g2)J(y2);else if(le===y2){var ze=ste(O.current,!1,B,j);J(x2),ne(ze)}else H()},[le]);var oe=C.exports.useRef(),ye=function(){rn.cancel(oe.current)},Re=function(Ie){le===x2&&(o==null||o(Ie),u&&(ye(),oe.current=rn(function(){de()})))};C.exports.useEffect(function(){return ye},[]);var Te=G?ge:null,ke=ve(ve({},p),Te);return(le===g2||le===y2)&&(ke.overflowY="hidden",ke.overflowX="hidden"),S(Kl,{onResize:Re,disabled:!(u||o),children:S("textarea",{...w,ref:O,style:ke,className:Qe(n,f,se({},"".concat(n,"-disabled"),v)),disabled:v,value:R,onChange:I})})}),cte=function(e){vi(r,e);var t=gi(r);function r(n){var i;Qn(this,r),i=t.call(this,n),i.resizableTextArea=void 0,i.focus=function(){i.resizableTextArea.textArea.focus()},i.saveTextArea=function(u){i.resizableTextArea=u},i.handleChange=function(u){var o=i.props.onChange;i.setValue(u.target.value),o&&o(u)},i.handleKeyDown=function(u){var o=i.props,f=o.onPressEnter,p=o.onKeyDown;u.keyCode===13&&f&&f(u),p&&p(u)};var a=typeof n.value>"u"||n.value===null?n.defaultValue:n.value;return i.state={value:a},i}return Jn(r,[{key:"setValue",value:function(i,a){"value"in this.props||this.setState({value:i},a)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return S(ute,{...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}}]),r}(C.exports.Component),dte=Sa("text","input");function fte(e){return!!(e.addonBefore||e.addonAfter)}var hte=function(e){vi(r,e);var t=gi(r);function r(){return Qn(this,r),t.apply(this,arguments)}return Jn(r,[{key:"renderClearIcon",value:function(i){var a,u=this.props,o=u.value,f=u.disabled,p=u.readOnly,v=u.handleReset,y=u.suffix,w=!f&&!p&&o,k="".concat(i,"-clear-icon");return S(gd,{onClick:v,onMouseDown:function(R){return R.preventDefault()},className:Qe((a={},se(a,"".concat(k,"-hidden"),!w),se(a,"".concat(k,"-has-suffix"),!!y),a),k),role:"button"})}},{key:"renderTextAreaWithClearIcon",value:function(i,a,u){var o,f=this.props,p=f.value,v=f.allowClear,y=f.className,w=f.style,k=f.direction,T=f.bordered,R=f.hidden,A=f.status,I=u.status,O=u.hasFeedback;if(!v)return Ni(a,{value:p});var N=Qe("".concat(i,"-affix-wrapper"),"".concat(i,"-affix-wrapper-textarea-with-clear-btn"),Vu("".concat(i,"-affix-wrapper"),xv(I,A),O),(o={},se(o,"".concat(i,"-affix-wrapper-rtl"),k==="rtl"),se(o,"".concat(i,"-affix-wrapper-borderless"),!T),se(o,"".concat(y),!fte(this.props)&&y),o));return Xe("span",{className:N,style:w,hidden:R,children:[Ni(a,{style:null,value:p}),this.renderClearIcon(i)]})}},{key:"render",value:function(){var i=this;return S(ya.Consumer,{children:function(a){var u=i.props,o=u.prefixCls,f=u.inputType,p=u.element;if(f===dte[0])return i.renderTextAreaWithClearIcon(o,p,a)}})}}]),r}(C.exports.Component);const pte=hte;var mte=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};function A9(e,t){return wt(e||"").slice(0,t).join("")}function WP(e,t,r,n){var i=r;return e?i=A9(r,n):wt(t||"").length<r.length&&wt(r||"").length>n&&(i=t),i}var vte=C.exports.forwardRef(function(e,t){var r,n=e.prefixCls,i=e.bordered,a=i===void 0?!0:i,u=e.showCount,o=u===void 0?!1:u,f=e.maxLength,p=e.className,v=e.style,y=e.size,w=e.disabled,k=e.onCompositionStart,T=e.onCompositionEnd,R=e.onChange,A=e.status,I=mte(e,["prefixCls","bordered","showCount","maxLength","className","style","size","disabled","onCompositionStart","onCompositionEnd","onChange","status"]),O=C.exports.useContext(zr),N=O.getPrefixCls,L=O.direction,B=C.exports.useContext(Gs),j=C.exports.useContext(nc),G=w!=null?w:j,H=C.exports.useContext(ya),te=H.status,Y=H.hasFeedback,le=H.isFormItemInput,J=H.feedbackIcon,Z=xv(te,A),Q=C.exports.useRef(null),ge=C.exports.useRef(null),ne=C.exports.useState(!1),de=Le(ne,2),oe=de[0],ye=de[1],Re=C.exports.useRef(),Te=C.exports.useRef(0),ke=Yi(I.defaultValue,{value:I.value}),ze=Le(ke,2),Ie=ze[0],Ne=ze[1],De=I.hidden,Ve=function(ut,it){I.value===void 0&&(Ne(ut),it==null||it())},Ge=Number(f)>0,je=function(ut){ye(!0),Re.current=Ie,Te.current=ut.currentTarget.selectionStart,k==null||k(ut)},ct=function(ut){var it;ye(!1);var ft=ut.currentTarget.value;if(Ge){var xt=Te.current>=f+1||Te.current===((it=Re.current)===null||it===void 0?void 0:it.length);ft=WP(xt,Re.current,ft,f)}ft!==Ie&&(Ve(ft),m2(ut.currentTarget,ut,R,ft)),T==null||T(ut)},pt=function(ut){var it=ut.target.value;if(!oe&&Ge){var ft=ut.target.selectionStart>=f+1||ut.target.selectionStart===it.length||!ut.target.selectionStart;it=WP(ft,Ie,it,f)}Ve(it),m2(ut.currentTarget,ut,R,it)},Tt=function(ut){var it,ft,xt;Ve(""),(it=Q.current)===null||it===void 0||it.focus(),m2((xt=(ft=Q.current)===null||ft===void 0?void 0:ft.resizableTextArea)===null||xt===void 0?void 0:xt.textArea,ut,R)},Ye=N("input",n);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;Hee((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=S(cte,{...Si(I,["allowClear"]),disabled:G,className:Qe((r={},se(r,"".concat(Ye,"-borderless"),!a),se(r,p,p&&!o),se(r,"".concat(Ye,"-sm"),B==="small"||y==="small"),se(r,"".concat(Ye,"-lg"),B==="large"||y==="large"),r),Vu(Ye,Z)),style:o?{resize:v==null?void 0:v.resize}:v,prefixCls:Ye,onCompositionStart:je,onChange:pt,onCompositionEnd:ct,ref:Q}),mt=Kee(Ie);!oe&&Ge&&(I.value===null||I.value===void 0)&&(mt=A9(mt,f));var It=S(pte,{disabled:G,...I,prefixCls:Ye,direction:L,inputType:"text",value:mt,element:Pt,handleReset:Tt,ref:ge,bordered:a,status:A,style:o?void 0:v});if(o||Y){var Ct,Dt=wt(mt).length,lt="";return ar(o)==="object"?lt=o.formatter({value:mt,count:Dt,maxLength:f}):lt="".concat(Dt).concat(Ge?" / ".concat(f):""),Xe("div",{hidden:De,className:Qe("".concat(Ye,"-textarea"),(Ct={},se(Ct,"".concat(Ye,"-textarea-rtl"),L==="rtl"),se(Ct,"".concat(Ye,"-textarea-show-count"),o),se(Ct,"".concat(Ye,"-textarea-in-form-item"),le),Ct),Vu("".concat(Ye,"-textarea"),Z,Y),p),style:v,"data-count":lt,children:[It,Y&&S("span",{className:"".concat(Ye,"-textarea-suffix"),children:J})]})}return It});const N9=vte;var kv=FS;kv.Group=Lee;kv.Search=nte;kv.TextArea=N9;kv.Password=ete;const Ru=kv;var gte={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 yte=gte;var z9=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:yte})})};z9.displayName="DoubleLeftOutlined";const xte=C.exports.forwardRef(z9);var _te={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 bte=_te;var D9=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:bte})})};D9.displayName="DoubleRightOutlined";const wte=C.exports.forwardRef(D9);var Bp=function(t){var r,n="".concat(t.rootPrefixCls,"-item"),i=Qe(n,"".concat(n,"-").concat(t.page),(r={},se(r,"".concat(n,"-active"),t.active),se(r,"".concat(n,"-disabled"),!t.page),se(r,t.className,!!t.className),r)),a=function(){t.onClick(t.page)},u=function(f){t.onKeyPress(f,t.onClick,t.page)};return S("li",{title:t.showTitle?t.page:null,className:i,onClick:a,onKeyPress:u,tabIndex:"0",children:t.itemRender(t.page,"page",S("a",{rel:"nofollow",children:t.page}))})};const Lc={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40};var L9=function(e){vi(r,e);var t=gi(r);function r(){var n;Qn(this,r);for(var i=arguments.length,a=new Array(i),u=0;u<i;u++)a[u]=arguments[u];return n=t.call.apply(t,[this].concat(a)),n.state={goInputText:""},n.buildOptionText=function(o){return"".concat(o," ").concat(n.props.locale.items_per_page)},n.changeSize=function(o){n.props.changeSize(Number(o))},n.handleChange=function(o){n.setState({goInputText:o.target.value})},n.handleBlur=function(o){var f=n.props,p=f.goButton,v=f.quickGo,y=f.rootPrefixCls,w=n.state.goInputText;p||w===""||(n.setState({goInputText:""}),!(o.relatedTarget&&(o.relatedTarget.className.indexOf("".concat(y,"-item-link"))>=0||o.relatedTarget.className.indexOf("".concat(y,"-item"))>=0))&&v(n.getValidValue()))},n.go=function(o){var f=n.state.goInputText;f!==""&&(o.keyCode===Lc.ENTER||o.type==="click")&&(n.setState({goInputText:""}),n.props.quickGo(n.getValidValue()))},n}return Jn(r,[{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,a=i.pageSize,u=i.pageSizeOptions;return u.some(function(o){return o.toString()===a.toString()})?u:u.concat([a.toString()]).sort(function(o,f){var p=isNaN(Number(o))?0:Number(o),v=isNaN(Number(f))?0:Number(f);return p-v})}},{key:"render",value:function(){var i=this,a=this.props,u=a.pageSize,o=a.locale,f=a.rootPrefixCls,p=a.changeSize,v=a.quickGo,y=a.goButton,w=a.selectComponentClass,k=a.buildOptionText,T=a.selectPrefixCls,R=a.disabled,A=this.state.goInputText,I="".concat(f,"-options"),O=w,N=null,L=null,B=null;if(!p&&!v)return null;var j=this.getPageSizeOptions();if(p&&O){var G=j.map(function(H,te){return S(O.Option,{value:H.toString(),children:(k||i.buildOptionText)(H)},te)});N=S(O,{disabled:R,prefixCls:T,showSearch:!1,className:"".concat(I,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(u||j[0]).toString(),onChange:this.changeSize,getPopupContainer:function(te){return te.parentNode},"aria-label":o.page_size,defaultOpen:!1,children:G})}return v&&(y&&(B=typeof y=="boolean"?S("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:R,className:"".concat(I,"-quick-jumper-button"),children:o.jump_to_confirm}):S("span",{onClick:this.go,onKeyUp:this.go,children:y})),L=Xe("div",{className:"".concat(I,"-quick-jumper"),children:[o.jump_to,S("input",{disabled:R,type:"text",value:A,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":o.page}),o.page,B]})),Xe("li",{className:"".concat(I),children:[N,L]})}}]),r}(tn.Component);L9.defaultProps={pageSizeOptions:["10","20","50","100"]};const Cte={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 $4(){}function qP(e){var t=Number(e);return typeof t=="number"&&!isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function Ste(e,t,r){return r}function fu(e,t,r){var n=typeof e>"u"?t.pageSize:e;return Math.floor((r.total-1)/n)+1}var F9=function(e){vi(r,e);var t=gi(r);function r(n){var i;Qn(this,r),i=t.call(this,n),i.getJumpPrevPage=function(){return Math.max(1,i.state.current-(i.props.showLessItems?3:5))},i.getJumpNextPage=function(){return Math.min(fu(void 0,i.state,i.props),i.state.current+(i.props.showLessItems?3:5))},i.getItemIcon=function(p,v){var y=i.props.prefixCls,w=p||S("button",{type:"button","aria-label":v,className:"".concat(y,"-item-link")});return typeof p=="function"&&(w=tn.createElement(p,ve({},i.props))),w},i.savePaginationNode=function(p){i.paginationNode=p},i.isValid=function(p){var v=i.props.total;return qP(p)&&p!==i.state.current&&qP(v)&&v>0},i.shouldDisplayQuickJumper=function(){var p=i.props,v=p.showQuickJumper,y=p.total,w=i.state.pageSize;return y<=w?!1:v},i.handleKeyDown=function(p){(p.keyCode===Lc.ARROW_UP||p.keyCode===Lc.ARROW_DOWN)&&p.preventDefault()},i.handleKeyUp=function(p){var v=i.getValidValue(p),y=i.state.currentInputValue;v!==y&&i.setState({currentInputValue:v}),p.keyCode===Lc.ENTER?i.handleChange(v):p.keyCode===Lc.ARROW_UP?i.handleChange(v-1):p.keyCode===Lc.ARROW_DOWN&&i.handleChange(v+1)},i.handleBlur=function(p){var v=i.getValidValue(p);i.handleChange(v)},i.changePageSize=function(p){var v=i.state.current,y=fu(p,i.state,i.props);v=v>y?y:v,y===0&&(v=i.state.current),typeof p=="number"&&("pageSize"in i.props||i.setState({pageSize:p}),"current"in i.props||i.setState({current:v,currentInputValue:v})),i.props.onShowSizeChange(v,p),"onChange"in i.props&&i.props.onChange&&i.props.onChange(v,p)},i.handleChange=function(p){var v=i.props,y=v.disabled,w=v.onChange,k=i.state,T=k.pageSize,R=k.current,A=k.currentInputValue;if(i.isValid(p)&&!y){var I=fu(void 0,i.state,i.props),O=p;return p>I?O=I:p<1&&(O=1),"current"in i.props||i.setState({current:O}),O!==A&&i.setState({currentInputValue:O}),w(O,T),O}return R},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<fu(void 0,i.state,i.props)},i.runIfEnter=function(p,v){if(p.key==="Enter"||p.charCode===13){for(var y=arguments.length,w=new Array(y>2?y-2:0),k=2;k<y;k++)w[k-2]=arguments[k];v.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===Lc.ENTER||p.type==="click")&&i.handleChange(i.state.currentInputValue)};var a=n.onChange!==$4,u="current"in n;u&&!a&&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=n.defaultCurrent;"current"in n&&(o=n.current);var f=n.defaultPageSize;return"pageSize"in n&&(f=n.pageSize),o=Math.min(o,fu(f,void 0,n)),i.state={current:o,currentInputValue:o,pageSize:f},i}return Jn(r,[{key:"componentDidUpdate",value:function(i,a){var u=this.props.prefixCls;if(a.current!==this.state.current&&this.paginationNode){var o=this.paginationNode.querySelector(".".concat(u,"-item-").concat(a.current));o&&document.activeElement===o&&o.blur()}}},{key:"getValidValue",value:function(i){var a=i.target.value,u=fu(void 0,this.state,this.props),o=this.state.currentInputValue,f;return a===""?f=a:isNaN(Number(a))?f=o:a>=u?f=u:f=Number(a),f}},{key:"getShowSizeChanger",value:function(){var i=this.props,a=i.showSizeChanger,u=i.total,o=i.totalBoundaryShowSizeChanger;return typeof a<"u"?a:u>o}},{key:"renderPrev",value:function(i){var a=this.props,u=a.prevIcon,o=a.itemRender,f=o(i,"prev",this.getItemIcon(u,"prev page")),p=!this.hasPrev();return C.exports.isValidElement(f)?C.exports.cloneElement(f,{disabled:p}):f}},{key:"renderNext",value:function(i){var a=this.props,u=a.nextIcon,o=a.itemRender,f=o(i,"next",this.getItemIcon(u,"next page")),p=!this.hasNext();return C.exports.isValidElement(f)?C.exports.cloneElement(f,{disabled:p}):f}},{key:"render",value:function(){var i=this,a=this.props,u=a.prefixCls,o=a.className,f=a.style,p=a.disabled,v=a.hideOnSinglePage,y=a.total,w=a.locale,k=a.showQuickJumper,T=a.showLessItems,R=a.showTitle,A=a.showTotal,I=a.simple,O=a.itemRender,N=a.showPrevNextJumpers,L=a.jumpPrevIcon,B=a.jumpNextIcon,j=a.selectComponentClass,G=a.selectPrefixCls,H=a.pageSizeOptions,te=this.state,Y=te.current,le=te.pageSize,J=te.currentInputValue;if(v===!0&&y<=le)return null;var Z=fu(void 0,this.state,this.props),Q=[],ge=null,ne=null,de=null,oe=null,ye=null,Re=k&&k.goButton,Te=T?1:2,ke=Y-1>0?Y-1:0,ze=Y+1<Z?Y+1:Z,Ie=Object.keys(this.props).reduce(function(Ct,Dt){return(Dt.substr(0,5)==="data-"||Dt.substr(0,5)==="aria-"||Dt==="role")&&(Ct[Dt]=i.props[Dt]),Ct},{}),Ne=A&&S("li",{className:"".concat(u,"-total-text"),children:A(y,[y===0?0:(Y-1)*le+1,Y*le>y?y:Y*le])});if(I)return Re&&(typeof Re=="boolean"?ye=S("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO,children:w.jump_to_confirm}):ye=S("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO,children:Re}),ye=S("li",{title:R?"".concat(w.jump_to).concat(Y,"/").concat(Z):null,className:"".concat(u,"-simple-pager"),children:ye})),Xe("ul",{className:Qe(u,"".concat(u,"-simple"),se({},"".concat(u,"-disabled"),p),o),style:f,ref:this.savePaginationNode,...Ie,children:[Ne,S("li",{title:R?w.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:Qe("".concat(u,"-prev"),se({},"".concat(u,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev(),children:this.renderPrev(ke)}),Xe("li",{title:R?"".concat(Y,"/").concat(Z):null,className:"".concat(u,"-simple-pager"),children:[S("input",{type:"text",value:J,disabled:p,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:"3"}),S("span",{className:"".concat(u,"-slash"),children:"/"}),Z]}),S("li",{title:R?w.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:Qe("".concat(u,"-next"),se({},"".concat(u,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext(),children:this.renderNext(ze)}),ye]});if(Z<=3+Te*2){var De={locale:w,rootPrefixCls:u,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:R,itemRender:O};Z||Q.push(C.exports.createElement(Bp,{...De,key:"noPager",page:1,className:"".concat(u,"-item-disabled")}));for(var Ve=1;Ve<=Z;Ve+=1){var Ge=Y===Ve;Q.push(C.exports.createElement(Bp,{...De,key:Ve,page:Ve,active:Ge}))}}else{var je=T?w.prev_3:w.prev_5,ct=T?w.next_3:w.next_5;N&&(ge=S("li",{title:R?je:null,onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:Qe("".concat(u,"-jump-prev"),se({},"".concat(u,"-jump-prev-custom-icon"),!!L)),children:O(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(L,"prev page"))},"prev"),ne=S("li",{title:R?ct:null,tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:Qe("".concat(u,"-jump-next"),se({},"".concat(u,"-jump-next-custom-icon"),!!B)),children:O(this.getJumpNextPage(),"jump-next",this.getItemIcon(B,"next page"))},"next")),oe=S(Bp,{locale:w,last:!0,rootPrefixCls:u,onClick:this.handleChange,onKeyPress:this.runIfEnter,page:Z,active:!1,showTitle:R,itemRender:O},Z),de=S(Bp,{locale:w,rootPrefixCls:u,onClick:this.handleChange,onKeyPress:this.runIfEnter,page:1,active:!1,showTitle:R,itemRender:O},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 Ye=pt;Ye<=Tt;Ye+=1){var Pt=Y===Ye;Q.push(S(Bp,{locale:w,rootPrefixCls:u,onClick:this.handleChange,onKeyPress:this.runIfEnter,page:Ye,active:Pt,showTitle:R,itemRender:O},Ye))}Y-1>=Te*2&&Y!==1+2&&(Q[0]=C.exports.cloneElement(Q[0],{className:"".concat(u,"-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(u,"-item-before-jump-next")}),Q.push(ne)),pt!==1&&Q.unshift(de),Tt!==Z&&Q.push(oe)}var mt=!this.hasPrev()||!Z,It=!this.hasNext()||!Z;return Xe("ul",{className:Qe(u,o,se({},"".concat(u,"-disabled"),p)),style:f,ref:this.savePaginationNode,...Ie,children:[Ne,S("li",{title:R?w.prev_page:null,onClick:this.prev,tabIndex:mt?null:0,onKeyPress:this.runIfEnterPrev,className:Qe("".concat(u,"-prev"),se({},"".concat(u,"-disabled"),mt)),"aria-disabled":mt,children:this.renderPrev(ke)}),Q,S("li",{title:R?w.next_page:null,onClick:this.next,tabIndex:It?null:0,onKeyPress:this.runIfEnterNext,className:Qe("".concat(u,"-next"),se({},"".concat(u,"-disabled"),It)),"aria-disabled":It,children:this.renderNext(ze)}),S(L9,{disabled:p,locale:w,rootPrefixCls:u,selectComponentClass:j,selectPrefixCls:G,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,a){var u={};if("current"in i&&(u.current=i.current,i.current!==a.current&&(u.currentInputValue=u.current)),"pageSize"in i&&i.pageSize!==a.pageSize){var o=a.current,f=fu(i.pageSize,a,i);o=o>f?f:o,"current"in i||(u.current=o,u.currentInputValue=o),u.pageSize=i.pageSize}return u}}]),r}(tn.Component);F9.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:$4,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:$4,locale:Cte,style:{},itemRender:Ste,totalBoundaryShowSizeChanger:50};var $9=function(t){return S(Ll,{...t,size:"small"})},B9=function(t){return S(Ll,{...t,size:"middle"})};$9.Option=Ll.Option;B9.Option=Ll.Option;var Ete=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},kte=function(t){var r=t.prefixCls,n=t.selectPrefixCls,i=t.className,a=t.size,u=t.locale,o=t.selectComponentClass,f=t.responsive,p=t.showSizeChanger,v=Ete(t,["prefixCls","selectPrefixCls","className","size","locale","selectComponentClass","responsive","showSizeChanger"]),y=kN(f),w=y.xs,k=C.exports.useContext(zr),T=k.getPrefixCls,R=k.direction,A=k.pagination,I=A===void 0?{}:A,O=T("pagination",r),N=p!=null?p:I.showSizeChanger,L=function(){var j=S("span",{className:"".concat(O,"-item-ellipsis"),children:"\u2022\u2022\u2022"}),G=S("button",{className:"".concat(O,"-item-link"),type:"button",tabIndex:-1,children:S(pY,{})}),H=S("button",{className:"".concat(O,"-item-link"),type:"button",tabIndex:-1,children:S(TS,{})}),te=S("a",{className:"".concat(O,"-item-link"),children:Xe("div",{className:"".concat(O,"-item-container"),children:[S(xte,{className:"".concat(O,"-item-link-icon")}),j]})}),Y=S("a",{className:"".concat(O,"-item-link"),children:Xe("div",{className:"".concat(O,"-item-container"),children:[S(wte,{className:"".concat(O,"-item-link-icon")}),j]})});if(R==="rtl"){var le=[H,G];G=le[0],H=le[1];var J=[Y,te];te=J[0],Y=J[1]}return{prevIcon:G,nextIcon:H,jumpPrevIcon:te,jumpNextIcon:Y}};return S(mv,{componentName:"Pagination",defaultLocale:yO,children:function(B){var j,G=tt(tt({},B),u),H=a==="small"||!!(w&&!a&&f),te=T("select",n),Y=Qe((j={},se(j,"".concat(O,"-mini"),H),se(j,"".concat(O,"-rtl"),R==="rtl"),j),i);return S(F9,{...L(),...v,prefixCls:O,selectPrefixCls:te,className:Y,selectComponentClass:o||(H?$9:B9),locale:G,showSizeChanger:N})}})};const Tte=kte;var Pte=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};Sa("small","default","large");var l0=null;function Mte(e,t){var r=t.indicator,n="".concat(e,"-dot");return r===null?null:Yo(r)?Ni(r,{className:Qe(r.props.className,n)}):Yo(l0)?Ni(l0,{className:Qe(l0.props.className,n)}):Xe("span",{className:Qe(n,"".concat(e,"-dot-spin")),children:[S("i",{className:"".concat(e,"-dot-item")}),S("i",{className:"".concat(e,"-dot-item")}),S("i",{className:"".concat(e,"-dot-item")}),S("i",{className:"".concat(e,"-dot-item")})]})}function Ite(e,t){return!!e&&!!t&&!isNaN(Number(t))}var Rte=function(t){var r=t.spinPrefixCls,n=t.spinning,i=n===void 0?!0:n,a=t.delay,u=t.className,o=t.size,f=o===void 0?"default":o,p=t.tip,v=t.wrapperClassName,y=t.style,w=t.children,k=Pte(t,["spinPrefixCls","spinning","delay","className","size","tip","wrapperClassName","style","children"]),T=C.exports.useState(function(){return i&&!Ite(i,a)}),R=Le(T,2),A=R[0],I=R[1];C.exports.useEffect(function(){var L=lJ(function(){I(i)},a);return L(),function(){var B;(B=L==null?void 0:L.cancel)===null||B===void 0||B.call(L)}},[a,i]);var O=function(){return typeof w<"u"},N=function(B){var j,G=B.direction,H=Qe(r,(j={},se(j,"".concat(r,"-sm"),f==="small"),se(j,"".concat(r,"-lg"),f==="large"),se(j,"".concat(r,"-spinning"),A),se(j,"".concat(r,"-show-text"),!!p),se(j,"".concat(r,"-rtl"),G==="rtl"),j),u),te=Si(k,["indicator","prefixCls"]),Y=Xe("div",{...te,style:y,className:H,"aria-live":"polite","aria-busy":A,children:[Mte(r,t),p?S("div",{className:"".concat(r,"-text"),children:p}):null]});if(O()){var le=Qe("".concat(r,"-container"),se({},"".concat(r,"-blur"),A));return Xe("div",{...te,className:Qe("".concat(r,"-nested-loading"),v),children:[A&&S("div",{children:Y},"loading"),S("div",{className:le,children:w},"container")]})}return Y};return S(rc,{children:N})},V9=function(t){var r=t.prefixCls,n=C.exports.useContext(zr),i=n.getPrefixCls,a=i("spin",r),u=tt(tt({},t),{spinPrefixCls:a});return S(Rte,{...u})};V9.setDefaultIndicator=function(e){l0=e};const $S=V9;function GP(e){return!!(e&&!!e.then)}var Ote=function(t){var r=C.exports.useRef(!1),n=C.exports.useRef(null),i=Hs(!1),a=Le(i,2),u=a[0],o=a[1],f=t.close,p=function(){f==null||f.apply(void 0,arguments)};C.exports.useEffect(function(){var A=null;return t.autoFocus&&(A=setTimeout(function(){var I;(I=n.current)===null||I===void 0||I.focus()})),function(){A&&clearTimeout(A)}},[]);var v=function(I){!GP(I)||(o(!0),I.then(function(){o(!1,!0),p.apply(void 0,arguments),r.current=!1},function(O){console.error(O),o(!1,!0),r.current=!1}))},y=function(I){var O=t.actionFn;if(!r.current){if(r.current=!0,!O){p();return}var N;if(t.emitEvent){if(N=O(I),t.quitOnNullishReturnValue&&!GP(N)){r.current=!1,p(I);return}}else if(O.length)N=O(f),r.current=!1;else if(N=O(),!N){p();return}v(N)}},w=t.type,k=t.children,T=t.prefixCls,R=t.buttonProps;return S(On,{...QN(w),onClick:y,loading:u,prefixCls:T,...R,ref:n,children:k})};const ZP=Ote;var Ate=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},B4,Nte=function(t){B4={x:t.pageX,y:t.pageY},setTimeout(function(){B4=null},100)};e9()&&document.documentElement.addEventListener("click",Nte,!0);var zte=function(t){var r,n,i=C.exports.useContext(zr),a=i.getPopupContainer,u=i.getPrefixCls,o=i.direction,f=function(Q){var ge=t.onCancel;ge==null||ge(Q)},p=function(Q){var ge=t.onOk;ge==null||ge(Q)},v=t.prefixCls,y=t.footer,w=t.visible,k=t.open,T=k===void 0?!1:k,R=t.wrapClassName,A=t.centered,I=t.getContainer,O=t.closeIcon,N=t.focusTriggerAfterClose,L=N===void 0?!0:N,B=t.width,j=B===void 0?520:B,G=Ate(t,["prefixCls","footer","visible","open","wrapClassName","centered","getContainer","closeIcon","focusTriggerAfterClose","width"]),H=u("modal",v),te=u(),Y=S(mv,{componentName:"Modal",defaultLocale:_O(),children:function(Z){var Q=t.okText,ge=t.okType,ne=ge===void 0?"primary":ge,de=t.cancelText,oe=t.confirmLoading,ye=oe===void 0?!1:oe;return Xe(Ar,{children:[S(On,{onClick:f,...t.cancelButtonProps,children:de||Z.cancelText}),S(On,{...QN(ne),loading:ye,onClick:p,...t.okButtonProps,children:Q!=null?Q:Z.okText})]})}}),le=S("span",{className:"".concat(H,"-close-x"),children:O||S(fx,{className:"".concat(H,"-close-icon")})}),J=Qe(R,(r={},se(r,"".concat(H,"-centered"),!!A),se(r,"".concat(H,"-wrap-rtl"),o==="rtl"),r));return S(t1,{children:S(P4,{status:!0,override:!0,children:S(M9,{width:j,...G,getContainer:I===void 0?a:I,prefixCls:H,wrapClassName:J,footer:y===void 0?Y:y,visible:T||w,mousePosition:(n=G.mousePosition)!==null&&n!==void 0?n:B4,onClose:f,closeIcon:le,focusTriggerAfterClose:L,transitionName:Dl(te,"zoom",t.transitionName),maskTransitionName:Dl(te,"fade",t.maskTransitionName)})})})};const j9=zte;var Dte=function(t){var r=t.icon,n=t.onCancel,i=t.onOk,a=t.close,u=t.zIndex,o=t.afterClose,f=t.visible,p=t.open,v=t.keyboard,y=t.centered,w=t.getContainer,k=t.maskStyle,T=t.okText,R=t.okButtonProps,A=t.cancelText,I=t.cancelButtonProps,O=t.direction,N=t.prefixCls,L=t.wrapClassName,B=t.rootPrefixCls,j=t.iconPrefixCls,G=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,ne=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=Qe(Q,"".concat(Q,"-").concat(t.type),se({},"".concat(Q,"-rtl"),O==="rtl"),t.className),ke=ge&&S(ZP,{actionFn:n,close:a,autoFocus:Re==="cancel",buttonProps:I,prefixCls:"".concat(B,"-btn"),children:A});return S(mh,{prefixCls:B,iconPrefixCls:j,direction:O,children:S(j9,{prefixCls:N,className:Te,wrapClassName:Qe(se({},"".concat(Q,"-centered"),!!t.centered),L),onCancel:function(){return a==null?void 0:a({triggerCancel:!0})},open:p||f,title:"",footer:"",transitionName:Dl(B,"zoom",t.transitionName),maskTransitionName:Dl(B,"fade",t.maskTransitionName),mask:oe,maskClosable:ye,maskStyle:k,style:de,bodyStyle:G,width:ne,zIndex:u,afterClose:o,keyboard:v,centered:y,getContainer:w,closable:te,closeIcon:Y,modalRender:le,focusTriggerAfterClose:J,children:Xe("div",{className:"".concat(Q,"-body-wrapper"),children:[Xe("div",{className:"".concat(Q,"-body"),children:[r,t.title===void 0?null:S("span",{className:"".concat(Q,"-title"),children:t.title}),S("div",{className:"".concat(Q,"-content"),children:t.content})]}),Xe("div",{className:"".concat(Q,"-btns"),children:[ke,S(ZP,{type:Z,actionFn:i,close:a,autoFocus:Re==="ok",buttonProps:R,prefixCls:"".concat(B,"-btn"),children:T})]})]})})})};const U9=Dte;var Lte=[];const Ef=Lte;var Fte=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},K9="";function $te(){return K9}function Tv(e){var t=document.createDocumentFragment(),r=tt(tt({},e),{close:u,open:!0}),n;function i(){for(var f=arguments.length,p=new Array(f),v=0;v<f;v++)p[v]=arguments[v];var y=p.some(function(T){return T&&T.triggerCancel});e.onCancel&&y&&e.onCancel.apply(e,[function(){}].concat(wt(p.slice(1))));for(var w=0;w<Ef.length;w++){var k=Ef[w];if(k===u){Ef.splice(w,1);break}}$O(t)}function a(f){var p=f.okText,v=f.cancelText,y=f.prefixCls,w=Fte(f,["okText","cancelText","prefixCls"]);clearTimeout(n),n=setTimeout(function(){var k=_O(),T=nS(),R=T.getPrefixCls,A=T.getIconPrefixCls,I=R(void 0,$te()),O=y||"".concat(I,"-modal"),N=A();FO(S(U9,{...w,prefixCls:O,rootPrefixCls:I,iconPrefixCls:N,okText:p||(w.okCancel?k.okText:k.justOkText),cancelText:v||k.cancelText}),t)})}function u(){for(var f=this,p=arguments.length,v=new Array(p),y=0;y<p;y++)v[y]=arguments[y];r=tt(tt({},r),{open:!1,afterClose:function(){typeof e.afterClose=="function"&&e.afterClose(),i.apply(f,v)}}),r.visible&&delete r.visible,a(r)}function o(f){typeof f=="function"?r=f(r):r=tt(tt({},r),f),a(r)}return a(r),Ef.push(u),{destroy:u,update:o}}function H9(e){return tt(tt({icon:S(hx,{}),okCancel:!1},e),{type:"warning"})}function W9(e){return tt(tt({icon:S(rS,{}),okCancel:!1},e),{type:"info"})}function q9(e){return tt(tt({icon:S(eS,{}),okCancel:!1},e),{type:"success"})}function G9(e){return tt(tt({icon:S(tS,{}),okCancel:!1},e),{type:"error"})}function Z9(e){return tt(tt({icon:S(hx,{}),okCancel:!0},e),{type:"confirm"})}function Bte(e){var t=e.rootPrefixCls;K9=t}function Vte(){var e=C.exports.useState([]),t=Le(e,2),r=t[0],n=t[1],i=C.exports.useCallback(function(a){return n(function(u){return[].concat(wt(u),[a])}),function(){n(function(u){return u.filter(function(o){return o!==a})})}},[]);return[r,i]}var jte=function(t,r){var n=t.afterClose,i=t.config,a=C.exports.useState(!0),u=Le(a,2),o=u[0],f=u[1],p=C.exports.useState(i),v=Le(p,2),y=v[0],w=v[1],k=C.exports.useContext(zr),T=k.direction,R=k.getPrefixCls,A=R("modal"),I=R(),O=function(){f(!1);for(var L=arguments.length,B=new Array(L),j=0;j<L;j++)B[j]=arguments[j];var G=B.some(function(H){return H&&H.triggerCancel});y.onCancel&&G&&y.onCancel.apply(y,[function(){}].concat(wt(B.slice(1))))};return C.exports.useImperativeHandle(r,function(){return{destroy:O,update:function(L){w(function(B){return tt(tt({},B),L)})}}}),S(mv,{componentName:"Modal",defaultLocale:zl.Modal,children:function(N){return S(U9,{prefixCls:A,rootPrefixCls:I,...y,close:O,open:o,afterClose:n,okText:y.okText||(y.okCancel?N.okText:N.justOkText),direction:T,cancelText:y.cancelText||N.cancelText})}})};const Ute=C.exports.forwardRef(jte);var XP=0,Kte=C.exports.memo(C.exports.forwardRef(function(e,t){var r=Vte(),n=Le(r,2),i=n[0],a=n[1];return C.exports.useImperativeHandle(t,function(){return{patchElement:a}},[]),S(Ar,{children:i})}));function Hte(){var e=C.exports.useRef(null),t=C.exports.useState([]),r=Le(t,2),n=r[0],i=r[1];C.exports.useEffect(function(){if(n.length){var o=wt(n);o.forEach(function(f){f()}),i([])}},[n]);var a=C.exports.useCallback(function(o){return function(p){var v;XP+=1;var y=C.exports.createRef(),w,k=S(Ute,{config:o(p),ref:y,afterClose:function(){w==null||w()}},"modal-".concat(XP));return w=(v=e.current)===null||v===void 0?void 0:v.patchElement(k),{destroy:function(){function R(){var A;(A=y.current)===null||A===void 0||A.destroy()}y.current?R():i(function(A){return[].concat(wt(A),[R])})},update:function(R){function A(){var I;(I=y.current)===null||I===void 0||I.update(R)}y.current?A():i(function(I){return[].concat(wt(I),[A])})}}}},[]),u=C.exports.useMemo(function(){return{info:a(W9),success:a(q9),error:a(G9),warning:a(H9),confirm:a(Z9)}},[]);return[u,S(Kte,{ref:e})]}function X9(e){return Tv(H9(e))}var Xs=j9;Xs.useModal=Hte;Xs.info=function(t){return Tv(W9(t))};Xs.success=function(t){return Tv(q9(t))};Xs.error=function(t){return Tv(G9(t))};Xs.warning=X9;Xs.warn=X9;Xs.confirm=function(t){return Tv(Z9(t))};Xs.destroyAll=function(){for(;Ef.length;){var t=Ef.pop();t&&t()}};Xs.config=Bte;const Wte=Xs;var qte={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 Gte=qte;var Zte=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},Xte={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-block"},Yte=C.exports.forwardRef(function(e,t){var r=function(v){var y=v.keyCode;y===Et.ENTER&&v.preventDefault()},n=function(v){var y=v.keyCode,w=e.onClick;y===Et.ENTER&&w&&w()},i=e.style,a=e.noStyle,u=e.disabled,o=Zte(e,["style","noStyle","disabled"]),f={};return a||(f=tt({},Xte)),u&&(f.pointerEvents="none"),f=tt(tt({},f),i),S("div",{role:"button",tabIndex:0,ref:t,...o,onKeyDown:r,onKeyUp:n,style:f})});const YP=Yte;var Qte={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 Jte=Qte;var Y9=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:Jte})})};Y9.displayName="WarningFilled";const ere=C.exports.forwardRef(Y9);var tre=function(){return Xe("svg",{width:"252",height:"294",children:[S("defs",{children:S("path",{d:"M0 .387h251.772v251.772H0z"})}),Xe("g",{fill:"none",fillRule:"evenodd",children:[Xe("g",{transform:"translate(0 .012)",children:[S("mask",{fill:"#fff"}),S("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)"})]}),S("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"}),S("path",{d:"M36.975 134.297l10.482 5.943M48.373 146.508l-12.648 10.788",stroke:"#FFF",strokeWidth:"2"}),S("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"}),S("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"}),S("path",{d:"M179.26 141.75l12.64 7.167M193.006 156.477l-15.255 13.011",stroke:"#FFF",strokeWidth:"2"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("path",{d:"M107.275 222.1s2.773-1.11 6.102-3.884",stroke:"#648BD8",strokeLinecap:"round",strokeLinejoin:"round"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("path",{stroke:"#DB836E",strokeWidth:"1.118",strokeLinecap:"round",strokeLinejoin:"round",d:"M110.13 74.84l-.896 1.61-.298 4.357h-2.228"}),S("path",{d:"M110.846 74.481s1.79-.716 2.506.537",stroke:"#5C2552",strokeWidth:"1.118",strokeLinecap:"round",strokeLinejoin:"round"}),S("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"}),S("path",{d:"M103.287 72.93s1.83 1.113 4.137.954",stroke:"#5C2552",strokeWidth:"1.118",strokeLinecap:"round",strokeLinejoin:"round"}),S("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"}),S("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"}),S("path",{d:"M129.405 122.865s-5.272 7.403-9.422 10.768",stroke:"#E4EBF7",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),S("path",{d:"M119.306 107.329s.452 4.366-2.127 32.062",stroke:"#E4EBF7",strokeWidth:"1.101",strokeLinecap:"round",strokeLinejoin:"round"}),S("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"}),S("path",{d:"M150.29 151.232h-19.863v-33.707h20.784v32.786a.92.92 0 0 1-.92.92",fill:"#F4D19D"}),S("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"}),S("path",{fill:"#CC9B6E",d:"M123.689 128.447H99.25v-.519h24.169l7.183-10.26.424.298z"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("path",{d:"M88.979 89.48s7.776 5.384 16.6 2.842",stroke:"#E4EBF7",strokeWidth:"1.101",strokeLinecap:"round",strokeLinejoin:"round"})]})]})};const rre=tre;var nre=function(){return Xe("svg",{width:"254",height:"294",children:[Xe("defs",{children:[S("path",{d:"M0 .335h253.49v253.49H0z"}),S("path",{d:"M0 293.665h253.49V.401H0z"})]}),Xe("g",{fill:"none",fillRule:"evenodd",children:[Xe("g",{transform:"translate(0 .067)",children:[S("mask",{fill:"#fff"}),S("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)"})]}),S("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"}),S("path",{d:"M37.19 135.59l10.553 5.983M48.665 147.884l-12.734 10.861",stroke:"#FFF",strokeWidth:"2"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("path",{stroke:"#DB836E",strokeWidth:"1.063",strokeLinecap:"round",strokeLinejoin:"round",d:"M99.206 73.644l-.9 1.62-.3 4.38h-2.24"}),S("path",{d:"M99.926 73.284s1.8-.72 2.52.54",stroke:"#5C2552",strokeWidth:"1.117",strokeLinecap:"round",strokeLinejoin:"round"}),S("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"}),S("path",{d:"M92.326 71.724s1.84 1.12 4.16.96",stroke:"#5C2552",strokeWidth:"1.117",strokeLinecap:"round",strokeLinejoin:"round"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("path",{d:"M96.973 219.373s2.882-1.153 6.34-4.034",stroke:"#648BD8",strokeWidth:"1.032",strokeLinecap:"round",strokeLinejoin:"round"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("path",{d:"M109.278 112.533s3.38-3.613 7.575-4.662",stroke:"#E4EBF7",strokeWidth:"1.085",strokeLinecap:"round",strokeLinejoin:"round"}),S("path",{d:"M107.375 123.006s9.697-2.745 11.445-.88",stroke:"#E59788",strokeWidth:".774",strokeLinecap:"round",strokeLinejoin:"round"}),S("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"}),S("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"}),S("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"}),S("mask",{fill:"#fff"}),S("path",{fill:"#A3B4C6",mask:"url(#d)",d:"M154.098 190.096h70.513v-84.617h-70.513z"}),S("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)"}),S("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)"}),S("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)"}),S("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)"}),S("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)"}),S("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)"}),S("path",{d:"M177.259 207.217v11.52M201.05 207.217v11.52",stroke:"#A3B4C6",strokeWidth:"1.124",strokeLinecap:"round",strokeLinejoin:"round",mask:"url(#d)"}),S("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)"}),S("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)"}),S("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 ire=nre;var ore=function(){return S("svg",{width:"251",height:"294",children:Xe("g",{fill:"none",fillRule:"evenodd",children:[S("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"}),S("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"}),S("path",{d:"M38.652 136.36l10.425 5.91M49.989 148.505l-12.58 10.73",stroke:"#FFF",strokeWidth:"2"}),S("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"}),S("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"}),S("path",{d:"M180.17 143.772l12.572 7.129M193.841 158.42L178.67 171.36",stroke:"#FFF",strokeWidth:"2"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("path",{d:"M78.18 94.656s.911 7.41-4.914 13.078",stroke:"#E4EBF7",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("path",{stroke:"#DB836E",strokeWidth:"1.145",strokeLinecap:"round",strokeLinejoin:"round",d:"M100.843 77.099l1.701-.928-1.015-4.324.674-1.406"}),S("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"}),S("path",{d:"M91.132 86.786s5.269 4.957 12.679 2.327",stroke:"#DB836E",strokeWidth:"1.145",strokeLinecap:"round",strokeLinejoin:"round"}),S("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"}),S("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"}),S("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"}),S("path",{d:"M87.782 115.821l15.73-3.012M100.165 115.821l10.04-2.008",stroke:"#E4EBF7",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),S("path",{d:"M66.508 86.763s-1.598 8.83-6.697 14.078",stroke:"#E4EBF7",strokeWidth:"1.114",strokeLinecap:"round",strokeLinejoin:"round"}),S("path",{d:"M128.31 87.934s3.013 4.121 4.06 11.785",stroke:"#E4EBF7",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),S("path",{d:"M64.09 84.816s-6.03 9.912-13.607 9.903",stroke:"#DB836E",strokeWidth:".795",strokeLinecap:"round",strokeLinejoin:"round"}),S("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"}),S("path",{d:"M130.532 85.488s4.588 5.757 11.619 6.214",stroke:"#DB836E",strokeWidth:".75",strokeLinecap:"round",strokeLinejoin:"round"}),S("path",{d:"M121.708 105.73s-.393 8.564-1.34 13.612",stroke:"#E4EBF7",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),S("path",{d:"M115.784 161.512s-3.57-1.488-2.678-7.14",stroke:"#648BD8",strokeWidth:"1.051",strokeLinecap:"round",strokeLinejoin:"round"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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"}),S("path",{d:"M108.459 220.905s2.759-1.104 6.07-3.863",stroke:"#648BD8",strokeLinecap:"round",strokeLinejoin:"round"}),S("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"}),S("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"}),S("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"}),S("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"}),S("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 are=ore;var sre={success:ux,error:gd,info:cx,warning:ere},Pv={404:rre,500:ire,403:are},lre=Object.keys(Pv),ure=function(t){var r=t.prefixCls,n=t.icon,i=t.status,a=Qe("".concat(r,"-icon"));if(lre.includes("".concat(i))){var u=Pv[i];return S("div",{className:"".concat(a," ").concat(r,"-image"),children:S(u,{})})}var o=C.exports.createElement(sre[i]);return n===null||n===!1?null:S("div",{className:a,children:n||o})},cre=function(t){var r=t.prefixCls,n=t.extra;return n?S("div",{className:"".concat(r,"-extra"),children:n}):null},kx=function(t){var r=t.prefixCls,n=t.className,i=t.subTitle,a=t.title,u=t.style,o=t.children,f=t.status,p=f===void 0?"info":f,v=t.icon,y=t.extra,w=C.exports.useContext(zr),k=w.getPrefixCls,T=w.direction,R=k("result",r),A=Qe(R,"".concat(R,"-").concat(p),n,se({},"".concat(R,"-rtl"),T==="rtl"));return Xe("div",{className:A,style:u,children:[S(ure,{prefixCls:R,status:p,icon:v}),S("div",{className:"".concat(R,"-title"),children:a}),i&&S("div",{className:"".concat(R,"-subtitle"),children:i}),S(cre,{prefixCls:R,extra:y}),o&&S("div",{className:"".concat(R,"-content"),children:o})]})};kx.PRESENTED_IMAGE_403=Pv[403];kx.PRESENTED_IMAGE_404=Pv[404];kx.PRESENTED_IMAGE_500=Pv[500];const dre=kx;var yd=C.exports.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0});function V4(e,t,r){return(e-t)/(r-t)}function BS(e,t,r,n){var i=V4(t,r,n),a={};switch(e){case"rtl":a.right="".concat(i*100,"%"),a.transform="translateX(50%)";break;case"btt":a.bottom="".concat(i*100,"%"),a.transform="translateY(50%)";break;case"ttb":a.top="".concat(i*100,"%"),a.transform="translateY(-50%)";break;default:a.left="".concat(i*100,"%"),a.transform="translateX(-50%)";break}return a}function kf(e,t){return Array.isArray(e)?e[t]:e}var fre=["prefixCls","value","valueIndex","onStartMove","style","render","dragging","onOffsetChange"],hre=C.exports.forwardRef(function(e,t){var r,n,i=e.prefixCls,a=e.value,u=e.valueIndex,o=e.onStartMove,f=e.style,p=e.render,v=e.dragging,y=e.onOffsetChange,w=Mr(e,fre),k=C.exports.useContext(yd),T=k.min,R=k.max,A=k.direction,I=k.disabled,O=k.range,N=k.tabIndex,L=k.ariaLabelForHandle,B=k.ariaLabelledByForHandle,j=k.ariaValueTextFormatterForHandle,G="".concat(i,"-handle"),H=function(Z){I||o(Z,u)},te=function(Z){if(!I){var Q=null;switch(Z.which||Z.keyCode){case Et.LEFT:Q=A==="ltr"||A==="btt"?-1:1;break;case Et.RIGHT:Q=A==="ltr"||A==="btt"?1:-1;break;case Et.UP:Q=A!=="ttb"?1:-1;break;case Et.DOWN:Q=A!=="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(),y(Q,u))}},Y=BS(A,a,T,R),le=S("div",{ref:t,className:Qe(G,(r={},se(r,"".concat(G,"-").concat(u+1),O),se(r,"".concat(G,"-dragging"),v),r)),style:ve(ve({},Y),f),onMouseDown:H,onTouchStart:H,onKeyDown:te,tabIndex:I?null:kf(N,u),role:"slider","aria-valuemin":T,"aria-valuemax":R,"aria-valuenow":a,"aria-disabled":I,"aria-label":kf(L,u),"aria-labelledby":kf(B,u),"aria-valuetext":(n=kf(j,u))===null||n===void 0?void 0:n(a),...w});return p&&(le=p(le,{index:u,prefixCls:i,value:a,dragging:v})),le}),pre=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","draggingIndex"],mre=C.exports.forwardRef(function(e,t){var r=e.prefixCls,n=e.style,i=e.onStartMove,a=e.onOffsetChange,u=e.values,o=e.handleRender,f=e.draggingIndex,p=Mr(e,pre),v=C.exports.useRef({});return C.exports.useImperativeHandle(t,function(){return{focus:function(w){var k;(k=v.current[w])===null||k===void 0||k.focus()}}}),S(Ar,{children:u.map(function(y,w){return S(hre,{ref:function(T){T?v.current[w]=T:delete v.current[w]},dragging:f===w,prefixCls:r,style:kf(n,w),value:y,valueIndex:w,onStartMove:i,onOffsetChange:a,render:o,...p},w)})})});function QP(e){var t="touches"in e?e.touches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function vre(e,t,r,n,i,a,u,o,f){var p=C.exports.useState(null),v=Le(p,2),y=v[0],w=v[1],k=C.exports.useState(-1),T=Le(k,2),R=T[0],A=T[1],I=C.exports.useState(r),O=Le(I,2),N=O[0],L=O[1],B=C.exports.useState(r),j=Le(B,2),G=j[0],H=j[1],te=C.exports.useRef(null),Y=C.exports.useRef(null);C.exports.useEffect(function(){R===-1&&L(r)},[r,R]),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),L(de),u(de))},J=function(de,oe){if(de===-1){var ye=G[0],Re=G[G.length-1],Te=n-ye,ke=i-Re,ze=oe*(i-n);ze=Math.max(ze,Te),ze=Math.min(ze,ke);var Ie=a(ye+ze);ze=Ie-ye;var Ne=G.map(function(je){return je+ze});le(Ne)}else{var De=(i-n)*oe,Ve=wt(N);Ve[de]=G[de];var Ge=f(Ve,De,de,"dist");le(Ge.values,Ge.value)}},Z=C.exports.useRef(J);Z.current=J;var Q=function(de,oe){de.stopPropagation();var ye=r[oe];A(oe),w(ye),H(r);var Re=QP(de),Te=Re.pageX,ke=Re.pageY,ze=function(De){De.preventDefault();var Ve=QP(De),Ge=Ve.pageX,je=Ve.pageY,ct=Ge-Te,pt=je-ke,Tt=e.current.getBoundingClientRect(),Ye=Tt.width,Pt=Tt.height,mt;switch(t){case"btt":mt=-pt/Pt;break;case"ttb":mt=pt/Pt;break;case"rtl":mt=-ct/Ye;break;default:mt=ct/Ye}Z.current(oe,mt)},Ie=function Ne(De){De.preventDefault(),document.removeEventListener("mouseup",Ne),document.removeEventListener("mousemove",ze),document.removeEventListener("touchend",Ne),document.removeEventListener("touchmove",ze),te.current=null,Y.current=null,A(-1),o()};document.addEventListener("mouseup",Ie),document.addEventListener("mousemove",ze),document.addEventListener("touchend",Ie),document.addEventListener("touchmove",ze),te.current=ze,Y.current=Ie},ge=C.exports.useMemo(function(){var ne=wt(r).sort(function(oe,ye){return oe-ye}),de=wt(N).sort(function(oe,ye){return oe-ye});return ne.every(function(oe,ye){return oe===de[ye]})?N:r},[r,N]);return[R,y,ge,Q]}function gre(e){var t=e.prefixCls,r=e.style,n=e.start,i=e.end,a=e.index,u=e.onStartMove,o=C.exports.useContext(yd),f=o.direction,p=o.min,v=o.max,y=o.disabled,w=o.range,k="".concat(t,"-track"),T=V4(n,p,v),R=V4(i,p,v),A=function(N){!y&&u&&u(N,-1)},I={};switch(f){case"rtl":I.right="".concat(T*100,"%"),I.width="".concat(R*100-T*100,"%");break;case"btt":I.bottom="".concat(T*100,"%"),I.height="".concat(R*100-T*100,"%");break;case"ttb":I.top="".concat(T*100,"%"),I.height="".concat(R*100-T*100,"%");break;default:I.left="".concat(T*100,"%"),I.width="".concat(R*100-T*100,"%")}return S("div",{className:Qe(k,w&&"".concat(k,"-").concat(a+1)),style:ve(ve({},I),r),onMouseDown:A,onTouchStart:A})}function yre(e){var t=e.prefixCls,r=e.style,n=e.values,i=e.startPoint,a=e.onStartMove,u=C.exports.useContext(yd),o=u.included,f=u.range,p=u.min,v=C.exports.useMemo(function(){if(!f){if(n.length===0)return[];var y=i!=null?i:p,w=n[0];return[{start:Math.min(y,w),end:Math.max(y,w)}]}for(var k=[],T=0;T<n.length-1;T+=1)k.push({start:n[T],end:n[T+1]});return k},[n,f,i,p]);return o?v.map(function(y,w){var k=y.start,T=y.end;return S(gre,{index:w,prefixCls:t,style:kf(r,w),start:k,end:T,onStartMove:a},w)}):null}function xre(e){var t=e.prefixCls,r=e.style,n=e.children,i=e.value,a=e.onClick,u=C.exports.useContext(yd),o=u.min,f=u.max,p=u.direction,v=u.includedStart,y=u.includedEnd,w=u.included,k="".concat(t,"-text"),T=BS(p,i,o,f);return S("span",{className:Qe(k,se({},"".concat(k,"-active"),w&&v<=i&&i<=y)),style:ve(ve({},T),r),onMouseDown:function(A){A.stopPropagation()},onClick:function(){a(i)},children:n})}function _re(e){var t=e.prefixCls,r=e.marks,n=e.onClick,i="".concat(t,"-mark");return r.length?S("div",{className:i,children:r.map(function(a){var u=a.value,o=a.style,f=a.label;return S(xre,{prefixCls:i,style:o,value:u,onClick:n,children:f},u)})}):null}function bre(e){var t=e.prefixCls,r=e.value,n=e.style,i=e.activeStyle,a=C.exports.useContext(yd),u=a.min,o=a.max,f=a.direction,p=a.included,v=a.includedStart,y=a.includedEnd,w="".concat(t,"-dot"),k=p&&v<=r&&r<=y,T=ve(ve({},BS(f,r,u,o)),typeof n=="function"?n(r):n);return k&&(T=ve(ve({},T),typeof i=="function"?i(r):i)),S("span",{className:Qe(w,se({},"".concat(w,"-active"),k)),style:T})}function wre(e){var t=e.prefixCls,r=e.marks,n=e.dots,i=e.style,a=e.activeStyle,u=C.exports.useContext(yd),o=u.min,f=u.max,p=u.step,v=C.exports.useMemo(function(){var y=new Set;if(r.forEach(function(k){y.add(k.value)}),n&&p!==null)for(var w=o;w<=f;)y.add(w),w+=p;return Array.from(y)},[o,f,p,n,r]);return S("div",{className:"".concat(t,"-step"),children:v.map(function(y){return S(bre,{prefixCls:t,value:y,style:i,activeStyle:a},y)})})}function Cre(e,t,r,n,i,a){var u=C.exports.useCallback(function(k){var T=isFinite(k)?k:e;return T=Math.min(t,k),T=Math.max(e,T),T},[e,t]),o=C.exports.useCallback(function(k){if(r!==null){var T=e+Math.round((u(k)-e)/r)*r,R=function(N){return(String(N).split(".")[1]||"").length},A=Math.max(R(r),R(t),R(e)),I=Number(T.toFixed(A));return e<=I&&I<=t?I:null}return null},[r,e,t,u]),f=C.exports.useCallback(function(k){var T=u(k),R=n.map(function(O){return O.value});r!==null&&R.push(o(k)),R.push(e,t);var A=R[0],I=t-e;return R.forEach(function(O){var N=Math.abs(T-O);N<=I&&(A=O,I=N)}),A},[e,t,n,r,u,o]),p=function k(T,R,A){var I=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof R=="number"){var O,N=T[A],L=N+R,B=[];n.forEach(function(Y){B.push(Y.value)}),B.push(e,t),B.push(o(N));var j=R>0?1:-1;I==="unit"?B.push(o(N+j*r)):B.push(o(L)),B=B.filter(function(Y){return Y!==null}).filter(function(Y){return R<0?Y<=N:Y>=N}),I==="unit"&&(B=B.filter(function(Y){return Y!==N}));var G=I==="unit"?N:L;O=B[0];var H=Math.abs(O-G);if(B.forEach(function(Y){var le=Math.abs(Y-G);le<H&&(O=Y,H=le)}),O===void 0)return R<0?e:t;if(I==="dist")return O;if(Math.abs(R)>1){var te=wt(T);return te[A]=O,k(te,R-j,A,I)}return O}else{if(R==="min")return e;if(R==="max")return t}},v=function(T,R,A){var I=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",O=T[A],N=p(T,R,A,I);return{value:N,changed:N!==O}},y=function(T){return a===null&&T===0||typeof a=="number"&&T<a},w=function(T,R,A){var I=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",O=T.map(f),N=O[A],L=p(O,R,A,I);if(O[A]=L,i===!1){var B=a||0;A>0&&O[A-1]!==N&&(O[A]=Math.max(O[A],O[A-1]+B)),A<O.length-1&&O[A+1]!==N&&(O[A]=Math.min(O[A],O[A+1]-B))}else if(typeof a=="number"||a===null){for(var j=A+1;j<O.length;j+=1)for(var G=!0;y(O[j]-O[j-1])&&G;){var H=v(O,1,j);O[j]=H.value,G=H.changed}for(var te=A;te>0;te-=1)for(var Y=!0;y(O[te]-O[te-1])&&Y;){var le=v(O,-1,te-1);O[te-1]=le.value,Y=le.changed}for(var J=O.length-1;J>0;J-=1)for(var Z=!0;y(O[J]-O[J-1])&&Z;){var Q=v(O,-1,J-1);O[J-1]=Q.value,Z=Q.changed}for(var ge=0;ge<O.length-1;ge+=1)for(var ne=!0;y(O[ge+1]-O[ge])&&ne;){var de=v(O,1,ge+1);O[ge+1]=de.value,ne=de.changed}}return{value:O[A],values:O}};return[f,w]}var Sre=C.exports.forwardRef(function(e,t){var r,n=e.prefixCls,i=n===void 0?"rc-slider":n,a=e.className,u=e.style,o=e.disabled,f=o===void 0?!1:o,p=e.autoFocus,v=e.onFocus,y=e.onBlur,w=e.min,k=w===void 0?0:w,T=e.max,R=T===void 0?100:T,A=e.step,I=A===void 0?1:A,O=e.value,N=e.defaultValue,L=e.range,B=e.count,j=e.onChange,G=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,ne=e.included,de=ne===void 0?!0:ne,oe=e.startPoint,ye=e.trackStyle,Re=e.handleStyle,Te=e.railStyle,ke=e.dotStyle,ze=e.activeDotStyle,Ie=e.marks,Ne=e.dots,De=e.handleRender,Ve=e.tabIndex,Ge=Ve===void 0?0:Ve,je=e.ariaLabelForHandle,ct=e.ariaLabelledByForHandle,pt=e.ariaValueTextFormatterForHandle,Tt=C.exports.useRef(),Ye=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(k)?k:0},[k]),It=C.exports.useMemo(function(){return isFinite(R)?R:100},[R]),Ct=C.exports.useMemo(function(){return I!==null&&I<=0?1:I},[I]),Dt=C.exports.useMemo(function(){return J===!0?Ct:J>=0?J:!1},[J,Ct]),lt=C.exports.useMemo(function(){var me=Object.keys(Ie||{});return me.map(function(K){var q=Ie[K],ce={value:Number(K)};return q&&ar(q)==="object"&&!C.exports.isValidElement(q)&&("label"in q||"style"in q)?(ce.style=q.style,ce.label=q.label):ce.label=q,ce}).filter(function(K){var q=K.label;return q||typeof q=="number"}).sort(function(K,q){return K.value-q.value})},[Ie]),dt=Cre(mt,It,Ct,lt,Y,Dt),ut=Le(dt,2),it=ut[0],ft=ut[1],xt=Yi(N,{value:O}),Wt=Le(xt,2),jt=Wt[0],Qt=Wt[1],Fe=C.exports.useMemo(function(){var me=jt==null?[]:Array.isArray(jt)?jt:[jt],K=Le(me,1),q=K[0],ce=q===void 0?mt:q,ae=jt===null?[]:[ce];if(L){if(ae=wt(me),B||jt===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},[jt,L,mt,B,it]),qe=C.exports.useRef(Fe);qe.current=Fe;var Xt=function(K){return L?K:K[0]},cr=function(K){var q=wt(K).sort(function(ce,ae){return ce-ae});j&&!ld(q,qe.current)&&j(Xt(q)),Qt(q)},Vt=function(K){if(!f){var q=0,ce=It-mt;Fe.forEach(function(xe,Ee){var be=Math.abs(K-xe);be<=ce&&(ce=be,q=Ee)});var ae=wt(Fe);ae[q]=K,L&&!Fe.length&&B===void 0&&ae.push(K),G==null||G(Xt(ae)),cr(ae),H==null||H(Xt(ae))}},Ut=function(K){K.preventDefault();var q=Ye.current.getBoundingClientRect(),ce=q.width,ae=q.height,xe=q.left,Ee=q.top,be=q.bottom,Ce=q.right,Ae=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-Ae)/ce;break;default:We=(Ae-xe)/ce}var Be=mt+We*(It-mt);Vt(it(Be))},rr=C.exports.useState(null),xr=Le(rr,2),Or=xr[0],_t=xr[1],qt=function(K,q){if(!f){var ce=ft(Fe,K,q);G==null||G(Xt(Fe)),cr(ce.values),H==null||H(Xt(ce.values)),_t(ce.value)}};C.exports.useEffect(function(){if(Or!==null){var me=Fe.indexOf(Or);me>=0&&Tt.current.focus(me)}_t(null)},[Or]);var or=C.exports.useMemo(function(){return Z&&Ct===null?!1:Z},[Z,Ct]),$r=function(){H==null||H(Xt(qe.current))},kr=vre(Ye,Pt,Fe,mt,It,it,cr,$r,ft),Lt=Le(kr,4),Tr=Lt[0],Cr=Lt[1],fr=Lt[2],Nt=Lt[3],ot=function(K,q){Nt(K,q),G==null||G(Xt(qe.current))},ht=Tr!==-1;C.exports.useEffect(function(){if(!ht){var me=Fe.lastIndexOf(Cr);Tt.current.focus(me)}},[ht]);var Ot=C.exports.useMemo(function(){return wt(fr).sort(function(me,K){return me-K})},[fr]),$t=C.exports.useMemo(function(){return L?[Ot[0],Ot[Ot.length-1]]:[mt,Ot[0]]},[Ot,L,mt]),ur=Le($t,2),Ir=ur[0],qr=ur[1];C.exports.useImperativeHandle(t,function(){return{focus:function(){Tt.current.focus(0)},blur:function(){var K=document,q=K.activeElement;Ye.current.contains(q)&&(q==null||q.blur())}}}),C.exports.useEffect(function(){p&&Tt.current.focus(0)},[]);var Gr=C.exports.useMemo(function(){return{min:mt,max:It,direction:Pt,disabled:f,step:Ct,included:de,includedStart:Ir,includedEnd:qr,range:L,tabIndex:Ge,ariaLabelForHandle:je,ariaLabelledByForHandle:ct,ariaValueTextFormatterForHandle:pt}},[mt,It,Pt,f,Ct,de,Ir,qr,L,Ge,je,ct,pt]);return S(yd.Provider,{value:Gr,children:Xe("div",{ref:Ye,className:Qe(i,a,(r={},se(r,"".concat(i,"-disabled"),f),se(r,"".concat(i,"-vertical"),ge),se(r,"".concat(i,"-horizontal"),!ge),se(r,"".concat(i,"-with-marks"),lt.length),r)),style:u,onMouseDown:Ut,children:[S("div",{className:"".concat(i,"-rail"),style:Te}),S(yre,{prefixCls:i,style:ye,values:Ot,startPoint:oe,onStartMove:or?ot:null}),S(wre,{prefixCls:i,marks:lt,dots:Ne,style:ke,activeStyle:ze}),S(mre,{ref:Tt,prefixCls:i,style:Re,values:fr,draggingIndex:Tr,onStartMove:ot,onOffsetChange:qt,onFocus:v,onBlur:y,handleRender:De}),S(_re,{prefixCls:i,marks:lt,onClick:Vt})]})})}),Ere=C.exports.forwardRef(function(e,t){var r=e.open,n=C.exports.useRef(null),i=C.exports.useRef(null);function a(){rn.cancel(i.current),i.current=null}function u(){i.current=rn(function(){var o;(o=n.current)===null||o===void 0||o.forcePopupAlign(),i.current=null})}return C.exports.useEffect(function(){return r?u():a(),a},[r,e.title]),S(yo,{ref:ta(n,t),...e})});const kre=Ere;var Tre=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},Pre=C.exports.forwardRef(function(e,t){var r=C.exports.useContext(zr),n=r.getPrefixCls,i=r.direction,a=r.getPopupContainer,u=C.exports.useState({}),o=Le(u,2),f=o[0],p=o[1],v=function(H,te){p(function(Y){return tt(tt({},Y),se({},H,te))})},y=function(H,te){return H||(te?i==="rtl"?"left":"right":"top")},w=e.prefixCls,k=e.range,T=e.className,R=Tre(e,["prefixCls","range","className"]),A=n("slider",w),I=Qe(T,se({},"".concat(A,"-rtl"),i==="rtl"));i==="rtl"&&!R.vertical&&(R.reverse=!R.reverse);var O=C.exports.useMemo(function(){return k?ar(k)==="object"?[!0,k.draggableTrack]:[!0,!1]:[!1]},[k]),N=Le(O,2),L=N[0],B=N[1],j=function(H,te){var Y,le=te.index,J=te.dragging,Z=n(),Q=e.tooltip,ge=Q===void 0?{}:Q,ne=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,ze=ke?f[le]||J:!1,Ie=oe||oe===void 0&&ze,Ne=tt(tt({},H.props),{onMouseEnter:function(){return v(le,!0)},onMouseLeave:function(){return v(le,!1)}}),De=n("tooltip",Te);return S(kre,{prefixCls:De,title:ke?ke(te.value):"",open:Ie,placement:y(ye,ne),transitionName:"".concat(Z,"-zoom-down"),overlayClassName:"".concat(A,"-tooltip"),getPopupContainer:Re||a,children:C.exports.cloneElement(H,Ne)},le)};return S(Sre,{...R,step:R.step,range:L,draggableTrack:B,className:I,ref:t,prefixCls:A,handleRender:j})});const Mre=Pre;function Ire(e){return null}function Rre(e){return null}var Ore="RC_TABLE_KEY";function Q9(e){return e==null?[]:Array.isArray(e)?e:[e]}function J9(e,t){if(!t&&typeof t!="number")return e;for(var r=Q9(t),n=e,i=0;i<r.length;i+=1){if(!n)return null;var a=r[i];n=n[a]}return n}function Tx(e){var t=[],r={};return e.forEach(function(n){for(var i=n||{},a=i.key,u=i.dataIndex,o=a||Q9(u).join("-")||Ore;r[o];)o="".concat(o,"_next");r[o]=!0,t.push(o)}),t}function j4(e){return e!=null}var ez=C.exports.createContext(!1);function Are(){var e=C.exports.createContext(null),t=function(n){var i=n.value,a=n.children,u=C.exports.useRef(i);u.current=i;var o=C.exports.useState(function(){return{getValue:function(){return u.current},listeners:new Set}}),f=Le(o,1),p=f[0];return mi(function(){p.listeners.forEach(function(v){v(i)})},[i]),S(e.Provider,{value:p,children:a})};return{Context:e,Provider:t}}function Nre(e,t){var r=Wm(t),n=C.exports.useContext(e==null?void 0:e.Context),i=n||{},a=i.listeners,u=i.getValue,o=C.exports.useState(function(){return r(n?u():null)}),f=Le(o,2),p=f[0],v=f[1];return mi(function(){if(!n)return;function y(w){v(function(k){var T=r(w);return ld(k,T)?k:T})}return a.add(y),function(){a.delete(y)}},[n]),p}var tz=Are(),Px=C.exports.createContext(null),rz=C.exports.createContext({renderWithProps:!1}),zre=["colSpan","rowSpan","style","className"];function Dre(e,t,r,n){var i=e+t-1;return e<=n&&i>=r}function Lre(e){return e&&ar(e)==="object"&&!Array.isArray(e)&&!C.exports.isValidElement(e)}function Fre(e){return typeof e=="string"?!0:md(e)}var $re=function(t){var r=t.ellipsis,n=t.rowType,i=t.children,a,u=r===!0?{showTitle:!0}:r;return u&&(u.showTitle||n==="header")&&(typeof i=="string"||typeof i=="number"?a=i.toString():C.exports.isValidElement(i)&&typeof i.props.children=="string"&&(a=i.props.children)),a};function Bre(e,t){var r,n,i,a=e.prefixCls,u=e.className,o=e.record,f=e.index,p=e.renderIndex,v=e.dataIndex,y=e.render,w=e.children,k=e.component,T=k===void 0?"td":k,R=e.colSpan,A=e.rowSpan,I=e.fixLeft,O=e.fixRight,N=e.firstFixLeft,L=e.lastFixLeft,B=e.firstFixRight,j=e.lastFixRight,G=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,ne="".concat(a,"-cell"),de=C.exports.useContext(rz),oe=C.exports.useContext(ez),ye=C.exports.useContext(Px),Re=ye.allColumnsFixedLeft,Te=C.exports.useMemo(function(){if(j4(w))return[w];var it=J9(o,v),ft=it,xt=void 0;if(y){var Wt=y(it,o,p);Lre(Wt)?(ft=Wt.children,xt=Wt.props,de.renderWithProps=!0):ft=Wt}return[ft,xt]},[de.renderWithProps?Math.random():0,w,v,de,o,y,p]),ke=Le(Te,2),ze=ke[0],Ie=ke[1],Ne=ze;ar(Ne)==="object"&&!Array.isArray(Ne)&&!C.exports.isValidElement(Ne)&&(Ne=null),Y&&(L||B)&&(Ne=S("span",{className:"".concat(ne,"-content"),children:Ne}));var De=Ie||{},Ve=De.colSpan,Ge=De.rowSpan,je=De.style,ct=De.className,pt=Mr(De,zre),Tt=(r=Ve!==void 0?Ve:R)!==null&&r!==void 0?r:1,Ye=(n=Ge!==void 0?Ge:A)!==null&&n!==void 0?n:1;if(Tt===0||Ye===0)return null;var Pt={},mt=typeof I=="number"&&oe,It=typeof O=="number"&&oe;mt&&(Pt.position="sticky",Pt.left=I),It&&(Pt.position="sticky",Pt.right=O);var Ct={};le&&(Ct.textAlign=le);var Dt=function(ft){var xt;o&&ge(f,f+Ye-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=$re({rowType:J,ellipsis:Y,children:ze}),ut=ve(ve(ve({title:dt},pt),te),{},{colSpan:Tt!==1?Tt:null,rowSpan:Ye!==1?Ye:null,className:Qe(ne,u,(i={},se(i,"".concat(ne,"-fix-left"),mt&&oe),se(i,"".concat(ne,"-fix-left-first"),N&&oe),se(i,"".concat(ne,"-fix-left-last"),L&&oe),se(i,"".concat(ne,"-fix-left-all"),L&&Re&&oe),se(i,"".concat(ne,"-fix-right"),It&&oe),se(i,"".concat(ne,"-fix-right-first"),B&&oe),se(i,"".concat(ne,"-fix-right-last"),j&&oe),se(i,"".concat(ne,"-ellipsis"),Y),se(i,"".concat(ne,"-with-append"),G),se(i,"".concat(ne,"-fix-sticky"),(mt||It)&&Z&&oe),se(i,"".concat(ne,"-row-hover"),!Ie&&Q),i),te.className,ct),style:ve(ve(ve(ve({},te.style),Ct),Pt),je),onMouseEnter:Dt,onMouseLeave:lt,ref:Fre(T)?t:null});return Xe(T,{...ut,children:[G,Ne]})}var nz=C.exports.forwardRef(Bre);nz.displayName="Cell";var Vre=["expanded","className","hovering"],jre=C.exports.memo(nz,function(e,t){return t.shouldCellUpdate?Vre.every(function(r){return e[r]===t[r]})&&!t.shouldCellUpdate(t.record,e.record):ld(e,t)}),Mv=C.exports.forwardRef(function(e,t){var r=e.index,n=e.additionalProps,i=n===void 0?{}:n,a=e.colSpan,u=e.rowSpan,o=i.colSpan,f=i.rowSpan,p=a!=null?a:o,v=u!=null?u:f,y=Nre(tz,function(T){var R=Dre(r,v||1,T==null?void 0:T.startRow,T==null?void 0:T.endRow);return{onHover:T==null?void 0:T.onHover,hovering:R}}),w=y.onHover,k=y.hovering;return S(jre,{...e,colSpan:p,rowSpan:v,hovering:k,ref:t,onHover:w})});Mv.displayName="WrappedCell";var Ys=C.exports.createContext(null);function VS(e,t,r,n,i){var a=r[e]||{},u=r[t]||{},o,f;a.fixed==="left"?o=n.left[e]:u.fixed==="right"&&(f=n.right[t]);var p=!1,v=!1,y=!1,w=!1,k=r[t+1],T=r[e-1];if(i==="rtl"){if(o!==void 0){var R=T&&T.fixed==="left";w=!R}else if(f!==void 0){var A=k&&k.fixed==="right";y=!A}}else if(o!==void 0){var I=k&&k.fixed==="left";p=!I}else if(f!==void 0){var O=T&&T.fixed==="right";v=!O}return{fixLeft:o,fixRight:f,lastFixLeft:p,firstFixRight:v,lastFixRight:y,firstFixLeft:w,isSticky:n.isSticky}}function iz(e){var t=e.cells,r=e.stickyOffsets,n=e.flattenColumns,i=e.rowComponent,a=e.cellComponent,u=e.onHeaderRow,o=e.index,f=C.exports.useContext(Ys),p=f.prefixCls,v=f.direction,y;u&&(y=u(t.map(function(k){return k.column}),o));var w=Tx(t.map(function(k){return k.column}));return S(i,{...y,children:t.map(function(k,T){var R=k.column,A=VS(k.colStart,k.colEnd,n,r,v),I;return R&&R.onHeaderCell&&(I=k.column.onHeaderCell(R)),C.exports.createElement(Mv,{...k,ellipsis:R.ellipsis,align:R.align,component:a,prefixCls:p,key:w[T],...A,additionalProps:I,rowType:"header"})})})}iz.displayName="HeaderRow";function Ure(e){var t=[];function r(u,o){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;t[f]=t[f]||[];var p=o,v=u.filter(Boolean).map(function(y){var w={key:y.key,className:y.className||"",children:y.title,column:y,colStart:p},k=1,T=y.children;return T&&T.length>0&&(k=r(T,p,f+1).reduce(function(R,A){return R+A},0),w.hasSubColumns=!0),"colSpan"in y&&(k=y.colSpan),"rowSpan"in y&&(w.rowSpan=y.rowSpan),w.colSpan=k,w.colEnd=w.colStart+k-1,t[f].push(w),p+=k,k});return v}r(e,0);for(var n=t.length,i=function(o){t[o].forEach(function(f){!("rowSpan"in f)&&!f.hasSubColumns&&(f.rowSpan=n-o)})},a=0;a<n;a+=1)i(a);return t}function JP(e){var t=e.stickyOffsets,r=e.columns,n=e.flattenColumns,i=e.onHeaderRow,a=C.exports.useContext(Ys),u=a.prefixCls,o=a.getComponent,f=C.exports.useMemo(function(){return Ure(r)},[r]),p=o(["header","wrapper"],"thead"),v=o(["header","row"],"tr"),y=o(["header","cell"],"th");return S(p,{className:"".concat(u,"-thead"),children:f.map(function(w,k){var T=S(iz,{flattenColumns:n,cells:w,stickyOffsets:t,rowComponent:v,cellComponent:y,onHeaderRow:i,index:k},k);return T})})}var oz=C.exports.createContext(null);function az(e){var t=e.prefixCls,r=e.children,n=e.component,i=e.cellComponent,a=e.className,u=e.expanded,o=e.colSpan,f=e.isEmpty,p=C.exports.useContext(Ys),v=p.scrollbarSize,y=C.exports.useContext(oz),w=y.fixHeader,k=y.fixColumn,T=y.componentWidth,R=y.horizonScroll;return C.exports.useMemo(function(){var A=r;return(f?R:k)&&(A=S("div",{style:{width:T-(w?v:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed"),children:T!==0&&A})),S(n,{className:a,style:{display:u?null:"none"},children:S(Mv,{component:i,prefixCls:t,colSpan:o,children:A})})},[r,n,a,u,o,f,v,T,k,w,R])}var sz=C.exports.createContext(null);function lz(e){var t=e.className,r=e.style,n=e.record,i=e.index,a=e.renderIndex,u=e.rowKey,o=e.rowExpandable,f=e.expandedKeys,p=e.onRow,v=e.indent,y=v===void 0?0:v,w=e.rowComponent,k=e.cellComponent,T=e.childrenColumnName,R=C.exports.useContext(Ys),A=R.prefixCls,I=R.fixedInfoList,O=C.exports.useContext(Px),N=O.flattenColumns,L=O.expandableType,B=O.expandRowByClick,j=O.onTriggerExpand,G=O.rowClassName,H=O.expandedRowClassName,te=O.indentSize,Y=O.expandIcon,le=O.expandedRowRender,J=O.expandIconColumnIndex,Z=C.exports.useState(!1),Q=Le(Z,2),ge=Q[0],ne=Q[1],de=f&&f.has(e.recordKey);C.exports.useEffect(function(){de&&ne(!0)},[de]);var oe=L==="row"&&(!o||o(n)),ye=L==="nest",Re=T&&n&&n[T],Te=oe||ye,ke=C.exports.useRef(j);ke.current=j;var ze=function(){ke.current.apply(ke,arguments)},Ie=p==null?void 0:p(n,i),Ne=function(Ye){var Pt;B&&Te&&ze(n,Ye);for(var mt=arguments.length,It=new Array(mt>1?mt-1:0),Ct=1;Ct<mt;Ct++)It[Ct-1]=arguments[Ct];Ie==null||(Pt=Ie.onClick)===null||Pt===void 0||Pt.call.apply(Pt,[Ie,Ye].concat(It))},De;typeof G=="string"?De=G:typeof G=="function"&&(De=G(n,i,y));var Ve=Tx(N),Ge=S(w,{...Ie,"data-row-key":u,className:Qe(t,"".concat(A,"-row"),"".concat(A,"-row-level-").concat(y),De,Ie&&Ie.className),style:ve(ve({},r),Ie?Ie.style:null),onClick:Ne,children:N.map(function(Tt,Ye){var Pt=Tt.render,mt=Tt.dataIndex,It=Tt.className,Ct=Ve[Ye],Dt=I[Ye],lt;Ye===(J||0)&&ye&&(lt=Xe(Ar,{children:[S("span",{style:{paddingLeft:"".concat(te*y,"px")},className:"".concat(A,"-row-indent indent-level-").concat(y)}),Y({prefixCls:A,expanded:de,expandable:Re,record:n,onExpand:ze})]}));var dt;return Tt.onCell&&(dt=Tt.onCell(n,i)),S(Mv,{className:It,ellipsis:Tt.ellipsis,align:Tt.align,component:k,prefixCls:A,record:n,index:i,renderIndex:a,dataIndex:mt,render:Pt,shouldCellUpdate:Tt.shouldCellUpdate,expanded:lt&&de,...Dt,appendNode:lt,additionalProps:dt},Ct)})}),je;if(oe&&(ge||de)){var ct=le(n,i,y+1,de),pt=H&&H(n,i,y);je=S(az,{expanded:de,className:Qe("".concat(A,"-expanded-row"),"".concat(A,"-expanded-row-level-").concat(y+1),pt),prefixCls:A,component:w,cellComponent:k,colSpan:N.length,isEmpty:!1,children:ct})}return Xe(Ar,{children:[Ge,je]})}lz.displayName="BodyRow";function uz(e,t,r,n,i,a){var u=[];u.push({record:e,indent:t,index:a});var o=i(e),f=n==null?void 0:n.has(o);if(e&&Array.isArray(e[r])&&f)for(var p=0;p<e[r].length;p+=1){var v=uz(e[r][p],t+1,r,n,i,p);u.push.apply(u,wt(v))}return u}function Kre(e,t,r,n){var i=C.exports.useMemo(function(){if(r!=null&&r.size){for(var a=[],u=0;u<(e==null?void 0:e.length);u+=1){var o=e[u];a.push.apply(a,wt(uz(o,0,t,r,n,u)))}return a}return e==null?void 0:e.map(function(f,p){return{record:f,indent:0,index:p}})},[e,t,r,n]);return i}function Hre(e){var t=e.columnKey,r=e.onColumnResize,n=C.exports.useRef();return C.exports.useEffect(function(){n.current&&r(t,n.current.offsetWidth)},[]),S(Kl,{data:t,children:S("td",{ref:n,style:{padding:0,border:0,height:0},children:S("div",{style:{height:0,overflow:"hidden"},children:"\xA0"})})})}function Wre(e){var t=e.prefixCls,r=e.columnsKey,n=e.onColumnResize;return S("tr",{"aria-hidden":"true",className:"".concat(t,"-measure-row"),style:{height:0,fontSize:0},children:S(Kl.Collection,{onBatchResize:function(a){a.forEach(function(u){var o=u.data,f=u.size;n(o,f.offsetWidth)})},children:r.map(function(i){return S(Hre,{columnKey:i,onColumnResize:n},i)})})})}function qre(e){var t=e.data,r=e.getRowKey,n=e.measureColumnWidth,i=e.expandedKeys,a=e.onRow,u=e.rowExpandable,o=e.emptyNode,f=e.childrenColumnName,p=C.exports.useContext(sz),v=p.onColumnResize,y=C.exports.useContext(Ys),w=y.prefixCls,k=y.getComponent,T=C.exports.useContext(Px),R=T.flattenColumns,A=Kre(t,f,i,r),I=C.exports.useRef({renderWithProps:!1}),O=C.exports.useState(-1),N=Le(O,2),L=N[0],B=N[1],j=C.exports.useState(-1),G=Le(j,2),H=G[0],te=G[1],Y=C.exports.useCallback(function(J,Z){B(J),te(Z)},[]),le=C.exports.useMemo(function(){var J=k(["body","wrapper"],"tbody"),Z=k(["body","row"],"tr"),Q=k(["body","cell"],"td"),ge;t.length?ge=A.map(function(de,oe){var ye=de.record,Re=de.indent,Te=de.index,ke=r(ye,oe);return S(lz,{rowKey:ke,record:ye,recordKey:ke,index:oe,renderIndex:Te,rowComponent:Z,cellComponent:Q,expandedKeys:i,onRow:a,getRowKey:r,rowExpandable:u,childrenColumnName:f,indent:Re},ke)}):ge=S(az,{expanded:!0,className:"".concat(w,"-placeholder"),prefixCls:w,component:Z,cellComponent:Q,colSpan:R.length,isEmpty:!0,children:o});var ne=Tx(R);return Xe(J,{className:"".concat(w,"-tbody"),children:[n&&S(Wre,{prefixCls:w,columnsKey:ne,onColumnResize:v}),ge]})},[t,w,a,n,i,r,k,o,R,f,v,u,A]);return S(rz.Provider,{value:I.current,children:S(tz.Provider,{value:{startRow:L,endRow:H,onHover:Y},children:le})})}var cz=C.exports.memo(qre);cz.displayName="Body";var Gre=["expandable"],xm="RC_TABLE_INTERNAL_COL_DEFINE";function Zre(e){var t=e.expandable,r=Mr(e,Gre),n;return"expandable"in e?n=ve(ve({},r),t):n=r,n.showExpandColumn===!1&&(n.expandIconColumnIndex=-1),n}var Fc={},Xre=["children"],Yre=["fixed"];function jS(e){return lo(e).filter(function(t){return C.exports.isValidElement(t)}).map(function(t){var r=t.key,n=t.props,i=n.children,a=Mr(n,Xre),u=ve({key:r},a);return i&&(u.children=jS(i)),u})}function U4(e){return e.reduce(function(t,r){var n=r.fixed,i=n===!0?"left":n,a=r.children;return a&&a.length>0?[].concat(wt(t),wt(U4(a).map(function(u){return ve({fixed:i},u)}))):[].concat(wt(t),[ve(ve({},r),{},{fixed:i})])},[])}function Qre(e){return e.map(function(t){var r=t.fixed,n=Mr(t,Yre),i=r;return r==="left"?i="right":r==="right"&&(i="left"),ve({fixed:i},n)})}function Jre(e,t){var r=e.prefixCls,n=e.columns,i=e.children,a=e.expandable,u=e.expandedKeys,o=e.columnTitle,f=e.getRowKey,p=e.onTriggerExpand,v=e.expandIcon,y=e.rowExpandable,w=e.expandIconColumnIndex,k=e.direction,T=e.expandRowByClick,R=e.columnWidth,A=e.fixed,I=C.exports.useMemo(function(){return n||jS(i)},[n,i]),O=C.exports.useMemo(function(){if(a){var B,j=I.slice();if(!j.includes(Fc)){var G=w||0;G>=0&&j.splice(G,0,Fc)}var H=j.indexOf(Fc);j=j.filter(function(J,Z){return J!==Fc||Z===H});var te=I[H],Y;(A==="left"||A)&&!w?Y="left":(A==="right"||A)&&w===I.length?Y="right":Y=te?te.fixed:null;var le=(B={},se(B,xm,{className:"".concat(r,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),se(B,"title",o),se(B,"fixed",Y),se(B,"className","".concat(r,"-row-expand-icon-cell")),se(B,"width",R),se(B,"render",function(Z,Q,ge){var ne=f(Q,ge),de=u.has(ne),oe=y?y(Q):!0,ye=v({prefixCls:r,expanded:de,expandable:oe,record:Q,onExpand:p});return T?S("span",{onClick:function(Te){return Te.stopPropagation()},children:ye}):ye}),B);return j.map(function(J){return J===Fc?le:J})}return I.filter(function(J){return J!==Fc})},[a,I,f,u,v,k]),N=C.exports.useMemo(function(){var B=O;return t&&(B=t(B)),B.length||(B=[{render:function(){return null}}]),B},[t,O,k]),L=C.exports.useMemo(function(){return k==="rtl"?Qre(U4(N)):U4(N)},[N,k]);return[N,L]}function dz(e){var t=C.exports.useRef(e),r=C.exports.useState({}),n=Le(r,2),i=n[1],a=C.exports.useRef(null),u=C.exports.useRef([]);function o(f){u.current.push(f);var p=Promise.resolve();a.current=p,p.then(function(){if(a.current===p){var v=u.current,y=t.current;u.current=[],v.forEach(function(w){t.current=w(t.current)}),a.current=null,y!==t.current&&i({})}})}return C.exports.useEffect(function(){return function(){a.current=null}},[]),[t.current,o]}function ene(e){var t=C.exports.useRef(e||null),r=C.exports.useRef();function n(){window.clearTimeout(r.current)}function i(u){t.current=u,n(),r.current=window.setTimeout(function(){t.current=null,r.current=void 0},100)}function a(){return t.current}return C.exports.useEffect(function(){return n},[]),[i,a]}function tne(e,t,r){var n=C.exports.useMemo(function(){for(var i=[],a=[],u=0,o=0,f=0;f<t;f+=1)if(r==="rtl"){a[f]=o,o+=e[f]||0;var p=t-f-1;i[p]=u,u+=e[p]||0}else{i[f]=u,u+=e[f]||0;var v=t-f-1;a[v]=o,o+=e[v]||0}return{left:i,right:a}},[e,t,r]);return n}var rne=["columnType"];function fz(e){for(var t=e.colWidths,r=e.columns,n=e.columCount,i=[],a=n||r.length,u=!1,o=a-1;o>=0;o-=1){var f=t[o],p=r&&r[o],v=p&&p[xm];if(f||v||u){var y=v||{};y.columnType;var w=Mr(y,rne);i.unshift(S("col",{style:{width:f},...w},o)),u=!0}}return S("colgroup",{children:i})}function e8(e){var t=e.className,r=e.children;return S("div",{className:t,children:r})}var hz=C.exports.createContext({});function nne(e){var t=e.className,r=e.index,n=e.children,i=e.colSpan,a=i===void 0?1:i,u=e.rowSpan,o=e.align,f=C.exports.useContext(Ys),p=f.prefixCls,v=f.direction,y=C.exports.useContext(hz),w=y.scrollColumnIndex,k=y.stickyOffsets,T=y.flattenColumns,R=r+a-1,A=R+1===w?a+1:a,I=VS(r,r+A-1,T,k,v);return S(Mv,{className:t,index:r,component:"td",prefixCls:p,record:null,dataIndex:null,align:o,colSpan:A,rowSpan:u,render:function(){return n},...I})}var ine=["children"];function one(e){var t=e.children,r=Mr(e,ine);return S("tr",{...r,children:t})}function Mx(e){var t=e.children;return t}Mx.Row=one;Mx.Cell=nne;function Iy(e){var t=e.children,r=e.stickyOffsets,n=e.flattenColumns,i=C.exports.useContext(Ys),a=i.prefixCls,u=n.length-1,o=n[u],f=C.exports.useMemo(function(){return{stickyOffsets:r,flattenColumns:n,scrollColumnIndex:o!=null&&o.scrollbar?u:null}},[o,n,u,r]);return S(hz.Provider,{value:f,children:S("tfoot",{className:"".concat(a,"-summary"),children:t})})}var pz=Mx;function ane(e){var t,r=e.prefixCls,n=e.record,i=e.onExpand,a=e.expanded,u=e.expandable,o="".concat(r,"-row-expand-icon");if(!u)return S("span",{className:Qe(o,"".concat(r,"-row-spaced"))});var f=function(v){i(n,v),v.stopPropagation()};return S("span",{className:Qe(o,(t={},se(t,"".concat(r,"-row-expanded"),a),se(t,"".concat(r,"-row-collapsed"),!a),t)),onClick:f})}function sne(e,t,r){var n=[];function i(a){(a||[]).forEach(function(u,o){n.push(t(u,o)),i(u[r])})}return i(e),n}var lne=function(t,r){var n,i,a=t.scrollBodyRef,u=t.onScroll,o=t.offsetScroll,f=t.container,p=C.exports.useContext(Ys),v=p.prefixCls,y=((n=a.current)===null||n===void 0?void 0:n.scrollWidth)||0,w=((i=a.current)===null||i===void 0?void 0:i.clientWidth)||0,k=y&&w*(w/y),T=C.exports.useRef(),R=dz({scrollLeft:0,isHiddenScrollBar:!1}),A=Le(R,2),I=A[0],O=A[1],N=C.exports.useRef({delta:0,x:0}),L=C.exports.useState(!1),B=Le(L,2),j=B[0],G=B[1],H=function(){G(!1)},te=function(Q){Q.persist(),N.current.delta=Q.pageX-I.scrollLeft,N.current.x=0,G(!0),Q.preventDefault()},Y=function(Q){var ge,ne=Q||((ge=window)===null||ge===void 0?void 0:ge.event),de=ne.buttons;if(!j||de===0){j&&G(!1);return}var oe=N.current.x+Q.pageX-N.current.x-N.current.delta;oe<=0&&(oe=0),oe+k>=w&&(oe=w-k),u({scrollLeft:oe/w*(y+2)}),N.current.x=Q.pageX},le=function(){if(!!a.current){var Q=$P(a.current).top,ge=Q+a.current.offsetHeight,ne=f===window?document.documentElement.scrollTop+window.innerHeight:$P(f).top+f.clientHeight;ge-d1()<=ne||Q>=ne-o?O(function(de){return ve(ve({},de),{},{isHiddenScrollBar:!0})}):O(function(de){return ve(ve({},de),{},{isHiddenScrollBar:!1})})}},J=function(Q){O(function(ge){return ve(ve({},ge),{},{scrollLeft:Q/y*w||0})})};return C.exports.useImperativeHandle(r,function(){return{setScrollLeft:J}}),C.exports.useEffect(function(){var Z=Tl(document.body,"mouseup",H,!1),Q=Tl(document.body,"mousemove",Y,!1);return le(),function(){Z.remove(),Q.remove()}},[k,j]),C.exports.useEffect(function(){var Z=Tl(f,"scroll",le,!1),Q=Tl(window,"resize",le,!1);return function(){Z.remove(),Q.remove()}},[f]),C.exports.useEffect(function(){I.isHiddenScrollBar||O(function(Z){var Q=a.current;return Q?ve(ve({},Z),{},{scrollLeft:Q.scrollLeft/Q.scrollWidth*Q.clientWidth}):Z})},[I.isHiddenScrollBar]),y<=w||!k||I.isHiddenScrollBar?null:S("div",{style:{height:d1(),width:w,bottom:o},className:"".concat(v,"-sticky-scroll"),children:S("div",{onMouseDown:te,ref:T,className:Qe("".concat(v,"-sticky-scroll-bar"),se({},"".concat(v,"-sticky-scroll-bar-active"),j)),style:{width:"".concat(k,"px"),transform:"translate3d(".concat(I.scrollLeft,"px, 0, 0)")}})})};const une=C.exports.forwardRef(lne);var t8=Lo()?window:null;function cne(e,t){var r=ar(e)==="object"?e:{},n=r.offsetHeader,i=n===void 0?0:n,a=r.offsetSummary,u=a===void 0?0:a,o=r.offsetScroll,f=o===void 0?0:o,p=r.getContainer,v=p===void 0?function(){return t8}:p,y=v()||t8;return C.exports.useMemo(function(){var w=!!e;return{isSticky:w,stickyClassName:w?"".concat(t,"-sticky-holder"):"",offsetHeader:i,offsetSummary:u,offsetScroll:f,container:y}},[f,i,u,t,y])}var dne=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function fne(e,t){return C.exports.useMemo(function(){for(var r=[],n=0;n<t;n+=1){var i=e[n];if(i!==void 0)r[n]=i;else return null}return r},[e.join("_"),t])}var K4=C.exports.forwardRef(function(e,t){var r=e.className,n=e.noData,i=e.columns,a=e.flattenColumns,u=e.colWidths,o=e.columCount,f=e.stickyOffsets,p=e.direction,v=e.fixHeader,y=e.stickyTopOffset,w=e.stickyBottomOffset,k=e.stickyClassName,T=e.onScroll,R=e.maxContentScroll,A=e.children,I=Mr(e,dne),O=C.exports.useContext(Ys),N=O.prefixCls,L=O.scrollbarSize,B=O.isSticky,j=B&&!v?0:L,G=C.exports.useRef(null),H=C.exports.useCallback(function(ne){H0(t,ne),H0(G,ne)},[]);C.exports.useEffect(function(){var ne;function de(oe){var ye=oe.currentTarget,Re=oe.deltaX;Re&&(T({currentTarget:ye,scrollLeft:ye.scrollLeft+Re}),oe.preventDefault())}return(ne=G.current)===null||ne===void 0||ne.addEventListener("wheel",de),function(){var oe;(oe=G.current)===null||oe===void 0||oe.removeEventListener("wheel",de)}},[]);var te=C.exports.useMemo(function(){return a.every(function(ne){return ne.width>=0})},[a]),Y=a[a.length-1],le={fixed:Y?Y.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(N,"-cell-scrollbar")}}},J=C.exports.useMemo(function(){return j?[].concat(wt(i),[le]):i},[j,i]),Z=C.exports.useMemo(function(){return j?[].concat(wt(a),[le]):a},[j,a]),Q=C.exports.useMemo(function(){var ne=f.right,de=f.left;return ve(ve({},f),{},{left:p==="rtl"?[].concat(wt(de.map(function(oe){return oe+j})),[0]):de,right:p==="rtl"?ne:[].concat(wt(ne.map(function(oe){return oe+j})),[0]),isSticky:B})},[j,f,B]),ge=fne(u,o);return S("div",{style:ve({overflow:"hidden"},B?{top:y,bottom:w}:{}),ref:H,className:Qe(r,se({},k,!!k)),children:Xe("table",{style:{tableLayout:"fixed",visibility:n||ge?null:"hidden"},children:[(!n||!R||te)&&S(fz,{colWidths:ge?[].concat(wt(ge),[j]):[],columCount:o+1,columns:Z}),A(ve(ve({},I),{},{stickyOffsets:Q,columns:J,flattenColumns:Z}))]})})});K4.displayName="FixedHolder";var hne=[],pne={},u0="rc-table-internal-hook",mne=C.exports.memo(function(e){var t=e.children;return t},function(e,t){return ld(e.props,t.props)?e.pingLeft!==t.pingLeft||e.pingRight!==t.pingRight:!1});function xd(e){var t,r=e.prefixCls,n=e.className,i=e.rowClassName,a=e.style,u=e.data,o=e.rowKey,f=e.scroll,p=e.tableLayout,v=e.direction,y=e.title,w=e.footer,k=e.summary,T=e.id,R=e.showHeader,A=e.components,I=e.emptyText,O=e.onRow,N=e.onHeaderRow,L=e.internalHooks,B=e.transformColumns,j=e.internalRefs,G=e.sticky,H=u||hne,te=!!H.length,Y=C.exports.useCallback(function(Fr,Zr){return J9(A||{},Fr)||Zr},[A]),le=C.exports.useMemo(function(){return typeof o=="function"?o:function(Fr){var Zr=Fr&&Fr[o];return Zr}},[o]),J=Zre(e),Z=J.expandIcon,Q=J.expandedRowKeys,ge=J.defaultExpandedRowKeys,ne=J.defaultExpandAllRows,de=J.expandedRowRender,oe=J.columnTitle,ye=J.onExpand,Re=J.onExpandedRowsChange,Te=J.expandRowByClick,ke=J.rowExpandable,ze=J.expandIconColumnIndex,Ie=J.expandedRowClassName,Ne=J.childrenColumnName,De=J.indentSize,Ve=Z||ane,Ge=Ne||"children",je=C.exports.useMemo(function(){return de?"row":e.expandable&&L===u0&&e.expandable.__PARENT_RENDER_ICON__||H.some(function(Fr){return Fr&&ar(Fr)==="object"&&Fr[Ge]})?"nest":!1},[!!de,H]),ct=C.exports.useState(function(){return ge||(ne?sne(H,le,Ge):[])}),pt=Le(ct,2),Tt=pt[0],Ye=pt[1],Pt=C.exports.useMemo(function(){return new Set(Q||Tt||[])},[Q,Tt]),mt=C.exports.useCallback(function(Fr){var Zr=le(Fr,H.indexOf(Fr)),Nn,Di=Pt.has(Zr);Di?(Pt.delete(Zr),Nn=wt(Pt)):Nn=[].concat(wt(Pt),[Zr]),Ye(Nn),ye&&ye(!Di,Fr),Re&&Re(Nn)},[le,Pt,H,ye,Re]),It=C.exports.useState(0),Ct=Le(It,2),Dt=Ct[0],lt=Ct[1],dt=Jre(ve(ve(ve({},e),J),{},{expandable:!!de,columnTitle:oe,expandedKeys:Pt,getRowKey:le,onTriggerExpand:mt,expandIcon:Ve,expandIconColumnIndex:ze,direction:v}),L===u0?B:null),ut=Le(dt,2),it=ut[0],ft=ut[1],xt=C.exports.useMemo(function(){return{columns:it,flattenColumns:ft}},[it,ft]),Wt=C.exports.useRef(),jt=C.exports.useRef(),Qt=C.exports.useRef(),Fe=C.exports.useRef(),qe=C.exports.useRef(),Xt=C.exports.useState(!1),cr=Le(Xt,2),Vt=cr[0],Ut=cr[1],rr=C.exports.useState(!1),xr=Le(rr,2),Or=xr[0],_t=xr[1],qt=dz(new Map),or=Le(qt,2),$r=or[0],kr=or[1],Lt=Tx(ft),Tr=Lt.map(function(Fr){return $r.get(Fr)}),Cr=C.exports.useMemo(function(){return Tr},[Tr.join("_")]),fr=tne(Cr,ft.length,v),Nt=f&&j4(f.y),ot=f&&j4(f.x)||Boolean(J.fixed),ht=ot&&ft.some(function(Fr){var Zr=Fr.fixed;return Zr}),Ot=C.exports.useRef(),$t=cne(G,r),ur=$t.isSticky,Ir=$t.offsetHeader,qr=$t.offsetSummary,Gr=$t.offsetScroll,me=$t.stickyClassName,K=$t.container,q=k==null?void 0:k(H),ce=(Nt||ur)&&C.exports.isValidElement(q)&&q.type===Mx&&q.props.fixed,ae,xe,Ee;Nt&&(xe={overflowY:"scroll",maxHeight:f.y}),ot&&(ae={overflowX:"auto"},Nt||(xe={overflowY:"hidden"}),Ee={width:(f==null?void 0:f.x)===!0?"auto":f==null?void 0:f.x,minWidth:"100%"});var be=C.exports.useCallback(function(Fr,Zr){dS(Wt.current)&&kr(function(Nn){if(Nn.get(Fr)!==Zr){var Di=new Map(Nn);return Di.set(Fr,Zr),Di}return Nn})},[]),Ce=ene(null),Ae=Le(Ce,2),He=Ae[0],We=Ae[1];function Be(Fr,Zr){!Zr||(typeof Zr=="function"?Zr(Fr):Zr.scrollLeft!==Fr&&(Zr.scrollLeft=Fr))}var At=function(Zr){var Nn=Zr.currentTarget,Di=Zr.scrollLeft,Es=v==="rtl",Vo=typeof Di=="number"?Di:Nn.scrollLeft,rl=Nn||pne;if(!We()||We()===rl){var Ja;He(rl),Be(Vo,jt.current),Be(Vo,Qt.current),Be(Vo,qe.current),Be(Vo,(Ja=Ot.current)===null||Ja===void 0?void 0:Ja.setScrollLeft)}if(Nn){var xn=Nn.scrollWidth,es=Nn.clientWidth;if(xn===es){Ut(!1),_t(!1);return}Es?(Ut(-Vo<xn-es),_t(-Vo>0)):(Ut(Vo>0),_t(Vo<xn-es))}},bt=function(){ot&&Qt.current?At({currentTarget:Qt.current}):(Ut(!1),_t(!1))},Je=function(Zr){var Nn=Zr.width;Nn!==Dt&&(bt(),lt(Wt.current?Wt.current.offsetWidth:Nn))},Rt=C.exports.useRef(!1);C.exports.useEffect(function(){Rt.current&&bt()},[ot,u,it.length]),C.exports.useEffect(function(){Rt.current=!0},[]);var Bt=C.exports.useState(0),vr=Le(Bt,2),ir=vr[0],gr=vr[1],Br=C.exports.useState(!0),Jr=Le(Br,2),Vn=Jr[0],an=Jr[1];C.exports.useEffect(function(){Qt.current instanceof Element?gr(MP(Qt.current).width):gr(MP(Fe.current).width),an(L4("position","sticky"))},[]),C.exports.useEffect(function(){L===u0&&j&&(j.body.current=Qt.current)});var An=Y(["table"],"table"),Pr=C.exports.useMemo(function(){return p||(ht?(f==null?void 0:f.x)==="max-content"?"auto":"fixed":Nt||ur||ft.some(function(Fr){var Zr=Fr.ellipsis;return Zr})?"fixed":"auto")},[Nt,ht,ft,p,ur]),Sr,Rr={colWidths:Cr,columCount:ft.length,stickyOffsets:fr,onHeaderRow:N,fixHeader:Nt,scroll:f},ei=C.exports.useMemo(function(){return te?null:typeof I=="function"?I():I},[te,I]),yn=S(cz,{data:H,measureColumnWidth:Nt||ot||ur,expandedKeys:Pt,rowExpandable:ke,getRowKey:le,onRow:O,emptyNode:ei,childrenColumnName:Ge}),Ur=S(fz,{colWidths:ft.map(function(Fr){var Zr=Fr.width;return Zr}),columns:ft}),Lr=Y(["body"]);if(Nt||ur){var Yr;typeof Lr=="function"?(Yr=Lr(H,{scrollbarSize:ir,ref:Qt,onScroll:At}),Rr.colWidths=ft.map(function(Fr,Zr){var Nn=Fr.width,Di=Zr===it.length-1?Nn-ir:Nn;return typeof Di=="number"&&!Number.isNaN(Di)?Di:(Bn(!1,"When use `components.body` with render props. Each column should have a fixed `width` value."),0)})):Yr=S("div",{style:ve(ve({},ae),xe),onScroll:At,ref:Qt,className:Qe("".concat(r,"-body")),children:Xe(An,{style:ve(ve({},Ee),{},{tableLayout:Pr}),children:[Ur,yn,!ce&&q&&S(Iy,{stickyOffsets:fr,flattenColumns:ft,children:q})]})});var wn=ve(ve(ve({noData:!H.length,maxContentScroll:ot&&f.x==="max-content"},Rr),xt),{},{direction:v,stickyClassName:me,onScroll:At});Sr=Xe(Ar,{children:[R!==!1&&S(K4,{...wn,stickyTopOffset:Ir,className:"".concat(r,"-header"),ref:jt,children:function(Fr){return Xe(Ar,{children:[S(JP,{...Fr}),ce==="top"&&S(Iy,{...Fr,children:q})]})}}),Yr,ce&&ce!=="top"&&S(K4,{...wn,stickyBottomOffset:qr,className:"".concat(r,"-summary"),ref:qe,children:function(Fr){return S(Iy,{...Fr,children:q})}}),ur&&S(une,{ref:Ot,offsetScroll:Gr,scrollBodyRef:Qt,onScroll:At,container:K})]})}else Sr=S("div",{style:ve(ve({},ae),xe),className:Qe("".concat(r,"-content")),onScroll:At,ref:Qt,children:Xe(An,{style:ve(ve({},Ee),{},{tableLayout:Pr}),children:[Ur,R!==!1&&S(JP,{...Rr,...xt}),yn,q&&S(Iy,{stickyOffsets:fr,flattenColumns:ft,children:q})]})});var Sn=qu(e,{aria:!0,data:!0}),jn=S("div",{className:Qe(r,n,(t={},se(t,"".concat(r,"-rtl"),v==="rtl"),se(t,"".concat(r,"-ping-left"),Vt),se(t,"".concat(r,"-ping-right"),Or),se(t,"".concat(r,"-layout-fixed"),p==="fixed"),se(t,"".concat(r,"-fixed-header"),Nt),se(t,"".concat(r,"-fixed-column"),ht),se(t,"".concat(r,"-scroll-horizontal"),ot),se(t,"".concat(r,"-has-fix-left"),ft[0]&&ft[0].fixed),se(t,"".concat(r,"-has-fix-right"),ft[ft.length-1]&&ft[ft.length-1].fixed==="right"),t)),style:a,id:T,ref:Wt,...Sn,children:Xe(mne,{pingLeft:Vt,pingRight:Or,props:ve(ve({},e),{},{stickyOffsets:fr,mergedExpandedKeys:Pt}),children:[y&&S(e8,{className:"".concat(r,"-title"),children:y(H)}),S("div",{ref:Fe,className:"".concat(r,"-container"),children:Sr}),w&&S(e8,{className:"".concat(r,"-footer"),children:w(H)})]})});ot&&(jn=S(Kl,{onResize:Je,children:jn}));var bo=C.exports.useMemo(function(){return{prefixCls:r,getComponent:Y,scrollbarSize:ir,direction:v,fixedInfoList:ft.map(function(Fr,Zr){return VS(Zr,Zr,ft,fr,v)}),isSticky:ur}},[r,Y,ir,v,ft,fr,ur]),Zl=C.exports.useMemo(function(){return ve(ve({},xt),{},{tableLayout:Pr,rowClassName:i,expandedRowClassName:Ie,expandIcon:Ve,expandableType:je,expandRowByClick:Te,expandedRowRender:de,onTriggerExpand:mt,expandIconColumnIndex:ze,indentSize:De,allColumnsFixedLeft:xt.flattenColumns.every(function(Fr){return Fr.fixed==="left"})})},[xt,Pr,i,Ie,Ve,je,Te,de,mt,ze,De]),Td=C.exports.useMemo(function(){return{componentWidth:Dt,fixHeader:Nt,fixColumn:ht,horizonScroll:ot}},[Dt,Nt,ht,ot]),Qa=C.exports.useMemo(function(){return{onColumnResize:be}},[be]);return S(ez.Provider,{value:Vn,children:S(Ys.Provider,{value:bo,children:S(Px.Provider,{value:Zl,children:S(oz.Provider,{value:Td,children:S(sz.Provider,{value:Qa,children:jn})})})})})}xd.EXPAND_COLUMN=Fc;xd.Column=Rre;xd.ColumnGroup=Ire;xd.Summary=pz;xd.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};function vne(e){return null}function gne(e){return null}function yne(e){return function(r){var n,i=r.prefixCls,a=r.onExpand,u=r.record,o=r.expanded,f=r.expandable,p="".concat(i,"-row-expand-icon");return S("button",{type:"button",onClick:function(y){a(u,y),y.stopPropagation()},className:Qe(p,(n={},se(n,"".concat(p,"-spaced"),!f),se(n,"".concat(p,"-expanded"),f&&o),se(n,"".concat(p,"-collapsed"),f&&!o),n)),"aria-label":o?e.collapse:e.expand,"aria-expanded":o})}}function Zf(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 Ix(e,t){return t?"".concat(t,"-").concat(e):"".concat(e)}function Rx(e,t){return typeof e=="function"?e(t):e}function xne(e,t){var r=Rx(e,t);return Object.prototype.toString.call(r)==="[object Object]"?"":r}var _ne={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 bne=_ne;var mz=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:bne})})};mz.displayName="FilterFilled";const wne=C.exports.forwardRef(mz);function Cne(){this.__data__=[],this.size=0}var Sne=Cne;function Ene(e,t){return e===t||e!==e&&t!==t}var vz=Ene,kne=vz;function Tne(e,t){for(var r=e.length;r--;)if(kne(e[r][0],t))return r;return-1}var Ox=Tne,Pne=Ox,Mne=Array.prototype,Ine=Mne.splice;function Rne(e){var t=this.__data__,r=Pne(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Ine.call(t,r,1),--this.size,!0}var One=Rne,Ane=Ox;function Nne(e){var t=this.__data__,r=Ane(t,e);return r<0?void 0:t[r][1]}var zne=Nne,Dne=Ox;function Lne(e){return Dne(this.__data__,e)>-1}var Fne=Lne,$ne=Ox;function Bne(e,t){var r=this.__data__,n=$ne(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Vne=Bne,jne=Sne,Une=One,Kne=zne,Hne=Fne,Wne=Vne;function yh(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}yh.prototype.clear=jne;yh.prototype.delete=Une;yh.prototype.get=Kne;yh.prototype.has=Hne;yh.prototype.set=Wne;var Ax=yh,qne=Ax;function Gne(){this.__data__=new qne,this.size=0}var Zne=Gne;function Xne(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var Yne=Xne;function Qne(e){return this.__data__.get(e)}var Jne=Qne;function eie(e){return this.__data__.has(e)}var tie=eie,rie=wv,nie=Cx,iie="[object AsyncFunction]",oie="[object Function]",aie="[object GeneratorFunction]",sie="[object Proxy]";function lie(e){if(!nie(e))return!1;var t=rie(e);return t==oie||t==aie||t==iie||t==sie}var gz=lie,uie=Zs,cie=uie["__core-js_shared__"],die=cie,_2=die,r8=function(){var e=/[^.]+$/.exec(_2&&_2.keys&&_2.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function fie(e){return!!r8&&r8 in e}var hie=fie,pie=Function.prototype,mie=pie.toString;function vie(e){if(e!=null){try{return mie.call(e)}catch{}try{return e+""}catch{}}return""}var yz=vie,gie=gz,yie=hie,xie=Cx,_ie=yz,bie=/[\\^$.*+?()[\]{}|]/g,wie=/^\[object .+?Constructor\]$/,Cie=Function.prototype,Sie=Object.prototype,Eie=Cie.toString,kie=Sie.hasOwnProperty,Tie=RegExp("^"+Eie.call(kie).replace(bie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Pie(e){if(!xie(e)||yie(e))return!1;var t=gie(e)?Tie:wie;return t.test(_ie(e))}var Mie=Pie;function Iie(e,t){return e==null?void 0:e[t]}var Rie=Iie,Oie=Mie,Aie=Rie;function Nie(e,t){var r=Aie(e,t);return Oie(r)?r:void 0}var xh=Nie,zie=xh,Die=Zs,Lie=zie(Die,"Map"),US=Lie,Fie=xh,$ie=Fie(Object,"create"),Nx=$ie,n8=Nx;function Bie(){this.__data__=n8?n8(null):{},this.size=0}var Vie=Bie;function jie(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Uie=jie,Kie=Nx,Hie="__lodash_hash_undefined__",Wie=Object.prototype,qie=Wie.hasOwnProperty;function Gie(e){var t=this.__data__;if(Kie){var r=t[e];return r===Hie?void 0:r}return qie.call(t,e)?t[e]:void 0}var Zie=Gie,Xie=Nx,Yie=Object.prototype,Qie=Yie.hasOwnProperty;function Jie(e){var t=this.__data__;return Xie?t[e]!==void 0:Qie.call(t,e)}var eoe=Jie,toe=Nx,roe="__lodash_hash_undefined__";function noe(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=toe&&t===void 0?roe:t,this}var ioe=noe,ooe=Vie,aoe=Uie,soe=Zie,loe=eoe,uoe=ioe;function _h(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}_h.prototype.clear=ooe;_h.prototype.delete=aoe;_h.prototype.get=soe;_h.prototype.has=loe;_h.prototype.set=uoe;var coe=_h,i8=coe,doe=Ax,foe=US;function hoe(){this.size=0,this.__data__={hash:new i8,map:new(foe||doe),string:new i8}}var poe=hoe;function moe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var voe=moe,goe=voe;function yoe(e,t){var r=e.__data__;return goe(t)?r[typeof t=="string"?"string":"hash"]:r.map}var zx=yoe,xoe=zx;function _oe(e){var t=xoe(this,e).delete(e);return this.size-=t?1:0,t}var boe=_oe,woe=zx;function Coe(e){return woe(this,e).get(e)}var Soe=Coe,Eoe=zx;function koe(e){return Eoe(this,e).has(e)}var Toe=koe,Poe=zx;function Moe(e,t){var r=Poe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Ioe=Moe,Roe=poe,Ooe=boe,Aoe=Soe,Noe=Toe,zoe=Ioe;function bh(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}bh.prototype.clear=Roe;bh.prototype.delete=Ooe;bh.prototype.get=Aoe;bh.prototype.has=Noe;bh.prototype.set=zoe;var xz=bh,Doe=Ax,Loe=US,Foe=xz,$oe=200;function Boe(e,t){var r=this.__data__;if(r instanceof Doe){var n=r.__data__;if(!Loe||n.length<$oe-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Foe(n)}return r.set(e,t),this.size=r.size,this}var Voe=Boe,joe=Ax,Uoe=Zne,Koe=Yne,Hoe=Jne,Woe=tie,qoe=Voe;function wh(e){var t=this.__data__=new joe(e);this.size=t.size}wh.prototype.clear=Uoe;wh.prototype.delete=Koe;wh.prototype.get=Hoe;wh.prototype.has=Woe;wh.prototype.set=qoe;var Goe=wh,Zoe="__lodash_hash_undefined__";function Xoe(e){return this.__data__.set(e,Zoe),this}var Yoe=Xoe;function Qoe(e){return this.__data__.has(e)}var Joe=Qoe,eae=xz,tae=Yoe,rae=Joe;function h1(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new eae;++t<r;)this.add(e[t])}h1.prototype.add=h1.prototype.push=tae;h1.prototype.has=rae;var nae=h1;function iae(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var oae=iae;function aae(e,t){return e.has(t)}var sae=aae,lae=nae,uae=oae,cae=sae,dae=1,fae=2;function hae(e,t,r,n,i,a){var u=r&dae,o=e.length,f=t.length;if(o!=f&&!(u&&f>o))return!1;var p=a.get(e),v=a.get(t);if(p&&v)return p==t&&v==e;var y=-1,w=!0,k=r&fae?new lae:void 0;for(a.set(e,t),a.set(t,e);++y<o;){var T=e[y],R=t[y];if(n)var A=u?n(R,T,y,t,e,a):n(T,R,y,e,t,a);if(A!==void 0){if(A)continue;w=!1;break}if(k){if(!uae(t,function(I,O){if(!cae(k,O)&&(T===I||i(T,I,r,n,a)))return k.push(O)})){w=!1;break}}else if(!(T===R||i(T,R,r,n,a))){w=!1;break}}return a.delete(e),a.delete(t),w}var _z=hae,pae=Zs,mae=pae.Uint8Array,vae=mae;function gae(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var yae=gae;function xae(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var _ae=xae,o8=OS,a8=vae,bae=vz,wae=_z,Cae=yae,Sae=_ae,Eae=1,kae=2,Tae="[object Boolean]",Pae="[object Date]",Mae="[object Error]",Iae="[object Map]",Rae="[object Number]",Oae="[object RegExp]",Aae="[object Set]",Nae="[object String]",zae="[object Symbol]",Dae="[object ArrayBuffer]",Lae="[object DataView]",s8=o8?o8.prototype:void 0,b2=s8?s8.valueOf:void 0;function Fae(e,t,r,n,i,a,u){switch(r){case Lae:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Dae:return!(e.byteLength!=t.byteLength||!a(new a8(e),new a8(t)));case Tae:case Pae:case Rae:return bae(+e,+t);case Mae:return e.name==t.name&&e.message==t.message;case Oae:case Nae:return e==t+"";case Iae:var o=Cae;case Aae:var f=n&Eae;if(o||(o=Sae),e.size!=t.size&&!f)return!1;var p=u.get(e);if(p)return p==t;n|=kae,u.set(e,t);var v=wae(o(e),o(t),n,i,a,u);return u.delete(e),v;case zae:if(b2)return b2.call(e)==b2.call(t)}return!1}var $ae=Fae;function Bae(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var Vae=Bae,jae=Vae,Uae=AS;function Kae(e,t,r){var n=t(e);return Uae(e)?n:jae(n,r(e))}var Hae=Kae;function Wae(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r<n;){var u=e[r];t(u,r,e)&&(a[i++]=u)}return a}var qae=Wae;function Gae(){return[]}var Zae=Gae,Xae=qae,Yae=Zae,Qae=Object.prototype,Jae=Qae.propertyIsEnumerable,l8=Object.getOwnPropertySymbols,ese=l8?function(e){return e==null?[]:(e=Object(e),Xae(l8(e),function(t){return Jae.call(e,t)}))}:Yae,tse=ese;function rse(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var nse=rse,ise=wv,ose=Cv,ase="[object Arguments]";function sse(e){return ose(e)&&ise(e)==ase}var lse=sse,u8=lse,use=Cv,bz=Object.prototype,cse=bz.hasOwnProperty,dse=bz.propertyIsEnumerable,fse=u8(function(){return arguments}())?u8:function(e){return use(e)&&cse.call(e,"callee")&&!dse.call(e,"callee")},hse=fse,p1={exports:{}};function pse(){return!1}var mse=pse;(function(e,t){var r=Zs,n=mse,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,u=a&&a.exports===i,o=u?r.Buffer:void 0,f=o?o.isBuffer:void 0,p=f||n;e.exports=p})(p1,p1.exports);var vse=9007199254740991,gse=/^(?:0|[1-9]\d*)$/;function yse(e,t){var r=typeof e;return t=t==null?vse:t,!!t&&(r=="number"||r!="symbol"&&gse.test(e))&&e>-1&&e%1==0&&e<t}var xse=yse,_se=9007199254740991;function bse(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=_se}var wz=bse,wse=wv,Cse=wz,Sse=Cv,Ese="[object Arguments]",kse="[object Array]",Tse="[object Boolean]",Pse="[object Date]",Mse="[object Error]",Ise="[object Function]",Rse="[object Map]",Ose="[object Number]",Ase="[object Object]",Nse="[object RegExp]",zse="[object Set]",Dse="[object String]",Lse="[object WeakMap]",Fse="[object ArrayBuffer]",$se="[object DataView]",Bse="[object Float32Array]",Vse="[object Float64Array]",jse="[object Int8Array]",Use="[object Int16Array]",Kse="[object Int32Array]",Hse="[object Uint8Array]",Wse="[object Uint8ClampedArray]",qse="[object Uint16Array]",Gse="[object Uint32Array]",qn={};qn[Bse]=qn[Vse]=qn[jse]=qn[Use]=qn[Kse]=qn[Hse]=qn[Wse]=qn[qse]=qn[Gse]=!0;qn[Ese]=qn[kse]=qn[Fse]=qn[Tse]=qn[$se]=qn[Pse]=qn[Mse]=qn[Ise]=qn[Rse]=qn[Ose]=qn[Ase]=qn[Nse]=qn[zse]=qn[Dse]=qn[Lse]=!1;function Zse(e){return Sse(e)&&Cse(e.length)&&!!qn[wse(e)]}var Xse=Zse;function Yse(e){return function(t){return e(t)}}var Qse=Yse,H4={exports:{}};(function(e,t){var r=a9,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,u=a&&r.process,o=function(){try{var f=i&&i.require&&i.require("util").types;return f||u&&u.binding&&u.binding("util")}catch{}}();e.exports=o})(H4,H4.exports);var Jse=Xse,ele=Qse,c8=H4.exports,d8=c8&&c8.isTypedArray,tle=d8?ele(d8):Jse,Cz=tle,rle=nse,nle=hse,ile=AS,ole=p1.exports,ale=xse,sle=Cz,lle=Object.prototype,ule=lle.hasOwnProperty;function cle(e,t){var r=ile(e),n=!r&&nle(e),i=!r&&!n&&ole(e),a=!r&&!n&&!i&&sle(e),u=r||n||i||a,o=u?rle(e.length,String):[],f=o.length;for(var p in e)(t||ule.call(e,p))&&!(u&&(p=="length"||i&&(p=="offset"||p=="parent")||a&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||ale(p,f)))&&o.push(p);return o}var dle=cle,fle=Object.prototype;function hle(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||fle;return e===r}var ple=hle;function mle(e,t){return function(r){return e(t(r))}}var vle=mle,gle=vle,yle=gle(Object.keys,Object),xle=yle,_le=ple,ble=xle,wle=Object.prototype,Cle=wle.hasOwnProperty;function Sle(e){if(!_le(e))return ble(e);var t=[];for(var r in Object(e))Cle.call(e,r)&&r!="constructor"&&t.push(r);return t}var Ele=Sle,kle=gz,Tle=wz;function Ple(e){return e!=null&&Tle(e.length)&&!kle(e)}var Mle=Ple,Ile=dle,Rle=Ele,Ole=Mle;function Ale(e){return Ole(e)?Ile(e):Rle(e)}var Nle=Ale,zle=Hae,Dle=tse,Lle=Nle;function Fle(e){return zle(e,Lle,Dle)}var $le=Fle,f8=$le,Ble=1,Vle=Object.prototype,jle=Vle.hasOwnProperty;function Ule(e,t,r,n,i,a){var u=r&Ble,o=f8(e),f=o.length,p=f8(t),v=p.length;if(f!=v&&!u)return!1;for(var y=f;y--;){var w=o[y];if(!(u?w in t:jle.call(t,w)))return!1}var k=a.get(e),T=a.get(t);if(k&&T)return k==t&&T==e;var R=!0;a.set(e,t),a.set(t,e);for(var A=u;++y<f;){w=o[y];var I=e[w],O=t[w];if(n)var N=u?n(O,I,w,t,e,a):n(I,O,w,e,t,a);if(!(N===void 0?I===O||i(I,O,r,n,a):N)){R=!1;break}A||(A=w=="constructor")}if(R&&!A){var L=e.constructor,B=t.constructor;L!=B&&"constructor"in e&&"constructor"in t&&!(typeof L=="function"&&L instanceof L&&typeof B=="function"&&B instanceof B)&&(R=!1)}return a.delete(e),a.delete(t),R}var Kle=Ule,Hle=xh,Wle=Zs,qle=Hle(Wle,"DataView"),Gle=qle,Zle=xh,Xle=Zs,Yle=Zle(Xle,"Promise"),Qle=Yle,Jle=xh,eue=Zs,tue=Jle(eue,"Set"),rue=tue,nue=xh,iue=Zs,oue=nue(iue,"WeakMap"),aue=oue,W4=Gle,q4=US,G4=Qle,Z4=rue,X4=aue,Sz=wv,Ch=yz,h8="[object Map]",sue="[object Object]",p8="[object Promise]",m8="[object Set]",v8="[object WeakMap]",g8="[object DataView]",lue=Ch(W4),uue=Ch(q4),cue=Ch(G4),due=Ch(Z4),fue=Ch(X4),$c=Sz;(W4&&$c(new W4(new ArrayBuffer(1)))!=g8||q4&&$c(new q4)!=h8||G4&&$c(G4.resolve())!=p8||Z4&&$c(new Z4)!=m8||X4&&$c(new X4)!=v8)&&($c=function(e){var t=Sz(e),r=t==sue?e.constructor:void 0,n=r?Ch(r):"";if(n)switch(n){case lue:return g8;case uue:return h8;case cue:return p8;case due:return m8;case fue:return v8}return t});var hue=$c,w2=Goe,pue=_z,mue=$ae,vue=Kle,y8=hue,x8=AS,_8=p1.exports,gue=Cz,yue=1,b8="[object Arguments]",w8="[object Array]",Ry="[object Object]",xue=Object.prototype,C8=xue.hasOwnProperty;function _ue(e,t,r,n,i,a){var u=x8(e),o=x8(t),f=u?w8:y8(e),p=o?w8:y8(t);f=f==b8?Ry:f,p=p==b8?Ry:p;var v=f==Ry,y=p==Ry,w=f==p;if(w&&_8(e)){if(!_8(t))return!1;u=!0,v=!1}if(w&&!v)return a||(a=new w2),u||gue(e)?pue(e,t,r,n,i,a):mue(e,t,f,r,n,i,a);if(!(r&yue)){var k=v&&C8.call(e,"__wrapped__"),T=y&&C8.call(t,"__wrapped__");if(k||T){var R=k?e.value():e,A=T?t.value():t;return a||(a=new w2),i(R,A,r,n,a)}}return w?(a||(a=new w2),vue(e,t,r,n,i,a)):!1}var bue=_ue,wue=bue,S8=Cv;function Ez(e,t,r,n,i){return e===t?!0:e==null||t==null||!S8(e)&&!S8(t)?e!==e&&t!==t:wue(e,t,r,n,Ez,i)}var Cue=Ez,Sue=Cue;function Eue(e,t){return Sue(e,t)}var E8=Eue;function kz(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var kue=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Tz=function(t,r){var n=t.className,i=t.style,a=t.motion,u=t.motionNodes,o=t.motionType,f=t.onMotionStart,p=t.onMotionEnd,v=t.active,y=t.treeNodeRequiredProps,w=Mr(t,kue),k=C.exports.useState(!0),T=Le(k,2),R=T[0],A=T[1],I=C.exports.useContext(zS),O=I.prefixCls,N=C.exports.useRef(!1),L=function(){N.current||p(),N.current=!0};return C.exports.useEffect(function(){u&&o==="hide"&&R&&A(!1)},[u]),C.exports.useEffect(function(){return u&&f(),function(){u&&L()}},[]),u?S(Za,{ref:r,visible:R,...a,motionAppear:o==="show",onAppearEnd:L,onLeaveEnd:L,children:function(B,j){var G=B.className,H=B.style;return S("div",{ref:j,className:Qe("".concat(O,"-treenode-motion"),G),style:H,children:u.map(function(te){var Y=tt({},(kz(te.data),te.data)),le=te.title,J=te.key,Z=te.isStart,Q=te.isEnd;delete Y.children;var ge=gm(J,y);return C.exports.createElement(ud,{...Y,...ge,title:le,active:v,data:te.data,key:J,isStart:Z,isEnd:Q})})})}}):S(ud,{domRef:r,className:n,style:i,...w,active:v})};Tz.displayName="MotionTreeNode";var Tue=C.exports.forwardRef(Tz);function Pue(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=e.length,n=t.length;if(Math.abs(r-n)!==1)return{add:!1,key:null};function i(a,u){var o=new Map;a.forEach(function(p){o.set(p,!0)});var f=u.filter(function(p){return!o.has(p)});return f.length===1?f[0]:null}return r<n?{add:!0,key:i(e,t)}:{add:!1,key:i(t,e)}}function k8(e,t,r){var n=e.findIndex(function(o){return o.key===r}),i=e[n+1],a=t.findIndex(function(o){return o.key===r});if(i){var u=t.findIndex(function(o){return o.key===i.key});return t.slice(a+1,u)}return t.slice(a+1)}var Mue=["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"],T8={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Iue=function(){},cd="RC_TREE_MOTION_".concat(Math.random()),Y4={key:cd},Pz={key:cd,level:0,index:0,pos:"0",node:Y4,nodes:[Y4]},P8={parent:null,children:[],pos:Pz.pos,data:Y4,title:null,key:cd,isStart:[],isEnd:[]};function M8(e,t,r,n){return t===!1||!r?e:e.slice(0,Math.ceil(r/n)+1)}function I8(e){var t=e.key,r=e.pos;return Sv(t,r)}function Rue(e){for(var t=String(e.data.key),r=e;r.parent;)r=r.parent,t="".concat(r.data.key," > ").concat(t);return t}var Mz=C.exports.forwardRef(function(e,t){var r=e.prefixCls,n=e.data;e.selectable,e.checkable;var i=e.expandedKeys,a=e.selectedKeys,u=e.checkedKeys,o=e.loadedKeys,f=e.loadingKeys,p=e.halfCheckedKeys,v=e.keyEntities,y=e.disabled,w=e.dragging,k=e.dragOverNodeKey,T=e.dropPosition,R=e.motion,A=e.height,I=e.itemHeight,O=e.virtual,N=e.focusable,L=e.activeItem,B=e.focused,j=e.tabIndex,G=e.onKeyDown,H=e.onFocus,te=e.onBlur,Y=e.onActiveChange,le=e.onListChangeStart,J=e.onListChangeEnd,Z=Mr(e,Mue),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 ne=C.exports.useState(i),de=Le(ne,2),oe=de[0],ye=de[1],Re=C.exports.useState(n),Te=Le(Re,2),ke=Te[0],ze=Te[1],Ie=C.exports.useState(n),Ne=Le(Ie,2),De=Ne[0],Ve=Ne[1],Ge=C.exports.useState([]),je=Le(Ge,2),ct=je[0],pt=je[1],Tt=C.exports.useState(null),Ye=Le(Tt,2),Pt=Ye[0],mt=Ye[1],It=C.exports.useRef(n);It.current=n;function Ct(){var dt=It.current;ze(dt),Ve(dt),pt([]),mt(null),J()}C.exports.useEffect(function(){ye(i);var dt=Pue(oe,i);if(dt.key!==null)if(dt.add){var ut=ke.findIndex(function(Qt){var Fe=Qt.key;return Fe===dt.key}),it=M8(k8(ke,n,dt.key),O,A,I),ft=ke.slice();ft.splice(ut+1,0,P8),Ve(ft),pt(it),mt("show")}else{var xt=n.findIndex(function(Qt){var Fe=Qt.key;return Fe===dt.key}),Wt=M8(k8(n,ke,dt.key),O,A,I),jt=n.slice();jt.splice(xt+1,0,P8),Ve(jt),pt(Wt),mt("hide")}else ke!==n&&(ze(n),Ve(n))},[i,n]),C.exports.useEffect(function(){w||Ct()},[w]);var Dt=R?De:n,lt={expandedKeys:i,selectedKeys:a,loadedKeys:o,loadingKeys:f,checkedKeys:u,halfCheckedKeys:p,dragOverNodeKey:k,dropPosition:T,keyEntities:v};return Xe(Ar,{children:[B&&L&&S("span",{style:T8,"aria-live":"assertive",children:Rue(L)}),S("div",{children:S("input",{style:T8,disabled:N===!1||y,tabIndex:N!==!1?j:null,onKeyDown:G,onFocus:H,onBlur:te,value:"",onChange:Iue,"aria-label":"for screen reader"})}),S("div",{className:"".concat(r,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0},children:S("div",{className:"".concat(r,"-indent"),children:S("div",{ref:ge,className:"".concat(r,"-indent-unit")})})}),S(pS,{...Z,data:Dt,itemKey:I8,height:A,fullHeight:!1,virtual:O,itemHeight:I,prefixCls:"".concat(r,"-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 I8(Wt)===cd})&&Ct()},children:function(dt){var ut=dt.pos,it=tt({},(kz(dt.data),dt.data)),ft=dt.title,xt=dt.key,Wt=dt.isStart,jt=dt.isEnd,Qt=Sv(xt,ut);delete it.key,delete it.children;var Fe=gm(Qt,lt);return S(Tue,{...it,...Fe,title:ft,active:!!L&&xt===L.key,pos:ut,data:dt.data,isStart:Wt,isEnd:jt,motion:R,motionNodes:xt===cd?ct:null,motionType:Pt,onMotionStart:le,onMotionEnd:Ct,treeNodeRequiredProps:lt,onMouseMove:function(){Y(null)}})}})]})});Mz.displayName="NodeList";function Oue(e){var t=e.dropPosition,r=e.dropLevelOffset,n=e.indent,i={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(t){case-1:i.top=0,i.left=-r*n;break;case 1:i.bottom=0,i.left=-r*n;break;case 0:i.bottom=0,i.left=n;break}return S("div",{style:i})}var Aue=10,Dx=function(e){vi(r,e);var t=gi(r);function r(){var n;Qn(this,r);for(var i=arguments.length,a=new Array(i),u=0;u<i;u++)a[u]=arguments[u];return n=t.call.apply(t,[this].concat(a)),n.destroyed=!1,n.delayedDragEnterLogic=void 0,n.loadingRetryTimes={},n.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:u1()},n.dragStartMousePosition=null,n.dragNode=void 0,n.currentMouseOverDroppableNodeKey=null,n.listRef=C.exports.createRef(),n.onNodeDragStart=function(o,f){var p=n.state,v=p.expandedKeys,y=p.keyEntities,w=n.props.onDragStart,k=f.props.eventKey;n.dragNode=f,n.dragStartMousePosition={x:o.clientX,y:o.clientY};var T=Ds(v,k);n.setState({draggingNodeKey:k,dragChildrenKeys:yJ(k,y),indent:n.listRef.current.getIndentWidth()}),n.setExpandedKeys(T),window.addEventListener("dragend",n.onWindowDragEnd),w==null||w({event:o,node:Ri(f.props)})},n.onNodeDragEnter=function(o,f){var p=n.state,v=p.expandedKeys,y=p.keyEntities,w=p.dragChildrenKeys,k=p.flattenNodes,T=p.indent,R=n.props,A=R.onDragEnter,I=R.onExpand,O=R.allowDrop,N=R.direction,L=f.props,B=L.pos,j=L.eventKey,G=Nr(n),H=G.dragNode;if(n.currentMouseOverDroppableNodeKey!==j&&(n.currentMouseOverDroppableNodeKey=j),!H){n.resetDragState();return}var te=wP(o,H,f,T,n.dragStartMousePosition,O,k,y,v,N),Y=te.dropPosition,le=te.dropLevelOffset,J=te.dropTargetKey,Z=te.dropContainerKey,Q=te.dropTargetPos,ge=te.dropAllowed,ne=te.dragOverNodeKey;if(w.indexOf(J)!==-1||!ge){n.resetDragState();return}if(n.delayedDragEnterLogic||(n.delayedDragEnterLogic={}),Object.keys(n.delayedDragEnterLogic).forEach(function(de){clearTimeout(n.delayedDragEnterLogic[de])}),H.props.eventKey!==f.props.eventKey&&(o.persist(),n.delayedDragEnterLogic[B]=window.setTimeout(function(){if(n.state.draggingNodeKey!==null){var de=wt(v),oe=y[f.props.eventKey];oe&&(oe.children||[]).length&&(de=gl(v,f.props.eventKey)),"expandedKeys"in n.props||n.setExpandedKeys(de),I==null||I(de,{node:Ri(f.props),expanded:!0,nativeEvent:o.nativeEvent})}},800)),H.props.eventKey===J&&le===0){n.resetDragState();return}n.setState({dragOverNodeKey:ne,dropPosition:Y,dropLevelOffset:le,dropTargetKey:J,dropContainerKey:Z,dropTargetPos:Q,dropAllowed:ge}),A==null||A({event:o,node:Ri(f.props),expandedKeys:v})},n.onNodeDragOver=function(o,f){var p=n.state,v=p.dragChildrenKeys,y=p.flattenNodes,w=p.keyEntities,k=p.expandedKeys,T=p.indent,R=n.props,A=R.onDragOver,I=R.allowDrop,O=R.direction,N=Nr(n),L=N.dragNode;if(!!L){var B=wP(o,L,f,T,n.dragStartMousePosition,I,y,w,k,O),j=B.dropPosition,G=B.dropLevelOffset,H=B.dropTargetKey,te=B.dropContainerKey,Y=B.dropAllowed,le=B.dropTargetPos,J=B.dragOverNodeKey;v.indexOf(H)!==-1||!Y||(L.props.eventKey===H&&G===0?n.state.dropPosition===null&&n.state.dropLevelOffset===null&&n.state.dropTargetKey===null&&n.state.dropContainerKey===null&&n.state.dropTargetPos===null&&n.state.dropAllowed===!1&&n.state.dragOverNodeKey===null||n.resetDragState():j===n.state.dropPosition&&G===n.state.dropLevelOffset&&H===n.state.dropTargetKey&&te===n.state.dropContainerKey&&le===n.state.dropTargetPos&&Y===n.state.dropAllowed&&J===n.state.dragOverNodeKey||n.setState({dropPosition:j,dropLevelOffset:G,dropTargetKey:H,dropContainerKey:te,dropTargetPos:le,dropAllowed:Y,dragOverNodeKey:J}),A==null||A({event:o,node:Ri(f.props)}))}},n.onNodeDragLeave=function(o,f){n.currentMouseOverDroppableNodeKey===f.props.eventKey&&!o.currentTarget.contains(o.relatedTarget)&&(n.resetDragState(),n.currentMouseOverDroppableNodeKey=null);var p=n.props.onDragLeave;p==null||p({event:o,node:Ri(f.props)})},n.onWindowDragEnd=function(o){n.onNodeDragEnd(o,null,!0),window.removeEventListener("dragend",n.onWindowDragEnd)},n.onNodeDragEnd=function(o,f){var p=n.props.onDragEnd;n.setState({dragOverNodeKey:null}),n.cleanDragState(),p==null||p({event:o,node:Ri(f.props)}),n.dragNode=null,window.removeEventListener("dragend",n.onWindowDragEnd)},n.onNodeDrop=function(o,f){var p,v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,y=n.state,w=y.dragChildrenKeys,k=y.dropPosition,T=y.dropTargetKey,R=y.dropTargetPos,A=y.dropAllowed;if(!!A){var I=n.props.onDrop;if(n.setState({dragOverNodeKey:null}),n.cleanDragState(),T!==null){var O=ve(ve({},gm(T,n.getTreeNodeRequiredProps())),{},{active:((p=n.getActiveItem())===null||p===void 0?void 0:p.key)===T,data:n.state.keyEntities[T].node}),N=w.indexOf(T)!==-1;Bn(!N,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var L=DS(R),B={event:o,node:Ri(O),dragNode:n.dragNode?Ri(n.dragNode.props):null,dragNodesKeys:[n.dragNode.props.eventKey].concat(w),dropToGap:k!==0,dropPosition:k+Number(L[L.length-1])};v||I==null||I(B),n.dragNode=null}}},n.cleanDragState=function(){var o=n.state.draggingNodeKey;o!==null&&n.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),n.dragStartMousePosition=null,n.currentMouseOverDroppableNodeKey=null},n.triggerExpandActionExpand=function(o,f){var p=n.state,v=p.expandedKeys,y=p.flattenNodes,w=f.expanded,k=f.key,T=f.isLeaf;if(!(T||o.shiftKey||o.metaKey||o.ctrlKey)){var R=y.filter(function(I){return I.key===k})[0],A=Ri(ve(ve({},gm(k,n.getTreeNodeRequiredProps())),{},{data:R.data}));n.setExpandedKeys(w?Ds(v,k):gl(v,k)),n.onNodeExpand(o,A)}},n.onNodeClick=function(o,f){var p=n.props,v=p.onClick,y=p.expandAction;y==="click"&&n.triggerExpandActionExpand(o,f),v==null||v(o,f)},n.onNodeDoubleClick=function(o,f){var p=n.props,v=p.onDoubleClick,y=p.expandAction;y==="doubleClick"&&n.triggerExpandActionExpand(o,f),v==null||v(o,f)},n.onNodeSelect=function(o,f){var p=n.state.selectedKeys,v=n.state,y=v.keyEntities,w=v.fieldNames,k=n.props,T=k.onSelect,R=k.multiple,A=f.selected,I=f[w.key],O=!A;O?R?p=gl(p,I):p=[I]:p=Ds(p,I);var N=p.map(function(L){var B=y[L];return B?B.node:null}).filter(function(L){return L});n.setUncontrolledState({selectedKeys:p}),T==null||T(p,{event:"select",selected:O,node:f,selectedNodes:N,nativeEvent:o.nativeEvent})},n.onNodeCheck=function(o,f,p){var v=n.state,y=v.keyEntities,w=v.checkedKeys,k=v.halfCheckedKeys,T=n.props,R=T.checkStrictly,A=T.onCheck,I=f.key,O,N={event:"check",node:f,checked:p,nativeEvent:o.nativeEvent};if(R){var L=p?gl(w,I):Ds(w,I),B=Ds(k,I);O={checked:L,halfChecked:B},N.checkedNodes=L.map(function(le){return y[le]}).filter(function(le){return le}).map(function(le){return le.node}),n.setUncontrolledState({checkedKeys:L})}else{var j=Ml([].concat(wt(w),[I]),!0,y),G=j.checkedKeys,H=j.halfCheckedKeys;if(!p){var te=new Set(G);te.delete(I);var Y=Ml(Array.from(te),{checked:!1,halfCheckedKeys:H},y);G=Y.checkedKeys,H=Y.halfCheckedKeys}O=G,N.checkedNodes=[],N.checkedNodesPositions=[],N.halfCheckedKeys=H,G.forEach(function(le){var J=y[le];if(!!J){var Z=J.node,Q=J.pos;N.checkedNodes.push(Z),N.checkedNodesPositions.push({node:Z,pos:Q})}}),n.setUncontrolledState({checkedKeys:G},!1,{halfCheckedKeys:H})}A==null||A(O,N)},n.onNodeLoad=function(o){var f=o.key,p=new Promise(function(v,y){n.setState(function(w){var k=w.loadedKeys,T=k===void 0?[]:k,R=w.loadingKeys,A=R===void 0?[]:R,I=n.props,O=I.loadData,N=I.onLoad;if(!O||T.indexOf(f)!==-1||A.indexOf(f)!==-1)return null;var L=O(o);return L.then(function(){var B=n.state.loadedKeys,j=gl(B,f);N==null||N(j,{event:"load",node:o}),n.setUncontrolledState({loadedKeys:j}),n.setState(function(G){return{loadingKeys:Ds(G.loadingKeys,f)}}),v()}).catch(function(B){if(n.setState(function(G){return{loadingKeys:Ds(G.loadingKeys,f)}}),n.loadingRetryTimes[f]=(n.loadingRetryTimes[f]||0)+1,n.loadingRetryTimes[f]>=Aue){var j=n.state.loadedKeys;Bn(!1,"Retry for `loadData` many times but still failed. No more retry."),n.setUncontrolledState({loadedKeys:gl(j,f)}),v()}y(B)}),{loadingKeys:gl(A,f)}})});return p.catch(function(){}),p},n.onNodeMouseEnter=function(o,f){var p=n.props.onMouseEnter;p==null||p({event:o,node:f})},n.onNodeMouseLeave=function(o,f){var p=n.props.onMouseLeave;p==null||p({event:o,node:f})},n.onNodeContextMenu=function(o,f){var p=n.props.onRightClick;p&&(o.preventDefault(),p({event:o,node:f}))},n.onFocus=function(){var o=n.props.onFocus;n.setState({focused:!0});for(var f=arguments.length,p=new Array(f),v=0;v<f;v++)p[v]=arguments[v];o==null||o.apply(void 0,p)},n.onBlur=function(){var o=n.props.onBlur;n.setState({focused:!1}),n.onActiveChange(null);for(var f=arguments.length,p=new Array(f),v=0;v<f;v++)p[v]=arguments[v];o==null||o.apply(void 0,p)},n.getTreeNodeRequiredProps=function(){var o=n.state,f=o.expandedKeys,p=o.selectedKeys,v=o.loadedKeys,y=o.loadingKeys,w=o.checkedKeys,k=o.halfCheckedKeys,T=o.dragOverNodeKey,R=o.dropPosition,A=o.keyEntities;return{expandedKeys:f||[],selectedKeys:p||[],loadedKeys:v||[],loadingKeys:y||[],checkedKeys:w||[],halfCheckedKeys:k||[],dragOverNodeKey:T,dropPosition:R,keyEntities:A}},n.setExpandedKeys=function(o){var f=n.state,p=f.treeData,v=f.fieldNames,y=d2(p,o,v);n.setUncontrolledState({expandedKeys:o,flattenNodes:y},!0)},n.onNodeExpand=function(o,f){var p=n.state.expandedKeys,v=n.state,y=v.listChanging,w=v.fieldNames,k=n.props,T=k.onExpand,R=k.loadData,A=f.expanded,I=f[w.key];if(!y){var O=p.indexOf(I),N=!A;if(Bn(A&&O!==-1||!A&&O===-1,"Expand state not sync with index check"),N?p=gl(p,I):p=Ds(p,I),n.setExpandedKeys(p),T==null||T(p,{node:f,expanded:N,nativeEvent:o.nativeEvent}),N&&R){var L=n.onNodeLoad(f);L&&L.then(function(){var B=d2(n.state.treeData,p,w);n.setUncontrolledState({flattenNodes:B})}).catch(function(){var B=n.state.expandedKeys,j=Ds(B,I);n.setExpandedKeys(j)})}}},n.onListChangeStart=function(){n.setUncontrolledState({listChanging:!0})},n.onListChangeEnd=function(){setTimeout(function(){n.setUncontrolledState({listChanging:!1})})},n.onActiveChange=function(o){var f=n.state.activeKey,p=n.props.onActiveChange;f!==o&&(n.setState({activeKey:o}),o!==null&&n.scrollTo({key:o}),p==null||p(o))},n.getActiveItem=function(){var o=n.state,f=o.activeKey,p=o.flattenNodes;return f===null?null:p.find(function(v){var y=v.key;return y===f})||null},n.offsetActiveKey=function(o){var f=n.state,p=f.flattenNodes,v=f.activeKey,y=p.findIndex(function(T){var R=T.key;return R===v});y===-1&&o<0&&(y=p.length),y=(y+o+p.length)%p.length;var w=p[y];if(w){var k=w.key;n.onActiveChange(k)}else n.onActiveChange(null)},n.onKeyDown=function(o){var f=n.state,p=f.activeKey,v=f.expandedKeys,y=f.checkedKeys,w=f.fieldNames,k=n.props,T=k.onKeyDown,R=k.checkable,A=k.selectable;switch(o.which){case Et.UP:{n.offsetActiveKey(-1),o.preventDefault();break}case Et.DOWN:{n.offsetActiveKey(1),o.preventDefault();break}}var I=n.getActiveItem();if(I&&I.data){var O=n.getTreeNodeRequiredProps(),N=I.data.isLeaf===!1||!!(I.data[w.children]||[]).length,L=Ri(ve(ve({},gm(p,O)),{},{data:I.data,active:!0}));switch(o.which){case Et.LEFT:{N&&v.includes(p)?n.onNodeExpand({},L):I.parent&&n.onActiveChange(I.parent.key),o.preventDefault();break}case Et.RIGHT:{N&&!v.includes(p)?n.onNodeExpand({},L):I.children&&I.children.length&&n.onActiveChange(I.children[0].key),o.preventDefault();break}case Et.ENTER:case Et.SPACE:{R&&!L.disabled&&L.checkable!==!1&&!L.disableCheckbox?n.onNodeCheck({},L,!y.includes(p)):!R&&A&&!L.disabled&&L.selectable!==!1&&n.onNodeSelect({},L);break}}}T==null||T(o)},n.setUncontrolledState=function(o){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!n.destroyed){var v=!1,y=!0,w={};Object.keys(o).forEach(function(k){if(k in n.props){y=!1;return}v=!0,w[k]=o[k]}),v&&(!f||y)&&n.setState(ve(ve({},w),p))}},n.scrollTo=function(o){n.listRef.current.scrollTo(o)},n}return Jn(r,[{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,a=this.state,u=a.focused,o=a.flattenNodes,f=a.keyEntities,p=a.draggingNodeKey,v=a.activeKey,y=a.dropLevelOffset,w=a.dropContainerKey,k=a.dropTargetKey,T=a.dropPosition,R=a.dragOverNodeKey,A=a.indent,I=this.props,O=I.prefixCls,N=I.className,L=I.style,B=I.showLine,j=I.focusable,G=I.tabIndex,H=G===void 0?0:G,te=I.selectable,Y=I.showIcon,le=I.icon,J=I.switcherIcon,Z=I.draggable,Q=I.checkable,ge=I.checkStrictly,ne=I.disabled,de=I.motion,oe=I.loadData,ye=I.filterTreeNode,Re=I.height,Te=I.itemHeight,ke=I.virtual,ze=I.titleRender,Ie=I.dropIndicatorRender,Ne=I.onContextMenu,De=I.onScroll,Ve=I.direction,Ge=I.rootClassName,je=I.rootStyle,ct=qu(this.props,{aria:!0,data:!0}),pt;return Z&&(ar(Z)==="object"?pt=Z:typeof Z=="function"?pt={nodeDraggable:Z}:pt={}),S(zS.Provider,{value:{prefixCls:O,selectable:te,showIcon:Y,icon:le,switcherIcon:J,draggable:pt,draggingNodeKey:p,checkable:Q,checkStrictly:ge,disabled:ne,keyEntities:f,dropLevelOffset:y,dropContainerKey:w,dropTargetKey:k,dropPosition:T,dragOverNodeKey:R,indent:A,direction:Ve,dropIndicatorRender:Ie,loadData:oe,filterTreeNode:ye,titleRender:ze,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:S("div",{role:"tree",className:Qe(O,N,Ge,(i={},se(i,"".concat(O,"-show-line"),B),se(i,"".concat(O,"-focused"),u),se(i,"".concat(O,"-active-focused"),v!==null),i)),style:je,children:S(Mz,{ref:this.listRef,prefixCls:O,style:L,data:o,disabled:ne,selectable:te,checkable:!!Q,motion:de,dragging:p!==null,height:Re,itemHeight:Te,virtual:ke,focusable:j,focused:u,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:De,...this.getTreeNodeRequiredProps(),...ct})})})}}],[{key:"getDerivedStateFromProps",value:function(i,a){var u=a.prevProps,o={prevProps:i};function f(j){return!u&&j in i||u&&u[j]!==i[j]}var p,v=a.fieldNames;if(f("fieldNames")&&(v=u1(i.fieldNames),o.fieldNames=v),f("treeData")?p=i.treeData:f("children")&&(Bn(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),p=h9(i.children)),p){o.treeData=p;var y=Ex(p,{fieldNames:v});o.keyEntities=ve(se({},cd,Pz),y.keyEntities)}var w=o.keyEntities||a.keyEntities;if(f("expandedKeys")||u&&f("autoExpandParent"))o.expandedKeys=i.autoExpandParent||!u&&i.defaultExpandParent?F4(i.expandedKeys,w):i.expandedKeys;else if(!u&&i.defaultExpandAll){var k=ve({},w);delete k[cd],o.expandedKeys=Object.keys(k).map(function(j){return k[j].key})}else!u&&i.defaultExpandedKeys&&(o.expandedKeys=i.autoExpandParent||i.defaultExpandParent?F4(i.defaultExpandedKeys,w):i.defaultExpandedKeys);if(o.expandedKeys||delete o.expandedKeys,p||o.expandedKeys){var T=d2(p||a.treeData,o.expandedKeys||a.expandedKeys,v);o.flattenNodes=T}if(i.selectable&&(f("selectedKeys")?o.selectedKeys=CP(i.selectedKeys,i):!u&&i.defaultSelectedKeys&&(o.selectedKeys=CP(i.defaultSelectedKeys,i))),i.checkable){var R;if(f("checkedKeys")?R=c2(i.checkedKeys)||{}:!u&&i.defaultCheckedKeys?R=c2(i.defaultCheckedKeys)||{}:p&&(R=c2(i.checkedKeys)||{checkedKeys:a.checkedKeys,halfCheckedKeys:a.halfCheckedKeys}),R){var A=R,I=A.checkedKeys,O=I===void 0?[]:I,N=A.halfCheckedKeys,L=N===void 0?[]:N;if(!i.checkStrictly){var B=Ml(O,!0,w);O=B.checkedKeys,L=B.halfCheckedKeys}o.checkedKeys=O,o.halfCheckedKeys=L}}return f("loadedKeys")&&(o.loadedKeys=i.loadedKeys),o}}]),r}(C.exports.Component);Dx.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:Oue,allowDrop:function(){return!0},expandAction:!1};Dx.TreeNode=ud;var Nue={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 zue=Nue;var Iz=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:zue})})};Iz.displayName="HolderOutlined";const Due=C.exports.forwardRef(Iz);var R8=4;function Lue(e){var t,r=e.dropPosition,n=e.dropLevelOffset,i=e.prefixCls,a=e.indent,u=e.direction,o=u===void 0?"ltr":u,f=o==="ltr"?"left":"right",p=o==="ltr"?"right":"left",v=(t={},se(t,f,-n*a+R8),se(t,p,0),t);switch(r){case-1:v.top=-3;break;case 1:v.bottom=-3;break;default:v.bottom=-3,v[f]=a+R8;break}return S("div",{style:v,className:"".concat(i,"-drop-indicator")})}var Fue={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 $ue=Fue;var Rz=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:$ue})})};Rz.displayName="CaretDownFilled";const Bue=C.exports.forwardRef(Rz);var Vue={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 jue=Vue;var Oz=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:jue})})};Oz.displayName="FileOutlined";const Az=C.exports.forwardRef(Oz);var Uue={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 Kue=Uue;var Nz=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:Kue})})};Nz.displayName="MinusSquareOutlined";const Hue=C.exports.forwardRef(Nz);var Wue={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 que=Wue;var zz=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:que})})};zz.displayName="PlusSquareOutlined";const Gue=C.exports.forwardRef(zz);function Dz(e,t,r,n){var i=n.isLeaf,a=n.expanded,u=n.loading;if(u)return S(Wf,{className:"".concat(e,"-switcher-loading-icon")});var o;if(r&&ar(r)==="object"&&(o=r.showLeafIcon),i){if(!r)return null;if(typeof o!="boolean"&&!!o){var f=typeof o=="function"?o(n):o,p="".concat(e,"-switcher-line-custom-icon");return Yo(f)?Ni(f,{className:Qe(f.props.className||"",p)}):f}return o?S(Az,{className:"".concat(e,"-switcher-line-icon")}):S("span",{className:"".concat(e,"-switcher-leaf-line")})}var v="".concat(e,"-switcher-icon"),y=typeof t=="function"?t(n):t;return Yo(y)?Ni(y,{className:Qe(y.props.className||"",v)}):y||(r?a?S(Hue,{className:"".concat(e,"-switcher-line-icon")}):S(Gue,{className:"".concat(e,"-switcher-line-icon")}):S(Bue,{className:v}))}var Zue=C.exports.forwardRef(function(e,t){var r,n=C.exports.useContext(zr),i=n.getPrefixCls,a=n.direction,u=n.virtual,o=e.prefixCls,f=e.className,p=e.showIcon,v=p===void 0?!1:p,y=e.showLine,w=e.switcherIcon,k=e.blockNode,T=k===void 0?!1:k,R=e.children,A=e.checkable,I=A===void 0?!1:A,O=e.selectable,N=O===void 0?!0:O,L=e.draggable,B=e.motion,j=B===void 0?tt(tt({},Gm),{motionAppear:!1}):B,G=i("tree",o),H=tt(tt({},e),{checkable:I,selectable:N,showIcon:v,motion:j,blockNode:T,showLine:Boolean(y),dropIndicatorRender:Lue}),te=C.exports.useMemo(function(){if(!L)return!1;var Y={};switch(ar(L)){case"function":Y.nodeDraggable=L;break;case"object":Y=tt({},L);break}return Y.icon!==!1&&(Y.icon=Y.icon||S(Due,{})),Y},[L]);return S(Dx,{itemHeight:20,ref:t,virtual:u,...H,prefixCls:G,className:Qe((r={},se(r,"".concat(G,"-icon-hide"),!v),se(r,"".concat(G,"-block-node"),T),se(r,"".concat(G,"-unselectable"),!N),se(r,"".concat(G,"-rtl"),a==="rtl"),r),f),direction:a,checkable:I&&S("span",{className:"".concat(G,"-checkbox-inner")}),selectable:N,switcherIcon:function(le){return Dz(G,w,y,le)},draggable:te,children:R})});const Lz=Zue;var Xue={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 Yue=Xue;var Fz=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:Yue})})};Fz.displayName="FolderOpenOutlined";const Que=C.exports.forwardRef(Fz);var Jue={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 ece=Jue;var $z=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:ece})})};$z.displayName="FolderOutlined";const tce=C.exports.forwardRef($z);var xl;(function(e){e[e.None=0]="None",e[e.Start=1]="Start",e[e.End=2]="End"})(xl||(xl={}));function KS(e,t){function r(n){var i=n.key,a=n.children;t(i,n)!==!1&&KS(a||[],t)}e.forEach(r)}function rce(e){var t=e.treeData,r=e.expandedKeys,n=e.startKey,i=e.endKey,a=[],u=xl.None;if(n&&n===i)return[n];if(!n||!i)return[];function o(f){return f===n||f===i}return KS(t,function(f){if(u===xl.End)return!1;if(o(f)){if(a.push(f),u===xl.None)u=xl.Start;else if(u===xl.Start)return u=xl.End,!1}else u===xl.Start&&a.push(f);return r.includes(f)}),a}function C2(e,t){var r=wt(t),n=[];return KS(e,function(i,a){var u=r.indexOf(i);return u!==-1&&(n.push(a),r.splice(u,1)),!!r.length}),n}var O8=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};function nce(e){var t=e.isLeaf,r=e.expanded;return t?S(Az,{}):r?S(Que,{}):S(tce,{})}function A8(e){var t=e.treeData,r=e.children;return t||h9(r)}var ice=function(t,r){var n=t.defaultExpandAll,i=t.defaultExpandParent,a=t.defaultExpandedKeys,u=O8(t,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]),o=C.exports.useRef(),f=C.exports.useRef(),p=function(){var de=Ex(A8(u)),oe=de.keyEntities,ye;return n?ye=Object.keys(oe):i?ye=F4(u.expandedKeys||a||[],oe):ye=u.expandedKeys||a,ye},v=C.exports.useState(u.selectedKeys||u.defaultSelectedKeys||[]),y=Le(v,2),w=y[0],k=y[1],T=C.exports.useState(function(){return p()}),R=Le(T,2),A=R[0],I=R[1];C.exports.useEffect(function(){"selectedKeys"in u&&k(u.selectedKeys)},[u.selectedKeys]),C.exports.useEffect(function(){"expandedKeys"in u&&I(u.expandedKeys)},[u.expandedKeys]);var O=function(de,oe){var ye;return"expandedKeys"in u||I(de),(ye=u.onExpand)===null||ye===void 0?void 0:ye.call(u,de,oe)},N=function(de,oe){var ye,Re=u.multiple,Te=oe.node,ke=oe.nativeEvent,ze=Te.key,Ie=ze===void 0?"":ze,Ne=A8(u),De=tt(tt({},oe),{selected:!0}),Ve=(ke==null?void 0:ke.ctrlKey)||(ke==null?void 0:ke.metaKey),Ge=ke==null?void 0:ke.shiftKey,je;Re&&Ve?(je=de,o.current=Ie,f.current=je,De.selectedNodes=C2(Ne,je)):Re&&Ge?(je=Array.from(new Set([].concat(wt(f.current||[]),wt(rce({treeData:Ne,expandedKeys:A,startKey:Ie,endKey:o.current}))))),De.selectedNodes=C2(Ne,je)):(je=[Ie],o.current=Ie,f.current=je,De.selectedNodes=C2(Ne,je)),(ye=u.onSelect)===null||ye===void 0||ye.call(u,je,De),"selectedKeys"in u||k(je)},L=C.exports.useContext(zr),B=L.getPrefixCls,j=L.direction,G=u.prefixCls,H=u.className,te=u.showIcon,Y=te===void 0?!0:te,le=u.expandAction,J=le===void 0?"click":le,Z=O8(u,["prefixCls","className","showIcon","expandAction"]),Q=B("tree",G),ge=Qe("".concat(Q,"-directory"),se({},"".concat(Q,"-directory-rtl"),j==="rtl"),H);return S(Lz,{icon:nce,ref:r,blockNode:!0,...Z,showIcon:Y,expandAction:J,prefixCls:Q,className:ge,expandedKeys:A,selectedKeys:w,onSelect:N,onExpand:O})},oce=C.exports.forwardRef(ice);const ace=oce;var HS=Lz;HS.DirectoryTree=ace;HS.TreeNode=ud;const sce=HS;function lce(e){var t=C.exports.useRef(e),r=EN();return[function(){return t.current},function(n){t.current=n,r()}]}function N8(e){var t=e.value,r=e.onChange,n=e.filterSearch,i=e.tablePrefixCls,a=e.locale;return n?S("div",{className:"".concat(i,"-filter-dropdown-search"),children:S(Ru,{prefix:S(xS,{}),placeholder:a.filterSearchPlaceholder,onChange:r,value:t,htmlSize:1,className:"".concat(i,"-filter-dropdown-search-input")})}):null}var uce=function(t){var r=t.keyCode;r===Et.ENTER&&t.stopPropagation()},cce=function(t){return S("div",{className:t.className,onClick:function(n){return n.stopPropagation()},onKeyDown:uce,children:t.children})};const dce=cce;function fce(e){return e.some(function(t){var r=t.children;return r})}function Bz(e,t){return typeof t=="string"||typeof t=="number"?t==null?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()):!1}function Vz(e){var t=e.filters,r=e.prefixCls,n=e.filteredKeys,i=e.filterMultiple,a=e.searchValue,u=e.filterSearch;return t.map(function(o,f){var p=String(o.value);if(o.children)return{key:p||f,label:o.text,popupClassName:"".concat(r,"-dropdown-submenu"),children:Vz({filters:o.children,prefixCls:r,filteredKeys:n,filterMultiple:i,searchValue:a,filterSearch:u})};var v=i?ed:c9,y={key:o.value!==void 0?p:f,label:Xe(Ar,{children:[S(v,{checked:n.includes(p)}),S("span",{children:o.text})]})};return a.trim()?typeof u=="function"?u(a,o)?y:null:Bz(a,o.text)?y:null:y})}function hce(e){var t,r=e.tablePrefixCls,n=e.prefixCls,i=e.column,a=e.dropdownPrefixCls,u=e.columnKey,o=e.filterMultiple,f=e.filterMode,p=f===void 0?"menu":f,v=e.filterSearch,y=v===void 0?!1:v,w=e.filterState,k=e.triggerFilter,T=e.locale,R=e.children,A=e.getPopupContainer,I=i.filterDropdownOpen,O=i.onFilterDropdownOpenChange,N=i.filterDropdownVisible,L=i.onFilterDropdownVisibleChange,B=i.filterResetToDefaultFilteredValue,j=i.defaultFilteredValue,G=C.exports.useState(!1),H=Le(G,2),te=H[0],Y=H[1],le=!!(w&&(((t=w.filteredKeys)===null||t===void 0?void 0:t.length)||w.forceFiltered)),J=function(qe){Y(qe),O==null||O(qe),L==null||L(qe)},Z;typeof I=="boolean"?Z=I:Z=typeof N=="boolean"?N:te;var Q=w==null?void 0:w.filteredKeys,ge=lce(Q||[]),ne=Le(ge,2),de=ne[0],oe=ne[1],ye=function(qe){var Xt=qe.selectedKeys;oe(Xt)},Re=function(qe,Xt){var cr=Xt.node,Vt=Xt.checked;ye(o?{selectedKeys:qe}:{selectedKeys:Vt&&cr.key?[cr.key]:[]})};C.exports.useEffect(function(){!te||ye({selectedKeys:Q||[]})},[Q]);var Te=C.exports.useState([]),ke=Le(Te,2),ze=ke[0],Ie=ke[1],Ne=function(qe){Ie(qe)},De=C.exports.useState(""),Ve=Le(De,2),Ge=Ve[0],je=Ve[1],ct=function(qe){var Xt=qe.target.value;je(Xt)};C.exports.useEffect(function(){te||je("")},[te]);var pt=function(qe){var Xt=qe&&qe.length?qe:null;if(Xt===null&&(!w||!w.filteredKeys)||E8(Xt,w==null?void 0:w.filteredKeys))return null;k({column:i,key:u,filteredKeys:Xt})},Tt=function(){J(!1),pt(de())},Ye=function(){var qe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1},Xt=qe.confirm,cr=qe.closeDropdown;Xt&&pt([]),cr&&J(!1),je(""),oe(B?(j||[]).map(function(Vt){return String(Vt)}):[])},Pt=function(){var qe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0},Xt=qe.closeDropdown;Xt&&J(!1),pt(de())},mt=function(qe){qe&&Q!==void 0&&oe(Q||[]),J(qe),!qe&&!i.filterDropdown&&Tt()},It=Qe(se({},"".concat(a,"-menu-without-submenu"),!fce(i.filters||[]))),Ct=function(qe){if(qe.target.checked){var Xt=Df(i==null?void 0:i.filters).map(function(cr){return String(cr)});oe(Xt)}else oe([])},Dt=function Fe(qe){var Xt=qe.filters;return(Xt||[]).map(function(cr,Vt){var Ut=String(cr.value),rr={title:cr.text,key:cr.value!==void 0?Ut:Vt};return cr.children&&(rr.children=Fe({filters:cr.children})),rr})},lt=function Fe(qe){var Xt;return tt(tt({},qe),{text:qe.title,value:qe.key,children:((Xt=qe.children)===null||Xt===void 0?void 0:Xt.map(function(cr){return Fe(cr)}))||[]})},dt;if(typeof i.filterDropdown=="function")dt=i.filterDropdown({prefixCls:"".concat(a,"-custom"),setSelectedKeys:function(qe){return ye({selectedKeys:qe})},selectedKeys:de(),confirm:Pt,clearFilters:Ye,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?S($s,{image:$s.PRESENTED_IMAGE_SIMPLE,description:T.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):p==="tree"?Xe(Ar,{children:[S(N8,{filterSearch:y,value:Ge,onChange:ct,tablePrefixCls:r,locale:T}),Xe("div",{className:"".concat(r,"-filter-dropdown-tree"),children:[o?S(ed,{checked:ut.length===Df(i.filters).length,indeterminate:ut.length>0&&ut.length<Df(i.filters).length,className:"".concat(r,"-filter-dropdown-checkall"),onChange:Ct,children:T.filterCheckall}):null,S(sce,{checkable:!0,selectable:!1,blockNode:!0,multiple:o,checkStrictly:!o,className:"".concat(a,"-menu"),onCheck:Re,checkedKeys:ut,selectedKeys:ut,showIcon:!1,treeData:Dt({filters:i.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:Ge.trim()?function(qe){return typeof y=="function"?y(Ge,lt(qe)):Bz(Ge,qe.title)}:void 0})]})]}):Xe(Ar,{children:[S(N8,{filterSearch:y,value:Ge,onChange:ct,tablePrefixCls:r,locale:T}),S(ZN,{selectable:!0,multiple:o,prefixCls:"".concat(a,"-menu"),className:It,onSelect:ye,onDeselect:ye,selectedKeys:ut,getPopupContainer:A,openKeys:ze,onOpenChange:Ne,items:Vz({filters:i.filters||[],filterSearch:y,prefixCls:n,filteredKeys:de(),filterMultiple:o,searchValue:Ge})})]})},ft=function(){return B?E8((j||[]).map(function(qe){return String(qe)}),ut):ut.length===0};dt=Xe(Ar,{children:[it(),Xe("div",{className:"".concat(n,"-dropdown-btns"),children:[S(On,{type:"link",size:"small",disabled:ft(),onClick:function(){return Ye()},children:T.filterReset}),S(On,{type:"primary",size:"small",onClick:Tt,children:T.filterConfirm})]})]})}i.filterDropdown&&(dt=S(GN,{selectable:void 0,children:dt}));var xt=function(){return S(dce,{className:"".concat(n,"-dropdown"),children:dt})},Wt;typeof i.filterIcon=="function"?Wt=i.filterIcon(le):i.filterIcon?Wt=i.filterIcon:Wt=S(wne,{});var jt=C.exports.useContext(zr),Qt=jt.direction;return Xe("div",{className:"".concat(n,"-column"),children:[S("span",{className:"".concat(r,"-column-title"),children:R}),S(RS,{dropdownRender:xt,trigger:["click"],open:Z,onOpenChange:mt,getPopupContainer:A,placement:Qt==="rtl"?"bottomLeft":"bottomRight",children:S("span",{role:"button",tabIndex:-1,className:Qe("".concat(n,"-trigger"),{active:le}),onClick:function(qe){qe.stopPropagation()},children:Wt})})]})}function Q4(e,t,r){var n=[];return(e||[]).forEach(function(i,a){var u,o=Ix(a,r);if(i.filters||"filterDropdown"in i||"onFilter"in i)if("filteredValue"in i){var f=i.filteredValue;"filterDropdown"in i||(f=(u=f==null?void 0:f.map(String))!==null&&u!==void 0?u:f),n.push({column:i,key:Zf(i,o),filteredKeys:f,forceFiltered:i.filtered})}else n.push({column:i,key:Zf(i,o),filteredKeys:t&&i.defaultFilteredValue?i.defaultFilteredValue:void 0,forceFiltered:i.filtered});"children"in i&&(n=[].concat(wt(n),wt(Q4(i.children,t,o))))}),n}function jz(e,t,r,n,i,a,u,o){return r.map(function(f,p){var v=Ix(p,o),y=f.filterMultiple,w=y===void 0?!0:y,k=f.filterMode,T=f.filterSearch,R=f;if(R.filters||R.filterDropdown){var A=Zf(R,v),I=n.find(function(O){var N=O.key;return A===N});R=tt(tt({},R),{title:function(N){return S(hce,{tablePrefixCls:e,prefixCls:"".concat(e,"-filter"),dropdownPrefixCls:t,column:R,columnKey:A,filterState:I,filterMultiple:w,filterMode:k,filterSearch:T,triggerFilter:i,locale:u,getPopupContainer:a,children:Rx(f.title,N)})}})}return"children"in R&&(R=tt(tt({},R),{children:jz(e,t,R.children,n,i,a,u,v)})),R})}function Df(e){var t=[];return(e||[]).forEach(function(r){var n=r.value,i=r.children;t.push(n),i&&(t=[].concat(wt(t),wt(Df(i))))}),t}function z8(e){var t={};return e.forEach(function(r){var n=r.key,i=r.filteredKeys,a=r.column,u=a.filters,o=a.filterDropdown;if(o)t[n]=i||null;else if(Array.isArray(i)){var f=Df(u);t[n]=f.filter(function(p){return i.includes(String(p))})}else t[n]=null}),t}function D8(e,t){return t.reduce(function(r,n){var i=n.column,a=i.onFilter,u=i.filters,o=n.filteredKeys;return a&&o&&o.length?r.filter(function(f){return o.some(function(p){var v=Df(u),y=v.findIndex(function(k){return String(k)===String(p)}),w=y!==-1?v[y]:p;return a(w,f)})}):r},e)}function pce(e){var t=e.prefixCls,r=e.dropdownPrefixCls,n=e.mergedColumns,i=e.onFilterChange,a=e.getPopupContainer,u=e.locale,o=C.exports.useState(function(){return Q4(n,!0)}),f=Le(o,2),p=f[0],v=f[1],y=C.exports.useMemo(function(){var R=Q4(n,!1),A=!0;return R.forEach(function(I){var O=I.filteredKeys;O!==void 0&&(A=!1)}),A?p:R},[n,p]),w=C.exports.useMemo(function(){return z8(y)},[y]),k=function(A){var I=y.filter(function(O){var N=O.key;return N!==A.key});I.push(A),v(I),i(z8(I),I)},T=function(A){return jz(t,r,A,y,k,a,u)};return[T,y,w]}function mce(e,t,r){var n=C.exports.useRef({});function i(a){if(!n.current||n.current.data!==e||n.current.childrenColumnName!==t||n.current.getRowKey!==r){let f=function(p){p.forEach(function(v,y){var w=r(v,y);u.set(w,v),v&&ar(v)==="object"&&t in v&&f(v[t]||[])})};var o=f,u=new Map;f(e),n.current={data:e,childrenColumnName:t,kvMap:u,getRowKey:r}}return n.current.kvMap.get(a)}return[i]}var vce=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},Uz=10;function gce(e,t){var r={current:t.current,pageSize:t.pageSize},n=e&&ar(e)==="object"?e:{};return Object.keys(n).forEach(function(i){var a=t[i];typeof a!="function"&&(r[i]=a)}),r}function yce(){for(var e={},t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return r.forEach(function(i){i&&Object.keys(i).forEach(function(a){var u=i[a];u!==void 0&&(e[a]=u)})}),e}function xce(e,t,r){var n=t&&ar(t)==="object"?t:{},i=n.total,a=i===void 0?0:i,u=vce(n,["total"]),o=C.exports.useState(function(){return{current:"defaultCurrent"in u?u.defaultCurrent:1,pageSize:"defaultPageSize"in u?u.defaultPageSize:Uz}}),f=Le(o,2),p=f[0],v=f[1],y=yce(p,u,{total:a>0?a:e}),w=Math.ceil((a||e)/y.pageSize);y.current>w&&(y.current=w||1);var k=function(A,I){v({current:A!=null?A:1,pageSize:I||y.pageSize})},T=function(A,I){var O;t&&((O=t.onChange)===null||O===void 0||O.call(t,A,I)),k(A,I),r(A,I||(y==null?void 0:y.pageSize))};return t===!1?[{},function(){}]:[tt(tt({},y),{onChange:T}),k]}var gu={},J4="SELECT_ALL",eC="SELECT_INVERT",tC="SELECT_NONE",L8=[];function Kz(e,t){var r=[];return(e||[]).forEach(function(n){r.push(n),n&&ar(n)==="object"&&t in n&&(r=[].concat(wt(r),wt(Kz(n[t],t))))}),r}function _ce(e,t){var r=e||{},n=r.preserveSelectedRowKeys,i=r.selectedRowKeys,a=r.defaultSelectedRowKeys,u=r.getCheckboxProps,o=r.onChange,f=r.onSelect,p=r.onSelectAll,v=r.onSelectInvert,y=r.onSelectNone,w=r.onSelectMultiple,k=r.columnWidth,T=r.type,R=r.selections,A=r.fixed,I=r.renderCell,O=r.hideSelectAll,N=r.checkStrictly,L=N===void 0?!0:N,B=t.prefixCls,j=t.data,G=t.pageData,H=t.getRecordByKey,te=t.getRowKey,Y=t.expandType,le=t.childrenColumnName,J=t.locale,Z=t.getPopupContainer,Q=Yi(i||a||L8,{value:i}),ge=Le(Q,2),ne=ge[0],de=ge[1],oe=C.exports.useRef(new Map),ye=C.exports.useCallback(function(lt){if(n){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,n]);C.exports.useEffect(function(){ye(ne)},[ne]);var Re=C.exports.useMemo(function(){return L?{keyEntities:null}:Ex(j,{externalGetKey:te,childrenPropName:le})},[j,te,L,le]),Te=Re.keyEntities,ke=C.exports.useMemo(function(){return Kz(G,le)},[G,le]),ze=C.exports.useMemo(function(){var lt=new Map;return ke.forEach(function(dt,ut){var it=te(dt,ut),ft=(u?u(dt):null)||{};lt.set(it,ft)}),lt},[ke,te,u]),Ie=C.exports.useCallback(function(lt){var dt;return!!(!((dt=ze.get(te(lt)))===null||dt===void 0)&&dt.disabled)},[ze,te]),Ne=C.exports.useMemo(function(){if(L)return[ne||[],[]];var lt=Ml(ne,!0,Te,Ie),dt=lt.checkedKeys,ut=lt.halfCheckedKeys;return[dt||[],ut]},[ne,L,Te,Ie]),De=Le(Ne,2),Ve=De[0],Ge=De[1],je=C.exports.useMemo(function(){var lt=T==="radio"?Ve.slice(0,1):Ve;return new Set(lt)},[Ve,T]),ct=C.exports.useMemo(function(){return T==="radio"?new Set:new Set(Ge)},[Ge,T]),pt=C.exports.useState(null),Tt=Le(pt,2),Ye=Tt[0],Pt=Tt[1];C.exports.useEffect(function(){e||de(L8)},[!!e]);var mt=C.exports.useCallback(function(lt,dt){var ut,it;ye(lt),n?(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,n]),It=C.exports.useCallback(function(lt,dt,ut,it){if(f){var ft=ut.map(function(xt){return H(xt)});f(H(lt),dt,ft,it)}mt(ut,"single")},[f,H,mt]),Ct=C.exports.useMemo(function(){if(!R||O)return null;var lt=R===!0?[J4,eC,tC]:R;return lt.map(function(dt){return dt===J4?{key:"all",text:J.selectionAll,onSelect:function(){mt(j.map(function(it,ft){return te(it,ft)}).filter(function(it){var ft=ze.get(it);return!(ft!=null&&ft.disabled)||je.has(it)}),"all")}}:dt===eC?{key:"invert",text:J.selectInvert,onSelect:function(){var it=new Set(je);G.forEach(function(xt,Wt){var jt=te(xt,Wt),Qt=ze.get(jt);Qt!=null&&Qt.disabled||(it.has(jt)?it.delete(jt):it.add(jt))});var ft=Array.from(it);v&&v(ft),mt(ft,"invert")}}:dt===tC?{key:"none",text:J.selectNone,onSelect:function(){y==null||y(),mt(Array.from(je).filter(function(it){var ft=ze.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),jt=0;jt<xt;jt++)Wt[jt]=arguments[jt];(ft=dt.onSelect)===null||ft===void 0||(it=ft).call.apply(it,[dt].concat(Wt)),Pt(null)}})})},[R,je,G,te,v,mt]),Dt=C.exports.useCallback(function(lt){var dt;if(!e)return lt.filter(function(fr){return fr!==gu});var ut=wt(lt),it=new Set(je),ft=ke.map(te).filter(function(fr){return!ze.get(fr).disabled}),xt=ft.every(function(fr){return it.has(fr)}),Wt=ft.some(function(fr){return it.has(fr)}),jt=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(T!=="radio"){var Fe;if(Ct){var qe={getPopupContainer:Z,items:Ct.map(function(fr,Nt){var ot=fr.key,ht=fr.text,Ot=fr.onSelect;return{key:ot||Nt,onClick:function(){Ot==null||Ot(ft)},label:ht}})};Fe=S("div",{className:"".concat(B,"-selection-extra"),children:S(RS,{menu:qe,getPopupContainer:Z,children:S("span",{children:S(yN,{})})})})}var Xt=ke.map(function(fr,Nt){var ot=te(fr,Nt),ht=ze.get(ot)||{};return tt({checked:it.has(ot)},ht)}).filter(function(fr){var Nt=fr.disabled;return Nt}),cr=!!Xt.length&&Xt.length===ke.length,Vt=cr&&Xt.every(function(fr){var Nt=fr.checked;return Nt}),Ut=cr&&Xt.some(function(fr){var Nt=fr.checked;return Nt});Qt=!O&&Xe("div",{className:"".concat(B,"-selection"),children:[S(ed,{checked:cr?Vt:!!ke.length&&xt,indeterminate:cr?!Vt&&Ut:!xt&&Wt,onChange:jt,disabled:ke.length===0||cr,"aria-label":Fe?"Custom selection":"Select all",skipGroup:!0}),Fe]})}var rr;T==="radio"?rr=function(Nt,ot,ht){var Ot=te(ot,ht),$t=it.has(Ot);return{node:S(c9,{...ze.get(Ot),checked:$t,onClick:function(Ir){return Ir.stopPropagation()},onChange:function(Ir){it.has(Ot)||It(Ot,!0,[Ot],Ir.nativeEvent)}}),checked:$t}}:rr=function(Nt,ot,ht){var Ot,$t=te(ot,ht),ur=it.has($t),Ir=ct.has($t),qr=ze.get($t),Gr;return Y==="nest"?Gr=Ir:Gr=(Ot=qr==null?void 0:qr.indeterminate)!==null&&Ot!==void 0?Ot:Ir,{node:S(ed,{...qr,indeterminate:Gr,checked:ur,skipGroup:!0,onClick:function(K){return K.stopPropagation()},onChange:function(K){var q=K.nativeEvent,ce=q.shiftKey,ae=-1,xe=-1;if(ce&&L){var Ee=new Set([Ye,$t]);ft.some(function(Bt,vr){if(Ee.has(Bt))if(ae===-1)ae=vr;else return xe=vr,!0;return!1})}if(xe!==-1&&ae!==xe&&L){var be=ft.slice(ae,xe+1),Ce=[];ur?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 Ae=Array.from(it);w==null||w(!ur,Ae.map(function(Bt){return H(Bt)}),Ce.map(function(Bt){return H(Bt)})),mt(Ae,"multiple")}else{var He=Ve;if(L){var We=ur?Ds(He,$t):gl(He,$t);It($t,!ur,We,q)}else{var Be=Ml([].concat(wt(He),[$t]),!0,Te,Ie),At=Be.checkedKeys,bt=Be.halfCheckedKeys,Je=At;if(ur){var Rt=new Set(At);Rt.delete($t),Je=Ml(Array.from(Rt),{checked:!1,halfCheckedKeys:bt},Te,Ie).checkedKeys}It($t,!ur,Je,q)}}Pt(ur?null:$t)}}),checked:ur}};var xr=function(Nt,ot,ht){var Ot=rr(Nt,ot,ht),$t=Ot.node,ur=Ot.checked;return I?I(ur,ot,ht,$t):$t};if(!ut.includes(gu))if(ut.findIndex(function(fr){var Nt;return((Nt=fr[xm])===null||Nt===void 0?void 0:Nt.columnType)==="EXPAND_COLUMN"})===0){var Or=ut,_t=U3(Or),qt=_t[0],or=_t.slice(1);ut=[qt,gu].concat(wt(or))}else ut=[gu].concat(wt(ut));var $r=ut.indexOf(gu);ut=ut.filter(function(fr,Nt){return fr!==gu||Nt===$r});var kr=ut[$r-1],Lt=ut[$r+1],Tr=A;Tr===void 0&&((Lt==null?void 0:Lt.fixed)!==void 0?Tr=Lt.fixed:(kr==null?void 0:kr.fixed)!==void 0&&(Tr=kr.fixed)),Tr&&kr&&((dt=kr[xm])===null||dt===void 0?void 0:dt.columnType)==="EXPAND_COLUMN"&&kr.fixed===void 0&&(kr.fixed=Tr);var Cr=se({fixed:Tr,width:k,className:"".concat(B,"-selection-column"),title:e.columnTitle||Qt,render:xr},xm,{className:"".concat(B,"-selection-col")});return ut.map(function(fr){return fr===gu?Cr:fr})},[te,ke,e,Ve,je,ct,k,Ct,Y,Ye,ze,w,It,Ie]);return[Dt,je]}var bce={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 wce=bce;var Hz=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:wce})})};Hz.displayName="CaretDownOutlined";const Cce=C.exports.forwardRef(Hz);var Sce={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 Ece=Sce;var Wz=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:Ece})})};Wz.displayName="CaretUpOutlined";const kce=C.exports.forwardRef(Wz);var c0="ascend",S2="descend";function m1(e){return ar(e.sorter)==="object"&&typeof e.sorter.multiple=="number"?e.sorter.multiple:!1}function F8(e){return typeof e=="function"?e:e&&ar(e)==="object"&&e.compare?e.compare:!1}function Tce(e,t){return t?e[e.indexOf(t)+1]:e[0]}function rC(e,t,r){var n=[];function i(a,u){n.push({column:a,key:Zf(a,u),multiplePriority:m1(a),sortOrder:a.sortOrder})}return(e||[]).forEach(function(a,u){var o=Ix(u,r);a.children?("sortOrder"in a&&i(a,o),n=[].concat(wt(n),wt(rC(a.children,t,o)))):a.sorter&&("sortOrder"in a?i(a,o):t&&a.defaultSortOrder&&n.push({column:a,key:Zf(a,o),multiplePriority:m1(a),sortOrder:a.defaultSortOrder}))}),n}function qz(e,t,r,n,i,a,u,o){return(t||[]).map(function(f,p){var v=Ix(p,o),y=f;if(y.sorter){var w=y.sortDirections||i,k=y.showSorterTooltip===void 0?u:y.showSorterTooltip,T=Zf(y,v),R=r.find(function(Y){var le=Y.key;return le===T}),A=R?R.sortOrder:null,I=Tce(w,A),O=w.includes(c0)&&S(kce,{className:Qe("".concat(e,"-column-sorter-up"),{active:A===c0}),role:"presentation"}),N=w.includes(S2)&&S(Cce,{className:Qe("".concat(e,"-column-sorter-down"),{active:A===S2}),role:"presentation"}),L=a||{},B=L.cancelSort,j=L.triggerAsc,G=L.triggerDesc,H=B;I===S2?H=G:I===c0&&(H=j);var te=ar(k)==="object"?k:{title:H};y=tt(tt({},y),{className:Qe(y.className,se({},"".concat(e,"-column-sort"),A)),title:function(le){var J=Xe("div",{className:"".concat(e,"-column-sorters"),children:[S("span",{className:"".concat(e,"-column-title"),children:Rx(f.title,le)}),S("span",{className:Qe("".concat(e,"-column-sorter"),se({},"".concat(e,"-column-sorter-full"),!!(O&&N))),children:Xe("span",{className:"".concat(e,"-column-sorter-inner"),children:[O,N]})})]});return k?S(yo,{...te,children:J}):J},onHeaderCell:function(le){var J=f.onHeaderCell&&f.onHeaderCell(le)||{},Z=J.onClick,Q=J.onKeyDown;J.onClick=function(de){n({column:f,key:T,sortOrder:I,multiplePriority:m1(f)}),Z==null||Z(de)},J.onKeyDown=function(de){de.keyCode===Et.ENTER&&(n({column:f,key:T,sortOrder:I,multiplePriority:m1(f)}),Q==null||Q(de))};var ge=xne(f.title,{}),ne=ge==null?void 0:ge.toString();return A?J["aria-sort"]=A==="ascend"?"ascending":"descending":J["aria-label"]=ne||"",J.className=Qe(J.className,"".concat(e,"-column-has-sorters")),J.tabIndex=0,f.ellipsis&&(J.title=(ge!=null?ge:"").toString()),J}})}return"children"in y&&(y=tt(tt({},y),{children:qz(e,y.children,r,n,i,a,u,v)})),y})}function $8(e){var t=e.column,r=e.sortOrder;return{column:t,order:r,field:t.dataIndex,columnKey:t.key}}function B8(e){var t=e.filter(function(r){var n=r.sortOrder;return n}).map($8);return t.length===0&&e.length?tt(tt({},$8(e[e.length-1])),{column:void 0}):t.length<=1?t[0]||{}:t}function nC(e,t,r){var n=t.slice().sort(function(u,o){return o.multiplePriority-u.multiplePriority}),i=e.slice(),a=n.filter(function(u){var o=u.column.sorter,f=u.sortOrder;return F8(o)&&f});return a.length?i.sort(function(u,o){for(var f=0;f<a.length;f+=1){var p=a[f],v=p.column.sorter,y=p.sortOrder,w=F8(v);if(w&&y){var k=w(u,o,y);if(k!==0)return y===c0?k:-k}}return 0}).map(function(u){var o=u[r];return o?tt(tt({},u),se({},r,nC(o,t,r))):u}):i}function Pce(e){var t=e.prefixCls,r=e.mergedColumns,n=e.onSorterChange,i=e.sortDirections,a=e.tableLocale,u=e.showSorterTooltip,o=C.exports.useState(rC(r,!0)),f=Le(o,2),p=f[0],v=f[1],y=C.exports.useMemo(function(){var A=!0,I=rC(r,!1);if(!I.length)return p;var O=[];function N(B){A?O.push(B):O.push(tt(tt({},B),{sortOrder:null}))}var L=null;return I.forEach(function(B){L===null?(N(B),B.sortOrder&&(B.multiplePriority===!1?A=!1:L=!0)):(L&&B.multiplePriority!==!1||(A=!1),N(B))}),O},[r,p]),w=C.exports.useMemo(function(){var A=y.map(function(I){var O=I.column,N=I.sortOrder;return{column:O,order:N}});return{sortColumns:A,sortColumn:A[0]&&A[0].column,sortOrder:A[0]&&A[0].order}},[y]);function k(A){var I;A.multiplePriority===!1||!y.length||y[0].multiplePriority===!1?I=[A]:I=[].concat(wt(y.filter(function(O){var N=O.key;return N!==A.key})),[A]),v(I),n(B8(I),I)}var T=function(I){return qz(t,I,y,k,i,a,u)},R=function(){return B8(y)};return[T,y,w,R]}function Gz(e,t){return e.map(function(r){var n=tt({},r);return n.title=Rx(r.title,t),"children"in n&&(n.children=Gz(n.children,t)),n})}function Mce(e){var t=C.exports.useCallback(function(r){return Gz(r,e)},[e]);return[t]}var Ice=[];function Rce(e,t){var r,n=e.prefixCls,i=e.className,a=e.style,u=e.size,o=e.bordered,f=e.dropdownPrefixCls,p=e.dataSource,v=e.pagination,y=e.rowSelection,w=e.rowKey,k=w===void 0?"key":w,T=e.rowClassName,R=e.columns,A=e.children,I=e.childrenColumnName,O=e.onChange,N=e.getPopupContainer,L=e.loading,B=e.expandIcon,j=e.expandable,G=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=Le(We,2);Be[0],Be[1]});var ge=C.exports.useMemo(function(){return R||jS(A)},[R,A]),ne=C.exports.useMemo(function(){return ge.some(function(We){return We.responsive})},[ge]),de=kN(ne),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(At){return We.has(At)})})},[ge,de]),ye=Si(e,["className","style","columns"]),Re=C.exports.useContext(Gs),Te=C.exports.useContext(zr),ke=Te.locale,ze=ke===void 0?zl:ke,Ie=Te.renderEmpty,Ne=Te.direction,De=u||Re,Ve=tt(tt({},ze.Table),J),Ge=p||Ice,je=C.exports.useContext(zr),ct=je.getPrefixCls,pt=ct("table",n),Tt=ct("dropdown",f),Ye=tt({childrenColumnName:I,expandIconColumnIndex:H},j),Pt=Ye.childrenColumnName,mt=Pt===void 0?"children":Pt,It=C.exports.useMemo(function(){return Ge.some(function(We){return We==null?void 0:We[mt]})?"nest":G||j&&j.expandedRowRender?"row":null},[Ge]),Ct={body:C.exports.useRef()},Dt=C.exports.useMemo(function(){return typeof k=="function"?k:function(We){return We==null?void 0:We[k]}},[k]),lt=mce(Ge,mt,Dt),dt=Le(lt,1),ut=dt[0],it={},ft=function(Be,At){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),v&&v.onChange&&v.onChange(1,Je.pagination.pageSize)),Y&&Y.scrollToFirstRowOnChange!==!1&&Ct.body.current&&Wq(0,{getContainer:function(){return Ct.body.current}}),O==null||O(Je.pagination,Je.filters,Je.sorter,{currentDataSource:D8(nC(Ge,Je.sorterStates,mt),Je.filterStates),action:At})},xt=function(Be,At){ft({sorter:Be,sorterStates:At},"sort",!1)},Wt=Pce({prefixCls:pt,mergedColumns:oe,onSorterChange:xt,sortDirections:le||["ascend","descend"],tableLocale:Ve,showSorterTooltip:Q}),jt=Le(Wt,4),Qt=jt[0],Fe=jt[1],qe=jt[2],Xt=jt[3],cr=C.exports.useMemo(function(){return nC(Ge,Fe,mt)},[Ge,Fe]);it.sorter=Xt(),it.sorterStates=Fe;var Vt=function(Be,At){ft({filters:Be,filterStates:At},"filter",!0)},Ut=pce({prefixCls:pt,locale:Ve,dropdownPrefixCls:Tt,mergedColumns:oe,onFilterChange:Vt,getPopupContainer:N}),rr=Le(Ut,3),xr=rr[0],Or=rr[1],_t=rr[2],qt=D8(cr,Or);it.filters=_t,it.filterStates=Or;var or=C.exports.useMemo(function(){var We={};return Object.keys(_t).forEach(function(Be){_t[Be]!==null&&(We[Be]=_t[Be])}),tt(tt({},qe),{filters:We})},[qe,_t]),$r=Mce(or),kr=Le($r,1),Lt=kr[0],Tr=function(Be,At){ft({pagination:tt(tt({},it.pagination),{current:Be,pageSize:At})},"paginate")},Cr=xce(qt.length,v,Tr),fr=Le(Cr,2),Nt=fr[0],ot=fr[1];it.pagination=v===!1?{}:gce(v,Nt),it.resetPagination=ot;var ht=C.exports.useMemo(function(){if(v===!1||!Nt.pageSize)return qt;var We=Nt.current,Be=We===void 0?1:We,At=Nt.total,bt=Nt.pageSize,Je=bt===void 0?Uz:bt;return qt.length<At?qt.length>Je?qt.slice((Be-1)*Je,Be*Je):qt:qt.slice((Be-1)*Je,Be*Je)},[!!v,qt,Nt&&Nt.current,Nt&&Nt.pageSize,Nt&&Nt.total]),Ot=_ce(y,{prefixCls:pt,data:qt,pageData:ht,getRowKey:Dt,getRecordByKey:ut,expandType:It,childrenColumnName:mt,locale:Ve,getPopupContainer:N}),$t=Le(Ot,2),ur=$t[0],Ir=$t[1],qr=function(Be,At,bt){var Je;return typeof T=="function"?Je=Qe(T(Be,At,bt)):Je=Qe(T),Qe(se({},"".concat(pt,"-row-selected"),Ir.has(Dt(Be,At))),Je)};Ye.__PARENT_RENDER_ICON__=Ye.expandIcon,Ye.expandIcon=Ye.expandIcon||B||yne(Ve),It==="nest"&&Ye.expandIconColumnIndex===void 0?Ye.expandIconColumnIndex=y?1:0:Ye.expandIconColumnIndex>0&&y&&(Ye.expandIconColumnIndex-=1),typeof Ye.indentSize!="number"&&(Ye.indentSize=typeof te=="number"?te:15);var Gr=C.exports.useCallback(function(We){return Lt(ur(xr(Qt(We))))},[Qt,xr,ur]),me,K;if(v!==!1&&(Nt==null?void 0:Nt.total)){var q;Nt.size?q=Nt.size:q=De==="small"||De==="middle"?"small":void 0;var ce=function(Be){return S(Tte,{...Nt,className:Qe("".concat(pt,"-pagination ").concat(pt,"-pagination-").concat(Be),Nt.className),size:q})},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 Ae;typeof L=="boolean"?Ae={spinning:L}:ar(L)==="object"&&(Ae=tt({spinning:!0},L));var He=Qe("".concat(pt,"-wrapper"),se({},"".concat(pt,"-wrapper-rtl"),Ne==="rtl"),i);return S("div",{ref:t,className:He,style:a,children:Xe($S,{spinning:!1,...Ae,children:[me,S(xd,{...ye,columns:oe,direction:Ne,expandable:Ye,prefixCls:pt,className:Qe((r={},se(r,"".concat(pt,"-middle"),De==="middle"),se(r,"".concat(pt,"-small"),De==="small"),se(r,"".concat(pt,"-bordered"),o),se(r,"".concat(pt,"-empty"),Ge.length===0),r)),data:ht,rowKey:Dt,rowClassName:qr,emptyText:J&&J.emptyText||(Ie||gS)("Table"),internalHooks:u0,internalRefs:Ct,transformColumns:Gr}),K]})})}var Oce=C.exports.forwardRef(Rce),Wl=Oce;Wl.SELECTION_COLUMN=gu;Wl.EXPAND_COLUMN=xd.EXPAND_COLUMN;Wl.SELECTION_ALL=J4;Wl.SELECTION_INVERT=eC;Wl.SELECTION_NONE=tC;Wl.Column=vne;Wl.ColumnGroup=gne;Wl.Summary=pz;const Ace=Wl;var Zz=C.exports.createContext(null),Xz=C.exports.createContext(null);function Nce(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function zce(e){var t=e||{},r=t.label,n=t.value,i=t.children,a=n||"value";return{_title:r?[r]:["title","label"],value:a,key:a,children:i||"children"}}function iC(e){return!e||e.disabled||e.disableCheckbox||e.checkable===!1}function Dce(e,t){var r=[];function n(i){i.forEach(function(a){var u=a[t.children];u&&(r.push(a[t.value]),n(u))})}return n(e),r}function V8(e){return e==null}var Lce={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Fce=function(t,r){var n=zA(),i=n.prefixCls,a=n.multiple,u=n.searchValue,o=n.toggleOpen,f=n.open,p=n.notFoundContent,v=C.exports.useContext(Xz),y=v.virtual,w=v.listHeight,k=v.listItemHeight,T=v.treeData,R=v.fieldNames,A=v.onSelect,I=v.dropdownMatchSelectWidth,O=v.treeExpandAction,N=C.exports.useContext(Zz),L=N.checkable,B=N.checkedKeys,j=N.halfCheckedKeys,G=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,ne=N.loadData,de=N.treeLoadedKeys,oe=N.treeMotion,ye=N.onTreeLoad,Re=N.keyEntities,Te=C.exports.useRef(),ke=hv(function(){return T},[f,T],function(xt,Wt){return Wt[0]&&xt[1]!==Wt[1]}),ze=C.exports.useMemo(function(){return L?{checked:B,halfChecked:j}:null},[L,B,j]);C.exports.useEffect(function(){if(f&&!a&&B.length){var xt;(xt=Te.current)===null||xt===void 0||xt.scrollTo({key:B[0]})}},[f]);var Ie=String(u).toLowerCase(),Ne=function(Wt){return Ie?String(Wt[ge]).toLowerCase().includes(Ie):!1},De=C.exports.useState(te),Ve=Le(De,2),Ge=Ve[0],je=Ve[1],ct=C.exports.useState(null),pt=Le(ct,2),Tt=pt[0],Ye=pt[1],Pt=C.exports.useMemo(function(){return G?wt(G):u?Tt:Ge},[Ge,Tt,G,u]);C.exports.useEffect(function(){u&&Ye(Dce(T,R))},[u]);var mt=function(Wt){je(Wt),Ye(Wt),Y&&Y(Wt)},It=function(Wt){Wt.preventDefault()},Ct=function(Wt,jt){var Qt=jt.node;L&&iC(Qt)||(A(Qt.key,{selected:!B.includes(Qt.key)}),a||o(!1))},Dt=C.exports.useState(null),lt=Le(Dt,2),dt=lt[0],ut=lt[1],it=Re[dt];if(C.exports.useImperativeHandle(r,function(){var xt;return{scrollTo:(xt=Te.current)===null||xt===void 0?void 0:xt.scrollTo,onKeyDown:function(jt){var Qt,Fe=jt.which;switch(Fe){case Et.UP:case Et.DOWN:case Et.LEFT:case Et.RIGHT:(Qt=Te.current)===null||Qt===void 0||Qt.onKeyDown(jt);break;case Et.ENTER:{if(it){var qe=(it==null?void 0:it.node)||{},Xt=qe.selectable,cr=qe.value;Xt!==!1&&Ct(null,{node:{key:dt},selected:!B.includes(cr)})}break}case Et.ESC:o(!1)}},onKeyUp:function(){}}}),ke.length===0)return S("div",{role:"listbox",className:"".concat(i,"-empty"),onMouseDown:It,children:p});var ft={fieldNames:R};return de&&(ft.loadedKeys=de),Pt&&(ft.expandedKeys=Pt),Xe("div",{onMouseDown:It,children:[it&&f&&S("span",{style:Lce,"aria-live":"assertive",children:it.node.value}),S(Dx,{ref:Te,focusable:!1,prefixCls:"".concat(i,"-tree"),treeData:ke,height:w,itemHeight:k,virtual:y!==!1&&I!==!1,multiple:a,icon:le,showIcon:J,switcherIcon:Z,showLine:Q,loadData:u?null:ne,motion:oe,activeKey:dt,checkable:L,checkStrictly:!0,checkedKeys:ze,selectedKeys:L?[]:B,defaultExpandAll:H,...ft,onActiveChange:ut,onSelect:Ct,onCheck:Ct,onExpand:mt,onLoad:ye,filterTreeNode:Ne,expandAction:O})]})},Yz=C.exports.forwardRef(Fce);Yz.displayName="OptionList";var WS=function(){return null},Qz="SHOW_ALL",qS="SHOW_PARENT",Lx="SHOW_CHILD";function j8(e,t,r,n){var i=new Set(e);return t===Lx?e.filter(function(a){var u=r[a];return!(u&&u.children&&u.children.some(function(o){var f=o.node;return i.has(f[n.value])})&&u.children.every(function(o){var f=o.node;return iC(f)||i.has(f[n.value])}))}):t===qS?e.filter(function(a){var u=r[a],o=u?u.parent:null;return!(o&&!iC(o.node)&&i.has(o.key))}):e}var $ce=["children","value"];function Jz(e){return lo(e).map(function(t){if(!C.exports.isValidElement(t)||!t.type)return null;var r=t,n=r.key,i=r.props,a=i.children,u=i.value,o=Mr(i,$ce),f=ve({key:n,value:u},o),p=Jz(a);return p.length&&(f.children=p),f}).filter(function(t){return t})}function oC(e){if(!e)return e;var t=ve({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Bn(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),t}}),t}function Bce(e,t,r,n,i,a){var u=null,o=null;function f(){function p(v){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return v.map(function(k,T){var R="".concat(y,"-").concat(T),A=k[a.value],I=r.includes(A),O=p(k[a.children]||[],R,I),N=S(WS,{...k,children:O.map(function(B){return B.node})});if(t===A&&(u=N),I){var L={pos:R,node:N,children:O};return w||o.push(L),L}return null}).filter(function(k){return k})}o||(o=[],p(n),o.sort(function(v,y){var w=v.node.props.value,k=y.node.props.value,T=r.indexOf(w),R=r.indexOf(k);return T-R}))}Object.defineProperty(e,"triggerNode",{get:function(){return Bn(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),f(),u}}),Object.defineProperty(e,"allCheckedNodes",{get:function(){return Bn(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),f(),i?o:o.map(function(v){var y=v.node;return y})}})}function Vce(e,t){var r=t.id,n=t.pId,i=t.rootPId,a={},u=[],o=e.map(function(f){var p=ve({},f),v=p[r];return a[v]=p,p.key=p.key||v,p});return o.forEach(function(f){var p=f[n],v=a[p];v&&(v.children=v.children||[],v.children.push(f)),(p===i||!v&&i===null)&&u.push(f)}),u}function jce(e,t,r){return C.exports.useMemo(function(){return e?r?Vce(e,ve({id:"id",pId:"pId",rootPId:null},r!==!0?r:{})):e:Jz(t)},[t,r,e])}const Uce=function(e){var t=C.exports.useRef({valueLabels:new Map});return C.exports.useMemo(function(){var r=t.current.valueLabels,n=new Map,i=e.map(function(a){var u,o=a.value,f=(u=a.label)!==null&&u!==void 0?u:r.get(o);return n.set(o,f),ve(ve({},a),{},{label:f})});return t.current.valueLabels=n,[i]},[e])};function U8(e){var t=C.exports.useRef();t.current=e;var r=C.exports.useCallback(function(){return t.current.apply(t,arguments)},[]);return r}const Kce=function(e,t){return C.exports.useMemo(function(){var r=Ex(e,{fieldNames:t,initWrapper:function(i){return ve(ve({},i),{},{valueEntities:new Map})},processEntity:function(i,a){var u=i.node[t.value];a.valueEntities.set(u,i)}});return r},[e,t])},Hce=function(e,t,r,n){return C.exports.useMemo(function(){var i=e.map(function(f){var p=f.value;return p}),a=t.map(function(f){var p=f.value;return p}),u=i.filter(function(f){return!n[f]});if(r){var o=Ml(i,!0,n);i=o.checkedKeys,a=o.halfCheckedKeys}return[Array.from(new Set([].concat(wt(u),wt(i)))),a]},[e,t,r,n])},Wce=function(e,t,r){var n=r.treeNodeFilterProp,i=r.filterTreeNode,a=r.fieldNames,u=a.children;return C.exports.useMemo(function(){if(!t||i===!1)return e;var o;if(typeof i=="function")o=i;else{var f=t.toUpperCase();o=function(y,w){var k=w[n];return String(k).toUpperCase().includes(f)}}function p(v){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return v.map(function(w){var k=w[u],T=y||o(t,oC(w)),R=p(k||[],T);return T||R.length?ve(ve({},w),{},se({isLeaf:void 0},u,R)):null}).filter(function(w){return w})}return p(e)},[e,t,u,n,i])};var qce=["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 Gce(e){return!e||ar(e)!=="object"}var Zce=C.exports.forwardRef(function(e,t){var r=e.id,n=e.prefixCls,i=n===void 0?"rc-tree-select":n,a=e.value,u=e.defaultValue,o=e.onChange,f=e.onSelect,p=e.onDeselect,v=e.searchValue,y=e.inputValue,w=e.onSearch,k=e.autoClearSearchValue,T=k===void 0?!0:k,R=e.filterTreeNode,A=e.treeNodeFilterProp,I=A===void 0?"value":A,O=e.showCheckedStrategy,N=O===void 0?Lx:O,L=e.treeNodeLabelProp,B=e.multiple,j=e.treeCheckable,G=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,ne=e.treeDefaultExpandAll,de=e.treeExpandedKeys,oe=e.treeDefaultExpandedKeys,ye=e.onTreeExpand,Re=e.treeExpandAction,Te=e.virtual,ke=e.listHeight,ze=ke===void 0?200:ke,Ie=e.listItemHeight,Ne=Ie===void 0?20:Ie,De=e.onDropdownVisibleChange,Ve=e.dropdownMatchSelectWidth,Ge=Ve===void 0?!0:Ve,je=e.treeLine,ct=e.treeIcon,pt=e.showTreeIcon,Tt=e.switcherIcon,Ye=e.treeMotion,Pt=Mr(e,qce),mt=oN(r),It=j&&!G,Ct=j||G,Dt=G||H,lt=Ct||B,dt=Yi(u,{value:a}),ut=Le(dt,2),it=ut[0],ft=ut[1],xt=C.exports.useMemo(function(){return zce(te)},[JSON.stringify(te)]),Wt=Yi("",{value:v!==void 0?v:y,postState:function(xe){return xe||""}}),jt=Le(Wt,2),Qt=jt[0],Fe=jt[1],qe=function(xe){Fe(xe),w==null||w(xe)},Xt=jce(le,J,Y),cr=Kce(Xt,xt),Vt=cr.keyEntities,Ut=cr.valueEntities,rr=C.exports.useCallback(function(ae){var xe=[],Ee=[];return ae.forEach(function(be){Ut.has(be)?Ee.push(be):xe.push(be)}),{missingRawValues:xe,existRawValues:Ee}},[Ut]),xr=Wce(Xt,Qt,{fieldNames:xt,treeNodeFilterProp:I,filterTreeNode:R}),Or=C.exports.useCallback(function(ae){if(ae){if(L)return ae[L];for(var xe=xt._title,Ee=0;Ee<xe.length;Ee+=1){var be=ae[xe[Ee]];if(be!==void 0)return be}}},[xt,L]),_t=C.exports.useCallback(function(ae){var xe=Nce(ae);return xe.map(function(Ee){return Gce(Ee)?{value:Ee}:Ee})},[]),qt=C.exports.useCallback(function(ae){var xe=_t(ae);return xe.map(function(Ee){var be=Ee.label,Ce=Ee.value,Ae=Ee.halfChecked,He,We=Ut.get(Ce);if(We){var Be;be=(Be=be)!==null&&Be!==void 0?Be:Or(We.node),He=We.node.disabled}else if(be===void 0){var At=_t(it).find(function(bt){return bt.value===Ce});be=At.label}return{label:be,value:Ce,halfChecked:Ae,disabled:He}})},[Ut,Or,_t,it]),or=C.exports.useMemo(function(){return _t(it)},[_t,it]),$r=C.exports.useMemo(function(){var ae=[],xe=[];return or.forEach(function(Ee){Ee.halfChecked?xe.push(Ee):ae.push(Ee)}),[ae,xe]},[or]),kr=Le($r,2),Lt=kr[0],Tr=kr[1],Cr=C.exports.useMemo(function(){return Lt.map(function(ae){return ae.value})},[Lt]),fr=Hce(Lt,Tr,It,Vt),Nt=Le(fr,2),ot=Nt[0],ht=Nt[1],Ot=C.exports.useMemo(function(){var ae=j8(ot,N,Vt,xt),xe=ae.map(function(Ae){var He,We,Be;return(He=(We=Vt[Ae])===null||We===void 0||(Be=We.node)===null||Be===void 0?void 0:Be[xt.value])!==null&&He!==void 0?He:Ae}),Ee=xe.map(function(Ae){var He=Lt.find(function(We){return We.value===Ae});return{value:Ae,label:He==null?void 0:He.label}}),be=qt(Ee),Ce=be[0];return!lt&&Ce&&V8(Ce.value)&&V8(Ce.label)?[]:be.map(function(Ae){var He;return ve(ve({},Ae),{},{label:(He=Ae.label)!==null&&He!==void 0?He:Ae.value})})},[xt,lt,ot,Lt,qt,N,Vt]),$t=Uce(Ot),ur=Le($t,1),Ir=ur[0],qr=U8(function(ae,xe,Ee){var be=qt(ae);if(ft(be),T&&Fe(""),o){var Ce=ae;if(It){var Ae=j8(ae,N,Vt,xt);Ce=Ae.map(function(ir){var gr=Ut.get(ir);return gr?gr.node[xt.value]:ir})}var He=xe||{triggerValue:void 0,selected:void 0},We=He.triggerValue,Be=He.selected,At=Ce;if(G){var bt=Tr.filter(function(ir){return!Ce.includes(ir.value)});At=[].concat(wt(At),wt(bt))}var Je=qt(At),Rt={preValue:Lt,triggerValue:We},Bt=!0;(G||Ee==="selection"&&!Be)&&(Bt=!1),Bce(Rt,We,ae,Xt,Bt,xt),Ct?Rt.checked=Be:Rt.selected=Be;var vr=Dt?Je:Je.map(function(ir){return ir.value});o(lt?vr:vr[0],Dt?null:Je.map(function(ir){return ir.label}),Rt)}}),Gr=C.exports.useCallback(function(ae,xe){var Ee,be=xe.selected,Ce=xe.source,Ae=Vt[ae],He=Ae==null?void 0:Ae.node,We=(Ee=He==null?void 0:He[xt.value])!==null&&Ee!==void 0?Ee:ae;if(!lt)qr([We],{selected:!0,triggerValue:We},"option");else{var Be=be?[].concat(wt(Cr),[We]):ot.filter(function(gr){return gr!==We});if(It){var At=rr(Be),bt=At.missingRawValues,Je=At.existRawValues,Rt=Je.map(function(gr){return Ut.get(gr).key}),Bt;if(be){var vr=Ml(Rt,!0,Vt);Bt=vr.checkedKeys}else{var ir=Ml(Rt,{checked:!1,halfCheckedKeys:ht},Vt);Bt=ir.checkedKeys}Be=[].concat(wt(bt),wt(Bt.map(function(gr){return Vt[gr].node[xt.value]})))}qr(Be,{selected:be,triggerValue:We},Ce||"option")}be||!lt?f==null||f(We,oC(He)):p==null||p(We,oC(He))},[rr,Ut,Vt,xt,lt,Cr,qr,It,f,p,ot,ht]),me=C.exports.useCallback(function(ae){if(De){var xe={};Object.defineProperty(xe,"documentClickClose",{get:function(){return Bn(!1,"Second param of `onDropdownVisibleChange` has been removed."),!1}}),De(ae,xe)}},[De]),K=U8(function(ae,xe){var Ee=ae.map(function(be){return be.value});if(xe.type==="clear"){qr(Ee,{},"selection");return}xe.values.length&&Gr(xe.values[0].value,{selected:!1,source:"selection"})}),q=C.exports.useMemo(function(){return{virtual:Te,dropdownMatchSelectWidth:Ge,listHeight:ze,listItemHeight:Ne,treeData:xr,fieldNames:xt,onSelect:Gr,treeExpandAction:Re}},[Te,Ge,ze,Ne,xr,xt,Gr,Re]),ce=C.exports.useMemo(function(){return{checkable:Ct,loadData:Z,treeLoadedKeys:Q,onTreeLoad:ge,checkedKeys:ot,halfCheckedKeys:ht,treeDefaultExpandAll:ne,treeExpandedKeys:de,treeDefaultExpandedKeys:oe,onTreeExpand:ye,treeIcon:ct,treeMotion:Ye,showTreeIcon:pt,switcherIcon:Tt,treeLine:je,treeNodeFilterProp:I,keyEntities:Vt}},[Ct,Z,Q,ge,ot,ht,ne,de,oe,ye,ct,Ye,pt,Tt,je,I,Vt]);return S(Xz.Provider,{value:q,children:S(Zz.Provider,{value:ce,children:S(iN,{ref:t,...Pt,id:mt,prefixCls:i,mode:lt?"multiple":void 0,displayValues:Ir,onDisplayValuesChange:K,searchValue:Qt,onSearch:qe,OptionList:Yz,emptyOptions:!Xt.length,onDropdownVisibleChange:me,dropdownMatchSelectWidth:Ge})})})}),Iv=Zce;Iv.TreeNode=WS;Iv.SHOW_ALL=Qz;Iv.SHOW_PARENT=qS;Iv.SHOW_CHILD=Lx;var Xce=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},Yce=function(t,r){var n,i=t.prefixCls,a=t.size,u=t.disabled,o=t.bordered,f=o===void 0?!0:o,p=t.className,v=t.treeCheckable,y=t.multiple,w=t.listHeight,k=w===void 0?256:w,T=t.listItemHeight,R=T===void 0?26:T,A=t.placement,I=t.notFoundContent,O=t.switcherIcon,N=t.treeLine,L=t.getPopupContainer,B=t.dropdownClassName,j=t.popupClassName,G=t.treeIcon,H=G===void 0?!1:G,te=t.transitionName,Y=t.choiceTransitionName,le=Y===void 0?"":Y,J=t.status,Z=t.showArrow,Q=t.treeExpandAction,ge=Xce(t,["prefixCls","size","disabled","bordered","className","treeCheckable","multiple","listHeight","listItemHeight","placement","notFoundContent","switcherIcon","treeLine","getPopupContainer","dropdownClassName","popupClassName","treeIcon","transitionName","choiceTransitionName","status","showArrow","treeExpandAction"]),ne=C.exports.useContext(zr),de=ne.getPopupContainer,oe=ne.getPrefixCls,ye=ne.renderEmpty,Re=ne.direction,Te=ne.virtual,ke=ne.dropdownMatchSelectWidth,ze=C.exports.useContext(Gs),Ie=oe("select",i),Ne=oe("select-tree",i),De=oe("tree-select",i),Ve=vh(Ie,Re),Ge=Ve.compactSize,je=Ve.compactItemClassnames,ct=Qe(j||B,"".concat(De,"-dropdown"),se({},"".concat(De,"-dropdown-rtl"),Re==="rtl")),pt=!!(v||y),Tt=Z!==void 0?Z:ge.loading||!pt,Ye=C.exports.useContext(ya),Pt=Ye.status,mt=Ye.hasFeedback,It=Ye.isFormItemInput,Ct=Ye.feedbackIcon,Dt=xv(Pt,J),lt=bN(tt(tt({},ge),{multiple:pt,showArrow:Tt,hasFeedback:mt,feedbackIcon:Ct,prefixCls:Ie})),dt=lt.suffixIcon,ut=lt.removeIcon,it=lt.clearIcon,ft;I!==void 0?ft=I:ft=(ye||gS)("Select");var xt=Si(ge,["suffixIcon","itemIcon","removeIcon","clearIcon","switcherIcon"]),Wt=function(){return A!==void 0?A:Re==="rtl"?"bottomRight":"bottomLeft"},jt=Ge||a||ze,Qt=C.exports.useContext(nc),Fe=u!=null?u:Qt,qe=Qe(!i&&De,(n={},se(n,"".concat(Ie,"-lg"),jt==="large"),se(n,"".concat(Ie,"-sm"),jt==="small"),se(n,"".concat(Ie,"-rtl"),Re==="rtl"),se(n,"".concat(Ie,"-borderless"),!f),se(n,"".concat(Ie,"-in-form-item"),It),n),Vu(Ie,Dt,mt),je,p),Xt=oe();return S(Iv,{virtual:Te,dropdownMatchSelectWidth:ke,disabled:Fe,...xt,ref:r,prefixCls:Ie,className:qe,listHeight:k,listItemHeight:R,treeCheckable:v&&S("span",{className:"".concat(Ie,"-tree-checkbox-inner")}),treeLine:!!N,inputIcon:dt,multiple:y,placement:Wt(),removeIcon:ut,clearIcon:it,switcherIcon:function(Vt){return Dz(Ne,O,N,Vt)},showTreeIcon:H,notFoundContent:ft,getPopupContainer:L||de,treeMotion:null,dropdownClassName:ct,choiceTransitionName:Dl(Xt,"",le),transitionName:Dl(Xt,pN(A),te),showArrow:mt||Z,treeExpandAction:Q})},Qce=C.exports.forwardRef(Yce),Rv=Qce;Rv.TreeNode=WS;Rv.SHOW_ALL=Qz;Rv.SHOW_PARENT=qS;Rv.SHOW_CHILD=Lx;const eD=Rv;var Jce={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 ede=Jce;var tD=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:ede})})};tD.displayName="CopyOutlined";const tde=C.exports.forwardRef(tD);var rde={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 nde=rde;var rD=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:nde})})};rD.displayName="EditOutlined";const ide=C.exports.forwardRef(rD);var ode=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,r=[],n=0;n<e.rangeCount;n++)r.push(e.getRangeAt(n));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||r.forEach(function(i){e.addRange(i)}),t&&t.focus()}},ade=ode,K8={"text/plain":"Text","text/html":"Url",default:"Text"},sde="Copy to clipboard: #{key}, Enter";function lde(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function ude(e,t){var r,n,i,a,u,o,f=!1;t||(t={}),r=t.debug||!1;try{i=ade(),a=document.createRange(),u=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(v){if(v.stopPropagation(),t.format)if(v.preventDefault(),typeof v.clipboardData>"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var y=K8[t.format]||K8.default;window.clipboardData.setData(y,e)}else v.clipboardData.clearData(),v.clipboardData.setData(t.format,e);t.onCopy&&(v.preventDefault(),t.onCopy(v.clipboardData))}),document.body.appendChild(o),a.selectNodeContents(o),u.addRange(a);var p=document.execCommand("copy");if(!p)throw new Error("copy command was unsuccessful");f=!0}catch(v){r&&console.error("unable to copy using execCommand: ",v),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),f=!0}catch(y){r&&console.error("unable to copy using clipboardData: ",y),r&&console.error("falling back to prompt"),n=lde("message"in t?t.message:sde),window.prompt(n,e)}}finally{u&&(typeof u.removeRange=="function"?u.removeRange(a):u.removeAllRanges()),o&&document.body.removeChild(o),i()}return f}var cde=ude,dde={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 fde=dde;var nD=function(t,r){return S(dn,{...ve(ve({},t),{},{ref:r,icon:fde})})};nD.displayName="EnterOutlined";const hde=C.exports.forwardRef(nD);var pde=function(t){var r=t.prefixCls,n=t["aria-label"],i=t.className,a=t.style,u=t.direction,o=t.maxLength,f=t.autoSize,p=f===void 0?!0:f,v=t.value,y=t.onSave,w=t.onCancel,k=t.onEnd,T=t.component,R=t.enterIcon,A=R===void 0?S(hde,{}):R,I=C.exports.useRef(null),O=C.exports.useRef(!1),N=C.exports.useRef(),L=C.exports.useState(v),B=Le(L,2),j=B[0],G=B[1];C.exports.useEffect(function(){G(v)},[v]),C.exports.useEffect(function(){if(I.current&&I.current.resizableTextArea){var de=I.current.resizableTextArea.textArea;de.focus();var oe=de.value.length;de.setSelectionRange(oe,oe)}},[]);var H=function(oe){var ye=oe.target;G(ye.value.replace(/[\n\r]/g,""))},te=function(){O.current=!0},Y=function(){O.current=!1},le=function(oe){var ye=oe.keyCode;O.current||(N.current=ye)},J=function(){y(j.trim())},Z=function(oe){var ye=oe.keyCode,Re=oe.ctrlKey,Te=oe.altKey,ke=oe.metaKey,ze=oe.shiftKey;N.current===ye&&!O.current&&!Re&&!Te&&!ke&&!ze&&(ye===Et.ENTER?(J(),k==null||k()):ye===Et.ESC&&w())},Q=function(){J()},ge=T?"".concat(r,"-").concat(T):"",ne=Qe(r,"".concat(r,"-edit-content"),se({},"".concat(r,"-rtl"),u==="rtl"),i,ge);return Xe("div",{className:ne,style:a,children:[S(N9,{ref:I,maxLength:o,value:j,onChange:H,onKeyDown:le,onKeyUp:Z,onCompositionStart:te,onCompositionEnd:Y,onBlur:Q,"aria-label":n,rows:1,autoSize:p}),A!==null?Ni(A,{className:"".concat(r,"-edit-content-confirm")}):null]})};const mde=pde;function E2(e,t){return C.exports.useMemo(function(){var r=!!e;return[r,tt(tt({},t),r&&ar(e)==="object"?e:null)]},[e])}var vde=function(t,r){var n=C.exports.useRef(!1);C.exports.useEffect(function(){n.current?t():n.current=!0},r)};const gde=vde;var yde=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},xde=C.exports.forwardRef(function(e,t){var r=e.prefixCls,n=e.component,i=n===void 0?"article":n,a=e.className,u=e.setContentRef,o=e.children,f=e.direction,p=yde(e,["prefixCls","component","className","setContentRef","children","direction"]),v=C.exports.useContext(zr),y=v.getPrefixCls,w=v.direction,k=f!=null?f:w,T=t;u&&(T=ta(t,u));var R=y("typography",r),A=Qe(R,se({},"".concat(R,"-rtl"),k==="rtl"),a);return S(i,{className:A,ref:T,...p,children:o})});const iD=xde;function oD(e){var t=ar(e);return t==="string"||t==="number"}function _de(e){var t=0;return e.forEach(function(r){oD(r)?t+=String(r).length:t+=1}),t}function H8(e,t){for(var r=0,n=[],i=0;i<e.length;i+=1){if(r===t)return n;var a=e[i],u=oD(a),o=u?String(a).length:1,f=r+o;if(f>t){var p=t-r;return n.push(String(a).slice(0,p)),n}n.push(a),r=f}return e}var bde=0,Oy=1,W8=2,k2=3,q8=4,wde=function(t){var r=t.enabledMeasure,n=t.children,i=t.text,a=t.width,u=t.fontSize,o=t.rows,f=t.onEllipsis,p=C.exports.useState([0,0,0]),v=Le(p,2),y=Le(v[0],3),w=y[0],k=y[1],T=y[2],R=v[1],A=C.exports.useState(bde),I=Le(A,2),O=I[0],N=I[1],L=C.exports.useState(0),B=Le(L,2),j=B[0],G=B[1],H=C.exports.useRef(null),te=C.exports.useRef(null),Y=C.exports.useMemo(function(){return lo(i)},[i]),le=C.exports.useMemo(function(){return _de(Y)},[Y]),J=C.exports.useMemo(function(){return!r||O!==k2?n(Y,!1):n(H8(Y,k),k<le)},[r,O,n,Y,k,le]);mi(function(){r&&a&&u&&le&&(N(Oy),R([0,Math.ceil(le/2),le]))},[r,a,u,i,le,o]),mi(function(){var ne;O===Oy&&G(((ne=H.current)===null||ne===void 0?void 0:ne.offsetHeight)||0)},[O]),mi(function(){var ne,de;if(j){if(O===Oy){var oe=((ne=te.current)===null||ne===void 0?void 0:ne.offsetHeight)||0,ye=o*j;oe<=ye?(N(q8),f(!1)):N(W8)}else if(O===W8)if(w!==T){var Re=((de=te.current)===null||de===void 0?void 0:de.offsetHeight)||0,Te=o*j,ke=w,ze=T;w===T-1?ze=w:Re<=Te?ke=k:ze=k;var Ie=Math.ceil((ke+ze)/2);R([ke,Ie,ze])}else N(k2),f(!0)}},[O,w,T,o,j]);var Z={width:a,whiteSpace:"normal",margin:0,padding:0},Q=function(de,oe,ye){return S("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(u/2)*2},ye),children:de})},ge=function(de,oe){var ye=H8(Y,de);return Q(n(ye,!0),oe,Z)};return Xe(Ar,{children:[J,r&&O!==k2&&O!==q8&&Xe(Ar,{children:[Q("lg",H,{wordBreak:"keep-all",whiteSpace:"nowrap"}),O===Oy?Q(n(Y,!1),te,Z):ge(k,te)]})]})};const Cde=wde;var Sde=function(t){var r=t.enabledEllipsis,n=t.isEllipsis,i=t.children,a=t.tooltipProps;return!(a!=null&&a.title)||!r?i:S(yo,{open:n?void 0:!1,...a,children:i})};const Ede=Sde;var kde=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};function Tde(e,t){var r=e.mark,n=e.code,i=e.underline,a=e.delete,u=e.strong,o=e.keyboard,f=e.italic,p=t;function v(y,w){!y||(p=C.exports.createElement(w,{},p))}return v(u,"strong"),v(i,"u"),v(a,"del"),v(n,"code"),v(r,"mark"),v(o,"kbd"),v(f,"i"),p}function Ay(e,t,r){return e===!0||e===void 0?t:e||r&&t}function G8(e){return e===!1?[!1,!1]:Array.isArray(e)?e:[e]}var Pde="...",Mde=C.exports.forwardRef(function(e,t){var r,n,i,a=e.prefixCls,u=e.className,o=e.style,f=e.type,p=e.disabled,v=e.children,y=e.ellipsis,w=e.editable,k=e.copyable,T=e.component,R=e.title,A=kde(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),I=C.exports.useContext(zr),O=I.getPrefixCls,N=I.direction,L=bO("Text")[0],B=C.exports.useRef(null),j=C.exports.useRef(null),G=O("typography",a),H=Si(A,["mark","code","delete","underline","strong","keyboard","italic"]),te=E2(w),Y=Le(te,2),le=Y[0],J=Y[1],Z=Yi(!1,{value:J.editing}),Q=Le(Z,2),ge=Q[0],ne=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)),ne(Je)};gde(function(){var bt;ge||(bt=j.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)},ze=E2(k),Ie=Le(ze,2),Ne=Ie[0],De=Ie[1],Ve=C.exports.useState(!1),Ge=Le(Ve,2),je=Ge[0],ct=Ge[1],pt=C.exports.useRef(),Tt={};De.format&&(Tt.format=De.format);var Ye=function(){window.clearTimeout(pt.current)},Pt=function(Je){var Rt;Je==null||Je.preventDefault(),Je==null||Je.stopPropagation(),cde(De.text||String(v)||"",Tt),ct(!0),Ye(),pt.current=window.setTimeout(function(){ct(!1)},3e3),(Rt=De.onCopy)===null||Rt===void 0||Rt.call(De,Je)};C.exports.useEffect(function(){return Ye},[]);var mt=C.exports.useState(!1),It=Le(mt,2),Ct=It[0],Dt=It[1],lt=C.exports.useState(!1),dt=Le(lt,2),ut=dt[0],it=dt[1],ft=C.exports.useState(!1),xt=Le(ft,2),Wt=xt[0],jt=xt[1],Qt=C.exports.useState(!1),Fe=Le(Qt,2),qe=Fe[0],Xt=Fe[1],cr=C.exports.useState(!1),Vt=Le(cr,2),Ut=Vt[0],rr=Vt[1],xr=C.exports.useState(!0),Or=Le(xr,2),_t=Or[0],qt=Or[1],or=E2(y,{expandable:!1}),$r=Le(or,2),kr=$r[0],Lt=$r[1],Tr=kr&&!Wt,Cr=Lt.rows,fr=Cr===void 0?1:Cr,Nt=C.exports.useMemo(function(){return!Tr||Lt.suffix!==void 0||Lt.onEllipsis||Lt.expandable||le||Ne},[Tr,Lt,le,Ne]);mi(function(){kr&&!Nt&&(Dt(L4("webkitLineClamp")),it(L4("textOverflow")))},[Nt,kr]);var ot=C.exports.useMemo(function(){return Nt?!1:fr===1?ut:Ct},[Nt,ut,Ct]),ht=Tr&&(ot?Ut:qe),Ot=Tr&&fr===1&&ot,$t=Tr&&fr>1&&ot,ur=function(Je){var Rt;jt(!0),(Rt=Lt.onExpand)===null||Rt===void 0||Rt.call(Lt,Je)},Ir=C.exports.useState(0),qr=Le(Ir,2),Gr=qr[0],me=qr[1],K=C.exports.useState(0),q=Le(K,2),ce=q[0],ae=q[1],xe=function(Je,Rt){var Bt=Je.offsetWidth,vr;me(Bt),ae(parseInt((vr=window.getComputedStyle)===null||vr===void 0?void 0:vr.call(window,Rt).fontSize,10)||0)},Ee=function(Je){var Rt;Xt(Je),qe!==Je&&((Rt=Lt.onEllipsis)===null||Rt===void 0||Rt.call(Lt,Je))};C.exports.useEffect(function(){var bt=B.current;if(kr&&ot&&bt){var Je=$t?bt.offsetHeight<bt.scrollHeight:bt.offsetWidth<bt.scrollWidth;Ut!==Je&&rr(Je)}},[kr,ot,v,$t,_t]),C.exports.useEffect(function(){var bt=B.current;if(!(typeof IntersectionObserver>"u"||!bt||!ot||!Tr)){var Je=new IntersectionObserver(function(){qt(!!bt.offsetParent)});return Je.observe(bt),function(){Je.disconnect()}}},[ot,Tr]);var be={};Lt.tooltip===!0?be={title:(r=J.text)!==null&&r!==void 0?r:v}:C.exports.isValidElement(Lt.tooltip)?be={title:Lt.tooltip}:ar(Lt.tooltip)==="object"?be=tt({title:(n=J.text)!==null&&n!==void 0?n:v},Lt.tooltip):be={title:Lt.tooltip};var Ce=C.exports.useMemo(function(){var bt=function(Rt){return["string","number"].includes(ar(Rt))};if(!(!kr||ot)){if(bt(J.text))return J.text;if(bt(v))return v;if(bt(R))return R;if(bt(be.title))return be.title}},[kr,ot,R,be.title,ht]);if(ge)return S(mde,{value:(i=J.text)!==null&&i!==void 0?i:typeof v=="string"?v:"",onSave:Te,onCancel:ke,onEnd:J.onEnd,prefixCls:G,className:u,style:o,direction:N,component:T,maxLength:J.maxLength,autoSize:J.autoSize,enterIcon:J.enterIcon});var Ae=function(){var Je=Lt.expandable,Rt=Lt.symbol;if(!Je)return null;var Bt;return Rt?Bt=Rt:Bt=L.expand,S("a",{className:"".concat(G,"-expand"),onClick:ur,"aria-label":L.expand,children:Bt},"expand")},He=function(){if(!!le){var Je=J.icon,Rt=J.tooltip,Bt=lo(Rt)[0]||L.edit,vr=typeof Bt=="string"?Bt:"";return oe.includes("icon")?S(yo,{title:Rt===!1?"":Bt,children:S(YP,{ref:j,className:"".concat(G,"-edit"),onClick:Re,"aria-label":vr,children:Je||S(ide,{role:"button"})})},"edit"):null}},We=function(){if(!!Ne){var Je=De.tooltips,Rt=De.icon,Bt=G8(Je),vr=G8(Rt),ir=je?Ay(Bt[1],L.copied):Ay(Bt[0],L.copy),gr=je?L.copied:L.copy,Br=typeof ir=="string"?ir:gr;return S(yo,{title:ir,children:S(YP,{className:Qe("".concat(G,"-copy"),je&&"".concat(G,"-copy-success")),onClick:Pt,"aria-label":Br,children:je?Ay(vr[1],S(vN,{}),!0):Ay(vr[0],S(tde,{}),!0)})},"copy")}},Be=function(Je){return[Je&&Ae(),He(),We()]},At=function(Je){return[Je&&S("span",{"aria-hidden":!0,children:Pde},"ellipsis"),Lt.suffix,Be(Je)]};return S(Kl,{onResize:xe,disabled:!Tr||ot,children:function(bt){var Je;return S(Ede,{tooltipProps:be,enabledEllipsis:Tr,isEllipsis:ht,children:S(iD,{className:Qe((Je={},se(Je,"".concat(G,"-").concat(f),f),se(Je,"".concat(G,"-disabled"),p),se(Je,"".concat(G,"-ellipsis"),kr),se(Je,"".concat(G,"-single-line"),Tr&&fr===1),se(Je,"".concat(G,"-ellipsis-single-line"),Ot),se(Je,"".concat(G,"-ellipsis-multiple-line"),$t),Je),u),prefixCls:a,style:tt(tt({},o),{WebkitLineClamp:$t?fr:void 0}),component:T,ref:ta(bt,B,t),direction:N,onClick:oe.includes("text")?Re:void 0,"aria-label":Ce==null?void 0:Ce.toString(),title:R,...H,children:S(Cde,{enabledMeasure:Tr&&!ot,text:v,rows:fr,width:Gr,fontSize:ce,onEllipsis:Ee,children:function(Rt,Bt){var vr=Rt;Rt.length&&Bt&&Ce&&(vr=S("span",{"aria-hidden":!0,children:vr},"show-content"));var ir=Tde(e,Xe(Ar,{children:[vr,At(Bt)]}));return ir}})})})}})});const Fx=Mde;var Ide=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},Rde=C.exports.forwardRef(function(e,t){var r=e.ellipsis,n=e.rel,i=Ide(e,["ellipsis","rel"]),a=tt(tt({},i),{rel:n===void 0&&i.target==="_blank"?"noopener noreferrer":n});return delete a.navigate,S(Fx,{...a,ref:t,ellipsis:!!r,component:"a"})});const Ode=Rde;var Ade=C.exports.forwardRef(function(e,t){return S(Fx,{ref:t,...e,component:"div"})});const Nde=Ade;var zde=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},Dde=function(t,r){var n=t.ellipsis,i=zde(t,["ellipsis"]),a=C.exports.useMemo(function(){return n&&ar(n)==="object"?Si(n,["expandable","rows"]):n},[n]);return S(Fx,{ref:r,...i,ellipsis:a,component:"span"})};const Lde=C.exports.forwardRef(Dde);var Fde=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},$de=tX(1,2,3,4,5),Bde=C.exports.forwardRef(function(e,t){var r=e.level,n=r===void 0?1:r,i=Fde(e,["level"]),a;return $de.includes(n)?a="h".concat(n):a="h1",S(Fx,{ref:t,...i,component:a})});const Vde=Bde;var Ov=iD;Ov.Text=Lde;Ov.Link=Ode;Ov.Title=Vde;Ov.Paragraph=Nde;const GS=Ov;var jde={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 Ude=jde;var Kde=C.exports.createContext({});const aD=Kde;var Ny=2,Z8=.16,Hde=.05,Wde=.05,qde=.15,sD=5,lD=4,Gde=[{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 X8(e){var t=e.r,r=e.g,n=e.b,i=G0(t,r,n);return{h:i.h*360,s:i.s,v:i.v}}function zy(e){var t=e.r,r=e.g,n=e.b;return"#".concat(Z0(t,r,n,!1))}function Zde(e,t,r){var n=r/100,i={r:(t.r-e.r)*n+e.r,g:(t.g-e.g)*n+e.g,b:(t.b-e.b)*n+e.b};return i}function Y8(e,t,r){var n;return Math.round(e.h)>=60&&Math.round(e.h)<=240?n=r?Math.round(e.h)-Ny*t:Math.round(e.h)+Ny*t:n=r?Math.round(e.h)+Ny*t:Math.round(e.h)-Ny*t,n<0?n+=360:n>=360&&(n-=360),n}function Q8(e,t,r){if(e.h===0&&e.s===0)return e.s;var n;return r?n=e.s-Z8*t:t===lD?n=e.s+Z8:n=e.s+Hde*t,n>1&&(n=1),r&&t===sD&&n>.1&&(n=.1),n<.06&&(n=.06),Number(n.toFixed(2))}function J8(e,t,r){var n;return r?n=e.v+Wde*t:n=e.v-qde*t,n>1&&(n=1),Number(n.toFixed(2))}function aC(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[],n=ms(e),i=sD;i>0;i-=1){var a=X8(n),u=zy(ms({h:Y8(a,i,!0),s:Q8(a,i,!0),v:J8(a,i,!0)}));r.push(u)}r.push(zy(n));for(var o=1;o<=lD;o+=1){var f=X8(n),p=zy(ms({h:Y8(f,o),s:Q8(f,o),v:J8(f,o)}));r.push(p)}return t.theme==="dark"?Gde.map(function(v){var y=v.index,w=v.opacity,k=zy(Zde(ms(t.backgroundColor||"#141414"),ms(r[y]),w*100));return k}):r}var T2={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"},P2={},M2={};Object.keys(T2).forEach(function(e){P2[e]=aC(T2[e]),P2[e].primary=P2[e][5],M2[e]=aC(T2[e],{theme:"dark",backgroundColor:"#141414"}),M2[e].primary=M2[e][5]});function Xde(e,t){Bn(e,"[@ant-design/icons] ".concat(t))}function eM(e){return ar(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(ar(e.icon)==="object"||typeof e.icon=="function")}function tM(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,r){var n=e[r];switch(r){case"class":t.className=n,delete t.class;break;default:t[r]=n}return t},{})}function sC(e,t,r){return r?tn.createElement(e.tag,ve(ve({key:t},tM(e.attrs)),r),(e.children||[]).map(function(n,i){return sC(n,"".concat(t,"-").concat(e.tag,"-").concat(i))})):tn.createElement(e.tag,ve({key:t},tM(e.attrs)),(e.children||[]).map(function(n,i){return sC(n,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function uD(e){return aC(e)[0]}function cD(e){return e?Array.isArray(e)?e:[e]:[]}var Yde=`
.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);
}
}
`,Qde=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Yde,r=C.exports.useContext(aD),n=r.csp,i=r.prefixCls,a=t;i&&(a=a.replace(/anticon/g,i)),C.exports.useEffect(function(){vv(a,"@ant-design-icons",{prepend:!0,csp:n})},[])},Jde=["icon","className","onClick","style","primaryColor","secondaryColor"],_m={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function efe(e){var t=e.primaryColor,r=e.secondaryColor;_m.primaryColor=t,_m.secondaryColor=r||uD(t),_m.calculated=!!r}function tfe(){return ve({},_m)}var $x=function(t){var r=t.icon,n=t.className,i=t.onClick,a=t.style,u=t.primaryColor,o=t.secondaryColor,f=Mr(t,Jde),p=_m;if(u&&(p={primaryColor:u,secondaryColor:o||uD(u)}),Qde(),Xde(eM(r),"icon should be icon definiton, but got ".concat(r)),!eM(r))return null;var v=r;return v&&typeof v.icon=="function"&&(v=ve(ve({},v),{},{icon:v.icon(p.primaryColor,p.secondaryColor)})),sC(v.icon,"svg-".concat(v.name),ve({className:n,onClick:i,style:a,"data-icon":v.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},f))};$x.displayName="IconReact";$x.getTwoToneColors=tfe;$x.setTwoToneColors=efe;const ZS=$x;function dD(e){var t=cD(e),r=Le(t,2),n=r[0],i=r[1];return ZS.setTwoToneColors({primaryColor:n,secondaryColor:i})}function rfe(){var e=ZS.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var nfe=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];dD("#1890ff");var Bx=C.exports.forwardRef(function(e,t){var r,n=e.className,i=e.icon,a=e.spin,u=e.rotate,o=e.tabIndex,f=e.onClick,p=e.twoToneColor,v=Mr(e,nfe),y=C.exports.useContext(aD),w=y.prefixCls,k=w===void 0?"anticon":w,T=y.rootClassName,R=Qe(T,k,(r={},se(r,"".concat(k,"-").concat(i.name),!!i.name),se(r,"".concat(k,"-spin"),!!a||i.name==="loading"),r),n),A=o;A===void 0&&f&&(A=-1);var I=u?{msTransform:"rotate(".concat(u,"deg)"),transform:"rotate(".concat(u,"deg)")}:void 0,O=cD(p),N=Le(O,2),L=N[0],B=N[1];return S("span",{...ve(ve({role:"img","aria-label":i.name},v),{},{ref:t,tabIndex:A,onClick:f,className:R}),children:S(ZS,{icon:i,primaryColor:L,secondaryColor:B,style:I})})});Bx.displayName="AntdIcon";Bx.getTwoToneColor=rfe;Bx.setTwoToneColor=dD;const ql=Bx;var fD=function(t,r){return S(ql,{...ve(ve({},t),{},{ref:r,icon:Gte})})};fD.displayName="ArrowRightOutlined";const hD=C.exports.forwardRef(fD);var pD=function(t,r){return S(ql,{...ve(ve({},t),{},{ref:r,icon:Ude})})};pD.displayName="DownloadOutlined";const ife=C.exports.forwardRef(pD);var ofe={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 afe=ofe;var mD=function(t,r){return S(ql,{...ve(ve({},t),{},{ref:r,icon:afe})})};mD.displayName="FullscreenExitOutlined";const sfe=C.exports.forwardRef(mD);var lfe={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 ufe=lfe;var vD=function(t,r){return S(ql,{...ve(ve({},t),{},{ref:r,icon:ufe})})};vD.displayName="FullscreenOutlined";const cfe=C.exports.forwardRef(vD);var dfe={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 ffe=dfe;var gD=function(t,r){return S(ql,{...ve(ve({},t),{},{ref:r,icon:ffe})})};gD.displayName="LockOutlined";const lC=C.exports.forwardRef(gD);var hfe={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 pfe=hfe;var yD=function(t,r){return S(ql,{...ve(ve({},t),{},{ref:r,icon:pfe})})};yD.displayName="LogoutOutlined";const mfe=C.exports.forwardRef(yD);var vfe={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 gfe=vfe;var xD=function(t,r){return S(ql,{...ve(ve({},t),{},{ref:r,icon:gfe})})};xD.displayName="MailOutlined";const yfe=C.exports.forwardRef(xD);var _D=function(t,r){return S(ql,{...ve(ve({},t),{},{ref:r,icon:xN})})};_D.displayName="SearchOutlined";const xfe=C.exports.forwardRef(_D);var _fe={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 bfe=_fe;var bD=function(t,r){return S(ql,{...ve(ve({},t),{},{ref:r,icon:bfe})})};bD.displayName="UserOutlined";const wD=C.exports.forwardRef(bD);function CD(e,t){return function(){return e.apply(t,arguments)}}const{toString:SD}=Object.prototype,{getPrototypeOf:XS}=Object,YS=(e=>t=>{const r=SD.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Gl=e=>(e=e.toLowerCase(),t=>YS(t)===e),Vx=e=>t=>typeof t===e,{isArray:Sh}=Array,Xm=Vx("undefined");function wfe(e){return e!==null&&!Xm(e)&&e.constructor!==null&&!Xm(e.constructor)&&Zu(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ED=Gl("ArrayBuffer");function Cfe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ED(e.buffer),t}const Sfe=Vx("string"),Zu=Vx("function"),kD=Vx("number"),QS=e=>e!==null&&typeof e=="object",Efe=e=>e===!0||e===!1,d0=e=>{if(YS(e)!=="object")return!1;const t=XS(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},kfe=Gl("Date"),Tfe=Gl("File"),Pfe=Gl("Blob"),Mfe=Gl("FileList"),Ife=e=>QS(e)&&Zu(e.pipe),Rfe=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||SD.call(e)===t||Zu(e.toString)&&e.toString()===t)},Ofe=Gl("URLSearchParams"),Afe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Av(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),Sh(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{const a=r?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let o;for(n=0;n<u;n++)o=a[n],t.call(null,e[o],o,e)}}function TD(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,i;for(;n-- >0;)if(i=r[n],t===i.toLowerCase())return i;return null}const PD=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),MD=e=>!Xm(e)&&e!==PD;function uC(){const{caseless:e}=MD(this)&&this||{},t={},r=(n,i)=>{const a=e&&TD(t,i)||i;d0(t[a])&&d0(n)?t[a]=uC(t[a],n):d0(n)?t[a]=uC({},n):Sh(n)?t[a]=n.slice():t[a]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&Av(arguments[n],r);return t}const Nfe=(e,t,r,{allOwnKeys:n}={})=>(Av(t,(i,a)=>{r&&Zu(i)?e[a]=CD(i,r):e[a]=i},{allOwnKeys:n}),e),zfe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Dfe=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Lfe=(e,t,r,n)=>{let i,a,u;const o={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)u=i[a],(!n||n(u,e,t))&&!o[u]&&(t[u]=e[u],o[u]=!0);e=r!==!1&&XS(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Ffe=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},$fe=e=>{if(!e)return null;if(Sh(e))return e;let t=e.length;if(!kD(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Bfe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&XS(Uint8Array)),Vfe=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=n.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},jfe=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},Ufe=Gl("HTMLFormElement"),Kfe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),rM=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Hfe=Gl("RegExp"),ID=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Av(r,(i,a)=>{t(i,a,e)!==!1&&(n[a]=i)}),Object.defineProperties(e,n)},Wfe=e=>{ID(e,(t,r)=>{if(Zu(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(!!Zu(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},qfe=(e,t)=>{const r={},n=i=>{i.forEach(a=>{r[a]=!0})};return Sh(e)?n(e):n(String(e).split(t)),r},Gfe=()=>{},Zfe=(e,t)=>(e=+e,Number.isFinite(e)?e:t),I2="abcdefghijklmnopqrstuvwxyz",nM="0123456789",RD={DIGIT:nM,ALPHA:I2,ALPHA_DIGIT:I2+I2.toUpperCase()+nM},Xfe=(e=16,t=RD.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r};function Yfe(e){return!!(e&&Zu(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Qfe=e=>{const t=new Array(10),r=(n,i)=>{if(QS(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[i]=n;const a=Sh(n)?[]:{};return Av(n,(u,o)=>{const f=r(u,i+1);!Xm(f)&&(a[o]=f)}),t[i]=void 0,a}}return n};return r(e,0)},Mt={isArray:Sh,isArrayBuffer:ED,isBuffer:wfe,isFormData:Rfe,isArrayBufferView:Cfe,isString:Sfe,isNumber:kD,isBoolean:Efe,isObject:QS,isPlainObject:d0,isUndefined:Xm,isDate:kfe,isFile:Tfe,isBlob:Pfe,isRegExp:Hfe,isFunction:Zu,isStream:Ife,isURLSearchParams:Ofe,isTypedArray:Bfe,isFileList:Mfe,forEach:Av,merge:uC,extend:Nfe,trim:Afe,stripBOM:zfe,inherits:Dfe,toFlatObject:Lfe,kindOf:YS,kindOfTest:Gl,endsWith:Ffe,toArray:$fe,forEachEntry:Vfe,matchAll:jfe,isHTMLForm:Ufe,hasOwnProperty:rM,hasOwnProp:rM,reduceDescriptors:ID,freezeMethods:Wfe,toObjectSet:qfe,toCamelCase:Kfe,noop:Gfe,toFiniteNumber:Zfe,findKey:TD,global:PD,isContextDefined:MD,ALPHABET:RD,generateString:Xfe,isSpecCompliantForm:Yfe,toJSONObject:Qfe};function mn(e,t,r,n,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),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}Mt.inherits(mn,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:Mt.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const OD=mn.prototype,AD={};["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=>{AD[e]={value:e}});Object.defineProperties(mn,AD);Object.defineProperty(OD,"isAxiosError",{value:!0});mn.from=(e,t,r,n,i,a)=>{const u=Object.create(OD);return Mt.toFlatObject(e,u,function(f){return f!==Error.prototype},o=>o!=="isAxiosError"),mn.call(u,e.message,t,r,n,i),u.cause=e,u.name=e.name,a&&Object.assign(u,a),u};const Jfe=null;function cC(e){return Mt.isPlainObject(e)||Mt.isArray(e)}function ND(e){return Mt.endsWith(e,"[]")?e.slice(0,-2):e}function iM(e,t,r){return e?e.concat(t).map(function(i,a){return i=ND(i),!r&&a?"["+i+"]":i}).join(r?".":""):t}function ehe(e){return Mt.isArray(e)&&!e.some(cC)}const the=Mt.toFlatObject(Mt,{},null,function(t){return/^is[A-Z]/.test(t)});function jx(e,t,r){if(!Mt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=Mt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(R,A){return!Mt.isUndefined(A[R])});const n=r.metaTokens,i=r.visitor||v,a=r.dots,u=r.indexes,f=(r.Blob||typeof Blob<"u"&&Blob)&&Mt.isSpecCompliantForm(t);if(!Mt.isFunction(i))throw new TypeError("visitor must be a function");function p(T){if(T===null)return"";if(Mt.isDate(T))return T.toISOString();if(!f&&Mt.isBlob(T))throw new mn("Blob is not supported. Use a Buffer instead.");return Mt.isArrayBuffer(T)||Mt.isTypedArray(T)?f&&typeof Blob=="function"?new Blob([T]):Buffer.from(T):T}function v(T,R,A){let I=T;if(T&&!A&&typeof T=="object"){if(Mt.endsWith(R,"{}"))R=n?R:R.slice(0,-2),T=JSON.stringify(T);else if(Mt.isArray(T)&&ehe(T)||(Mt.isFileList(T)||Mt.endsWith(R,"[]"))&&(I=Mt.toArray(T)))return R=ND(R),I.forEach(function(N,L){!(Mt.isUndefined(N)||N===null)&&t.append(u===!0?iM([R],L,a):u===null?R:R+"[]",p(N))}),!1}return cC(T)?!0:(t.append(iM(A,R,a),p(T)),!1)}const y=[],w=Object.assign(the,{defaultVisitor:v,convertValue:p,isVisitable:cC});function k(T,R){if(!Mt.isUndefined(T)){if(y.indexOf(T)!==-1)throw Error("Circular reference detected in "+R.join("."));y.push(T),Mt.forEach(T,function(I,O){(!(Mt.isUndefined(I)||I===null)&&i.call(t,I,Mt.isString(O)?O.trim():O,R,w))===!0&&k(I,R?R.concat(O):[O])}),y.pop()}}if(!Mt.isObject(e))throw new TypeError("data must be an object");return k(e),t}function oM(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function JS(e,t){this._pairs=[],e&&jx(e,this,t)}const zD=JS.prototype;zD.append=function(t,r){this._pairs.push([t,r])};zD.toString=function(t){const r=t?function(n){return t.call(this,n,oM)}:oM;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function rhe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function DD(e,t,r){if(!t)return e;const n=r&&r.encode||rhe,i=r&&r.serialize;let a;if(i?a=i(t,r):a=Mt.isURLSearchParams(t)?t.toString():new JS(t,r).toString(n),a){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class nhe{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Mt.forEach(this.handlers,function(n){n!==null&&t(n)})}}const aM=nhe,LD={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ihe=typeof URLSearchParams<"u"?URLSearchParams:JS,ohe=typeof FormData<"u"?FormData:null,ahe=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),she=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),js={isBrowser:!0,classes:{URLSearchParams:ihe,FormData:ohe,Blob},isStandardBrowserEnv:ahe,isStandardBrowserWebWorkerEnv:she,protocols:["http","https","file","blob","url","data"]};function lhe(e,t){return jx(e,new js.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,a){return js.isNode&&Mt.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function uhe(e){return Mt.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function che(e){const t={},r=Object.keys(e);let n;const i=r.length;let a;for(n=0;n<i;n++)a=r[n],t[a]=e[a];return t}function FD(e){function t(r,n,i,a){let u=r[a++];const o=Number.isFinite(+u),f=a>=r.length;return u=!u&&Mt.isArray(i)?i.length:u,f?(Mt.hasOwnProp(i,u)?i[u]=[i[u],n]:i[u]=n,!o):((!i[u]||!Mt.isObject(i[u]))&&(i[u]=[]),t(r,n,i[u],a)&&Mt.isArray(i[u])&&(i[u]=che(i[u])),!o)}if(Mt.isFormData(e)&&Mt.isFunction(e.entries)){const r={};return Mt.forEachEntry(e,(n,i)=>{t(uhe(n),i,r,0)}),r}return null}const dhe={"Content-Type":void 0};function fhe(e,t,r){if(Mt.isString(e))try{return(t||JSON.parse)(e),Mt.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Ux={transitional:LD,adapter:["xhr","http"],transformRequest:[function(t,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,a=Mt.isObject(t);if(a&&Mt.isHTMLForm(t)&&(t=new FormData(t)),Mt.isFormData(t))return i&&i?JSON.stringify(FD(t)):t;if(Mt.isArrayBuffer(t)||Mt.isBuffer(t)||Mt.isStream(t)||Mt.isFile(t)||Mt.isBlob(t))return t;if(Mt.isArrayBufferView(t))return t.buffer;if(Mt.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return lhe(t,this.formSerializer).toString();if((o=Mt.isFileList(t))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return jx(o?{"files[]":t}:t,f&&new f,this.formSerializer)}}return a||i?(r.setContentType("application/json",!1),fhe(t)):t}],transformResponse:[function(t){const r=this.transitional||Ux.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(t&&Mt.isString(t)&&(n&&!this.responseType||i)){const u=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(o){if(u)throw o.name==="SyntaxError"?mn.from(o,mn.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:js.classes.FormData,Blob:js.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Mt.forEach(["delete","get","head"],function(t){Ux.headers[t]={}});Mt.forEach(["post","put","patch"],function(t){Ux.headers[t]=Mt.merge(dhe)});const eE=Ux,hhe=Mt.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"]),phe=e=>{const t={};let r,n,i;return e&&e.split(`
`).forEach(function(u){i=u.indexOf(":"),r=u.substring(0,i).trim().toLowerCase(),n=u.substring(i+1).trim(),!(!r||t[r]&&hhe[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},sM=Symbol("internals");function Vp(e){return e&&String(e).trim().toLowerCase()}function f0(e){return e===!1||e==null?e:Mt.isArray(e)?e.map(f0):String(e)}function mhe(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}function vhe(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function R2(e,t,r,n,i){if(Mt.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!Mt.isString(t)){if(Mt.isString(n))return t.indexOf(n)!==-1;if(Mt.isRegExp(n))return n.test(t)}}function ghe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function yhe(e,t){const r=Mt.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,a,u){return this[n].call(this,t,i,a,u)},configurable:!0})})}class Kx{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function a(o,f,p){const v=Vp(f);if(!v)throw new Error("header name must be a non-empty string");const y=Mt.findKey(i,v);(!y||i[y]===void 0||p===!0||p===void 0&&i[y]!==!1)&&(i[y||f]=f0(o))}const u=(o,f)=>Mt.forEach(o,(p,v)=>a(p,v,f));return Mt.isPlainObject(t)||t instanceof this.constructor?u(t,r):Mt.isString(t)&&(t=t.trim())&&!vhe(t)?u(phe(t),r):t!=null&&a(r,t,n),this}get(t,r){if(t=Vp(t),t){const n=Mt.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return mhe(i);if(Mt.isFunction(r))return r.call(this,i,n);if(Mt.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Vp(t),t){const n=Mt.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||R2(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function a(u){if(u=Vp(u),u){const o=Mt.findKey(n,u);o&&(!r||R2(n,n[o],o,r))&&(delete n[o],i=!0)}}return Mt.isArray(t)?t.forEach(a):a(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const a=r[n];(!t||R2(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const r=this,n={};return Mt.forEach(this,(i,a)=>{const u=Mt.findKey(n,a);if(u){r[u]=f0(i),delete r[a];return}const o=t?ghe(a):String(a).trim();o!==a&&delete r[a],r[o]=f0(i),n[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return Mt.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&Mt.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[sM]=this[sM]={accessors:{}}).accessors,i=this.prototype;function a(u){const o=Vp(u);n[o]||(yhe(i,u),n[o]=!0)}return Mt.isArray(t)?t.forEach(a):a(t),this}}Kx.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Mt.freezeMethods(Kx.prototype);Mt.freezeMethods(Kx);const Il=Kx;function O2(e,t){const r=this||eE,n=t||r,i=Il.from(n.headers);let a=n.data;return Mt.forEach(e,function(o){a=o.call(r,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function $D(e){return!!(e&&e.__CANCEL__)}function Nv(e,t,r){mn.call(this,e==null?"canceled":e,mn.ERR_CANCELED,t,r),this.name="CanceledError"}Mt.inherits(Nv,mn,{__CANCEL__:!0});function xhe(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new mn("Request failed with status code "+r.status,[mn.ERR_BAD_REQUEST,mn.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const _he=js.isStandardBrowserEnv?function(){return{write:function(r,n,i,a,u,o){const f=[];f.push(r+"="+encodeURIComponent(n)),Mt.isNumber(i)&&f.push("expires="+new Date(i).toGMTString()),Mt.isString(a)&&f.push("path="+a),Mt.isString(u)&&f.push("domain="+u),o===!0&&f.push("secure"),document.cookie=f.join("; ")},read:function(r){const n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function bhe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function whe(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function BD(e,t){return e&&!bhe(t)?whe(e,t):t}const Che=js.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let n;function i(a){let u=a;return t&&(r.setAttribute("href",u),u=r.href),r.setAttribute("href",u),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=i(window.location.href),function(u){const o=Mt.isString(u)?i(u):u;return o.protocol===n.protocol&&o.host===n.host}}():function(){return function(){return!0}}();function She(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Ehe(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i=0,a=0,u;return t=t!==void 0?t:1e3,function(f){const p=Date.now(),v=n[a];u||(u=p),r[i]=f,n[i]=p;let y=a,w=0;for(;y!==i;)w+=r[y++],y=y%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),p-u<t)return;const k=v&&p-v;return k?Math.round(w*1e3/k):void 0}}function lM(e,t){let r=0;const n=Ehe(50,250);return i=>{const a=i.loaded,u=i.lengthComputable?i.total:void 0,o=a-r,f=n(o),p=a<=u;r=a;const v={loaded:a,total:u,progress:u?a/u:void 0,bytes:o,rate:f||void 0,estimated:f&&u&&p?(u-a)/f:void 0,event:i};v[t?"download":"upload"]=!0,e(v)}}const khe=typeof XMLHttpRequest<"u",The=khe&&function(e){return new Promise(function(r,n){let i=e.data;const a=Il.from(e.headers).normalize(),u=e.responseType;let o;function f(){e.cancelToken&&e.cancelToken.unsubscribe(o),e.signal&&e.signal.removeEventListener("abort",o)}Mt.isFormData(i)&&(js.isStandardBrowserEnv||js.isStandardBrowserWebWorkerEnv)&&a.setContentType(!1);let p=new XMLHttpRequest;if(e.auth){const k=e.auth.username||"",T=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(k+":"+T))}const v=BD(e.baseURL,e.url);p.open(e.method.toUpperCase(),DD(v,e.params,e.paramsSerializer),!0),p.timeout=e.timeout;function y(){if(!p)return;const k=Il.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),R={data:!u||u==="text"||u==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:k,config:e,request:p};xhe(function(I){r(I),f()},function(I){n(I),f()},R),p=null}if("onloadend"in p?p.onloadend=y:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(y)},p.onabort=function(){!p||(n(new mn("Request aborted",mn.ECONNABORTED,e,p)),p=null)},p.onerror=function(){n(new mn("Network Error",mn.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let T=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const R=e.transitional||LD;e.timeoutErrorMessage&&(T=e.timeoutErrorMessage),n(new mn(T,R.clarifyTimeoutError?mn.ETIMEDOUT:mn.ECONNABORTED,e,p)),p=null},js.isStandardBrowserEnv){const k=(e.withCredentials||Che(v))&&e.xsrfCookieName&&_he.read(e.xsrfCookieName);k&&a.set(e.xsrfHeaderName,k)}i===void 0&&a.setContentType(null),"setRequestHeader"in p&&Mt.forEach(a.toJSON(),function(T,R){p.setRequestHeader(R,T)}),Mt.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),u&&u!=="json"&&(p.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&p.addEventListener("progress",lM(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",lM(e.onUploadProgress)),(e.cancelToken||e.signal)&&(o=k=>{!p||(n(!k||k.type?new Nv(null,e,p):k),p.abort(),p=null)},e.cancelToken&&e.cancelToken.subscribe(o),e.signal&&(e.signal.aborted?o():e.signal.addEventListener("abort",o)));const w=She(v);if(w&&js.protocols.indexOf(w)===-1){n(new mn("Unsupported protocol "+w+":",mn.ERR_BAD_REQUEST,e));return}p.send(i||null)})},h0={http:Jfe,xhr:The};Mt.forEach(h0,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Phe={getAdapter:e=>{e=Mt.isArray(e)?e:[e];const{length:t}=e;let r,n;for(let i=0;i<t&&(r=e[i],!(n=Mt.isString(r)?h0[r.toLowerCase()]:r));i++);if(!n)throw n===!1?new mn(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(Mt.hasOwnProp(h0,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`);if(!Mt.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:h0};function A2(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Nv(null,e)}function uM(e){return A2(e),e.headers=Il.from(e.headers),e.data=O2.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Phe.getAdapter(e.adapter||eE.adapter)(e).then(function(n){return A2(e),n.data=O2.call(e,e.transformResponse,n),n.headers=Il.from(n.headers),n},function(n){return $D(n)||(A2(e),n&&n.response&&(n.response.data=O2.call(e,e.transformResponse,n.response),n.response.headers=Il.from(n.response.headers))),Promise.reject(n)})}const cM=e=>e instanceof Il?e.toJSON():e;function Xf(e,t){t=t||{};const r={};function n(p,v,y){return Mt.isPlainObject(p)&&Mt.isPlainObject(v)?Mt.merge.call({caseless:y},p,v):Mt.isPlainObject(v)?Mt.merge({},v):Mt.isArray(v)?v.slice():v}function i(p,v,y){if(Mt.isUndefined(v)){if(!Mt.isUndefined(p))return n(void 0,p,y)}else return n(p,v,y)}function a(p,v){if(!Mt.isUndefined(v))return n(void 0,v)}function u(p,v){if(Mt.isUndefined(v)){if(!Mt.isUndefined(p))return n(void 0,p)}else return n(void 0,v)}function o(p,v,y){if(y in t)return n(p,v);if(y in e)return n(void 0,p)}const f={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:o,headers:(p,v)=>i(cM(p),cM(v),!0)};return Mt.forEach(Object.keys(e).concat(Object.keys(t)),function(v){const y=f[v]||i,w=y(e[v],t[v],v);Mt.isUndefined(w)&&y!==o||(r[v]=w)}),r}const VD="1.3.3",tE={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{tE[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const dM={};tE.transitional=function(t,r,n){function i(a,u){return"[Axios v"+VD+"] Transitional option '"+a+"'"+u+(n?". "+n:"")}return(a,u,o)=>{if(t===!1)throw new mn(i(u," has been removed"+(r?" in "+r:"")),mn.ERR_DEPRECATED);return r&&!dM[u]&&(dM[u]=!0,console.warn(i(u," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,u,o):!0}};function Mhe(e,t,r){if(typeof e!="object")throw new mn("options must be an object",mn.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const a=n[i],u=t[a];if(u){const o=e[a],f=o===void 0||u(o,a,e);if(f!==!0)throw new mn("option "+a+" must be "+f,mn.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new mn("Unknown option "+a,mn.ERR_BAD_OPTION)}}const dC={assertOptions:Mhe,validators:tE},hu=dC.validators;class v1{constructor(t){this.defaults=t,this.interceptors={request:new aM,response:new aM}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Xf(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:a}=r;n!==void 0&&dC.assertOptions(n,{silentJSONParsing:hu.transitional(hu.boolean),forcedJSONParsing:hu.transitional(hu.boolean),clarifyTimeoutError:hu.transitional(hu.boolean)},!1),i!==void 0&&dC.assertOptions(i,{encode:hu.function,serialize:hu.function},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let u;u=a&&Mt.merge(a.common,a[r.method]),u&&Mt.forEach(["delete","get","head","post","put","patch","common"],T=>{delete a[T]}),r.headers=Il.concat(u,a);const o=[];let f=!0;this.interceptors.request.forEach(function(R){typeof R.runWhen=="function"&&R.runWhen(r)===!1||(f=f&&R.synchronous,o.unshift(R.fulfilled,R.rejected))});const p=[];this.interceptors.response.forEach(function(R){p.push(R.fulfilled,R.rejected)});let v,y=0,w;if(!f){const T=[uM.bind(this),void 0];for(T.unshift.apply(T,o),T.push.apply(T,p),w=T.length,v=Promise.resolve(r);y<w;)v=v.then(T[y++],T[y++]);return v}w=o.length;let k=r;for(y=0;y<w;){const T=o[y++],R=o[y++];try{k=T(k)}catch(A){R.call(this,A);break}}try{v=uM.call(this,k)}catch(T){return Promise.reject(T)}for(y=0,w=p.length;y<w;)v=v.then(p[y++],p[y++]);return v}getUri(t){t=Xf(this.defaults,t);const r=BD(t.baseURL,t.url);return DD(r,t.params,t.paramsSerializer)}}Mt.forEach(["delete","get","head","options"],function(t){v1.prototype[t]=function(r,n){return this.request(Xf(n||{},{method:t,url:r,data:(n||{}).data}))}});Mt.forEach(["post","put","patch"],function(t){function r(n){return function(a,u,o){return this.request(Xf(o||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}v1.prototype[t]=r(),v1.prototype[t+"Form"]=r(!0)});const p0=v1;class rE{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});const n=this;this.promise.then(i=>{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](i);n._listeners=null}),this.promise.then=i=>{let a;const u=new Promise(o=>{n.subscribe(o),a=o}).then(i);return u.cancel=function(){n.unsubscribe(a)},u},t(function(a,u,o){n.reason||(n.reason=new Nv(a,u,o),r(n.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 r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new rE(function(i){t=i}),cancel:t}}}const Ihe=rE;function Rhe(e){return function(r){return e.apply(null,r)}}function Ohe(e){return Mt.isObject(e)&&e.isAxiosError===!0}const fC={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(fC).forEach(([e,t])=>{fC[t]=e});const Ahe=fC;function jD(e){const t=new p0(e),r=CD(p0.prototype.request,t);return Mt.extend(r,p0.prototype,t,{allOwnKeys:!0}),Mt.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return jD(Xf(e,i))},r}const ji=jD(eE);ji.Axios=p0;ji.CanceledError=Nv;ji.CancelToken=Ihe;ji.isCancel=$D;ji.VERSION=VD;ji.toFormData=jx;ji.AxiosError=mn;ji.Cancel=ji.CanceledError;ji.all=function(t){return Promise.all(t)};ji.spread=Rhe;ji.isAxiosError=Ohe;ji.mergeConfig=Xf;ji.AxiosHeaders=Il;ji.formToJSON=e=>FD(Mt.isHTMLForm(e)?new FormData(e):e);ji.HttpStatusCode=Ahe;ji.default=ji;const Nhe=ji;class Eh{constructor(){this.listeners=[],this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.push(t),this.onSubscribe(),()=>{this.listeners=this.listeners.filter(r=>r!==t),this.onUnsubscribe()}}hasListeners(){return this.listeners.length>0}onSubscribe(){}onUnsubscribe(){}}const Ym=typeof window>"u"||"Deno"in window;function za(){}function zhe(e,t){return typeof e=="function"?e(t):e}function hC(e){return typeof e=="number"&&e>=0&&e!==1/0}function UD(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Jp(e,t,r){return zv(e)?typeof t=="function"?{...r,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function Dhe(e,t,r){return zv(e)?typeof t=="function"?{...r,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:typeof e=="function"?{...t,mutationFn:e}:{...e}}function _u(e,t,r){return zv(e)?[{...t,queryKey:e},r]:[e||{},t]}function fM(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:a,queryKey:u,stale:o}=e;if(zv(u)){if(n){if(t.queryHash!==nE(u,t.options))return!1}else if(!g1(t.queryKey,u))return!1}if(r!=="all"){const f=t.isActive();if(r==="active"&&!f||r==="inactive"&&f)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||typeof i<"u"&&i!==t.state.fetchStatus||a&&!a(t))}function hM(e,t){const{exact:r,fetching:n,predicate:i,mutationKey:a}=e;if(zv(a)){if(!t.options.mutationKey)return!1;if(r){if(Zc(t.options.mutationKey)!==Zc(a))return!1}else if(!g1(t.options.mutationKey,a))return!1}return!(typeof n=="boolean"&&t.state.status==="loading"!==n||i&&!i(t))}function nE(e,t){return((t==null?void 0:t.queryKeyHashFn)||Zc)(e)}function Zc(e){return JSON.stringify(e,(t,r)=>mC(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function g1(e,t){return KD(e,t)}function KD(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(r=>!KD(e[r],t[r])):!1}function HD(e,t){if(e===t)return e;const r=pM(e)&&pM(t);if(r||mC(e)&&mC(t)){const n=r?e.length:Object.keys(e).length,i=r?t:Object.keys(t),a=i.length,u=r?[]:{};let o=0;for(let f=0;f<a;f++){const p=r?f:i[f];u[p]=HD(e[p],t[p]),u[p]===e[p]&&o++}return n===a&&o===n?e:u}return t}function pC(e,t){if(e&&!t||t&&!e)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function pM(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function mC(e){if(!mM(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const r=t.prototype;return!(!mM(r)||!r.hasOwnProperty("isPrototypeOf"))}function mM(e){return Object.prototype.toString.call(e)==="[object Object]"}function zv(e){return Array.isArray(e)}function WD(e){return new Promise(t=>{setTimeout(t,e)})}function vM(e){WD(0).then(e)}function Lhe(){if(typeof AbortController=="function")return new AbortController}function vC(e,t,r){return r.isDataEqual!=null&&r.isDataEqual(e,t)?e:typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?HD(e,t):t}class Fhe extends Eh{constructor(){super(),this.setup=t=>{if(!Ym&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),window.addEventListener("focus",r,!1),()=>{window.removeEventListener("visibilitychange",r),window.removeEventListener("focus",r)}}}}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 r;this.setup=t,(r=this.cleanup)==null||r.call(this),this.cleanup=t(n=>{typeof n=="boolean"?this.setFocused(n):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 y1=new Fhe;class $he extends Eh{constructor(){super(),this.setup=t=>{if(!Ym&&window.addEventListener){const r=()=>t();return window.addEventListener("online",r,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",r)}}}}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 r;this.setup=t,(r=this.cleanup)==null||r.call(this),this.cleanup=t(n=>{typeof n=="boolean"?this.setOnline(n):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 x1=new $he;function Bhe(e){return Math.min(1e3*2**e,3e4)}function Hx(e){return(e!=null?e:"online")==="online"?x1.isOnline():!0}class qD{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function m0(e){return e instanceof qD}function GD(e){let t=!1,r=0,n=!1,i,a,u;const o=new Promise((A,I)=>{a=A,u=I}),f=A=>{n||(k(new qD(A)),e.abort==null||e.abort())},p=()=>{t=!0},v=()=>{t=!1},y=()=>!y1.isFocused()||e.networkMode!=="always"&&!x1.isOnline(),w=A=>{n||(n=!0,e.onSuccess==null||e.onSuccess(A),i==null||i(),a(A))},k=A=>{n||(n=!0,e.onError==null||e.onError(A),i==null||i(),u(A))},T=()=>new Promise(A=>{i=I=>{const O=n||!y();return O&&A(I),O},e.onPause==null||e.onPause()}).then(()=>{i=void 0,n||e.onContinue==null||e.onContinue()}),R=()=>{if(n)return;let A;try{A=e.fn()}catch(I){A=Promise.reject(I)}Promise.resolve(A).then(w).catch(I=>{var O,N;if(n)return;const L=(O=e.retry)!=null?O:3,B=(N=e.retryDelay)!=null?N:Bhe,j=typeof B=="function"?B(r,I):B,G=L===!0||typeof L=="number"&&r<L||typeof L=="function"&&L(r,I);if(t||!G){k(I);return}r++,e.onFail==null||e.onFail(r,I),WD(j).then(()=>{if(y())return T()}).then(()=>{t?k(I):R()})})};return Hx(e.networkMode)?R():T().then(R),{promise:o,cancel:f,continue:()=>(i==null?void 0:i())?o:Promise.resolve(),cancelRetry:p,continueRetry:v}}const iE=console;function Vhe(){let e=[],t=0,r=v=>{v()},n=v=>{v()};const i=v=>{let y;t++;try{y=v()}finally{t--,t||o()}return y},a=v=>{t?e.push(v):vM(()=>{r(v)})},u=v=>(...y)=>{a(()=>{v(...y)})},o=()=>{const v=e;e=[],v.length&&vM(()=>{n(()=>{v.forEach(y=>{r(y)})})})};return{batch:i,batchCalls:u,schedule:a,setNotifyFunction:v=>{r=v},setBatchNotifyFunction:v=>{n=v}}}const pi=Vhe();class ZD{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),hC(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t!=null?t:Ym?1/0:5*60*1e3)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class jhe extends ZD{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||iE,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||Uhe(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,r){const n=vC(this.state.data,t,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){this.dispatch({type:"setState",state:t,setStateOptions:r})}cancel(t){var r;const n=this.promise;return(r=this.retryer)==null||r.cancel(t),n?n.then(za).catch(za):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||!UD(this.state.dataUpdatedAt,t)}onFocus(){var t;const r=this.observers.find(n=>n.shouldFetchOnWindowFocus());r&&r.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const r=this.observers.find(n=>n.shouldFetchOnReconnect());r&&r.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(r=>r!==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,r){var n,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var a;return(a=this.retryer)==null||a.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const k=this.observers.find(T=>T.options.queryFn);k&&this.setOptions(k.options)}Array.isArray(this.options.queryKey);const u=Lhe(),o={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},f=k=>{Object.defineProperty(k,"signal",{enumerable:!0,get:()=>{if(u)return this.abortSignalConsumed=!0,u.signal}})};f(o);const p=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(o)):Promise.reject("Missing queryFn"),v={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:p};if(f(v),(n=this.options.behavior)==null||n.onFetch(v),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=v.fetchOptions)==null?void 0:i.meta)){var y;this.dispatch({type:"fetch",meta:(y=v.fetchOptions)==null?void 0:y.meta})}const w=k=>{if(m0(k)&&k.silent||this.dispatch({type:"error",error:k}),!m0(k)){var T,R;(T=(R=this.cache.config).onError)==null||T.call(R,k,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=GD({fn:v.fetchFn,abort:u==null?void 0:u.abort.bind(u),onSuccess:k=>{var T,R;if(typeof k>"u"){w(new Error("undefined"));return}this.setData(k),(T=(R=this.cache.config).onSuccess)==null||T.call(R,k,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:w,onFail:(k,T)=>{this.dispatch({type:"failed",failureCount:k,error:T})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:v.options.retry,retryDelay:v.options.retryDelay,networkMode:v.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const r=n=>{var i,a;switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(i=t.meta)!=null?i:null,fetchStatus:Hx(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(a=t.dataUpdatedAt)!=null?a:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const u=t.error;return m0(u)&&u.revert&&this.revertState?{...this.revertState}:{...n,error:u,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),pi.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function Uhe(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=typeof t<"u",n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n!=null?n:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}class Khe extends Eh{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,r,n){var i;const a=r.queryKey,u=(i=r.queryHash)!=null?i:nE(a,r);let o=this.get(u);return o||(o=new jhe({cache:this,logger:t.getLogger(),queryKey:a,queryHash:u,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(a)}),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 r=this.queriesMap[t.queryHash];r&&(t.destroy(),this.queries=this.queries.filter(n=>n!==t),r===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){pi.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,r){const[n]=_u(t,r);return typeof n.exact>"u"&&(n.exact=!0),this.queries.find(i=>fM(n,i))}findAll(t,r){const[n]=_u(t,r);return Object.keys(n).length>0?this.queries.filter(i=>fM(n,i)):this.queries}notify(t){pi.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){pi.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){pi.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class Hhe extends ZD{constructor(t){super(),this.options={...t.defaultOptions,...t.options},this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||iE,this.observers=[],this.state=t.state||XD(),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(r=>r!==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,r;return(t=(r=this.retryer)==null?void 0:r.continue())!=null?t:this.execute()}async execute(){const t=()=>{var N;return this.retryer=GD({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(L,B)=>{this.dispatch({type:"failed",failureCount:L,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},r=this.state.status==="loading";try{var n,i,a,u,o,f;if(!r){var p,v,y,w;this.dispatch({type:"loading",variables:this.options.variables}),await((p=(v=this.mutationCache.config).onMutate)==null?void 0:p.call(v,this.state.variables,this));const L=await((y=(w=this.options).onMutate)==null?void 0:y.call(w,this.state.variables));L!==this.state.context&&this.dispatch({type:"loading",context:L,variables:this.state.variables})}const N=await t();return await((n=(i=this.mutationCache.config).onSuccess)==null?void 0:n.call(i,N,this.state.variables,this.state.context,this)),await((a=(u=this.options).onSuccess)==null?void 0:a.call(u,N,this.state.variables,this.state.context)),await((o=(f=this.options).onSettled)==null?void 0:o.call(f,N,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:N}),N}catch(N){try{var k,T,R,A,I,O;throw await((k=(T=this.mutationCache.config).onError)==null?void 0:k.call(T,N,this.state.variables,this.state.context,this)),await((R=(A=this.options).onError)==null?void 0:R.call(A,N,this.state.variables,this.state.context)),await((I=(O=this.options).onSettled)==null?void 0:I.call(O,void 0,N,this.state.variables,this.state.context)),N}finally{this.dispatch({type:"error",error:N})}}}dispatch(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"loading":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Hx(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"};case"setState":return{...n,...t.state}}};this.state=r(this.state),pi.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function XD(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class Whe extends Eh{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,r,n){const i=new Hhe({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(r),state:n,defaultOptions:r.mutationKey?t.getMutationDefaults(r.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(r=>r!==t),this.notify({type:"removed",mutation:t})}clear(){pi.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(r=>hM(t,r))}findAll(t){return this.mutations.filter(r=>hM(t,r))}notify(t){pi.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const r=this.mutations.filter(n=>n.state.isPaused);return pi.batch(()=>r.reduce((n,i)=>n.then(()=>i.continue().catch(za)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function qhe(){return{onFetch:e=>{e.fetchFn=()=>{var t,r,n,i,a,u;const o=(t=e.fetchOptions)==null||(r=t.meta)==null?void 0:r.refetchPage,f=(n=e.fetchOptions)==null||(i=n.meta)==null?void 0:i.fetchMore,p=f==null?void 0:f.pageParam,v=(f==null?void 0:f.direction)==="forward",y=(f==null?void 0:f.direction)==="backward",w=((a=e.state.data)==null?void 0:a.pages)||[],k=((u=e.state.data)==null?void 0:u.pageParams)||[];let T=k,R=!1;const A=j=>{Object.defineProperty(j,"signal",{enumerable:!0,get:()=>{var G;if((G=e.signal)!=null&&G.aborted)R=!0;else{var H;(H=e.signal)==null||H.addEventListener("abort",()=>{R=!0})}return e.signal}})},I=e.options.queryFn||(()=>Promise.reject("Missing queryFn")),O=(j,G,H,te)=>(T=te?[G,...T]:[...T,G],te?[H,...j]:[...j,H]),N=(j,G,H,te)=>{if(R)return Promise.reject("Cancelled");if(typeof H>"u"&&!G&&j.length)return Promise.resolve(j);const Y={queryKey:e.queryKey,pageParam:H,meta:e.options.meta};A(Y);const le=I(Y);return Promise.resolve(le).then(Z=>O(j,H,Z,te))};let L;if(!w.length)L=N([]);else if(v){const j=typeof p<"u",G=j?p:gM(e.options,w);L=N(w,j,G)}else if(y){const j=typeof p<"u",G=j?p:Ghe(e.options,w);L=N(w,j,G,!0)}else{T=[];const j=typeof e.options.getNextPageParam>"u";L=(o&&w[0]?o(w[0],0,w):!0)?N([],j,k[0]):Promise.resolve(O([],k[0],w[0]));for(let H=1;H<w.length;H++)L=L.then(te=>{if(o&&w[H]?o(w[H],H,w):!0){const le=j?k[H]:gM(e.options,te);return N(te,j,le)}return Promise.resolve(O(te,k[H],w[H]))})}return L.then(j=>({pages:j,pageParams:T}))}}}}function gM(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function Ghe(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class Zhe{constructor(t={}){this.queryCache=t.queryCache||new Khe,this.mutationCache=t.mutationCache||new Whe,this.logger=t.logger||iE,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=y1.subscribe(()=>{y1.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=x1.subscribe(()=>{x1.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,r;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(r=this.unsubscribeOnline)==null||r.call(this),this.unsubscribeOnline=void 0)}isFetching(t,r){const[n]=_u(t,r);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,r){var n;return(n=this.queryCache.find(t,r))==null?void 0:n.state.data}ensureQueryData(t,r,n){const i=Jp(t,r,n),a=this.getQueryData(i.queryKey);return a?Promise.resolve(a):this.fetchQuery(i)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:r,state:n})=>{const i=n.data;return[r,i]})}setQueryData(t,r,n){const i=this.queryCache.find(t),a=i==null?void 0:i.state.data,u=zhe(r,a);if(typeof u>"u")return;const o=Jp(t),f=this.defaultQueryOptions(o);return this.queryCache.build(this,f).setData(u,{...n,manual:!0})}setQueriesData(t,r,n){return pi.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,r,n)]))}getQueryState(t,r){var n;return(n=this.queryCache.find(t,r))==null?void 0:n.state}removeQueries(t,r){const[n]=_u(t,r),i=this.queryCache;pi.batch(()=>{i.findAll(n).forEach(a=>{i.remove(a)})})}resetQueries(t,r,n){const[i,a]=_u(t,r,n),u=this.queryCache,o={type:"active",...i};return pi.batch(()=>(u.findAll(i).forEach(f=>{f.reset()}),this.refetchQueries(o,a)))}cancelQueries(t,r,n){const[i,a={}]=_u(t,r,n);typeof a.revert>"u"&&(a.revert=!0);const u=pi.batch(()=>this.queryCache.findAll(i).map(o=>o.cancel(a)));return Promise.all(u).then(za).catch(za)}invalidateQueries(t,r,n){const[i,a]=_u(t,r,n);return pi.batch(()=>{var u,o;if(this.queryCache.findAll(i).forEach(p=>{p.invalidate()}),i.refetchType==="none")return Promise.resolve();const f={...i,type:(u=(o=i.refetchType)!=null?o:i.type)!=null?u:"active"};return this.refetchQueries(f,a)})}refetchQueries(t,r,n){const[i,a]=_u(t,r,n),u=pi.batch(()=>this.queryCache.findAll(i).filter(f=>!f.isDisabled()).map(f=>{var p;return f.fetch(void 0,{...a,cancelRefetch:(p=a==null?void 0:a.cancelRefetch)!=null?p:!0,meta:{refetchPage:i.refetchPage}})}));let o=Promise.all(u).then(za);return a!=null&&a.throwOnError||(o=o.catch(za)),o}fetchQuery(t,r,n){const i=Jp(t,r,n),a=this.defaultQueryOptions(i);typeof a.retry>"u"&&(a.retry=!1);const u=this.queryCache.build(this,a);return u.isStaleByTime(a.staleTime)?u.fetch(a):Promise.resolve(u.state.data)}prefetchQuery(t,r,n){return this.fetchQuery(t,r,n).then(za).catch(za)}fetchInfiniteQuery(t,r,n){const i=Jp(t,r,n);return i.behavior=qhe(),this.fetchQuery(i)}prefetchInfiniteQuery(t,r,n){return this.fetchInfiniteQuery(t,r,n).then(za).catch(za)}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,r){const n=this.queryDefaults.find(i=>Zc(t)===Zc(i.queryKey));n?n.defaultOptions=r:this.queryDefaults.push({queryKey:t,defaultOptions:r})}getQueryDefaults(t){if(!t)return;const r=this.queryDefaults.find(n=>g1(t,n.queryKey));return r==null?void 0:r.defaultOptions}setMutationDefaults(t,r){const n=this.mutationDefaults.find(i=>Zc(t)===Zc(i.mutationKey));n?n.defaultOptions=r:this.mutationDefaults.push({mutationKey:t,defaultOptions:r})}getMutationDefaults(t){if(!t)return;const r=this.mutationDefaults.find(n=>g1(t,n.mutationKey));return r==null?void 0:r.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const r={...this.defaultOptions.queries,...this.getQueryDefaults(t==null?void 0:t.queryKey),...t,_defaulted:!0};return!r.queryHash&&r.queryKey&&(r.queryHash=nE(r.queryKey,r)),typeof r.refetchOnReconnect>"u"&&(r.refetchOnReconnect=r.networkMode!=="always"),typeof r.useErrorBoundary>"u"&&(r.useErrorBoundary=!!r.suspense),r}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 Xhe extends Eh{constructor(t,r){super(),this.client=t,this.options=r,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(r)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.length===1&&(this.currentQuery.addObserver(this),yM(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.listeners.length||this.destroy()}shouldFetchOnReconnect(){return gC(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return gC(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=[],this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,r){const n=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),pC(n,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=n.queryKey),this.updateQuery();const a=this.hasListeners();a&&xM(this.currentQuery,i,this.options,n)&&this.executeFetch(),this.updateResult(r),a&&(this.currentQuery!==i||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const u=this.computeRefetchInterval();a&&(this.currentQuery!==i||this.options.enabled!==n.enabled||u!==this.currentRefetchInterval)&&this.updateRefetchInterval(u)}getOptimisticResult(t){const r=this.client.getQueryCache().build(this.client,t);return this.createResult(r,t)}getCurrentResult(){return this.currentResult}trackResult(t){const r={};return Object.keys(t).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),t[n])})}),r}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...r}={}){return this.fetch({...r,meta:{refetchPage:t}})}fetchOptimistic(t){const r=this.client.defaultQueryOptions(t),n=this.client.getQueryCache().build(this.client,r);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,r))}fetch(t){var r;return this.executeFetch({...t,cancelRefetch:(r=t.cancelRefetch)!=null?r:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let r=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(za)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),Ym||this.currentResult.isStale||!hC(this.options.staleTime))return;const r=UD(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},r)}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,!(Ym||this.options.enabled===!1||!hC(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||y1.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,r){const n=this.currentQuery,i=this.options,a=this.currentResult,u=this.currentResultState,o=this.currentResultOptions,f=t!==n,p=f?t.state:this.currentQueryInitialState,v=f?this.currentResult:this.previousQueryResult,{state:y}=t;let{dataUpdatedAt:w,error:k,errorUpdatedAt:T,fetchStatus:R,status:A}=y,I=!1,O=!1,N;if(r._optimisticResults){const H=this.hasListeners(),te=!H&&yM(t,r),Y=H&&xM(t,n,r,i);(te||Y)&&(R=Hx(t.options.networkMode)?"fetching":"paused",w||(A="loading")),r._optimisticResults==="isRestoring"&&(R="idle")}if(r.keepPreviousData&&!y.dataUpdatedAt&&v!=null&&v.isSuccess&&A!=="error")N=v.data,w=v.dataUpdatedAt,A=v.status,I=!0;else if(r.select&&typeof y.data<"u")if(a&&y.data===(u==null?void 0:u.data)&&r.select===this.selectFn)N=this.selectResult;else try{this.selectFn=r.select,N=r.select(y.data),N=vC(a==null?void 0:a.data,N,r),this.selectResult=N,this.selectError=null}catch(H){this.selectError=H}else N=y.data;if(typeof r.placeholderData<"u"&&typeof N>"u"&&A==="loading"){let H;if(a!=null&&a.isPlaceholderData&&r.placeholderData===(o==null?void 0:o.placeholderData))H=a.data;else if(H=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof H<"u")try{H=r.select(H),this.selectError=null}catch(te){this.selectError=te}typeof H<"u"&&(A="success",N=vC(a==null?void 0:a.data,H,r),O=!0)}this.selectError&&(k=this.selectError,N=this.selectResult,T=Date.now(),A="error");const L=R==="fetching",B=A==="loading",j=A==="error";return{status:A,fetchStatus:R,isLoading:B,isSuccess:A==="success",isError:j,isInitialLoading:B&&L,data:N,dataUpdatedAt:w,error:k,errorUpdatedAt:T,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>p.dataUpdateCount||y.errorUpdateCount>p.errorUpdateCount,isFetching:L,isRefetching:L&&!B,isLoadingError:j&&y.dataUpdatedAt===0,isPaused:R==="paused",isPlaceholderData:O,isPreviousData:I,isRefetchError:j&&y.dataUpdatedAt!==0,isStale:oE(t,r),refetch:this.refetch,remove:this.remove}}updateResult(t){const r=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,pC(n,r))return;this.currentResult=n;const i={cache:!0},a=()=>{if(!r)return!0;const{notifyOnChangeProps:u}=this.options;if(u==="all"||!u&&!this.trackedProps.size)return!0;const o=new Set(u!=null?u:this.trackedProps);return this.options.useErrorBoundary&&o.add("error"),Object.keys(this.currentResult).some(f=>{const p=f;return this.currentResult[p]!==r[p]&&o.has(p)})};(t==null?void 0:t.listeners)!==!1&&a()&&(i.listeners=!0),this.notify({...i,...t})}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const r=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const r={};t.type==="success"?r.onSuccess=!t.manual:t.type==="error"&&!m0(t.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(t){pi.batch(()=>{if(t.onSuccess){var r,n,i,a;(r=(n=this.options).onSuccess)==null||r.call(n,this.currentResult.data),(i=(a=this.options).onSettled)==null||i.call(a,this.currentResult.data,null)}else if(t.onError){var u,o,f,p;(u=(o=this.options).onError)==null||u.call(o,this.currentResult.error),(f=(p=this.options).onSettled)==null||f.call(p,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(v=>{v(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function Yhe(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function yM(e,t){return Yhe(e,t)||e.state.dataUpdatedAt>0&&gC(e,t,t.refetchOnMount)}function gC(e,t,r){if(t.enabled!==!1){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&oE(e,t)}return!1}function xM(e,t,r,n){return r.enabled!==!1&&(e!==t||n.enabled===!1)&&(!r.suspense||e.state.status!=="error")&&oE(e,r)}function oE(e,t){return e.isStaleByTime(t.staleTime)}class Qhe extends Eh{constructor(t,r){super(),this.client=t,this.setOptions(r),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const r=this.options;this.options=this.client.defaultMutationOptions(t),pC(r,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 r={listeners:!0};t.type==="success"?r.onSuccess=!0:t.type==="error"&&(r.onError=!0),this.notify(r)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(t,r){return this.mutateOptions=r,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:XD(),r={...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=r}notify(t){pi.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(t.onSuccess){var r,n,i,a;(r=(n=this.mutateOptions).onSuccess)==null||r.call(n,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(i=(a=this.mutateOptions).onSettled)==null||i.call(a,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(t.onError){var u,o,f,p;(u=(o=this.mutateOptions).onError)==null||u.call(o,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(f=(p=this.mutateOptions).onSettled)==null||f.call(p,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}t.listeners&&this.listeners.forEach(v=>{v(this.currentResult)})})}}const YD=q1.exports.useSyncExternalStore,_M=C.exports.createContext(void 0),QD=C.exports.createContext(!1);function JD(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=_M),window.ReactQueryClientContext):_M)}const Dv=({context:e}={})=>{const t=C.exports.useContext(JD(e,C.exports.useContext(QD)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Jhe=({client:e,children:t,context:r,contextSharing:n=!1})=>{C.exports.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const i=JD(r,n);return S(QD.Provider,{value:!r&&n,children:S(i.Provider,{value:e,children:t})})},eL=C.exports.createContext(!1),epe=()=>C.exports.useContext(eL);eL.Provider;function tpe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const rpe=C.exports.createContext(tpe()),npe=()=>C.exports.useContext(rpe);function tL(e,t){return typeof e=="function"?e(...t):!!e}const ipe=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},ope=e=>{C.exports.useEffect(()=>{e.clearReset()},[e])},ape=({result:e,errorResetBoundary:t,useErrorBoundary:r,query:n})=>e.isError&&!t.isReset()&&!e.isFetching&&tL(r,[e.error,n]),spe=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},lpe=(e,t)=>e.isLoading&&e.isFetching&&!t,upe=(e,t,r)=>(e==null?void 0:e.suspense)&&lpe(t,r),cpe=(e,t,r)=>t.fetchOptimistic(e).then(({data:n})=>{e.onSuccess==null||e.onSuccess(n),e.onSettled==null||e.onSettled(n,null)}).catch(n=>{r.clearReset(),e.onError==null||e.onError(n),e.onSettled==null||e.onSettled(void 0,n)});function dpe(e,t){const r=Dv({context:e.context}),n=epe(),i=npe(),a=r.defaultQueryOptions(e);a._optimisticResults=n?"isRestoring":"optimistic",a.onError&&(a.onError=pi.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=pi.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=pi.batchCalls(a.onSettled)),spe(a),ipe(a,i),ope(i);const[u]=C.exports.useState(()=>new t(r,a)),o=u.getOptimisticResult(a);if(YD(C.exports.useCallback(f=>n?()=>{}:u.subscribe(pi.batchCalls(f)),[u,n]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),C.exports.useEffect(()=>{u.setOptions(a,{listeners:!1})},[a,u]),upe(a,o,n))throw cpe(a,u,i);if(ape({result:o,errorResetBoundary:i,useErrorBoundary:a.useErrorBoundary,query:u.getCurrentQuery()}))throw o.error;return a.notifyOnChangeProps?o:u.trackResult(o)}function Xa(e,t,r){const n=Jp(e,t,r);return dpe(n,Xhe)}function fpe(e,t,r){const n=Dhe(e,t,r),i=Dv({context:n.context}),[a]=C.exports.useState(()=>new Qhe(i,n));C.exports.useEffect(()=>{a.setOptions(n)},[a,n]);const u=YD(C.exports.useCallback(f=>a.subscribe(pi.batchCalls(f)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),o=C.exports.useCallback((f,p)=>{a.mutate(f,p).catch(hpe)},[a]);if(u.error&&tL(a.options.useErrorBoundary,[u.error]))throw u.error;return{...u,mutate:o,mutateAsync:u.mutate}}function hpe(){}const wr={initial:"initial","initial-match":"initial-match-points","initial-unmatch":"initial-unmatch-points",approve:"approve-points",working:"working-points",filteredWorking:"filtered-working-points",cancelled:"cancelled-points",atd:"atd",pvz:"pvz",other:"other"},un={initial:"Pending",approve:"Installation",working:"Working",cancelled:"Cancelled"},Xc={[un.initial]:"\u041A \u0440\u0430\u0441\u0441\u043C\u043E\u0442\u0440\u0435\u043D\u0438\u044E",[un.approve]:"\u0421\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u0438\u0435-\u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430",[un.working]:"\u0420\u0430\u0431\u043E\u0442\u0430\u0435\u0442",[un.cancelled]:"\u041E\u0442\u043C\u0435\u043D\u0435\u043D"},rL={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"},ppe="\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",kn={INITIAL:"INITIAL",APPROVE_WORKING:"APPROVE_WORKING",WORKING:"WORKING"},mpe={[kn.INITIAL]:[un.initial],[kn.APPROVE_WORKING]:[un.approve,un.working],[kn.WORKING]:[un.working]},vpe={[kn.INITIAL]:[wr.initial,wr.working,wr.cancelled],[kn.APPROVE_WORKING]:[wr.approve,wr.working,wr.cancelled],[kn.WORKING]:[wr.filteredWorking]},bM=e=>{let t;const r=new Set,n=(f,p)=>{const v=typeof f=="function"?f(t):f;if(!Object.is(v,t)){const y=t;t=(p!=null?p:typeof v!="object")?v:Object.assign({},t,v),r.forEach(w=>w(t,y))}},i=()=>t,o={setState:n,getState:i,subscribe:f=>(r.add(f),()=>r.delete(f)),destroy:()=>{var f;((f={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0})==null?void 0:f.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."),r.clear()}};return t=e(n,i,o),o},gpe=e=>e?bM(e):bM;var nL={exports:{}},iL={};/**
* @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 Wx=C.exports,ype=q1.exports;function xpe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _pe=typeof Object.is=="function"?Object.is:xpe,bpe=ype.useSyncExternalStore,wpe=Wx.useRef,Cpe=Wx.useEffect,Spe=Wx.useMemo,Epe=Wx.useDebugValue;iL.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var a=wpe(null);if(a.current===null){var u={hasValue:!1,value:null};a.current=u}else u=a.current;a=Spe(function(){function f(k){if(!p){if(p=!0,v=k,k=n(k),i!==void 0&&u.hasValue){var T=u.value;if(i(T,k))return y=T}return y=k}if(T=y,_pe(v,k))return T;var R=n(k);return i!==void 0&&i(T,R)?T:(v=k,y=R)}var p=!1,v,y,w=r===void 0?null:r;return[function(){return f(t())},w===null?void 0:function(){return f(w())}]},[t,r,n,i]);var o=bpe(e,a[0],a[1]);return Cpe(function(){u.hasValue=!0,u.value=o},[o]),Epe(o),o};(function(e){e.exports=iL})(nL);const kpe=$C(nL.exports),{useSyncExternalStoreWithSelector:Tpe}=kpe;function Ppe(e,t=e.getState,r){const n=Tpe(e.subscribe,e.getState,e.getServerState||e.getState,t,r);return C.exports.useDebugValue(n),n}const wM=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 r=typeof e=="function"?gpe(e):e,n=(i,a)=>Ppe(r,i,a);return Object.assign(n,r),n},ic=e=>e?wM(e):wM;function Fa(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(i){return"'"+i+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Yf(e){return!!e&&!!e[Cn]}function Fl(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Fpe}(e)||Array.isArray(e)||!!e[MM]||!!(!((t=e.constructor)===null||t===void 0)&&t[MM])||aE(e)||sE(e))}function Qf(e,t,r){r===void 0&&(r=!1),kh(e)===0?(r?Object.keys:fE)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,i){return t(i,n,e)})}function kh(e){var t=e[Cn];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:aE(e)?2:sE(e)?3:0}function yC(e,t){return kh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Mpe(e,t){return kh(e)===2?e.get(t):e[t]}function oL(e,t,r){var n=kh(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Ipe(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function aE(e){return Dpe&&e instanceof Map}function sE(e){return Lpe&&e instanceof Set}function Gi(e){return e.o||e.t}function lE(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=$pe(e);delete t[Cn];for(var r=fE(t),n=0;n<r.length;n++){var i=r[n],a=t[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function uE(e,t){return t===void 0&&(t=!1),cE(e)||Yf(e)||!Fl(e)||(kh(e)>1&&(e.set=e.add=e.clear=e.delete=Rpe),Object.freeze(e),t&&Qf(e,function(r,n){return uE(n,!0)},!0)),e}function Rpe(){Fa(2)}function cE(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function qs(e){var t=_C[e];return t||Fa(18,e),t}function Ope(e,t){_C[e]||(_C[e]=t)}function _1(){return Jm}function N2(e,t){t&&(qs("Patches"),e.u=[],e.s=[],e.v=t)}function b1(e){xC(e),e.p.forEach(Ape),e.p=null}function xC(e){e===Jm&&(Jm=e.l)}function CM(e){return Jm={p:[],l:Jm,h:e,m:!0,_:0}}function Ape(e){var t=e[Cn];t.i===0||t.i===1?t.j():t.O=!0}function z2(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.g||qs("ES5").S(t,e,n),n?(r[Cn].P&&(b1(t),Fa(4)),Fl(e)&&(e=w1(t,e),t.l||C1(t,e)),t.u&&qs("Patches").M(r[Cn].t,e,t.u,t.s)):e=w1(t,r,[]),b1(t),t.u&&t.v(t.u,t.s),e!==aL?e:void 0}function w1(e,t,r){if(cE(t))return t;var n=t[Cn];if(!n)return Qf(t,function(o,f){return SM(e,n,t,o,f,r)},!0),t;if(n.A!==e)return t;if(!n.P)return C1(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=lE(n.k):n.o,a=i,u=!1;n.i===3&&(a=new Set(i),i.clear(),u=!0),Qf(a,function(o,f){return SM(e,n,i,o,f,r,u)}),C1(e,i,!1),r&&e.u&&qs("Patches").N(n,r,e.u,e.s)}return n.o}function SM(e,t,r,n,i,a,u){if(Yf(i)){var o=w1(e,i,a&&t&&t.i!==3&&!yC(t.R,n)?a.concat(n):void 0);if(oL(r,n,o),!Yf(o))return;e.m=!1}else u&&r.add(i);if(Fl(i)&&!cE(i)){if(!e.h.D&&e._<1)return;w1(e,i),t&&t.A.l||C1(e,i)}}function C1(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&uE(t,r)}function D2(e,t){var r=e[Cn];return(r?Gi(r):e)[t]}function EM(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function wl(e){e.P||(e.P=!0,e.l&&wl(e.l))}function L2(e){e.o||(e.o=lE(e.t))}function Qm(e,t,r){var n=aE(t)?qs("MapSet").F(t,r):sE(t)?qs("MapSet").T(t,r):e.g?function(i,a){var u=Array.isArray(i),o={i:u?1:0,A:a?a.A:_1(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},f=o,p=bC;u&&(f=[o],p=em);var v=Proxy.revocable(f,p),y=v.revoke,w=v.proxy;return o.k=w,o.j=y,w}(t,r):qs("ES5").J(t,r);return(r?r.A:_1()).p.push(n),n}function Npe(e){return Yf(e)||Fa(22,e),function t(r){if(!Fl(r))return r;var n,i=r[Cn],a=kh(r);if(i){if(!i.P&&(i.i<4||!qs("ES5").K(i)))return i.t;i.I=!0,n=kM(r,a),i.I=!1}else n=kM(r,a);return Qf(n,function(u,o){i&&Mpe(i.t,u)===o||oL(n,u,t(o))}),a===3?new Set(n):n}(e)}function kM(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return lE(e)}function zpe(){function e(o,f){function p(){this.constructor=o}i(o,f),o.prototype=(p.prototype=f.prototype,new p)}function t(o){o.o||(o.R=new Map,o.o=new Map(o.t))}function r(o){o.o||(o.o=new Set,o.t.forEach(function(f){if(Fl(f)){var p=Qm(o.A.h,f,o);o.p.set(f,p),o.o.add(p)}else o.o.add(f)}))}function n(o){o.O&&Fa(3,JSON.stringify(Gi(o)))}var i=function(o,f){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,v){p.__proto__=v}||function(p,v){for(var y in v)v.hasOwnProperty(y)&&(p[y]=v[y])})(o,f)},a=function(){function o(p,v){return this[Cn]={i:2,l:v,A:v?v.A:_1(),P:!1,I:!1,o:void 0,R:void 0,t:p,k:this,C:!1,O:!1},this}e(o,Map);var f=o.prototype;return Object.defineProperty(f,"size",{get:function(){return Gi(this[Cn]).size}}),f.has=function(p){return Gi(this[Cn]).has(p)},f.set=function(p,v){var y=this[Cn];return n(y),Gi(y).has(p)&&Gi(y).get(p)===v||(t(y),wl(y),y.R.set(p,!0),y.o.set(p,v),y.R.set(p,!0)),this},f.delete=function(p){if(!this.has(p))return!1;var v=this[Cn];return n(v),t(v),wl(v),v.t.has(p)?v.R.set(p,!1):v.R.delete(p),v.o.delete(p),!0},f.clear=function(){var p=this[Cn];n(p),Gi(p).size&&(t(p),wl(p),p.R=new Map,Qf(p.t,function(v){p.R.set(v,!1)}),p.o.clear())},f.forEach=function(p,v){var y=this;Gi(this[Cn]).forEach(function(w,k){p.call(v,y.get(k),k,y)})},f.get=function(p){var v=this[Cn];n(v);var y=Gi(v).get(p);if(v.I||!Fl(y)||y!==v.t.get(p))return y;var w=Qm(v.A.h,y,v);return t(v),v.o.set(p,w),w},f.keys=function(){return Gi(this[Cn]).keys()},f.values=function(){var p,v=this,y=this.keys();return(p={})[Dy]=function(){return v.values()},p.next=function(){var w=y.next();return w.done?w:{done:!1,value:v.get(w.value)}},p},f.entries=function(){var p,v=this,y=this.keys();return(p={})[Dy]=function(){return v.entries()},p.next=function(){var w=y.next();if(w.done)return w;var k=v.get(w.value);return{done:!1,value:[w.value,k]}},p},f[Dy]=function(){return this.entries()},o}(),u=function(){function o(p,v){return this[Cn]={i:3,l:v,A:v?v.A:_1(),P:!1,I:!1,o:void 0,t:p,k:this,p:new Map,O:!1,C:!1},this}e(o,Set);var f=o.prototype;return Object.defineProperty(f,"size",{get:function(){return Gi(this[Cn]).size}}),f.has=function(p){var v=this[Cn];return n(v),v.o?!!v.o.has(p)||!(!v.p.has(p)||!v.o.has(v.p.get(p))):v.t.has(p)},f.add=function(p){var v=this[Cn];return n(v),this.has(p)||(r(v),wl(v),v.o.add(p)),this},f.delete=function(p){if(!this.has(p))return!1;var v=this[Cn];return n(v),r(v),wl(v),v.o.delete(p)||!!v.p.has(p)&&v.o.delete(v.p.get(p))},f.clear=function(){var p=this[Cn];n(p),Gi(p).size&&(r(p),wl(p),p.o.clear())},f.values=function(){var p=this[Cn];return n(p),r(p),p.o.values()},f.entries=function(){var p=this[Cn];return n(p),r(p),p.o.entries()},f.keys=function(){return this.values()},f[Dy]=function(){return this.values()},f.forEach=function(p,v){for(var y=this.values(),w=y.next();!w.done;)p.call(v,w.value,w.value,this),w=y.next()},o}();Ope("MapSet",{F:function(o,f){return new a(o,f)},T:function(o,f){return new u(o,f)}})}var TM,Jm,dE=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Dpe=typeof Map<"u",Lpe=typeof Set<"u",PM=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",aL=dE?Symbol.for("immer-nothing"):((TM={})["immer-nothing"]=!0,TM),MM=dE?Symbol.for("immer-draftable"):"__$immer_draftable",Cn=dE?Symbol.for("immer-state"):"__$immer_state",Dy=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",Fpe=""+Object.prototype.constructor,fE=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,$pe=Object.getOwnPropertyDescriptors||function(e){var t={};return fE(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},_C={},bC={get:function(e,t){if(t===Cn)return e;var r=Gi(e);if(!yC(r,t))return function(i,a,u){var o,f=EM(a,u);return f?"value"in f?f.value:(o=f.get)===null||o===void 0?void 0:o.call(i.k):void 0}(e,r,t);var n=r[t];return e.I||!Fl(n)?n:n===D2(e.t,t)?(L2(e),e.o[t]=Qm(e.A.h,n,e)):n},has:function(e,t){return t in Gi(e)},ownKeys:function(e){return Reflect.ownKeys(Gi(e))},set:function(e,t,r){var n=EM(Gi(e),t);if(n!=null&&n.set)return n.set.call(e.k,r),!0;if(!e.P){var i=D2(Gi(e),t),a=i==null?void 0:i[Cn];if(a&&a.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(Ipe(r,i)&&(r!==void 0||yC(e.t,t)))return!0;L2(e),wl(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return D2(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,L2(e),wl(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=Gi(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){Fa(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Fa(12)}},em={};Qf(bC,function(e,t){em[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),em.deleteProperty=function(e,t){return em.set.call(this,e,t,void 0)},em.set=function(e,t,r){return bC.set.call(this,e[0],t,r,e[0])};var Bpe=function(){function e(r){var n=this;this.g=PM,this.D=!0,this.produce=function(i,a,u){if(typeof i=="function"&&typeof a!="function"){var o=a;a=i;var f=n;return function(R){var A=this;R===void 0&&(R=o);for(var I=arguments.length,O=Array(I>1?I-1:0),N=1;N<I;N++)O[N-1]=arguments[N];return f.produce(R,function(L){var B;return(B=a).call.apply(B,[A,L].concat(O))})}}var p;if(typeof a!="function"&&Fa(6),u!==void 0&&typeof u!="function"&&Fa(7),Fl(i)){var v=CM(n),y=Qm(n,i,void 0),w=!0;try{p=a(y),w=!1}finally{w?b1(v):xC(v)}return typeof Promise<"u"&&p instanceof Promise?p.then(function(R){return N2(v,u),z2(R,v)},function(R){throw b1(v),R}):(N2(v,u),z2(p,v))}if(!i||typeof i!="object"){if((p=a(i))===void 0&&(p=i),p===aL&&(p=void 0),n.D&&uE(p,!0),u){var k=[],T=[];qs("Patches").M(i,p,k,T),u(k,T)}return p}Fa(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(p){for(var v=arguments.length,y=Array(v>1?v-1:0),w=1;w<v;w++)y[w-1]=arguments[w];return n.produceWithPatches(p,function(k){return i.apply(void 0,[k].concat(y))})};var u,o,f=n.produce(i,a,function(p,v){u=p,o=v});return typeof Promise<"u"&&f instanceof Promise?f.then(function(p){return[p,u,o]}):[f,u,o]},typeof(r==null?void 0:r.useProxies)=="boolean"&&this.setUseProxies(r.useProxies),typeof(r==null?void 0:r.autoFreeze)=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){Fl(r)||Fa(8),Yf(r)&&(r=Npe(r));var n=CM(this),i=Qm(this,r,void 0);return i[Cn].C=!0,xC(n),i},t.finishDraft=function(r,n){var i=r&&r[Cn],a=i.A;return N2(a,n),z2(void 0,a)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!PM&&Fa(20),this.g=r},t.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var a=n[i];if(a.path.length===0&&a.op==="replace"){r=a.value;break}}i>-1&&(n=n.slice(i+1));var u=qs("Patches").$;return Yf(r)?u(r,n):this.produce(r,function(o){return u(o,n)})},e}(),xa=new Bpe,Vpe=xa.produce;xa.produceWithPatches.bind(xa);xa.setAutoFreeze.bind(xa);xa.setUseProxies.bind(xa);xa.applyPatches.bind(xa);xa.createDraft.bind(xa);xa.finishDraft.bind(xa);const jpe=e=>(t,r,n)=>(n.setState=(i,a,...u)=>{const o=typeof i=="function"?Vpe(i):i;return t(o,a,...u)},e(n.setState,r,n)),oc=jpe,$l={prediction:[0,0],categories:[],region:null,status:[un.initial],deltaTraffic:[-1e3,1e3],factTraffic:[0,0],age:[0,0]},Upe=e=>({filters:$l,setPrediction:t=>{e(r=>{r.filters.prediction=t})},setDeltaTraffic:t=>{e(r=>{r.filters.deltaTraffic=t})},setFactTraffic:t=>{e(r=>{r.filters.factTraffic=t})},setAge:t=>{e(r=>{r.filters.age=t})},setCategories:t=>e(r=>{r.filters.categories=t}),setRegion:t=>e(r=>{r.filters.region=t}),setStatus:t=>e(r=>{r.filters.status=t})}),Ui=ic(oc(Upe)),Kpe={included:new Set([]),excluded:new Set([])},Hpe=e=>({selection:Kpe,include:t=>{e(r=>{const{excluded:n}=r.selection;n.has(t)?r.selection.excluded.delete(t):r.selection.included.add(t)})},exclude:t=>{e(r=>{const{included:n}=r.selection;n.has(t)?r.selection.included.delete(t):r.selection.excluded.add(t)})},reset:()=>e(t=>{t.selection.included.clear(),t.selection.excluded.clear()})}),Qs=ic(oc(Hpe)),Wpe=()=>{const{selection:e}=Qs();return C.exports.useMemo(()=>e.included.size||e.excluded.size,[e])},bm="https://postnet-dev.selftech.ru",_a=Nhe.create({baseURL:`${bm}/`,withCredentials:!0,xsrfHeaderName:"X-CSRFToken",xsrfCookieName:"csrftoken"}),sL=(e,t)=>{const r=e||new URLSearchParams;return t&&(t.type==="ao"&&r.append("ao[]",t.id),t.type==="rayon"&&r.append("rayon[]",t.id)),r},Lv=async(e,t)=>{const r=sL(e,t),{data:n}=await _a.get(`/api/placement_points?${r.toString()}`);return n},hE=async(e,t)=>{const r=sL(e,t),{data:n}=await _a.get(`/api/placement_points/to_excel?${r.toString()}`,{responseType:"arraybuffer"});return n},qpe=()=>Xa(["all-initial-count"],async()=>{const e=new URLSearchParams({page:1,page_size:1,"status[]":[un.initial]});return await Lv(e)},{select:e=>e.count}),Gpe=()=>{const{filters:e}=Ui(),{prediction:t,categories:r,region:n}=e,{selection:{included:i}}=Qs(),a=[...i];return Xa(["filtered-points",e,a],async()=>{const u=new URLSearchParams({page:1,page_size:1,"prediction_current[]":t,"status[]":[un.initial],"categories[]":r,"included[]":a});return await Lv(u,n)},{select:u=>u.count,keepPreviousData:!0})},lL=hh(!0),qx=hh(!1),pE=GU(qx,"setAuth",(e,t)=>{e.set(t)});async function Zpe(){try{await _a.get("/accounts/profile/"),pE(!0)}catch{console.log("Not authorized")}finally{lL.set(!1)}}Zpe();class uL extends Error{constructor(r){super("");C6(this,"errors");this.name="DjangoValidationError";const n=[];for(const i in r)n.push({name:i,errors:r[i]});this.errors=n}}const wC=hh(!1),CC=hh(""),Xpe="\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 Ype(e){var r,n,i,a;wC.set(!0),CC.set("");try{const{data:u}=await _a.post("accounts/login/",e);return pE(!0),u}catch(u){var t=Xpe;throw(n=(r=u.response)==null?void 0:r.data)!=null&&n.detail&&(t=(a=(i=u.response)==null?void 0:i.data)==null?void 0:a.detail,CC.set(t)),new uL(u.response.data)}finally{wC.set(!1)}}const SC=hh(!1),cL=hh("");async function Qpe(e){var t;SC.set(!0);try{const{data:r}=await _a.post("accounts/register/",e);return r}catch(r){throw(t=r.response.data)!=null&&t.non_field_errors&&cL.set(r.response.data.non_field_errors.join(" ")),new uL(r.response.data)}finally{SC.set(!1)}}function Jpe(){const e=Wu(CC),t=Wu(wC),r=n=>{Ype(n)};return Xe(IS,{direction:"vertical",style:{width:"320px"},children:[e.length>0?S(px,{type:"error",showIcon:!0,closable:!0,description:e}):null,S(GS.Title,{level:4,children:"\u0412\u0445\u043E\u0434"}),Xe(hs,{disabled:t,name:"basic",layout:"vertical",onFinish:r,autoComplete:"off",children:[S(hs.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:S(Ru,{prefix:S(wD,{className:"site-form-item-icon"}),placeholder:"\u043B\u043E\u0433\u0438\u043D"})}),S(hs.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:S(Ru,{prefix:S(lC,{className:"site-form-item-icon"}),type:"password",placeholder:"\u043F\u0430\u0440\u043E\u043B\u044C"})}),S(hs.Item,{children:S(On,{block:!0,type:"primary",htmlType:"submit",children:"\u0412\u043E\u0439\u0442\u0438"})}),S("div",{style:{textAlign:"center"},children:S(Ww,{to:"/register",children:"\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044F"})})]})]})}function eme(){return Wu(qx)?S(W1,{to:"/",replace:!0}):S("main",{className:"w-screen h-screen flex items-center justify-center",children:S(Jpe,{})})}const tme=e=>{const t=C.exports.useRef(e),r=C.exports.useRef(),n=C.exports.useRef(!1),i=C.exports.useRef(!1),[,a]=C.exports.useState(0);n.current&&(i.current=!0),C.exports.useEffect(()=>(n.current||(r.current=t.current(),n.current=!0),a(u=>u+1),()=>{!i.current||r.current&&r.current()}),[])};function rme(){const[e]=HU(),[t,r]=C.exports.useState(!1);return tme(()=>{async function n(){try{await _a.post("accounts/verify-registration/",{user_id:e.get("user_id"),timestamp:e.get("timestamp"),signature:e.get("signature")})}finally{r(!0)}}n()}),t?S(W1,{to:"/"}):S("div",{children:"Verifying..."})}function nme(e){var t=typeof e;return t==="function"||t==="object"&&!!e}function ime(){const[e]=hs.useForm(),[t,r]=C.exports.useState(""),n=Wu(cL),i=Wu(SC),a=u=>{Qpe(u).then(()=>{r(`\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 ${u.email} \u0434\u043B\u044F \u0430\u043A\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u0430\u043A\u043A\u0430\u0443\u043D\u0442\u0430.`)}).catch(o=>{nme(o.errors)&&e.setFields(o.errors)})};return t?S(dre,{title:t,status:"success",extra:S(Ww,{to:"/",children:"\u041D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E"})}):Xe(IS,{direction:"vertical",style:{width:"320px"},children:[n.length>0?S(px,{type:"error",showIcon:!0,closable:!0,description:n}):null,S(GS.Title,{level:4,children:"\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044F"}),Xe(hs,{form:e,disabled:i,name:"basic",layout:"vertical",onFinish:a,children:[S(hs.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:S(Ru,{prefix:S(wD,{className:"site-form-item-icon"}),placeholder:""})}),S(hs.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:S(Ru,{type:"email",autoComplete:"email",prefix:S(yfe,{className:"site-form-item-icon"}),placeholder:""})}),S(hs.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:S(Ru,{prefix:S(lC,{className:"site-form-item-icon"}),type:"password",autoComplete:"new-password",placeholder:""})}),S(hs.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:u})=>({validator(o,f){return!f||u("password")===f?Promise.resolve():Promise.reject(new Error("\u041F\u0430\u0440\u043E\u043B\u0438 \u043D\u0435 \u0441\u043E\u0432\u043F\u0430\u0434\u0430\u044E\u0442"))}})],children:S(Ru,{autoComplete:"re-password",prefix:S(lC,{className:"site-form-item-icon"}),type:"password",placeholder:""})}),S(hs.Item,{children:S(On,{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"})}),S("div",{style:{textAlign:"center"},children:S(Ww,{to:"/",children:"\u0423\u0436\u0435 \u0435\u0441\u0442\u044C \u0430\u043A\u043A\u0430\u0443\u043D\u0442"})})]})]})}function ome(){return Wu(qx)?S(W1,{to:"/",replace:!0}):S("main",{className:"h-screen w-screen flex items-center justify-center",children:S(ime,{})})}function ame(e){const t=Wu(qx);return Wu(lL)?S($S,{className:"user-info-loader"}):t?S(Ar,{children:e.children}):S(W1,{to:"/signin",replace:!0})}var dL={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(Sl,function(){var r,n,i;function a(o,f){if(!r)r=f;else if(!n)n=f;else{var p="var sharedChunk = {}; ("+r+")(sharedChunk); ("+n+")(sharedChunk);",v={};r(v),i=f(v),typeof window<"u"&&(i.workerUrl=window.URL.createObjectURL(new Blob([p],{type:"text/javascript"})))}}a(["exports"],function(o){var f=p;function p(c,s,d,m){this.cx=3*c,this.bx=3*(d-c)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*s,this.by=3*(m-s)-this.cy,this.ay=1-this.cy-this.by,this.p1x=c,this.p1y=s,this.p2x=d,this.p2y=m}function v(c,s,d,m){const _=new f(c,s,d,m);return function(E){return _.solve(E)}}p.prototype={sampleCurveX:function(c){return((this.ax*c+this.bx)*c+this.cx)*c},sampleCurveY:function(c){return((this.ay*c+this.by)*c+this.cy)*c},sampleCurveDerivativeX:function(c){return(3*this.ax*c+2*this.bx)*c+this.cx},solveCurveX:function(c,s){if(s===void 0&&(s=1e-6),c<0)return 0;if(c>1)return 1;for(var d=c,m=0;m<8;m++){var _=this.sampleCurveX(d)-c;if(Math.abs(_)<s)return d;var E=this.sampleCurveDerivativeX(d);if(Math.abs(E)<1e-6)break;d-=_/E}var M=0,D=1;for(d=c,m=0;m<20&&(_=this.sampleCurveX(d),!(Math.abs(_-c)<s));m++)c>_?M=d:D=d,d=.5*(D-M)+M;return d},solve:function(c,s){return this.sampleCurveY(this.solveCurveX(c,s))}};const y=v(.25,.1,.25,1);function w(c,s,d){return Math.min(d,Math.max(s,c))}function k(c,s,d){const m=d-s,_=((c-s)%m+m)%m+s;return _===s?d:_}function T(c,...s){for(const d of s)for(const m in d)c[m]=d[m];return c}let R=1;function A(c,s){c.forEach(d=>{s[d]&&(s[d]=s[d].bind(s))})}function I(c,s,d){const m={};for(const _ in c)m[_]=s.call(d||this,c[_],_,c);return m}function O(c,s,d){const m={};for(const _ in c)s.call(d||this,c[_],_,c)&&(m[_]=c[_]);return m}function N(c){return Array.isArray(c)?c.map(N):typeof c=="object"&&c?I(c,N):c}const L={};function B(c){L[c]||(typeof console<"u"&&console.warn(c),L[c]=!0)}function j(c,s,d){return(d.y-c.y)*(s.x-c.x)>(s.y-c.y)*(d.x-c.x)}function G(c){let s=0;for(let d,m,_=0,E=c.length,M=E-1;_<E;M=_++)d=c[_],m=c[M],s+=(m.x-d.x)*(d.y+m.y);return s}function H(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function te(c){const s={};if(c.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(d,m,_,E)=>{const M=_||E;return s[m]=!M||M.toLowerCase(),""}),s["max-age"]){const d=parseInt(s["max-age"],10);isNaN(d)?delete s["max-age"]:s["max-age"]=d}return s}let Y,le,J=null;function Z(c){if(J==null){const s=c.navigator?c.navigator.userAgent:null;J=!!c.safari||!(!s||!(/\b(iPad|iPhone|iPod)\b/.test(s)||s.match("Safari")&&!s.match("Chrome")))}return J}function Q(c){return typeof ImageBitmap<"u"&&c instanceof ImageBitmap}const ge={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frame(c){const s=requestAnimationFrame(c);return{cancel:()=>cancelAnimationFrame(s)}},getImageData(c,s=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=c.width,d.height=c.height,m.drawImage(c,0,0,c.width,c.height),m.getImageData(-s,-s,c.width+2*s,c.height+2*s)},resolveURL:c=>(Y||(Y=document.createElement("a")),Y.href=c,Y.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(le==null&&(le=matchMedia("(prefers-reduced-motion: reduce)")),le.matches)}};var ne=de;function de(c,s){this.x=c,this.y=s}de.prototype={clone:function(){return new de(this.x,this.y)},add:function(c){return this.clone()._add(c)},sub:function(c){return this.clone()._sub(c)},multByPoint:function(c){return this.clone()._multByPoint(c)},divByPoint:function(c){return this.clone()._divByPoint(c)},mult:function(c){return this.clone()._mult(c)},div:function(c){return this.clone()._div(c)},rotate:function(c){return this.clone()._rotate(c)},rotateAround:function(c,s){return this.clone()._rotateAround(c,s)},matMult:function(c){return this.clone()._matMult(c)},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(c){return this.x===c.x&&this.y===c.y},dist:function(c){return Math.sqrt(this.distSqr(c))},distSqr:function(c){var s=c.x-this.x,d=c.y-this.y;return s*s+d*d},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(c){return Math.atan2(this.y-c.y,this.x-c.x)},angleWith:function(c){return this.angleWithSep(c.x,c.y)},angleWithSep:function(c,s){return Math.atan2(this.x*s-this.y*c,this.x*c+this.y*s)},_matMult:function(c){var s=c[2]*this.x+c[3]*this.y;return this.x=c[0]*this.x+c[1]*this.y,this.y=s,this},_add:function(c){return this.x+=c.x,this.y+=c.y,this},_sub:function(c){return this.x-=c.x,this.y-=c.y,this},_mult:function(c){return this.x*=c,this.y*=c,this},_div:function(c){return this.x/=c,this.y/=c,this},_multByPoint:function(c){return this.x*=c.x,this.y*=c.y,this},_divByPoint:function(c){return this.x/=c.x,this.y/=c.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var c=this.y;return this.y=this.x,this.x=-c,this},_rotate:function(c){var s=Math.cos(c),d=Math.sin(c),m=d*this.x+s*this.y;return this.x=s*this.x-d*this.y,this.y=m,this},_rotateAround:function(c,s){var d=Math.cos(c),m=Math.sin(c),_=s.y+m*(this.x-s.x)+d*(this.y-s.y);return this.x=s.x+d*(this.x-s.x)-m*(this.y-s.y),this.y=_,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},de.convert=function(c){return c instanceof de?c:Array.isArray(c)?new de(c[0],c[1]):c};const oe={MAX_PARALLEL_IMAGE_REQUESTS:16,REGISTERED_PROTOCOLS:{}},ye="mapbox-tiles";let Re,Te,ke=500,ze=50;function Ie(){typeof caches>"u"||Re||(Re=caches.open(ye))}let Ne=1/0;const De={supported:!1,testSupport:function(c){!je&&Ge&&(ct?pt(c):Ve=c)}};let Ve,Ge,je=!1,ct=!1;function pt(c){const s=c.createTexture();c.bindTexture(c.TEXTURE_2D,s);try{if(c.texImage2D(c.TEXTURE_2D,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,Ge),c.isContextLost())return;De.supported=!0}catch{}c.deleteTexture(s),je=!0}typeof document<"u"&&(Ge=document.createElement("img"),Ge.onload=function(){Ve&&pt(Ve),Ve=null,ct=!0},Ge.onerror=function(){je=!0,Ve=null},Ge.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 Ye extends Error{constructor(s,d,m,_){super(`AJAXError: ${d} (${s}): ${m}`),this.status=s,this.statusText=d,this.url=m,this.body=_}}const Pt=H()?()=>self.worker&&self.worker.referrer:()=>(window.location.protocol==="blob:"?window.parent:window).location.href;function mt(c,s){const d=new AbortController,m=new Request(c.url,{method:c.method||"GET",body:c.body,credentials:c.credentials,headers:c.headers,referrer:Pt(),signal:d.signal});let _=!1,E=!1;return c.type==="json"&&m.headers.set("Accept","application/json"),((M,D,F)=>{if(E)return;const U=Date.now();fetch(m).then(X=>X.ok?((re,ue,he)=>{(c.type==="arrayBuffer"?re.arrayBuffer():c.type==="json"?re.json():re.text()).then(pe=>{E||(ue&&he&&function(Oe,Me,Ze){if(Ie(),!Re)return;const st={status:Me.status,statusText:Me.statusText,headers:new Headers};Me.headers.forEach((nt,kt)=>st.headers.set(kt,nt));const Ke=te(Me.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(nt,kt){if(Te===void 0)try{new Response(new ReadableStream),Te=!0}catch{Te=!1}Te?kt(nt.body):nt.blob().then(kt)}(Me,nt=>{const kt=new Response(nt,st);Ie(),Re&&Re.then(St=>St.put(function(lr){const hr=lr.indexOf("?");return hr<0?lr:lr.slice(0,hr)}(Oe.url),kt)).catch(St=>B(St.message))}))}(m,ue,he),_=!0,s(null,pe,re.headers.get("Cache-Control"),re.headers.get("Expires")))}).catch(pe=>{E||s(new Error(pe.message))})})(X,null,U):X.blob().then(re=>s(new Ye(X.status,X.statusText,c.url,re)))).catch(X=>{X.code!==20&&s(new Error(X.message))})})(),{cancel:()=>{E=!0,_||d.abort()}}}const It=function(c,s){if(/:\/\//.test(c.url)&&!/^https?:|^file:/.test(c.url)){if(H()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",c,s);if(!H()){const m=c.url.substring(0,c.url.indexOf("://"));return(oe.REGISTERED_PROTOCOLS[m]||mt)(c,s)}}if(!(/^file:/.test(d=c.url)||/^file:/.test(Pt())&&!/^\w+:/.test(d))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return mt(c,s);if(H()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",c,s,void 0,!0)}var d;return function(m,_){const E=new XMLHttpRequest;E.open(m.method||"GET",m.url,!0),m.type==="arrayBuffer"&&(E.responseType="arraybuffer");for(const M in m.headers)E.setRequestHeader(M,m.headers[M]);return m.type==="json"&&(E.responseType="text",E.setRequestHeader("Accept","application/json")),E.withCredentials=m.credentials==="include",E.onerror=()=>{_(new Error(E.statusText))},E.onload=()=>{if((E.status>=200&&E.status<300||E.status===0)&&E.response!==null){let M=E.response;if(m.type==="json")try{M=JSON.parse(E.response)}catch(D){return _(D)}_(null,M,E.getResponseHeader("Cache-Control"),E.getResponseHeader("Expires"))}else{const M=new Blob([E.response],{type:E.getResponseHeader("Content-Type")});_(new Ye(E.status,E.statusText,m.url,M))}},E.send(m.body),{cancel:()=>E.abort()}}(c,s)},Ct=function(c,s){return It(T(c,{type:"arrayBuffer"}),s)};function Dt(c){const s=window.document.createElement("a");return s.href=c,s.protocol===window.document.location.protocol&&s.host===window.document.location.host}const lt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let dt,ut;dt=[],ut=0;const it=function(c,s){if(De.supported&&(c.headers||(c.headers={}),c.headers.accept="image/webp,*/*"),ut>=oe.MAX_PARALLEL_IMAGE_REQUESTS){const E={requestParameters:c,callback:s,cancelled:!1,cancel(){this.cancelled=!0}};return dt.push(E),E}ut++;let d=!1;const m=()=>{if(!d)for(d=!0,ut--;dt.length&&ut<oe.MAX_PARALLEL_IMAGE_REQUESTS;){const E=dt.shift(),{requestParameters:M,callback:D,cancelled:F}=E;F||(E.cancel=it(M,D).cancel)}},_=Ct(c,(E,M,D,F)=>{m(),E?s(E):M&&function(U,X){typeof createImageBitmap=="function"?function(re,ue){const he=new Blob([new Uint8Array(re)],{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.`))})}(U,X):function(re,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(re)],{type:"image/png"});he.src=re.byteLength?URL.createObjectURL(pe):lt}(U,X)}(M,(U,X)=>{U!=null?s(U):X!=null&&s(null,X,{cacheControl:D,expires:F})})});return{cancel:()=>{_.cancel(),m()}}};function ft(c,s,d){d[c]&&d[c].indexOf(s)!==-1||(d[c]=d[c]||[],d[c].push(s))}function xt(c,s,d){if(d&&d[c]){const m=d[c].indexOf(s);m!==-1&&d[c].splice(m,1)}}class Wt{constructor(s,d={}){T(this,d),this.type=s}}class jt extends Wt{constructor(s,d={}){super("error",T({error:s},d))}}class Qt{on(s,d){return this._listeners=this._listeners||{},ft(s,d,this._listeners),this}off(s,d){return xt(s,d,this._listeners),xt(s,d,this._oneTimeListeners),this}once(s,d){return this._oneTimeListeners=this._oneTimeListeners||{},ft(s,d,this._oneTimeListeners),this}fire(s,d){typeof s=="string"&&(s=new Wt(s,d||{}));const m=s.type;if(this.listens(m)){s.target=this;const _=this._listeners&&this._listeners[m]?this._listeners[m].slice():[];for(const D of _)D.call(this,s);const E=this._oneTimeListeners&&this._oneTimeListeners[m]?this._oneTimeListeners[m].slice():[];for(const D of E)xt(m,D,this._oneTimeListeners),D.call(this,s);const M=this._eventedParent;M&&(T(s,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),M.fire(s))}else s instanceof jt&&console.error(s.error);return this}listens(s){return this._listeners&&this._listeners[s]&&this._listeners[s].length>0||this._oneTimeListeners&&this._oneTimeListeners[s]&&this._oneTimeListeners[s].length>0||this._eventedParent&&this._eventedParent.listens(s)}setEventedParent(s,d){return this._eventedParent=s,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 qe{constructor(s,d,m,_){this.message=(s?`${s}: `:"")+m,_&&(this.identifier=_),d!=null&&d.__line__&&(this.line=d.__line__)}}function Xt(c){const s=c.value;return s?[new qe(c.key,s,"constants have been deprecated as of v8")]:[]}function cr(c,...s){for(const d of s)for(const m in d)c[m]=d[m];return c}function Vt(c){return c instanceof Number||c instanceof String||c instanceof Boolean?c.valueOf():c}function Ut(c){if(Array.isArray(c))return c.map(Ut);if(c instanceof Object&&!(c instanceof Number||c instanceof String||c instanceof Boolean)){const s={};for(const d in c)s[d]=Ut(c[d]);return s}return Vt(c)}class rr extends Error{constructor(s,d){super(d),this.message=d,this.key=s}}class xr{constructor(s,d=[]){this.parent=s,this.bindings={};for(const[m,_]of d)this.bindings[m]=_}concat(s){return new xr(this,s)}get(s){if(this.bindings[s])return this.bindings[s];if(this.parent)return this.parent.get(s);throw new Error(`${s} not found in scope.`)}has(s){return!!this.bindings[s]||!!this.parent&&this.parent.has(s)}}const Or={kind:"null"},_t={kind:"number"},qt={kind:"string"},or={kind:"boolean"},$r={kind:"color"},kr={kind:"object"},Lt={kind:"value"},Tr={kind:"collator"},Cr={kind:"formatted"},fr={kind:"padding"},Nt={kind:"resolvedImage"};function ot(c,s){return{kind:"array",itemType:c,N:s}}function ht(c){if(c.kind==="array"){const s=ht(c.itemType);return typeof c.N=="number"?`array<${s}, ${c.N}>`:c.itemType.kind==="value"?"array":`array<${s}>`}return c.kind}const Ot=[Or,_t,qt,or,$r,Cr,kr,ot(Lt),fr,Nt];function $t(c,s){if(s.kind==="error")return null;if(c.kind==="array"){if(s.kind==="array"&&(s.N===0&&s.itemType.kind==="value"||!$t(c.itemType,s.itemType))&&(typeof c.N!="number"||c.N===s.N))return null}else{if(c.kind===s.kind)return null;if(c.kind==="value"){for(const d of Ot)if(!$t(d,s))return null}}return`Expected ${ht(c)} but found ${ht(s)} instead.`}function ur(c,s){return s.some(d=>d.kind===c.kind)}function Ir(c,s){return s.some(d=>d==="null"?c===null:d==="array"?Array.isArray(c):d==="object"?c&&!Array.isArray(c)&&typeof c=="object":d===typeof c)}var qr,Gr={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(c){return(c=Math.round(c))<0?0:c>255?255:c}function K(c){return me(c[c.length-1]==="%"?parseFloat(c)/100*255:parseInt(c))}function q(c){return(s=c[c.length-1]==="%"?parseFloat(c)/100:parseFloat(c))<0?0:s>1?1:s;var s}function ce(c,s,d){return d<0?d+=1:d>1&&(d-=1),6*d<1?c+(s-c)*d*6:2*d<1?s:3*d<2?c+(s-c)*(2/3-d)*6:c}try{qr={}.parseCSSColor=function(c){var s,d=c.replace(/ /g,"").toLowerCase();if(d in Gr)return Gr[d].slice();if(d[0]==="#")return d.length===4?(s=parseInt(d.substr(1),16))>=0&&s<=4095?[(3840&s)>>4|(3840&s)>>8,240&s|(240&s)>>4,15&s|(15&s)<<4,1]:null:d.length===7&&(s=parseInt(d.substr(1),16))>=0&&s<=16777215?[(16711680&s)>>16,(65280&s)>>8,255&s,1]:null;var m=d.indexOf("("),_=d.indexOf(")");if(m!==-1&&_+1===d.length){var E=d.substr(0,m),M=d.substr(m+1,_-(m+1)).split(","),D=1;switch(E){case"rgba":if(M.length!==4)return null;D=q(M.pop());case"rgb":return M.length!==3?null:[K(M[0]),K(M[1]),K(M[2]),D];case"hsla":if(M.length!==4)return null;D=q(M.pop());case"hsl":if(M.length!==3)return null;var F=(parseFloat(M[0])%360+360)%360/360,U=q(M[1]),X=q(M[2]),re=X<=.5?X*(U+1):X+U-X*U,ue=2*X-re;return[me(255*ce(ue,re,F+1/3)),me(255*ce(ue,re,F)),me(255*ce(ue,re,F-1/3)),D];default:return null}}return null}}catch{}class ae{constructor(s,d,m,_=1){this.r=s,this.g=d,this.b=m,this.a=_}static parse(s){if(!s)return;if(s instanceof ae)return s;if(typeof s!="string")return;const d=qr(s);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[s,d,m,_]=this.toArray();return`rgba(${Math.round(s)},${Math.round(d)},${Math.round(m)},${_})`}toArray(){const{r:s,g:d,b:m,a:_}=this;return _===0?[0,0,0,0]:[255*s/_,255*d/_,255*m/_,_]}}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(s,d,m){this.sensitivity=s?d?"variant":"case":d?"accent":"base",this.locale=m,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(s,d){return this.collator.compare(s,d)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Ee{constructor(s,d,m,_,E){this.text=s,this.image=d,this.scale=m,this.fontStack=_,this.textColor=E}}class be{constructor(s){this.sections=s}static fromString(s){return new be([new Ee(s,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(s=>s.text.length!==0||s.image&&s.image.name.length!==0)}static factory(s){return s instanceof be?s:be.fromString(s)}toString(){return this.sections.length===0?"":this.sections.map(s=>s.text).join("")}}class Ce{constructor(s){this.values=s.slice()}static parse(s){if(s instanceof Ce)return s;if(typeof s=="number")return new Ce([s,s,s,s]);if(Array.isArray(s)&&!(s.length<1||s.length>4)){for(const d of s)if(typeof d!="number")return;switch(s.length){case 1:s=[s[0],s[0],s[0],s[0]];break;case 2:s=[s[0],s[1],s[0],s[1]];break;case 3:s=[s[0],s[1],s[2],s[1]]}return new Ce(s)}}toString(){return JSON.stringify(this.values)}}class Ae{constructor(s){this.name=s.name,this.available=s.available}toString(){return this.name}static fromString(s){return s?new Ae({name:s,available:!1}):null}}function He(c,s,d,m){return typeof c=="number"&&c>=0&&c<=255&&typeof s=="number"&&s>=0&&s<=255&&typeof d=="number"&&d>=0&&d<=255?m===void 0||typeof m=="number"&&m>=0&&m<=1?null:`Invalid rgba value [${[c,s,d,m].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof m=="number"?[c,s,d,m]:[c,s,d]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function We(c){if(c===null||typeof c=="string"||typeof c=="boolean"||typeof c=="number"||c instanceof ae||c instanceof xe||c instanceof be||c instanceof Ce||c instanceof Ae)return!0;if(Array.isArray(c)){for(const s of c)if(!We(s))return!1;return!0}if(typeof c=="object"){for(const s in c)if(!We(c[s]))return!1;return!0}return!1}function Be(c){if(c===null)return Or;if(typeof c=="string")return qt;if(typeof c=="boolean")return or;if(typeof c=="number")return _t;if(c instanceof ae)return $r;if(c instanceof xe)return Tr;if(c instanceof be)return Cr;if(c instanceof Ce)return fr;if(c instanceof Ae)return Nt;if(Array.isArray(c)){const s=c.length;let d;for(const m of c){const _=Be(m);if(d){if(d===_)continue;d=Lt;break}d=_}return ot(d||Lt,s)}return kr}function At(c){const s=typeof c;return c===null?"":s==="string"||s==="number"||s==="boolean"?String(c):c instanceof ae||c instanceof be||c instanceof Ce||c instanceof Ae?c.toString():JSON.stringify(c)}class bt{constructor(s,d){this.type=s,this.value=d}static parse(s,d){if(s.length!==2)return d.error(`'literal' expression requires exactly one argument, but found ${s.length-1} instead.`);if(!We(s[1]))return d.error("invalid value");const m=s[1];let _=Be(m);const E=d.expectedType;return _.kind!=="array"||_.N!==0||!E||E.kind!=="array"||typeof E.N=="number"&&E.N!==0||(_=E),new bt(_,m)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class Je{constructor(s){this.name="ExpressionEvaluationError",this.message=s}toJSON(){return this.message}}const Rt={string:qt,number:_t,boolean:or,object:kr};class Bt{constructor(s,d){this.type=s,this.args=d}static parse(s,d){if(s.length<2)return d.error("Expected at least one argument.");let m,_=1;const E=s[0];if(E==="array"){let D,F;if(s.length>2){const U=s[1];if(typeof U!="string"||!(U in Rt)||U==="object")return d.error('The item type argument of "array" must be one of string, number, boolean',1);D=Rt[U],_++}else D=Lt;if(s.length>3){if(s[2]!==null&&(typeof s[2]!="number"||s[2]<0||s[2]!==Math.floor(s[2])))return d.error('The length argument to "array" must be a positive integer literal',2);F=s[2],_++}m=ot(D,F)}else{if(!Rt[E])throw new Error(`Types doesn't contain name = ${E}`);m=Rt[E]}const M=[];for(;_<s.length;_++){const D=d.parse(s[_],_,Lt);if(!D)return null;M.push(D)}return new Bt(m,M)}evaluate(s){for(let d=0;d<this.args.length;d++){const m=this.args[d].evaluate(s);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(s){this.args.forEach(s)}outputDefined(){return this.args.every(s=>s.outputDefined())}}const vr={"to-boolean":or,"to-color":$r,"to-number":_t,"to-string":qt};class ir{constructor(s,d){this.type=s,this.args=d}static parse(s,d){if(s.length<2)return d.error("Expected at least one argument.");const m=s[0];if(!vr[m])throw new Error(`Can't parse ${m} as it is not part of the known types`);if((m==="to-boolean"||m==="to-string")&&s.length!==2)return d.error("Expected one argument.");const _=vr[m],E=[];for(let M=1;M<s.length;M++){const D=d.parse(s[M],M,Lt);if(!D)return null;E.push(D)}return new ir(_,E)}evaluate(s){if(this.type.kind==="boolean")return Boolean(this.args[0].evaluate(s));if(this.type.kind==="color"){let d,m;for(const _ of this.args){if(d=_.evaluate(s),m=null,d instanceof ae)return d;if(typeof d=="string"){const E=s.parseColor(d);if(E)return E}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(s);const _=Ce.parse(d);if(_)return _}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(s),d===null)return 0;const _=Number(d);if(!isNaN(_))return _}throw new Je(`Could not convert ${JSON.stringify(d)} to number.`)}return this.type.kind==="formatted"?be.fromString(At(this.args[0].evaluate(s))):this.type.kind==="resolvedImage"?Ae.fromString(At(this.args[0].evaluate(s))):At(this.args[0].evaluate(s))}eachChild(s){this.args.forEach(s)}outputDefined(){return this.args.every(s=>s.outputDefined())}}const gr=["Unknown","Point","LineString","Polygon"];class Br{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"?gr[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(s){let d=this._parseColorCache[s];return d||(d=this._parseColorCache[s]=ae.parse(s)),d}}class Jr{constructor(s,d,m,_){this.name=s,this.type=d,this._evaluate=m,this.args=_}evaluate(s){return this._evaluate(s,this.args)}eachChild(s){this.args.forEach(s)}outputDefined(){return!1}static parse(s,d){const m=s[0],_=Jr.definitions[m];if(!_)return d.error(`Unknown expression "${m}". If you wanted a literal array, use ["literal", [...]].`,0);const E=Array.isArray(_)?_[0]:_.type,M=Array.isArray(_)?[[_[1],_[2]]]:_.overloads,D=M.filter(([U])=>!Array.isArray(U)||U.length===s.length-1);let F=null;for(const[U,X]of D){F=new Es(d.registry,d.path,null,d.scope);const re=[];let ue=!1;for(let he=1;he<s.length;he++){const pe=s[he],Oe=Array.isArray(U)?U[he-1]:U.type,Me=F.parse(pe,1+re.length,Oe);if(!Me){ue=!0;break}re.push(Me)}if(!ue)if(Array.isArray(U)&&U.length!==re.length)F.error(`Expected ${U.length} arguments, but found ${re.length} instead.`);else{for(let he=0;he<re.length;he++){const pe=Array.isArray(U)?U[he]:U.type,Oe=re[he];F.concat(he+1).checkSubtype(pe,Oe.type)}if(F.errors.length===0)return new Jr(m,E,X,re)}}if(D.length===1)d.errors.push(...F.errors);else{const U=(D.length?D:M).map(([re])=>{return ue=re,Array.isArray(ue)?`(${ue.map(ht).join(", ")})`:`(${ht(ue.type)}...)`;var ue}).join(" | "),X=[];for(let re=1;re<s.length;re++){const ue=d.parse(s[re],1+X.length);if(!ue)return null;X.push(ht(ue.type))}d.error(`Expected arguments of type ${U}, but found (${X.join(", ")}) instead.`)}return null}static register(s,d){Jr.definitions=d;for(const m in d)s[m]=Jr}}class Vn{constructor(s,d,m){this.type=Tr,this.locale=m,this.caseSensitive=s,this.diacriticSensitive=d}static parse(s,d){if(s.length!==2)return d.error("Expected one argument.");const m=s[1];if(typeof m!="object"||Array.isArray(m))return d.error("Collator options argument must be an object.");const _=d.parse(m["case-sensitive"]!==void 0&&m["case-sensitive"],1,or);if(!_)return null;const E=d.parse(m["diacritic-sensitive"]!==void 0&&m["diacritic-sensitive"],1,or);if(!E)return null;let M=null;return m.locale&&(M=d.parse(m.locale,1,qt),!M)?null:new Vn(_,E,M)}evaluate(s){return new xe(this.caseSensitive.evaluate(s),this.diacriticSensitive.evaluate(s),this.locale?this.locale.evaluate(s):null)}eachChild(s){s(this.caseSensitive),s(this.diacriticSensitive),this.locale&&s(this.locale)}outputDefined(){return!1}}const an=8192;function An(c,s){c[0]=Math.min(c[0],s[0]),c[1]=Math.min(c[1],s[1]),c[2]=Math.max(c[2],s[0]),c[3]=Math.max(c[3],s[1])}function Pr(c,s){return!(c[0]<=s[0]||c[2]>=s[2]||c[1]<=s[1]||c[3]>=s[3])}function Sr(c,s){const d=(180+c[0])/360,m=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+c[1]*Math.PI/360)))/360,_=Math.pow(2,s.z);return[Math.round(d*_*an),Math.round(m*_*an)]}function Rr(c,s,d){const m=c[0]-s[0],_=c[1]-s[1],E=c[0]-d[0],M=c[1]-d[1];return m*M-E*_==0&&m*E<=0&&_*M<=0}function ei(c,s){let d=!1;for(let M=0,D=s.length;M<D;M++){const F=s[M];for(let U=0,X=F.length;U<X-1;U++){if(Rr(c,F[U],F[U+1]))return!1;(_=F[U])[1]>(m=c)[1]!=(E=F[U+1])[1]>m[1]&&m[0]<(E[0]-_[0])*(m[1]-_[1])/(E[1]-_[1])+_[0]&&(d=!d)}}var m,_,E;return d}function yn(c,s){for(let d=0;d<s.length;d++)if(ei(c,s[d]))return!0;return!1}function Ur(c,s,d,m){const _=m[0]-d[0],E=m[1]-d[1],M=(c[0]-d[0])*E-_*(c[1]-d[1]),D=(s[0]-d[0])*E-_*(s[1]-d[1]);return M>0&&D<0||M<0&&D>0}function Lr(c,s,d){for(const U of d)for(let X=0;X<U.length-1;++X)if((D=[(M=U[X+1])[0]-(E=U[X])[0],M[1]-E[1]])[0]*(F=[(_=s)[0]-(m=c)[0],_[1]-m[1]])[1]-D[1]*F[0]!=0&&Ur(m,_,E,M)&&Ur(E,M,m,_))return!0;var m,_,E,M,D,F;return!1}function Yr(c,s){for(let d=0;d<c.length;++d)if(!ei(c[d],s))return!1;for(let d=0;d<c.length-1;++d)if(Lr(c[d],c[d+1],s))return!1;return!0}function wn(c,s){for(let d=0;d<s.length;d++)if(Yr(c,s[d]))return!0;return!1}function Sn(c,s,d){const m=[];for(let _=0;_<c.length;_++){const E=[];for(let M=0;M<c[_].length;M++){const D=Sr(c[_][M],d);An(s,D),E.push(D)}m.push(E)}return m}function jn(c,s,d){const m=[];for(let _=0;_<c.length;_++){const E=Sn(c[_],s,d);m.push(E)}return m}function bo(c,s,d,m){if(c[0]<d[0]||c[0]>d[2]){const _=.5*m;let E=c[0]-d[0]>_?-m:d[0]-c[0]>_?m:0;E===0&&(E=c[0]-d[2]>_?-m:d[2]-c[0]>_?m:0),c[0]+=E}An(s,c)}function Zl(c,s,d,m){const _=Math.pow(2,m.z)*an,E=[m.x*an,m.y*an],M=[];for(const D of c)for(const F of D){const U=[F.x+E[0],F.y+E[1]];bo(U,s,d,_),M.push(U)}return M}function Td(c,s,d,m){const _=Math.pow(2,m.z)*an,E=[m.x*an,m.y*an],M=[];for(const F of c){const U=[];for(const X of F){const re=[X.x+E[0],X.y+E[1]];An(s,re),U.push(re)}M.push(U)}if(s[2]-s[0]<=_/2){(D=s)[0]=D[1]=1/0,D[2]=D[3]=-1/0;for(const F of M)for(const U of F)bo(U,s,d,_)}var D;return M}class Qa{constructor(s,d){this.type=or,this.geojson=s,this.geometries=d}static parse(s,d){if(s.length!==2)return d.error(`'within' expression requires exactly one argument, but found ${s.length-1} instead.`);if(We(s[1])){const m=s[1];if(m.type==="FeatureCollection")for(let _=0;_<m.features.length;++_){const E=m.features[_].geometry.type;if(E==="Polygon"||E==="MultiPolygon")return new Qa(m,m.features[_].geometry)}else if(m.type==="Feature"){const _=m.geometry.type;if(_==="Polygon"||_==="MultiPolygon")return new Qa(m,m.geometry)}else if(m.type==="Polygon"||m.type==="MultiPolygon")return new Qa(m,m)}return d.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(s){if(s.geometry()!=null&&s.canonicalID()!=null){if(s.geometryType()==="Point")return function(d,m){const _=[1/0,1/0,-1/0,-1/0],E=[1/0,1/0,-1/0,-1/0],M=d.canonicalID();if(m.type==="Polygon"){const D=Sn(m.coordinates,E,M),F=Zl(d.geometry(),_,E,M);if(!Pr(_,E))return!1;for(const U of F)if(!ei(U,D))return!1}if(m.type==="MultiPolygon"){const D=jn(m.coordinates,E,M),F=Zl(d.geometry(),_,E,M);if(!Pr(_,E))return!1;for(const U of F)if(!yn(U,D))return!1}return!0}(s,this.geometries);if(s.geometryType()==="LineString")return function(d,m){const _=[1/0,1/0,-1/0,-1/0],E=[1/0,1/0,-1/0,-1/0],M=d.canonicalID();if(m.type==="Polygon"){const D=Sn(m.coordinates,E,M),F=Td(d.geometry(),_,E,M);if(!Pr(_,E))return!1;for(const U of F)if(!Yr(U,D))return!1}if(m.type==="MultiPolygon"){const D=jn(m.coordinates,E,M),F=Td(d.geometry(),_,E,M);if(!Pr(_,E))return!1;for(const U of F)if(!wn(U,D))return!1}return!0}(s,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}function Fr(c){if(c instanceof Jr&&(c.name==="get"&&c.args.length===1||c.name==="feature-state"||c.name==="has"&&c.args.length===1||c.name==="properties"||c.name==="geometry-type"||c.name==="id"||/^filter-/.test(c.name))||c instanceof Qa)return!1;let s=!0;return c.eachChild(d=>{s&&!Fr(d)&&(s=!1)}),s}function Zr(c){if(c instanceof Jr&&c.name==="feature-state")return!1;let s=!0;return c.eachChild(d=>{s&&!Zr(d)&&(s=!1)}),s}function Nn(c,s){if(c instanceof Jr&&s.indexOf(c.name)>=0)return!1;let d=!0;return c.eachChild(m=>{d&&!Nn(m,s)&&(d=!1)}),d}class Di{constructor(s,d){this.type=d.type,this.name=s,this.boundExpression=d}static parse(s,d){if(s.length!==2||typeof s[1]!="string")return d.error("'var' expression requires exactly one string literal argument.");const m=s[1];return d.scope.has(m)?new Di(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(s){return this.boundExpression.evaluate(s)}eachChild(){}outputDefined(){return!1}}class Es{constructor(s,d=[],m,_=new xr,E=[]){this.registry=s,this.path=d,this.key=d.map(M=>`[${M}]`).join(""),this.scope=_,this.errors=E,this.expectedType=m}parse(s,d,m,_,E={}){return d?this.concat(d,m,_)._parse(s,E):this._parse(s,E)}_parse(s,d){function m(_,E,M){return M==="assert"?new Bt(E,[_]):M==="coerce"?new ir(E,[_]):_}if(s!==null&&typeof s!="string"&&typeof s!="boolean"&&typeof s!="number"||(s=["literal",s]),Array.isArray(s)){if(s.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const _=s[0];if(typeof _!="string")return this.error(`Expression name must be a string, but found ${typeof _} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const E=this.registry[_];if(E){let M=E.parse(s,this);if(!M)return null;if(this.expectedType){const D=this.expectedType,F=M.type;if(D.kind!=="string"&&D.kind!=="number"&&D.kind!=="boolean"&&D.kind!=="object"&&D.kind!=="array"||F.kind!=="value")if(D.kind!=="color"&&D.kind!=="formatted"&&D.kind!=="resolvedImage"||F.kind!=="value"&&F.kind!=="string")if(D.kind!=="padding"||F.kind!=="value"&&F.kind!=="number"&&F.kind!=="array"){if(this.checkSubtype(D,F))return null}else M=m(M,D,d.typeAnnotation||"coerce");else M=m(M,D,d.typeAnnotation||"coerce");else M=m(M,D,d.typeAnnotation||"assert")}if(!(M instanceof bt)&&M.type.kind!=="resolvedImage"&&Vo(M)){const D=new Br;try{M=new bt(M.type,M.evaluate(D))}catch(F){return this.error(F.message),null}}return M}return this.error(`Unknown expression "${_}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(s===void 0?"'undefined' value invalid. Use null instead.":typeof s=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof s} instead.`)}concat(s,d,m){const _=typeof s=="number"?this.path.concat(s):this.path,E=m?this.scope.concat(m):this.scope;return new Es(this.registry,_,d||null,E,this.errors)}error(s,...d){const m=`${this.key}${d.map(_=>`[${_}]`).join("")}`;this.errors.push(new rr(m,s))}checkSubtype(s,d){const m=$t(s,d);return m&&this.error(m),m}}function Vo(c){if(c instanceof Di)return Vo(c.boundExpression);if(c instanceof Jr&&c.name==="error"||c instanceof Vn||c instanceof Qa)return!1;const s=c instanceof ir||c instanceof Bt;let d=!0;return c.eachChild(m=>{d=s?d&&Vo(m):d&&m instanceof bt}),!!d&&Fr(c)&&Nn(c,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function rl(c,s){const d=c.length-1;let m,_,E=0,M=d,D=0;for(;E<=M;)if(D=Math.floor((E+M)/2),m=c[D],_=c[D+1],m<=s){if(D===d||s<_)return D;E=D+1}else{if(!(m>s))throw new Je("Input is not a number.");M=D-1}return 0}class Ja{constructor(s,d,m){this.type=s,this.input=d,this.labels=[],this.outputs=[];for(const[_,E]of m)this.labels.push(_),this.outputs.push(E)}static parse(s,d){if(s.length-1<4)return d.error(`Expected at least 4 arguments, but found only ${s.length-1}.`);if((s.length-1)%2!=0)return d.error("Expected an even number of arguments.");const m=d.parse(s[1],1,_t);if(!m)return null;const _=[];let E=null;d.expectedType&&d.expectedType.kind!=="value"&&(E=d.expectedType);for(let M=1;M<s.length;M+=2){const D=M===1?-1/0:s[M],F=s[M+1],U=M,X=M+1;if(typeof D!="number")return d.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',U);if(_.length&&_[_.length-1][0]>=D)return d.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',U);const re=d.parse(F,X,E);if(!re)return null;E=E||re.type,_.push([D,re])}return new Ja(E,m,_)}evaluate(s){const d=this.labels,m=this.outputs;if(d.length===1)return m[0].evaluate(s);const _=this.input.evaluate(s);if(_<=d[0])return m[0].evaluate(s);const E=d.length;return _>=d[E-1]?m[E-1].evaluate(s):m[rl(d,_)].evaluate(s)}eachChild(s){s(this.input);for(const d of this.outputs)s(d)}outputDefined(){return this.outputs.every(s=>s.outputDefined())}}function xn(c,s,d){return c*(1-d)+s*d}var es=Object.freeze({__proto__:null,number:xn,color:function(c,s,d){return new ae(xn(c.r,s.r,d),xn(c.g,s.g,d),xn(c.b,s.b,d),xn(c.a,s.a,d))},array:function(c,s,d){return c.map((m,_)=>xn(m,s[_],d))},padding:function(c,s,d){const m=c.values,_=s.values;return new Ce([xn(m[0],_[0],d),xn(m[1],_[1],d),xn(m[2],_[2],d),xn(m[3],_[3],d)])}});const qv=.95047,Gv=1.08883,Dh=4/29,Pd=6/29,Zv=3*Pd*Pd,a_=Math.PI/180,s_=180/Math.PI;function Lh(c){return c>.008856451679035631?Math.pow(c,1/3):c/Zv+Dh}function Fh(c){return c>Pd?c*c*c:Zv*(c-Dh)}function $h(c){return 255*(c<=.0031308?12.92*c:1.055*Math.pow(c,1/2.4)-.055)}function Bh(c){return(c/=255)<=.04045?c/12.92:Math.pow((c+.055)/1.055,2.4)}function sn(c){const s=Bh(c.r),d=Bh(c.g),m=Bh(c.b),_=Lh((.4124564*s+.3575761*d+.1804375*m)/qv),E=Lh((.2126729*s+.7151522*d+.072175*m)/1);return{l:116*E-16,a:500*(_-E),b:200*(E-Lh((.0193339*s+.119192*d+.9503041*m)/Gv)),alpha:c.a}}function Xv(c){let s=(c.l+16)/116,d=isNaN(c.a)?s:s+c.a/500,m=isNaN(c.b)?s:s-c.b/200;return s=1*Fh(s),d=qv*Fh(d),m=Gv*Fh(m),new ae($h(3.2404542*d-1.5371385*s-.4985314*m),$h(-.969266*d+1.8760108*s+.041556*m),$h(.0556434*d-.2040259*s+1.0572252*m),c.alpha)}function l_(c,s,d){const m=s-c;return c+d*(m>180||m<-180?m-360*Math.round(m/360):m)}const lc={forward:sn,reverse:Xv,interpolate:function(c,s,d){return{l:xn(c.l,s.l,d),a:xn(c.a,s.a,d),b:xn(c.b,s.b,d),alpha:xn(c.alpha,s.alpha,d)}}},uc={forward:function(c){const{l:s,a:d,b:m}=sn(c),_=Math.atan2(m,d)*s_;return{h:_<0?_+360:_,c:Math.sqrt(d*d+m*m),l:s,alpha:c.a}},reverse:function(c){const s=c.h*a_,d=c.c;return Xv({l:c.l,a:Math.cos(s)*d,b:Math.sin(s)*d,alpha:c.alpha})},interpolate:function(c,s,d){return{h:l_(c.h,s.h,d),c:xn(c.c,s.c,d),l:xn(c.l,s.l,d),alpha:xn(c.alpha,s.alpha,d)}}};var Yv=Object.freeze({__proto__:null,lab:lc,hcl:uc});class wo{constructor(s,d,m,_,E){this.type=s,this.operator=d,this.interpolation=m,this.input=_,this.labels=[],this.outputs=[];for(const[M,D]of E)this.labels.push(M),this.outputs.push(D)}static interpolationFactor(s,d,m,_){let E=0;if(s.name==="exponential")E=Vh(d,s.base,m,_);else if(s.name==="linear")E=Vh(d,1,m,_);else if(s.name==="cubic-bezier"){const M=s.controlPoints;E=new f(M[0],M[1],M[2],M[3]).solve(Vh(d,1,m,_))}return E}static parse(s,d){let[m,_,E,...M]=s;if(!Array.isArray(_)||_.length===0)return d.error("Expected an interpolation type expression.",1);if(_[0]==="linear")_={name:"linear"};else if(_[0]==="exponential"){const U=_[1];if(typeof U!="number")return d.error("Exponential interpolation requires a numeric base.",1,1);_={name:"exponential",base:U}}else{if(_[0]!=="cubic-bezier")return d.error(`Unknown interpolation type ${String(_[0])}`,1,0);{const U=_.slice(1);if(U.length!==4||U.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);_={name:"cubic-bezier",controlPoints:U}}}if(s.length-1<4)return d.error(`Expected at least 4 arguments, but found only ${s.length-1}.`);if((s.length-1)%2!=0)return d.error("Expected an even number of arguments.");if(E=d.parse(E,2,_t),!E)return null;const D=[];let F=null;m==="interpolate-hcl"||m==="interpolate-lab"?F=$r:d.expectedType&&d.expectedType.kind!=="value"&&(F=d.expectedType);for(let U=0;U<M.length;U+=2){const X=M[U],re=M[U+1],ue=U+3,he=U+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(D.length&&D[D.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(re,he,F);if(!pe)return null;F=F||pe.type,D.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 wo(F,m,_,E,D):d.error(`Type ${ht(F)} is not interpolatable.`)}evaluate(s){const d=this.labels,m=this.outputs;if(d.length===1)return m[0].evaluate(s);const _=this.input.evaluate(s);if(_<=d[0])return m[0].evaluate(s);const E=d.length;if(_>=d[E-1])return m[E-1].evaluate(s);const M=rl(d,_),D=wo.interpolationFactor(this.interpolation,_,d[M],d[M+1]),F=m[M].evaluate(s),U=m[M+1].evaluate(s);return this.operator==="interpolate"?es[this.type.kind.toLowerCase()](F,U,D):this.operator==="interpolate-hcl"?uc.reverse(uc.interpolate(uc.forward(F),uc.forward(U),D)):lc.reverse(lc.interpolate(lc.forward(F),lc.forward(U),D))}eachChild(s){s(this.input);for(const d of this.outputs)s(d)}outputDefined(){return this.outputs.every(s=>s.outputDefined())}}function Vh(c,s,d,m){const _=m-d,E=c-d;return _===0?0:s===1?E/_:(Math.pow(s,E)-1)/(Math.pow(s,_)-1)}class Md{constructor(s,d){this.type=s,this.args=d}static parse(s,d){if(s.length<2)return d.error("Expectected at least one argument.");let m=null;const _=d.expectedType;_&&_.kind!=="value"&&(m=_);const E=[];for(const D of s.slice(1)){const F=d.parse(D,1+E.length,m,void 0,{typeAnnotation:"omit"});if(!F)return null;m=m||F.type,E.push(F)}if(!m)throw new Error("No output type");const M=_&&E.some(D=>$t(_,D.type));return new Md(M?Lt:m,E)}evaluate(s){let d,m=null,_=0;for(const E of this.args)if(_++,m=E.evaluate(s),m&&m instanceof Ae&&!m.available&&(d||(d=m.name),m=null,_===this.args.length&&(m=d)),m!==null)break;return m}eachChild(s){this.args.forEach(s)}outputDefined(){return this.args.every(s=>s.outputDefined())}}class Id{constructor(s,d){this.type=d.type,this.bindings=[].concat(s),this.result=d}evaluate(s){return this.result.evaluate(s)}eachChild(s){for(const d of this.bindings)s(d[1]);s(this.result)}static parse(s,d){if(s.length<4)return d.error(`Expected at least 3 arguments, but found ${s.length-1} instead.`);const m=[];for(let E=1;E<s.length-1;E+=2){const M=s[E];if(typeof M!="string")return d.error(`Expected string, but found ${typeof M} instead.`,E);if(/[^a-zA-Z0-9_]/.test(M))return d.error("Variable names must contain only alphanumeric characters or '_'.",E);const D=d.parse(s[E+1],E+1);if(!D)return null;m.push([M,D])}const _=d.parse(s[s.length-1],s.length-1,d.expectedType,m);return _?new Id(m,_):null}outputDefined(){return this.result.outputDefined()}}class jh{constructor(s,d,m){this.type=s,this.index=d,this.input=m}static parse(s,d){if(s.length!==3)return d.error(`Expected 2 arguments, but found ${s.length-1} instead.`);const m=d.parse(s[1],1,_t),_=d.parse(s[2],2,ot(d.expectedType||Lt));return m&&_?new jh(_.type.itemType,m,_):null}evaluate(s){const d=this.index.evaluate(s),m=this.input.evaluate(s);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(s){s(this.index),s(this.input)}outputDefined(){return!1}}class Uh{constructor(s,d){this.type=or,this.needle=s,this.haystack=d}static parse(s,d){if(s.length!==3)return d.error(`Expected 2 arguments, but found ${s.length-1} instead.`);const m=d.parse(s[1],1,Lt),_=d.parse(s[2],2,Lt);return m&&_?ur(m.type,[or,qt,_t,Or,Lt])?new Uh(m,_):d.error(`Expected first argument to be of type boolean, string, number or null, but found ${ht(m.type)} instead`):null}evaluate(s){const d=this.needle.evaluate(s),m=this.haystack.evaluate(s);if(!m)return!1;if(!Ir(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(!Ir(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(s){s(this.needle),s(this.haystack)}outputDefined(){return!0}}class Rd{constructor(s,d,m){this.type=_t,this.needle=s,this.haystack=d,this.fromIndex=m}static parse(s,d){if(s.length<=2||s.length>=5)return d.error(`Expected 3 or 4 arguments, but found ${s.length-1} instead.`);const m=d.parse(s[1],1,Lt),_=d.parse(s[2],2,Lt);if(!m||!_)return null;if(!ur(m.type,[or,qt,_t,Or,Lt]))return d.error(`Expected first argument to be of type boolean, string, number or null, but found ${ht(m.type)} instead`);if(s.length===4){const E=d.parse(s[3],3,_t);return E?new Rd(m,_,E):null}return new Rd(m,_)}evaluate(s){const d=this.needle.evaluate(s),m=this.haystack.evaluate(s);if(!Ir(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(!Ir(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 _=this.fromIndex.evaluate(s);return m.indexOf(d,_)}return m.indexOf(d)}eachChild(s){s(this.needle),s(this.haystack),this.fromIndex&&s(this.fromIndex)}outputDefined(){return!1}}class Kh{constructor(s,d,m,_,E,M){this.inputType=s,this.type=d,this.input=m,this.cases=_,this.outputs=E,this.otherwise=M}static parse(s,d){if(s.length<5)return d.error(`Expected at least 4 arguments, but found only ${s.length-1}.`);if(s.length%2!=1)return d.error("Expected an even number of arguments.");let m,_;d.expectedType&&d.expectedType.kind!=="value"&&(_=d.expectedType);const E={},M=[];for(let U=2;U<s.length-1;U+=2){let X=s[U];const re=s[U+1];Array.isArray(X)||(X=[X]);const ue=d.concat(U);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(E[String(pe)]!==void 0)return ue.error("Branch labels must be unique.");E[String(pe)]=M.length}const he=d.parse(re,U,_);if(!he)return null;_=_||he.type,M.push(he)}const D=d.parse(s[1],1,Lt);if(!D)return null;const F=d.parse(s[s.length-1],s.length-1,_);return F?D.type.kind!=="value"&&d.concat(1).checkSubtype(m,D.type)?null:new Kh(m,_,D,E,M,F):null}evaluate(s){const d=this.input.evaluate(s);return(Be(d)===this.inputType&&this.outputs[this.cases[d]]||this.otherwise).evaluate(s)}eachChild(s){s(this.input),this.outputs.forEach(s),s(this.otherwise)}outputDefined(){return this.outputs.every(s=>s.outputDefined())&&this.otherwise.outputDefined()}}class Hh{constructor(s,d,m){this.type=s,this.branches=d,this.otherwise=m}static parse(s,d){if(s.length<4)return d.error(`Expected at least 3 arguments, but found only ${s.length-1}.`);if(s.length%2!=0)return d.error("Expected an odd number of arguments.");let m;d.expectedType&&d.expectedType.kind!=="value"&&(m=d.expectedType);const _=[];for(let M=1;M<s.length-1;M+=2){const D=d.parse(s[M],M,or);if(!D)return null;const F=d.parse(s[M+1],M+1,m);if(!F)return null;_.push([D,F]),m=m||F.type}const E=d.parse(s[s.length-1],s.length-1,m);if(!E)return null;if(!m)throw new Error("Can't infer output type");return new Hh(m,_,E)}evaluate(s){for(const[d,m]of this.branches)if(d.evaluate(s))return m.evaluate(s);return this.otherwise.evaluate(s)}eachChild(s){for(const[d,m]of this.branches)s(d),s(m);s(this.otherwise)}outputDefined(){return this.branches.every(([s,d])=>d.outputDefined())&&this.otherwise.outputDefined()}}class Od{constructor(s,d,m,_){this.type=s,this.input=d,this.beginIndex=m,this.endIndex=_}static parse(s,d){if(s.length<=2||s.length>=5)return d.error(`Expected 3 or 4 arguments, but found ${s.length-1} instead.`);const m=d.parse(s[1],1,Lt),_=d.parse(s[2],2,_t);if(!m||!_)return null;if(!ur(m.type,[ot(Lt),qt,Lt]))return d.error(`Expected first argument to be of type array or string, but found ${ht(m.type)} instead`);if(s.length===4){const E=d.parse(s[3],3,_t);return E?new Od(m.type,m,_,E):null}return new Od(m.type,m,_)}evaluate(s){const d=this.input.evaluate(s),m=this.beginIndex.evaluate(s);if(!Ir(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 _=this.endIndex.evaluate(s);return d.slice(m,_)}return d.slice(m)}eachChild(s){s(this.input),s(this.beginIndex),this.endIndex&&s(this.endIndex)}outputDefined(){return!1}}function Qv(c,s){return c==="=="||c==="!="?s.kind==="boolean"||s.kind==="string"||s.kind==="number"||s.kind==="null"||s.kind==="value":s.kind==="string"||s.kind==="number"||s.kind==="value"}function Jv(c,s,d,m){return m.compare(s,d)===0}function Xl(c,s,d){const m=c!=="=="&&c!=="!=";return class fL{constructor(E,M,D){this.type=or,this.lhs=E,this.rhs=M,this.collator=D,this.hasUntypedArgument=E.type.kind==="value"||M.type.kind==="value"}static parse(E,M){if(E.length!==3&&E.length!==4)return M.error("Expected two or three arguments.");const D=E[0];let F=M.parse(E[1],1,Lt);if(!F)return null;if(!Qv(D,F.type))return M.concat(1).error(`"${D}" comparisons are not supported for type '${ht(F.type)}'.`);let U=M.parse(E[2],2,Lt);if(!U)return null;if(!Qv(D,U.type))return M.concat(2).error(`"${D}" comparisons are not supported for type '${ht(U.type)}'.`);if(F.type.kind!==U.type.kind&&F.type.kind!=="value"&&U.type.kind!=="value")return M.error(`Cannot compare types '${ht(F.type)}' and '${ht(U.type)}'.`);m&&(F.type.kind==="value"&&U.type.kind!=="value"?F=new Bt(U.type,[F]):F.type.kind!=="value"&&U.type.kind==="value"&&(U=new Bt(F.type,[U])));let X=null;if(E.length===4){if(F.type.kind!=="string"&&U.type.kind!=="string"&&F.type.kind!=="value"&&U.type.kind!=="value")return M.error("Cannot use collator to compare non-string types.");if(X=M.parse(E[3],3,Tr),!X)return null}return new fL(F,U,X)}evaluate(E){const M=this.lhs.evaluate(E),D=this.rhs.evaluate(E);if(m&&this.hasUntypedArgument){const F=Be(M),U=Be(D);if(F.kind!==U.kind||F.kind!=="string"&&F.kind!=="number")throw new Je(`Expected arguments for "${c}" to be (string, string) or (number, number), but found (${F.kind}, ${U.kind}) instead.`)}if(this.collator&&!m&&this.hasUntypedArgument){const F=Be(M),U=Be(D);if(F.kind!=="string"||U.kind!=="string")return s(E,M,D)}return this.collator?d(E,M,D,this.collator.evaluate(E)):s(E,M,D)}eachChild(E){E(this.lhs),E(this.rhs),this.collator&&E(this.collator)}outputDefined(){return!0}}}const u_=Xl("==",function(c,s,d){return s===d},Jv),c_=Xl("!=",function(c,s,d){return s!==d},function(c,s,d,m){return!Jv(0,s,d,m)}),d_=Xl("<",function(c,s,d){return s<d},function(c,s,d,m){return m.compare(s,d)<0}),f_=Xl(">",function(c,s,d){return s>d},function(c,s,d,m){return m.compare(s,d)>0}),h_=Xl("<=",function(c,s,d){return s<=d},function(c,s,d,m){return m.compare(s,d)<=0}),p_=Xl(">=",function(c,s,d){return s>=d},function(c,s,d,m){return m.compare(s,d)>=0});class Wh{constructor(s,d,m,_,E){this.type=qt,this.number=s,this.locale=d,this.currency=m,this.minFractionDigits=_,this.maxFractionDigits=E}static parse(s,d){if(s.length!==3)return d.error("Expected two arguments.");const m=d.parse(s[1],1,_t);if(!m)return null;const _=s[2];if(typeof _!="object"||Array.isArray(_))return d.error("NumberFormat options argument must be an object.");let E=null;if(_.locale&&(E=d.parse(_.locale,1,qt),!E))return null;let M=null;if(_.currency&&(M=d.parse(_.currency,1,qt),!M))return null;let D=null;if(_["min-fraction-digits"]&&(D=d.parse(_["min-fraction-digits"],1,_t),!D))return null;let F=null;return _["max-fraction-digits"]&&(F=d.parse(_["max-fraction-digits"],1,_t),!F)?null:new Wh(m,E,M,D,F)}evaluate(s){return new Intl.NumberFormat(this.locale?this.locale.evaluate(s):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(s):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(s):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(s):void 0}).format(this.number.evaluate(s))}eachChild(s){s(this.number),this.locale&&s(this.locale),this.currency&&s(this.currency),this.minFractionDigits&&s(this.minFractionDigits),this.maxFractionDigits&&s(this.maxFractionDigits)}outputDefined(){return!1}}class Ad{constructor(s){this.type=Cr,this.sections=s}static parse(s,d){if(s.length<2)return d.error("Expected at least one argument.");const m=s[1];if(!Array.isArray(m)&&typeof m=="object")return d.error("First argument must be an image or text section.");const _=[];let E=!1;for(let M=1;M<=s.length-1;++M){const D=s[M];if(E&&typeof D=="object"&&!Array.isArray(D)){E=!1;let F=null;if(D["font-scale"]&&(F=d.parse(D["font-scale"],1,_t),!F))return null;let U=null;if(D["text-font"]&&(U=d.parse(D["text-font"],1,ot(qt)),!U))return null;let X=null;if(D["text-color"]&&(X=d.parse(D["text-color"],1,$r),!X))return null;const re=_[_.length-1];re.scale=F,re.font=U,re.textColor=X}else{const F=d.parse(s[M],1,Lt);if(!F)return null;const U=F.type.kind;if(U!=="string"&&U!=="value"&&U!=="null"&&U!=="resolvedImage")return d.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");E=!0,_.push({content:F,scale:null,font:null,textColor:null})}}return new Ad(_)}evaluate(s){return new be(this.sections.map(d=>{const m=d.content.evaluate(s);return Be(m)===Nt?new Ee("",m,null,null,null):new Ee(At(m),null,d.scale?d.scale.evaluate(s):null,d.font?d.font.evaluate(s).join(","):null,d.textColor?d.textColor.evaluate(s):null)}))}eachChild(s){for(const d of this.sections)s(d.content),d.scale&&s(d.scale),d.font&&s(d.font),d.textColor&&s(d.textColor)}outputDefined(){return!1}}class qh{constructor(s){this.type=Nt,this.input=s}static parse(s,d){if(s.length!==2)return d.error("Expected two arguments.");const m=d.parse(s[1],1,qt);return m?new qh(m):d.error("No image name provided.")}evaluate(s){const d=this.input.evaluate(s),m=Ae.fromString(d);return m&&s.availableImages&&(m.available=s.availableImages.indexOf(d)>-1),m}eachChild(s){s(this.input)}outputDefined(){return!1}}class Gh{constructor(s){this.type=_t,this.input=s}static parse(s,d){if(s.length!==2)return d.error(`Expected 1 argument, but found ${s.length-1} instead.`);const m=d.parse(s[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 Gh(m):null}evaluate(s){const d=this.input.evaluate(s);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(s){s(this.input)}outputDefined(){return!1}}const Yl={"==":u_,"!=":c_,">":f_,"<":d_,">=":p_,"<=":h_,array:Bt,at:jh,boolean:Bt,case:Hh,coalesce:Md,collator:Vn,format:Ad,image:qh,in:Uh,"index-of":Rd,interpolate:wo,"interpolate-hcl":wo,"interpolate-lab":wo,length:Gh,let:Id,literal:bt,match:Kh,number:Bt,"number-format":Wh,object:Bt,slice:Od,step:Ja,string:Bt,"to-boolean":ir,"to-color":ir,"to-number":ir,"to-string":ir,var:Di,within:Qa};function eg(c,[s,d,m,_]){s=s.evaluate(c),d=d.evaluate(c),m=m.evaluate(c);const E=_?_.evaluate(c):1,M=He(s,d,m,E);if(M)throw new Je(M);return new ae(s/255*E,d/255*E,m/255*E,E)}function tg(c,s){return c in s}function Nd(c,s){const d=s[c];return d===void 0?null:d}function nl(c){return{type:c}}function rg(c){return{result:"success",value:c}}function Ql(c){return{result:"error",value:c}}function Mn(c){return c["property-type"]==="data-driven"||c["property-type"]==="cross-faded-data-driven"}function ng(c){return!!c.expression&&c.expression.parameters.indexOf("zoom")>-1}function Xr(c){return!!c.expression&&c.expression.interpolated}function ln(c){return c instanceof Number?"number":c instanceof String?"string":c instanceof Boolean?"boolean":Array.isArray(c)?"array":c===null?"null":typeof c}function En(c){return typeof c=="object"&&c!==null&&!Array.isArray(c)}function zn(c){return c}function cc(c,s){const d=s.type==="color",m=c.stops&&typeof c.stops[0][0]=="object",_=m||!(m||c.property!==void 0),E=c.type||(Xr(s)?"exponential":"interval");if(d||s.type==="padding"){const U=d?ae.parse:Ce.parse;(c=cr({},c)).stops&&(c.stops=c.stops.map(X=>[X[0],U(X[1])])),c.default=U(c.default?c.default:s.default)}if(c.colorSpace&&c.colorSpace!=="rgb"&&!Yv[c.colorSpace])throw new Error(`Unknown color space: ${c.colorSpace}`);let M,D,F;if(E==="exponential")M=ig;else if(E==="interval")M=v_;else if(E==="categorical"){M=m_,D=Object.create(null);for(const U of c.stops)D[U[0]]=U[1];F=typeof c.stops[0][0]}else{if(E!=="identity")throw new Error(`Unknown function type "${E}"`);M=g_}if(m){const U={},X=[];for(let he=0;he<c.stops.length;he++){const pe=c.stops[he],Oe=pe[0].zoom;U[Oe]===void 0&&(U[Oe]={zoom:Oe,type:c.type,property:c.property,default:c.default,stops:[]},X.push(Oe)),U[Oe].stops.push([pe[0].value,pe[1]])}const re=[];for(const he of X)re.push([U[he].zoom,cc(U[he],s)]);const ue={name:"linear"};return{kind:"composite",interpolationType:ue,interpolationFactor:wo.interpolationFactor.bind(void 0,ue),zoomStops:re.map(he=>he[0]),evaluate:({zoom:he},pe)=>ig({stops:re,base:c.base},s,he).evaluate(he,pe)}}if(_){const U=E==="exponential"?{name:"exponential",base:c.base!==void 0?c.base:1}:null;return{kind:"camera",interpolationType:U,interpolationFactor:wo.interpolationFactor.bind(void 0,U),zoomStops:c.stops.map(X=>X[0]),evaluate:({zoom:X})=>M(c,s,X,D,F)}}return{kind:"source",evaluate(U,X){const re=X&&X.properties?X.properties[c.property]:void 0;return re===void 0?Jl(c.default,s.default):M(c,s,re,D,F)}}}function Jl(c,s,d){return c!==void 0?c:s!==void 0?s:d!==void 0?d:void 0}function m_(c,s,d,m,_){return Jl(typeof d===_?m[d]:void 0,c.default,s.default)}function v_(c,s,d){if(ln(d)!=="number")return Jl(c.default,s.default);const m=c.stops.length;if(m===1||d<=c.stops[0][0])return c.stops[0][1];if(d>=c.stops[m-1][0])return c.stops[m-1][1];const _=rl(c.stops.map(E=>E[0]),d);return c.stops[_][1]}function ig(c,s,d){const m=c.base!==void 0?c.base:1;if(ln(d)!=="number")return Jl(c.default,s.default);const _=c.stops.length;if(_===1||d<=c.stops[0][0])return c.stops[0][1];if(d>=c.stops[_-1][0])return c.stops[_-1][1];const E=rl(c.stops.map(X=>X[0]),d),M=function(X,re,ue,he){const pe=he-ue,Oe=X-ue;return pe===0?0:re===1?Oe/pe:(Math.pow(re,Oe)-1)/(Math.pow(re,pe)-1)}(d,m,c.stops[E][0],c.stops[E+1][0]),D=c.stops[E][1],F=c.stops[E+1][1];let U=es[s.type]||zn;if(c.colorSpace&&c.colorSpace!=="rgb"){const X=Yv[c.colorSpace];U=(re,ue)=>X.reverse(X.interpolate(X.forward(re),X.forward(ue),M))}return typeof D.evaluate=="function"?{evaluate(...X){const re=D.evaluate.apply(void 0,X),ue=F.evaluate.apply(void 0,X);if(re!==void 0&&ue!==void 0)return U(re,ue,M)}}:U(D,F,M)}function g_(c,s,d){switch(s.type){case"color":d=ae.parse(d);break;case"formatted":d=be.fromString(d.toString());break;case"resolvedImage":d=Ae.fromString(d.toString());break;case"padding":d=Ce.parse(d);break;default:ln(d)===s.type||s.type==="enum"&&s.values[d]||(d=void 0)}return Jl(d,c.default,s.default)}Jr.register(Yl,{error:[{kind:"error"},[qt],(c,[s])=>{throw new Je(s.evaluate(c))}],typeof:[qt,[Lt],(c,[s])=>ht(Be(s.evaluate(c)))],"to-rgba":[ot(_t,4),[$r],(c,[s])=>s.evaluate(c).toArray()],rgb:[$r,[_t,_t,_t],eg],rgba:[$r,[_t,_t,_t,_t],eg],has:{type:or,overloads:[[[qt],(c,[s])=>tg(s.evaluate(c),c.properties())],[[qt,kr],(c,[s,d])=>tg(s.evaluate(c),d.evaluate(c))]]},get:{type:Lt,overloads:[[[qt],(c,[s])=>Nd(s.evaluate(c),c.properties())],[[qt,kr],(c,[s,d])=>Nd(s.evaluate(c),d.evaluate(c))]]},"feature-state":[Lt,[qt],(c,[s])=>Nd(s.evaluate(c),c.featureState||{})],properties:[kr,[],c=>c.properties()],"geometry-type":[qt,[],c=>c.geometryType()],id:[Lt,[],c=>c.id()],zoom:[_t,[],c=>c.globals.zoom],"heatmap-density":[_t,[],c=>c.globals.heatmapDensity||0],"line-progress":[_t,[],c=>c.globals.lineProgress||0],accumulated:[Lt,[],c=>c.globals.accumulated===void 0?null:c.globals.accumulated],"+":[_t,nl(_t),(c,s)=>{let d=0;for(const m of s)d+=m.evaluate(c);return d}],"*":[_t,nl(_t),(c,s)=>{let d=1;for(const m of s)d*=m.evaluate(c);return d}],"-":{type:_t,overloads:[[[_t,_t],(c,[s,d])=>s.evaluate(c)-d.evaluate(c)],[[_t],(c,[s])=>-s.evaluate(c)]]},"/":[_t,[_t,_t],(c,[s,d])=>s.evaluate(c)/d.evaluate(c)],"%":[_t,[_t,_t],(c,[s,d])=>s.evaluate(c)%d.evaluate(c)],ln2:[_t,[],()=>Math.LN2],pi:[_t,[],()=>Math.PI],e:[_t,[],()=>Math.E],"^":[_t,[_t,_t],(c,[s,d])=>Math.pow(s.evaluate(c),d.evaluate(c))],sqrt:[_t,[_t],(c,[s])=>Math.sqrt(s.evaluate(c))],log10:[_t,[_t],(c,[s])=>Math.log(s.evaluate(c))/Math.LN10],ln:[_t,[_t],(c,[s])=>Math.log(s.evaluate(c))],log2:[_t,[_t],(c,[s])=>Math.log(s.evaluate(c))/Math.LN2],sin:[_t,[_t],(c,[s])=>Math.sin(s.evaluate(c))],cos:[_t,[_t],(c,[s])=>Math.cos(s.evaluate(c))],tan:[_t,[_t],(c,[s])=>Math.tan(s.evaluate(c))],asin:[_t,[_t],(c,[s])=>Math.asin(s.evaluate(c))],acos:[_t,[_t],(c,[s])=>Math.acos(s.evaluate(c))],atan:[_t,[_t],(c,[s])=>Math.atan(s.evaluate(c))],min:[_t,nl(_t),(c,s)=>Math.min(...s.map(d=>d.evaluate(c)))],max:[_t,nl(_t),(c,s)=>Math.max(...s.map(d=>d.evaluate(c)))],abs:[_t,[_t],(c,[s])=>Math.abs(s.evaluate(c))],round:[_t,[_t],(c,[s])=>{const d=s.evaluate(c);return d<0?-Math.round(-d):Math.round(d)}],floor:[_t,[_t],(c,[s])=>Math.floor(s.evaluate(c))],ceil:[_t,[_t],(c,[s])=>Math.ceil(s.evaluate(c))],"filter-==":[or,[qt,Lt],(c,[s,d])=>c.properties()[s.value]===d.value],"filter-id-==":[or,[Lt],(c,[s])=>c.id()===s.value],"filter-type-==":[or,[qt],(c,[s])=>c.geometryType()===s.value],"filter-<":[or,[qt,Lt],(c,[s,d])=>{const m=c.properties()[s.value],_=d.value;return typeof m==typeof _&&m<_}],"filter-id-<":[or,[Lt],(c,[s])=>{const d=c.id(),m=s.value;return typeof d==typeof m&&d<m}],"filter->":[or,[qt,Lt],(c,[s,d])=>{const m=c.properties()[s.value],_=d.value;return typeof m==typeof _&&m>_}],"filter-id->":[or,[Lt],(c,[s])=>{const d=c.id(),m=s.value;return typeof d==typeof m&&d>m}],"filter-<=":[or,[qt,Lt],(c,[s,d])=>{const m=c.properties()[s.value],_=d.value;return typeof m==typeof _&&m<=_}],"filter-id-<=":[or,[Lt],(c,[s])=>{const d=c.id(),m=s.value;return typeof d==typeof m&&d<=m}],"filter->=":[or,[qt,Lt],(c,[s,d])=>{const m=c.properties()[s.value],_=d.value;return typeof m==typeof _&&m>=_}],"filter-id->=":[or,[Lt],(c,[s])=>{const d=c.id(),m=s.value;return typeof d==typeof m&&d>=m}],"filter-has":[or,[Lt],(c,[s])=>s.value in c.properties()],"filter-has-id":[or,[],c=>c.id()!==null&&c.id()!==void 0],"filter-type-in":[or,[ot(qt)],(c,[s])=>s.value.indexOf(c.geometryType())>=0],"filter-id-in":[or,[ot(Lt)],(c,[s])=>s.value.indexOf(c.id())>=0],"filter-in-small":[or,[qt,ot(Lt)],(c,[s,d])=>d.value.indexOf(c.properties()[s.value])>=0],"filter-in-large":[or,[qt,ot(Lt)],(c,[s,d])=>function(m,_,E,M){for(;E<=M;){const D=E+M>>1;if(_[D]===m)return!0;_[D]>m?M=D-1:E=D+1}return!1}(c.properties()[s.value],d.value,0,d.value.length-1)],all:{type:or,overloads:[[[or,or],(c,[s,d])=>s.evaluate(c)&&d.evaluate(c)],[nl(or),(c,s)=>{for(const d of s)if(!d.evaluate(c))return!1;return!0}]]},any:{type:or,overloads:[[[or,or],(c,[s,d])=>s.evaluate(c)||d.evaluate(c)],[nl(or),(c,s)=>{for(const d of s)if(d.evaluate(c))return!0;return!1}]]},"!":[or,[or],(c,[s])=>!s.evaluate(c)],"is-supported-script":[or,[qt],(c,[s])=>{const d=c.globals&&c.globals.isSupportedScript;return!d||d(s.evaluate(c))}],upcase:[qt,[qt],(c,[s])=>s.evaluate(c).toUpperCase()],downcase:[qt,[qt],(c,[s])=>s.evaluate(c).toLowerCase()],concat:[qt,nl(Lt),(c,s)=>s.map(d=>At(d.evaluate(c))).join("")],"resolved-locale":[qt,[Tr],(c,[s])=>s.evaluate(c).resolvedLocale()]});class zd{constructor(s,d){this.expression=s,this._warningHistory={},this._evaluator=new Br,this._defaultValue=d?function(m){return m.type==="color"&&En(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(s,d,m,_,E,M){return this._evaluator.globals=s,this._evaluator.feature=d,this._evaluator.featureState=m,this._evaluator.canonical=_,this._evaluator.availableImages=E||null,this._evaluator.formattedSection=M,this.expression.evaluate(this._evaluator)}evaluate(s,d,m,_,E,M){this._evaluator.globals=s,this._evaluator.feature=d||null,this._evaluator.featureState=m||null,this._evaluator.canonical=_,this._evaluator.availableImages=E||null,this._evaluator.formattedSection=M||null;try{const D=this.expression.evaluate(this._evaluator);if(D==null||typeof D=="number"&&D!=D)return this._defaultValue;if(this._enumValues&&!(D 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(D)} instead.`);return D}catch(D){return this._warningHistory[D.message]||(this._warningHistory[D.message]=!0,typeof console<"u"&&console.warn(D.message)),this._defaultValue}}}function dc(c){return Array.isArray(c)&&c.length>0&&typeof c[0]=="string"&&c[0]in Yl}function fc(c,s){const d=new Es(Yl,[],s?function(_){const E={color:$r,string:qt,number:_t,enum:qt,boolean:or,formatted:Cr,padding:fr,resolvedImage:Nt};return _.type==="array"?ot(E[_.value]||Lt,_.length):E[_.type]}(s):void 0),m=d.parse(c,void 0,void 0,void 0,s&&s.type==="string"?{typeAnnotation:"coerce"}:void 0);return m?rg(new zd(m,s)):Ql(d.errors)}class hc{constructor(s,d){this.kind=s,this._styleExpression=d,this.isStateDependent=s!=="constant"&&!Zr(d.expression)}evaluateWithoutErrorHandling(s,d,m,_,E,M){return this._styleExpression.evaluateWithoutErrorHandling(s,d,m,_,E,M)}evaluate(s,d,m,_,E,M){return this._styleExpression.evaluate(s,d,m,_,E,M)}}class Zh{constructor(s,d,m,_){this.kind=s,this.zoomStops=m,this._styleExpression=d,this.isStateDependent=s!=="camera"&&!Zr(d.expression),this.interpolationType=_}evaluateWithoutErrorHandling(s,d,m,_,E,M){return this._styleExpression.evaluateWithoutErrorHandling(s,d,m,_,E,M)}evaluate(s,d,m,_,E,M){return this._styleExpression.evaluate(s,d,m,_,E,M)}interpolationFactor(s,d,m){return this.interpolationType?wo.interpolationFactor(this.interpolationType,s,d,m):0}}function og(c,s){const d=fc(c,s);if(d.result==="error")return d;const m=d.value.expression,_=Fr(m);if(!_&&!Mn(s))return Ql([new rr("","data expressions not supported")]);const E=Nn(m,["zoom"]);if(!E&&!ng(s))return Ql([new rr("","zoom expressions not supported")]);const M=Ld(m);return M||E?M instanceof rr?Ql([M]):M instanceof wo&&!Xr(s)?Ql([new rr("",'"interpolate" expressions cannot be used with this property')]):rg(M?new Zh(_?"camera":"composite",d.value,M.labels,M instanceof wo?M.interpolation:void 0):new hc(_?"constant":"source",d.value)):Ql([new rr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Dd{constructor(s,d){this._parameters=s,this._specification=d,cr(this,cc(this._parameters,this._specification))}static deserialize(s){return new Dd(s._parameters,s._specification)}static serialize(s){return{_parameters:s._parameters,_specification:s._specification}}}function Ld(c){let s=null;if(c instanceof Id)s=Ld(c.result);else if(c instanceof Md){for(const d of c.args)if(s=Ld(d),s)break}else(c instanceof Ja||c instanceof wo)&&c.input instanceof Jr&&c.input.name==="zoom"&&(s=c);return s instanceof rr||c.eachChild(d=>{const m=Ld(d);m instanceof rr?s=m:!s&&m?s=new rr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):s&&m&&s!==m&&(s=new rr("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),s}function ra(c){const s=c.key,d=c.value,m=c.valueSpec||{},_=c.objectElementValidators||{},E=c.style,M=c.styleSpec;let D=[];const F=ln(d);if(F!=="object")return[new qe(s,d,`object expected, ${F} found`)];for(const U in d){const X=U.split(".")[0],re=m[X]||m["*"];let ue;if(_[X])ue=_[X];else if(m[X])ue=So;else if(_["*"])ue=_["*"];else{if(!m["*"]){D.push(new qe(s,d[U],`unknown property "${U}"`));continue}ue=So}D=D.concat(ue({key:(s&&`${s}.`)+U,value:d[U],valueSpec:re,style:E,styleSpec:M,object:d,objectKey:U},d))}for(const U in m)_[U]||m[U].required&&m[U].default===void 0&&d[U]===void 0&&D.push(new qe(s,d,`missing required property "${U}"`));return D}function ag(c){const s=c.value,d=c.valueSpec,m=c.style,_=c.styleSpec,E=c.key,M=c.arrayElementValidator||So;if(ln(s)!=="array")return[new qe(E,s,`array expected, ${ln(s)} found`)];if(d.length&&s.length!==d.length)return[new qe(E,s,`array length ${d.length} expected, length ${s.length} found`)];if(d["min-length"]&&s.length<d["min-length"])return[new qe(E,s,`array length at least ${d["min-length"]} expected, length ${s.length} found`)];let D={type:d.value,values:d.values};_.$version<7&&(D.function=d.function),ln(d.value)==="object"&&(D=d.value);let F=[];for(let U=0;U<s.length;U++)F=F.concat(M({array:s,arrayIndex:U,value:s[U],valueSpec:D,style:m,styleSpec:_,key:`${E}[${U}]`}));return F}function Xh(c){const s=c.key,d=c.value,m=c.valueSpec;let _=ln(d);return _==="number"&&d!=d&&(_="NaN"),_!=="number"?[new qe(s,d,`number expected, ${_} found`)]:"minimum"in m&&d<m.minimum?[new qe(s,d,`${d} is less than the minimum value ${m.minimum}`)]:"maximum"in m&&d>m.maximum?[new qe(s,d,`${d} is greater than the maximum value ${m.maximum}`)]:[]}function sg(c){const s=c.valueSpec,d=Vt(c.value.type);let m,_,E,M={};const D=d!=="categorical"&&c.value.property===void 0,F=!D,U=ln(c.value.stops)==="array"&&ln(c.value.stops[0])==="array"&&ln(c.value.stops[0][0])==="object",X=ra({key:c.key,value:c.value,valueSpec:c.styleSpec.function,style:c.style,styleSpec:c.styleSpec,objectElementValidators:{stops:function(he){if(d==="identity")return[new qe(he.key,he.value,'identity function may not have a "stops" property')];let pe=[];const Oe=he.value;return pe=pe.concat(ag({key:he.key,value:Oe,valueSpec:he.valueSpec,style:he.style,styleSpec:he.styleSpec,arrayElementValidator:re})),ln(Oe)==="array"&&Oe.length===0&&pe.push(new qe(he.key,Oe,"array must have at least one stop")),pe},default:function(he){return So({key:he.key,value:he.value,valueSpec:s,style:he.style,styleSpec:he.styleSpec})}}});return d==="identity"&&D&&X.push(new qe(c.key,c.value,'missing required property "property"')),d==="identity"||c.value.stops||X.push(new qe(c.key,c.value,'missing required property "stops"')),d==="exponential"&&c.valueSpec.expression&&!Xr(c.valueSpec)&&X.push(new qe(c.key,c.value,"exponential functions not supported")),c.styleSpec.$version>=8&&(F&&!Mn(c.valueSpec)?X.push(new qe(c.key,c.value,"property functions not supported")):D&&!ng(c.valueSpec)&&X.push(new qe(c.key,c.value,"zoom functions not supported"))),d!=="categorical"&&!U||c.value.property!==void 0||X.push(new qe(c.key,c.value,'"property" property is required')),X;function re(he){let pe=[];const Oe=he.value,Me=he.key;if(ln(Oe)!=="array")return[new qe(Me,Oe,`array expected, ${ln(Oe)} found`)];if(Oe.length!==2)return[new qe(Me,Oe,`array length 2 expected, length ${Oe.length} found`)];if(U){if(ln(Oe[0])!=="object")return[new qe(Me,Oe,`object expected, ${ln(Oe[0])} found`)];if(Oe[0].zoom===void 0)return[new qe(Me,Oe,"object stop key must have zoom")];if(Oe[0].value===void 0)return[new qe(Me,Oe,"object stop key must have value")];if(E&&E>Vt(Oe[0].zoom))return[new qe(Me,Oe[0].zoom,"stop zoom values must appear in ascending order")];Vt(Oe[0].zoom)!==E&&(E=Vt(Oe[0].zoom),_=void 0,M={}),pe=pe.concat(ra({key:`${Me}[0]`,value:Oe[0],valueSpec:{zoom:{}},style:he.style,styleSpec:he.styleSpec,objectElementValidators:{zoom:Xh,value:ue}}))}else pe=pe.concat(ue({key:`${Me}[0]`,value:Oe[0],valueSpec:{},style:he.style,styleSpec:he.styleSpec},Oe));return dc(Ut(Oe[1]))?pe.concat([new qe(`${Me}[1]`,Oe[1],"expressions are not allowed in function stops.")]):pe.concat(So({key:`${Me}[1]`,value:Oe[1],valueSpec:s,style:he.style,styleSpec:he.styleSpec}))}function ue(he,pe){const Oe=ln(he.value),Me=Vt(he.value),Ze=he.value!==null?he.value:pe;if(m){if(Oe!==m)return[new qe(he.key,Ze,`${Oe} stop domain type must match previous stop domain type ${m}`)]}else m=Oe;if(Oe!=="number"&&Oe!=="string"&&Oe!=="boolean")return[new qe(he.key,Ze,"stop domain value must be a number, string, or boolean")];if(Oe!=="number"&&d!=="categorical"){let st=`number expected, ${Oe} found`;return Mn(s)&&d===void 0&&(st+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new qe(he.key,Ze,st)]}return d!=="categorical"||Oe!=="number"||isFinite(Me)&&Math.floor(Me)===Me?d!=="categorical"&&Oe==="number"&&_!==void 0&&Me<_?[new qe(he.key,Ze,"stop domain values must appear in ascending order")]:(_=Me,d==="categorical"&&Me in M?[new qe(he.key,Ze,"stop domain values must be unique")]:(M[Me]=!0,[])):[new qe(he.key,Ze,`integer expected, found ${Me}`)]}}function il(c){const s=(c.expressionContext==="property"?og:fc)(Ut(c.value),c.valueSpec);if(s.result==="error")return s.value.map(m=>new qe(`${c.key}${m.key}`,c.value,m.message));const d=s.value.expression||s.value._styleExpression.expression;if(c.expressionContext==="property"&&c.propertyKey==="text-font"&&!d.outputDefined())return[new qe(c.key,c.value,`Invalid data expression for "${c.propertyKey}". Output values must be contained as literals within the expression.`)];if(c.expressionContext==="property"&&c.propertyType==="layout"&&!Zr(d))return[new qe(c.key,c.value,'"feature-state" data expressions are not supported with layout properties.')];if(c.expressionContext==="filter"&&!Zr(d))return[new qe(c.key,c.value,'"feature-state" data expressions are not supported with filters.')];if(c.expressionContext&&c.expressionContext.indexOf("cluster")===0){if(!Nn(d,["zoom","feature-state"]))return[new qe(c.key,c.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(c.expressionContext==="cluster-initial"&&!Fr(d))return[new qe(c.key,c.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function pc(c){const s=c.key,d=c.value,m=c.valueSpec,_=[];return Array.isArray(m.values)?m.values.indexOf(Vt(d))===-1&&_.push(new qe(s,d,`expected one of [${m.values.join(", ")}], ${JSON.stringify(d)} found`)):Object.keys(m.values).indexOf(Vt(d))===-1&&_.push(new qe(s,d,`expected one of [${Object.keys(m.values).join(", ")}], ${JSON.stringify(d)} found`)),_}function eu(c){if(c===!0||c===!1)return!0;if(!Array.isArray(c)||c.length===0)return!1;switch(c[0]){case"has":return c.length>=2&&c[1]!=="$id"&&c[1]!=="$type";case"in":return c.length>=3&&(typeof c[1]!="string"||Array.isArray(c[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return c.length!==3||Array.isArray(c[1])||Array.isArray(c[2]);case"any":case"all":for(const s of c.slice(1))if(!eu(s)&&typeof s!="boolean")return!1;return!0;default:return!0}}const y_={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Fd(c){if(c==null)return{filter:()=>!0,needGeometry:!1};eu(c)||(c=mc(c));const s=fc(c,y_);if(s.result==="error")throw new Error(s.value.map(d=>`${d.key}: ${d.message}`).join(", "));return{filter:(d,m,_)=>s.value.evaluate(d,m,{},_),needGeometry:ug(c)}}function lg(c,s){return c<s?-1:c>s?1:0}function ug(c){if(!Array.isArray(c))return!1;if(c[0]==="within")return!0;for(let s=1;s<c.length;s++)if(ug(c[s]))return!0;return!1}function mc(c){if(!c)return!0;const s=c[0];return c.length<=1?s!=="any":s==="=="?Yh(c[1],c[2],"=="):s==="!="?tu(Yh(c[1],c[2],"==")):s==="<"||s===">"||s==="<="||s===">="?Yh(c[1],c[2],s):s==="any"?(d=c.slice(1),["any"].concat(d.map(mc))):s==="all"?["all"].concat(c.slice(1).map(mc)):s==="none"?["all"].concat(c.slice(1).map(mc).map(tu)):s==="in"?$d(c[1],c.slice(2)):s==="!in"?tu($d(c[1],c.slice(2))):s==="has"?vc(c[1]):s==="!has"?tu(vc(c[1])):s!=="within"||c;var d}function Yh(c,s,d){switch(c){case"$type":return[`filter-type-${d}`,s];case"$id":return[`filter-id-${d}`,s];default:return[`filter-${d}`,c,s]}}function $d(c,s){if(s.length===0)return!1;switch(c){case"$type":return["filter-type-in",["literal",s]];case"$id":return["filter-id-in",["literal",s]];default:return s.length>200&&!s.some(d=>typeof d!=typeof s[0])?["filter-in-large",c,["literal",s.sort(lg)]]:["filter-in-small",c,["literal",s]]}}function vc(c){switch(c){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",c]}}function tu(c){return["!",c]}function gc(c){return eu(Ut(c.value))?il(cr({},c,{expressionContext:"filter",valueSpec:{value:"boolean"}})):cg(c)}function cg(c){const s=c.value,d=c.key;if(ln(s)!=="array")return[new qe(d,s,`array expected, ${ln(s)} found`)];const m=c.styleSpec;let _,E=[];if(s.length<1)return[new qe(d,s,"filter array must have at least 1 element")];switch(E=E.concat(pc({key:`${d}[0]`,value:s[0],valueSpec:m.filter_operator,style:c.style,styleSpec:c.styleSpec})),Vt(s[0])){case"<":case"<=":case">":case">=":s.length>=2&&Vt(s[1])==="$type"&&E.push(new qe(d,s,`"$type" cannot be use with operator "${s[0]}"`));case"==":case"!=":s.length!==3&&E.push(new qe(d,s,`filter array for operator "${s[0]}" must have 3 elements`));case"in":case"!in":s.length>=2&&(_=ln(s[1]),_!=="string"&&E.push(new qe(`${d}[1]`,s[1],`string expected, ${_} found`)));for(let M=2;M<s.length;M++)_=ln(s[M]),Vt(s[1])==="$type"?E=E.concat(pc({key:`${d}[${M}]`,value:s[M],valueSpec:m.geometry_type,style:c.style,styleSpec:c.styleSpec})):_!=="string"&&_!=="number"&&_!=="boolean"&&E.push(new qe(`${d}[${M}]`,s[M],`string, number, or boolean expected, ${_} found`));break;case"any":case"all":case"none":for(let M=1;M<s.length;M++)E=E.concat(cg({key:`${d}[${M}]`,value:s[M],style:c.style,styleSpec:c.styleSpec}));break;case"has":case"!has":_=ln(s[1]),s.length!==2?E.push(new qe(d,s,`filter array for "${s[0]}" operator must have 2 elements`)):_!=="string"&&E.push(new qe(`${d}[1]`,s[1],`string expected, ${_} found`));break;case"within":_=ln(s[1]),s.length!==2?E.push(new qe(d,s,`filter array for "${s[0]}" operator must have 2 elements`)):_!=="object"&&E.push(new qe(`${d}[1]`,s[1],`object expected, ${_} found`))}return E}function yc(c,s){const d=c.key,m=c.style,_=c.styleSpec,E=c.value,M=c.objectKey,D=_[`${s}_${c.layerType}`];if(!D)return[];const F=M.match(/^(.*)-transition$/);if(s==="paint"&&F&&D[F[1]]&&D[F[1]].transition)return So({key:d,value:E,valueSpec:_.transition,style:m,styleSpec:_});const U=c.valueSpec||D[M];if(!U)return[new qe(d,E,`unknown property "${M}"`)];let X;if(ln(E)==="string"&&Mn(U)&&!U.tokens&&(X=/^{([^}]+)}$/.exec(E)))return[new qe(d,E,`"${M}" does not support interpolation syntax
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(X[1])} }\`.`)];const re=[];return c.layerType==="symbol"&&(M==="text-field"&&m&&!m.glyphs&&re.push(new qe(d,E,'use of "text-field" requires a style "glyphs" property')),M==="text-font"&&En(Ut(E))&&Vt(E.type)==="identity"&&re.push(new qe(d,E,'"text-font" does not support identity functions'))),re.concat(So({key:c.key,value:E,valueSpec:U,style:m,styleSpec:_,expressionContext:"property",propertyType:s,propertyKey:M}))}function dg(c){return yc(c,"paint")}function fg(c){return yc(c,"layout")}function hg(c){let s=[];const d=c.value,m=c.key,_=c.style,E=c.styleSpec;d.type||d.ref||s.push(new qe(m,d,'either "type" or "ref" is required'));let M=Vt(d.type);const D=Vt(d.ref);if(d.id){const F=Vt(d.id);for(let U=0;U<c.arrayIndex;U++){const X=_.layers[U];Vt(X.id)===F&&s.push(new qe(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(U=>{U in d&&s.push(new qe(m,d[U],`"${U}" is prohibited for ref layers`))}),_.layers.forEach(U=>{Vt(U.id)===D&&(F=U)}),F?F.ref?s.push(new qe(m,d.ref,"ref cannot reference another ref layer")):M=Vt(F.type):s.push(new qe(m,d.ref,`ref layer "${D}" not found`))}else if(M!=="background")if(d.source){const F=_.sources&&_.sources[d.source],U=F&&Vt(F.type);F?U==="vector"&&M==="raster"?s.push(new qe(m,d.source,`layer "${d.id}" requires a raster source`)):U==="raster"&&M!=="raster"?s.push(new qe(m,d.source,`layer "${d.id}" requires a vector source`)):U!=="vector"||d["source-layer"]?U==="raster-dem"&&M!=="hillshade"?s.push(new qe(m,d.source,"raster-dem source can only be used with layer type 'hillshade'.")):M!=="line"||!d.paint||!d.paint["line-gradient"]||U==="geojson"&&F.lineMetrics||s.push(new qe(m,d,`layer "${d.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):s.push(new qe(m,d,`layer "${d.id}" must specify a "source-layer"`)):s.push(new qe(m,d.source,`source "${d.source}" not found`))}else s.push(new qe(m,d,'missing required property "source"'));return s=s.concat(ra({key:m,value:d,valueSpec:E.layer,style:c.style,styleSpec:c.styleSpec,objectElementValidators:{"*":()=>[],type:()=>So({key:`${m}.type`,value:d.type,valueSpec:E.layer.type,style:c.style,styleSpec:c.styleSpec,object:d,objectKey:"type"}),filter:gc,layout:F=>ra({layer:d,key:F.key,value:F.value,style:F.style,styleSpec:F.styleSpec,objectElementValidators:{"*":U=>fg(cr({layerType:M},U))}}),paint:F=>ra({layer:d,key:F.key,value:F.value,style:F.style,styleSpec:F.styleSpec,objectElementValidators:{"*":U=>dg(cr({layerType:M},U))}})}})),s}function ru(c){const s=c.value,d=c.key,m=ln(s);return m!=="string"?[new qe(d,s,`string expected, ${m} found`)]:[]}const pg={promoteId:function({key:c,value:s}){if(ln(s)==="string")return ru({key:c,value:s});{const d=[];for(const m in s)d.push(...ru({key:`${c}.${m}`,value:s[m]}));return d}}};function xc(c){const s=c.value,d=c.key,m=c.styleSpec,_=c.style;if(!s.type)return[new qe(d,s,'"type" is required')];const E=Vt(s.type);let M;switch(E){case"vector":case"raster":case"raster-dem":return M=ra({key:d,value:s,valueSpec:m[`source_${E.replace("-","_")}`],style:c.style,styleSpec:m,objectElementValidators:pg}),M;case"geojson":if(M=ra({key:d,value:s,valueSpec:m.source_geojson,style:_,styleSpec:m,objectElementValidators:pg}),s.cluster)for(const D in s.clusterProperties){const[F,U]=s.clusterProperties[D],X=typeof F=="string"?[F,["accumulated"],["get",D]]:F;M.push(...il({key:`${d}.${D}.map`,value:U,expressionContext:"cluster-map"})),M.push(...il({key:`${d}.${D}.reduce`,value:X,expressionContext:"cluster-reduce"}))}return M;case"video":return ra({key:d,value:s,valueSpec:m.source_video,style:_,styleSpec:m});case"image":return ra({key:d,value:s,valueSpec:m.source_image,style:_,styleSpec:m});case"canvas":return[new qe(d,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return pc({key:`${d}.type`,value:s.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:_,styleSpec:m})}}function _c(c){const s=c.value,d=c.styleSpec,m=d.light,_=c.style;let E=[];const M=ln(s);if(s===void 0)return E;if(M!=="object")return E=E.concat([new qe("light",s,`object expected, ${M} found`)]),E;for(const D in s){const F=D.match(/^(.*)-transition$/);E=E.concat(F&&m[F[1]]&&m[F[1]].transition?So({key:D,value:s[D],valueSpec:d.transition,style:_,styleSpec:d}):m[D]?So({key:D,value:s[D],valueSpec:m[D],style:_,styleSpec:d}):[new qe(D,s[D],`unknown property "${D}"`)])}return E}function Co(c){const s=c.value,d=c.styleSpec,m=d.terrain,_=c.style;let E=[];const M=ln(s);if(s===void 0)return E;if(M!=="object")return E=E.concat([new qe("terrain",s,`object expected, ${M} found`)]),E;for(const D in s)E=E.concat(m[D]?So({key:D,value:s[D],valueSpec:m[D],style:_,styleSpec:d}):[new qe(D,s[D],`unknown property "${D}"`)]);return E}const bc={"*":()=>[],array:ag,boolean:function(c){const s=c.value,d=c.key,m=ln(s);return m!=="boolean"?[new qe(d,s,`boolean expected, ${m} found`)]:[]},number:Xh,color:function(c){const s=c.key,d=c.value,m=ln(d);return m!=="string"?[new qe(s,d,`color expected, ${m} found`)]:qr(d)===null?[new qe(s,d,`color expected, "${d}" found`)]:[]},constants:Xt,enum:pc,filter:gc,function:sg,layer:hg,object:ra,source:xc,light:_c,terrain:Co,string:ru,formatted:function(c){return ru(c).length===0?[]:il(c)},resolvedImage:function(c){return ru(c).length===0?[]:il(c)},padding:function(c){const s=c.key,d=c.value;if(ln(d)==="array"){if(d.length<1||d.length>4)return[new qe(s,d,`padding requires 1 to 4 values; ${d.length} values found`)];const m={type:"number"};let _=[];for(let E=0;E<d.length;E++)_=_.concat(So({key:`${s}[${E}]`,value:d[E],valueSpec:m}));return _}return Xh({key:s,value:d,valueSpec:{}})}};function So(c){const s=c.value,d=c.valueSpec,m=c.styleSpec;return d.expression&&En(Vt(s))?sg(c):d.expression&&dc(Ut(s))?il(c):d.type&&bc[d.type]?bc[d.type](c):ra(cr({},c,{valueSpec:d.type?m[d.type]:d}))}function x_(c){const s=c.value,d=c.key,m=ru(c);return m.length||(s.indexOf("{fontstack}")===-1&&m.push(new qe(d,s,'"glyphs" url must include a "{fontstack}" token')),s.indexOf("{range}")===-1&&m.push(new qe(d,s,'"glyphs" url must include a "{range}" token'))),m}function ks(c,s=Fe){let d=[];return d=d.concat(So({key:"",value:c,valueSpec:s.$root,styleSpec:s,style:c,objectElementValidators:{glyphs:x_,"*":()=>[]}})),c.constants&&(d=d.concat(Xt({key:"constants",value:c.constants,style:c,styleSpec:s}))),mg(d)}function mg(c){return[].concat(c).sort((s,d)=>s.line-d.line)}function ts(c){return function(...s){return mg(c.apply(this,s))}}ks.source=ts(xc),ks.light=ts(_c),ks.terrain=ts(Co),ks.layer=ts(hg),ks.filter=ts(gc),ks.paintProperty=ts(dg),ks.layoutProperty=ts(fg);const wc=ks,Qh=wc.light,__=wc.paintProperty,b_=wc.layoutProperty;function Bd(c,s){let d=!1;if(s&&s.length)for(const m of s)c.fire(new jt(new Error(m.message))),d=!0;return d}class Cc{constructor(s,d,m){const _=this.cells=[];if(s instanceof ArrayBuffer){this.arrayBuffer=s;const M=new Int32Array(this.arrayBuffer);s=M[0],this.d=(d=M[1])+2*(m=M[2]);for(let F=0;F<this.d*this.d;F++){const U=M[3+F],X=M[3+F+1];_.push(U===X?null:M.subarray(U,X))}const D=M[3+_.length+1];this.keys=M.subarray(M[3+_.length],D),this.bboxes=M.subarray(D),this.insert=this._insertReadonly}else{this.d=d+2*m;for(let M=0;M<this.d*this.d;M++)_.push([]);this.keys=[],this.bboxes=[]}this.n=d,this.extent=s,this.padding=m,this.scale=d/s,this.uid=0;const E=m/d*s;this.min=-E,this.max=s+E}insert(s,d,m,_,E){this._forEachCell(d,m,_,E,this._insertCell,this.uid++,void 0,void 0),this.keys.push(s),this.bboxes.push(d),this.bboxes.push(m),this.bboxes.push(_),this.bboxes.push(E)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(s,d,m,_,E,M){this.cells[E].push(M)}query(s,d,m,_,E){const M=this.min,D=this.max;if(s<=M&&d<=M&&D<=m&&D<=_&&!E)return Array.prototype.slice.call(this.keys);{const F=[];return this._forEachCell(s,d,m,_,this._queryCell,F,{},E),F}}_queryCell(s,d,m,_,E,M,D,F){const U=this.cells[E];if(U!==null){const X=this.keys,re=this.bboxes;for(let ue=0;ue<U.length;ue++){const he=U[ue];if(D[he]===void 0){const pe=4*he;(F?F(re[pe+0],re[pe+1],re[pe+2],re[pe+3]):s<=re[pe+2]&&d<=re[pe+3]&&m>=re[pe+0]&&_>=re[pe+1])?(D[he]=!0,M.push(X[he])):D[he]=!1}}}}_forEachCell(s,d,m,_,E,M,D,F){const U=this._convertToCellCoord(s),X=this._convertToCellCoord(d),re=this._convertToCellCoord(m),ue=this._convertToCellCoord(_);for(let he=U;he<=re;he++)for(let pe=X;pe<=ue;pe++){const Oe=this.d*pe+he;if((!F||F(this._convertFromCellCoord(he),this._convertFromCellCoord(pe),this._convertFromCellCoord(he+1),this._convertFromCellCoord(pe+1)))&&E.call(this,s,d,m,_,Oe,M,D,F))return}}_convertFromCellCoord(s){return(s-this.padding)/this.scale}_convertToCellCoord(s){return Math.max(0,Math.min(this.d-1,Math.floor(s*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const s=this.cells,d=3+this.cells.length+1+1;let m=0;for(let M=0;M<this.cells.length;M++)m+=this.cells[M].length;const _=new Int32Array(d+m+this.keys.length+this.bboxes.length);_[0]=this.extent,_[1]=this.n,_[2]=this.padding;let E=d;for(let M=0;M<s.length;M++){const D=s[M];_[3+M]=E,_.set(D,E),E+=D.length}return _[3+s.length]=E,_.set(this.keys,E),E+=this.keys.length,_[3+s.length+1]=E,_.set(this.bboxes,E),E+=this.bboxes.length,_.buffer}static serialize(s,d){const m=s.toArrayBuffer();return d&&d.push(m),{buffer:m}}static deserialize(s){return new Cc(s.buffer)}}const rs={};function dr(c,s,d={}){if(rs[c])throw new Error(`${c} is already registered.`);Object.defineProperty(s,"_classRegistryKey",{value:c,writeable:!1}),rs[c]={klass:s,omit:d.omit||[],shallow:d.shallow||[]}}dr("Object",Object),dr("TransferableGridIndex",Cc),dr("Color",ae),dr("Error",Error),dr("AJAXError",Ye),dr("ResolvedImage",Ae),dr("StylePropertyFunction",Dd),dr("StyleExpression",zd,{omit:["_evaluator"]}),dr("ZoomDependentExpression",Zh),dr("ZoomConstantExpression",hc),dr("CompoundExpression",Jr,{omit:["_evaluate"]});for(const c in Yl)Yl[c]._classRegistryKey||dr(`Expression_${c}`,Yl[c]);function vg(c){return c&&typeof ArrayBuffer<"u"&&(c instanceof ArrayBuffer||c.constructor&&c.constructor.name==="ArrayBuffer")}function ol(c,s){if(c==null||typeof c=="boolean"||typeof c=="number"||typeof c=="string"||c instanceof Boolean||c instanceof Number||c instanceof String||c instanceof Date||c instanceof RegExp||c instanceof Blob)return c;if(vg(c)||Q(c))return s&&s.push(c),c;if(ArrayBuffer.isView(c)){const d=c;return s&&s.push(d.buffer),d}if(c instanceof ImageData)return s&&s.push(c.data.buffer),c;if(Array.isArray(c)){const d=[];for(const m of c)d.push(ol(m,s));return d}if(typeof c=="object"){const d=c.constructor,m=d._classRegistryKey;if(!m)throw new Error("can't serialize object of unregistered class");if(!rs[m])throw new Error(`${m} is not registered.`);const _=d.serialize?d.serialize(c,s):{};if(d.serialize){if(s&&_===s[s.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(const E in c){if(!c.hasOwnProperty(E)||rs[m].omit.indexOf(E)>=0)continue;const M=c[E];_[E]=rs[m].shallow.indexOf(E)>=0?M:ol(M,s)}c instanceof Error&&(_.message=c.message)}if(_.$name)throw new Error("$name property is reserved for worker serialization logic.");return m!=="Object"&&(_.$name=m),_}throw new Error("can't serialize object of type "+typeof c)}function Ts(c){if(c==null||typeof c=="boolean"||typeof c=="number"||typeof c=="string"||c instanceof Boolean||c instanceof Number||c instanceof String||c instanceof Date||c instanceof RegExp||c instanceof Blob||vg(c)||Q(c)||ArrayBuffer.isView(c)||c instanceof ImageData)return c;if(Array.isArray(c))return c.map(Ts);if(typeof c=="object"){const s=c.$name||"Object";if(!rs[s])throw new Error(`can't deserialize unregistered class ${s}`);const{klass:d}=rs[s];if(!d)throw new Error(`can't deserialize unregistered class ${s}`);if(d.deserialize)return d.deserialize(c);const m=Object.create(d.prototype);for(const _ of Object.keys(c)){if(_==="$name")continue;const E=c[_];m[_]=rs[s].shallow.indexOf(_)>=0?E:Ts(E)}return m}throw new Error("can't deserialize object of type "+typeof c)}class Jh{constructor(){this.first=!0}update(s,d){const m=Math.floor(s);return this.first?(this.first=!1,this.lastIntegerZoom=m,this.lastIntegerZoomTime=0,this.lastZoom=s,this.lastFloorZoom=m,!0):(this.lastFloorZoom>m?(this.lastIntegerZoom=m+1,this.lastIntegerZoomTime=d):this.lastFloorZoom<m&&(this.lastIntegerZoom=m,this.lastIntegerZoomTime=d),s!==this.lastZoom&&(this.lastZoom=s,this.lastFloorZoom=m,!0))}}const Jt={"Latin-1 Supplement":c=>c>=128&&c<=255,Arabic:c=>c>=1536&&c<=1791,"Arabic Supplement":c=>c>=1872&&c<=1919,"Arabic Extended-A":c=>c>=2208&&c<=2303,"Hangul Jamo":c=>c>=4352&&c<=4607,"Unified Canadian Aboriginal Syllabics":c=>c>=5120&&c<=5759,Khmer:c=>c>=6016&&c<=6143,"Unified Canadian Aboriginal Syllabics Extended":c=>c>=6320&&c<=6399,"General Punctuation":c=>c>=8192&&c<=8303,"Letterlike Symbols":c=>c>=8448&&c<=8527,"Number Forms":c=>c>=8528&&c<=8591,"Miscellaneous Technical":c=>c>=8960&&c<=9215,"Control Pictures":c=>c>=9216&&c<=9279,"Optical Character Recognition":c=>c>=9280&&c<=9311,"Enclosed Alphanumerics":c=>c>=9312&&c<=9471,"Geometric Shapes":c=>c>=9632&&c<=9727,"Miscellaneous Symbols":c=>c>=9728&&c<=9983,"Miscellaneous Symbols and Arrows":c=>c>=11008&&c<=11263,"CJK Radicals Supplement":c=>c>=11904&&c<=12031,"Kangxi Radicals":c=>c>=12032&&c<=12255,"Ideographic Description Characters":c=>c>=12272&&c<=12287,"CJK Symbols and Punctuation":c=>c>=12288&&c<=12351,Hiragana:c=>c>=12352&&c<=12447,Katakana:c=>c>=12448&&c<=12543,Bopomofo:c=>c>=12544&&c<=12591,"Hangul Compatibility Jamo":c=>c>=12592&&c<=12687,Kanbun:c=>c>=12688&&c<=12703,"Bopomofo Extended":c=>c>=12704&&c<=12735,"CJK Strokes":c=>c>=12736&&c<=12783,"Katakana Phonetic Extensions":c=>c>=12784&&c<=12799,"Enclosed CJK Letters and Months":c=>c>=12800&&c<=13055,"CJK Compatibility":c=>c>=13056&&c<=13311,"CJK Unified Ideographs Extension A":c=>c>=13312&&c<=19903,"Yijing Hexagram Symbols":c=>c>=19904&&c<=19967,"CJK Unified Ideographs":c=>c>=19968&&c<=40959,"Yi Syllables":c=>c>=40960&&c<=42127,"Yi Radicals":c=>c>=42128&&c<=42191,"Hangul Jamo Extended-A":c=>c>=43360&&c<=43391,"Hangul Syllables":c=>c>=44032&&c<=55215,"Hangul Jamo Extended-B":c=>c>=55216&&c<=55295,"Private Use Area":c=>c>=57344&&c<=63743,"CJK Compatibility Ideographs":c=>c>=63744&&c<=64255,"Arabic Presentation Forms-A":c=>c>=64336&&c<=65023,"Vertical Forms":c=>c>=65040&&c<=65055,"CJK Compatibility Forms":c=>c>=65072&&c<=65103,"Small Form Variants":c=>c>=65104&&c<=65135,"Arabic Presentation Forms-B":c=>c>=65136&&c<=65279,"Halfwidth and Fullwidth Forms":c=>c>=65280&&c<=65519};function Vd(c){for(const s of c)if(tp(s.charCodeAt(0)))return!0;return!1}function w_(c){for(const s of c)if(!ep(s.charCodeAt(0)))return!1;return!0}function ep(c){return!(Jt.Arabic(c)||Jt["Arabic Supplement"](c)||Jt["Arabic Extended-A"](c)||Jt["Arabic Presentation Forms-A"](c)||Jt["Arabic Presentation Forms-B"](c))}function tp(c){return!(c!==746&&c!==747&&(c<4352||!(Jt["Bopomofo Extended"](c)||Jt.Bopomofo(c)||Jt["CJK Compatibility Forms"](c)&&!(c>=65097&&c<=65103)||Jt["CJK Compatibility Ideographs"](c)||Jt["CJK Compatibility"](c)||Jt["CJK Radicals Supplement"](c)||Jt["CJK Strokes"](c)||!(!Jt["CJK Symbols and Punctuation"](c)||c>=12296&&c<=12305||c>=12308&&c<=12319||c===12336)||Jt["CJK Unified Ideographs Extension A"](c)||Jt["CJK Unified Ideographs"](c)||Jt["Enclosed CJK Letters and Months"](c)||Jt["Hangul Compatibility Jamo"](c)||Jt["Hangul Jamo Extended-A"](c)||Jt["Hangul Jamo Extended-B"](c)||Jt["Hangul Jamo"](c)||Jt["Hangul Syllables"](c)||Jt.Hiragana(c)||Jt["Ideographic Description Characters"](c)||Jt.Kanbun(c)||Jt["Kangxi Radicals"](c)||Jt["Katakana Phonetic Extensions"](c)||Jt.Katakana(c)&&c!==12540||!(!Jt["Halfwidth and Fullwidth Forms"](c)||c===65288||c===65289||c===65293||c>=65306&&c<=65310||c===65339||c===65341||c===65343||c>=65371&&c<=65503||c===65507||c>=65512&&c<=65519)||!(!Jt["Small Form Variants"](c)||c>=65112&&c<=65118||c>=65123&&c<=65126)||Jt["Unified Canadian Aboriginal Syllabics"](c)||Jt["Unified Canadian Aboriginal Syllabics Extended"](c)||Jt["Vertical Forms"](c)||Jt["Yijing Hexagram Symbols"](c)||Jt["Yi Syllables"](c)||Jt["Yi Radicals"](c))))}function gg(c){return!(tp(c)||function(s){return!!(Jt["Latin-1 Supplement"](s)&&(s===167||s===169||s===174||s===177||s===188||s===189||s===190||s===215||s===247)||Jt["General Punctuation"](s)&&(s===8214||s===8224||s===8225||s===8240||s===8241||s===8251||s===8252||s===8258||s===8263||s===8264||s===8265||s===8273)||Jt["Letterlike Symbols"](s)||Jt["Number Forms"](s)||Jt["Miscellaneous Technical"](s)&&(s>=8960&&s<=8967||s>=8972&&s<=8991||s>=8996&&s<=9e3||s===9003||s>=9085&&s<=9114||s>=9150&&s<=9165||s===9167||s>=9169&&s<=9179||s>=9186&&s<=9215)||Jt["Control Pictures"](s)&&s!==9251||Jt["Optical Character Recognition"](s)||Jt["Enclosed Alphanumerics"](s)||Jt["Geometric Shapes"](s)||Jt["Miscellaneous Symbols"](s)&&!(s>=9754&&s<=9759)||Jt["Miscellaneous Symbols and Arrows"](s)&&(s>=11026&&s<=11055||s>=11088&&s<=11097||s>=11192&&s<=11243)||Jt["CJK Symbols and Punctuation"](s)||Jt.Katakana(s)||Jt["Private Use Area"](s)||Jt["CJK Compatibility Forms"](s)||Jt["Small Form Variants"](s)||Jt["Halfwidth and Fullwidth Forms"](s)||s===8734||s===8756||s===8757||s>=9984&&s<=10087||s>=10102&&s<=10131||s===65532||s===65533)}(c))}function yg(c){return c>=1424&&c<=2303||Jt["Arabic Presentation Forms-A"](c)||Jt["Arabic Presentation Forms-B"](c)}function C_(c,s){return!(!s&&yg(c)||c>=2304&&c<=3583||c>=3840&&c<=4255||Jt.Khmer(c))}function xg(c){for(const s of c)if(yg(s.charCodeAt(0)))return!0;return!1}const rp="deferred",np="loading",ip="loaded";let op=null,uo="unavailable",Ps=null;const _g=function(c){c&&typeof c=="string"&&c.indexOf("NetworkError")>-1&&(uo="error"),op&&op(c)};function nu(){ap.fire(new Wt("pluginStateChange",{pluginStatus:uo,pluginURL:Ps}))}const ap=new Qt,Sc=function(){return uo},bg=function(){if(uo!==rp||!Ps)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");uo=np,nu(),Ps&&Ct({url:Ps},c=>{c?_g(c):(uo=ip,nu())})},jo={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>uo===ip||jo.applyArabicShaping!=null,isLoading:()=>uo===np,setState(c){if(!H())throw new Error("Cannot set the state of the rtl-text-plugin when not in the web-worker context");uo=c.pluginStatus,Ps=c.pluginURL},isParsed(){if(!H())throw new Error("rtl-text-plugin is only parsed on the worker-threads");return jo.applyArabicShaping!=null&&jo.processBidirectionalText!=null&&jo.processStyledBidirectionalText!=null},getPluginURL(){if(!H())throw new Error("rtl-text-plugin url can only be queried from the worker threads");return Ps}};class Dn{constructor(s,d){this.zoom=s,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 Jh,this.transition={})}isSupportedScript(s){return function(d,m){for(const _ of d)if(!C_(_.charCodeAt(0),m))return!1;return!0}(s,jo.isLoaded())}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const s=this.zoom,d=s-Math.floor(s),m=this.crossFadingFactor();return s>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:d+(1-d)*m}:{fromScale:.5,toScale:1,t:1-(1-m)*d}}}class Ec{constructor(s,d){this.property=s,this.value=d,this.expression=function(m,_){if(En(m))return new Dd(m,_);if(dc(m)){const E=og(m,_);if(E.result==="error")throw new Error(E.value.map(M=>`${M.key}: ${M.message}`).join(", "));return E.value}{let E=m;return _.type==="color"&&typeof m=="string"?E=ae.parse(m):_.type!=="padding"||typeof m!="number"&&!Array.isArray(m)||(E=Ce.parse(m)),{kind:"constant",evaluate:()=>E}}}(d===void 0?s.specification.default:d,s.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(s,d,m){return this.property.possiblyEvaluate(this,s,d,m)}}class jd{constructor(s){this.property=s,this.value=new Ec(s,void 0)}transitioned(s,d){return new Cg(this.property,this.value,d,T({},s.transition,this.transition),s.now)}untransitioned(){return new Cg(this.property,this.value,null,{},0)}}class wg{constructor(s){this._properties=s,this._values=Object.create(s.defaultTransitionablePropertyValues)}getValue(s){return N(this._values[s].value.value)}setValue(s,d){Object.prototype.hasOwnProperty.call(this._values,s)||(this._values[s]=new jd(this._values[s].property)),this._values[s].value=new Ec(this._values[s].property,d===null?void 0:N(d))}getTransition(s){return N(this._values[s].transition)}setTransition(s,d){Object.prototype.hasOwnProperty.call(this._values,s)||(this._values[s]=new jd(this._values[s].property)),this._values[s].transition=N(d)||void 0}serialize(){const s={};for(const d of Object.keys(this._values)){const m=this.getValue(d);m!==void 0&&(s[d]=m);const _=this.getTransition(d);_!==void 0&&(s[`${d}-transition`]=_)}return s}transitioned(s,d){const m=new Sg(this._properties);for(const _ of Object.keys(this._values))m._values[_]=this._values[_].transitioned(s,d._values[_]);return m}untransitioned(){const s=new Sg(this._properties);for(const d of Object.keys(this._values))s._values[d]=this._values[d].untransitioned();return s}}class Cg{constructor(s,d,m,_,E){this.property=s,this.value=d,this.begin=E+_.delay||0,this.end=this.begin+_.duration||0,s.specification.transition&&(_.delay||_.duration)&&(this.prior=m)}possiblyEvaluate(s,d,m){const _=s.now||0,E=this.value.possiblyEvaluate(s,d,m),M=this.prior;if(M){if(_>this.end)return this.prior=null,E;if(this.value.isDataDriven())return this.prior=null,E;if(_<this.begin)return M.possiblyEvaluate(s,d,m);{const D=(_-this.begin)/(this.end-this.begin);return this.property.interpolate(M.possiblyEvaluate(s,d,m),E,function(F){if(F<=0)return 0;if(F>=1)return 1;const U=F*F,X=U*F;return 4*(F<.5?X:3*(F-U)+X-.75)}(D))}}return E}}class Sg{constructor(s){this._properties=s,this._values=Object.create(s.defaultTransitioningPropertyValues)}possiblyEvaluate(s,d,m){const _=new kc(this._properties);for(const E of Object.keys(this._values))_._values[E]=this._values[E].possiblyEvaluate(s,d,m);return _}hasTransition(){for(const s of Object.keys(this._values))if(this._values[s].prior)return!0;return!1}}class S_{constructor(s){this._properties=s,this._values=Object.create(s.defaultPropertyValues)}getValue(s){return N(this._values[s].value)}setValue(s,d){this._values[s]=new Ec(this._values[s].property,d===null?void 0:N(d))}serialize(){const s={};for(const d of Object.keys(this._values)){const m=this.getValue(d);m!==void 0&&(s[d]=m)}return s}possiblyEvaluate(s,d,m){const _=new kc(this._properties);for(const E of Object.keys(this._values))_._values[E]=this._values[E].possiblyEvaluate(s,d,m);return _}}class Ea{constructor(s,d,m){this.property=s,this.value=d,this.parameters=m}isConstant(){return this.value.kind==="constant"}constantOr(s){return this.value.kind==="constant"?this.value.value:s}evaluate(s,d,m,_){return this.property.evaluate(this.value,this.parameters,s,d,m,_)}}class kc{constructor(s){this._properties=s,this._values=Object.create(s.defaultPossiblyEvaluatedValues)}get(s){return this._values[s]}}class pr{constructor(s){this.specification=s}possiblyEvaluate(s,d){if(s.isDataDriven())throw new Error("Value should not be data driven");return s.expression.evaluate(d)}interpolate(s,d,m){const _=es[this.specification.type];return _?_(s,d,m):s}}class Er{constructor(s,d){this.specification=s,this.overrides=d}possiblyEvaluate(s,d,m,_){return new Ea(this,s.expression.kind==="constant"||s.expression.kind==="camera"?{kind:"constant",value:s.expression.evaluate(d,null,{},m,_)}:s.expression,d)}interpolate(s,d,m){if(s.value.kind!=="constant"||d.value.kind!=="constant")return s;if(s.value.value===void 0||d.value.value===void 0)return new Ea(this,{kind:"constant",value:void 0},s.parameters);const _=es[this.specification.type];return _?new Ea(this,{kind:"constant",value:_(s.value.value,d.value.value,m)},s.parameters):s}evaluate(s,d,m,_,E,M){return s.kind==="constant"?s.value:s.evaluate(d,m,_,E,M)}}class iu extends Er{possiblyEvaluate(s,d,m,_){if(s.value===void 0)return new Ea(this,{kind:"constant",value:void 0},d);if(s.expression.kind==="constant"){const E=s.expression.evaluate(d,null,{},m,_),M=s.property.specification.type==="resolvedImage"&&typeof E!="string"?E.name:E,D=this._calculate(M,M,M,d);return new Ea(this,{kind:"constant",value:D},d)}if(s.expression.kind==="camera"){const E=this._calculate(s.expression.evaluate({zoom:d.zoom-1}),s.expression.evaluate({zoom:d.zoom}),s.expression.evaluate({zoom:d.zoom+1}),d);return new Ea(this,{kind:"constant",value:E},d)}return new Ea(this,s.expression,d)}evaluate(s,d,m,_,E,M){if(s.kind==="source"){const D=s.evaluate(d,m,_,E,M);return this._calculate(D,D,D,d)}return s.kind==="composite"?this._calculate(s.evaluate({zoom:Math.floor(d.zoom)-1},m,_),s.evaluate({zoom:Math.floor(d.zoom)},m,_),s.evaluate({zoom:Math.floor(d.zoom)+1},m,_),d):s.value}_calculate(s,d,m,_){return _.zoom>_.zoomHistory.lastIntegerZoom?{from:s,to:d}:{from:m,to:d}}interpolate(s){return s}}class sp{constructor(s){this.specification=s}possiblyEvaluate(s,d,m,_){if(s.value!==void 0){if(s.expression.kind==="constant"){const E=s.expression.evaluate(d,null,{},m,_);return this._calculate(E,E,E,d)}return this._calculate(s.expression.evaluate(new Dn(Math.floor(d.zoom-1),d)),s.expression.evaluate(new Dn(Math.floor(d.zoom),d)),s.expression.evaluate(new Dn(Math.floor(d.zoom+1),d)),d)}}_calculate(s,d,m,_){return _.zoom>_.zoomHistory.lastIntegerZoom?{from:s,to:d}:{from:m,to:d}}interpolate(s){return s}}class Ms{constructor(s){this.specification=s}possiblyEvaluate(s,d,m,_){return!!s.expression.evaluate(d,null,{},m,_)}interpolate(){return!1}}class Li{constructor(s){this.properties=s,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const d in s){const m=s[d];m.specification.overridable&&this.overridableProperties.push(d);const _=this.defaultPropertyValues[d]=new Ec(m,void 0),E=this.defaultTransitionablePropertyValues[d]=new jd(m);this.defaultTransitioningPropertyValues[d]=E.untransitioned(),this.defaultPossiblyEvaluatedValues[d]=_.possiblyEvaluate({})}}}dr("DataDrivenProperty",Er),dr("DataConstantProperty",pr),dr("CrossFadedDataDrivenProperty",iu),dr("CrossFadedProperty",sp),dr("ColorRampProperty",Ms);const Is="-transition";class ka extends Qt{constructor(s,d){if(super(),this.id=s.id,this.type=s.type,this._featureFilter={filter:()=>!0,needGeometry:!1},s.type!=="custom"&&(this.metadata=s.metadata,this.minzoom=s.minzoom,this.maxzoom=s.maxzoom,s.type!=="background"&&(this.source=s.source,this.sourceLayer=s["source-layer"],this.filter=s.filter),d.layout&&(this._unevaluatedLayout=new S_(d.layout)),d.paint)){this._transitionablePaint=new wg(d.paint);for(const m in s.paint)this.setPaintProperty(m,s.paint[m],{validate:!1});for(const m in s.layout)this.setLayoutProperty(m,s.layout[m],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new kc(d.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(s){return s==="visibility"?this.visibility:this._unevaluatedLayout.getValue(s)}setLayoutProperty(s,d,m={}){d!=null&&this._validate(b_,`layers.${this.id}.layout.${s}`,s,d,m)||(s!=="visibility"?this._unevaluatedLayout.setValue(s,d):this.visibility=d)}getPaintProperty(s){return s.endsWith(Is)?this._transitionablePaint.getTransition(s.slice(0,-Is.length)):this._transitionablePaint.getValue(s)}setPaintProperty(s,d,m={}){if(d!=null&&this._validate(__,`layers.${this.id}.paint.${s}`,s,d,m))return!1;if(s.endsWith(Is))return this._transitionablePaint.setTransition(s.slice(0,-Is.length),d||void 0),!1;{const _=this._transitionablePaint._values[s],E=_.property.specification["property-type"]==="cross-faded-data-driven",M=_.value.isDataDriven(),D=_.value;this._transitionablePaint.setValue(s,d),this._handleSpecialPaintPropertyUpdate(s);const F=this._transitionablePaint._values[s].value;return F.isDataDriven()||M||E||this._handleOverridablePaintPropertyUpdate(s,D,F)}}_handleSpecialPaintPropertyUpdate(s){}_handleOverridablePaintPropertyUpdate(s,d,m){return!1}isHidden(s){return!!(this.minzoom&&s<this.minzoom)||!!(this.maxzoom&&s>=this.maxzoom)||this.visibility==="none"}updateTransitions(s){this._transitioningPaint=this._transitionablePaint.transitioned(s,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(s,d){s.getCrossfadeParameters&&(this._crossfadeParameters=s.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(s,void 0,d)),this.paint=this._transitioningPaint.possiblyEvaluate(s,void 0,d)}serialize(){const s={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&&(s.layout=s.layout||{},s.layout.visibility=this.visibility),O(s,(d,m)=>!(d===void 0||m==="layout"&&!Object.keys(d).length||m==="paint"&&!Object.keys(d).length))}_validate(s,d,m,_,E={}){return(!E||E.validate!==!1)&&Bd(this,s.call(wc,{key:d,layerType:this.type,objectKey:m,value:_,styleSpec:Fe,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const s in this.paint._values){const d=this.paint.get(s);if(d instanceof Ea&&Mn(d.property.specification)&&(d.value.kind==="source"||d.value.kind==="composite")&&d.value.isStateDependent)return!0}return!1}}const Eg={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Rs{constructor(s,d){this._structArray=s,this._pos1=d*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class ti{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(s,d){return s._trim(),d&&(s.isTransferred=!0,d.push(s.arrayBuffer)),{length:s.length,arrayBuffer:s.arrayBuffer}}static deserialize(s){const d=Object.create(this.prototype);return d.arrayBuffer=s.arrayBuffer,d.length=s.length,d.capacity=s.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(s){this.reserve(s),this.length=s}reserve(s){if(s>this.capacity){this.capacity=Math.max(s,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 ci(c,s=1){let d=0,m=0;return{members:c.map(_=>{const E=Eg[_.type].BYTES_PER_ELEMENT,M=d=lp(d,Math.max(s,E)),D=_.components||1;return m=Math.max(m,E),d+=E*D,{name:_.name,type:_.type,components:D,offset:M}}),size:lp(d,Math.max(m,s)),alignment:s}}function lp(c,s){return Math.ceil(c/s)*s}class al extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,d){const m=this.length;return this.resize(m+1),this.emplace(m,s,d)}emplace(s,d,m){const _=2*s;return this.int16[_+0]=d,this.int16[_+1]=m,s}}al.prototype.bytesPerElement=4,dr("StructArrayLayout2i4",al);class x extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,d,m,_){const E=this.length;return this.resize(E+1),this.emplace(E,s,d,m,_)}emplace(s,d,m,_,E){const M=4*s;return this.int16[M+0]=d,this.int16[M+1]=m,this.int16[M+2]=_,this.int16[M+3]=E,s}}x.prototype.bytesPerElement=8,dr("StructArrayLayout4i8",x);class l extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,d,m,_,E,M){const D=this.length;return this.resize(D+1),this.emplace(D,s,d,m,_,E,M)}emplace(s,d,m,_,E,M,D){const F=6*s;return this.int16[F+0]=d,this.int16[F+1]=m,this.int16[F+2]=_,this.int16[F+3]=E,this.int16[F+4]=M,this.int16[F+5]=D,s}}l.prototype.bytesPerElement=12,dr("StructArrayLayout2i4i12",l);class h extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,d,m,_,E,M){const D=this.length;return this.resize(D+1),this.emplace(D,s,d,m,_,E,M)}emplace(s,d,m,_,E,M,D){const F=4*s,U=8*s;return this.int16[F+0]=d,this.int16[F+1]=m,this.uint8[U+4]=_,this.uint8[U+5]=E,this.uint8[U+6]=M,this.uint8[U+7]=D,s}}h.prototype.bytesPerElement=8,dr("StructArrayLayout2i4ub8",h);class g extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,d){const m=this.length;return this.resize(m+1),this.emplace(m,s,d)}emplace(s,d,m){const _=2*s;return this.float32[_+0]=d,this.float32[_+1]=m,s}}g.prototype.bytesPerElement=8,dr("StructArrayLayout2f8",g);class b extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(s,d,m,_,E,M,D,F,U,X){const re=this.length;return this.resize(re+1),this.emplace(re,s,d,m,_,E,M,D,F,U,X)}emplace(s,d,m,_,E,M,D,F,U,X,re){const ue=10*s;return this.uint16[ue+0]=d,this.uint16[ue+1]=m,this.uint16[ue+2]=_,this.uint16[ue+3]=E,this.uint16[ue+4]=M,this.uint16[ue+5]=D,this.uint16[ue+6]=F,this.uint16[ue+7]=U,this.uint16[ue+8]=X,this.uint16[ue+9]=re,s}}b.prototype.bytesPerElement=20,dr("StructArrayLayout10ui20",b);class P extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(s,d,m,_,E,M,D,F,U,X,re,ue){const he=this.length;return this.resize(he+1),this.emplace(he,s,d,m,_,E,M,D,F,U,X,re,ue)}emplace(s,d,m,_,E,M,D,F,U,X,re,ue,he){const pe=12*s;return this.int16[pe+0]=d,this.int16[pe+1]=m,this.int16[pe+2]=_,this.int16[pe+3]=E,this.uint16[pe+4]=M,this.uint16[pe+5]=D,this.uint16[pe+6]=F,this.uint16[pe+7]=U,this.int16[pe+8]=X,this.int16[pe+9]=re,this.int16[pe+10]=ue,this.int16[pe+11]=he,s}}P.prototype.bytesPerElement=24,dr("StructArrayLayout4i4ui4i24",P);class z extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,d,m){const _=this.length;return this.resize(_+1),this.emplace(_,s,d,m)}emplace(s,d,m,_){const E=3*s;return this.float32[E+0]=d,this.float32[E+1]=m,this.float32[E+2]=_,s}}z.prototype.bytesPerElement=12,dr("StructArrayLayout3f12",z);class $ extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(s){const d=this.length;return this.resize(d+1),this.emplace(d,s)}emplace(s,d){return this.uint32[1*s+0]=d,s}}$.prototype.bytesPerElement=4,dr("StructArrayLayout1ul4",$);class V extends ti{_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(s,d,m,_,E,M,D,F,U){const X=this.length;return this.resize(X+1),this.emplace(X,s,d,m,_,E,M,D,F,U)}emplace(s,d,m,_,E,M,D,F,U,X){const re=10*s,ue=5*s;return this.int16[re+0]=d,this.int16[re+1]=m,this.int16[re+2]=_,this.int16[re+3]=E,this.int16[re+4]=M,this.int16[re+5]=D,this.uint32[ue+3]=F,this.uint16[re+8]=U,this.uint16[re+9]=X,s}}V.prototype.bytesPerElement=20,dr("StructArrayLayout6i1ul2ui20",V);class W extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,d,m,_,E,M){const D=this.length;return this.resize(D+1),this.emplace(D,s,d,m,_,E,M)}emplace(s,d,m,_,E,M,D){const F=6*s;return this.int16[F+0]=d,this.int16[F+1]=m,this.int16[F+2]=_,this.int16[F+3]=E,this.int16[F+4]=M,this.int16[F+5]=D,s}}W.prototype.bytesPerElement=12,dr("StructArrayLayout2i2i2i12",W);class ee extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,d,m,_,E){const M=this.length;return this.resize(M+1),this.emplace(M,s,d,m,_,E)}emplace(s,d,m,_,E,M){const D=4*s,F=8*s;return this.float32[D+0]=d,this.float32[D+1]=m,this.float32[D+2]=_,this.int16[F+6]=E,this.int16[F+7]=M,s}}ee.prototype.bytesPerElement=16,dr("StructArrayLayout2f1f2i16",ee);class ie extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,d,m,_){const E=this.length;return this.resize(E+1),this.emplace(E,s,d,m,_)}emplace(s,d,m,_,E){const M=12*s,D=3*s;return this.uint8[M+0]=d,this.uint8[M+1]=m,this.float32[D+1]=_,this.float32[D+2]=E,s}}ie.prototype.bytesPerElement=12,dr("StructArrayLayout2ub2f12",ie);class fe extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(s,d,m){const _=this.length;return this.resize(_+1),this.emplace(_,s,d,m)}emplace(s,d,m,_){const E=3*s;return this.uint16[E+0]=d,this.uint16[E+1]=m,this.uint16[E+2]=_,s}}fe.prototype.bytesPerElement=6,dr("StructArrayLayout3ui6",fe);class Se extends ti{_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(s,d,m,_,E,M,D,F,U,X,re,ue,he,pe,Oe,Me,Ze){const st=this.length;return this.resize(st+1),this.emplace(st,s,d,m,_,E,M,D,F,U,X,re,ue,he,pe,Oe,Me,Ze)}emplace(s,d,m,_,E,M,D,F,U,X,re,ue,he,pe,Oe,Me,Ze,st){const Ke=24*s,nt=12*s,kt=48*s;return this.int16[Ke+0]=d,this.int16[Ke+1]=m,this.uint16[Ke+2]=_,this.uint16[Ke+3]=E,this.uint32[nt+2]=M,this.uint32[nt+3]=D,this.uint32[nt+4]=F,this.uint16[Ke+10]=U,this.uint16[Ke+11]=X,this.uint16[Ke+12]=re,this.float32[nt+7]=ue,this.float32[nt+8]=he,this.uint8[kt+36]=pe,this.uint8[kt+37]=Oe,this.uint8[kt+38]=Me,this.uint32[nt+10]=Ze,this.int16[Ke+22]=st,s}}Se.prototype.bytesPerElement=48,dr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Se);class _e extends ti{_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(s,d,m,_,E,M,D,F,U,X,re,ue,he,pe,Oe,Me,Ze,st,Ke,nt,kt,St,lr,hr,er,Zt,Ht,tr){const Yt=this.length;return this.resize(Yt+1),this.emplace(Yt,s,d,m,_,E,M,D,F,U,X,re,ue,he,pe,Oe,Me,Ze,st,Ke,nt,kt,St,lr,hr,er,Zt,Ht,tr)}emplace(s,d,m,_,E,M,D,F,U,X,re,ue,he,pe,Oe,Me,Ze,st,Ke,nt,kt,St,lr,hr,er,Zt,Ht,tr,Yt){const Ft=34*s,br=17*s;return this.int16[Ft+0]=d,this.int16[Ft+1]=m,this.int16[Ft+2]=_,this.int16[Ft+3]=E,this.int16[Ft+4]=M,this.int16[Ft+5]=D,this.int16[Ft+6]=F,this.int16[Ft+7]=U,this.uint16[Ft+8]=X,this.uint16[Ft+9]=re,this.uint16[Ft+10]=ue,this.uint16[Ft+11]=he,this.uint16[Ft+12]=pe,this.uint16[Ft+13]=Oe,this.uint16[Ft+14]=Me,this.uint16[Ft+15]=Ze,this.uint16[Ft+16]=st,this.uint16[Ft+17]=Ke,this.uint16[Ft+18]=nt,this.uint16[Ft+19]=kt,this.uint16[Ft+20]=St,this.uint16[Ft+21]=lr,this.uint16[Ft+22]=hr,this.uint32[br+12]=er,this.float32[br+13]=Zt,this.float32[br+14]=Ht,this.float32[br+15]=tr,this.float32[br+16]=Yt,s}}_e.prototype.bytesPerElement=68,dr("StructArrayLayout8i15ui1ul4f68",_e);class we extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s){const d=this.length;return this.resize(d+1),this.emplace(d,s)}emplace(s,d){return this.float32[1*s+0]=d,s}}we.prototype.bytesPerElement=4,dr("StructArrayLayout1f4",we);class $e extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(s,d,m){const _=this.length;return this.resize(_+1),this.emplace(_,s,d,m)}emplace(s,d,m,_){const E=3*s;return this.int16[E+0]=d,this.int16[E+1]=m,this.int16[E+2]=_,s}}$e.prototype.bytesPerElement=6,dr("StructArrayLayout3i6",$e);class Ue extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(s,d,m){const _=this.length;return this.resize(_+1),this.emplace(_,s,d,m)}emplace(s,d,m,_){const E=4*s;return this.uint32[2*s+0]=d,this.uint16[E+2]=m,this.uint16[E+3]=_,s}}Ue.prototype.bytesPerElement=8,dr("StructArrayLayout1ul2ui8",Ue);class et extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(s,d){const m=this.length;return this.resize(m+1),this.emplace(m,s,d)}emplace(s,d,m){const _=2*s;return this.uint16[_+0]=d,this.uint16[_+1]=m,s}}et.prototype.bytesPerElement=4,dr("StructArrayLayout2ui4",et);class Pe extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(s){const d=this.length;return this.resize(d+1),this.emplace(d,s)}emplace(s,d){return this.uint16[1*s+0]=d,s}}Pe.prototype.bytesPerElement=2,dr("StructArrayLayout1ui2",Pe);class at extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(s,d,m,_){const E=this.length;return this.resize(E+1),this.emplace(E,s,d,m,_)}emplace(s,d,m,_,E){const M=4*s;return this.float32[M+0]=d,this.float32[M+1]=m,this.float32[M+2]=_,this.float32[M+3]=E,s}}at.prototype.bytesPerElement=16,dr("StructArrayLayout4f16",at);class rt extends Rs{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 ne(this.anchorPointX,this.anchorPointY)}}rt.prototype.size=20;class gt extends V{get(s){return new rt(this,s)}}dr("CollisionBoxArray",gt);class yt extends Rs{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(s){this._structArray.uint8[this._pos1+37]=s}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(s){this._structArray.uint8[this._pos1+38]=s}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(s){this._structArray.uint32[this._pos4+10]=s}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}yt.prototype.size=48;class zt extends Se{get(s){return new yt(this,s)}}dr("PlacedSymbolArray",zt);class vt extends Rs{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(s){this._structArray.uint32[this._pos4+12]=s}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 nr extends _e{get(s){return new vt(this,s)}}dr("SymbolInstanceArray",nr);class Gt extends we{getoffsetX(s){return this.float32[1*s+0]}}dr("GlyphOffsetArray",Gt);class sr extends $e{getx(s){return this.int16[3*s+0]}gety(s){return this.int16[3*s+1]}gettileUnitDistanceFromAnchor(s){return this.int16[3*s+2]}}dr("SymbolLineVertexArray",sr);class Dr extends Rs{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]}}Dr.prototype.size=8;class Vr extends Ue{get(s){return new Dr(this,s)}}dr("FeatureIndexArray",Vr);class _r extends al{}class hn extends al{}class pn extends al{}class Qr extends l{}class en extends h{}class gn extends g{}class Ei extends b{}class Ta extends P{}class na extends z{}class Pa extends ${}class Os extends W{}class Uo extends ie{}class co extends fe{}class ns extends et{}const Ud=ci([{name:"a_pos",components:2,type:"Int16"}],4),{members:yi}=Ud;class Hr{constructor(s=[]){this.segments=s}prepareSegment(s,d,m,_){let E=this.segments[this.segments.length-1];return s>Hr.MAX_VERTEX_ARRAY_LENGTH&&B(`Max vertices per segment is ${Hr.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${s}`),(!E||E.vertexLength+s>Hr.MAX_VERTEX_ARRAY_LENGTH||E.sortKey!==_)&&(E={vertexOffset:d.length,primitiveOffset:m.length,vertexLength:0,primitiveLength:0},_!==void 0&&(E.sortKey=_),this.segments.push(E)),E}get(){return this.segments}destroy(){for(const s of this.segments)for(const d in s.vaos)s.vaos[d].destroy()}static simpleSegment(s,d,m,_){return new Hr([{vertexOffset:s,primitiveOffset:d,vertexLength:m,primitiveLength:_,vaos:{},sortKey:0}])}}function fn(c,s){return 256*(c=w(Math.floor(c),0,255))+w(Math.floor(s),0,255)}Hr.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,dr("SegmentVector",Hr);const ki=ci([{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 Ti={exports:{}},Ln={exports:{}};Ln.exports=function(c,s){var d,m,_,E,M,D,F,U;for(m=c.length-(d=3&c.length),_=s,M=3432918353,D=461845907,U=0;U<m;)F=255&c.charCodeAt(U)|(255&c.charCodeAt(++U))<<8|(255&c.charCodeAt(++U))<<16|(255&c.charCodeAt(++U))<<24,++U,_=27492+(65535&(E=5*(65535&(_=(_^=F=(65535&(F=(F=(65535&F)*M+(((F>>>16)*M&65535)<<16)&4294967295)<<15|F>>>17))*D+(((F>>>16)*D&65535)<<16)&4294967295)<<13|_>>>19))+((5*(_>>>16)&65535)<<16)&4294967295))+((58964+(E>>>16)&65535)<<16);switch(F=0,d){case 3:F^=(255&c.charCodeAt(U+2))<<16;case 2:F^=(255&c.charCodeAt(U+1))<<8;case 1:_^=F=(65535&(F=(F=(65535&(F^=255&c.charCodeAt(U)))*M+(((F>>>16)*M&65535)<<16)&4294967295)<<15|F>>>17))*D+(((F>>>16)*D&65535)<<16)&4294967295}return _^=c.length,_=2246822507*(65535&(_^=_>>>16))+((2246822507*(_>>>16)&65535)<<16)&4294967295,_=3266489909*(65535&(_^=_>>>13))+((3266489909*(_>>>16)&65535)<<16)&4294967295,(_^=_>>>16)>>>0};var Ko={exports:{}};Ko.exports=function(c,s){for(var d,m=c.length,_=s^m,E=0;m>=4;)d=1540483477*(65535&(d=255&c.charCodeAt(E)|(255&c.charCodeAt(++E))<<8|(255&c.charCodeAt(++E))<<16|(255&c.charCodeAt(++E))<<24))+((1540483477*(d>>>16)&65535)<<16),_=1540483477*(65535&_)+((1540483477*(_>>>16)&65535)<<16)^(d=1540483477*(65535&(d^=d>>>24))+((1540483477*(d>>>16)&65535)<<16)),m-=4,++E;switch(m){case 3:_^=(255&c.charCodeAt(E+2))<<16;case 2:_^=(255&c.charCodeAt(E+1))<<8;case 1:_=1540483477*(65535&(_^=255&c.charCodeAt(E)))+((1540483477*(_>>>16)&65535)<<16)}return _=1540483477*(65535&(_^=_>>>13))+((1540483477*(_>>>16)&65535)<<16),(_^=_>>>15)>>>0};var sl=Ln.exports,up=Ko.exports;Ti.exports=sl,Ti.exports.murmur3=sl,Ti.exports.murmur2=up;class ou{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(s,d,m,_){this.ids.push(kg(s)),this.positions.push(d,m,_)}getPositions(s){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const d=kg(s);let m=0,_=this.ids.length-1;for(;m<_;){const M=m+_>>1;this.ids[M]>=d?_=M:m=M+1}const E=[];for(;this.ids[m]===d;)E.push({index:this.positions[3*m],start:this.positions[3*m+1],end:this.positions[3*m+2]}),m++;return E}static serialize(s,d){const m=new Float64Array(s.ids),_=new Uint32Array(s.positions);return cp(m,_,0,m.length-1),d&&d.push(m.buffer,_.buffer),{ids:m,positions:_}}static deserialize(s){const d=new ou;return d.ids=s.ids,d.positions=s.positions,d.indexed=!0,d}}function kg(c){const s=+c;return!isNaN(s)&&s<=Number.MAX_SAFE_INTEGER?s:Ti.exports(String(c))}function cp(c,s,d,m){for(;d<m;){const _=c[d+m>>1];let E=d-1,M=m+1;for(;;){do E++;while(c[E]<_);do M--;while(c[M]>_);if(E>=M)break;As(c,E,M),As(s,3*E,3*M),As(s,3*E+1,3*M+1),As(s,3*E+2,3*M+2)}M-d<m-M?(cp(c,s,d,M),d=M+1):(cp(c,s,M+1,m),m=M)}}function As(c,s,d){const m=c[s];c[s]=c[d],c[d]=m}dr("FeaturePositionMap",ou);class ll{constructor(s,d){this.gl=s.gl,this.location=d}}class ul extends ll{constructor(s,d){super(s,d),this.current=0}set(s){this.current!==s&&(this.current=s,this.gl.uniform1f(this.location,s))}}class Kd extends ll{constructor(s,d){super(s,d),this.current=[0,0,0,0]}set(s){s[0]===this.current[0]&&s[1]===this.current[1]&&s[2]===this.current[2]&&s[3]===this.current[3]||(this.current=s,this.gl.uniform4f(this.location,s[0],s[1],s[2],s[3]))}}class t5 extends ll{constructor(s,d){super(s,d),this.current=ae.transparent}set(s){s.r===this.current.r&&s.g===this.current.g&&s.b===this.current.b&&s.a===this.current.a||(this.current=s,this.gl.uniform4f(this.location,s.r,s.g,s.b,s.a))}}const MF=new Float32Array(16);function E_(c){return[fn(255*c.r,255*c.g),fn(255*c.b,255*c.a)]}class dp{constructor(s,d,m){this.value=s,this.uniformNames=d.map(_=>`u_${_}`),this.type=m}setUniform(s,d,m){s.set(m.constantOr(this.value))}getBinding(s,d,m){return this.type==="color"?new t5(s,d):new ul(s,d)}}class Hd{constructor(s,d){this.uniformNames=d.map(m=>`u_${m}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(s,d){this.pixelRatioFrom=d.pixelRatio,this.pixelRatioTo=s.pixelRatio,this.patternFrom=d.tlbr,this.patternTo=s.tlbr}setUniform(s,d,m,_){const E=_==="u_pattern_to"?this.patternTo:_==="u_pattern_from"?this.patternFrom:_==="u_pixel_ratio_to"?this.pixelRatioTo:_==="u_pixel_ratio_from"?this.pixelRatioFrom:null;E&&s.set(E)}getBinding(s,d,m){return m.substr(0,9)==="u_pattern"?new Kd(s,d):new ul(s,d)}}class cl{constructor(s,d,m,_){this.expression=s,this.type=m,this.maxValue=0,this.paintVertexAttributes=d.map(E=>({name:`a_${E}`,type:"Float32",components:m==="color"?2:1,offset:0})),this.paintVertexArray=new _}populatePaintArray(s,d,m,_,E){const M=this.paintVertexArray.length,D=this.expression.evaluate(new Dn(0),d,{},_,[],E);this.paintVertexArray.resize(s),this._setPaintValue(M,s,D)}updatePaintArray(s,d,m,_){const E=this.expression.evaluate({zoom:0},m,_);this._setPaintValue(s,d,E)}_setPaintValue(s,d,m){if(this.type==="color"){const _=E_(m);for(let E=s;E<d;E++)this.paintVertexArray.emplace(E,_[0],_[1])}else{for(let _=s;_<d;_++)this.paintVertexArray.emplace(_,m);this.maxValue=Math.max(this.maxValue,Math.abs(m))}}upload(s){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=s.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class is{constructor(s,d,m,_,E,M){this.expression=s,this.uniformNames=d.map(D=>`u_${D}_t`),this.type=m,this.useIntegerZoom=_,this.zoom=E,this.maxValue=0,this.paintVertexAttributes=d.map(D=>({name:`a_${D}`,type:"Float32",components:m==="color"?4:2,offset:0})),this.paintVertexArray=new M}populatePaintArray(s,d,m,_,E){const M=this.expression.evaluate(new Dn(this.zoom),d,{},_,[],E),D=this.expression.evaluate(new Dn(this.zoom+1),d,{},_,[],E),F=this.paintVertexArray.length;this.paintVertexArray.resize(s),this._setPaintValue(F,s,M,D)}updatePaintArray(s,d,m,_){const E=this.expression.evaluate({zoom:this.zoom},m,_),M=this.expression.evaluate({zoom:this.zoom+1},m,_);this._setPaintValue(s,d,E,M)}_setPaintValue(s,d,m,_){if(this.type==="color"){const E=E_(m),M=E_(_);for(let D=s;D<d;D++)this.paintVertexArray.emplace(D,E[0],E[1],M[0],M[1])}else{for(let E=s;E<d;E++)this.paintVertexArray.emplace(E,m,_);this.maxValue=Math.max(this.maxValue,Math.abs(m),Math.abs(_))}}upload(s){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=s.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(s,d){const m=this.useIntegerZoom?Math.floor(d.zoom):d.zoom,_=w(this.expression.interpolationFactor(m,this.zoom,this.zoom+1),0,1);s.set(_)}getBinding(s,d,m){return new ul(s,d)}}class au{constructor(s,d,m,_,E,M){this.expression=s,this.type=d,this.useIntegerZoom=m,this.zoom=_,this.layerId=M,this.zoomInPaintVertexArray=new E,this.zoomOutPaintVertexArray=new E}populatePaintArray(s,d,m){const _=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(s),this.zoomOutPaintVertexArray.resize(s),this._setPaintValues(_,s,d.patterns&&d.patterns[this.layerId],m)}updatePaintArray(s,d,m,_,E){this._setPaintValues(s,d,m.patterns&&m.patterns[this.layerId],E)}_setPaintValues(s,d,m,_){if(!_||!m)return;const{min:E,mid:M,max:D}=m,F=_[E],U=_[M],X=_[D];if(F&&U&&X)for(let re=s;re<d;re++)this.zoomInPaintVertexArray.emplace(re,U.tl[0],U.tl[1],U.br[0],U.br[1],F.tl[0],F.tl[1],F.br[0],F.br[1],U.pixelRatio,F.pixelRatio),this.zoomOutPaintVertexArray.emplace(re,U.tl[0],U.tl[1],U.br[0],U.br[1],X.tl[0],X.tl[1],X.br[0],X.br[1],U.pixelRatio,X.pixelRatio)}upload(s){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=s.createVertexBuffer(this.zoomInPaintVertexArray,ki.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=s.createVertexBuffer(this.zoomOutPaintVertexArray,ki.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class r5{constructor(s,d,m){this.binders={},this._buffers=[];const _=[];for(const E in s.paint._values){if(!m(E))continue;const M=s.paint.get(E);if(!(M instanceof Ea&&Mn(M.property.specification)))continue;const D=IF(E,s.type),F=M.value,U=M.property.specification.type,X=M.property.useIntegerZoom,re=M.property.specification["property-type"],ue=re==="cross-faded"||re==="cross-faded-data-driven";if(F.kind==="constant")this.binders[E]=ue?new Hd(F.value,D):new dp(F.value,D,U),_.push(`/u_${E}`);else if(F.kind==="source"||ue){const he=n5(E,U,"source");this.binders[E]=ue?new au(F,U,X,d,he,s.id):new cl(F,D,U,he),_.push(`/a_${E}`)}else{const he=n5(E,U,"composite");this.binders[E]=new is(F,D,U,X,d,he),_.push(`/z_${E}`)}}this.cacheKey=_.sort().join("")}getMaxValue(s){const d=this.binders[s];return d instanceof cl||d instanceof is?d.maxValue:0}populatePaintArrays(s,d,m,_,E){for(const M in this.binders){const D=this.binders[M];(D instanceof cl||D instanceof is||D instanceof au)&&D.populatePaintArray(s,d,m,_,E)}}setConstantPatternPositions(s,d){for(const m in this.binders){const _=this.binders[m];_ instanceof Hd&&_.setConstantPatternPositions(s,d)}}updatePaintArrays(s,d,m,_,E){let M=!1;for(const D in s){const F=d.getPositions(D);for(const U of F){const X=m.feature(U.index);for(const re in this.binders){const ue=this.binders[re];if((ue instanceof cl||ue instanceof is||ue instanceof au)&&ue.expression.isStateDependent===!0){const he=_.paint.get(re);ue.expression=he.value,ue.updatePaintArray(U.start,U.end,X,s[D],E),M=!0}}}}return M}defines(){const s=[];for(const d in this.binders){const m=this.binders[d];(m instanceof dp||m instanceof Hd)&&s.push(...m.uniformNames.map(_=>`#define HAS_UNIFORM_${_}`))}return s}getBinderAttributes(){const s=[];for(const d in this.binders){const m=this.binders[d];if(m instanceof cl||m instanceof is)for(let _=0;_<m.paintVertexAttributes.length;_++)s.push(m.paintVertexAttributes[_].name);else if(m instanceof au)for(let _=0;_<ki.members.length;_++)s.push(ki.members[_].name)}return s}getBinderUniforms(){const s=[];for(const d in this.binders){const m=this.binders[d];if(m instanceof dp||m instanceof Hd||m instanceof is)for(const _ of m.uniformNames)s.push(_)}return s}getPaintVertexBuffers(){return this._buffers}getUniforms(s,d){const m=[];for(const _ in this.binders){const E=this.binders[_];if(E instanceof dp||E instanceof Hd||E instanceof is){for(const M of E.uniformNames)if(d[M]){const D=E.getBinding(s,d[M],M);m.push({name:M,property:_,binding:D})}}}return m}setUniforms(s,d,m,_){for(const{name:E,property:M,binding:D}of d)this.binders[M].setUniform(D,_,m.get(M),E)}updatePaintBuffers(s){this._buffers=[];for(const d in this.binders){const m=this.binders[d];if(s&&m instanceof au){const _=s.fromScale===2?m.zoomInPaintVertexBuffer:m.zoomOutPaintVertexBuffer;_&&this._buffers.push(_)}else(m instanceof cl||m instanceof is)&&m.paintVertexBuffer&&this._buffers.push(m.paintVertexBuffer)}}upload(s){for(const d in this.binders){const m=this.binders[d];(m instanceof cl||m instanceof is||m instanceof au)&&m.upload(s)}this.updatePaintBuffers()}destroy(){for(const s in this.binders){const d=this.binders[s];(d instanceof cl||d instanceof is||d instanceof au)&&d.destroy()}}}class Tc{constructor(s,d,m=()=>!0){this.programConfigurations={};for(const _ of s)this.programConfigurations[_.id]=new r5(_,d,m);this.needsUpload=!1,this._featureMap=new ou,this._bufferOffset=0}populatePaintArrays(s,d,m,_,E,M){for(const D in this.programConfigurations)this.programConfigurations[D].populatePaintArrays(s,d,_,E,M);d.id!==void 0&&this._featureMap.add(d.id,m,this._bufferOffset,s),this._bufferOffset=s,this.needsUpload=!0}updatePaintArrays(s,d,m,_){for(const E of m)this.needsUpload=this.programConfigurations[E.id].updatePaintArrays(s,this._featureMap,d,E,_)||this.needsUpload}get(s){return this.programConfigurations[s]}upload(s){if(this.needsUpload){for(const d in this.programConfigurations)this.programConfigurations[d].upload(s);this.needsUpload=!1}}destroy(){for(const s in this.programConfigurations)this.programConfigurations[s].destroy()}}function IF(c,s){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"]}[c]||[c.replace(`${s}-`,"").replace(/-/g,"_")]}function n5(c,s,d){const m={color:{source:g,composite:at},number:{source:we,composite:g}},_=function(E){return{"line-pattern":{source:Ei,composite:Ei},"fill-pattern":{source:Ei,composite:Ei},"fill-extrusion-pattern":{source:Ei,composite:Ei}}[E]}(c);return _&&_[d]||m[s][d]}dr("ConstantBinder",dp),dr("CrossFadedConstantBinder",Hd),dr("SourceExpressionBinder",cl),dr("CrossFadedCompositeBinder",au),dr("CompositeExpressionBinder",is),dr("ProgramConfiguration",r5,{omit:["_buffers"]}),dr("ProgramConfigurationSet",Tc);var xi=8192;const k_=Math.pow(2,14)-1,i5=-k_-1;function Pc(c){const s=xi/c.extent,d=c.loadGeometry();for(let m=0;m<d.length;m++){const _=d[m];for(let E=0;E<_.length;E++){const M=_[E],D=Math.round(M.x*s),F=Math.round(M.y*s);M.x=w(D,i5,k_),M.y=w(F,i5,k_),(D<M.x||D>M.x+1||F<M.y||F>M.y+1)&&B("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return d}function Mc(c,s){return{type:c.type,id:c.id,properties:c.properties,geometry:s?Pc(c):[]}}function Tg(c,s,d,m,_){c.emplaceBack(2*s+(m+1)/2,2*d+(_+1)/2)}class T_{constructor(s){this.zoom=s.zoom,this.overscaling=s.overscaling,this.layers=s.layers,this.layerIds=this.layers.map(d=>d.id),this.index=s.index,this.hasPattern=!1,this.layoutVertexArray=new hn,this.indexArray=new co,this.segments=new Hr,this.programConfigurations=new Tc(s.layers,s.zoom),this.stateDependentLayerIds=this.layers.filter(d=>d.isStateDependent()).map(d=>d.id)}populate(s,d,m){const _=this.layers[0],E=[];let M=null,D=!1;_.type==="circle"&&(M=_.layout.get("circle-sort-key"),D=!M.isConstant());for(const{feature:F,id:U,index:X,sourceLayerIndex:re}of s){const ue=this.layers[0]._featureFilter.needGeometry,he=Mc(F,ue);if(!this.layers[0]._featureFilter.filter(new Dn(this.zoom),he,m))continue;const pe=D?M.evaluate(he,{},m):void 0,Oe={id:U,properties:F.properties,type:F.type,sourceLayerIndex:re,index:X,geometry:ue?he.geometry:Pc(F),patterns:{},sortKey:pe};E.push(Oe)}D&&E.sort((F,U)=>F.sortKey-U.sortKey);for(const F of E){const{geometry:U,index:X,sourceLayerIndex:re}=F,ue=s[X].feature;this.addFeature(F,U,X,m),d.featureIndex.insert(ue,U,X,re,this.index)}}update(s,d,m){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(s,d,this.stateDependentLayers,m)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(s){this.uploaded||(this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,yi),this.indexBuffer=s.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(s),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(s,d,m,_){for(const E of d)for(const M of E){const D=M.x,F=M.y;if(D<0||D>=xi||F<0||F>=xi)continue;const U=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,s.sortKey),X=U.vertexLength;Tg(this.layoutVertexArray,D,F,-1,-1),Tg(this.layoutVertexArray,D,F,1,-1),Tg(this.layoutVertexArray,D,F,1,1),Tg(this.layoutVertexArray,D,F,-1,1),this.indexArray.emplaceBack(X,X+1,X+2),this.indexArray.emplaceBack(X,X+3,X+2),U.vertexLength+=4,U.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,s,m,{},_)}}function o5(c,s){for(let d=0;d<c.length;d++)if(Wd(s,c[d]))return!0;for(let d=0;d<s.length;d++)if(Wd(c,s[d]))return!0;return!!P_(c,s)}function RF(c,s,d){return!!Wd(c,s)||!!M_(s,c,d)}function a5(c,s){if(c.length===1)return l5(s,c[0]);for(let d=0;d<s.length;d++){const m=s[d];for(let _=0;_<m.length;_++)if(Wd(c,m[_]))return!0}for(let d=0;d<c.length;d++)if(l5(s,c[d]))return!0;for(let d=0;d<s.length;d++)if(P_(c,s[d]))return!0;return!1}function OF(c,s,d){if(c.length>1){if(P_(c,s))return!0;for(let m=0;m<s.length;m++)if(M_(s[m],c,d))return!0}for(let m=0;m<c.length;m++)if(M_(c[m],s,d))return!0;return!1}function P_(c,s){if(c.length===0||s.length===0)return!1;for(let d=0;d<c.length-1;d++){const m=c[d],_=c[d+1];for(let E=0;E<s.length-1;E++)if(AF(m,_,s[E],s[E+1]))return!0}return!1}function AF(c,s,d,m){return j(c,d,m)!==j(s,d,m)&&j(c,s,d)!==j(c,s,m)}function M_(c,s,d){const m=d*d;if(s.length===1)return c.distSqr(s[0])<m;for(let _=1;_<s.length;_++)if(s5(c,s[_-1],s[_])<m)return!0;return!1}function s5(c,s,d){const m=s.distSqr(d);if(m===0)return c.distSqr(s);const _=((c.x-s.x)*(d.x-s.x)+(c.y-s.y)*(d.y-s.y))/m;return c.distSqr(_<0?s:_>1?d:d.sub(s)._mult(_)._add(s))}function l5(c,s){let d,m,_,E=!1;for(let M=0;M<c.length;M++){d=c[M];for(let D=0,F=d.length-1;D<d.length;F=D++)m=d[D],_=d[F],m.y>s.y!=_.y>s.y&&s.x<(_.x-m.x)*(s.y-m.y)/(_.y-m.y)+m.x&&(E=!E)}return E}function Wd(c,s){let d=!1;for(let m=0,_=c.length-1;m<c.length;_=m++){const E=c[m],M=c[_];E.y>s.y!=M.y>s.y&&s.x<(M.x-E.x)*(s.y-E.y)/(M.y-E.y)+E.x&&(d=!d)}return d}function NF(c,s,d){const m=d[0],_=d[2];if(c.x<m.x&&s.x<m.x||c.x>_.x&&s.x>_.x||c.y<m.y&&s.y<m.y||c.y>_.y&&s.y>_.y)return!1;const E=j(c,s,d[0]);return E!==j(c,s,d[1])||E!==j(c,s,d[2])||E!==j(c,s,d[3])}function fp(c,s,d){const m=s.paint.get(c).value;return m.kind==="constant"?m.value:d.programConfigurations.get(s.id).getMaxValue(c)}function Pg(c){return Math.sqrt(c[0]*c[0]+c[1]*c[1])}function Mg(c,s,d,m,_){if(!s[0]&&!s[1])return c;const E=ne.convert(s)._mult(_);d==="viewport"&&E._rotate(-m);const M=[];for(let D=0;D<c.length;D++)M.push(c[D].sub(E));return M}dr("CircleBucket",T_,{omit:["layers"]});const zF=new Li({"circle-sort-key":new Er(Fe.layout_circle["circle-sort-key"])});var DF={paint:new Li({"circle-radius":new Er(Fe.paint_circle["circle-radius"]),"circle-color":new Er(Fe.paint_circle["circle-color"]),"circle-blur":new Er(Fe.paint_circle["circle-blur"]),"circle-opacity":new Er(Fe.paint_circle["circle-opacity"]),"circle-translate":new pr(Fe.paint_circle["circle-translate"]),"circle-translate-anchor":new pr(Fe.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new pr(Fe.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new pr(Fe.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Er(Fe.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Er(Fe.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Er(Fe.paint_circle["circle-stroke-opacity"])}),layout:zF},fo=1e-6,ho=typeof Float32Array<"u"?Float32Array:Array;function u5(){var c=new ho(9);return ho!=Float32Array&&(c[1]=0,c[2]=0,c[3]=0,c[5]=0,c[6]=0,c[7]=0),c[0]=1,c[4]=1,c[8]=1,c}function I_(c){return c[0]=1,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=1,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=1,c[11]=0,c[12]=0,c[13]=0,c[14]=0,c[15]=1,c}function c5(c,s,d){var m=s[0],_=s[1],E=s[2],M=s[3],D=s[4],F=s[5],U=s[6],X=s[7],re=s[8],ue=s[9],he=s[10],pe=s[11],Oe=s[12],Me=s[13],Ze=s[14],st=s[15],Ke=d[0],nt=d[1],kt=d[2],St=d[3];return c[0]=Ke*m+nt*D+kt*re+St*Oe,c[1]=Ke*_+nt*F+kt*ue+St*Me,c[2]=Ke*E+nt*U+kt*he+St*Ze,c[3]=Ke*M+nt*X+kt*pe+St*st,c[4]=(Ke=d[4])*m+(nt=d[5])*D+(kt=d[6])*re+(St=d[7])*Oe,c[5]=Ke*_+nt*F+kt*ue+St*Me,c[6]=Ke*E+nt*U+kt*he+St*Ze,c[7]=Ke*M+nt*X+kt*pe+St*st,c[8]=(Ke=d[8])*m+(nt=d[9])*D+(kt=d[10])*re+(St=d[11])*Oe,c[9]=Ke*_+nt*F+kt*ue+St*Me,c[10]=Ke*E+nt*U+kt*he+St*Ze,c[11]=Ke*M+nt*X+kt*pe+St*st,c[12]=(Ke=d[12])*m+(nt=d[13])*D+(kt=d[14])*re+(St=d[15])*Oe,c[13]=Ke*_+nt*F+kt*ue+St*Me,c[14]=Ke*E+nt*U+kt*he+St*Ze,c[15]=Ke*M+nt*X+kt*pe+St*st,c}Math.hypot||(Math.hypot=function(){for(var c=0,s=arguments.length;s--;)c+=arguments[s]*arguments[s];return Math.sqrt(c)});var hp,LF=c5;function d5(){var c=new ho(3);return ho!=Float32Array&&(c[0]=0,c[1]=0,c[2]=0),c}function f5(c,s,d){var m=new ho(3);return m[0]=c,m[1]=s,m[2]=d,m}function Ig(c,s,d){var m=s[0],_=s[1],E=s[2],M=s[3];return c[0]=d[0]*m+d[4]*_+d[8]*E+d[12]*M,c[1]=d[1]*m+d[5]*_+d[9]*E+d[13]*M,c[2]=d[2]*m+d[6]*_+d[10]*E+d[14]*M,c[3]=d[3]*m+d[7]*_+d[11]*E+d[15]*M,c}function h5(){var c=new ho(4);return ho!=Float32Array&&(c[0]=0,c[1]=0,c[2]=0),c[3]=1,c}function p5(c,s){const d=Ig([],[c.x,c.y,0,1],s);return new ne(d[0]/d[3],d[1]/d[3])}d5(),hp=new ho(4),ho!=Float32Array&&(hp[0]=0,hp[1]=0,hp[2]=0,hp[3]=0),d5(),f5(1,0,0),f5(0,1,0),h5(),h5(),u5(),function(){var c;c=new ho(2),ho!=Float32Array&&(c[0]=0,c[1]=0)}();class m5 extends T_{}dr("HeatmapBucket",m5,{omit:["layers"]});var FF={paint:new Li({"heatmap-radius":new Er(Fe.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Er(Fe.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new pr(Fe.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Ms(Fe.paint_heatmap["heatmap-color"]),"heatmap-opacity":new pr(Fe.paint_heatmap["heatmap-opacity"])})};function R_(c,{width:s,height:d},m,_){if(_){if(_ instanceof Uint8ClampedArray)_=new Uint8Array(_.buffer);else if(_.length!==s*d*m)throw new RangeError(`mismatched image size. expected: ${_.length} but got: ${s*d*m}`)}else _=new Uint8Array(s*d*m);return c.width=s,c.height=d,c.data=_,c}function v5(c,{width:s,height:d},m){if(s===c.width&&d===c.height)return;const _=R_({},{width:s,height:d},m);O_(c,_,{x:0,y:0},{x:0,y:0},{width:Math.min(c.width,s),height:Math.min(c.height,d)},m),c.width=s,c.height=d,c.data=_.data}function O_(c,s,d,m,_,E){if(_.width===0||_.height===0)return s;if(_.width>c.width||_.height>c.height||d.x>c.width-_.width||d.y>c.height-_.height)throw new RangeError("out of range source coordinates for image copy");if(_.width>s.width||_.height>s.height||m.x>s.width-_.width||m.y>s.height-_.height)throw new RangeError("out of range destination coordinates for image copy");const M=c.data,D=s.data;if(M===D)throw new Error("srcData equals dstData, so image is already copied");for(let F=0;F<_.height;F++){const U=((d.y+F)*c.width+d.x)*E,X=((m.y+F)*s.width+m.x)*E;for(let re=0;re<_.width*E;re++)D[X+re]=M[U+re]}return s}class pp{constructor(s,d){R_(this,s,1,d)}resize(s){v5(this,s,1)}clone(){return new pp({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(s,d,m,_,E){O_(s,d,m,_,E,1)}}class ia{constructor(s,d){R_(this,s,4,d)}resize(s){v5(this,s,4)}replace(s,d){d?this.data.set(s):this.data=s instanceof Uint8ClampedArray?new Uint8Array(s.buffer):s}clone(){return new ia({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(s,d,m,_,E){O_(s,d,m,_,E,4)}}function g5(c){const s={},d=c.resolution||256,m=c.clips?c.clips.length:1,_=c.image||new ia({width:d,height:m});if(Math.log(d)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${d}`);const E=(M,D,F)=>{s[c.evaluationKey]=F;const U=c.expression.evaluate(s);_.data[M+D+0]=Math.floor(255*U.r/U.a),_.data[M+D+1]=Math.floor(255*U.g/U.a),_.data[M+D+2]=Math.floor(255*U.b/U.a),_.data[M+D+3]=Math.floor(255*U.a)};if(c.clips)for(let M=0,D=0;M<m;++M,D+=4*d)for(let F=0,U=0;F<d;F++,U+=4){const X=F/(d-1),{start:re,end:ue}=c.clips[M];E(D,U,re*(1-X)+ue*X)}else for(let M=0,D=0;M<d;M++,D+=4)E(0,D,M/(d-1));return _}dr("AlphaImage",pp),dr("RGBAImage",ia);var $F={paint:new Li({"hillshade-illumination-direction":new pr(Fe.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new pr(Fe.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new pr(Fe.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new pr(Fe.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new pr(Fe.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new pr(Fe.paint_hillshade["hillshade-accent-color"])})};const BF=ci([{name:"a_pos",components:2,type:"Int16"}],4),{members:VF}=BF;var Rg={exports:{}};function Og(c,s,d){d=d||2;var m,_,E,M,D,F,U,X=s&&s.length,re=X?s[0]*d:c.length,ue=y5(c,0,re,d,!0),he=[];if(!ue||ue.next===ue.prev)return he;if(X&&(ue=function(Oe,Me,Ze,st){var Ke,nt,kt,St=[];for(Ke=0,nt=Me.length;Ke<nt;Ke++)(kt=y5(Oe,Me[Ke]*st,Ke<nt-1?Me[Ke+1]*st:Oe.length,st,!1))===kt.next&&(kt.steiner=!0),St.push(ZF(kt));for(St.sort(WF),Ke=0;Ke<St.length;Ke++)Ze=qF(St[Ke],Ze);return Ze}(c,s,ue,d)),c.length>80*d){m=E=c[0],_=M=c[1];for(var pe=d;pe<re;pe+=d)(D=c[pe])<m&&(m=D),(F=c[pe+1])<_&&(_=F),D>E&&(E=D),F>M&&(M=F);U=(U=Math.max(E-m,M-_))!==0?32767/U:0}return mp(ue,he,d,m,_,U,0),he}function y5(c,s,d,m,_){var E,M;if(_===z_(c,s,d,m)>0)for(E=s;E<d;E+=m)M=b5(E,c[E],c[E+1],M);else for(E=d-m;E>=s;E-=m)M=b5(E,c[E],c[E+1],M);return M&&Ag(M,M.next)&&(gp(M),M=M.next),M}function Ic(c,s){if(!c)return c;s||(s=c);var d,m=c;do if(d=!1,m.steiner||!Ag(m,m.next)&&ai(m.prev,m,m.next)!==0)m=m.next;else{if(gp(m),(m=s=m.prev)===m.next)break;d=!0}while(d||m!==s);return s}function mp(c,s,d,m,_,E,M){if(c){!M&&E&&function(X,re,ue,he){var pe=X;do pe.z===0&&(pe.z=A_(pe.x,pe.y,re,ue,he)),pe.prevZ=pe.prev,pe.nextZ=pe.next,pe=pe.next;while(pe!==X);pe.prevZ.nextZ=null,pe.prevZ=null,function(Oe){var Me,Ze,st,Ke,nt,kt,St,lr,hr=1;do{for(Ze=Oe,Oe=null,nt=null,kt=0;Ze;){for(kt++,st=Ze,St=0,Me=0;Me<hr&&(St++,st=st.nextZ);Me++);for(lr=hr;St>0||lr>0&&st;)St!==0&&(lr===0||!st||Ze.z<=st.z)?(Ke=Ze,Ze=Ze.nextZ,St--):(Ke=st,st=st.nextZ,lr--),nt?nt.nextZ=Ke:Oe=Ke,Ke.prevZ=nt,nt=Ke;Ze=st}nt.nextZ=null,hr*=2}while(kt>1)}(pe)}(c,m,_,E);for(var D,F,U=c;c.prev!==c.next;)if(D=c.prev,F=c.next,E?UF(c,m,_,E):jF(c))s.push(D.i/d|0),s.push(c.i/d|0),s.push(F.i/d|0),gp(c),c=F.next,U=F.next;else if((c=F)===U){M?M===1?mp(c=KF(Ic(c),s,d),s,d,m,_,E,2):M===2&&HF(c,s,d,m,_,E):mp(Ic(c),s,d,m,_,E,1);break}}}function jF(c){var s=c.prev,d=c,m=c.next;if(ai(s,d,m)>=0)return!1;for(var _=s.x,E=d.x,M=m.x,D=s.y,F=d.y,U=m.y,X=_<E?_<M?_:M:E<M?E:M,re=D<F?D<U?D:U:F<U?F:U,ue=_>E?_>M?_:M:E>M?E:M,he=D>F?D>U?D:U:F>U?F:U,pe=m.next;pe!==s;){if(pe.x>=X&&pe.x<=ue&&pe.y>=re&&pe.y<=he&&qd(_,D,E,F,M,U,pe.x,pe.y)&&ai(pe.prev,pe,pe.next)>=0)return!1;pe=pe.next}return!0}function UF(c,s,d,m){var _=c.prev,E=c,M=c.next;if(ai(_,E,M)>=0)return!1;for(var D=_.x,F=E.x,U=M.x,X=_.y,re=E.y,ue=M.y,he=D<F?D<U?D:U:F<U?F:U,pe=X<re?X<ue?X:ue:re<ue?re:ue,Oe=D>F?D>U?D:U:F>U?F:U,Me=X>re?X>ue?X:ue:re>ue?re:ue,Ze=A_(he,pe,s,d,m),st=A_(Oe,Me,s,d,m),Ke=c.prevZ,nt=c.nextZ;Ke&&Ke.z>=Ze&&nt&&nt.z<=st;){if(Ke.x>=he&&Ke.x<=Oe&&Ke.y>=pe&&Ke.y<=Me&&Ke!==_&&Ke!==M&&qd(D,X,F,re,U,ue,Ke.x,Ke.y)&&ai(Ke.prev,Ke,Ke.next)>=0||(Ke=Ke.prevZ,nt.x>=he&&nt.x<=Oe&&nt.y>=pe&&nt.y<=Me&&nt!==_&&nt!==M&&qd(D,X,F,re,U,ue,nt.x,nt.y)&&ai(nt.prev,nt,nt.next)>=0))return!1;nt=nt.nextZ}for(;Ke&&Ke.z>=Ze;){if(Ke.x>=he&&Ke.x<=Oe&&Ke.y>=pe&&Ke.y<=Me&&Ke!==_&&Ke!==M&&qd(D,X,F,re,U,ue,Ke.x,Ke.y)&&ai(Ke.prev,Ke,Ke.next)>=0)return!1;Ke=Ke.prevZ}for(;nt&&nt.z<=st;){if(nt.x>=he&&nt.x<=Oe&&nt.y>=pe&&nt.y<=Me&&nt!==_&&nt!==M&&qd(D,X,F,re,U,ue,nt.x,nt.y)&&ai(nt.prev,nt,nt.next)>=0)return!1;nt=nt.nextZ}return!0}function KF(c,s,d){var m=c;do{var _=m.prev,E=m.next.next;!Ag(_,E)&&x5(_,m,m.next,E)&&vp(_,E)&&vp(E,_)&&(s.push(_.i/d|0),s.push(m.i/d|0),s.push(E.i/d|0),gp(m),gp(m.next),m=c=E),m=m.next}while(m!==c);return Ic(m)}function HF(c,s,d,m,_,E){var M=c;do{for(var D=M.next.next;D!==M.prev;){if(M.i!==D.i&&XF(M,D)){var F=_5(M,D);return M=Ic(M,M.next),F=Ic(F,F.next),mp(M,s,d,m,_,E,0),void mp(F,s,d,m,_,E,0)}D=D.next}M=M.next}while(M!==c)}function WF(c,s){return c.x-s.x}function qF(c,s){var d=function(_,E){var M,D=E,F=_.x,U=_.y,X=-1/0;do{if(U<=D.y&&U>=D.next.y&&D.next.y!==D.y){var re=D.x+(U-D.y)*(D.next.x-D.x)/(D.next.y-D.y);if(re<=F&&re>X&&(X=re,M=D.x<D.next.x?D:D.next,re===F))return M}D=D.next}while(D!==E);if(!M)return null;var ue,he=M,pe=M.x,Oe=M.y,Me=1/0;D=M;do F>=D.x&&D.x>=pe&&F!==D.x&&qd(U<Oe?F:X,U,pe,Oe,U<Oe?X:F,U,D.x,D.y)&&(ue=Math.abs(U-D.y)/(F-D.x),vp(D,_)&&(ue<Me||ue===Me&&(D.x>M.x||D.x===M.x&&GF(M,D)))&&(M=D,Me=ue)),D=D.next;while(D!==he);return M}(c,s);if(!d)return s;var m=_5(d,c);return Ic(m,m.next),Ic(d,d.next)}function GF(c,s){return ai(c.prev,c,s.prev)<0&&ai(s.next,c,c.next)<0}function A_(c,s,d,m,_){return(c=1431655765&((c=858993459&((c=252645135&((c=16711935&((c=(c-d)*_|0)|c<<8))|c<<4))|c<<2))|c<<1))|(s=1431655765&((s=858993459&((s=252645135&((s=16711935&((s=(s-m)*_|0)|s<<8))|s<<4))|s<<2))|s<<1))<<1}function ZF(c){var s=c,d=c;do(s.x<d.x||s.x===d.x&&s.y<d.y)&&(d=s),s=s.next;while(s!==c);return d}function qd(c,s,d,m,_,E,M,D){return(_-M)*(s-D)>=(c-M)*(E-D)&&(c-M)*(m-D)>=(d-M)*(s-D)&&(d-M)*(E-D)>=(_-M)*(m-D)}function XF(c,s){return c.next.i!==s.i&&c.prev.i!==s.i&&!function(d,m){var _=d;do{if(_.i!==d.i&&_.next.i!==d.i&&_.i!==m.i&&_.next.i!==m.i&&x5(_,_.next,d,m))return!0;_=_.next}while(_!==d);return!1}(c,s)&&(vp(c,s)&&vp(s,c)&&function(d,m){var _=d,E=!1,M=(d.x+m.x)/2,D=(d.y+m.y)/2;do _.y>D!=_.next.y>D&&_.next.y!==_.y&&M<(_.next.x-_.x)*(D-_.y)/(_.next.y-_.y)+_.x&&(E=!E),_=_.next;while(_!==d);return E}(c,s)&&(ai(c.prev,c,s.prev)||ai(c,s.prev,s))||Ag(c,s)&&ai(c.prev,c,c.next)>0&&ai(s.prev,s,s.next)>0)}function ai(c,s,d){return(s.y-c.y)*(d.x-s.x)-(s.x-c.x)*(d.y-s.y)}function Ag(c,s){return c.x===s.x&&c.y===s.y}function x5(c,s,d,m){var _=zg(ai(c,s,d)),E=zg(ai(c,s,m)),M=zg(ai(d,m,c)),D=zg(ai(d,m,s));return _!==E&&M!==D||!(_!==0||!Ng(c,d,s))||!(E!==0||!Ng(c,m,s))||!(M!==0||!Ng(d,c,m))||!(D!==0||!Ng(d,s,m))}function Ng(c,s,d){return s.x<=Math.max(c.x,d.x)&&s.x>=Math.min(c.x,d.x)&&s.y<=Math.max(c.y,d.y)&&s.y>=Math.min(c.y,d.y)}function zg(c){return c>0?1:c<0?-1:0}function vp(c,s){return ai(c.prev,c,c.next)<0?ai(c,s,c.next)>=0&&ai(c,c.prev,s)>=0:ai(c,s,c.prev)<0||ai(c,c.next,s)<0}function _5(c,s){var d=new N_(c.i,c.x,c.y),m=new N_(s.i,s.x,s.y),_=c.next,E=s.prev;return c.next=s,s.prev=c,d.next=_,_.prev=d,m.next=d,d.prev=m,E.next=m,m.prev=E,m}function b5(c,s,d,m){var _=new N_(c,s,d);return m?(_.next=m.next,_.prev=m,m.next.prev=_,m.next=_):(_.prev=_,_.next=_),_}function gp(c){c.next.prev=c.prev,c.prev.next=c.next,c.prevZ&&(c.prevZ.nextZ=c.nextZ),c.nextZ&&(c.nextZ.prevZ=c.prevZ)}function N_(c,s,d){this.i=c,this.x=s,this.y=d,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function z_(c,s,d,m){for(var _=0,E=s,M=d-m;E<d;E+=m)_+=(c[M]-c[E])*(c[E+1]+c[M+1]),M=E;return _}function YF(c,s,d,m,_){w5(c,s,d||0,m||c.length-1,_||QF)}function w5(c,s,d,m,_){for(;m>d;){if(m-d>600){var E=m-d+1,M=s-d+1,D=Math.log(E),F=.5*Math.exp(2*D/3),U=.5*Math.sqrt(D*F*(E-F)/E)*(M-E/2<0?-1:1);w5(c,s,Math.max(d,Math.floor(s-M*F/E+U)),Math.min(m,Math.floor(s+(E-M)*F/E+U)),_)}var X=c[s],re=d,ue=m;for(yp(c,d,s),_(c[m],X)>0&&yp(c,d,m);re<ue;){for(yp(c,re,ue),re++,ue--;_(c[re],X)<0;)re++;for(;_(c[ue],X)>0;)ue--}_(c[d],X)===0?yp(c,d,ue):yp(c,++ue,m),ue<=s&&(d=ue+1),s<=ue&&(m=ue-1)}}function yp(c,s,d){var m=c[s];c[s]=c[d],c[d]=m}function QF(c,s){return c<s?-1:c>s?1:0}function D_(c,s){const d=c.length;if(d<=1)return[c];const m=[];let _,E;for(let M=0;M<d;M++){const D=G(c[M]);D!==0&&(c[M].area=Math.abs(D),E===void 0&&(E=D<0),E===D<0?(_&&m.push(_),_=[c[M]]):_.push(c[M]))}if(_&&m.push(_),s>1)for(let M=0;M<m.length;M++)m[M].length<=s||(YF(m[M],s,1,m[M].length-1,JF),m[M]=m[M].slice(0,s));return m}function JF(c,s){return s.area-c.area}function L_(c,s,d){const m=d.patternDependencies;let _=!1;for(const E of s){const M=E.paint.get(`${c}-pattern`);M.isConstant()||(_=!0);const D=M.constantOr(null);D&&(_=!0,m[D.to]=!0,m[D.from]=!0)}return _}function F_(c,s,d,m,_){const E=_.patternDependencies;for(const M of s){const D=M.paint.get(`${c}-pattern`).value;if(D.kind!=="constant"){let F=D.evaluate({zoom:m-1},d,{},_.availableImages),U=D.evaluate({zoom:m},d,{},_.availableImages),X=D.evaluate({zoom:m+1},d,{},_.availableImages);F=F&&F.name?F.name:F,U=U&&U.name?U.name:U,X=X&&X.name?X.name:X,E[F]=!0,E[U]=!0,E[X]=!0,d.patterns[M.id]={min:F,mid:U,max:X}}}return d}Rg.exports=Og,Rg.exports.default=Og,Og.deviation=function(c,s,d,m){var _=s&&s.length,E=Math.abs(z_(c,0,_?s[0]*d:c.length,d));if(_)for(var M=0,D=s.length;M<D;M++)E-=Math.abs(z_(c,s[M]*d,M<D-1?s[M+1]*d:c.length,d));var F=0;for(M=0;M<m.length;M+=3){var U=m[M]*d,X=m[M+1]*d,re=m[M+2]*d;F+=Math.abs((c[U]-c[re])*(c[X+1]-c[U+1])-(c[U]-c[X])*(c[re+1]-c[U+1]))}return E===0&&F===0?0:Math.abs((F-E)/E)},Og.flatten=function(c){for(var s=c[0][0].length,d={vertices:[],holes:[],dimensions:s},m=0,_=0;_<c.length;_++){for(var E=0;E<c[_].length;E++)for(var M=0;M<s;M++)d.vertices.push(c[_][E][M]);_>0&&d.holes.push(m+=c[_-1].length)}return d};class $_{constructor(s){this.zoom=s.zoom,this.overscaling=s.overscaling,this.layers=s.layers,this.layerIds=this.layers.map(d=>d.id),this.index=s.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new pn,this.indexArray=new co,this.indexArray2=new ns,this.programConfigurations=new Tc(s.layers,s.zoom),this.segments=new Hr,this.segments2=new Hr,this.stateDependentLayerIds=this.layers.filter(d=>d.isStateDependent()).map(d=>d.id)}populate(s,d,m){this.hasPattern=L_("fill",this.layers,d);const _=this.layers[0].layout.get("fill-sort-key"),E=!_.isConstant(),M=[];for(const{feature:D,id:F,index:U,sourceLayerIndex:X}of s){const re=this.layers[0]._featureFilter.needGeometry,ue=Mc(D,re);if(!this.layers[0]._featureFilter.filter(new Dn(this.zoom),ue,m))continue;const he=E?_.evaluate(ue,{},m,d.availableImages):void 0,pe={id:F,properties:D.properties,type:D.type,sourceLayerIndex:X,index:U,geometry:re?ue.geometry:Pc(D),patterns:{},sortKey:he};M.push(pe)}E&&M.sort((D,F)=>D.sortKey-F.sortKey);for(const D of M){const{geometry:F,index:U,sourceLayerIndex:X}=D;if(this.hasPattern){const re=F_("fill",this.layers,D,this.zoom,d);this.patternFeatures.push(re)}else this.addFeature(D,F,U,m,{});d.featureIndex.insert(s[U].feature,F,U,X,this.index)}}update(s,d,m){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(s,d,this.stateDependentLayers,m)}addFeatures(s,d,m){for(const _ of this.patternFeatures)this.addFeature(_,_.geometry,_.index,d,m)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(s){this.uploaded||(this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,VF),this.indexBuffer=s.createIndexBuffer(this.indexArray),this.indexBuffer2=s.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(s),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(s,d,m,_,E){for(const M of D_(d,500)){let D=0;for(const he of M)D+=he.length;const F=this.segments.prepareSegment(D,this.layoutVertexArray,this.indexArray),U=F.vertexLength,X=[],re=[];for(const he of M){if(he.length===0)continue;he!==M[0]&&re.push(X.length/2);const pe=this.segments2.prepareSegment(he.length,this.layoutVertexArray,this.indexArray2),Oe=pe.vertexLength;this.layoutVertexArray.emplaceBack(he[0].x,he[0].y),this.indexArray2.emplaceBack(Oe+he.length-1,Oe),X.push(he[0].x),X.push(he[0].y);for(let Me=1;Me<he.length;Me++)this.layoutVertexArray.emplaceBack(he[Me].x,he[Me].y),this.indexArray2.emplaceBack(Oe+Me-1,Oe+Me),X.push(he[Me].x),X.push(he[Me].y);pe.vertexLength+=he.length,pe.primitiveLength+=he.length}const ue=Rg.exports(X,re);for(let he=0;he<ue.length;he+=3)this.indexArray.emplaceBack(U+ue[he],U+ue[he+1],U+ue[he+2]);F.vertexLength+=D,F.primitiveLength+=ue.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,s,m,E,_)}}dr("FillBucket",$_,{omit:["layers","patternFeatures"]});const e$=new Li({"fill-sort-key":new Er(Fe.layout_fill["fill-sort-key"])});var t$={paint:new Li({"fill-antialias":new pr(Fe.paint_fill["fill-antialias"]),"fill-opacity":new Er(Fe.paint_fill["fill-opacity"]),"fill-color":new Er(Fe.paint_fill["fill-color"]),"fill-outline-color":new Er(Fe.paint_fill["fill-outline-color"]),"fill-translate":new pr(Fe.paint_fill["fill-translate"]),"fill-translate-anchor":new pr(Fe.paint_fill["fill-translate-anchor"]),"fill-pattern":new iu(Fe.paint_fill["fill-pattern"])}),layout:e$};const r$=ci([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),n$=ci([{name:"a_centroid",components:2,type:"Int16"}],4),{members:i$}=r$;var su={},o$=ne,C5=Gd;function Gd(c,s,d,m,_){this.properties={},this.extent=d,this.type=0,this._pbf=c,this._geometry=-1,this._keys=m,this._values=_,c.readFields(a$,this,s)}function a$(c,s,d){c==1?s.id=d.readVarint():c==2?function(m,_){for(var E=m.readVarint()+m.pos;m.pos<E;){var M=_._keys[m.readVarint()],D=_._values[m.readVarint()];_.properties[M]=D}}(d,s):c==3?s.type=d.readVarint():c==4&&(s._geometry=d.pos)}function s$(c){for(var s,d,m=0,_=0,E=c.length,M=E-1;_<E;M=_++)m+=((d=c[M]).x-(s=c[_]).x)*(s.y+d.y);return m}Gd.types=["Unknown","Point","LineString","Polygon"],Gd.prototype.loadGeometry=function(){var c=this._pbf;c.pos=this._geometry;for(var s,d=c.readVarint()+c.pos,m=1,_=0,E=0,M=0,D=[];c.pos<d;){if(_<=0){var F=c.readVarint();m=7&F,_=F>>3}if(_--,m===1||m===2)E+=c.readSVarint(),M+=c.readSVarint(),m===1&&(s&&D.push(s),s=[]),s.push(new o$(E,M));else{if(m!==7)throw new Error("unknown command "+m);s&&s.push(s[0].clone())}}return s&&D.push(s),D},Gd.prototype.bbox=function(){var c=this._pbf;c.pos=this._geometry;for(var s=c.readVarint()+c.pos,d=1,m=0,_=0,E=0,M=1/0,D=-1/0,F=1/0,U=-1/0;c.pos<s;){if(m<=0){var X=c.readVarint();d=7&X,m=X>>3}if(m--,d===1||d===2)(_+=c.readSVarint())<M&&(M=_),_>D&&(D=_),(E+=c.readSVarint())<F&&(F=E),E>U&&(U=E);else if(d!==7)throw new Error("unknown command "+d)}return[M,F,D,U]},Gd.prototype.toGeoJSON=function(c,s,d){var m,_,E=this.extent*Math.pow(2,d),M=this.extent*c,D=this.extent*s,F=this.loadGeometry(),U=Gd.types[this.type];function X(he){for(var pe=0;pe<he.length;pe++){var Oe=he[pe];he[pe]=[360*(Oe.x+M)/E-180,360/Math.PI*Math.atan(Math.exp((180-360*(Oe.y+D)/E)*Math.PI/180))-90]}}switch(this.type){case 1:var re=[];for(m=0;m<F.length;m++)re[m]=F[m][0];X(F=re);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 Oe,Me,Ze=[],st=0;st<pe;st++){var Ke=s$(he[st]);Ke!==0&&(Me===void 0&&(Me=Ke<0),Me===Ke<0?(Oe&&Ze.push(Oe),Oe=[he[st]]):Oe.push(he[st]))}return Oe&&Ze.push(Oe),Ze}(F),m=0;m<F.length;m++)for(_=0;_<F[m].length;_++)X(F[m][_])}F.length===1?F=F[0]:U="Multi"+U;var ue={type:"Feature",geometry:{type:U,coordinates:F},properties:this.properties};return"id"in this&&(ue.id=this.id),ue};var l$=C5,S5=E5;function E5(c,s){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=c,this._keys=[],this._values=[],this._features=[],c.readFields(u$,this,s),this.length=this._features.length}function u$(c,s,d){c===15?s.version=d.readVarint():c===1?s.name=d.readString():c===5?s.extent=d.readVarint():c===2?s._features.push(d.pos):c===3?s._keys.push(d.readString()):c===4&&s._values.push(function(m){for(var _=null,E=m.readVarint()+m.pos;m.pos<E;){var M=m.readVarint()>>3;_=M===1?m.readString():M===2?m.readFloat():M===3?m.readDouble():M===4?m.readVarint64():M===5?m.readVarint():M===6?m.readSVarint():M===7?m.readBoolean():null}return _}(d))}E5.prototype.feature=function(c){if(c<0||c>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[c];var s=this._pbf.readVarint()+this._pbf.pos;return new l$(this._pbf,s,this.extent,this._keys,this._values)};var c$=S5;function d$(c,s,d){if(c===3){var m=new c$(d,d.readVarint()+d.pos);m.length&&(s[m.name]=m)}}su.VectorTile=function(c,s){this.layers=c.readFields(d$,{},s)},su.VectorTileFeature=C5,su.VectorTileLayer=S5;const f$=su.VectorTileFeature.types,B_=Math.pow(2,13);function xp(c,s,d,m,_,E,M,D){c.emplaceBack(s,d,2*Math.floor(m*B_)+M,_*B_*2,E*B_*2,Math.round(D))}class V_{constructor(s){this.zoom=s.zoom,this.overscaling=s.overscaling,this.layers=s.layers,this.layerIds=this.layers.map(d=>d.id),this.index=s.index,this.hasPattern=!1,this.layoutVertexArray=new Qr,this.centroidVertexArray=new _r,this.indexArray=new co,this.programConfigurations=new Tc(s.layers,s.zoom),this.segments=new Hr,this.stateDependentLayerIds=this.layers.filter(d=>d.isStateDependent()).map(d=>d.id)}populate(s,d,m){this.features=[],this.hasPattern=L_("fill-extrusion",this.layers,d);for(const{feature:_,id:E,index:M,sourceLayerIndex:D}of s){const F=this.layers[0]._featureFilter.needGeometry,U=Mc(_,F);if(!this.layers[0]._featureFilter.filter(new Dn(this.zoom),U,m))continue;const X={id:E,sourceLayerIndex:D,index:M,geometry:F?U.geometry:Pc(_),properties:_.properties,type:_.type,patterns:{}};this.hasPattern?this.features.push(F_("fill-extrusion",this.layers,X,this.zoom,d)):this.addFeature(X,X.geometry,M,m,{}),d.featureIndex.insert(_,X.geometry,M,D,this.index,!0)}}addFeatures(s,d,m){for(const _ of this.features){const{geometry:E}=_;this.addFeature(_,E,_.index,d,m)}}update(s,d,m){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(s,d,this.stateDependentLayers,m)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(s){this.uploaded||(this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,i$),this.centroidVertexBuffer=s.createVertexBuffer(this.centroidVertexArray,n$.members,!0),this.indexBuffer=s.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(s),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(s,d,m,_,E){const M={x:0,y:0,vertexCount:0};for(const D of D_(d,500)){let F=0;for(const pe of D)F+=pe.length;let U=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const pe of D){if(pe.length===0||p$(pe))continue;let Oe=0;for(let Me=0;Me<pe.length;Me++){const Ze=pe[Me];if(Me>=1){const st=pe[Me-1];if(!h$(Ze,st)){U.vertexLength+4>Hr.MAX_VERTEX_ARRAY_LENGTH&&(U=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const Ke=Ze.sub(st)._perp()._unit(),nt=st.dist(Ze);Oe+nt>32768&&(Oe=0),xp(this.layoutVertexArray,Ze.x,Ze.y,Ke.x,Ke.y,0,0,Oe),xp(this.layoutVertexArray,Ze.x,Ze.y,Ke.x,Ke.y,0,1,Oe),M.x+=2*Ze.x,M.y+=2*Ze.y,M.vertexCount+=2,Oe+=nt,xp(this.layoutVertexArray,st.x,st.y,Ke.x,Ke.y,0,0,Oe),xp(this.layoutVertexArray,st.x,st.y,Ke.x,Ke.y,0,1,Oe),M.x+=2*st.x,M.y+=2*st.y,M.vertexCount+=2;const kt=U.vertexLength;this.indexArray.emplaceBack(kt,kt+2,kt+1),this.indexArray.emplaceBack(kt+1,kt+2,kt+3),U.vertexLength+=4,U.primitiveLength+=2}}}}if(U.vertexLength+F>Hr.MAX_VERTEX_ARRAY_LENGTH&&(U=this.segments.prepareSegment(F,this.layoutVertexArray,this.indexArray)),f$[s.type]!=="Polygon")continue;const X=[],re=[],ue=U.vertexLength;for(const pe of D)if(pe.length!==0){pe!==D[0]&&re.push(X.length/2);for(let Oe=0;Oe<pe.length;Oe++){const Me=pe[Oe];xp(this.layoutVertexArray,Me.x,Me.y,0,0,1,1,0),M.x+=Me.x,M.y+=Me.y,M.vertexCount+=1,X.push(Me.x),X.push(Me.y)}}const he=Rg.exports(X,re);for(let pe=0;pe<he.length;pe+=3)this.indexArray.emplaceBack(ue+he[pe],ue+he[pe+2],ue+he[pe+1]);U.primitiveLength+=he.length/3,U.vertexLength+=F}for(let D=0;D<M.vertexCount;D++)this.centroidVertexArray.emplaceBack(Math.floor(M.x/M.vertexCount),Math.floor(M.y/M.vertexCount));this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,s,m,E,_)}}function h$(c,s){return c.x===s.x&&(c.x<0||c.x>xi)||c.y===s.y&&(c.y<0||c.y>xi)}function p$(c){return c.every(s=>s.x<0)||c.every(s=>s.x>xi)||c.every(s=>s.y<0)||c.every(s=>s.y>xi)}dr("FillExtrusionBucket",V_,{omit:["layers","features"]});var m$={paint:new Li({"fill-extrusion-opacity":new pr(Fe["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Er(Fe["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new pr(Fe["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new pr(Fe["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new iu(Fe["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Er(Fe["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Er(Fe["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new pr(Fe["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})};function _p(c,s){return c.x*s.x+c.y*s.y}function k5(c,s){if(c.length===1){let d=0;const m=s[d++];let _;for(;!_||m.equals(_);)if(_=s[d++],!_)return 1/0;for(;d<s.length;d++){const E=s[d],M=c[0],D=_.sub(m),F=E.sub(m),U=M.sub(m),X=_p(D,D),re=_p(D,F),ue=_p(F,F),he=_p(U,D),pe=_p(U,F),Oe=X*ue-re*re,Me=(ue*he-re*pe)/Oe,Ze=(X*pe-re*he)/Oe,st=m.z*(1-Me-Ze)+_.z*Me+E.z*Ze;if(isFinite(st))return st}return 1/0}{let d=1/0;for(const m of s)d=Math.min(d,m.z);return d}}const v$=ci([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:g$}=v$,y$=ci([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:x$}=y$,_$=su.VectorTileFeature.types,b$=Math.cos(Math.PI/180*37.5),T5=Math.pow(2,14)/.5;class j_{constructor(s){this.zoom=s.zoom,this.overscaling=s.overscaling,this.layers=s.layers,this.layerIds=this.layers.map(d=>d.id),this.index=s.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(d=>{this.gradients[d.id]={}}),this.layoutVertexArray=new en,this.layoutVertexArray2=new gn,this.indexArray=new co,this.programConfigurations=new Tc(s.layers,s.zoom),this.segments=new Hr,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(d=>d.isStateDependent()).map(d=>d.id)}populate(s,d,m){this.hasPattern=L_("line",this.layers,d);const _=this.layers[0].layout.get("line-sort-key"),E=!_.isConstant(),M=[];for(const{feature:D,id:F,index:U,sourceLayerIndex:X}of s){const re=this.layers[0]._featureFilter.needGeometry,ue=Mc(D,re);if(!this.layers[0]._featureFilter.filter(new Dn(this.zoom),ue,m))continue;const he=E?_.evaluate(ue,{},m):void 0,pe={id:F,properties:D.properties,type:D.type,sourceLayerIndex:X,index:U,geometry:re?ue.geometry:Pc(D),patterns:{},sortKey:he};M.push(pe)}E&&M.sort((D,F)=>D.sortKey-F.sortKey);for(const D of M){const{geometry:F,index:U,sourceLayerIndex:X}=D;if(this.hasPattern){const re=F_("line",this.layers,D,this.zoom,d);this.patternFeatures.push(re)}else this.addFeature(D,F,U,m,{});d.featureIndex.insert(s[U].feature,F,U,X,this.index)}}update(s,d,m){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(s,d,this.stateDependentLayers,m)}addFeatures(s,d,m){for(const _ of this.patternFeatures)this.addFeature(_,_.geometry,_.index,d,m)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(s){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=s.createVertexBuffer(this.layoutVertexArray2,x$)),this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,g$),this.indexBuffer=s.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(s),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(s){if(s.properties&&Object.prototype.hasOwnProperty.call(s.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(s.properties,"mapbox_clip_end"))return{start:+s.properties.mapbox_clip_start,end:+s.properties.mapbox_clip_end}}addFeature(s,d,m,_,E){const M=this.layers[0].layout,D=M.get("line-join").evaluate(s,{}),F=M.get("line-cap"),U=M.get("line-miter-limit"),X=M.get("line-round-limit");this.lineClips=this.lineFeatureClips(s);for(const re of d)this.addLine(re,s,D,F,U,X);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,s,m,E,_)}addLine(s,d,m,_,E,M){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let Ze=0;Ze<s.length-1;Ze++)this.totalDistance+=s[Ze].dist(s[Ze+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const D=_$[d.type]==="Polygon";let F=s.length;for(;F>=2&&s[F-1].equals(s[F-2]);)F--;let U=0;for(;U<F-1&&s[U].equals(s[U+1]);)U++;if(F<(D?3:2))return;m==="bevel"&&(E=1.05);const X=this.overscaling<=16?122880/(512*this.overscaling):0,re=this.segments.prepareSegment(10*F,this.layoutVertexArray,this.indexArray);let ue,he,pe,Oe,Me;this.e1=this.e2=-1,D&&(ue=s[F-2],Me=s[U].sub(ue)._unit()._perp());for(let Ze=U;Ze<F;Ze++){if(pe=Ze===F-1?D?s[U+1]:void 0:s[Ze+1],pe&&s[Ze].equals(pe))continue;Me&&(Oe=Me),ue&&(he=ue),ue=s[Ze],Me=pe?pe.sub(ue)._unit()._perp():Oe,Oe=Oe||Me;let st=Oe.add(Me);st.x===0&&st.y===0||st._unit();const Ke=Oe.x*Me.x+Oe.y*Me.y,nt=st.x*Me.x+st.y*Me.y,kt=nt!==0?1/nt:1/0,St=2*Math.sqrt(2-2*nt),lr=nt<b$&&he&&pe,hr=Oe.x*Me.y-Oe.y*Me.x>0;if(lr&&Ze>U){const Ht=ue.dist(he);if(Ht>2*X){const tr=ue.sub(ue.sub(he)._mult(X/Ht)._round());this.updateDistance(he,tr),this.addCurrentVertex(tr,Oe,0,0,re),he=tr}}const er=he&&pe;let Zt=er?m:D?"butt":_;if(er&&Zt==="round"&&(kt<M?Zt="miter":kt<=2&&(Zt="fakeround")),Zt==="miter"&&kt>E&&(Zt="bevel"),Zt==="bevel"&&(kt>2&&(Zt="flipbevel"),kt<E&&(Zt="miter")),he&&this.updateDistance(he,ue),Zt==="miter")st._mult(kt),this.addCurrentVertex(ue,st,0,0,re);else if(Zt==="flipbevel"){if(kt>100)st=Me.mult(-1);else{const Ht=kt*Oe.add(Me).mag()/Oe.sub(Me).mag();st._perp()._mult(Ht*(hr?-1:1))}this.addCurrentVertex(ue,st,0,0,re),this.addCurrentVertex(ue,st.mult(-1),0,0,re)}else if(Zt==="bevel"||Zt==="fakeround"){const Ht=-Math.sqrt(kt*kt-1),tr=hr?Ht:0,Yt=hr?0:Ht;if(he&&this.addCurrentVertex(ue,Oe,tr,Yt,re),Zt==="fakeround"){const Ft=Math.round(180*St/Math.PI/20);for(let br=1;br<Ft;br++){let mr=br/Ft;if(mr!==.5){const In=mr-.5;mr+=mr*In*(mr-1)*((1.0904+Ke*(Ke*(3.55645-1.43519*Ke)-3.2452))*In*In+(.848013+Ke*(.215638*Ke-1.06021)))}const jr=Me.sub(Oe)._mult(mr)._add(Oe)._unit()._mult(hr?-1:1);this.addHalfVertex(ue,jr.x,jr.y,!1,hr,0,re)}}pe&&this.addCurrentVertex(ue,Me,-tr,-Yt,re)}else if(Zt==="butt")this.addCurrentVertex(ue,st,0,0,re);else if(Zt==="square"){const Ht=he?1:-1;this.addCurrentVertex(ue,st,Ht,Ht,re)}else Zt==="round"&&(he&&(this.addCurrentVertex(ue,Oe,0,0,re),this.addCurrentVertex(ue,Oe,1,1,re,!0)),pe&&(this.addCurrentVertex(ue,Me,-1,-1,re,!0),this.addCurrentVertex(ue,Me,0,0,re)));if(lr&&Ze<F-1){const Ht=ue.dist(pe);if(Ht>2*X){const tr=ue.add(pe.sub(ue)._mult(X/Ht)._round());this.updateDistance(ue,tr),this.addCurrentVertex(tr,Me,0,0,re),ue=tr}}}}addCurrentVertex(s,d,m,_,E,M=!1){const D=d.y*_-d.x,F=-d.y-d.x*_;this.addHalfVertex(s,d.x+d.y*m,d.y-d.x*m,M,!1,m,E),this.addHalfVertex(s,D,F,M,!0,-_,E),this.distance>T5/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(s,d,m,_,E,M))}addHalfVertex({x:s,y:d},m,_,E,M,D,F){const U=.5*(this.lineClips?this.scaledDistance*(T5-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((s<<1)+(E?1:0),(d<<1)+(M?1:0),Math.round(63*m)+128,Math.round(63*_)+128,1+(D===0?0:D<0?-1:1)|(63&U)<<2,U>>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++),M?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(s,d){this.distance+=s.dist(d),this.updateScaledDistance()}}dr("LineBucket",j_,{omit:["layers","patternFeatures"]});const w$=new Li({"line-cap":new pr(Fe.layout_line["line-cap"]),"line-join":new Er(Fe.layout_line["line-join"]),"line-miter-limit":new pr(Fe.layout_line["line-miter-limit"]),"line-round-limit":new pr(Fe.layout_line["line-round-limit"]),"line-sort-key":new Er(Fe.layout_line["line-sort-key"])});var P5={paint:new Li({"line-opacity":new Er(Fe.paint_line["line-opacity"]),"line-color":new Er(Fe.paint_line["line-color"]),"line-translate":new pr(Fe.paint_line["line-translate"]),"line-translate-anchor":new pr(Fe.paint_line["line-translate-anchor"]),"line-width":new Er(Fe.paint_line["line-width"]),"line-gap-width":new Er(Fe.paint_line["line-gap-width"]),"line-offset":new Er(Fe.paint_line["line-offset"]),"line-blur":new Er(Fe.paint_line["line-blur"]),"line-dasharray":new sp(Fe.paint_line["line-dasharray"]),"line-pattern":new iu(Fe.paint_line["line-pattern"]),"line-gradient":new Ms(Fe.paint_line["line-gradient"])}),layout:w$};const M5=new class extends Er{possiblyEvaluate(c,s){return s=new Dn(Math.floor(s.zoom),{now:s.now,fadeDuration:s.fadeDuration,zoomHistory:s.zoomHistory,transition:s.transition}),super.possiblyEvaluate(c,s)}evaluate(c,s,d,m){return s=T({},s,{zoom:Math.floor(s.zoom)}),super.evaluate(c,s,d,m)}}(P5.paint.properties["line-width"].specification);function I5(c,s){return s>0?s+2*c:c}M5.useIntegerZoom=!0;const C$=ci([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),S$=ci([{name:"a_projected_pos",components:3,type:"Float32"}],4);ci([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const E$=ci([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);ci([{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 R5=ci([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),k$=ci([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function T$(c,s,d){return c.sections.forEach(m=>{m.text=function(_,E,M){const D=E.layout.get("text-transform").evaluate(M,{});return D==="uppercase"?_=_.toLocaleUpperCase():D==="lowercase"&&(_=_.toLocaleLowerCase()),jo.applyArabicShaping&&(_=jo.applyArabicShaping(_)),_}(m.text,s,d)}),c}ci([{name:"triangle",components:3,type:"Uint16"}]),ci([{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"}]),ci([{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"}]),ci([{type:"Float32",name:"offsetX"}]),ci([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);const bp={"!":"\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 Fi=24,U_=_n,O5=function(c,s,d,m,_){var E,M,D=8*_-m-1,F=(1<<D)-1,U=F>>1,X=-7,re=d?_-1:0,ue=d?-1:1,he=c[s+re];for(re+=ue,E=he&(1<<-X)-1,he>>=-X,X+=D;X>0;E=256*E+c[s+re],re+=ue,X-=8);for(M=E&(1<<-X)-1,E>>=-X,X+=m;X>0;M=256*M+c[s+re],re+=ue,X-=8);if(E===0)E=1-U;else{if(E===F)return M?NaN:1/0*(he?-1:1);M+=Math.pow(2,m),E-=U}return(he?-1:1)*M*Math.pow(2,E-m)},A5=function(c,s,d,m,_,E){var M,D,F,U=8*E-_-1,X=(1<<U)-1,re=X>>1,ue=_===23?Math.pow(2,-24)-Math.pow(2,-77):0,he=m?0:E-1,pe=m?1:-1,Oe=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(D=isNaN(s)?1:0,M=X):(M=Math.floor(Math.log(s)/Math.LN2),s*(F=Math.pow(2,-M))<1&&(M--,F*=2),(s+=M+re>=1?ue/F:ue*Math.pow(2,1-re))*F>=2&&(M++,F/=2),M+re>=X?(D=0,M=X):M+re>=1?(D=(s*F-1)*Math.pow(2,_),M+=re):(D=s*Math.pow(2,re-1)*Math.pow(2,_),M=0));_>=8;c[d+he]=255&D,he+=pe,D/=256,_-=8);for(M=M<<_|D,U+=_;U>0;c[d+he]=255&M,he+=pe,M/=256,U-=8);c[d+he-pe]|=128*Oe};function _n(c){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(c)?c:new Uint8Array(c||0),this.pos=0,this.type=0,this.length=this.buf.length}_n.Varint=0,_n.Fixed64=1,_n.Bytes=2,_n.Fixed32=5;var lu,K_=4294967296,N5=1/K_,z5=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function dl(c){return c.type===_n.Bytes?c.readVarint()+c.pos:c.pos+1}function Zd(c,s,d){return d?4294967296*s+(c>>>0):4294967296*(s>>>0)+(c>>>0)}function D5(c,s,d){var m=s<=16383?1:s<=2097151?2:s<=268435455?3:Math.floor(Math.log(s)/(7*Math.LN2));d.realloc(m);for(var _=d.pos-1;_>=c;_--)d.buf[_+m]=d.buf[_]}function P$(c,s){for(var d=0;d<c.length;d++)s.writeVarint(c[d])}function M$(c,s){for(var d=0;d<c.length;d++)s.writeSVarint(c[d])}function I$(c,s){for(var d=0;d<c.length;d++)s.writeFloat(c[d])}function R$(c,s){for(var d=0;d<c.length;d++)s.writeDouble(c[d])}function O$(c,s){for(var d=0;d<c.length;d++)s.writeBoolean(c[d])}function A$(c,s){for(var d=0;d<c.length;d++)s.writeFixed32(c[d])}function N$(c,s){for(var d=0;d<c.length;d++)s.writeSFixed32(c[d])}function z$(c,s){for(var d=0;d<c.length;d++)s.writeFixed64(c[d])}function D$(c,s){for(var d=0;d<c.length;d++)s.writeSFixed64(c[d])}function Dg(c,s){return(c[s]|c[s+1]<<8|c[s+2]<<16)+16777216*c[s+3]}function Xd(c,s,d){c[d]=s,c[d+1]=s>>>8,c[d+2]=s>>>16,c[d+3]=s>>>24}function L5(c,s){return(c[s]|c[s+1]<<8|c[s+2]<<16)+(c[s+3]<<24)}function L$(c,s,d){c===1&&d.readMessage(F$,s)}function F$(c,s,d){if(c===3){const{id:m,bitmap:_,width:E,height:M,left:D,top:F,advance:U}=d.readMessage($$,{});s.push({id:m,bitmap:new pp({width:E+6,height:M+6},_),metrics:{width:E,height:M,left:D,top:F,advance:U}})}}function $$(c,s,d){c===1?s.id=d.readVarint():c===2?s.bitmap=d.readBytes():c===3?s.width=d.readVarint():c===4?s.height=d.readVarint():c===5?s.left=d.readSVarint():c===6?s.top=d.readSVarint():c===7&&(s.advance=d.readVarint())}function F5(c){let s=0,d=0;for(const M of c)s+=M.w*M.h,d=Math.max(d,M.w);c.sort((M,D)=>D.h-M.h);const m=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(s/.95)),d),h:1/0}];let _=0,E=0;for(const M of c)for(let D=m.length-1;D>=0;D--){const F=m[D];if(!(M.w>F.w||M.h>F.h)){if(M.x=F.x,M.y=F.y,E=Math.max(E,M.y+M.h),_=Math.max(_,M.x+M.w),M.w===F.w&&M.h===F.h){const U=m.pop();D<m.length&&(m[D]=U)}else M.h===F.h?(F.x+=M.w,F.w-=M.w):M.w===F.w?(F.y+=M.h,F.h-=M.h):(m.push({x:F.x+M.w,y:F.y,w:F.w-M.w,h:M.h}),F.y+=M.h,F.h-=M.h);break}}return{w:_,h:E,fill:s/(_*E)||0}}_n.prototype={destroy:function(){this.buf=null},readFields:function(c,s,d){for(d=d||this.length;this.pos<d;){var m=this.readVarint(),_=m>>3,E=this.pos;this.type=7&m,c(_,s,this),this.pos===E&&this.skip(m)}return s},readMessage:function(c,s){return this.readFields(c,s,this.readVarint()+this.pos)},readFixed32:function(){var c=Dg(this.buf,this.pos);return this.pos+=4,c},readSFixed32:function(){var c=L5(this.buf,this.pos);return this.pos+=4,c},readFixed64:function(){var c=Dg(this.buf,this.pos)+Dg(this.buf,this.pos+4)*K_;return this.pos+=8,c},readSFixed64:function(){var c=Dg(this.buf,this.pos)+L5(this.buf,this.pos+4)*K_;return this.pos+=8,c},readFloat:function(){var c=O5(this.buf,this.pos,!0,23,4);return this.pos+=4,c},readDouble:function(){var c=O5(this.buf,this.pos,!0,52,8);return this.pos+=8,c},readVarint:function(c){var s,d,m=this.buf;return s=127&(d=m[this.pos++]),d<128?s:(s|=(127&(d=m[this.pos++]))<<7,d<128?s:(s|=(127&(d=m[this.pos++]))<<14,d<128?s:(s|=(127&(d=m[this.pos++]))<<21,d<128?s:function(_,E,M){var D,F,U=M.buf;if(D=(112&(F=U[M.pos++]))>>4,F<128||(D|=(127&(F=U[M.pos++]))<<3,F<128)||(D|=(127&(F=U[M.pos++]))<<10,F<128)||(D|=(127&(F=U[M.pos++]))<<17,F<128)||(D|=(127&(F=U[M.pos++]))<<24,F<128)||(D|=(1&(F=U[M.pos++]))<<31,F<128))return Zd(_,D,E);throw new Error("Expected varint not more than 10 bytes")}(s|=(15&(d=m[this.pos]))<<28,c,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var c=this.readVarint();return c%2==1?(c+1)/-2:c/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var c=this.readVarint()+this.pos,s=this.pos;return this.pos=c,c-s>=12&&z5?function(d,m,_){return z5.decode(d.subarray(m,_))}(this.buf,s,c):function(d,m,_){for(var E="",M=m;M<_;){var D,F,U,X=d[M],re=null,ue=X>239?4:X>223?3:X>191?2:1;if(M+ue>_)break;ue===1?X<128&&(re=X):ue===2?(192&(D=d[M+1]))==128&&(re=(31&X)<<6|63&D)<=127&&(re=null):ue===3?(F=d[M+2],(192&(D=d[M+1]))==128&&(192&F)==128&&((re=(15&X)<<12|(63&D)<<6|63&F)<=2047||re>=55296&&re<=57343)&&(re=null)):ue===4&&(F=d[M+2],U=d[M+3],(192&(D=d[M+1]))==128&&(192&F)==128&&(192&U)==128&&((re=(15&X)<<18|(63&D)<<12|(63&F)<<6|63&U)<=65535||re>=1114112)&&(re=null)),re===null?(re=65533,ue=1):re>65535&&(re-=65536,E+=String.fromCharCode(re>>>10&1023|55296),re=56320|1023&re),E+=String.fromCharCode(re),M+=ue}return E}(this.buf,s,c)},readBytes:function(){var c=this.readVarint()+this.pos,s=this.buf.subarray(this.pos,c);return this.pos=c,s},readPackedVarint:function(c,s){if(this.type!==_n.Bytes)return c.push(this.readVarint(s));var d=dl(this);for(c=c||[];this.pos<d;)c.push(this.readVarint(s));return c},readPackedSVarint:function(c){if(this.type!==_n.Bytes)return c.push(this.readSVarint());var s=dl(this);for(c=c||[];this.pos<s;)c.push(this.readSVarint());return c},readPackedBoolean:function(c){if(this.type!==_n.Bytes)return c.push(this.readBoolean());var s=dl(this);for(c=c||[];this.pos<s;)c.push(this.readBoolean());return c},readPackedFloat:function(c){if(this.type!==_n.Bytes)return c.push(this.readFloat());var s=dl(this);for(c=c||[];this.pos<s;)c.push(this.readFloat());return c},readPackedDouble:function(c){if(this.type!==_n.Bytes)return c.push(this.readDouble());var s=dl(this);for(c=c||[];this.pos<s;)c.push(this.readDouble());return c},readPackedFixed32:function(c){if(this.type!==_n.Bytes)return c.push(this.readFixed32());var s=dl(this);for(c=c||[];this.pos<s;)c.push(this.readFixed32());return c},readPackedSFixed32:function(c){if(this.type!==_n.Bytes)return c.push(this.readSFixed32());var s=dl(this);for(c=c||[];this.pos<s;)c.push(this.readSFixed32());return c},readPackedFixed64:function(c){if(this.type!==_n.Bytes)return c.push(this.readFixed64());var s=dl(this);for(c=c||[];this.pos<s;)c.push(this.readFixed64());return c},readPackedSFixed64:function(c){if(this.type!==_n.Bytes)return c.push(this.readSFixed64());var s=dl(this);for(c=c||[];this.pos<s;)c.push(this.readSFixed64());return c},skip:function(c){var s=7&c;if(s===_n.Varint)for(;this.buf[this.pos++]>127;);else if(s===_n.Bytes)this.pos=this.readVarint()+this.pos;else if(s===_n.Fixed32)this.pos+=4;else{if(s!==_n.Fixed64)throw new Error("Unimplemented type: "+s);this.pos+=8}},writeTag:function(c,s){this.writeVarint(c<<3|s)},realloc:function(c){for(var s=this.length||16;s<this.pos+c;)s*=2;if(s!==this.length){var d=new Uint8Array(s);d.set(this.buf),this.buf=d,this.length=s}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(c){this.realloc(4),Xd(this.buf,c,this.pos),this.pos+=4},writeSFixed32:function(c){this.realloc(4),Xd(this.buf,c,this.pos),this.pos+=4},writeFixed64:function(c){this.realloc(8),Xd(this.buf,-1&c,this.pos),Xd(this.buf,Math.floor(c*N5),this.pos+4),this.pos+=8},writeSFixed64:function(c){this.realloc(8),Xd(this.buf,-1&c,this.pos),Xd(this.buf,Math.floor(c*N5),this.pos+4),this.pos+=8},writeVarint:function(c){(c=+c||0)>268435455||c<0?function(s,d){var m,_;if(s>=0?(m=s%4294967296|0,_=s/4294967296|0):(_=~(-s/4294967296),4294967295^(m=~(-s%4294967296))?m=m+1|0:(m=0,_=_+1|0)),s>=18446744073709552e3||s<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");d.realloc(10),function(E,M,D){D.buf[D.pos++]=127&E|128,E>>>=7,D.buf[D.pos++]=127&E|128,E>>>=7,D.buf[D.pos++]=127&E|128,E>>>=7,D.buf[D.pos++]=127&E|128,D.buf[D.pos]=127&(E>>>=7)}(m,0,d),function(E,M){var D=(7&E)<<4;M.buf[M.pos++]|=D|((E>>>=3)?128:0),E&&(M.buf[M.pos++]=127&E|((E>>>=7)?128:0),E&&(M.buf[M.pos++]=127&E|((E>>>=7)?128:0),E&&(M.buf[M.pos++]=127&E|((E>>>=7)?128:0),E&&(M.buf[M.pos++]=127&E|((E>>>=7)?128:0),E&&(M.buf[M.pos++]=127&E)))))}(_,d)}(c,this):(this.realloc(4),this.buf[this.pos++]=127&c|(c>127?128:0),c<=127||(this.buf[this.pos++]=127&(c>>>=7)|(c>127?128:0),c<=127||(this.buf[this.pos++]=127&(c>>>=7)|(c>127?128:0),c<=127||(this.buf[this.pos++]=c>>>7&127))))},writeSVarint:function(c){this.writeVarint(c<0?2*-c-1:2*c)},writeBoolean:function(c){this.writeVarint(Boolean(c))},writeString:function(c){c=String(c),this.realloc(4*c.length),this.pos++;var s=this.pos;this.pos=function(m,_,E){for(var M,D,F=0;F<_.length;F++){if((M=_.charCodeAt(F))>55295&&M<57344){if(!D){M>56319||F+1===_.length?(m[E++]=239,m[E++]=191,m[E++]=189):D=M;continue}if(M<56320){m[E++]=239,m[E++]=191,m[E++]=189,D=M;continue}M=D-55296<<10|M-56320|65536,D=null}else D&&(m[E++]=239,m[E++]=191,m[E++]=189,D=null);M<128?m[E++]=M:(M<2048?m[E++]=M>>6|192:(M<65536?m[E++]=M>>12|224:(m[E++]=M>>18|240,m[E++]=M>>12&63|128),m[E++]=M>>6&63|128),m[E++]=63&M|128)}return E}(this.buf,c,this.pos);var d=this.pos-s;d>=128&&D5(s,d,this),this.pos=s-1,this.writeVarint(d),this.pos+=d},writeFloat:function(c){this.realloc(4),A5(this.buf,c,this.pos,!0,23,4),this.pos+=4},writeDouble:function(c){this.realloc(8),A5(this.buf,c,this.pos,!0,52,8),this.pos+=8},writeBytes:function(c){var s=c.length;this.writeVarint(s),this.realloc(s);for(var d=0;d<s;d++)this.buf[this.pos++]=c[d]},writeRawMessage:function(c,s){this.pos++;var d=this.pos;c(s,this);var m=this.pos-d;m>=128&&D5(d,m,this),this.pos=d-1,this.writeVarint(m),this.pos+=m},writeMessage:function(c,s,d){this.writeTag(c,_n.Bytes),this.writeRawMessage(s,d)},writePackedVarint:function(c,s){s.length&&this.writeMessage(c,P$,s)},writePackedSVarint:function(c,s){s.length&&this.writeMessage(c,M$,s)},writePackedBoolean:function(c,s){s.length&&this.writeMessage(c,O$,s)},writePackedFloat:function(c,s){s.length&&this.writeMessage(c,I$,s)},writePackedDouble:function(c,s){s.length&&this.writeMessage(c,R$,s)},writePackedFixed32:function(c,s){s.length&&this.writeMessage(c,A$,s)},writePackedSFixed32:function(c,s){s.length&&this.writeMessage(c,N$,s)},writePackedFixed64:function(c,s){s.length&&this.writeMessage(c,z$,s)},writePackedSFixed64:function(c,s){s.length&&this.writeMessage(c,D$,s)},writeBytesField:function(c,s){this.writeTag(c,_n.Bytes),this.writeBytes(s)},writeFixed32Field:function(c,s){this.writeTag(c,_n.Fixed32),this.writeFixed32(s)},writeSFixed32Field:function(c,s){this.writeTag(c,_n.Fixed32),this.writeSFixed32(s)},writeFixed64Field:function(c,s){this.writeTag(c,_n.Fixed64),this.writeFixed64(s)},writeSFixed64Field:function(c,s){this.writeTag(c,_n.Fixed64),this.writeSFixed64(s)},writeVarintField:function(c,s){this.writeTag(c,_n.Varint),this.writeVarint(s)},writeSVarintField:function(c,s){this.writeTag(c,_n.Varint),this.writeSVarint(s)},writeStringField:function(c,s){this.writeTag(c,_n.Bytes),this.writeString(s)},writeFloatField:function(c,s){this.writeTag(c,_n.Fixed32),this.writeFloat(s)},writeDoubleField:function(c,s){this.writeTag(c,_n.Fixed64),this.writeDouble(s)},writeBooleanField:function(c,s){this.writeVarintField(c,Boolean(s))}};class H_{constructor(s,{pixelRatio:d,version:m,stretchX:_,stretchY:E,content:M}){this.paddedRect=s,this.pixelRatio=d,this.stretchX=_,this.stretchY=E,this.content=M,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 $5{constructor(s,d){const m={},_={};this.haveRenderCallbacks=[];const E=[];this.addImages(s,m,E),this.addImages(d,_,E);const{w:M,h:D}=F5(E),F=new ia({width:M||1,height:D||1});for(const U in s){const X=s[U],re=m[U].paddedRect;ia.copy(X.data,F,{x:0,y:0},{x:re.x+1,y:re.y+1},X.data)}for(const U in d){const X=d[U],re=_[U].paddedRect,ue=re.x+1,he=re.y+1,pe=X.data.width,Oe=X.data.height;ia.copy(X.data,F,{x:0,y:0},{x:ue,y:he},X.data),ia.copy(X.data,F,{x:0,y:Oe-1},{x:ue,y:he-1},{width:pe,height:1}),ia.copy(X.data,F,{x:0,y:0},{x:ue,y:he+Oe},{width:pe,height:1}),ia.copy(X.data,F,{x:pe-1,y:0},{x:ue-1,y:he},{width:1,height:Oe}),ia.copy(X.data,F,{x:0,y:0},{x:ue+pe,y:he},{width:1,height:Oe})}this.image=F,this.iconPositions=m,this.patternPositions=_}addImages(s,d,m){for(const _ in s){const E=s[_],M={x:0,y:0,w:E.data.width+2,h:E.data.height+2};m.push(M),d[_]=new H_(M,E),E.hasRenderCallback&&this.haveRenderCallbacks.push(_)}}patchUpdatedImages(s,d){s.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const m in s.updatedImages)this.patchUpdatedImage(this.iconPositions[m],s.getImage(m),d),this.patchUpdatedImage(this.patternPositions[m],s.getImage(m),d)}patchUpdatedImage(s,d,m){if(!s||!d||s.version===d.version)return;s.version=d.version;const[_,E]=s.tl;m.update(d.data,void 0,{x:_,y:E})}}dr("ImagePosition",H_),dr("ImageAtlas",$5),o.WritingMode=void 0,(lu=o.WritingMode||(o.WritingMode={}))[lu.none=0]="none",lu[lu.horizontal=1]="horizontal",lu[lu.vertical=2]="vertical",lu[lu.horizontalOnly=3]="horizontalOnly";const Lg=-17;class wp{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(s,d){const m=new wp;return m.scale=s||1,m.fontStack=d,m}static forImage(s){const d=new wp;return d.imageName=s,d}}class Yd{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(s,d){const m=new Yd;for(let _=0;_<s.sections.length;_++){const E=s.sections[_];E.image?m.addImageSection(E):m.addTextSection(E,d)}return m}length(){return this.text.length}getSection(s){return this.sections[this.sectionIndex[s]]}getSectionIndex(s){return this.sectionIndex[s]}getCharCode(s){return this.text.charCodeAt(s)}verticalizePunctuation(){this.text=function(s){let d="";for(let m=0;m<s.length;m++){const _=s.charCodeAt(m+1)||null,E=s.charCodeAt(m-1)||null;d+=_&&gg(_)&&!bp[s[m+1]]||E&&gg(E)&&!bp[s[m-1]]||!bp[s[m]]?s[m]:bp[s[m]]}return d}(this.text)}trim(){let s=0;for(let m=0;m<this.text.length&&$g[this.text.charCodeAt(m)];m++)s++;let d=this.text.length;for(let m=this.text.length-1;m>=0&&m>=s&&$g[this.text.charCodeAt(m)];m--)d--;this.text=this.text.substring(s,d),this.sectionIndex=this.sectionIndex.slice(s,d)}substring(s,d){const m=new Yd;return m.text=this.text.substring(s,d),m.sectionIndex=this.sectionIndex.slice(s,d),m.sections=this.sections,m}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((s,d)=>Math.max(s,this.sections[d].scale),0)}addTextSection(s,d){this.text+=s.text,this.sections.push(wp.forText(s.scale,s.fontStack||d));const m=this.sections.length-1;for(let _=0;_<s.text.length;++_)this.sectionIndex.push(m)}addImageSection(s){const d=s.image?s.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(wp.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 Fg(c,s,d,m,_,E,M,D,F,U,X,re,ue,he,pe,Oe){const Me=Yd.fromFeature(c,_);let Ze;re===o.WritingMode.vertical&&Me.verticalizePunctuation();const{processBidirectionalText:st,processStyledBidirectionalText:Ke}=jo;if(st&&Me.sections.length===1){Ze=[];const St=st(Me.toString(),W_(Me,U,E,s,m,he,pe));for(const lr of St){const hr=new Yd;hr.text=lr,hr.sections=Me.sections;for(let er=0;er<lr.length;er++)hr.sectionIndex.push(0);Ze.push(hr)}}else if(Ke){Ze=[];const St=Ke(Me.text,Me.sectionIndex,W_(Me,U,E,s,m,he,pe));for(const lr of St){const hr=new Yd;hr.text=lr[0],hr.sectionIndex=lr[1],hr.sections=Me.sections,Ze.push(hr)}}else Ze=function(St,lr){const hr=[],er=St.text;let Zt=0;for(const Ht of lr)hr.push(St.substring(Zt,Ht)),Zt=Ht;return Zt<er.length&&hr.push(St.substring(Zt,er.length)),hr}(Me,W_(Me,U,E,s,m,he,pe));const nt=[],kt={positionedLines:nt,text:Me.toString(),top:X[1],bottom:X[1],left:X[0],right:X[0],writingMode:re,iconsInText:!1,verticalizable:!1};return function(St,lr,hr,er,Zt,Ht,tr,Yt,Ft,br,mr,jr){let In=0,Fn=Lg,_i=0,aa=0;const Ki=Yt==="right"?1:Yt==="left"?0:.5;let di=0;for(const fi of Zt){fi.trim();const Wi=fi.getMaxScale(),to=(Wi-1)*Fi,po={positionedGlyphs:[],lineOffset:0};St.positionedLines[di]=po;const ko=po.positionedGlyphs;let To=0;if(!fi.length()){Fn+=Ht,++di;continue}for(let Mi=0;Mi<fi.length();Mi++){const Wr=fi.getSection(Mi),Ho=fi.getSectionIndex(Mi),qi=fi.getCharCode(Mi);let ro=0,Ma=null,os=null,as=null,hl=Fi;const Ia=!(Ft===o.WritingMode.horizontal||!mr&&!tp(qi)||mr&&($g[qi]||(Pi=qi,Jt.Arabic(Pi)||Jt["Arabic Supplement"](Pi)||Jt["Arabic Extended-A"](Pi)||Jt["Arabic Presentation Forms-A"](Pi)||Jt["Arabic Presentation Forms-B"](Pi))));if(Wr.imageName){const sa=er[Wr.imageName];if(!sa)continue;as=Wr.imageName,St.iconsInText=St.iconsInText||!0,os=sa.paddedRect;const Po=sa.displaySize;Wr.scale=Wr.scale*Fi/jr,Ma={width:Po[0],height:Po[1],left:1,top:-3,advance:Ia?Po[1]:Po[0]},ro=to+(Fi-Po[1]*Wr.scale),hl=Ma.advance;const pl=Ia?Po[0]*Wr.scale-Fi*Wi:Po[1]*Wr.scale-Fi*Wi;pl>0&&pl>To&&(To=pl)}else{const sa=hr[Wr.fontStack],Po=sa&&sa[qi];if(Po&&Po.rect)os=Po.rect,Ma=Po.metrics;else{const pl=lr[Wr.fontStack],Ep=pl&&pl[qi];if(!Ep)continue;Ma=Ep.metrics}ro=(Wi-Wr.scale)*Fi}Ia?(St.verticalizable=!0,ko.push({glyph:qi,imageName:as,x:In,y:Fn+ro,vertical:Ia,scale:Wr.scale,fontStack:Wr.fontStack,sectionIndex:Ho,metrics:Ma,rect:os}),In+=hl*Wr.scale+br):(ko.push({glyph:qi,imageName:as,x:In,y:Fn+ro,vertical:Ia,scale:Wr.scale,fontStack:Wr.fontStack,sectionIndex:Ho,metrics:Ma,rect:os}),In+=Ma.advance*Wr.scale+br)}ko.length!==0&&(_i=Math.max(In-br,_i),j$(ko,0,ko.length-1,Ki,To)),In=0;const Un=Ht*Wi+To;po.lineOffset=Math.max(To,to),Fn+=Un,aa=Math.max(Un,aa),++di}var Pi;const Hi=Fn-Lg,{horizontalAlign:eo,verticalAlign:Eo}=q_(tr);(function(fi,Wi,to,po,ko,To,Un,Mi,Wr){const Ho=(Wi-to)*ko;let qi=0;qi=To!==Un?-Mi*po-Lg:(-po*Wr+.5)*Un;for(const ro of fi)for(const Ma of ro.positionedGlyphs)Ma.x+=Ho,Ma.y+=qi})(St.positionedLines,Ki,eo,Eo,_i,aa,Ht,Hi,Zt.length),St.top+=-Eo*Hi,St.bottom=St.top+Hi,St.left+=-eo*_i,St.right=St.left+_i}(kt,s,d,m,Ze,M,D,F,re,U,ue,Oe),!function(St){for(const lr of St)if(lr.positionedGlyphs.length!==0)return!1;return!0}(nt)&&kt}const $g={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},B$={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 B5(c,s,d,m,_,E){if(s.imageName){const M=m[s.imageName];return M?M.displaySize[0]*s.scale*Fi/E+_:0}{const M=d[s.fontStack],D=M&&M[c];return D?D.metrics.advance*s.scale+_:0}}function V5(c,s,d,m){const _=Math.pow(c-s,2);return m?c<s?_/2:2*_:_+Math.abs(d)*d}function V$(c,s,d){let m=0;return c===10&&(m-=1e4),d&&(m+=150),c!==40&&c!==65288||(m+=50),s!==41&&s!==65289||(m+=50),m}function j5(c,s,d,m,_,E){let M=null,D=V5(s,d,_,E);for(const F of m){const U=V5(s-F.x,d,_,E)+F.badness;U<=D&&(M=F,D=U)}return{index:c,x:s,priorBreak:M,badness:D}}function U5(c){return c?U5(c.priorBreak).concat(c.index):[]}function W_(c,s,d,m,_,E,M){if(E!=="point")return[];if(!c)return[];const D=[],F=function(ue,he,pe,Oe,Me,Ze){let st=0;for(let Ke=0;Ke<ue.length();Ke++){const nt=ue.getSection(Ke);st+=B5(ue.getCharCode(Ke),nt,Oe,Me,he,Ze)}return st/Math.max(1,Math.ceil(st/pe))}(c,s,d,m,_,M),U=c.text.indexOf("\u200B")>=0;let X=0;for(let ue=0;ue<c.length();ue++){const he=c.getSection(ue),pe=c.getCharCode(ue);if($g[pe]||(X+=B5(pe,he,m,_,s,M)),ue<c.length()-1){const Oe=!((re=pe)<11904||!(Jt["Bopomofo Extended"](re)||Jt.Bopomofo(re)||Jt["CJK Compatibility Forms"](re)||Jt["CJK Compatibility Ideographs"](re)||Jt["CJK Compatibility"](re)||Jt["CJK Radicals Supplement"](re)||Jt["CJK Strokes"](re)||Jt["CJK Symbols and Punctuation"](re)||Jt["CJK Unified Ideographs Extension A"](re)||Jt["CJK Unified Ideographs"](re)||Jt["Enclosed CJK Letters and Months"](re)||Jt["Halfwidth and Fullwidth Forms"](re)||Jt.Hiragana(re)||Jt["Ideographic Description Characters"](re)||Jt["Kangxi Radicals"](re)||Jt["Katakana Phonetic Extensions"](re)||Jt.Katakana(re)||Jt["Vertical Forms"](re)||Jt["Yi Radicals"](re)||Jt["Yi Syllables"](re)));(B$[pe]||Oe||he.imageName)&&D.push(j5(ue+1,X,F,D,V$(pe,c.getCharCode(ue+1),Oe&&U),!1))}}var re;return U5(j5(c.length(),X,F,D,0,!0))}function q_(c){let s=.5,d=.5;switch(c){case"right":case"top-right":case"bottom-right":s=1;break;case"left":case"top-left":case"bottom-left":s=0}switch(c){case"bottom":case"bottom-right":case"bottom-left":d=1;break;case"top":case"top-right":case"top-left":d=0}return{horizontalAlign:s,verticalAlign:d}}function j$(c,s,d,m,_){if(!m&&!_)return;const E=c[d],M=(c[d].x+E.metrics.advance*E.scale)*m;for(let D=s;D<=d;D++)c[D].x-=M,c[D].y+=_}function U$(c,s,d){const{horizontalAlign:m,verticalAlign:_}=q_(d),E=s[0]-c.displaySize[0]*m,M=s[1]-c.displaySize[1]*_;return{image:c,top:M,bottom:M+c.displaySize[1],left:E,right:E+c.displaySize[0]}}function K5(c,s,d,m,_,E){const M=c.image;let D;if(M.content){const Me=M.content,Ze=M.pixelRatio||1;D=[Me[0]/Ze,Me[1]/Ze,M.displaySize[0]-Me[2]/Ze,M.displaySize[1]-Me[3]/Ze]}const F=s.left*E,U=s.right*E;let X,re,ue,he;d==="width"||d==="both"?(he=_[0]+F-m[3],re=_[0]+U+m[1]):(he=_[0]+(F+U-M.displaySize[0])/2,re=he+M.displaySize[0]);const pe=s.top*E,Oe=s.bottom*E;return d==="height"||d==="both"?(X=_[1]+pe-m[0],ue=_[1]+Oe+m[2]):(X=_[1]+(pe+Oe-M.displaySize[1])/2,ue=X+M.displaySize[1]),{image:M,top:X,right:re,bottom:ue,left:he,collisionPadding:D}}const fl=128;function H5(c,s){const{expression:d}=s;if(d.kind==="constant")return{kind:"constant",layoutSize:d.evaluate(new Dn(c+1))};if(d.kind==="source")return{kind:"source"};{const{zoomStops:m,interpolationType:_}=d;let E=0;for(;E<m.length&&m[E]<=c;)E++;E=Math.max(0,E-1);let M=E;for(;M<m.length&&m[M]<c+1;)M++;M=Math.min(m.length-1,M);const D=m[E],F=m[M];return d.kind==="composite"?{kind:"composite",minZoom:D,maxZoom:F,interpolationType:_}:{kind:"camera",minZoom:D,maxZoom:F,minSize:d.evaluate(new Dn(D)),maxSize:d.evaluate(new Dn(F)),interpolationType:_}}}class uu extends ne{constructor(s,d,m,_){super(s,d),this.angle=m,_!==void 0&&(this.segment=_)}clone(){return new uu(this.x,this.y,this.angle,this.segment)}}function W5(c,s,d,m,_){if(s.segment===void 0)return!0;let E=s,M=s.segment+1,D=0;for(;D>-d/2;){if(M--,M<0)return!1;D-=c[M].dist(E),E=c[M]}D+=c[M].dist(c[M+1]),M++;const F=[];let U=0;for(;D<d/2;){const X=c[M],re=c[M+1];if(!re)return!1;let ue=c[M-1].angleTo(X)-X.angleTo(re);for(ue=Math.abs((ue+3*Math.PI)%(2*Math.PI)-Math.PI),F.push({distance:D,angleDelta:ue}),U+=ue;D-F[0].distance>m;)U-=F.shift().angleDelta;if(U>_)return!1;M++,D+=X.dist(re)}return!0}function q5(c){let s=0;for(let d=0;d<c.length-1;d++)s+=c[d].dist(c[d+1]);return s}function G5(c,s,d){return c?.6*s*d:0}function Z5(c,s){return Math.max(c?c.right-c.left:0,s?s.right-s.left:0)}function K$(c,s,d,m,_,E){const M=G5(d,_,E),D=Z5(d,m)*E;let F=0;const U=q5(c)/2;for(let X=0;X<c.length-1;X++){const re=c[X],ue=c[X+1],he=re.dist(ue);if(F+he>U){const pe=(U-F)/he,Oe=xn(re.x,ue.x,pe),Me=xn(re.y,ue.y,pe),Ze=new uu(Oe,Me,ue.angleTo(re),X);return Ze._round(),!M||W5(c,Ze,D,M,s)?Ze:void 0}F+=he}}function H$(c,s,d,m,_,E,M,D,F){const U=G5(m,E,M),X=Z5(m,_),re=X*M,ue=c[0].x===0||c[0].x===F||c[0].y===0||c[0].y===F;return s-re<s/4&&(s=re+s/4),X5(c,ue?s/2*D%s:(X/2+2*E)*M*D%s,s,U,d,re,ue,!1,F)}function X5(c,s,d,m,_,E,M,D,F){const U=E/2,X=q5(c);let re=0,ue=s-d,he=[];for(let pe=0;pe<c.length-1;pe++){const Oe=c[pe],Me=c[pe+1],Ze=Oe.dist(Me),st=Me.angleTo(Oe);for(;ue+d<re+Ze;){ue+=d;const Ke=(ue-re)/Ze,nt=xn(Oe.x,Me.x,Ke),kt=xn(Oe.y,Me.y,Ke);if(nt>=0&&nt<F&&kt>=0&&kt<F&&ue-U>=0&&ue+U<=X){const St=new uu(nt,kt,st,pe);St._round(),m&&!W5(c,St,E,m,_)||he.push(St)}}re+=Ze}return D||he.length||M||(he=X5(c,re/2,d,m,_,E,M,!0,F)),he}function Y5(c,s,d,m,_){const E=[];for(let M=0;M<c.length;M++){const D=c[M];let F;for(let U=0;U<D.length-1;U++){let X=D[U],re=D[U+1];X.x<s&&re.x<s||(X.x<s?X=new ne(s,X.y+(s-X.x)/(re.x-X.x)*(re.y-X.y))._round():re.x<s&&(re=new ne(s,X.y+(s-X.x)/(re.x-X.x)*(re.y-X.y))._round()),X.y<d&&re.y<d||(X.y<d?X=new ne(X.x+(d-X.y)/(re.y-X.y)*(re.x-X.x),d)._round():re.y<d&&(re=new ne(X.x+(d-X.y)/(re.y-X.y)*(re.x-X.x),d)._round()),X.x>=m&&re.x>=m||(X.x>=m?X=new ne(m,X.y+(m-X.x)/(re.x-X.x)*(re.y-X.y))._round():re.x>=m&&(re=new ne(m,X.y+(m-X.x)/(re.x-X.x)*(re.y-X.y))._round()),X.y>=_&&re.y>=_||(X.y>=_?X=new ne(X.x+(_-X.y)/(re.y-X.y)*(re.x-X.x),_)._round():re.y>=_&&(re=new ne(X.x+(_-X.y)/(re.y-X.y)*(re.x-X.x),_)._round()),F&&X.equals(F[F.length-1])||(F=[X],E.push(F)),F.push(re)))))}}return E}function Q5(c,s,d,m){const _=[],E=c.image,M=E.pixelRatio,D=E.paddedRect.w-2,F=E.paddedRect.h-2,U=c.right-c.left,X=c.bottom-c.top,re=E.stretchX||[[0,D]],ue=E.stretchY||[[0,F]],he=(Ht,tr)=>Ht+tr[1]-tr[0],pe=re.reduce(he,0),Oe=ue.reduce(he,0),Me=D-pe,Ze=F-Oe;let st=0,Ke=pe,nt=0,kt=Oe,St=0,lr=Me,hr=0,er=Ze;if(E.content&&m){const Ht=E.content;st=Bg(re,0,Ht[0]),nt=Bg(ue,0,Ht[1]),Ke=Bg(re,Ht[0],Ht[2]),kt=Bg(ue,Ht[1],Ht[3]),St=Ht[0]-st,hr=Ht[1]-nt,lr=Ht[2]-Ht[0]-Ke,er=Ht[3]-Ht[1]-kt}const Zt=(Ht,tr,Yt,Ft)=>{const br=Vg(Ht.stretch-st,Ke,U,c.left),mr=jg(Ht.fixed-St,lr,Ht.stretch,pe),jr=Vg(tr.stretch-nt,kt,X,c.top),In=jg(tr.fixed-hr,er,tr.stretch,Oe),Fn=Vg(Yt.stretch-st,Ke,U,c.left),_i=jg(Yt.fixed-St,lr,Yt.stretch,pe),aa=Vg(Ft.stretch-nt,kt,X,c.top),Ki=jg(Ft.fixed-hr,er,Ft.stretch,Oe),di=new ne(br,jr),Pi=new ne(Fn,jr),Hi=new ne(Fn,aa),eo=new ne(br,aa),Eo=new ne(mr/M,In/M),fi=new ne(_i/M,Ki/M),Wi=s*Math.PI/180;if(Wi){const ko=Math.sin(Wi),To=Math.cos(Wi),Un=[To,-ko,ko,To];di._matMult(Un),Pi._matMult(Un),eo._matMult(Un),Hi._matMult(Un)}const to=Ht.stretch+Ht.fixed,po=tr.stretch+tr.fixed;return{tl:di,tr:Pi,bl:eo,br:Hi,tex:{x:E.paddedRect.x+1+to,y:E.paddedRect.y+1+po,w:Yt.stretch+Yt.fixed-to,h:Ft.stretch+Ft.fixed-po},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Eo,pixelOffsetBR:fi,minFontScaleX:lr/M/U,minFontScaleY:er/M/X,isSDF:d}};if(m&&(E.stretchX||E.stretchY)){const Ht=J5(re,Me,pe),tr=J5(ue,Ze,Oe);for(let Yt=0;Yt<Ht.length-1;Yt++){const Ft=Ht[Yt],br=Ht[Yt+1];for(let mr=0;mr<tr.length-1;mr++)_.push(Zt(Ft,tr[mr],br,tr[mr+1]))}}else _.push(Zt({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:D+1},{fixed:0,stretch:F+1}));return _}function Bg(c,s,d){let m=0;for(const _ of c)m+=Math.max(s,Math.min(d,_[1]))-Math.max(s,Math.min(d,_[0]));return m}function J5(c,s,d){const m=[{fixed:-1,stretch:0}];for(const[_,E]of c){const M=m[m.length-1];m.push({fixed:_-M.stretch,stretch:M.stretch}),m.push({fixed:_-M.stretch,stretch:M.stretch+(E-_)})}return m.push({fixed:s+1,stretch:d}),m}function Vg(c,s,d,m){return c/s*d+m}function jg(c,s,d,m){return c-s*d/m}dr("Anchor",uu);class Ug{constructor(s,d,m,_,E,M,D,F,U,X){if(this.boxStartIndex=s.length,U){let re=M.top,ue=M.bottom;const he=M.collisionPadding;he&&(re-=he[1],ue+=he[3]);let pe=ue-re;pe>0&&(pe=Math.max(10,pe),this.circleDiameter=pe)}else{let re=M.top*D-F[0],ue=M.bottom*D+F[2],he=M.left*D-F[3],pe=M.right*D+F[1];const Oe=M.collisionPadding;if(Oe&&(he-=Oe[0]*D,re-=Oe[1]*D,pe+=Oe[2]*D,ue+=Oe[3]*D),X){const Me=new ne(he,re),Ze=new ne(pe,re),st=new ne(he,ue),Ke=new ne(pe,ue),nt=X*Math.PI/180;Me._rotate(nt),Ze._rotate(nt),st._rotate(nt),Ke._rotate(nt),he=Math.min(Me.x,Ze.x,st.x,Ke.x),pe=Math.max(Me.x,Ze.x,st.x,Ke.x),re=Math.min(Me.y,Ze.y,st.y,Ke.y),ue=Math.max(Me.y,Ze.y,st.y,Ke.y)}s.emplaceBack(d.x,d.y,he,re,pe,ue,m,_,E)}this.boxEndIndex=s.length}}class W${constructor(s=[],d=q$){if(this.data=s,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(s){this.data.push(s),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const s=this.data[0],d=this.data.pop();return this.length--,this.length>0&&(this.data[0]=d,this._down(0)),s}peek(){return this.data[0]}_up(s){const{data:d,compare:m}=this,_=d[s];for(;s>0;){const E=s-1>>1,M=d[E];if(m(_,M)>=0)break;d[s]=M,s=E}d[s]=_}_down(s){const{data:d,compare:m}=this,_=this.length>>1,E=d[s];for(;s<_;){let M=1+(s<<1),D=d[M];const F=M+1;if(F<this.length&&m(d[F],D)<0&&(M=F,D=d[F]),m(D,E)>=0)break;d[s]=D,s=M}d[s]=E}}function q$(c,s){return c<s?-1:c>s?1:0}function G$(c,s=1,d=!1){let m=1/0,_=1/0,E=-1/0,M=-1/0;const D=c[0];for(let he=0;he<D.length;he++){const pe=D[he];(!he||pe.x<m)&&(m=pe.x),(!he||pe.y<_)&&(_=pe.y),(!he||pe.x>E)&&(E=pe.x),(!he||pe.y>M)&&(M=pe.y)}const F=Math.min(E-m,M-_);let U=F/2;const X=new W$([],Z$);if(F===0)return new ne(m,_);for(let he=m;he<E;he+=F)for(let pe=_;pe<M;pe+=F)X.push(new Qd(he+U,pe+U,U,c));let re=function(he){let pe=0,Oe=0,Me=0;const Ze=he[0];for(let st=0,Ke=Ze.length,nt=Ke-1;st<Ke;nt=st++){const kt=Ze[st],St=Ze[nt],lr=kt.x*St.y-St.x*kt.y;Oe+=(kt.x+St.x)*lr,Me+=(kt.y+St.y)*lr,pe+=3*lr}return new Qd(Oe/pe,Me/pe,0,he)}(c),ue=X.length;for(;X.length;){const he=X.pop();(he.d>re.d||!re.d)&&(re=he,d&&console.log("found best %d after %d probes",Math.round(1e4*he.d)/1e4,ue)),he.max-re.d<=s||(U=he.h/2,X.push(new Qd(he.p.x-U,he.p.y-U,U,c)),X.push(new Qd(he.p.x+U,he.p.y-U,U,c)),X.push(new Qd(he.p.x-U,he.p.y+U,U,c)),X.push(new Qd(he.p.x+U,he.p.y+U,U,c)),ue+=4)}return d&&(console.log(`num probes: ${ue}`),console.log(`best distance: ${re.d}`)),re.p}function Z$(c,s){return s.max-c.max}function Qd(c,s,d,m){this.p=new ne(c,s),this.h=d,this.d=function(_,E){let M=!1,D=1/0;for(let F=0;F<E.length;F++){const U=E[F];for(let X=0,re=U.length,ue=re-1;X<re;ue=X++){const he=U[X],pe=U[ue];he.y>_.y!=pe.y>_.y&&_.x<(pe.x-he.x)*(_.y-he.y)/(pe.y-he.y)+he.x&&(M=!M),D=Math.min(D,s5(_,he,pe))}}return(M?1:-1)*Math.sqrt(D)}(this.p,m),this.max=this.d+this.h*Math.SQRT2}const G_=Number.POSITIVE_INFINITY;function e6(c,s){return s[1]!==G_?function(d,m,_){let E=0,M=0;switch(m=Math.abs(m),_=Math.abs(_),d){case"top-right":case"top-left":case"top":M=_-7;break;case"bottom-right":case"bottom-left":case"bottom":M=7-_}switch(d){case"top-right":case"bottom-right":case"right":E=-m;break;case"top-left":case"bottom-left":case"left":E=m}return[E,M]}(c,s[0],s[1]):function(d,m){let _=0,E=0;m<0&&(m=0);const M=m/Math.sqrt(2);switch(d){case"top-right":case"top-left":E=M-7;break;case"bottom-right":case"bottom-left":E=7-M;break;case"bottom":E=7-m;break;case"top":E=m-7}switch(d){case"top-right":case"bottom-right":_=-M;break;case"top-left":case"bottom-left":_=M;break;case"left":_=m;break;case"right":_=-m}return[_,E]}(c,s[0])}function Z_(c){switch(c){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function X$(c,s,d,m,_,E,M,D,F,U,X){let re=E.textMaxSize.evaluate(s,{});re===void 0&&(re=M);const ue=c.layers[0].layout,he=ue.get("icon-offset").evaluate(s,{},X),pe=r6(d.horizontal),Oe=M/24,Me=c.tilePixelRatio*Oe,Ze=c.tilePixelRatio*re/24,st=c.tilePixelRatio*D,Ke=c.tilePixelRatio*ue.get("symbol-spacing"),nt=ue.get("text-padding")*c.tilePixelRatio,kt=function(Ft,br,mr,jr=1){const In=Ft.get("icon-padding").evaluate(br,{},mr),Fn=In&&In.values;return[Fn[0]*jr,Fn[1]*jr,Fn[2]*jr,Fn[3]*jr]}(ue,s,X,c.tilePixelRatio),St=ue.get("text-max-angle")/180*Math.PI,lr=ue.get("text-rotation-alignment")!=="viewport"&&ue.get("symbol-placement")!=="point",hr=ue.get("icon-rotation-alignment")==="map"&&ue.get("symbol-placement")!=="point",er=ue.get("symbol-placement"),Zt=Ke/2,Ht=ue.get("icon-text-fit");let tr;m&&Ht!=="none"&&(c.allowVerticalPlacement&&d.vertical&&(tr=K5(m,d.vertical,Ht,ue.get("icon-text-fit-padding"),he,Oe)),pe&&(m=K5(m,pe,Ht,ue.get("icon-text-fit-padding"),he,Oe)));const Yt=(Ft,br)=>{br.x<0||br.x>=xi||br.y<0||br.y>=xi||function(mr,jr,In,Fn,_i,aa,Ki,di,Pi,Hi,eo,Eo,fi,Wi,to,po,ko,To,Un,Mi,Wr,Ho,qi,ro,Ma){const os=mr.addToLineVertexArray(jr,In);let as,hl,Ia,sa,Po=0,pl=0,Ep=0,y6=0,ob=-1,ab=-1;const ml={};let x6=Ti.exports(""),sb=0,lb=0;if(di._unevaluatedLayout.getValue("text-radial-offset")===void 0?[sb,lb]=di.layout.get("text-offset").evaluate(Wr,{},ro).map(Mo=>Mo*Fi):(sb=di.layout.get("text-radial-offset").evaluate(Wr,{},ro)*Fi,lb=G_),mr.allowVerticalPlacement&&Fn.vertical){const Mo=di.layout.get("text-rotate").evaluate(Wr,{},ro)+90;Ia=new Ug(Pi,jr,Hi,eo,Eo,Fn.vertical,fi,Wi,to,Mo),Ki&&(sa=new Ug(Pi,jr,Hi,eo,Eo,Ki,ko,To,to,Mo))}if(_i){const Mo=di.layout.get("icon-rotate").evaluate(Wr,{}),Ns=di.layout.get("icon-text-fit")!=="none",kp=Q5(_i,Mo,qi,Ns),Tp=Ki?Q5(Ki,Mo,qi,Ns):void 0;hl=new Ug(Pi,jr,Hi,eo,Eo,_i,ko,To,!1,Mo),Po=4*kp.length;const w6=mr.iconSizeData;let Oc=null;w6.kind==="source"?(Oc=[fl*di.layout.get("icon-size").evaluate(Wr,{})],Oc[0]>cu&&B(`${mr.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):w6.kind==="composite"&&(Oc=[fl*Ho.compositeIconSizes[0].evaluate(Wr,{},ro),fl*Ho.compositeIconSizes[1].evaluate(Wr,{},ro)],(Oc[0]>cu||Oc[1]>cu)&&B(`${mr.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),mr.addSymbols(mr.icon,kp,Oc,Mi,Un,Wr,o.WritingMode.none,jr,os.lineStartIndex,os.lineLength,-1,ro),ob=mr.icon.placedSymbolArray.length-1,Tp&&(pl=4*Tp.length,mr.addSymbols(mr.icon,Tp,Oc,Mi,Un,Wr,o.WritingMode.vertical,jr,os.lineStartIndex,os.lineLength,-1,ro),ab=mr.icon.placedSymbolArray.length-1)}const _6=Object.keys(Fn.horizontal);for(const Mo of _6){const Ns=Fn.horizontal[Mo];if(!as){x6=Ti.exports(Ns.text);const Tp=di.layout.get("text-rotate").evaluate(Wr,{},ro);as=new Ug(Pi,jr,Hi,eo,Eo,Ns,fi,Wi,to,Tp)}const kp=Ns.positionedLines.length===1;if(Ep+=t6(mr,jr,Ns,aa,di,to,Wr,po,os,Fn.vertical?o.WritingMode.horizontal:o.WritingMode.horizontalOnly,kp?_6:[Mo],ml,ob,Ho,ro),kp)break}Fn.vertical&&(y6+=t6(mr,jr,Fn.vertical,aa,di,to,Wr,po,os,o.WritingMode.vertical,["vertical"],ml,ab,Ho,ro));const uB=as?as.boxStartIndex:mr.collisionBoxArray.length,cB=as?as.boxEndIndex:mr.collisionBoxArray.length,dB=Ia?Ia.boxStartIndex:mr.collisionBoxArray.length,fB=Ia?Ia.boxEndIndex:mr.collisionBoxArray.length,hB=hl?hl.boxStartIndex:mr.collisionBoxArray.length,pB=hl?hl.boxEndIndex:mr.collisionBoxArray.length,mB=sa?sa.boxStartIndex:mr.collisionBoxArray.length,vB=sa?sa.boxEndIndex:mr.collisionBoxArray.length;let ss=-1;const Gg=(Mo,Ns)=>Mo&&Mo.circleDiameter?Math.max(Mo.circleDiameter,Ns):Ns;ss=Gg(as,ss),ss=Gg(Ia,ss),ss=Gg(hl,ss),ss=Gg(sa,ss);const b6=ss>-1?1:0;b6&&(ss*=Ma/Fi),mr.glyphOffsetArray.length>=Jd.MAX_GLYPHS&&B("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Wr.sortKey!==void 0&&mr.addToSortKeyRanges(mr.symbolInstances.length,Wr.sortKey),mr.symbolInstances.emplaceBack(jr.x,jr.y,ml.right>=0?ml.right:-1,ml.center>=0?ml.center:-1,ml.left>=0?ml.left:-1,ml.vertical||-1,ob,ab,x6,uB,cB,dB,fB,hB,pB,mB,vB,Hi,Ep,y6,Po,pl,b6,0,fi,sb,lb,ss)}(c,br,Ft,d,m,_,tr,c.layers[0],c.collisionBoxArray,s.index,s.sourceLayerIndex,c.index,Me,[nt,nt,nt,nt],lr,F,st,kt,hr,he,s,E,U,X,M)};if(er==="line")for(const Ft of Y5(s.geometry,0,0,xi,xi)){const br=H$(Ft,Ke,St,d.vertical||pe,m,24,Ze,c.overscaling,xi);for(const mr of br){const jr=pe;jr&&Y$(c,jr.text,Zt,mr)||Yt(Ft,mr)}}else if(er==="line-center"){for(const Ft of s.geometry)if(Ft.length>1){const br=K$(Ft,St,d.vertical||pe,m,24,Ze);br&&Yt(Ft,br)}}else if(s.type==="Polygon")for(const Ft of D_(s.geometry,0)){const br=G$(Ft,16);Yt(Ft[0],new uu(br.x,br.y,0))}else if(s.type==="LineString")for(const Ft of s.geometry)Yt(Ft,new uu(Ft[0].x,Ft[0].y,0));else if(s.type==="Point")for(const Ft of s.geometry)for(const br of Ft)Yt([br],new uu(br.x,br.y,0))}const cu=32640;function t6(c,s,d,m,_,E,M,D,F,U,X,re,ue,he,pe){const Oe=function(st,Ke,nt,kt,St,lr,hr,er){const Zt=kt.layout.get("text-rotate").evaluate(lr,{})*Math.PI/180,Ht=[];for(const tr of Ke.positionedLines)for(const Yt of tr.positionedGlyphs){if(!Yt.rect)continue;const Ft=Yt.rect||{};let br=4,mr=!0,jr=1,In=0;const Fn=(St||er)&&Yt.vertical,_i=Yt.metrics.advance*Yt.scale/2;if(er&&Ke.verticalizable){const Un=(Yt.scale-1)*Fi,Mi=(Fi-Yt.metrics.width*Yt.scale)/2;In=tr.lineOffset/2-(Yt.imageName?-Mi:Un)}if(Yt.imageName){const Un=hr[Yt.imageName];mr=Un.sdf,jr=Un.pixelRatio,br=1/jr}const aa=St?[Yt.x+_i,Yt.y]:[0,0];let Ki=St?[0,0]:[Yt.x+_i+nt[0],Yt.y+nt[1]-In],di=[0,0];Fn&&(di=Ki,Ki=[0,0]);const Pi=(Yt.metrics.left-br)*Yt.scale-_i+Ki[0],Hi=(-Yt.metrics.top-br)*Yt.scale+Ki[1],eo=Pi+Ft.w*Yt.scale/jr,Eo=Hi+Ft.h*Yt.scale/jr,fi=new ne(Pi,Hi),Wi=new ne(eo,Hi),to=new ne(Pi,Eo),po=new ne(eo,Eo);if(Fn){const Un=new ne(-_i,_i-Lg),Mi=-Math.PI/2,Wr=12-_i,Ho=new ne(22-Wr,-(Yt.imageName?Wr:0)),qi=new ne(...di);fi._rotateAround(Mi,Un)._add(Ho)._add(qi),Wi._rotateAround(Mi,Un)._add(Ho)._add(qi),to._rotateAround(Mi,Un)._add(Ho)._add(qi),po._rotateAround(Mi,Un)._add(Ho)._add(qi)}if(Zt){const Un=Math.sin(Zt),Mi=Math.cos(Zt),Wr=[Mi,-Un,Un,Mi];fi._matMult(Wr),Wi._matMult(Wr),to._matMult(Wr),po._matMult(Wr)}const ko=new ne(0,0),To=new ne(0,0);Ht.push({tl:fi,tr:Wi,bl:to,br:po,tex:Ft,writingMode:Ke.writingMode,glyphOffset:aa,sectionIndex:Yt.sectionIndex,isSDF:mr,pixelOffsetTL:ko,pixelOffsetBR:To,minFontScaleX:0,minFontScaleY:0})}return Ht}(0,d,D,_,E,M,m,c.allowVerticalPlacement),Me=c.textSizeData;let Ze=null;Me.kind==="source"?(Ze=[fl*_.layout.get("text-size").evaluate(M,{})],Ze[0]>cu&&B(`${c.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):Me.kind==="composite"&&(Ze=[fl*he.compositeTextSizes[0].evaluate(M,{},pe),fl*he.compositeTextSizes[1].evaluate(M,{},pe)],(Ze[0]>cu||Ze[1]>cu)&&B(`${c.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),c.addSymbols(c.text,Oe,Ze,D,E,M,U,s,F.lineStartIndex,F.lineLength,ue,pe);for(const st of X)re[st]=c.text.placedSymbolArray.length-1;return 4*Oe.length}function r6(c){for(const s in c)return c[s];return null}function Y$(c,s,d,m){const _=c.compareText;if(s in _){const E=_[s];for(let M=E.length-1;M>=0;M--)if(m.dist(E[M])<d)return!0}else _[s]=[];return _[s].push(m),!1}const Q$=su.VectorTileFeature.types,J$=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Kg(c,s,d,m,_,E,M,D,F,U,X,re,ue){const he=D?Math.min(cu,Math.round(D[0])):0,pe=D?Math.min(cu,Math.round(D[1])):0;c.emplaceBack(s,d,Math.round(32*m),Math.round(32*_),E,M,(he<<1)+(F?1:0),pe,16*U,16*X,256*re,256*ue)}function X_(c,s,d){c.emplaceBack(s.x,s.y,d),c.emplaceBack(s.x,s.y,d),c.emplaceBack(s.x,s.y,d),c.emplaceBack(s.x,s.y,d)}function eB(c){for(const s of c.sections)if(xg(s.text))return!0;return!1}class Y_{constructor(s){this.layoutVertexArray=new Ta,this.indexArray=new co,this.programConfigurations=s,this.segments=new Hr,this.dynamicLayoutVertexArray=new na,this.opacityVertexArray=new Pa,this.placedSymbolArray=new zt}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(s,d,m,_){this.isEmpty()||(m&&(this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,C$.members),this.indexBuffer=s.createIndexBuffer(this.indexArray,d),this.dynamicLayoutVertexBuffer=s.createVertexBuffer(this.dynamicLayoutVertexArray,S$.members,!0),this.opacityVertexBuffer=s.createVertexBuffer(this.opacityVertexArray,J$,!0),this.opacityVertexBuffer.itemSize=1),(m||_)&&this.programConfigurations.upload(s))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}dr("SymbolBuffers",Y_);class Q_{constructor(s,d,m){this.layoutVertexArray=new s,this.layoutAttributes=d,this.indexArray=new m,this.segments=new Hr,this.collisionVertexArray=new Uo}upload(s){this.layoutVertexBuffer=s.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=s.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=s.createVertexBuffer(this.collisionVertexArray,E$.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}dr("CollisionBuffers",Q_);class Jd{constructor(s){this.collisionBoxArray=s.collisionBoxArray,this.zoom=s.zoom,this.overscaling=s.overscaling,this.layers=s.layers,this.layerIds=this.layers.map(M=>M.id),this.index=s.index,this.pixelRatio=s.pixelRatio,this.sourceLayerIndex=s.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=I_([]),this.placementViewportMatrix=I_([]);const d=this.layers[0]._unevaluatedLayout._values;this.textSizeData=H5(this.zoom,d["text-size"]),this.iconSizeData=H5(this.zoom,d["icon-size"]);const m=this.layers[0].layout,_=m.get("symbol-sort-key"),E=m.get("symbol-z-order");this.canOverlap=eb(m,"text-overlap","text-allow-overlap")!=="never"||eb(m,"icon-overlap","icon-allow-overlap")!=="never"||m.get("text-ignore-placement")||m.get("icon-ignore-placement"),this.sortFeaturesByKey=E!=="viewport-y"&&!_.isConstant(),this.sortFeaturesByY=(E==="viewport-y"||E==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,m.get("symbol-placement")==="point"&&(this.writingModes=m.get("text-writing-mode").map(M=>o.WritingMode[M])),this.stateDependentLayerIds=this.layers.filter(M=>M.isStateDependent()).map(M=>M.id),this.sourceID=s.sourceID}createArrays(){this.text=new Y_(new Tc(this.layers,this.zoom,s=>/^text/.test(s))),this.icon=new Y_(new Tc(this.layers,this.zoom,s=>/^icon/.test(s))),this.glyphOffsetArray=new Gt,this.lineVertexArray=new sr,this.symbolInstances=new nr}calculateGlyphDependencies(s,d,m,_,E){for(let M=0;M<s.length;M++)if(d[s.charCodeAt(M)]=!0,(m||_)&&E){const D=bp[s.charAt(M)];D&&(d[D.charCodeAt(0)]=!0)}}populate(s,d,m){const _=this.layers[0],E=_.layout,M=E.get("text-font"),D=E.get("text-field"),F=E.get("icon-image"),U=(D.value.kind!=="constant"||D.value.value instanceof be&&!D.value.value.isEmpty()||D.value.value.toString().length>0)&&(M.value.kind!=="constant"||M.value.value.length>0),X=F.value.kind!=="constant"||!!F.value.value||Object.keys(F.parameters).length>0,re=E.get("symbol-sort-key");if(this.features=[],!U&&!X)return;const ue=d.iconDependencies,he=d.glyphDependencies,pe=d.availableImages,Oe=new Dn(this.zoom);for(const{feature:Me,id:Ze,index:st,sourceLayerIndex:Ke}of s){const nt=_._featureFilter.needGeometry,kt=Mc(Me,nt);if(!_._featureFilter.filter(Oe,kt,m))continue;let St,lr;if(nt||(kt.geometry=Pc(Me)),U){const er=_.getValueAndResolveTokens("text-field",kt,m,pe),Zt=be.factory(er);eB(Zt)&&(this.hasRTLText=!0),(!this.hasRTLText||Sc()==="unavailable"||this.hasRTLText&&jo.isParsed())&&(St=T$(Zt,_,kt))}if(X){const er=_.getValueAndResolveTokens("icon-image",kt,m,pe);lr=er instanceof Ae?er:Ae.fromString(er)}if(!St&&!lr)continue;const hr=this.sortFeaturesByKey?re.evaluate(kt,{},m):void 0;if(this.features.push({id:Ze,text:St,icon:lr,index:st,sourceLayerIndex:Ke,geometry:kt.geometry,properties:Me.properties,type:Q$[Me.type],sortKey:hr}),lr&&(ue[lr.name]=!0),St){const er=M.evaluate(kt,{},m).join(","),Zt=E.get("text-rotation-alignment")!=="viewport"&&E.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 tr=Vd(St.toString()),Yt=Ht.fontStack||er,Ft=he[Yt]=he[Yt]||{};this.calculateGlyphDependencies(Ht.text,Ft,Zt,this.allowVerticalPlacement,tr)}}}E.get("symbol-placement")==="line"&&(this.features=function(Me){const Ze={},st={},Ke=[];let nt=0;function kt(er){Ke.push(Me[er]),nt++}function St(er,Zt,Ht){const tr=st[er];return delete st[er],st[Zt]=tr,Ke[tr].geometry[0].pop(),Ke[tr].geometry[0]=Ke[tr].geometry[0].concat(Ht[0]),tr}function lr(er,Zt,Ht){const tr=Ze[Zt];return delete Ze[Zt],Ze[er]=tr,Ke[tr].geometry[0].shift(),Ke[tr].geometry[0]=Ht[0].concat(Ke[tr].geometry[0]),tr}function hr(er,Zt,Ht){const tr=Ht?Zt[0][Zt[0].length-1]:Zt[0][0];return`${er}:${tr.x}:${tr.y}`}for(let er=0;er<Me.length;er++){const Zt=Me[er],Ht=Zt.geometry,tr=Zt.text?Zt.text.toString():null;if(!tr){kt(er);continue}const Yt=hr(tr,Ht),Ft=hr(tr,Ht,!0);if(Yt in st&&Ft in Ze&&st[Yt]!==Ze[Ft]){const br=lr(Yt,Ft,Ht),mr=St(Yt,Ft,Ke[br].geometry);delete Ze[Yt],delete st[Ft],st[hr(tr,Ke[mr].geometry,!0)]=mr,Ke[br].geometry=null}else Yt in st?St(Yt,Ft,Ht):Ft in Ze?lr(Yt,Ft,Ht):(kt(er),Ze[Yt]=nt-1,st[Ft]=nt-1)}return Ke.filter(er=>er.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((Me,Ze)=>Me.sortKey-Ze.sortKey)}update(s,d,m){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(s,d,this.layers,m),this.icon.programConfigurations.updatePaintArrays(s,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(s){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(s),this.iconCollisionBox.upload(s)),this.text.upload(s,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(s,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(s,d){const m=this.lineVertexArray.length;if(s.segment!==void 0){let _=s.dist(d[s.segment+1]),E=s.dist(d[s.segment]);const M={};for(let D=s.segment+1;D<d.length;D++)M[D]={x:d[D].x,y:d[D].y,tileUnitDistanceFromAnchor:_},D<d.length-1&&(_+=d[D+1].dist(d[D]));for(let D=s.segment||0;D>=0;D--)M[D]={x:d[D].x,y:d[D].y,tileUnitDistanceFromAnchor:E},D>0&&(E+=d[D-1].dist(d[D]));for(let D=0;D<d.length;D++){const F=M[D];this.lineVertexArray.emplaceBack(F.x,F.y,F.tileUnitDistanceFromAnchor)}}return{lineStartIndex:m,lineLength:this.lineVertexArray.length-m}}addSymbols(s,d,m,_,E,M,D,F,U,X,re,ue){const he=s.indexArray,pe=s.layoutVertexArray,Oe=s.segments.prepareSegment(4*d.length,pe,he,this.canOverlap?M.sortKey:void 0),Me=this.glyphOffsetArray.length,Ze=Oe.vertexLength,st=this.allowVerticalPlacement&&D===o.WritingMode.vertical?Math.PI/2:0,Ke=M.text&&M.text.sections;for(let nt=0;nt<d.length;nt++){const{tl:kt,tr:St,bl:lr,br:hr,tex:er,pixelOffsetTL:Zt,pixelOffsetBR:Ht,minFontScaleX:tr,minFontScaleY:Yt,glyphOffset:Ft,isSDF:br,sectionIndex:mr}=d[nt],jr=Oe.vertexLength,In=Ft[1];Kg(pe,F.x,F.y,kt.x,In+kt.y,er.x,er.y,m,br,Zt.x,Zt.y,tr,Yt),Kg(pe,F.x,F.y,St.x,In+St.y,er.x+er.w,er.y,m,br,Ht.x,Zt.y,tr,Yt),Kg(pe,F.x,F.y,lr.x,In+lr.y,er.x,er.y+er.h,m,br,Zt.x,Ht.y,tr,Yt),Kg(pe,F.x,F.y,hr.x,In+hr.y,er.x+er.w,er.y+er.h,m,br,Ht.x,Ht.y,tr,Yt),X_(s.dynamicLayoutVertexArray,F,st),he.emplaceBack(jr,jr+1,jr+2),he.emplaceBack(jr+1,jr+2,jr+3),Oe.vertexLength+=4,Oe.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(Ft[0]),nt!==d.length-1&&mr===d[nt+1].sectionIndex||s.programConfigurations.populatePaintArrays(pe.length,M,M.index,{},ue,Ke&&Ke[mr])}s.placedSymbolArray.emplaceBack(F.x,F.y,Me,this.glyphOffsetArray.length-Me,Ze,U,X,F.segment,m?m[0]:0,m?m[1]:0,_[0],_[1],D,0,!1,0,re)}_addCollisionDebugVertex(s,d,m,_,E,M){return d.emplaceBack(0,0),s.emplaceBack(m.x,m.y,_,E,Math.round(M.x),Math.round(M.y))}addCollisionDebugVertices(s,d,m,_,E,M,D){const F=E.segments.prepareSegment(4,E.layoutVertexArray,E.indexArray),U=F.vertexLength,X=E.layoutVertexArray,re=E.collisionVertexArray,ue=D.anchorX,he=D.anchorY;this._addCollisionDebugVertex(X,re,M,ue,he,new ne(s,d)),this._addCollisionDebugVertex(X,re,M,ue,he,new ne(m,d)),this._addCollisionDebugVertex(X,re,M,ue,he,new ne(m,_)),this._addCollisionDebugVertex(X,re,M,ue,he,new ne(s,_)),F.vertexLength+=4;const pe=E.indexArray;pe.emplaceBack(U,U+1),pe.emplaceBack(U+1,U+2),pe.emplaceBack(U+2,U+3),pe.emplaceBack(U+3,U),F.primitiveLength+=4}addDebugCollisionBoxes(s,d,m,_){for(let E=s;E<d;E++){const M=this.collisionBoxArray.get(E);this.addCollisionDebugVertices(M.x1,M.y1,M.x2,M.y2,_?this.textCollisionBox:this.iconCollisionBox,M.anchorPoint,m)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new Q_(Os,R5.members,ns),this.iconCollisionBox=new Q_(Os,R5.members,ns);for(let s=0;s<this.symbolInstances.length;s++){const d=this.symbolInstances.get(s);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(s,d,m,_,E,M,D,F,U){const X={};for(let re=d;re<m;re++){const ue=s.get(re);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 re=_;re<E;re++){const ue=s.get(re);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 re=M;re<D;re++){const ue=s.get(re);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 re=F;re<U;re++){const ue=s.get(re);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(s){this.collisionArrays=[];for(let d=0;d<this.symbolInstances.length;d++){const m=this.symbolInstances.get(d);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(s,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(s,d){const m=s.placedSymbolArray.get(d),_=m.vertexStartIndex+4*m.numGlyphs;for(let E=m.vertexStartIndex;E<_;E+=4)s.indexArray.emplaceBack(E,E+1,E+2),s.indexArray.emplaceBack(E+1,E+2,E+3)}getSortedSymbolIndexes(s){if(this.sortedAngle===s&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;const d=Math.sin(s),m=Math.cos(s),_=[],E=[],M=[];for(let D=0;D<this.symbolInstances.length;++D){M.push(D);const F=this.symbolInstances.get(D);_.push(0|Math.round(d*F.anchorX+m*F.anchorY)),E.push(F.featureIndex)}return M.sort((D,F)=>_[D]-_[F]||E[F]-E[D]),M}addToSortKeyRanges(s,d){const m=this.sortKeyRanges[this.sortKeyRanges.length-1];m&&m.sortKey===d?m.symbolInstanceEnd=s+1:this.sortKeyRanges.push({sortKey:d,symbolInstanceStart:s,symbolInstanceEnd:s+1})}sortFeatures(s){if(this.sortFeaturesByY&&this.sortedAngle!==s&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(s),this.sortedAngle=s,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((_,E,M)=>{_>=0&&M.indexOf(_)===E&&this.addIndicesForPlacedSymbol(this.text,_)}),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)}}}dr("SymbolBucket",Jd,{omit:["layers","collisionBoxArray","features","compareText"]}),Jd.MAX_GLYPHS=65535,Jd.addDynamicAttributes=X_;const tB=new Li({"symbol-placement":new pr(Fe.layout_symbol["symbol-placement"]),"symbol-spacing":new pr(Fe.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new pr(Fe.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Er(Fe.layout_symbol["symbol-sort-key"]),"symbol-z-order":new pr(Fe.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new pr(Fe.layout_symbol["icon-allow-overlap"]),"icon-overlap":new pr(Fe.layout_symbol["icon-overlap"]),"icon-ignore-placement":new pr(Fe.layout_symbol["icon-ignore-placement"]),"icon-optional":new pr(Fe.layout_symbol["icon-optional"]),"icon-rotation-alignment":new pr(Fe.layout_symbol["icon-rotation-alignment"]),"icon-size":new Er(Fe.layout_symbol["icon-size"]),"icon-text-fit":new pr(Fe.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new pr(Fe.layout_symbol["icon-text-fit-padding"]),"icon-image":new Er(Fe.layout_symbol["icon-image"]),"icon-rotate":new Er(Fe.layout_symbol["icon-rotate"]),"icon-padding":new Er(Fe.layout_symbol["icon-padding"]),"icon-keep-upright":new pr(Fe.layout_symbol["icon-keep-upright"]),"icon-offset":new Er(Fe.layout_symbol["icon-offset"]),"icon-anchor":new Er(Fe.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new pr(Fe.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new pr(Fe.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new pr(Fe.layout_symbol["text-rotation-alignment"]),"text-field":new Er(Fe.layout_symbol["text-field"]),"text-font":new Er(Fe.layout_symbol["text-font"]),"text-size":new Er(Fe.layout_symbol["text-size"]),"text-max-width":new Er(Fe.layout_symbol["text-max-width"]),"text-line-height":new pr(Fe.layout_symbol["text-line-height"]),"text-letter-spacing":new Er(Fe.layout_symbol["text-letter-spacing"]),"text-justify":new Er(Fe.layout_symbol["text-justify"]),"text-radial-offset":new Er(Fe.layout_symbol["text-radial-offset"]),"text-variable-anchor":new pr(Fe.layout_symbol["text-variable-anchor"]),"text-anchor":new Er(Fe.layout_symbol["text-anchor"]),"text-max-angle":new pr(Fe.layout_symbol["text-max-angle"]),"text-writing-mode":new pr(Fe.layout_symbol["text-writing-mode"]),"text-rotate":new Er(Fe.layout_symbol["text-rotate"]),"text-padding":new pr(Fe.layout_symbol["text-padding"]),"text-keep-upright":new pr(Fe.layout_symbol["text-keep-upright"]),"text-transform":new Er(Fe.layout_symbol["text-transform"]),"text-offset":new Er(Fe.layout_symbol["text-offset"]),"text-allow-overlap":new pr(Fe.layout_symbol["text-allow-overlap"]),"text-overlap":new pr(Fe.layout_symbol["text-overlap"]),"text-ignore-placement":new pr(Fe.layout_symbol["text-ignore-placement"]),"text-optional":new pr(Fe.layout_symbol["text-optional"])});var J_={paint:new Li({"icon-opacity":new Er(Fe.paint_symbol["icon-opacity"]),"icon-color":new Er(Fe.paint_symbol["icon-color"]),"icon-halo-color":new Er(Fe.paint_symbol["icon-halo-color"]),"icon-halo-width":new Er(Fe.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Er(Fe.paint_symbol["icon-halo-blur"]),"icon-translate":new pr(Fe.paint_symbol["icon-translate"]),"icon-translate-anchor":new pr(Fe.paint_symbol["icon-translate-anchor"]),"text-opacity":new Er(Fe.paint_symbol["text-opacity"]),"text-color":new Er(Fe.paint_symbol["text-color"],{runtimeType:$r,getOverride:c=>c.textColor,hasOverride:c=>!!c.textColor}),"text-halo-color":new Er(Fe.paint_symbol["text-halo-color"]),"text-halo-width":new Er(Fe.paint_symbol["text-halo-width"]),"text-halo-blur":new Er(Fe.paint_symbol["text-halo-blur"]),"text-translate":new pr(Fe.paint_symbol["text-translate"]),"text-translate-anchor":new pr(Fe.paint_symbol["text-translate-anchor"])}),layout:tB};class n6{constructor(s){if(s.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=s.property.overrides?s.property.overrides.runtimeType:Or,this.defaultValue=s}evaluate(s){if(s.formattedSection){const d=this.defaultValue.property.overrides;if(d&&d.hasOverride(s.formattedSection))return d.getOverride(s.formattedSection)}return s.feature&&s.featureState?this.defaultValue.evaluate(s.feature,s.featureState):this.defaultValue.property.specification.default}eachChild(s){this.defaultValue.isConstant()||s(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}dr("FormatSectionOverride",n6,{omit:["defaultValue"]});class Hg extends ka{constructor(s){super(s,J_)}recalculate(s,d){if(super.recalculate(s,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 _=[];for(const E of m)_.indexOf(E)<0&&_.push(E);this.layout._values["text-writing-mode"]=_}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(s,d,m,_){const E=this.layout.get(s).evaluate(d,{},m,_),M=this._unevaluatedLayout._values[s];return M.isDataDriven()||dc(M.value)||!E?E:function(D,F){return F.replace(/{([^{}]+)}/g,(U,X)=>X in D?String(D[X]):"")}(d.properties,E)}createBucket(s){return new Jd(s)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const s of J_.paint.overridableProperties){if(!Hg.hasPaintOverride(this.layout,s))continue;const d=this.paint.get(s),m=new n6(d),_=new zd(m,d.property.specification);let E=null;E=d.value.kind==="constant"||d.value.kind==="source"?new hc("source",_):new Zh("composite",_,d.value.zoomStops),this.paint._values[s]=new Ea(d.property,E,d.parameters)}}_handleOverridablePaintPropertyUpdate(s,d,m){return!(!this.layout||d.isDataDriven()||m.isDataDriven())&&Hg.hasPaintOverride(this.layout,s)}static hasPaintOverride(s,d){const m=s.get("text-field"),_=J_.paint.properties[d];let E=!1;const M=D=>{for(const F of D)if(_.overrides&&_.overrides.hasOverride(F))return void(E=!0)};if(m.value.kind==="constant"&&m.value.value instanceof be)M(m.value.value.sections);else if(m.value.kind==="source"){const D=U=>{E||(U instanceof bt&&Be(U.value)===Cr?M(U.value.sections):U instanceof Ad?M(U.sections):U.eachChild(D))},F=m.value;F._styleExpression&&D(F._styleExpression.expression)}return E}}function eb(c,s,d){let m="never";const _=c.get(s);return _?m=_:c.get(d)&&(m="always"),m}var rB={paint:new Li({"background-color":new pr(Fe.paint_background["background-color"]),"background-pattern":new sp(Fe.paint_background["background-pattern"]),"background-opacity":new pr(Fe.paint_background["background-opacity"])})},nB={paint:new Li({"raster-opacity":new pr(Fe.paint_raster["raster-opacity"]),"raster-hue-rotate":new pr(Fe.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new pr(Fe.paint_raster["raster-brightness-min"]),"raster-brightness-max":new pr(Fe.paint_raster["raster-brightness-max"]),"raster-saturation":new pr(Fe.paint_raster["raster-saturation"]),"raster-contrast":new pr(Fe.paint_raster["raster-contrast"]),"raster-resampling":new pr(Fe.paint_raster["raster-resampling"]),"raster-fade-duration":new pr(Fe.paint_raster["raster-fade-duration"])})};class iB extends ka{constructor(s){super(s,{}),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=s}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 oB={circle:class extends ka{constructor(c){super(c,DF)}createBucket(c){return new T_(c)}queryRadius(c){const s=c;return fp("circle-radius",this,s)+fp("circle-stroke-width",this,s)+Pg(this.paint.get("circle-translate"))}queryIntersectsFeature(c,s,d,m,_,E,M,D){const F=Mg(c,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),E.angle,M),U=this.paint.get("circle-radius").evaluate(s,d)+this.paint.get("circle-stroke-width").evaluate(s,d),X=this.paint.get("circle-pitch-alignment")==="map",re=X?F:function(he,pe){return he.map(Oe=>p5(Oe,pe))}(F,D),ue=X?U*M:U;for(const he of m)for(const pe of he){const Oe=X?pe:p5(pe,D);let Me=ue;const Ze=Ig([],[pe.x,pe.y,0,1],D);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?Me*=Ze[3]/E.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(Me*=E.cameraToCenterDistance/Ze[3]),RF(re,Oe,Me))return!0}return!1}},heatmap:class extends ka{constructor(c){super(c,FF),this._updateColorRamp()}createBucket(c){return new m5(c)}_handleSpecialPaintPropertyUpdate(c){c==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=g5({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 ka{constructor(c){super(c,$F)}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}},fill:class extends ka{constructor(c){super(c,t$)}recalculate(c,s){super.recalculate(c,s);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(c){return new $_(c)}queryRadius(){return Pg(this.paint.get("fill-translate"))}queryIntersectsFeature(c,s,d,m,_,E,M){return a5(Mg(c,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),E.angle,M),m)}isTileClipped(){return!0}},"fill-extrusion":class extends ka{constructor(c){super(c,m$)}createBucket(c){return new V_(c)}queryRadius(){return Pg(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(c,s,d,m,_,E,M,D){const F=Mg(c,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),E.angle,M),U=this.paint.get("fill-extrusion-height").evaluate(s,d),X=this.paint.get("fill-extrusion-base").evaluate(s,d),re=function(he,pe,Oe,Me){const Ze=[];for(const st of he){const Ke=[st.x,st.y,0,1];Ig(Ke,Ke,pe),Ze.push(new ne(Ke[0]/Ke[3],Ke[1]/Ke[3]))}return Ze}(F,D),ue=function(he,pe,Oe,Me){const Ze=[],st=[],Ke=Me[8]*pe,nt=Me[9]*pe,kt=Me[10]*pe,St=Me[11]*pe,lr=Me[8]*Oe,hr=Me[9]*Oe,er=Me[10]*Oe,Zt=Me[11]*Oe;for(const Ht of he){const tr=[],Yt=[];for(const Ft of Ht){const br=Ft.x,mr=Ft.y,jr=Me[0]*br+Me[4]*mr+Me[12],In=Me[1]*br+Me[5]*mr+Me[13],Fn=Me[2]*br+Me[6]*mr+Me[14],_i=Me[3]*br+Me[7]*mr+Me[15],aa=Fn+kt,Ki=_i+St,di=jr+lr,Pi=In+hr,Hi=Fn+er,eo=_i+Zt,Eo=new ne((jr+Ke)/Ki,(In+nt)/Ki);Eo.z=aa/Ki,tr.push(Eo);const fi=new ne(di/eo,Pi/eo);fi.z=Hi/eo,Yt.push(fi)}Ze.push(tr),st.push(Yt)}return[Ze,st]}(m,X,U,D);return function(he,pe,Oe){let Me=1/0;a5(Oe,pe)&&(Me=k5(Oe,pe[0]));for(let Ze=0;Ze<pe.length;Ze++){const st=pe[Ze],Ke=he[Ze];for(let nt=0;nt<st.length-1;nt++){const kt=st[nt],St=[kt,st[nt+1],Ke[nt+1],Ke[nt],kt];o5(Oe,St)&&(Me=Math.min(Me,k5(Oe,St)))}}return Me!==1/0&&Me}(ue[0],ue[1],re)}},line:class extends ka{constructor(c){super(c,P5),this.gradientVersion=0}_handleSpecialPaintPropertyUpdate(c){c==="line-gradient"&&(this.stepInterpolant=this._transitionablePaint._values["line-gradient"].value.expression._styleExpression.expression instanceof Ja,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER)}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(c,s){super.recalculate(c,s),this.paint._values["line-floorwidth"]=M5.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,c)}createBucket(c){return new j_(c)}queryRadius(c){const s=c,d=I5(fp("line-width",this,s),fp("line-gap-width",this,s)),m=fp("line-offset",this,s);return d/2+Math.abs(m)+Pg(this.paint.get("line-translate"))}queryIntersectsFeature(c,s,d,m,_,E,M){const D=Mg(c,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),E.angle,M),F=M/2*I5(this.paint.get("line-width").evaluate(s,d),this.paint.get("line-gap-width").evaluate(s,d)),U=this.paint.get("line-offset").evaluate(s,d);return U&&(m=function(X,re){const ue=[];for(let he=0;he<X.length;he++){const pe=X[he],Oe=[];for(let Me=0;Me<pe.length;Me++){const Ze=pe[Me-1],st=pe[Me],Ke=pe[Me+1],nt=Me===0?new ne(0,0):st.sub(Ze)._unit()._perp(),kt=Me===pe.length-1?new ne(0,0):Ke.sub(st)._unit()._perp(),St=nt._add(kt)._unit(),lr=St.x*kt.x+St.y*kt.y;lr!==0&&St._mult(1/lr),Oe.push(St._mult(re)._add(st))}ue.push(Oe)}return ue}(m,U*M)),function(X,re,ue){for(let he=0;he<re.length;he++){const pe=re[he];if(X.length>=3){for(let Oe=0;Oe<pe.length;Oe++)if(Wd(X,pe[Oe]))return!0}if(OF(X,pe,ue))return!0}return!1}(D,m,F)}isTileClipped(){return!0}},symbol:Hg,background:class extends ka{constructor(c){super(c,rB)}},raster:class extends ka{constructor(c){super(c,nB)}}};class aB{constructor(s){this._callback=s,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 i6=63710088e-1;class ri{constructor(s,d){if(isNaN(s)||isNaN(d))throw new Error(`Invalid LngLat object: (${s}, ${d})`);if(this.lng=+s,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 ri(k(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(s){const d=Math.PI/180,m=this.lat*d,_=s.lat*d,E=Math.sin(m)*Math.sin(_)+Math.cos(m)*Math.cos(_)*Math.cos((s.lng-this.lng)*d);return i6*Math.acos(Math.min(E,1))}toBounds(s=0){const d=360*s/40075017,m=d/Math.cos(Math.PI/180*this.lat);return new Rc(new ri(this.lng-m,this.lat-d),new ri(this.lng+m,this.lat+d))}static convert(s){if(s instanceof ri)return s;if(Array.isArray(s)&&(s.length===2||s.length===3))return new ri(Number(s[0]),Number(s[1]));if(!Array.isArray(s)&&typeof s=="object"&&s!==null)return new ri(Number("lng"in s?s.lng:s.lon),Number(s.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 Rc{constructor(s,d){s&&(d?this.setSouthWest(s).setNorthEast(d):s.length===4?this.setSouthWest([s[0],s[1]]).setNorthEast([s[2],s[3]]):this.setSouthWest(s[0]).setNorthEast(s[1]))}setNorthEast(s){return this._ne=s instanceof ri?new ri(s.lng,s.lat):ri.convert(s),this}setSouthWest(s){return this._sw=s instanceof ri?new ri(s.lng,s.lat):ri.convert(s),this}extend(s){const d=this._sw,m=this._ne;let _,E;if(s instanceof ri)_=s,E=s;else{if(!(s instanceof Rc))return Array.isArray(s)?s.length===4||s.every(Array.isArray)?this.extend(Rc.convert(s)):this.extend(ri.convert(s)):this;if(_=s._sw,E=s._ne,!_||!E)return this}return d||m?(d.lng=Math.min(_.lng,d.lng),d.lat=Math.min(_.lat,d.lat),m.lng=Math.max(E.lng,m.lng),m.lat=Math.max(E.lat,m.lat)):(this._sw=new ri(_.lng,_.lat),this._ne=new ri(E.lng,E.lat)),this}getCenter(){return new ri((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 ri(this.getWest(),this.getNorth())}getSouthEast(){return new ri(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(s){const{lng:d,lat:m}=ri.convert(s);let _=this._sw.lng<=d&&d<=this._ne.lng;return this._sw.lng>this._ne.lng&&(_=this._sw.lng>=d&&d>=this._ne.lng),this._sw.lat<=m&&m<=this._ne.lat&&_}static convert(s){return s instanceof Rc?s:s&&new Rc(s)}}const o6=2*Math.PI*i6;function a6(c){return o6*Math.cos(c*Math.PI/180)}function s6(c){return(180+c)/360}function l6(c){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+c*Math.PI/360)))/360}function u6(c,s){return c/a6(s)}function tb(c){return 360/Math.PI*Math.atan(Math.exp((180-360*c)*Math.PI/180))-90}class Wg{constructor(s,d,m=0){this.x=+s,this.y=+d,this.z=+m}static fromLngLat(s,d=0){const m=ri.convert(s);return new Wg(s6(m.lng),l6(m.lat),u6(d,m.lat))}toLngLat(){return new ri(360*this.x-180,tb(this.y))}toAltitude(){return this.z*a6(tb(this.y))}meterInMercatorCoordinateUnits(){return 1/o6*(s=tb(this.y),1/Math.cos(s*Math.PI/180));var s}}function c6(c,s,d){var m=2*Math.PI*6378137/256/Math.pow(2,d);return[c*m-2*Math.PI*6378137/2,s*m-2*Math.PI*6378137/2]}class rb{constructor(s,d,m){if(s<0||s>25||m<0||m>=Math.pow(2,s)||d<0||d>=Math.pow(2,s))throw new Error(`x=${d}, y=${m}, z=${s} outside of bounds. 0<=x<${Math.pow(2,s)}, 0<=y<${Math.pow(2,s)} 0<=z<=25 `);this.z=s,this.x=d,this.y=m,this.key=Cp(0,s,s,d,m)}equals(s){return this.z===s.z&&this.x===s.x&&this.y===s.y}url(s,d,m){const _=(M=this.y,D=this.z,F=c6(256*(E=this.x),256*(M=Math.pow(2,D)-M-1),D),U=c6(256*(E+1),256*(M+1),D),F[0]+","+F[1]+","+U[0]+","+U[1]);var E,M,D,F,U;const X=function(re,ue,he){let pe,Oe="";for(let Me=re;Me>0;Me--)pe=1<<Me-1,Oe+=(ue&pe?1:0)+(he&pe?2:0);return Oe}(this.z,this.x,this.y);return s[(this.x+this.y)%s.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,_)}isChildOf(s){const d=this.z-s.z;return d>0&&s.x===this.x>>d&&s.y===this.y>>d}getTilePoint(s){const d=Math.pow(2,this.z);return new ne((s.x*d-this.x)*xi,(s.y*d-this.y)*xi)}toString(){return`${this.z}/${this.x}/${this.y}`}}class d6{constructor(s,d){this.wrap=s,this.canonical=d,this.key=Cp(s,d.z,d.z,d.x,d.y)}}class oa{constructor(s,d,m,_,E){if(s<m)throw new Error(`overscaledZ should be >= z; overscaledZ = ${s}; z = ${m}`);this.overscaledZ=s,this.wrap=d,this.canonical=new rb(m,+_,+E),this.key=Cp(d,s,m,_,E)}clone(){return new oa(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(s){return this.overscaledZ===s.overscaledZ&&this.wrap===s.wrap&&this.canonical.equals(s.canonical)}scaledTo(s){if(s>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${s}; overscaledZ = ${this.overscaledZ}`);const d=this.canonical.z-s;return s>this.canonical.z?new oa(s,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new oa(s,this.wrap,s,this.canonical.x>>d,this.canonical.y>>d)}calculateScaledKey(s,d){if(s>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${s}; overscaledZ = ${this.overscaledZ}`);const m=this.canonical.z-s;return s>this.canonical.z?Cp(this.wrap*+d,s,this.canonical.z,this.canonical.x,this.canonical.y):Cp(this.wrap*+d,s,s,this.canonical.x>>m,this.canonical.y>>m)}isChildOf(s){if(s.wrap!==this.wrap)return!1;const d=this.canonical.z-s.canonical.z;return s.overscaledZ===0||s.overscaledZ<this.overscaledZ&&s.canonical.x===this.canonical.x>>d&&s.canonical.y===this.canonical.y>>d}children(s){if(this.overscaledZ>=s)return[new oa(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,_=2*this.canonical.y;return[new oa(d,this.wrap,d,m,_),new oa(d,this.wrap,d,m+1,_),new oa(d,this.wrap,d,m,_+1),new oa(d,this.wrap,d,m+1,_+1)]}isLessThan(s){return this.wrap<s.wrap||!(this.wrap>s.wrap)&&(this.overscaledZ<s.overscaledZ||!(this.overscaledZ>s.overscaledZ)&&(this.canonical.x<s.canonical.x||!(this.canonical.x>s.canonical.x)&&this.canonical.y<s.canonical.y))}wrapped(){return new oa(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(s){return new oa(this.overscaledZ,s,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new d6(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(s){return this.canonical.getTilePoint(new Wg(s.x-this.wrap,s.y))}}function Cp(c,s,d,m,_){(c*=2)<0&&(c=-1*c-1);const E=1<<d;return(E*E*c+E*_+m).toString(36)+d.toString(36)+s.toString(36)}dr("CanonicalTileID",rb),dr("OverscaledTileID",oa,{omit:["posMatrix"]});class f6{constructor(s,d,m){if(this.uid=s,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 _=this.dim=d.height-2;this.data=new Uint32Array(d.data.buffer),this.encoding=m||"mapbox";for(let E=0;E<_;E++)this.data[this._idx(-1,E)]=this.data[this._idx(0,E)],this.data[this._idx(_,E)]=this.data[this._idx(_-1,E)],this.data[this._idx(E,-1)]=this.data[this._idx(E,0)],this.data[this._idx(E,_)]=this.data[this._idx(E,_-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(_,-1)]=this.data[this._idx(_-1,0)],this.data[this._idx(-1,_)]=this.data[this._idx(0,_-1)],this.data[this._idx(_,_)]=this.data[this._idx(_-1,_-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let E=0;E<_;E++)for(let M=0;M<_;M++){const D=this.get(E,M);D>this.max&&(this.max=D),D<this.min&&(this.min=D)}}get(s,d){const m=new Uint8Array(this.data.buffer),_=4*this._idx(s,d);return(this.encoding==="terrarium"?this._unpackTerrarium:this._unpackMapbox)(m[_],m[_+1],m[_+2])}getUnpackVector(){return this.encoding==="terrarium"?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]}_idx(s,d){if(s<-1||s>=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+(s+1)}_unpackMapbox(s,d,m){return(256*s*256+256*d+m)/10-1e4}_unpackTerrarium(s,d,m){return 256*s+d+m/256-32768}getPixels(){return new ia({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(s,d,m){if(this.dim!==s.dim)throw new Error("dem dimension mismatch");let _=d*this.dim,E=d*this.dim+this.dim,M=m*this.dim,D=m*this.dim+this.dim;switch(d){case-1:_=E-1;break;case 1:E=_+1}switch(m){case-1:M=D-1;break;case 1:D=M+1}const F=-d*this.dim,U=-m*this.dim;for(let X=M;X<D;X++)for(let re=_;re<E;re++)this.data[this._idx(re,X)]=s.data[this._idx(re+F,X+U)]}}dr("DEMData",f6);class h6{constructor(s){this._stringToNumber={},this._numberToString=[];for(let d=0;d<s.length;d++){const m=s[d];this._stringToNumber[m]=d,this._numberToString[d]=m}}encode(s){return this._stringToNumber[s]}decode(s){if(s>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${s} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[s]}}class p6{constructor(s,d,m,_,E){this.type="Feature",this._vectorTileFeature=s,s._z=d,s._x=m,s._y=_,this.properties=s.properties,this.id=E}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(s){this._geometry=s}toJSON(){const s={geometry:this.geometry};for(const d in this)d!=="_geometry"&&d!=="_vectorTileFeature"&&(s[d]=this[d]);return s}}class m6{constructor(s,d){this.tileID=s,this.x=s.canonical.x,this.y=s.canonical.y,this.z=s.canonical.z,this.grid=new Cc(xi,16,0),this.grid3D=new Cc(xi,16,0),this.featureIndexArray=new Vr,this.promoteId=d}insert(s,d,m,_,E,M){const D=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(m,_,E);const F=M?this.grid3D:this.grid;for(let U=0;U<d.length;U++){const X=d[U],re=[1/0,1/0,-1/0,-1/0];for(let ue=0;ue<X.length;ue++){const he=X[ue];re[0]=Math.min(re[0],he.x),re[1]=Math.min(re[1],he.y),re[2]=Math.max(re[2],he.x),re[3]=Math.max(re[3],he.y)}re[0]<xi&&re[1]<xi&&re[2]>=0&&re[3]>=0&&F.insert(D,re[0],re[1],re[2],re[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new su.VectorTile(new U_(this.rawTileData)).layers,this.sourceLayerCoder=new h6(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(s,d,m,_){this.loadVTLayers();const E=s.params||{},M=xi/s.tileSize/s.scale,D=Fd(E.filter),F=s.queryGeometry,U=s.queryPadding*M,X=g6(F),re=this.grid.query(X.minX-U,X.minY-U,X.maxX+U,X.maxY+U),ue=g6(s.cameraQueryGeometry),he=this.grid3D.query(ue.minX-U,ue.minY-U,ue.maxX+U,ue.maxY+U,(Me,Ze,st,Ke)=>function(nt,kt,St,lr,hr){for(const Zt of nt)if(kt<=Zt.x&&St<=Zt.y&&lr>=Zt.x&&hr>=Zt.y)return!0;const er=[new ne(kt,St),new ne(kt,hr),new ne(lr,hr),new ne(lr,St)];if(nt.length>2){for(const Zt of er)if(Wd(nt,Zt))return!0}for(let Zt=0;Zt<nt.length-1;Zt++)if(NF(nt[Zt],nt[Zt+1],er))return!0;return!1}(s.cameraQueryGeometry,Me-U,Ze-U,st+U,Ke+U));for(const Me of he)re.push(Me);re.sort(sB);const pe={};let Oe;for(let Me=0;Me<re.length;Me++){const Ze=re[Me];if(Ze===Oe)continue;Oe=Ze;const st=this.featureIndexArray.get(Ze);let Ke=null;this.loadMatchingFeature(pe,st.bucketIndex,st.sourceLayerIndex,st.featureIndex,D,E.layers,E.availableImages,d,m,_,(nt,kt,St)=>(Ke||(Ke=Pc(nt)),kt.queryIntersectsFeature(F,nt,St,Ke,this.z,s.transform,M,s.pixelPosMatrix)))}return pe}loadMatchingFeature(s,d,m,_,E,M,D,F,U,X,re){const ue=this.bucketLayerIDs[d];if(M&&!function(Me,Ze){for(let st=0;st<Me.length;st++)if(Ze.indexOf(Me[st])>=0)return!0;return!1}(M,ue))return;const he=this.sourceLayerCoder.decode(m),pe=this.vtLayers[he].feature(_);if(E.needGeometry){const Me=Mc(pe,!0);if(!E.filter(new Dn(this.tileID.overscaledZ),Me,this.tileID.canonical))return}else if(!E.filter(new Dn(this.tileID.overscaledZ),pe))return;const Oe=this.getId(pe,he);for(let Me=0;Me<ue.length;Me++){const Ze=ue[Me];if(M&&M.indexOf(Ze)<0)continue;const st=F[Ze];if(!st)continue;let Ke={};Oe&&X&&(Ke=X.getState(st.sourceLayer||"_geojsonTileLayer",Oe));const nt=T({},U[Ze]);nt.paint=v6(nt.paint,st.paint,pe,Ke,D),nt.layout=v6(nt.layout,st.layout,pe,Ke,D);const kt=!re||re(pe,st,Ke);if(!kt)continue;const St=new p6(pe,this.z,this.x,this.y,Oe);St.layer=nt;let lr=s[Ze];lr===void 0&&(lr=s[Ze]=[]),lr.push({featureIndex:_,feature:St,intersectionZ:kt})}}lookupSymbolFeatures(s,d,m,_,E,M,D,F){const U={};this.loadVTLayers();const X=Fd(E);for(const re of s)this.loadMatchingFeature(U,m,_,re,X,M,D,F,d);return U}hasLayer(s){for(const d of this.bucketLayerIDs)for(const m of d)if(s===m)return!0;return!1}getId(s,d){let m=s.id;return this.promoteId&&(m=s.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[d]],typeof m=="boolean"&&(m=Number(m))),m}}function v6(c,s,d,m,_){return I(c,(E,M)=>{const D=s instanceof kc?s.get(M):null;return D&&D.evaluate?D.evaluate(d,m,_):D})}function g6(c){let s=1/0,d=1/0,m=-1/0,_=-1/0;for(const E of c)s=Math.min(s,E.x),d=Math.min(d,E.y),m=Math.max(m,E.x),_=Math.max(_,E.y);return{minX:s,minY:d,maxX:m,maxY:_}}function sB(c,s){return s-c}var nb;dr("FeatureIndex",m6,{omit:["rawTileData","sourceLayerCoder"]}),o.PerformanceMarkers=void 0,(nb=o.PerformanceMarkers||(o.PerformanceMarkers={})).create="create",nb.load="load",nb.fullLoad="fullLoad";let qg=null,Sp=[];const ib=1e3/30,lB={mark(c){performance.mark(c)},frame(c){const s=c;qg!=null&&Sp.push(s-qg),qg=s},clearMetrics(){qg=null,Sp=[],performance.clearMeasures("loadTime"),performance.clearMeasures("fullLoadTime");for(const c in o.PerformanceMarkers)performance.clearMarks(o.PerformanceMarkers[c])},getPerformanceMetrics(){performance.measure("loadTime",o.PerformanceMarkers.create,o.PerformanceMarkers.load),performance.measure("fullLoadTime",o.PerformanceMarkers.create,o.PerformanceMarkers.fullLoad);const c=performance.getEntriesByName("loadTime")[0].duration,s=performance.getEntriesByName("fullLoadTime")[0].duration,d=Sp.length,m=1/(Sp.reduce((E,M)=>E+M,0)/d/1e3),_=Sp.filter(E=>E>ib).reduce((E,M)=>E+(M-ib)/ib,0);return{loadTime:c,fullLoadTime:s,fps:m,percentDroppedFrames:_/(d+_)*100}}};o.AJAXError=Ye,o.ARRAY_TYPE=ho,o.Actor=class{constructor(c,s,d){this.target=c,this.parent=s,this.mapId=d,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},A(["receive","process"],this),this.invoker=new aB(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=H()?c:window}send(c,s,d,m,_=!1){const E=Math.round(1e18*Math.random()).toString(36).substring(0,10);d&&(this.callbacks[E]=d);const M=Z(this.globalScope)?void 0:[];return this.target.postMessage({id:E,type:c,hasCallback:!!d,targetMapId:m,mustQueue:_,sourceMapId:this.mapId,data:ol(s,M)},M),{cancel:()=>{d&&delete this.callbacks[E],this.target.postMessage({id:E,type:"<cancel>",targetMapId:m,sourceMapId:this.mapId})}}}receive(c){const s=c.data,d=s.id;if(d&&(!s.targetMapId||this.mapId===s.targetMapId))if(s.type==="<cancel>"){delete this.tasks[d];const m=this.cancelCallbacks[d];delete this.cancelCallbacks[d],m&&m()}else H()||s.mustQueue?(this.tasks[d]=s,this.taskQueue.push(d),this.invoker.trigger()):this.processTask(d,s)}process(){if(!this.taskQueue.length)return;const c=this.taskQueue.shift(),s=this.tasks[c];delete this.tasks[c],this.taskQueue.length&&this.invoker.trigger(),s&&this.processTask(c,s)}processTask(c,s){if(s.type==="<response>"){const d=this.callbacks[c];delete this.callbacks[c],d&&(s.error?d(Ts(s.error)):d(null,Ts(s.data)))}else{let d=!1;const m=Z(this.globalScope)?void 0:[],_=s.hasCallback?(D,F)=>{d=!0,delete this.cancelCallbacks[c],this.target.postMessage({id:c,type:"<response>",sourceMapId:this.mapId,error:D?ol(D):null,data:ol(F,m)},m)}:D=>{d=!0};let E=null;const M=Ts(s.data);if(this.parent[s.type])E=this.parent[s.type](s.sourceMapId,M,_);else if(this.parent.getWorkerSource){const D=s.type.split(".");E=this.parent.getWorkerSource(s.sourceMapId,D[0],M.source)[D[1]](M,_)}else _(new Error(`Could not find function ${s.type}`));!d&&E&&E.cancel&&(this.cancelCallbacks[c]=E.cancel)}}remove(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)}},o.AlphaImage=pp,o.CanonicalTileID=rb,o.CollisionBoxArray=gt,o.CollisionCircleLayoutArray=class extends ee{},o.Color=ae,o.DEMData=f6,o.DataConstantProperty=pr,o.DictionaryCoder=h6,o.EXTENT=xi,o.ErrorEvent=jt,o.EvaluationParameters=Dn,o.Event=Wt,o.Evented=Qt,o.FeatureIndex=m6,o.FillBucket=$_,o.FillExtrusionBucket=V_,o.GeoJSONFeature=p6,o.ImageAtlas=$5,o.ImagePosition=H_,o.LineBucket=j_,o.LineStripIndexArray=class extends Pe{},o.LngLat=ri,o.LngLatBounds=Rc,o.MercatorCoordinate=Wg,o.ONE_EM=Fi,o.OverscaledTileID=oa,o.PerformanceUtils=lB,o.PosArray=_r,o.Properties=Li,o.QuadTriangleArray=class extends fe{},o.RGBAImage=ia,o.RasterBoundsArray=class extends x{},o.RequestPerformance=class{constructor(c){this._marks={start:[c.url,"start"].join("#"),end:[c.url,"end"].join("#"),measure:c.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let c=performance.getEntriesByName(this._marks.measure);return c.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),c=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),c}},o.ResourceType=Tt,o.SegmentVector=Hr,o.SymbolBucket=Jd,o.Transitionable=wg,o.TriangleIndexArray=co,o.Uniform1f=ul,o.Uniform1i=class extends ll{constructor(c,s){super(c,s),this.current=0}set(c){this.current!==c&&(this.current=c,this.gl.uniform1i(this.location,c))}},o.Uniform2f=class extends ll{constructor(c,s){super(c,s),this.current=[0,0]}set(c){c[0]===this.current[0]&&c[1]===this.current[1]||(this.current=c,this.gl.uniform2f(this.location,c[0],c[1]))}},o.Uniform3f=class extends ll{constructor(c,s){super(c,s),this.current=[0,0,0]}set(c){c[0]===this.current[0]&&c[1]===this.current[1]&&c[2]===this.current[2]||(this.current=c,this.gl.uniform3f(this.location,c[0],c[1],c[2]))}},o.Uniform4f=Kd,o.UniformColor=t5,o.UniformMatrix4f=class extends ll{constructor(c,s){super(c,s),this.current=MF}set(c){if(c[12]!==this.current[12]||c[0]!==this.current[0])return this.current=c,void this.gl.uniformMatrix4fv(this.location,!1,c);for(let s=1;s<16;s++)if(c[s]!==this.current[s]){this.current=c,this.gl.uniformMatrix4fv(this.location,!1,c);break}}},o.UnwrappedTileID=d6,o.ValidationError=qe,o.ZoomHistory=Jh,o.add=function(c,s,d){return c[0]=s[0]+d[0],c[1]=s[1]+d[1],c[2]=s[2]+d[2],c},o.addDynamicAttributes=X_,o.asyncAll=function(c,s,d){if(!c.length)return d(null,[]);let m=c.length;const _=new Array(c.length);let E=null;c.forEach((M,D)=>{s(M,(F,U)=>{F&&(E=F),_[D]=U,--m==0&&d(E,_)})})},o.bezier=v,o.bindAll=A,o.cacheEntryPossiblyAdded=function(c){Ne++,Ne>ze&&(c.getActor().send("enforceCacheSizeLimit",ke),Ne=0)},o.clamp=w,o.clearTileCache=function(c){const s=caches.delete(ye);c&&s.catch(c).then(()=>c())},o.clipLine=Y5,o.clone=function(c){var s=new ho(16);return s[0]=c[0],s[1]=c[1],s[2]=c[2],s[3]=c[3],s[4]=c[4],s[5]=c[5],s[6]=c[6],s[7]=c[7],s[8]=c[8],s[9]=c[9],s[10]=c[10],s[11]=c[11],s[12]=c[12],s[13]=c[13],s[14]=c[14],s[15]=c[15],s},o.clone$1=N,o.clone$2=function(c){var s=new ho(3);return s[0]=c[0],s[1]=c[1],s[2]=c[2],s},o.collisionCircleLayout=k$,o.config=oe,o.copy=function(c,s){return c[0]=s[0],c[1]=s[1],c[2]=s[2],c[3]=s[3],c[4]=s[4],c[5]=s[5],c[6]=s[6],c[7]=s[7],c[8]=s[8],c[9]=s[9],c[10]=s[10],c[11]=s[11],c[12]=s[12],c[13]=s[13],c[14]=s[14],c[15]=s[15],c},o.create=function(){var c=new ho(16);return ho!=Float32Array&&(c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[11]=0,c[12]=0,c[13]=0,c[14]=0),c[0]=1,c[5]=1,c[10]=1,c[15]=1,c},o.create$1=u5,o.createExpression=fc,o.createFilter=Fd,o.createLayout=ci,o.createStyleLayer=function(c){return c.type==="custom"?new iB(c):new oB[c.type](c)},o.cross=function(c,s,d){var m=s[0],_=s[1],E=s[2],M=d[0],D=d[1],F=d[2];return c[0]=_*F-E*D,c[1]=E*M-m*F,c[2]=m*D-_*M,c},o.dot=function(c,s){return c[0]*s[0]+c[1]*s[1]+c[2]*s[2]},o.dot$1=function(c,s){return c[0]*s[0]+c[1]*s[1]+c[2]*s[2]+c[3]*s[3]},o.ease=y,o.emitValidationErrors=Bd,o.enforceCacheSizeLimit=function(c){Ie(),Re&&Re.then(s=>{s.keys().then(d=>{for(let m=0;m<d.length-c;m++)s.delete(d[m])})})},o.equals=function(c,s){var d=c[0],m=c[1],_=c[2],E=c[3],M=c[4],D=c[5],F=c[6],U=c[7],X=c[8],re=c[9],ue=c[10],he=c[11],pe=c[12],Oe=c[13],Me=c[14],Ze=c[15],st=s[0],Ke=s[1],nt=s[2],kt=s[3],St=s[4],lr=s[5],hr=s[6],er=s[7],Zt=s[8],Ht=s[9],tr=s[10],Yt=s[11],Ft=s[12],br=s[13],mr=s[14],jr=s[15];return Math.abs(d-st)<=fo*Math.max(1,Math.abs(d),Math.abs(st))&&Math.abs(m-Ke)<=fo*Math.max(1,Math.abs(m),Math.abs(Ke))&&Math.abs(_-nt)<=fo*Math.max(1,Math.abs(_),Math.abs(nt))&&Math.abs(E-kt)<=fo*Math.max(1,Math.abs(E),Math.abs(kt))&&Math.abs(M-St)<=fo*Math.max(1,Math.abs(M),Math.abs(St))&&Math.abs(D-lr)<=fo*Math.max(1,Math.abs(D),Math.abs(lr))&&Math.abs(F-hr)<=fo*Math.max(1,Math.abs(F),Math.abs(hr))&&Math.abs(U-er)<=fo*Math.max(1,Math.abs(U),Math.abs(er))&&Math.abs(X-Zt)<=fo*Math.max(1,Math.abs(X),Math.abs(Zt))&&Math.abs(re-Ht)<=fo*Math.max(1,Math.abs(re),Math.abs(Ht))&&Math.abs(ue-tr)<=fo*Math.max(1,Math.abs(ue),Math.abs(tr))&&Math.abs(he-Yt)<=fo*Math.max(1,Math.abs(he),Math.abs(Yt))&&Math.abs(pe-Ft)<=fo*Math.max(1,Math.abs(pe),Math.abs(Ft))&&Math.abs(Oe-br)<=fo*Math.max(1,Math.abs(Oe),Math.abs(br))&&Math.abs(Me-mr)<=fo*Math.max(1,Math.abs(Me),Math.abs(mr))&&Math.abs(Ze-jr)<=fo*Math.max(1,Math.abs(Ze),Math.abs(jr))},o.evaluateSizeForFeature=function(c,{uSize:s,uSizeT:d},{lowerSize:m,upperSize:_}){return c.kind==="source"?m/fl:c.kind==="composite"?xn(m/fl,_/fl,d):s},o.evaluateSizeForZoom=function(c,s){let d=0,m=0;if(c.kind==="constant")m=c.layoutSize;else if(c.kind!=="source"){const{interpolationType:_,minZoom:E,maxZoom:M}=c,D=_?w(wo.interpolationFactor(_,s,E,M),0,1):0;c.kind==="camera"?m=xn(c.minSize,c.maxSize,D):d=D}return{uSizeT:d,uSize:m}},o.evaluateVariableOffset=e6,o.evented=ap,o.exported=ge,o.exported$1=De,o.extend=T,o.filterObject=O,o.fromRotation=function(c,s){var d=Math.sin(s),m=Math.cos(s);return c[0]=m,c[1]=d,c[2]=0,c[3]=-d,c[4]=m,c[5]=0,c[6]=0,c[7]=0,c[8]=1,c},o.fromScaling=function(c,s){return c[0]=s[0],c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=s[1],c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=s[2],c[11]=0,c[12]=0,c[13]=0,c[14]=0,c[15]=1,c},o.getAnchorAlignment=q_,o.getAnchorJustification=Z_,o.getArrayBuffer=Ct,o.getImage=it,o.getJSON=function(c,s){return It(T(c,{type:"json"}),s)},o.getOverlapMode=eb,o.getRTLTextPluginStatus=Sc,o.getReferrer=Pt,o.getVideo=function(c,s){const d=window.document.createElement("video");d.muted=!0,d.onloadstart=function(){s(null,d)};for(let m=0;m<c.length;m++){const _=window.document.createElement("source");Dt(c[m])||(d.crossOrigin="Anonymous"),_.src=c[m],d.appendChild(_)}return{cancel:()=>{}}},o.identity=I_,o.invert=function(c,s){var d=s[0],m=s[1],_=s[2],E=s[3],M=s[4],D=s[5],F=s[6],U=s[7],X=s[8],re=s[9],ue=s[10],he=s[11],pe=s[12],Oe=s[13],Me=s[14],Ze=s[15],st=d*D-m*M,Ke=d*F-_*M,nt=d*U-E*M,kt=m*F-_*D,St=m*U-E*D,lr=_*U-E*F,hr=X*Oe-re*pe,er=X*Me-ue*pe,Zt=X*Ze-he*pe,Ht=re*Me-ue*Oe,tr=re*Ze-he*Oe,Yt=ue*Ze-he*Me,Ft=st*Yt-Ke*tr+nt*Ht+kt*Zt-St*er+lr*hr;return Ft?(c[0]=(D*Yt-F*tr+U*Ht)*(Ft=1/Ft),c[1]=(_*tr-m*Yt-E*Ht)*Ft,c[2]=(Oe*lr-Me*St+Ze*kt)*Ft,c[3]=(ue*St-re*lr-he*kt)*Ft,c[4]=(F*Zt-M*Yt-U*er)*Ft,c[5]=(d*Yt-_*Zt+E*er)*Ft,c[6]=(Me*nt-pe*lr-Ze*Ke)*Ft,c[7]=(X*lr-ue*nt+he*Ke)*Ft,c[8]=(M*tr-D*Zt+U*hr)*Ft,c[9]=(m*Zt-d*tr-E*hr)*Ft,c[10]=(pe*St-Oe*nt+Ze*st)*Ft,c[11]=(re*nt-X*St-he*st)*Ft,c[12]=(D*er-M*Ht-F*hr)*Ft,c[13]=(d*Ht-m*er+_*hr)*Ft,c[14]=(Oe*Ke-pe*kt-Me*st)*Ft,c[15]=(X*kt-re*Ke+ue*st)*Ft,c):null},o.isImageBitmap=Q,o.isSafari=Z,o.isWorker=H,o.keysDifference=function(c,s){const d=[];for(const m in c)m in s||d.push(m);return d},o.lazyLoadRTLTextPlugin=function(){jo.isLoading()||jo.isLoaded()||Sc()!=="deferred"||bg()},o.makeRequest=It,o.mapObject=I,o.mercatorXfromLng=s6,o.mercatorYfromLat=l6,o.mercatorZfromAltitude=u6,o.mul=LF,o.mul$1=function(c,s,d){return c[0]=s[0]*d[0],c[1]=s[1]*d[1],c[2]=s[2]*d[2],c[3]=s[3]*d[3],c},o.multiply=c5,o.nextPowerOfTwo=function(c){return c<=1?1:Math.pow(2,Math.ceil(Math.log(c)/Math.LN2))},o.normalize=function(c,s){var d=s[0],m=s[1],_=s[2],E=d*d+m*m+_*_;return E>0&&(E=1/Math.sqrt(E)),c[0]=s[0]*E,c[1]=s[1]*E,c[2]=s[2]*E,c},o.number=xn,o.ortho=function(c,s,d,m,_,E,M){var D=1/(s-d),F=1/(m-_),U=1/(E-M);return c[0]=-2*D,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=-2*F,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=2*U,c[11]=0,c[12]=(s+d)*D,c[13]=(_+m)*F,c[14]=(M+E)*U,c[15]=1,c},o.parseCacheControl=te,o.parseGlyphPbf=function(c){return new U_(c).readFields(L$,[])},o.pbf=U_,o.performSymbolLayout=function(c){c.bucket.createArrays(),c.bucket.tilePixelRatio=xi/(512*c.bucket.overscaling),c.bucket.compareText={},c.bucket.iconsNeedLinear=!1;const s=c.bucket.layers[0].layout,d=c.bucket.layers[0]._unevaluatedLayout._values,m={layoutIconSize:d["icon-size"].possiblyEvaluate(new Dn(c.bucket.zoom+1),c.canonical),layoutTextSize:d["text-size"].possiblyEvaluate(new Dn(c.bucket.zoom+1),c.canonical),textMaxSize:d["text-size"].possiblyEvaluate(new Dn(18))};if(c.bucket.textSizeData.kind==="composite"){const{minZoom:F,maxZoom:U}=c.bucket.textSizeData;m.compositeTextSizes=[d["text-size"].possiblyEvaluate(new Dn(F),c.canonical),d["text-size"].possiblyEvaluate(new Dn(U),c.canonical)]}if(c.bucket.iconSizeData.kind==="composite"){const{minZoom:F,maxZoom:U}=c.bucket.iconSizeData;m.compositeIconSizes=[d["icon-size"].possiblyEvaluate(new Dn(F),c.canonical),d["icon-size"].possiblyEvaluate(new Dn(U),c.canonical)]}const _=s.get("text-line-height")*Fi,E=s.get("text-rotation-alignment")!=="viewport"&&s.get("symbol-placement")!=="point",M=s.get("text-keep-upright"),D=s.get("text-size");for(const F of c.bucket.features){const U=s.get("text-font").evaluate(F,{},c.canonical).join(","),X=D.evaluate(F,{},c.canonical),re=m.layoutTextSize.evaluate(F,{},c.canonical),ue=m.layoutIconSize.evaluate(F,{},c.canonical),he={horizontal:{},vertical:void 0},pe=F.text;let Oe,Me=[0,0];if(pe){const Ke=pe.toString(),nt=s.get("text-letter-spacing").evaluate(F,{},c.canonical)*Fi,kt=w_(Ke)?nt:0,St=s.get("text-anchor").evaluate(F,{},c.canonical),lr=s.get("text-variable-anchor");if(!lr){const tr=s.get("text-radial-offset").evaluate(F,{},c.canonical);Me=tr?e6(St,[tr*Fi,G_]):s.get("text-offset").evaluate(F,{},c.canonical).map(Yt=>Yt*Fi)}let hr=E?"center":s.get("text-justify").evaluate(F,{},c.canonical);const er=s.get("symbol-placement"),Zt=er==="point"?s.get("text-max-width").evaluate(F,{},c.canonical)*Fi:0,Ht=()=>{c.bucket.allowVerticalPlacement&&Vd(Ke)&&(he.vertical=Fg(pe,c.glyphMap,c.glyphPositions,c.imagePositions,U,Zt,_,St,"left",kt,Me,o.WritingMode.vertical,!0,er,re,X))};if(!E&&lr){const tr=hr==="auto"?lr.map(Ft=>Z_(Ft)):[hr];let Yt=!1;for(let Ft=0;Ft<tr.length;Ft++){const br=tr[Ft];if(!he.horizontal[br])if(Yt)he.horizontal[br]=he.horizontal[0];else{const mr=Fg(pe,c.glyphMap,c.glyphPositions,c.imagePositions,U,Zt,_,"center",br,kt,Me,o.WritingMode.horizontal,!1,er,re,X);mr&&(he.horizontal[br]=mr,Yt=mr.positionedLines.length===1)}}Ht()}else{hr==="auto"&&(hr=Z_(St));const tr=Fg(pe,c.glyphMap,c.glyphPositions,c.imagePositions,U,Zt,_,St,hr,kt,Me,o.WritingMode.horizontal,!1,er,re,X);tr&&(he.horizontal[hr]=tr),Ht(),Vd(Ke)&&E&&M&&(he.vertical=Fg(pe,c.glyphMap,c.glyphPositions,c.imagePositions,U,Zt,_,St,hr,kt,Me,o.WritingMode.vertical,!1,er,re,X))}}let Ze=!1;if(F.icon&&F.icon.name){const Ke=c.imageMap[F.icon.name];Ke&&(Oe=U$(c.imagePositions[F.icon.name],s.get("icon-offset").evaluate(F,{},c.canonical),s.get("icon-anchor").evaluate(F,{},c.canonical)),Ze=!!Ke.sdf,c.bucket.sdfIcons===void 0?c.bucket.sdfIcons=Ze:c.bucket.sdfIcons!==Ze&&B("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(Ke.pixelRatio!==c.bucket.pixelRatio||s.get("icon-rotate").constantOr(1)!==0)&&(c.bucket.iconsNeedLinear=!0))}const st=r6(he.horizontal)||he.vertical;c.bucket.iconsInText=!!st&&st.iconsInText,(st||Oe)&&X$(c.bucket,F,he,Oe,c.imageMap,m,re,ue,Me,Ze,c.canonical)}c.showCollisionBoxes&&c.bucket.generateCollisionDebugBuffers()},o.perspective=function(c,s,d,m,_){var E,M=1/Math.tan(s/2);return c[0]=M/d,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=M,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[11]=-1,c[12]=0,c[13]=0,c[15]=0,_!=null&&_!==1/0?(c[10]=(_+m)*(E=1/(m-_)),c[14]=2*_*m*E):(c[10]=-1,c[14]=-2*m),c},o.pick=function(c,s){const d={};for(let m=0;m<s.length;m++){const _=s[m];_ in c&&(d[_]=c[_])}return d},o.plugin=jo,o.pointGeometry=ne,o.polygonIntersectsPolygon=o5,o.potpack=F5,o.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],o.register=dr,o.registerForPluginStateChange=function(c){return c({pluginStatus:uo,pluginURL:Ps}),ap.on("pluginStateChange",c),c},o.renderColorRamp=g5,o.rotateX=function(c,s,d){var m=Math.sin(d),_=Math.cos(d),E=s[4],M=s[5],D=s[6],F=s[7],U=s[8],X=s[9],re=s[10],ue=s[11];return s!==c&&(c[0]=s[0],c[1]=s[1],c[2]=s[2],c[3]=s[3],c[12]=s[12],c[13]=s[13],c[14]=s[14],c[15]=s[15]),c[4]=E*_+U*m,c[5]=M*_+X*m,c[6]=D*_+re*m,c[7]=F*_+ue*m,c[8]=U*_-E*m,c[9]=X*_-M*m,c[10]=re*_-D*m,c[11]=ue*_-F*m,c},o.rotateZ=function(c,s,d){var m=Math.sin(d),_=Math.cos(d),E=s[0],M=s[1],D=s[2],F=s[3],U=s[4],X=s[5],re=s[6],ue=s[7];return s!==c&&(c[8]=s[8],c[9]=s[9],c[10]=s[10],c[11]=s[11],c[12]=s[12],c[13]=s[13],c[14]=s[14],c[15]=s[15]),c[0]=E*_+U*m,c[1]=M*_+X*m,c[2]=D*_+re*m,c[3]=F*_+ue*m,c[4]=U*_-E*m,c[5]=X*_-M*m,c[6]=re*_-D*m,c[7]=ue*_-F*m,c},o.scale=function(c,s,d){var m=d[0],_=d[1],E=d[2];return c[0]=s[0]*m,c[1]=s[1]*m,c[2]=s[2]*m,c[3]=s[3]*m,c[4]=s[4]*_,c[5]=s[5]*_,c[6]=s[6]*_,c[7]=s[7]*_,c[8]=s[8]*E,c[9]=s[9]*E,c[10]=s[10]*E,c[11]=s[11]*E,c[12]=s[12],c[13]=s[13],c[14]=s[14],c[15]=s[15],c},o.scale$1=function(c,s,d){return c[0]=s[0]*d,c[1]=s[1]*d,c[2]=s[2]*d,c},o.setCacheLimits=function(c,s){ke=c,ze=s},o.setRTLTextPlugin=function(c,s,d=!1){if(uo===rp||uo===np||uo===ip)throw new Error("setRTLTextPlugin cannot be called multiple times.");Ps=ge.resolveURL(c),uo=rp,op=s,nu(),d||bg()},o.spec=Fe,o.sphericalToCartesian=function([c,s,d]){return s+=90,s*=Math.PI/180,d*=Math.PI/180,{x:c*Math.cos(s)*Math.sin(d),y:c*Math.sin(s)*Math.sin(d),z:c*Math.cos(d)}},o.sqrLen=function(c){var s=c[0],d=c[1];return s*s+d*d},o.sub=function(c,s,d){return c[0]=s[0]-d[0],c[1]=s[1]-d[1],c[2]=s[2]-d[2],c},o.toEvaluationFeature=Mc,o.transformMat3=function(c,s,d){var m=s[0],_=s[1],E=s[2];return c[0]=m*d[0]+_*d[3]+E*d[6],c[1]=m*d[1]+_*d[4]+E*d[7],c[2]=m*d[2]+_*d[5]+E*d[8],c},o.transformMat4=Ig,o.transformMat4$1=function(c,s,d){var m=s[0],_=s[1];return c[0]=d[0]*m+d[4]*_+d[12],c[1]=d[1]*m+d[5]*_+d[13],c},o.translate=function(c,s,d){var m,_,E,M,D,F,U,X,re,ue,he,pe,Oe=d[0],Me=d[1],Ze=d[2];return s===c?(c[12]=s[0]*Oe+s[4]*Me+s[8]*Ze+s[12],c[13]=s[1]*Oe+s[5]*Me+s[9]*Ze+s[13],c[14]=s[2]*Oe+s[6]*Me+s[10]*Ze+s[14],c[15]=s[3]*Oe+s[7]*Me+s[11]*Ze+s[15]):(_=s[1],E=s[2],M=s[3],D=s[4],F=s[5],U=s[6],X=s[7],re=s[8],ue=s[9],he=s[10],pe=s[11],c[0]=m=s[0],c[1]=_,c[2]=E,c[3]=M,c[4]=D,c[5]=F,c[6]=U,c[7]=X,c[8]=re,c[9]=ue,c[10]=he,c[11]=pe,c[12]=m*Oe+D*Me+re*Ze+s[12],c[13]=_*Oe+F*Me+ue*Ze+s[13],c[14]=E*Oe+U*Me+he*Ze+s[14],c[15]=M*Oe+X*Me+pe*Ze+s[15]),c},o.triggerPluginCompletionEvent=_g,o.unicodeBlockLookup=Jt,o.uniqueId=function(){return R++},o.validateCustomStyleLayer=function(c){const s=[],d=c.id;return d===void 0&&s.push({message:`layers.${d}: missing required property "id"`}),c.render===void 0&&s.push({message:`layers.${d}: missing required method "render"`}),c.renderingMode&&c.renderingMode!=="2d"&&c.renderingMode!=="3d"&&s.push({message:`layers.${d}: property "renderingMode" must be either "2d" or "3d"`}),s},o.validateLight=Qh,o.validateStyle=wc,o.vectorTile=su,o.warnOnce=B,o.wrap=k}),a(["./shared"],function(o){function f(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+=`${f(xe)},`;return`${ae}]`}const q=Object.keys(me).sort();let ce="{";for(let ae=0;ae<q.length;ae++)ce+=`${JSON.stringify(q[ae])}:${f(me[q[ae]])},`;return`${ce}}`}function p(me){let K="";for(const q of o.refProperties)K+=`/${f(me[q])}`;return K}class v{constructor(K){this.keyCache={},K&&this.replace(K)}replace(K){this._layerConfigs={},this._layers={},this.update(K,[])}update(K,q){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 q)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 Ae=xe&&xe[ae[Ce].id]||p(ae[Ce]);xe&&(xe[ae[Ce].id]=Ae);let He=Ee[Ae];He||(He=Ee[Ae]=[]),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 Ae=Ee.sourceLayer||"_geojsonTileLayer";let He=Ce[Ae];He||(He=Ce[Ae]=[]),He.push(xe)}}}class y{constructor(K){const q={},ce=[];for(const be in K){const Ce=K[be],Ae=q[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),Ae[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 Ae in Ce){const He=Ce[+Ae];if(!He||He.bitmap.width===0||He.bitmap.height===0)continue;const We=q[be][Ae].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=q}}o.register("GlyphAtlas",y);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,q,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={},Ae={featureIndex:be,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:ce},He=q.familiesBySource[this.source];for(const ir in He){const gr=K.layers[ir];if(!gr)continue;gr.version===1&&o.warnOnce(`Vector tile source "${this.source}" layer "${ir}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const Br=Ee.encode(ir),Jr=[];for(let Vn=0;Vn<gr.length;Vn++){const an=gr.feature(Vn),An=be.getId(an,ir);Jr.push({feature:an,id:An,index:Vn,sourceLayerIndex:Br})}for(const Vn of He[ir]){const an=Vn[0];an.source!==this.source&&o.warnOnce(`layer.source = ${an.source} does not equal this.source = ${this.source}`),an.minzoom&&this.zoom<Math.floor(an.minzoom)||an.maxzoom&&this.zoom>=an.maxzoom||an.visibility!=="none"&&(k(Vn,this.zoom,ce),(Ce[an.id]=an.createBucket({index:be.bucketLayerIDs.length,layers:Vn,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Br,sourceID:this.source})).populate(Jr,Ae,this.tileID.canonical),be.bucketLayerIDs.push(Vn.map(An=>An.id)))}}let We,Be,At,bt;const Je=o.mapObject(Ae.glyphDependencies,ir=>Object.keys(ir).map(Number));Object.keys(Je).length?ae.send("getGlyphs",{uid:this.uid,stacks:Je},(ir,gr)=>{We||(We=ir,Be=gr,vr.call(this))}):Be={};const Rt=Object.keys(Ae.iconDependencies);Rt.length?ae.send("getImages",{icons:Rt,source:this.source,tileID:this.tileID,type:"icons"},(ir,gr)=>{We||(We=ir,At=gr,vr.call(this))}):At={};const Bt=Object.keys(Ae.patternDependencies);function vr(){if(We)return xe(We);if(Be&&At&&bt){const ir=new y(Be),gr=new o.ImageAtlas(At,bt);for(const Br in Ce){const Jr=Ce[Br];Jr instanceof o.SymbolBucket?(k(Jr.layers,this.zoom,ce),o.performSymbolLayout({bucket:Jr,glyphMap:Be,glyphPositions:ir.positions,imageMap:At,imagePositions:gr.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Jr.hasPattern&&(Jr instanceof o.LineBucket||Jr instanceof o.FillBucket||Jr instanceof o.FillExtrusionBucket)&&(k(Jr.layers,this.zoom,ce),Jr.addFeatures(Ae,this.tileID.canonical,gr.patternPositions))}this.status="done",xe(null,{buckets:Object.values(Ce).filter(Br=>!Br.isEmpty()),featureIndex:be,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:ir.image,imageAtlas:gr,glyphMap:this.returnDependencies?Be:null,iconMap:this.returnDependencies?At:null,glyphPositions:this.returnDependencies?ir.positions:null})}}Bt.length?ae.send("getImages",{icons:Bt,source:this.source,tileID:this.tileID,type:"patterns"},(ir,gr)=>{We||(We=ir,bt=gr,vr.call(this))}):bt={},vr.call(this)}}function k(me,K,q){const ce=new o.EvaluationParameters(K);for(const ae of me)ae.recalculate(ce,q)}function T(me,K){const q=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()=>{q.cancel(),K()}}class R{constructor(K,q,ce,ae){this.actor=K,this.layerIndex=q,this.availableImages=ce,this.loadVectorData=ae||T,this.loading={},this.loaded={}}loadTile(K,q){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,q(Ee);const Ce=be.rawData,Ae={};be.expires&&(Ae.expires=be.expires),be.cacheControl&&(Ae.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 q(We);q(null,o.extend({rawTileData:Ce.slice(0)},Be,Ae,He))}),this.loaded=this.loaded||{},this.loaded[ce]=xe})}reloadTile(K,q){const ce=this.loaded,ae=K.uid,xe=this;if(ce&&ce[ae]){const Ee=ce[ae];Ee.showCollisionBoxes=K.showCollisionBoxes;const be=(Ce,Ae)=>{const He=Ee.reloadCallback;He&&(delete Ee.reloadCallback,Ee.parse(Ee.vectorTile,xe.layerIndex,this.availableImages,xe.actor,He)),q(Ce,Ae)};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,q){const ce=this.loading,ae=K.uid;ce&&ce[ae]&&ce[ae].abort&&(ce[ae].abort(),delete ce[ae]),q()}removeTile(K,q){const ce=this.loaded,ae=K.uid;ce&&ce[ae]&&delete ce[ae],q()}}class A{constructor(){this.loaded={}}loadTile(K,q){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,q(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 q=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:q.width,height:q.height},q.data)}removeTile(K){const q=this.loaded,ce=K.uid;q&&q[ce]&&delete q[ce]}}var I=function me(K,q){var ce,ae=K&&K.type;if(ae==="FeatureCollection")for(ce=0;ce<K.features.length;ce++)me(K.features[ce],q);else if(ae==="GeometryCollection")for(ce=0;ce<K.geometries.length;ce++)me(K.geometries[ce],q);else if(ae==="Feature")me(K.geometry,q);else if(ae==="Polygon")O(K.coordinates,q);else if(ae==="MultiPolygon")for(ce=0;ce<K.coordinates.length;ce++)O(K.coordinates[ce],q);return K};function O(me,K){if(me.length!==0){N(me[0],K);for(var q=1;q<me.length;q++)N(me[q],!K)}}function N(me,K){for(var q=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=q+be;ce+=Math.abs(q)>=Math.abs(be)?q-Ce+be:be-Ce+q,q=Ce}q+ce>=0!=!!K&&me.reverse()}const L=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 q of this._feature.geometry)K.push([new o.pointGeometry(q[0],q[1])]);return K}{const K=[];for(const q of this._feature.geometry){const ce=[];for(const ae of q)ce.push(new o.pointGeometry(ae[0],ae[1]));K.push(ce)}return K}}toGeoJSON(K,q,ce){return L.call(this,K,q,ce)}}class j{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 G={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 q=me[K],ce=[],ae=0;ae<q.length;ae++)ce.push(new H(q[ae][0],q[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,q=-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),q=Math.max(q,Ce.x),ce=Math.min(ce,Ce.y),ae=Math.max(ae,Ce.y)}return[K,ce,q,ae]},J.prototype.toGeoJSON=te.prototype.toGeoJSON;var Z=o.pbf,Q=Y;function ge(me){var K=new Z;return function(q,ce){for(var ae in q.layers)ce.writeMessage(3,ne,q.layers[ae])}(me,K),K.finish()}function ne(me,K){var q;K.writeVarintField(15,me.version||1),K.writeStringField(1,me.name||""),K.writeVarintField(5,me.extent||4096);var ce={keys:[],values:[],keycache:{},valuecache:{}};for(q=0;q<me.length;q++)ce.feature=me.feature(q),K.writeMessage(2,de,ce);var ae=ce.keys;for(q=0;q<ae.length;q++)K.writeStringField(3,ae[q]);var xe=ce.values;for(q=0;q<xe.length;q++)K.writeMessage(4,ke,xe[q])}function de(me,K){var q=me.feature;q.id!==void 0&&K.writeVarintField(1,q.id),K.writeMessage(2,oe,me),K.writeVarintField(3,q.type),K.writeMessage(4,Te,q)}function oe(me,K){var q=me.feature,ce=me.keys,ae=me.values,xe=me.keycache,Ee=me.valuecache;for(var be in q.properties){var Ce=q.properties[be],Ae=xe[be];if(Ce!==null){Ae===void 0&&(ce.push(be),xe[be]=Ae=ce.length-1),K.writeVarint(Ae);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 q=me.loadGeometry(),ce=me.type,ae=0,xe=0,Ee=q.length,be=0;be<Ee;be++){var Ce=q[be],Ae=1;ce===1&&(Ae=Ce.length),K.writeVarint(ye(1,Ae));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,At=Ce[We].y-xe;K.writeVarint(Re(Be)),K.writeVarint(Re(At)),ae+=Be,xe+=At}ce===3&&K.writeVarint(ye(7,1))}}function ke(me,K){var q=typeof me;q==="string"?K.writeStringField(1,me):q==="boolean"?K.writeBooleanField(7,me):q==="number"&&(me%1!=0?K.writeDoubleField(3,me):me<0?K.writeSVarintField(6,me):K.writeVarintField(5,me))}function ze(me,K,q,ce,ae,xe){if(ae-ce<=q)return;const Ee=ce+ae>>1;Ie(me,K,Ee,ce,ae,xe%2),ze(me,K,q,ce,Ee-1,xe+1),ze(me,K,q,Ee+1,ae,xe+1)}function Ie(me,K,q,ce,ae,xe){for(;ae>ce;){if(ae-ce>600){const Ae=ae-ce+1,He=q-ce+1,We=Math.log(Ae),Be=.5*Math.exp(2*We/3),At=.5*Math.sqrt(We*Be*(Ae-Be)/Ae)*(He-Ae/2<0?-1:1);Ie(me,K,q,Math.max(ce,Math.floor(q-He*Be/Ae+At)),Math.min(ae,Math.floor(q+(Ae-He)*Be/Ae+At)),xe)}const Ee=K[2*q+xe];let be=ce,Ce=ae;for(Ne(me,K,ce,q),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<=q&&(ce=Ce+1),q<=Ce&&(ae=Ce-1)}}function Ne(me,K,q,ce){De(me,q,ce),De(K,2*q,2*ce),De(K,2*q+1,2*ce+1)}function De(me,K,q){const ce=me[K];me[K]=me[q],me[q]=ce}function Ve(me,K,q,ce){const ae=me-q,xe=K-ce;return ae*ae+xe*xe}G.exports=ge,G.exports.fromVectorTileJs=ge,G.exports.fromGeojsonVt=function(me,K){K=K||{};var q={};for(var ce in me)q[ce]=new Q(me[ce].features,K),q[ce].name=ce,q[ce].version=K.version,q[ce].extent=K.extent;return ge({layers:q})},G.exports.GeoJSONWrapper=Q;const Ge=me=>me[0],je=me=>me[1];class ct{constructor(K,q=Ge,ce=je,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 Ae=0;Ae<K.length;Ae++)be[Ae]=Ae,Ce[2*Ae]=q(K[Ae]),Ce[2*Ae+1]=ce(K[Ae]);ze(be,Ce,ae,0,be.length-1,0)}range(K,q,ce,ae){return function(xe,Ee,be,Ce,Ae,He,We){const Be=[0,xe.length-1,0],At=[];let bt,Je;for(;Be.length;){const Rt=Be.pop(),Bt=Be.pop(),vr=Be.pop();if(Bt-vr<=We){for(let Br=vr;Br<=Bt;Br++)bt=Ee[2*Br],Je=Ee[2*Br+1],bt>=be&&bt<=Ae&&Je>=Ce&&Je<=He&&At.push(xe[Br]);continue}const ir=Math.floor((vr+Bt)/2);bt=Ee[2*ir],Je=Ee[2*ir+1],bt>=be&&bt<=Ae&&Je>=Ce&&Je<=He&&At.push(xe[ir]);const gr=(Rt+1)%2;(Rt===0?be<=bt:Ce<=Je)&&(Be.push(vr),Be.push(ir-1),Be.push(gr)),(Rt===0?Ae>=bt:He>=Je)&&(Be.push(ir+1),Be.push(Bt),Be.push(gr))}return At}(this.ids,this.coords,K,q,ce,ae,this.nodeSize)}within(K,q,ce){return function(ae,xe,Ee,be,Ce,Ae){const He=[0,ae.length-1,0],We=[],Be=Ce*Ce;for(;He.length;){const At=He.pop(),bt=He.pop(),Je=He.pop();if(bt-Je<=Ae){for(let gr=Je;gr<=bt;gr++)Ve(xe[2*gr],xe[2*gr+1],Ee,be)<=Be&&We.push(ae[gr]);continue}const Rt=Math.floor((Je+bt)/2),Bt=xe[2*Rt],vr=xe[2*Rt+1];Ve(Bt,vr,Ee,be)<=Be&&We.push(ae[Rt]);const ir=(At+1)%2;(At===0?Ee-Ce<=Bt:be-Ce<=vr)&&(He.push(Je),He.push(Rt-1),He.push(ir)),(At===0?Ee+Ce>=Bt:be+Ce>=vr)&&(He.push(Rt+1),He.push(bt),He.push(ir))}return We}(this.ids,this.coords,K,q,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||(Ye=new Float32Array(1),me=>(Ye[0]=+me,Ye[0]));var Ye;class Pt{constructor(K){this.options=it(Object.create(pt),K),this.trees=new Array(this.options.maxZoom+1)}load(K){const{log:q,minZoom:ce,maxZoom:ae,nodeSize:xe}=this.options;q&&console.time("total time");const Ee=`prepare ${K.length} points`;q&&console.time(Ee),this.points=K;let be=[];for(let Ce=0;Ce<K.length;Ce++)K[Ce].geometry&&be.push(It(K[Ce],Ce));this.trees[ae+1]=new ct(be,ft,xt,xe,Float32Array),q&&console.timeEnd(Ee);for(let Ce=ae;Ce>=ce;Ce--){const Ae=+Date.now();be=this._cluster(be,Ce),this.trees[Ce]=new ct(be,ft,xt,xe,Float32Array),q&&console.log("z%d: %d clusters in %dms",Ce,be.length,+Date.now()-Ae)}return q&&console.timeEnd("total time"),this}getClusters(K,q){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],q),We=this.getClusters([-180,ae,xe,Ee],q);return He.concat(We)}const be=this.trees[this._limitZoom(q)],Ce=be.range(lt(ce),dt(Ee),lt(xe),dt(ae)),Ae=[];for(const He of Ce){const We=be.points[He];Ae.push(We.numPoints?Ct(We):this.points[We.index])}return Ae}getChildren(K){const q=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[q];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),Ae=[];for(const He of Ce){const We=xe.points[He];We.parentId===K&&Ae.push(We.numPoints?Ct(We):this.points[We.index])}if(Ae.length===0)throw new Error(ae);return Ae}getLeaves(K,q,ce){const ae=[];return this._appendLeaves(ae,K,q=q||10,ce=ce||0,0),ae}getTile(K,q,ce){const ae=this.trees[this._limitZoom(K)],xe=Math.pow(2,K),{extent:Ee,radius:be}=this.options,Ce=be/Ee,Ae=(ce-Ce)/xe,He=(ce+1+Ce)/xe,We={features:[]};return this._addTileFeatures(ae.range((q-Ce)/xe,Ae,(q+1+Ce)/xe,He),ae.points,q,ce,xe,We),q===0&&this._addTileFeatures(ae.range(1-Ce/xe,Ae,1,He),ae.points,xe,ce,xe,We),q===xe-1&&this._addTileFeatures(ae.range(0,Ae,Ce/xe,He),ae.points,-1,ce,xe,We),We.features.length?We:null}getClusterExpansionZoom(K){let q=this._getOriginZoom(K)-1;for(;q<=this.options.maxZoom;){const ce=this.getChildren(K);if(q++,ce.length!==1)break;K=ce[0].properties.cluster_id}return q}_appendLeaves(K,q,ce,ae,xe){const Ee=this.getChildren(q);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,q,ce,ae,xe,Ee){for(const be of K){const Ce=q[be],Ae=Ce.numPoints;let He,We,Be;if(Ae)He=Dt(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 At={type:1,geometry:[[Math.round(this.options.extent*(We*xe-ce)),Math.round(this.options.extent*(Be*xe-ae))]],tags:He};let bt;Ae?bt=Ce.id:this.options.generateId?bt=Ce.index:this.points[Ce.index].id&&(bt=this.points[Ce.index].id),bt!==void 0&&(At.id=bt),Ee.features.push(At)}}_limitZoom(K){return Math.max(this.options.minZoom,Math.min(Math.floor(+K),this.options.maxZoom+1))}_cluster(K,q){const ce=[],{radius:ae,extent:xe,reduce:Ee,minPoints:be}=this.options,Ce=ae/(xe*Math.pow(2,q));for(let Ae=0;Ae<K.length;Ae++){const He=K[Ae];if(He.zoom<=q)continue;He.zoom=q;const We=this.trees[q+1],Be=We.within(He.x,He.y,Ce),At=He.numPoints||1;let bt=At;for(const Je of Be){const Rt=We.points[Je];Rt.zoom>q&&(bt+=Rt.numPoints||1)}if(bt>At&&bt>=be){let Je=He.x*At,Rt=He.y*At,Bt=Ee&&At>1?this._map(He,!0):null;const vr=(Ae<<5)+(q+1)+this.points.length;for(const ir of Be){const gr=We.points[ir];if(gr.zoom<=q)continue;gr.zoom=q;const Br=gr.numPoints||1;Je+=gr.x*Br,Rt+=gr.y*Br,gr.parentId=vr,Ee&&(Bt||(Bt=this._map(He,!0)),Ee(Bt,this._map(gr)))}He.parentId=vr,ce.push(mt(Je/bt,Rt/bt,vr,bt,Bt))}else if(ce.push(He),bt>1)for(const Je of Be){const Rt=We.points[Je];Rt.zoom<=q||(Rt.zoom=q,ce.push(Rt))}}return ce}_getOriginId(K){return K-this.points.length>>5}_getOriginZoom(K){return(K-this.points.length)%32}_map(K,q){if(K.numPoints)return q?it({},K.properties):K.properties;const ce=this.points[K.index].properties,ae=this.options.map(ce);return q&&ae===ce?it({},ae):ae}}function mt(me,K,q,ce,ae){return{x:Tt(me),y:Tt(K),zoom:1/0,id:q,parentId:-1,numPoints:ce,properties:ae}}function It(me,K){const[q,ce]=me.geometry.coordinates;return{x:Tt(lt(q)),y:Tt(dt(ce)),zoom:1/0,index:K,parentId:-1}}function Ct(me){return{type:"Feature",id:me.id,properties:Dt(me),geometry:{type:"Point",coordinates:[(K=me.x,360*(K-.5)),ut(me.y)]}};var K}function Dt(me){const K=me.numPoints,q=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:q})}function lt(me){return me/360+.5}function dt(me){const K=Math.sin(me*Math.PI/180),q=.5-.25*Math.log((1+K)/(1-K))/Math.PI;return q<0?0:q>1?1:q}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 q in K)me[q]=K[q];return me}function ft(me){return me.x}function xt(me){return me.y}function Wt(me,K,q,ce){for(var ae,xe=ce,Ee=q-K>>1,be=q-K,Ce=me[K],Ae=me[K+1],He=me[q],We=me[q+1],Be=K+3;Be<q;Be+=3){var At=jt(me[Be],me[Be+1],Ce,Ae,He,We);if(At>xe)ae=Be,xe=At;else if(At===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,q-ae>3&&Wt(me,ae,q,ce))}function jt(me,K,q,ce,ae,xe){var Ee=ae-q,be=xe-ce;if(Ee!==0||be!==0){var Ce=((me-q)*Ee+(K-ce)*be)/(Ee*Ee+be*be);Ce>1?(q=ae,ce=xe):Ce>0&&(q+=Ee*Ce,ce+=be*Ce)}return(Ee=me-q)*Ee+(be=K-ce)*be}function Qt(me,K,q,ce){var ae={id:me===void 0?null:me,type:K,geometry:q,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 Ae=0;Ae<Ee[Ce].length;Ae++)Fe(xe,Ee[Ce][Ae])}(ae),ae}function Fe(me,K){for(var q=0;q<K.length;q+=3)me.minX=Math.min(me.minX,K[q]),me.minY=Math.min(me.minY,K[q+1]),me.maxX=Math.max(me.maxX,K[q]),me.maxY=Math.max(me.maxY,K[q+1])}function qe(me,K,q,ce){if(K.geometry){var ae=K.geometry.coordinates,xe=K.geometry.type,Ee=Math.pow(q.tolerance/((1<<q.maxZoom)*q.extent),2),be=[],Ce=K.id;if(q.promoteId?Ce=K.properties[q.promoteId]:q.generateId&&(Ce=ce||0),xe==="Point")Xt(ae,be);else if(xe==="MultiPoint")for(var Ae=0;Ae<ae.length;Ae++)Xt(ae[Ae],be);else if(xe==="LineString")cr(ae,be,Ee,!1);else if(xe==="MultiLineString"){if(q.lineMetrics){for(Ae=0;Ae<ae.length;Ae++)cr(ae[Ae],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(Ae=0;Ae<K.geometry.geometries.length;Ae++)qe(me,{id:Ce,geometry:K.geometry.geometries[Ae],properties:K.properties},q,ce);return}throw new Error("Input data is not a valid GeoJSON object.")}for(Ae=0;Ae<ae.length;Ae++){var He=[];Vt(ae[Ae],He,Ee,!0),be.push(He)}}me.push(Qt(Ce,xe,be,K.properties))}}function Xt(me,K){K.push(Ut(me[0])),K.push(rr(me[1])),K.push(0)}function cr(me,K,q,ce){for(var ae,xe,Ee=0,be=0;be<me.length;be++){var Ce=Ut(me[be][0]),Ae=rr(me[be][1]);K.push(Ce),K.push(Ae),K.push(0),be>0&&(Ee+=ce?(ae*Ae-Ce*xe)/2:Math.sqrt(Math.pow(Ce-ae,2)+Math.pow(Ae-xe,2))),ae=Ce,xe=Ae}var He=K.length-3;K[2]=1,Wt(K,0,He,q),K[He+2]=1,K.size=Math.abs(Ee),K.start=0,K.end=K.size}function Vt(me,K,q,ce){for(var ae=0;ae<me.length;ae++){var xe=[];cr(me[ae],xe,q,ce),K.push(xe)}}function Ut(me){return me/360+.5}function rr(me){var K=Math.sin(me*Math.PI/180),q=.5-.25*Math.log((1+K)/(1-K))/Math.PI;return q<0?0:q>1?1:q}function xr(me,K,q,ce,ae,xe,Ee,be){if(ce/=K,xe>=(q/=K)&&Ee<ce)return me;if(Ee<q||xe>=ce)return null;for(var Ce=[],Ae=0;Ae<me.length;Ae++){var He=me[Ae],We=He.geometry,Be=He.type,At=ae===0?He.minX:He.minY,bt=ae===0?He.maxX:He.maxY;if(At>=q&&bt<ce)Ce.push(He);else if(!(bt<q||At>=ce)){var Je=[];if(Be==="Point"||Be==="MultiPoint")Or(We,Je,q,ce,ae);else if(Be==="LineString")_t(We,Je,q,ce,ae,!1,be.lineMetrics);else if(Be==="MultiLineString")or(We,Je,q,ce,ae,!1);else if(Be==="Polygon")or(We,Je,q,ce,ae,!0);else if(Be==="MultiPolygon")for(var Rt=0;Rt<We.length;Rt++){var Bt=[];or(We[Rt],Bt,q,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 Or(me,K,q,ce,ae){for(var xe=0;xe<me.length;xe+=3){var Ee=me[xe+ae];Ee>=q&&Ee<=ce&&(K.push(me[xe]),K.push(me[xe+1]),K.push(me[xe+2]))}}function _t(me,K,q,ce,ae,xe,Ee){for(var be,Ce,Ae=qt(me),He=ae===0?kr:Lt,We=me.start,Be=0;Be<me.length-3;Be+=3){var At=me[Be],bt=me[Be+1],Je=me[Be+2],Rt=me[Be+3],Bt=me[Be+4],vr=ae===0?At:bt,ir=ae===0?Rt:Bt,gr=!1;Ee&&(be=Math.sqrt(Math.pow(At-Rt,2)+Math.pow(bt-Bt,2))),vr<q?ir>q&&(Ce=He(Ae,At,bt,Rt,Bt,q),Ee&&(Ae.start=We+be*Ce)):vr>ce?ir<ce&&(Ce=He(Ae,At,bt,Rt,Bt,ce),Ee&&(Ae.start=We+be*Ce)):$r(Ae,At,bt,Je),ir<q&&vr>=q&&(Ce=He(Ae,At,bt,Rt,Bt,q),gr=!0),ir>ce&&vr<=ce&&(Ce=He(Ae,At,bt,Rt,Bt,ce),gr=!0),!xe&&gr&&(Ee&&(Ae.end=We+be*Ce),K.push(Ae),Ae=qt(me)),Ee&&(We+=be)}var Br=me.length-3;At=me[Br],bt=me[Br+1],Je=me[Br+2],(vr=ae===0?At:bt)>=q&&vr<=ce&&$r(Ae,At,bt,Je),Br=Ae.length-3,xe&&Br>=3&&(Ae[Br]!==Ae[0]||Ae[Br+1]!==Ae[1])&&$r(Ae,Ae[0],Ae[1],Ae[2]),Ae.length&&K.push(Ae)}function qt(me){var K=[];return K.size=me.size,K.start=me.start,K.end=me.end,K}function or(me,K,q,ce,ae,xe){for(var Ee=0;Ee<me.length;Ee++)_t(me[Ee],K,q,ce,ae,xe,!1)}function $r(me,K,q,ce){me.push(K),me.push(q),me.push(ce)}function kr(me,K,q,ce,ae,xe){var Ee=(xe-K)/(ce-K);return me.push(xe),me.push(q+(ae-q)*Ee),me.push(1),Ee}function Lt(me,K,q,ce,ae,xe){var Ee=(xe-q)/(ae-q);return me.push(K+(ce-K)*Ee),me.push(xe),me.push(1),Ee}function Tr(me,K){for(var q=[],ce=0;ce<me.length;ce++){var ae,xe=me[ce],Ee=xe.type;if(Ee==="Point"||Ee==="MultiPoint"||Ee==="LineString")ae=Cr(xe.geometry,K);else if(Ee==="MultiLineString"||Ee==="Polygon"){ae=[];for(var be=0;be<xe.geometry.length;be++)ae.push(Cr(xe.geometry[be],K))}else if(Ee==="MultiPolygon")for(ae=[],be=0;be<xe.geometry.length;be++){for(var Ce=[],Ae=0;Ae<xe.geometry[be].length;Ae++)Ce.push(Cr(xe.geometry[be][Ae],K));ae.push(Ce)}q.push(Qt(xe.id,Ee,ae,xe.tags))}return q}function Cr(me,K){var q=[];q.size=me.size,me.start!==void 0&&(q.start=me.start,q.end=me.end);for(var ce=0;ce<me.length;ce+=3)q.push(me[ce]+K,me[ce+1],me[ce+2]);return q}function fr(me,K){if(me.transformed)return me;var q,ce,ae,xe=1<<me.z,Ee=me.x,be=me.y;for(q=0;q<me.features.length;q++){var Ce=me.features[q],Ae=Ce.geometry,He=Ce.type;if(Ce.geometry=[],He===1)for(ce=0;ce<Ae.length;ce+=2)Ce.geometry.push(Nt(Ae[ce],Ae[ce+1],K,xe,Ee,be));else for(ce=0;ce<Ae.length;ce++){var We=[];for(ae=0;ae<Ae[ce].length;ae+=2)We.push(Nt(Ae[ce][ae],Ae[ce][ae+1],K,xe,Ee,be));Ce.geometry.push(We)}}return me.transformed=!0,me}function Nt(me,K,q,ce,ae,xe){return[Math.round(q*(me*ce-ae)),Math.round(q*(K*ce-xe))]}function ot(me,K,q,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:q,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,Ae=me[be].minY,He=me[be].maxX,We=me[be].maxY;Ce<Ee.minX&&(Ee.minX=Ce),Ae<Ee.minY&&(Ee.minY=Ae),He>Ee.maxX&&(Ee.maxX=He),We>Ee.maxY&&(Ee.maxY=We)}return Ee}function ht(me,K,q,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")Ot(Ee,ae,me,q,!1,!1);else if(xe==="MultiLineString"||xe==="Polygon")for(be=0;be<ae.length;be++)Ot(Ee,ae[be],me,q,xe==="Polygon",be===0);else if(xe==="MultiPolygon")for(var Ce=0;Ce<ae.length;Ce++){var Ae=ae[Ce];for(be=0;be<Ae.length;be++)Ot(Ee,Ae[be],me,q,!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 Ot(me,K,q,ce,ae,xe){var Ee=ce*ce;if(ce>0&&K.size<(ae?Ee:ce))q.numPoints+=K.length/3;else{for(var be=[],Ce=0;Ce<K.length;Ce+=3)(ce===0||K[Ce+2]>Ee)&&(q.numSimplified++,be.push(K[Ce]),be.push(K[Ce+1])),q.numPoints++;ae&&function(Ae,He){for(var We=0,Be=0,At=Ae.length,bt=At-2;Be<At;bt=Be,Be+=2)We+=(Ae[Be]-Ae[bt])*(Ae[Be+1]+Ae[bt+1]);if(We>0===He)for(Be=0,At=Ae.length;Be<At/2;Be+=2){var Je=Ae[Be],Rt=Ae[Be+1];Ae[Be]=Ae[At-2-Be],Ae[Be+1]=Ae[At-1-Be],Ae[At-2-Be]=Je,Ae[At-1-Be]=Rt}}(be,xe),me.push(be)}}function $t(me,K){var q=(K=this.options=function(ae,xe){for(var Ee in xe)ae[Ee]=xe[Ee];return ae}(Object.create(this.options),K)).debug;if(q&&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++)qe(Ee,ae.features[be],xe,be);else qe(Ee,ae.type==="Feature"?ae:{geometry:ae},xe);return Ee}(me,K);this.tiles={},this.tileCoords=[],q&&(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=xr(ae,1,-1-Ee,Ee,0,-1,2,xe),Ae=xr(ae,1,1-Ee,2+Ee,0,-1,2,xe);return(Ce||Ae)&&(be=xr(ae,1,-Ee,1+Ee,0,-1,2,xe)||[],Ce&&(be=Tr(Ce,1).concat(be)),Ae&&(be=be.concat(Tr(Ae,-1)))),be}(ce,K),ce.length&&this.splitTile(ce,0,0,0),q&&(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 ur(me,K,q){return 32*((1<<me)*q+K)+me}function Ir(me,K){const q=me.tileID.canonical;if(!this._geoJSONIndex)return K(null,null);const ce=this._geoJSONIndex.getTile(q.z,q.x,q.y);if(!ce)return K(null,null);const ae=new j(ce.features);let xe=G.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,q,ce,ae,xe,Ee){for(var be=[me,K,q,ce],Ce=this.options,Ae=Ce.debug;be.length;){ce=be.pop(),q=be.pop(),K=be.pop(),me=be.pop();var He=1<<K,We=ur(K,q,ce),Be=this.tiles[We];if(!Be&&(Ae>1&&console.time("creation"),Be=this.tiles[We]=ot(me,K,q,ce,Ce),this.tileCoords.push({z:K,x:q,y:ce}),Ae)){Ae>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",K,q,ce,Be.numFeatures,Be.numPoints,Be.numSimplified),console.timeEnd("creation"));var At="z"+K;this.stats[At]=(this.stats[At]||0)+1,this.total++}if(Be.source=me,ae){if(K===Ce.maxZoom||K===ae)continue;var bt=1<<ae-K;if(q!==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){Ae>1&&console.time("clipping");var Je,Rt,Bt,vr,ir,gr,Br=.5*Ce.buffer/Ce.extent,Jr=.5-Br,Vn=.5+Br,an=1+Br;Je=Rt=Bt=vr=null,ir=xr(me,He,q-Br,q+Vn,0,Be.minX,Be.maxX,Ce),gr=xr(me,He,q+Jr,q+an,0,Be.minX,Be.maxX,Ce),me=null,ir&&(Je=xr(ir,He,ce-Br,ce+Vn,1,Be.minY,Be.maxY,Ce),Rt=xr(ir,He,ce+Jr,ce+an,1,Be.minY,Be.maxY,Ce),ir=null),gr&&(Bt=xr(gr,He,ce-Br,ce+Vn,1,Be.minY,Be.maxY,Ce),vr=xr(gr,He,ce+Jr,ce+an,1,Be.minY,Be.maxY,Ce),gr=null),Ae>1&&console.timeEnd("clipping"),be.push(Je||[],K+1,2*q,2*ce),be.push(Rt||[],K+1,2*q,2*ce+1),be.push(Bt||[],K+1,2*q+1,2*ce),be.push(vr||[],K+1,2*q+1,2*ce+1)}}},$t.prototype.getTile=function(me,K,q){var ce=this.options,ae=ce.extent,xe=ce.debug;if(me<0||me>24)return null;var Ee=1<<me,be=ur(me,K=(K%Ee+Ee)%Ee,q);if(this.tiles[be])return fr(this.tiles[be],ae);xe>1&&console.log("drilling down to z%d-%d-%d",me,K,q);for(var Ce,Ae=me,He=K,We=q;!Ce&&Ae>0;)Ae--,He=Math.floor(He/2),We=Math.floor(We/2),Ce=this.tiles[ur(Ae,He,We)];return Ce&&Ce.source?(xe>1&&console.log("found parent tile z%d-%d-%d",Ae,He,We),xe>1&&console.time("drilling down"),this.splitTile(Ce.source,Ae,He,We,me,K,q),xe>1&&console.timeEnd("drilling down"),this.tiles[be]?fr(this.tiles[be],ae):null):null};class qr extends R{constructor(K,q,ce,ae){super(K,q,ce,Ir),ae&&(this.loadGeoJSON=ae)}loadData(K,q){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=q,this._pendingRequest=this.loadGeoJSON(K,(xe,Ee)=>{if(delete this._pendingCallback,delete this._pendingRequest,xe||!Ee)return q(xe);if(typeof Ee!="object")return q(new Error(`Input data given to '${K.source}' is not a valid GeoJSON object.`));{I(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:Ae}){if(!Ae||!Ce)return Ce;const He={},We={},Be={accumulated:null,zoom:0},At={properties:null},bt=Object.keys(Ae);for(const Je of bt){const[Rt,Bt]=Ae[Je],vr=o.createExpression(Bt),ir=o.createExpression(typeof Rt=="string"?[Rt,["accumulated"],["get",Je]]:Rt);He[Je]=vr.value,We[Je]=ir.value}return Ce.map=Je=>{At.properties=Je;const Rt={};for(const Bt of bt)Rt[Bt]=He[Bt].evaluate(Be,At);return Rt},Ce.reduce=(Je,Rt)=>{At.properties=Rt;for(const Bt of bt)Be.accumulated=Je[Bt],Je[Bt]=We[Bt].evaluate(Be,At)},Ce}(K)).load(Ee.features):function(Ce,Ae){return new $t(Ce,Ae)}(Ee,K.geojsonVtOptions)}catch(Ce){return q(Ce)}this.loaded={};const be={};if(ae){const Ce=ae.finish();Ce&&(be.resourceTiming={},be.resourceTiming[K.source]=JSON.parse(JSON.stringify(Ce)))}q(null,be)}})}reloadTile(K,q){const ce=this.loaded;return ce&&ce[K.uid]?super.reloadTile(K,q):this.loadTile(K,q)}loadGeoJSON(K,q){if(K.request)return o.getJSON(K.request,q);if(typeof K.data=="string")try{q(null,JSON.parse(K.data))}catch{q(new Error(`Input data given to '${K.source}' is not a valid GeoJSON object.`))}else q(new Error(`Input data given to '${K.source}' is not a valid GeoJSON object.`));return{cancel:()=>{}}}removeSource(K,q){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),q()}getClusterExpansionZoom(K,q){try{q(null,this._geoJSONIndex.getClusterExpansionZoom(K.clusterId))}catch(ce){q(ce)}}getClusterChildren(K,q){try{q(null,this._geoJSONIndex.getChildren(K.clusterId))}catch(ce){q(ce)}}getClusterLeaves(K,q){try{q(null,this._geoJSONIndex.getLeaves(K.clusterId,K.limit,K.offset))}catch(ce){q(ce)}}}class Gr{constructor(K){this.self=K,this.actor=new o.Actor(K,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:R,geojson:qr},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=(q,ce)=>{if(this.workerSourceTypes[q])throw new Error(`Worker source with name "${q}" already registered.`);this.workerSourceTypes[q]=ce},this.self.registerRTLTextPlugin=q=>{if(o.plugin.isParsed())throw new Error("RTL text plugin already registered.");o.plugin.applyArabicShaping=q.applyArabicShaping,o.plugin.processBidirectionalText=q.processBidirectionalText,o.plugin.processStyledBidirectionalText=q.processStyledBidirectionalText}}setReferrer(K,q){this.referrer=q}setImages(K,q,ce){this.availableImages[K]=q;for(const ae in this.workerSources[K]){const xe=this.workerSources[K][ae];for(const Ee in xe)xe[Ee].availableImages=q}ce()}setLayers(K,q,ce){this.getLayerIndex(K).replace(q),ce()}updateLayers(K,q,ce){this.getLayerIndex(K).update(q.layers,q.removedIds),ce()}loadTile(K,q,ce){this.getWorkerSource(K,q.type,q.source).loadTile(q,ce)}loadDEMTile(K,q,ce){this.getDEMWorkerSource(K,q.source).loadTile(q,ce)}reloadTile(K,q,ce){this.getWorkerSource(K,q.type,q.source).reloadTile(q,ce)}abortTile(K,q,ce){this.getWorkerSource(K,q.type,q.source).abortTile(q,ce)}removeTile(K,q,ce){this.getWorkerSource(K,q.type,q.source).removeTile(q,ce)}removeDEMTile(K,q){this.getDEMWorkerSource(K,q.source).removeTile(q)}removeSource(K,q,ce){if(!this.workerSources[K]||!this.workerSources[K][q.type]||!this.workerSources[K][q.type][q.source])return;const ae=this.workerSources[K][q.type][q.source];delete this.workerSources[K][q.type][q.source],ae.removeSource!==void 0?ae.removeSource(q,ce):ce()}loadWorkerSource(K,q,ce){try{this.self.importScripts(q.url),ce()}catch(ae){ce(ae.toString())}}syncRTLPluginState(K,q,ce){try{o.plugin.setState(q);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 q=this.availableImages[K];return q||(q=[]),q}getLayerIndex(K){let q=this.layerIndexes[K];return q||(q=this.layerIndexes[K]=new v),q}getWorkerSource(K,q,ce){if(this.workerSources[K]||(this.workerSources[K]={}),this.workerSources[K][q]||(this.workerSources[K][q]={}),!this.workerSources[K][q][ce]){const ae={send:(xe,Ee,be)=>{this.actor.send(xe,Ee,be,K)}};this.workerSources[K][q][ce]=new this.workerSourceTypes[q](ae,this.getLayerIndex(K),this.getAvailableImages(K))}return this.workerSources[K][q][ce]}getDEMWorkerSource(K,q){return this.demWorkerSources[K]||(this.demWorkerSources[K]={}),this.demWorkerSources[K][q]||(this.demWorkerSources[K][q]=new A),this.demWorkerSources[K][q]}enforceCacheSizeLimit(K,q){o.enforceCacheSizeLimit(q)}}return o.isWorker()&&(self.worker=new Gr(self)),Gr}),a(["./shared"],function(o){var f=p;function p(x){return!function(l){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 g,b,P=new Blob([""],{type:"text/javascript"}),z=URL.createObjectURL(P);try{b=new Worker(z),g=!0}catch{g=!1}return b&&b.terminate(),URL.revokeObjectURL(z),g}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var g=document.createElement("canvas");g.width=g.height=1;var b=g.getContext("2d");if(!b)return!1;var P=b.getImageData(0,0,1,1);return P&&P.width===g.width}()?(v[h=l&&l.failIfMajorPerformanceCaveat]===void 0&&(v[h]=function(g){var b,P=function(z){var $=document.createElement("canvas"),V=Object.create(p.webGLContextAttributes);return V.failIfMajorPerformanceCaveat=z,$.getContext("webgl",V)||$.getContext("experimental-webgl",V)}(g);if(!P)return!1;try{b=P.createShader(P.VERTEX_SHADER)}catch{return!1}return!(!b||P.isContextLost())&&(P.shaderSource(b,"void main() {}"),P.compileShader(b),P.getShaderParameter(b,P.COMPILE_STATUS)===!0)}(h)),v[h]?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 h}(x)}var v={};function y(x,l){if(Array.isArray(x)){if(!Array.isArray(l)||x.length!==l.length)return!1;for(let h=0;h<x.length;h++)if(!y(x[h],l[h]))return!1;return!0}if(typeof x=="object"&&x!==null&&l!==null){if(typeof l!="object"||Object.keys(x).length!==Object.keys(l).length)return!1;for(const h in x)if(!y(x[h],l[h]))return!1;return!0}return x===l}p.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};class w{static testProp(l){if(!w.docStyle)return l[0];for(let h=0;h<l.length;h++)if(l[h]in w.docStyle)return l[h];return l[0]}static create(l,h,g){const b=window.document.createElement(l);return h!==void 0&&(b.className=h),g&&g.appendChild(b),b}static createNS(l,h){return window.document.createElementNS(l,h)}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(l,h){l.style[w.transformProp]=h}static addEventListener(l,h,g,b={}){l.addEventListener(h,g,"passive"in b?b:b.capture)}static removeEventListener(l,h,g,b={}){l.removeEventListener(h,g,"passive"in b?b:b.capture)}static suppressClickInternal(l){l.preventDefault(),l.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(l,h){const g=l.getBoundingClientRect();return new o.pointGeometry(h.clientX-g.left-l.clientLeft,h.clientY-g.top-l.clientTop)}static touchPos(l,h){const g=l.getBoundingClientRect(),b=[];for(let P=0;P<h.length;P++)b.push(new o.pointGeometry(h[P].clientX-g.left-l.clientLeft,h[P].clientY-g.top-l.clientTop));return b}static mouseButton(l){return l.button}static remove(l){l.parentNode&&l.parentNode.removeChild(l)}}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 k{constructor(l){this._transformRequestFn=l}transformRequest(l,h){return this._transformRequestFn&&this._transformRequestFn(l,h)||{url:l}}normalizeSpriteURL(l,h,g){const b=function(P){const z=P.match(T);if(!z)throw new Error(`Unable to parse URL "${P}"`);return{protocol:z[1],authority:z[2],path:z[3]||"/",params:z[4]?z[4].split("&"):[]}}(l);return b.path+=`${h}${g}`,function(P){const z=P.params.length?`?${P.params.join("&")}`:"";return`${P.protocol}://${P.authority}${P.path}${z}`}(b)}setTransformRequest(l){this._transformRequestFn=l}}const T=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;class R{constructor(l,h,g,b){this.context=l,this.format=g,this.texture=l.gl.createTexture(),this.update(h,b)}update(l,h,g){const{width:b,height:P}=l,z=!(this.size&&this.size[0]===b&&this.size[1]===P||g),{context:$}=this,{gl:V}=$;if(this.useMipmap=Boolean(h&&h.useMipmap),V.bindTexture(V.TEXTURE_2D,this.texture),$.pixelStoreUnpackFlipY.set(!1),$.pixelStoreUnpack.set(1),$.pixelStoreUnpackPremultiplyAlpha.set(this.format===V.RGBA&&(!h||h.premultiply!==!1)),z)this.size=[b,P],l instanceof HTMLImageElement||l instanceof HTMLCanvasElement||l instanceof HTMLVideoElement||l instanceof ImageData||o.isImageBitmap(l)?V.texImage2D(V.TEXTURE_2D,0,this.format,this.format,V.UNSIGNED_BYTE,l):V.texImage2D(V.TEXTURE_2D,0,this.format,b,P,0,this.format,V.UNSIGNED_BYTE,l.data);else{const{x:W,y:ee}=g||{x:0,y:0};l instanceof HTMLImageElement||l instanceof HTMLCanvasElement||l instanceof HTMLVideoElement||l instanceof ImageData||o.isImageBitmap(l)?V.texSubImage2D(V.TEXTURE_2D,0,W,ee,V.RGBA,V.UNSIGNED_BYTE,l):V.texSubImage2D(V.TEXTURE_2D,0,W,ee,b,P,V.RGBA,V.UNSIGNED_BYTE,l.data)}this.useMipmap&&this.isSizePowerOfTwo()&&V.generateMipmap(V.TEXTURE_2D)}bind(l,h,g){const{context:b}=this,{gl:P}=b;P.bindTexture(P.TEXTURE_2D,this.texture),g!==P.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(g=P.LINEAR),l!==this.filter&&(P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MAG_FILTER,l),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MIN_FILTER,g||l),this.filter=l),h!==this.wrap&&(P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_S,h),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_T,h),this.wrap=h)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:l}=this.context;l.deleteTexture(this.texture),this.texture=null}}function A(x){const{userImage:l}=x;return!!(l&&l.render&&l.render())&&(x.data.replace(new Uint8Array(l.data.buffer)),!0)}class I 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(l){if(this.loaded!==l&&(this.loaded=l,l)){for(const{ids:h,callback:g}of this.requestors)this._notify(h,g);this.requestors=[]}}getImage(l){return this.images[l]}addImage(l,h){if(this.images[l])throw new Error(`Image id ${l} already exist, use updateImage instead`);this._validate(l,h)&&(this.images[l]=h)}_validate(l,h){let g=!0;return this._validateStretch(h.stretchX,h.data&&h.data.width)||(this.fire(new o.ErrorEvent(new Error(`Image "${l}" has invalid "stretchX" value`))),g=!1),this._validateStretch(h.stretchY,h.data&&h.data.height)||(this.fire(new o.ErrorEvent(new Error(`Image "${l}" has invalid "stretchY" value`))),g=!1),this._validateContent(h.content,h)||(this.fire(new o.ErrorEvent(new Error(`Image "${l}" has invalid "content" value`))),g=!1),g}_validateStretch(l,h){if(!l)return!0;let g=0;for(const b of l){if(b[0]<g||b[1]<b[0]||h<b[1])return!1;g=b[1]}return!0}_validateContent(l,h){return!(l&&(l.length!==4||l[0]<0||h.data.width<l[0]||l[1]<0||h.data.height<l[1]||l[2]<0||h.data.width<l[2]||l[3]<0||h.data.height<l[3]||l[2]<l[0]||l[3]<l[1]))}updateImage(l,h){const g=this.images[l];if(g.data.width!==h.data.width||g.data.height!==h.data.height)throw new Error(`size mismatch between old image (${g.data.width}x${g.data.height}) and new image (${h.data.width}x${h.data.height}).`);h.version=g.version+1,this.images[l]=h,this.updatedImages[l]=!0}removeImage(l){const h=this.images[l];delete this.images[l],delete this.patterns[l],h.userImage&&h.userImage.onRemove&&h.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(l,h){let g=!0;if(!this.isLoaded())for(const b of l)this.images[b]||(g=!1);this.isLoaded()||g?this._notify(l,h):this.requestors.push({ids:l,callback:h})}_notify(l,h){const g={};for(const b of l){this.images[b]||this.fire(new o.Event("styleimagemissing",{id:b}));const P=this.images[b];P?g[b]={data:P.data.clone(),pixelRatio:P.pixelRatio,sdf:P.sdf,version:P.version,stretchX:P.stretchX,stretchY:P.stretchY,content:P.content,hasRenderCallback:Boolean(P.userImage&&P.userImage.render)}:o.warnOnce(`Image "${b}" 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.`)}h(null,g)}getPixelSize(){const{width:l,height:h}=this.atlasImage;return{width:l,height:h}}getPattern(l){const h=this.patterns[l],g=this.getImage(l);if(!g)return null;if(h&&h.position.version===g.version)return h.position;if(h)h.position.version=g.version;else{const b={w:g.data.width+2,h:g.data.height+2,x:0,y:0},P=new o.ImagePosition(b,g);this.patterns[l]={bin:b,position:P}}return this._updatePatternAtlas(),this.patterns[l].position}bind(l){const h=l.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new R(l,this.atlasImage,h.RGBA),this.atlasTexture.bind(h.LINEAR,h.CLAMP_TO_EDGE)}_updatePatternAtlas(){const l=[];for(const P in this.patterns)l.push(this.patterns[P].bin);const{w:h,h:g}=o.potpack(l),b=this.atlasImage;b.resize({width:h||1,height:g||1});for(const P in this.patterns){const{bin:z}=this.patterns[P],$=z.x+1,V=z.y+1,W=this.images[P].data,ee=W.width,ie=W.height;o.RGBAImage.copy(W,b,{x:0,y:0},{x:$,y:V},{width:ee,height:ie}),o.RGBAImage.copy(W,b,{x:0,y:ie-1},{x:$,y:V-1},{width:ee,height:1}),o.RGBAImage.copy(W,b,{x:0,y:0},{x:$,y:V+ie},{width:ee,height:1}),o.RGBAImage.copy(W,b,{x:ee-1,y:0},{x:$-1,y:V},{width:1,height:ie}),o.RGBAImage.copy(W,b,{x:0,y:0},{x:$+ee,y:V},{width:1,height:ie})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(l){for(const h of l){if(this.callbackDispatchedThisFrame[h])continue;this.callbackDispatchedThisFrame[h]=!0;const g=this.images[h];g||o.warnOnce(`Image with ID: "${h}" was not found`),A(g)&&this.updateImage(h,g)}}}const O=1e20;function N(x,l,h,g,b,P,z,$,V){for(let W=l;W<l+g;W++)L(x,h*P+W,P,b,z,$,V);for(let W=h;W<h+b;W++)L(x,W*P+l,1,g,z,$,V)}function L(x,l,h,g,b,P,z){P[0]=0,z[0]=-O,z[1]=O,b[0]=x[l];for(let $=1,V=0,W=0;$<g;$++){b[$]=x[l+$*h];const ee=$*$;do{const ie=P[V];W=(b[$]-b[ie]+ee-ie*ie)/($-ie)/2}while(W<=z[V]&&--V>-1);V++,P[V]=$,z[V]=W,z[V+1]=O}for(let $=0,V=0;$<g;$++){for(;z[V+1]<$;)V++;const W=P[V],ee=$-W;x[l+$*h]=b[W]+ee*ee}}class B{constructor(l,h){this.requestManager=l,this.localIdeographFontFamily=h,this.entries={}}setURL(l){this.url=l}getGlyphs(l,h){const g=[];for(const b in l)for(const P of l[b])g.push({stack:b,id:P});o.asyncAll(g,({stack:b,id:P},z)=>{let $=this.entries[b];$||($=this.entries[b]={glyphs:{},requests:{},ranges:{}});let V=$.glyphs[P];if(V!==void 0)return void z(null,{stack:b,id:P,glyph:V});if(V=this._tinySDF($,b,P),V)return $.glyphs[P]=V,void z(null,{stack:b,id:P,glyph:V});const W=Math.floor(P/256);if(256*W>65535)return void z(new Error("glyphs > 65535 not supported"));if($.ranges[W])return void z(null,{stack:b,id:P,glyph:V});let ee=$.requests[W];ee||(ee=$.requests[W]=[],B.loadGlyphRange(b,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?z(ie):fe&&z(null,{stack:b,id:P,glyph:fe[P]||null})})},(b,P)=>{if(b)h(b);else if(P){const z={};for(const{stack:$,id:V,glyph:W}of P)(z[$]||(z[$]={}))[V]=W&&{id:W.id,bitmap:W.bitmap.clone(),metrics:W.metrics};h(null,z)}})}_doesCharSupportLocalGlyph(l){return!!this.localIdeographFontFamily&&(o.unicodeBlockLookup["CJK Unified Ideographs"](l)||o.unicodeBlockLookup["Hangul Syllables"](l)||o.unicodeBlockLookup.Hiragana(l)||o.unicodeBlockLookup.Katakana(l))}_tinySDF(l,h,g){const b=this.localIdeographFontFamily;if(!b||!this._doesCharSupportLocalGlyph(g))return;let P=l.tinySDF;if(!P){let $="400";/bold/i.test(h)?$="900":/medium/i.test(h)?$="500":/light/i.test(h)&&($="200"),P=l.tinySDF=new B.TinySDF({fontSize:24,buffer:3,radius:8,cutoff:.25,fontFamily:b,fontWeight:$})}const z=P.draw(String.fromCharCode(g));return{id:g,bitmap:new o.AlphaImage({width:z.width||30,height:z.height||30},z.data),metrics:{width:z.glyphWidth||24,height:z.glyphHeight||24,left:z.glyphLeft||0,top:z.glyphTop-27||-8,advance:z.glyphAdvance||24}}}}B.loadGlyphRange=function(x,l,h,g,b){const P=256*l,z=P+255,$=g.transformRequest(h.replace("{fontstack}",x).replace("{range}",`${P}-${z}`),o.ResourceType.Glyphs);o.getArrayBuffer($,(V,W)=>{if(V)b(V);else if(W){const ee={};for(const ie of o.parseGlyphPbf(W))ee[ie.id]=ie;b(null,ee)}})},B.TinySDF=class{constructor({fontSize:x=24,buffer:l=3,radius:h=8,cutoff:g=.25,fontFamily:b="sans-serif",fontWeight:P="normal",fontStyle:z="normal"}={}){this.buffer=l,this.cutoff=g,this.radius=h;const $=this.size=x+4*l,V=this._createCanvas($),W=this.ctx=V.getContext("2d",{willReadFrequently:!0});W.font=`${z} ${P} ${x}px ${b}`,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(x){const l=document.createElement("canvas");return l.width=l.height=x,l}draw(x){const{width:l,actualBoundingBoxAscent:h,actualBoundingBoxDescent:g,actualBoundingBoxLeft:b,actualBoundingBoxRight:P}=this.ctx.measureText(x),z=Math.ceil(h),$=Math.min(this.size-this.buffer,Math.ceil(P-b)),V=Math.min(this.size-this.buffer,z+Math.ceil(g)),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:z,glyphLeft:0,glyphAdvance:l};if($===0||V===0)return Se;const{ctx:_e,buffer:we,gridInner:$e,gridOuter:Ue}=this;_e.clearRect(we,we,$,V),_e.fillText(x,we,we+z);const et=_e.getImageData(we,we,$,V);Ue.fill(O,0,ie),$e.fill(0,0,ie);for(let Pe=0;Pe<V;Pe++)for(let at=0;at<$;at++){const rt=et.data[4*(Pe*$+at)+3]/255;if(rt===0)continue;const gt=(Pe+we)*W+at+we;if(rt===1)Ue[gt]=0,$e[gt]=O;else{const yt=.5-rt;Ue[gt]=yt>0?yt*yt:0,$e[gt]=yt<0?yt*yt:0}}N(Ue,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(Ue[Pe])-Math.sqrt($e[Pe]);fe[Pe]=Math.round(255-255*(at/this.radius+this.cutoff))}return Se}};const j=new o.Properties({anchor:new o.DataConstantProperty(o.spec.light.anchor),position:new class{constructor(){this.specification=o.spec.light.position}possiblyEvaluate(x,l){return o.sphericalToCartesian(x.expression.evaluate(l))}interpolate(x,l,h){return{x:o.number(x.x,l.x,h),y:o.number(x.y,l.y,h),z:o.number(x.z,l.z,h)}}},color:new o.DataConstantProperty(o.spec.light.color),intensity:new o.DataConstantProperty(o.spec.light.intensity)}),G="-transition";class H extends o.Evented{constructor(l){super(),this._transitionable=new o.Transitionable(j),this.setLight(l),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(l,h={}){if(!this._validate(o.validateLight,l,h))for(const g in l){const b=l[g];g.endsWith(G)?this._transitionable.setTransition(g.slice(0,-G.length),b):this._transitionable.setValue(g,b)}}updateTransitions(l){this._transitioning=this._transitionable.transitioned(l,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(l){this.properties=this._transitioning.possiblyEvaluate(l)}_validate(l,h,g){return(!g||g.validate!==!1)&&o.emitValidationErrors(this,l.call(o.validateStyle,o.extend({value:h,style:{glyphs:!0,sprite:!0},styleSpec:o.spec})))}}class te{constructor(l,h){this.width=l,this.height=h,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(l,h){const g=l.join(",")+String(h);return this.dashEntry[g]||(this.dashEntry[g]=this.addDash(l,h)),this.dashEntry[g]}getDashRanges(l,h,g){const b=[];let P=l.length%2==1?-l[l.length-1]*g:0,z=l[0]*g,$=!0;b.push({left:P,right:z,isDash:$,zeroLength:l[0]===0});let V=l[0];for(let W=1;W<l.length;W++){$=!$;const ee=l[W];P=V*g,V+=ee,z=V*g,b.push({left:P,right:z,isDash:$,zeroLength:ee===0})}return b}addRoundDash(l,h,g){const b=h/2;for(let P=-g;P<=g;P++){const z=this.width*(this.nextRow+g+P);let $=0,V=l[$];for(let W=0;W<this.width;W++){W/V.right>1&&(V=l[++$]);const ee=Math.abs(W-V.left),ie=Math.abs(W-V.right),fe=Math.min(ee,ie);let Se;const _e=P/g*(b+1);if(V.isDash){const we=b-Math.abs(_e);Se=Math.sqrt(fe*fe+we*we)}else Se=b-Math.sqrt(fe*fe+_e*_e);this.data[z+W]=Math.max(0,Math.min(255,Se+128))}}}addRegularDash(l){for(let $=l.length-1;$>=0;--$){const V=l[$],W=l[$+1];V.zeroLength?l.splice($,1):W&&W.isDash===V.isDash&&(W.left=V.left,l.splice($,1))}const h=l[0],g=l[l.length-1];h.isDash===g.isDash&&(h.left=g.left-this.width,g.right=h.right+this.width);const b=this.width*this.nextRow;let P=0,z=l[P];for(let $=0;$<this.width;$++){$/z.right>1&&(z=l[++P]);const V=Math.abs($-z.left),W=Math.abs($-z.right),ee=Math.min(V,W);this.data[b+$]=Math.max(0,Math.min(255,(z.isDash?ee:-ee)+128))}}addDash(l,h){const g=h?7:0,b=2*g+1;if(this.nextRow+b>this.height)return o.warnOnce("LineAtlas out of space"),null;let P=0;for(let $=0;$<l.length;$++)P+=l[$];if(P!==0){const $=this.width/P,V=this.getDashRanges(l,this.width,$);h?this.addRoundDash(V,$,g):this.addRegularDash(V)}const z={y:(this.nextRow+g+.5)/this.height,height:2*g/this.height,width:P};return this.nextRow+=b,this.dirty=!0,z}bind(l){const h=l.gl;this.texture?(h.bindTexture(h.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,h.texSubImage2D(h.TEXTURE_2D,0,0,0,this.width,this.height,h.ALPHA,h.UNSIGNED_BYTE,this.data))):(this.texture=h.createTexture(),h.bindTexture(h.TEXTURE_2D,this.texture),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_S,h.REPEAT),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_T,h.REPEAT),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MIN_FILTER,h.LINEAR),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MAG_FILTER,h.LINEAR),h.texImage2D(h.TEXTURE_2D,0,h.ALPHA,this.width,this.height,0,h.ALPHA,h.UNSIGNED_BYTE,this.data))}}class Y{constructor(l,h){this.workerPool=l,this.actors=[],this.currentActor=0,this.id=o.uniqueId();const g=this.workerPool.acquire(this.id);for(let b=0;b<g.length;b++){const P=new Y.Actor(g[b],h,this.id);P.name=`Worker ${b}`,this.actors.push(P)}if(!this.actors.length)throw new Error("No actors found")}broadcast(l,h,g){o.asyncAll(this.actors,(b,P)=>{b.send(l,h,P)},g=g||function(){})}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(){this.actors.forEach(l=>{l.remove()}),this.actors=[],this.workerPool.release(this.id)}}function le(x,l,h){const g=function(b,P){if(b)return h(b);if(P){const z=o.pick(o.extend(P,x),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);P.vector_layers&&(z.vectorLayers=P.vector_layers,z.vectorLayerIds=z.vectorLayers.map($=>$.id)),h(null,z)}};return x.url?o.getJSON(l.transformRequest(x.url,o.ResourceType.Source),g):o.exported.frame(()=>g(null,x))}Y.Actor=o.Actor;class J{constructor(l,h,g){this.bounds=o.LngLatBounds.convert(this.validateBounds(l)),this.minzoom=h||0,this.maxzoom=g||24}validateBounds(l){return Array.isArray(l)&&l.length===4?[Math.max(-180,l[0]),Math.max(-90,l[1]),Math.min(180,l[2]),Math.min(90,l[3])]:[-180,-90,180,90]}contains(l){const h=Math.pow(2,l.z),g=Math.floor(o.mercatorXfromLng(this.bounds.getWest())*h),b=Math.floor(o.mercatorYfromLat(this.bounds.getNorth())*h),P=Math.ceil(o.mercatorXfromLng(this.bounds.getEast())*h),z=Math.ceil(o.mercatorYfromLat(this.bounds.getSouth())*h);return l.x>=g&&l.x<P&&l.y>=b&&l.y<z}}class Z extends o.Evented{constructor(l,h,g,b){if(super(),this.id=l,this.dispatcher=g,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(h,["url","scheme","tileSize","promoteId"])),this._options=o.extend({type:"vector"},h),this._collectResourceTiming=h.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(b)}load(){this._loaded=!1,this.fire(new o.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=le(this._options,this.map._requestManager,(l,h)=>{this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),l?this.fire(new o.ErrorEvent(l)):h&&(o.extend(this,h),h.bounds&&(this.tileBounds=new J(h.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(l){return!this.tileBounds||this.tileBounds.contains(l.canonical)}onAdd(l){this.map=l,this.load()}setSourceProperty(l){this._tileJSONRequest&&this._tileJSONRequest.cancel(),l(),this.load()}setTiles(l){return this.setSourceProperty(()=>{this._options.tiles=l}),this}setUrl(l){return this.setSourceProperty(()=>{this.url=l,this._options.url=l}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}serialize(){return o.extend({},this._options)}loadTile(l,h){const g=l.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),b={request:this.map._requestManager.transformRequest(g,o.ResourceType.Tile),uid:l.uid,tileID:l.tileID,zoom:l.tileID.overscaledZ,tileSize:this.tileSize*l.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function P(z,$){return delete l.request,l.aborted?h(null):z&&z.status!==404?h(z):($&&$.resourceTiming&&(l.resourceTiming=$.resourceTiming),this.map._refreshExpiredTiles&&$&&l.setExpiryData($),l.loadVectorData($,this.map.painter),o.cacheEntryPossiblyAdded(this.dispatcher),h(null),void(l.reloadCallback&&(this.loadTile(l,l.reloadCallback),l.reloadCallback=null)))}b.request.collectResourceTiming=this._collectResourceTiming,l.actor&&l.state!=="expired"?l.state==="loading"?l.reloadCallback=h:l.request=l.actor.send("reloadTile",b,P.bind(this)):(l.actor=this.dispatcher.getActor(),l.request=l.actor.send("loadTile",b,P.bind(this)))}abortTile(l){l.request&&(l.request.cancel(),delete l.request),l.actor&&l.actor.send("abortTile",{uid:l.uid,type:this.type,source:this.id},void 0)}unloadTile(l){l.unloadVectorData(),l.actor&&l.actor.send("removeTile",{uid:l.uid,type:this.type,source:this.id},void 0)}hasTransition(){return!1}}class Q extends o.Evented{constructor(l,h,g,b){super(),this.id=l,this.dispatcher=g,this.setEventedParent(b),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"},h),o.extend(this,o.pick(h,["url","scheme","tileSize"]))}load(){this._loaded=!1,this.fire(new o.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=le(this._options,this.map._requestManager,(l,h)=>{this._tileJSONRequest=null,this._loaded=!0,l?this.fire(new o.ErrorEvent(l)):h&&(o.extend(this,h),h.bounds&&(this.tileBounds=new J(h.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(l){this.map=l,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}serialize(){return o.extend({},this._options)}hasTile(l){return!this.tileBounds||this.tileBounds.contains(l.canonical)}loadTile(l,h){const g=l.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);l.request=o.getImage(this.map._requestManager.transformRequest(g,o.ResourceType.Tile),(b,P,z)=>{if(delete l.request,l.aborted)l.state="unloaded",h(null);else if(b)l.state="errored",h(b);else if(P){this.map._refreshExpiredTiles&&l.setExpiryData(z);const $=this.map.painter.context,V=$.gl;l.texture=this.map.painter.getTileTexture(P.width),l.texture?l.texture.update(P,{useMipmap:!0}):(l.texture=new R($,P,V.RGBA,{useMipmap:!0}),l.texture.bind(V.LINEAR,V.CLAMP_TO_EDGE,V.LINEAR_MIPMAP_NEAREST),$.extTextureFilterAnisotropic&&V.texParameterf(V.TEXTURE_2D,$.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,$.extTextureFilterAnisotropicMax)),l.state="loaded",o.cacheEntryPossiblyAdded(this.dispatcher),h(null)}})}abortTile(l,h){l.request&&(l.request.cancel(),delete l.request),h()}unloadTile(l,h){l.texture&&this.map.painter.saveTileTexture(l.texture),h()}hasTransition(){return!1}}let ge;class ne extends Q{constructor(l,h,g,b){super(l,h,g,b),this.type="raster-dem",this.maxzoom=22,this._options=o.extend({type:"raster-dem"},h),this.encoding=h.encoding||"mapbox"}serialize(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}}loadTile(l,h){const g=l.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);function b(P,z){P&&(l.state="errored",h(P)),z&&(l.dem=z,l.needsHillshadePrepare=!0,l.needsTerrainPrepare=!0,l.state="loaded",h(null))}l.request=o.getImage(this.map._requestManager.transformRequest(g,o.ResourceType.Tile),function(P,z){if(delete l.request,l.aborted)l.state="unloaded",h(null);else if(P)l.state="errored",h(P);else if(z){this.map._refreshExpiredTiles&&l.setExpiryData(z),delete z.cacheControl,delete z.expires;const $=o.isImageBitmap(z)&&(ge==null&&(ge=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),ge)?z:o.exported.getImageData(z,1),V={uid:l.uid,coord:l.tileID,source:this.id,rawImageData:$,encoding:this.encoding};l.actor&&l.state!=="expired"||(l.actor=this.dispatcher.getActor(),l.actor.send("loadDEMTile",V,b.bind(this)))}}.bind(this)),l.neighboringTiles=this._getNeighboringTiles(l.tileID)}_getNeighboringTiles(l){const h=l.canonical,g=Math.pow(2,h.z),b=(h.x-1+g)%g,P=h.x===0?l.wrap-1:l.wrap,z=(h.x+1+g)%g,$=h.x+1===g?l.wrap+1:l.wrap,V={};return V[new o.OverscaledTileID(l.overscaledZ,P,h.z,b,h.y).key]={backfilled:!1},V[new o.OverscaledTileID(l.overscaledZ,$,h.z,z,h.y).key]={backfilled:!1},h.y>0&&(V[new o.OverscaledTileID(l.overscaledZ,P,h.z,b,h.y-1).key]={backfilled:!1},V[new o.OverscaledTileID(l.overscaledZ,l.wrap,h.z,h.x,h.y-1).key]={backfilled:!1},V[new o.OverscaledTileID(l.overscaledZ,$,h.z,z,h.y-1).key]={backfilled:!1}),h.y+1<g&&(V[new o.OverscaledTileID(l.overscaledZ,P,h.z,b,h.y+1).key]={backfilled:!1},V[new o.OverscaledTileID(l.overscaledZ,l.wrap,h.z,h.x,h.y+1).key]={backfilled:!1},V[new o.OverscaledTileID(l.overscaledZ,$,h.z,z,h.y+1).key]={backfilled:!1}),V}unloadTile(l){l.demTexture&&this.map.painter.saveTileTexture(l.demTexture),l.fbo&&(l.fbo.destroy(),delete l.fbo),l.dem&&delete l.dem,delete l.neighboringTiles,l.state="unloaded",l.actor&&l.actor.send("removeDEMTile",{uid:l.uid,source:this.id})}}class de extends o.Evented{constructor(l,h,g,b){super(),this.id=l,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=g.getActor(),this.setEventedParent(b),this._data=h.data,this._options=o.extend({},h),this._collectResourceTiming=h.collectResourceTiming,h.maxzoom!==void 0&&(this.maxzoom=h.maxzoom),h.type&&(this.type=h.type),h.attribution&&(this.attribution=h.attribution),this.promoteId=h.promoteId;const P=o.EXTENT/this.tileSize;this.workerOptions=o.extend({source:this.id,cluster:h.cluster||!1,geojsonVtOptions:{buffer:(h.buffer!==void 0?h.buffer:128)*P,tolerance:(h.tolerance!==void 0?h.tolerance:.375)*P,extent:o.EXTENT,maxZoom:this.maxzoom,lineMetrics:h.lineMetrics||!1,generateId:h.generateId||!1},superclusterOptions:{maxZoom:h.clusterMaxZoom!==void 0?h.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,h.clusterMinPoints||2),extent:o.EXTENT,radius:(h.clusterRadius||50)*P,log:!1,generateId:h.generateId||!1},clusterProperties:h.clusterProperties,filter:h.filter},h.workerOptions)}load(){this._updateWorkerData("metadata")}onAdd(l){this.map=l,this.load()}setData(l){return this._data=l,this._updateWorkerData("content"),this}getClusterExpansionZoom(l,h){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:l,source:this.id},h),this}getClusterChildren(l,h){return this.actor.send("geojson.getClusterChildren",{clusterId:l,source:this.id},h),this}getClusterLeaves(l,h,g,b){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:l,limit:h,offset:g},b),this}_updateWorkerData(l){const h=o.extend({},this.workerOptions),g=this._data;typeof g=="string"?(h.request=this.map._requestManager.transformRequest(o.exported.resolveURL(g),o.ResourceType.Source),h.request.collectResourceTiming=this._collectResourceTiming):h.data=JSON.stringify(g),this._pendingLoads++,this.fire(new o.Event("dataloading",{dataType:"source"})),this.actor.send(`${this.type}.loadData`,h,(b,P)=>{if(this._pendingLoads--,this._removed||P&&P.abandoned)return void this.fire(new o.Event("dataabort",{dataType:"source",sourceDataType:l}));let z=null;if(P&&P.resourceTiming&&P.resourceTiming[this.id]&&(z=P.resourceTiming[this.id].slice(0)),b)return void this.fire(new o.ErrorEvent(b));const $={dataType:"source",sourceDataType:l};this._collectResourceTiming&&z&&z.length>0&&o.extend($,{resourceTiming:z}),this.fire(new o.Event("data",$))})}loaded(){return this._pendingLoads===0}loadTile(l,h){const g=l.actor?"reloadTile":"loadTile";l.actor=this.actor;const b={type:this.type,uid:l.uid,tileID:l.tileID,zoom:l.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};l.request=this.actor.send(g,b,(P,z)=>(delete l.request,l.unloadVectorData(),l.aborted?h(null):P?h(P):(l.loadVectorData(z,this.map.painter,g==="reloadTile"),h(null))))}abortTile(l){l.request&&(l.request.cancel(),delete l.request),l.aborted=!0}unloadTile(l){l.unloadVectorData(),this.actor.send("removeTile",{uid:l.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(l,h,g,b){super(),this.id=l,this.dispatcher=g,this.coordinates=h.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(b),this.options=h}load(l,h){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),(g,b)=>{this._loaded=!0,g?this.fire(new o.ErrorEvent(g)):b&&(this.image=b,l&&(this.coordinates=l),h&&h(),this._finishLoading())})}loaded(){return this._loaded}updateImage(l){return this.image&&l.url?(this.options.url=l.url,this.load(l.coordinates,()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new o.Event("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(l){this.map=l,this.load()}setCoordinates(l){this.coordinates=l;const h=l.map(o.MercatorCoordinate.fromLngLat);this.tileID=function(b){let P=1/0,z=1/0,$=-1/0,V=-1/0;for(const fe of b)P=Math.min(P,fe.x),z=Math.min(z,fe.y),$=Math.max($,fe.x),V=Math.max(V,fe.y);const W=Math.max($-P,V-z),ee=Math.max(0,Math.floor(-Math.log(W)/Math.LN2)),ie=Math.pow(2,ee);return new o.CanonicalTileID(ee,Math.floor((P+$)/2*ie),Math.floor((z+V)/2*ie))}(h),this.minzoom=this.maxzoom=this.tileID.z;const g=h.map(b=>this.tileID.getTilePoint(b)._round());return this._boundsArray=new o.RasterBoundsArray,this._boundsArray.emplaceBack(g[0].x,g[0].y,0,0),this._boundsArray.emplaceBack(g[1].x,g[1].y,o.EXTENT,0),this._boundsArray.emplaceBack(g[3].x,g[3].y,0,o.EXTENT),this._boundsArray.emplaceBack(g[2].x,g[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 l=this.map.painter.context,h=l.gl;this.boundsBuffer||(this.boundsBuffer=l.createVertexBuffer(this._boundsArray,oe.members)),this.boundsSegments||(this.boundsSegments=o.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new R(l,this.image,h.RGBA),this.texture.bind(h.LINEAR,h.CLAMP_TO_EDGE));for(const g in this.tiles){const b=this.tiles[g];b.state!=="loaded"&&(b.state="loaded",b.texture=this.texture)}}loadTile(l,h){this.tileID&&this.tileID.equals(l.tileID.canonical)?(this.tiles[String(l.tileID.wrap)]=l,l.buckets={},h(null)):(l.state="errored",h(null))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class Re extends ye{constructor(l,h,g,b){super(l,h,g,b),this.roundZoom=!0,this.type="video",this.options=h}load(){this._loaded=!1;const l=this.options;this.urls=[];for(const h of l.urls)this.urls.push(this.map._requestManager.transformRequest(h,o.ResourceType.Source).url);o.getVideo(this.urls,(h,g)=>{this._loaded=!0,h?this.fire(new o.ErrorEvent(h)):g&&(this.video=g,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(l){if(this.video){const h=this.video.seekable;l<h.start(0)||l>h.end(0)?this.fire(new o.ErrorEvent(new o.ValidationError(`sources.${this.id}`,null,`Playback for this video can be set only between the ${h.start(0)} and ${h.end(0)}-second mark.`))):this.video.currentTime=l}}getVideo(){return this.video}onAdd(l){this.map||(this.map=l,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 l=this.map.painter.context,h=l.gl;this.boundsBuffer||(this.boundsBuffer=l.createVertexBuffer(this._boundsArray,oe.members)),this.boundsSegments||(this.boundsSegments=o.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(h.LINEAR,h.CLAMP_TO_EDGE),h.texSubImage2D(h.TEXTURE_2D,0,0,0,h.RGBA,h.UNSIGNED_BYTE,this.video)):(this.texture=new R(l,this.video,h.RGBA),this.texture.bind(h.LINEAR,h.CLAMP_TO_EDGE));for(const g in this.tiles){const b=this.tiles[g];b.state!=="loaded"&&(b.state="loaded",b.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(l,h,g,b){super(l,h,g,b),h.coordinates?Array.isArray(h.coordinates)&&h.coordinates.length===4&&!h.coordinates.some(P=>!Array.isArray(P)||P.length!==2||P.some(z=>typeof z!="number"))||this.fire(new o.ErrorEvent(new o.ValidationError(`sources.${l}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new o.ErrorEvent(new o.ValidationError(`sources.${l}`,null,'missing required property "coordinates"'))),h.animate&&typeof h.animate!="boolean"&&this.fire(new o.ErrorEvent(new o.ValidationError(`sources.${l}`,null,'optional "animate" property must be a boolean value'))),h.canvas?typeof h.canvas=="string"||h.canvas instanceof HTMLCanvasElement||this.fire(new o.ErrorEvent(new o.ValidationError(`sources.${l}`,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.${l}`,null,'missing required property "canvas"'))),this.options=h,this.animate=h.animate===void 0||h.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(l){this.map=l,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let l=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,l=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,l=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const h=this.map.painter.context,g=h.gl;this.boundsBuffer||(this.boundsBuffer=h.createVertexBuffer(this._boundsArray,oe.members)),this.boundsSegments||(this.boundsSegments=o.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(l||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new R(h,this.canvas,g.RGBA,{premultiply:!0});for(const b in this.tiles){const P=this.tiles[b];P.state!=="loaded"&&(P.state="loaded",P.texture=this.texture)}}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const l of[this.canvas.width,this.canvas.height])if(isNaN(l)||l<=0)return!0;return!1}}const ke={vector:Z,raster:Q,"raster-dem":ne,geojson:de,video:Re,image:ye,canvas:Te};function ze(x,l){const h=o.create();return o.translate(h,h,[1,1,0]),o.scale(h,h,[.5*x.width,.5*x.height,1]),o.multiply(h,h,x.calculatePosMatrix(l.toUnwrapped()))}function Ie(x,l,h,g,b,P){const z=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}(b&&b.layers,l,x.id),$=P.maxPitchScaleFactor(),V=x.tilesIn(g,$,z);V.sort(Ne);const W=[];for(const ie of V)W.push({wrappedTileID:ie.tileID.wrapped().key,queryResults:ie.tile.queryRenderedFeatures(l,h,x._state,ie.queryGeometry,ie.cameraQueryGeometry,ie.scale,b,P,$,ze(x.transform,ie.tileID))});const ee=function(ie){const fe={},Se={};for(const _e of ie){const we=_e.queryResults,$e=_e.wrappedTileID,Ue=Se[$e]=Se[$e]||{};for(const et in we){const Pe=we[et],at=Ue[et]=Ue[et]||{},rt=fe[et]=fe[et]||[];for(const gt of Pe)at[gt.featureIndex]||(at[gt.featureIndex]=!0,rt.push(gt))}}return fe}(W);for(const ie in ee)ee[ie].forEach(fe=>{const Se=fe.feature,_e=x.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(x,l){const h=x.tileID,g=l.tileID;return h.overscaledZ-g.overscaledZ||h.canonical.y-g.canonical.y||h.wrap-g.wrap||h.canonical.x-g.canonical.x}class De{constructor(l,h){this.tileID=l,this.uid=o.uniqueId(),this.uses=0,this.tileSize=h,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(l){const h=l+this.timeAdded;h<o.exported.now()||this.fadeEndTime&&h<this.fadeEndTime||(this.fadeEndTime=h)}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(l){this.demTexture&&l.saveTileTexture(this.demTexture),this.textures.forEach(h=>l.saveTileTexture(h)),this.demTexture=null,this.textures=[],this.textureCoords={}}loadVectorData(l,h,g){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",l){l.featureIndex&&(this.latestFeatureIndex=l.featureIndex,l.rawTileData?(this.latestRawTileData=l.rawTileData,this.latestFeatureIndex.rawTileData=l.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=l.collisionBoxArray,this.buckets=function(b,P){const z={};if(!P)return z;for(const $ of b){const V=$.layerIds.map(W=>P.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)z[W.id]=$}}return z}(l.buckets,h.style),this.hasSymbolBuckets=!1;for(const b in this.buckets){const P=this.buckets[b];if(P instanceof o.SymbolBucket){if(this.hasSymbolBuckets=!0,!g)break;P.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const b in this.buckets){const P=this.buckets[b];if(P instanceof o.SymbolBucket&&P.hasRTLText){this.hasRTLText=!0,o.lazyLoadRTLTextPlugin();break}}this.queryPadding=0;for(const b in this.buckets){const P=this.buckets[b];this.queryPadding=Math.max(this.queryPadding,h.style.getLayer(b).queryRadius(P))}l.imageAtlas&&(this.imageAtlas=l.imageAtlas),l.glyphAtlasImage&&(this.glyphAtlasImage=l.glyphAtlasImage)}else this.collisionBoxArray=new o.CollisionBoxArray}unloadVectorData(){for(const l in this.buckets)this.buckets[l].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(l){return this.buckets[l.id]}upload(l){for(const g in this.buckets){const b=this.buckets[g];b.uploadPending()&&b.upload(l)}const h=l.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new R(l,this.imageAtlas.image,h.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new R(l,this.glyphAtlasImage,h.ALPHA),this.glyphAtlasImage=null)}prepare(l){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(l,this.imageAtlasTexture)}queryRenderedFeatures(l,h,g,b,P,z,$,V,W,ee){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:b,cameraQueryGeometry:P,scale:z,tileSize:this.tileSize,pixelPosMatrix:ee,transform:V,params:$,queryPadding:this.queryPadding*W},l,h,g):{}}querySourceFeatures(l,h){const g=this.latestFeatureIndex;if(!g||!g.rawTileData)return;const b=g.loadVTLayers(),P=h?h.sourceLayer:"",z=b._geojsonTileLayer||b[P];if(!z)return;const $=o.createFilter(h&&h.filter),{z:V,x:W,y:ee}=this.tileID.canonical,ie={z:V,x:W,y:ee};for(let fe=0;fe<z.length;fe++){const Se=z.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=g.getId(Se,P),we=new o.GeoJSONFeature(Se,V,W,ee,_e);we.tile=ie,l.push(we)}}hasData(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(l){const h=this.expirationTime;if(l.cacheControl){const g=o.parseCacheControl(l.cacheControl);g["max-age"]&&(this.expirationTime=Date.now()+1e3*g["max-age"])}else l.expires&&(this.expirationTime=new Date(l.expires).getTime());if(this.expirationTime){const g=Date.now();let b=!1;if(this.expirationTime>g)b=!1;else if(h)if(this.expirationTime<h)b=!0;else{const P=this.expirationTime-h;P?this.expirationTime=g+Math.max(P,3e4):b=!0}else b=!0;b?(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(l,h){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(l).length===0)return;const g=this.latestFeatureIndex.loadVTLayers();for(const b in this.buckets){if(!h.style.hasLayer(b))continue;const P=this.buckets[b],z=P.layers[0].sourceLayer||"_geojsonTileLayer",$=g[z],V=l[z];if(!$||!V||Object.keys(V).length===0)continue;P.update(V,$,this.imageAtlas&&this.imageAtlas.patternPositions||{});const W=h&&h.style&&h.style.getLayer(b);W&&(this.queryPadding=Math.max(this.queryPadding,W.queryRadius(P)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<o.exported.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(l){this.symbolFadeHoldUntil=o.exported.now()+l}setDependencies(l,h){const g={};for(const b of h)g[b]=!0;this.dependencies[l]=g}hasDependency(l,h){for(const g of l){const b=this.dependencies[g];if(b){for(const P of h)if(b[P])return!0}}return!1}}class Ve{constructor(l,h){this.max=l,this.onRemove=h,this.reset()}reset(){for(const l in this.data)for(const h of this.data[l])h.timeout&&clearTimeout(h.timeout),this.onRemove(h.value);return this.data={},this.order=[],this}add(l,h,g){const b=l.wrapped().key;this.data[b]===void 0&&(this.data[b]=[]);const P={value:h,timeout:void 0};if(g!==void 0&&(P.timeout=setTimeout(()=>{this.remove(l,P)},g)),this.data[b].push(P),this.order.push(b),this.order.length>this.max){const z=this._getAndRemoveByKey(this.order[0]);z&&this.onRemove(z)}return this}has(l){return l.wrapped().key in this.data}getAndRemove(l){return this.has(l)?this._getAndRemoveByKey(l.wrapped().key):null}_getAndRemoveByKey(l){const h=this.data[l].shift();return h.timeout&&clearTimeout(h.timeout),this.data[l].length===0&&delete this.data[l],this.order.splice(this.order.indexOf(l),1),h.value}getByKey(l){const h=this.data[l];return h?h[0].value:null}get(l){return this.has(l)?this.data[l.wrapped().key][0].value:null}remove(l,h){if(!this.has(l))return this;const g=l.wrapped().key,b=h===void 0?0:this.data[g].indexOf(h),P=this.data[g][b];return this.data[g].splice(b,1),P.timeout&&clearTimeout(P.timeout),this.data[g].length===0&&delete this.data[g],this.onRemove(P.value),this.order.splice(this.order.indexOf(g),1),this}setMaxSize(l){for(this.max=l;this.order.length>this.max;){const h=this._getAndRemoveByKey(this.order[0]);h&&this.onRemove(h)}return this}filter(l){const h=[];for(const g in this.data)for(const b of this.data[g])l(b.value)||h.push(b);for(const g of h)this.remove(g.value.tileID,g)}}class Ge{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(l,h,g){const b=String(h);if(this.stateChanges[l]=this.stateChanges[l]||{},this.stateChanges[l][b]=this.stateChanges[l][b]||{},o.extend(this.stateChanges[l][b],g),this.deletedStates[l]===null){this.deletedStates[l]={};for(const P in this.state[l])P!==b&&(this.deletedStates[l][P]=null)}else if(this.deletedStates[l]&&this.deletedStates[l][b]===null){this.deletedStates[l][b]={};for(const P in this.state[l][b])g[P]||(this.deletedStates[l][b][P]=null)}else for(const P in g)this.deletedStates[l]&&this.deletedStates[l][b]&&this.deletedStates[l][b][P]===null&&delete this.deletedStates[l][b][P]}removeFeatureState(l,h,g){if(this.deletedStates[l]===null)return;const b=String(h);if(this.deletedStates[l]=this.deletedStates[l]||{},g&&h!==void 0)this.deletedStates[l][b]!==null&&(this.deletedStates[l][b]=this.deletedStates[l][b]||{},this.deletedStates[l][b][g]=null);else if(h!==void 0)if(this.stateChanges[l]&&this.stateChanges[l][b])for(g in this.deletedStates[l][b]={},this.stateChanges[l][b])this.deletedStates[l][b][g]=null;else this.deletedStates[l][b]=null;else this.deletedStates[l]=null}getState(l,h){const g=String(h),b=o.extend({},(this.state[l]||{})[g],(this.stateChanges[l]||{})[g]);if(this.deletedStates[l]===null)return{};if(this.deletedStates[l]){const P=this.deletedStates[l][h];if(P===null)return{};for(const z in P)delete b[z]}return b}initializeTileState(l,h){l.setFeatureState(this.state,h)}coalesceChanges(l,h){const g={};for(const b in this.stateChanges){this.state[b]=this.state[b]||{};const P={};for(const z in this.stateChanges[b])this.state[b][z]||(this.state[b][z]={}),o.extend(this.state[b][z],this.stateChanges[b][z]),P[z]=this.state[b][z];g[b]=P}for(const b in this.deletedStates){this.state[b]=this.state[b]||{};const P={};if(this.deletedStates[b]===null)for(const z in this.state[b])P[z]={},this.state[b][z]={};else for(const z in this.deletedStates[b]){if(this.deletedStates[b][z]===null)this.state[b][z]={};else for(const $ of Object.keys(this.deletedStates[b][z]))delete this.state[b][z][$];P[z]=this.state[b][z]}g[b]=g[b]||{},o.extend(g[b],P)}if(this.stateChanges={},this.deletedStates={},Object.keys(g).length!==0)for(const b in l)l[b].setFeatureState(g,h)}}class je extends o.Evented{constructor(l,h,g){super(),this.id=l,this.dispatcher=g,this.on("data",b=>{b.dataType==="source"&&b.sourceDataType==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&b.dataType==="source"&&b.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(b,P,z,$){const V=new ke[P.type](b,P,z,$);if(V.id!==b)throw new Error(`Expected Source id to be ${b} instead of ${V.id}`);return o.bindAll(["load","abort","unload","serialize","prepare"],V),V}(l,h,g,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 Ge}onAdd(l){this.map=l,this._maxTileCacheSize=l?l._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(l)}onRemove(l){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(l)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(const l in this._tiles){const h=this._tiles[l];if(h.state!=="loaded"&&h.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const l=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,l&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(l,h){return this._source.loadTile(l,h)}_unloadTile(l){if(this._source.unloadTile)return this._source.unloadTile(l,()=>{})}_abortTile(l){this._source.abortTile&&this._source.abortTile(l,()=>{}),this._source.fire(new o.Event("dataabort",{tile:l,coord:l.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(l){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const h in this._tiles){const g=this._tiles[h];g.upload(l),g.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(l=>l.tileID).sort(ct).map(l=>l.key)}getRenderableIds(l){const h=[];for(const g in this._tiles)this._isIdRenderable(g,l)&&h.push(this._tiles[g]);return l?h.sort((g,b)=>{const P=g.tileID,z=b.tileID,$=new o.pointGeometry(P.canonical.x,P.canonical.y)._rotate(this.transform.angle),V=new o.pointGeometry(z.canonical.x,z.canonical.y)._rotate(this.transform.angle);return P.overscaledZ-z.overscaledZ||V.y-$.y||V.x-$.x}).map(g=>g.tileID.key):h.map(g=>g.tileID).sort(ct).map(g=>g.key)}hasRenderableParent(l){const h=this.findLoadedParent(l,0);return!!h&&this._isIdRenderable(h.tileID.key)}_isIdRenderable(l,h){return this._tiles[l]&&this._tiles[l].hasData()&&!this._coveredTiles[l]&&(h||!this._tiles[l].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const l in this._tiles)this._tiles[l].state!=="errored"&&this._reloadTile(l,"reloading")}}_reloadTile(l,h){const g=this._tiles[l];g&&(g.state!=="loading"&&(g.state=h),this._loadTile(g,this._tileLoaded.bind(this,g,l,h)))}_tileLoaded(l,h,g,b){if(b)return l.state="errored",void(b.status!==404?this._source.fire(new o.ErrorEvent(b,{tile:l})):this.update(this.transform,this.terrain));l.timeAdded=o.exported.now(),g==="expired"&&(l.refreshedUponExpiration=!0),this._setTileReloadTimer(h,l),this.getSource().type==="raster-dem"&&l.dem&&this._backfillDEM(l),this._state.initializeTileState(l,this.map?this.map.painter:null),l.aborted||this._source.fire(new o.Event("data",{dataType:"source",tile:l,coord:l.tileID}))}_backfillDEM(l){const h=this.getRenderableIds();for(let b=0;b<h.length;b++){const P=h[b];if(l.neighboringTiles&&l.neighboringTiles[P]){const z=this.getTileByID(P);g(l,z),g(z,l)}}function g(b,P){b.needsHillshadePrepare=!0,b.needsTerrainPrepare=!0;let z=P.tileID.canonical.x-b.tileID.canonical.x;const $=P.tileID.canonical.y-b.tileID.canonical.y,V=Math.pow(2,b.tileID.canonical.z),W=P.tileID.key;z===0&&$===0||Math.abs($)>1||(Math.abs(z)>1&&(Math.abs(z+V)===1?z+=V:Math.abs(z-V)===1&&(z-=V)),P.dem&&b.dem&&(b.dem.backfillBorder(P.dem,z,$),b.neighboringTiles&&b.neighboringTiles[W]&&(b.neighboringTiles[W].backfilled=!0)))}}getTile(l){return this.getTileByID(l.key)}getTileByID(l){return this._tiles[l]}_retainLoadedChildren(l,h,g,b){for(const P in this._tiles){let z=this._tiles[P];if(b[P]||!z.hasData()||z.tileID.overscaledZ<=h||z.tileID.overscaledZ>g)continue;let $=z.tileID;for(;z&&z.tileID.overscaledZ>h+1;){const W=z.tileID.scaledTo(z.tileID.overscaledZ-1);z=this._tiles[W.key],z&&z.hasData()&&($=W)}let V=$;for(;V.overscaledZ>h;)if(V=V.scaledTo(V.overscaledZ-1),l[V.key]){b[$.key]=$;break}}}findLoadedParent(l,h){if(l.key in this._loadedParentTiles){const g=this._loadedParentTiles[l.key];return g&&g.tileID.overscaledZ>=h?g:null}for(let g=l.overscaledZ-1;g>=h;g--){const b=l.scaledTo(g),P=this._getLoadedTile(b);if(P)return P}}_getLoadedTile(l){const h=this._tiles[l.key];return h&&h.hasData()?h:this._cache.getByKey(l.wrapped().key)}updateCacheSize(l){const h=Math.ceil(l.width/this._source.tileSize)+1,g=Math.ceil(l.height/this._source.tileSize)+1,b=Math.floor(h*g*5),P=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,b):b;this._cache.setMaxSize(P)}handleWrapJump(l){const h=Math.round((l-(this._prevLng===void 0?l:this._prevLng))/360);if(this._prevLng=l,h){const g={};for(const b in this._tiles){const P=this._tiles[b];P.tileID=P.tileID.unwrapTo(P.tileID.wrap+h),g[P.tileID.key]=P}this._tiles=g;for(const b in this._timers)clearTimeout(this._timers[b]),delete this._timers[b];for(const b in this._tiles)this._setTileReloadTimer(b,this._tiles[b])}}update(l,h){if(this.transform=l,this.terrain=h,!this._sourceLoaded||this._paused)return;let g;this.updateCacheSize(l),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?g=l.getVisibleUnwrappedCoordinates(this._source.tileID).map(W=>new o.OverscaledTileID(W.canonical.z,W.wrap,W.canonical.z,W.canonical.x,W.canonical.y)):(g=l.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:h}),this._source.hasTile&&(g=g.filter(W=>this._source.hasTile(W)))):g=[];const b=l.coveringZoomLevel(this._source),P=Math.max(b-je.maxOverzooming,this._source.minzoom),z=Math.max(b+je.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const W={};for(const ee of g)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}g=g.concat(Object.values(W))}const $=this._updateRetainedTiles(g,b);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,P);we&&(this._addTile(we.tileID),W[we.tileID.key]=we.tileID),ee[fe]=Se}this._retainLoadedChildren(ee,b,z,$);for(const fe in W)$[fe]||(this._coveredTiles[fe]=!0,$[fe]=W[fe]);if(h){const fe={},Se={};for(const _e of g)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 l in this._tiles)this._tiles[l].holdingForFade()&&this._removeTile(l)}_updateRetainedTiles(l,h){const g={},b={},P=Math.max(h-je.maxOverzooming,this._source.minzoom),z=Math.max(h+je.maxUnderzooming,this._source.minzoom),$={};for(const V of l){const W=this._addTile(V);g[V.key]=V,W.hasData()||h<this._source.maxzoom&&($[V.key]=V)}this._retainLoadedChildren($,h,z,g);for(const V of l){let W=this._tiles[V.key];if(W.hasData())continue;if(h+1>this._source.maxzoom){const ie=V.children(this._source.maxzoom)[0],fe=this.getTile(ie);if(fe&&fe.hasData()){g[ie.key]=ie;continue}}else{const ie=V.children(this._source.maxzoom);if(g[ie[0].key]&&g[ie[1].key]&&g[ie[2].key]&&g[ie[3].key])continue}let ee=W.wasRequested();for(let ie=V.overscaledZ-1;ie>=P;--ie){const fe=V.scaledTo(ie);if(b[fe.key]||(b[fe.key]=!0,W=this.getTile(fe),!W&&ee&&(W=this._addTile(fe)),W&&(g[fe.key]=fe,ee=W.wasRequested(),W.hasData())))break}}return g}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const l in this._tiles){const h=[];let g,b=this._tiles[l].tileID;for(;b.overscaledZ>0;){if(b.key in this._loadedParentTiles){g=this._loadedParentTiles[b.key];break}h.push(b.key);const P=b.scaledTo(b.overscaledZ-1);if(g=this._getLoadedTile(P),g)break;b=P}for(const P of h)this._loadedParentTiles[P]=g}}_addTile(l){let h=this._tiles[l.key];if(h)return h;h=this._cache.getAndRemove(l),h&&(this._setTileReloadTimer(l.key,h),h.tileID=l,this._state.initializeTileState(h,this.map?this.map.painter:null),this._cacheTimers[l.key]&&(clearTimeout(this._cacheTimers[l.key]),delete this._cacheTimers[l.key],this._setTileReloadTimer(l.key,h)));const g=h;return h||(h=new De(l,this._source.tileSize*l.overscaleFactor()),this._loadTile(h,this._tileLoaded.bind(this,h,l.key,h.state))),h.uses++,this._tiles[l.key]=h,g||this._source.fire(new o.Event("dataloading",{tile:h,coord:h.tileID,dataType:"source"})),h}_setTileReloadTimer(l,h){l in this._timers&&(clearTimeout(this._timers[l]),delete this._timers[l]);const g=h.getExpiryTimeout();g&&(this._timers[l]=setTimeout(()=>{this._reloadTile(l,"expired"),delete this._timers[l]},g))}_removeTile(l){const h=this._tiles[l];h&&(h.uses--,delete this._tiles[l],this._timers[l]&&(clearTimeout(this._timers[l]),delete this._timers[l]),h.uses>0||(h.hasData()&&h.state!=="reloading"?this._cache.add(h.tileID,h,h.getExpiryTimeout()):(h.aborted=!0,this._abortTile(h),this._unloadTile(h))))}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const l in this._tiles)this._removeTile(l);this._cache.reset()}tilesIn(l,h,g){const b=[],P=this.transform;if(!P)return b;const z=g?P.getCameraQueryGeometry(l):l,$=l.map(_e=>P.pointCoordinate(_e,this.terrain)),V=z.map(_e=>P.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,Ue=Math.pow(2,P.zoom-we.tileID.overscaledZ),et=h*we.queryPadding*o.EXTENT/we.tileSize/Ue,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)),rt=V.map(gt=>$e.getTilePoint(gt));b.push({tile:we,tileID:$e,queryGeometry:at,cameraQueryGeometry:rt,scale:Ue})}}return b}getVisibleCoordinates(l){const h=this.getRenderableIds(l).map(g=>this._tiles[g].tileID);for(const g of h)g.posMatrix=this.transform.calculatePosMatrix(g.toUnwrapped());return h}hasTransition(){if(this._source.hasTransition())return!0;if(pt(this._source.type))for(const l in this._tiles){const h=this._tiles[l];if(h.fadeEndTime!==void 0&&h.fadeEndTime>=o.exported.now())return!0}return!1}setFeatureState(l,h,g){this._state.updateState(l=l||"_geojsonTileLayer",h,g)}removeFeatureState(l,h,g){this._state.removeFeatureState(l=l||"_geojsonTileLayer",h,g)}getFeatureState(l,h){return this._state.getState(l=l||"_geojsonTileLayer",h)}setDependencies(l,h,g){const b=this._tiles[l];b&&b.setDependencies(h,g)}reloadTilesForDependencies(l,h){for(const g in this._tiles)this._tiles[g].hasDependency(l,h)&&this._reloadTile(g,"reloading");this._cache.filter(g=>!g.hasDependency(l,h))}}function ct(x,l){const h=Math.abs(2*x.wrap)-+(x.wrap<0),g=Math.abs(2*l.wrap)-+(l.wrap<0);return x.overscaledZ-l.overscaledZ||g-h||l.canonical.y-x.canonical.y||l.canonical.x-x.canonical.x}function pt(x){return x==="raster"||x==="image"||x==="video"}je.maxOverzooming=10,je.maxUnderzooming=3;const Tt="mapboxgl_preloaded_worker_pool";class Ye{constructor(){this.active={}}acquire(l){if(!this.workers)for(this.workers=[];this.workers.length<Ye.workerCount;)this.workers.push(new Worker(al.workerUrl));return this.active[l]=!0,this.workers.slice()}release(l){delete this.active[l],this.numActive()===0&&(this.workers.forEach(h=>{h.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 It(){return mt||(mt=new Ye),mt}function Ct(x,l){const h={};for(const g in x)g!=="ref"&&(h[g]=x[g]);return o.refProperties.forEach(g=>{g in l&&(h[g]=l[g])}),h}function Dt(x){x=x.slice();const l=Object.create(null);for(let h=0;h<x.length;h++)l[x[h].id]=x[h];for(let h=0;h<x.length;h++)"ref"in x[h]&&(x[h]=Ct(x[h],l[x[h].ref]));return x}Ye.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(x,l,h){h.push({command:lt.addSource,args:[x,l[x]]})}function ut(x,l,h){l.push({command:lt.removeSource,args:[x]}),h[x]=!0}function it(x,l,h,g){ut(x,h,g),dt(x,l,h)}function ft(x,l,h){let g;for(g in x[h])if(Object.prototype.hasOwnProperty.call(x[h],g)&&g!=="data"&&!y(x[h][g],l[h][g]))return!1;for(g in l[h])if(Object.prototype.hasOwnProperty.call(l[h],g)&&g!=="data"&&!y(x[h][g],l[h][g]))return!1;return!0}function xt(x,l,h,g,b,P){let z;for(z in l=l||{},x=x||{})Object.prototype.hasOwnProperty.call(x,z)&&(y(x[z],l[z])||h.push({command:P,args:[g,z,l[z],b]}));for(z in l)Object.prototype.hasOwnProperty.call(l,z)&&!Object.prototype.hasOwnProperty.call(x,z)&&(y(x[z],l[z])||h.push({command:P,args:[g,z,l[z],b]}))}function Wt(x){return x.id}function jt(x,l){return x[l.id]=l,x}class Qt{constructor(l,h){this.reset(l,h)}reset(l,h){this.points=l||[],this._distances=[0];for(let g=1;g<this.points.length;g++)this._distances[g]=this._distances[g-1]+this.points[g].dist(this.points[g-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(h||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(l){if(this.points.length===1)return this.points[0];l=o.clamp(l,0,1);let h=1,g=this._distances[h];const b=l*this.paddedLength+this.padding;for(;g<b&&h<this._distances.length;)g=this._distances[++h];const P=h-1,z=this._distances[P],$=g-z,V=$>0?(b-z)/$:0;return this.points[P].mult(1-V).add(this.points[h].mult(V))}}function Fe(x,l){let h=!0;return x==="always"||x!=="never"&&l!=="never"||(h=!1),h}class qe{constructor(l,h,g){const b=this.boxCells=[],P=this.circleCells=[];this.xCellCount=Math.ceil(l/g),this.yCellCount=Math.ceil(h/g);for(let z=0;z<this.xCellCount*this.yCellCount;z++)b.push([]),P.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=l,this.height=h,this.xScale=this.xCellCount/l,this.yScale=this.yCellCount/h,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(l,h,g,b,P){this._forEachCell(h,g,b,P,this._insertBoxCell,this.boxUid++),this.boxKeys.push(l),this.bboxes.push(h),this.bboxes.push(g),this.bboxes.push(b),this.bboxes.push(P)}insertCircle(l,h,g,b){this._forEachCell(h-b,g-b,h+b,g+b,this._insertCircleCell,this.circleUid++),this.circleKeys.push(l),this.circles.push(h),this.circles.push(g),this.circles.push(b)}_insertBoxCell(l,h,g,b,P,z){this.boxCells[P].push(z)}_insertCircleCell(l,h,g,b,P,z){this.circleCells[P].push(z)}_query(l,h,g,b,P,z,$){if(g<0||l>this.width||b<0||h>this.height)return[];const V=[];if(l<=0&&h<=0&&this.width<=g&&this.height<=b){if(P)return[{key:null,x1:l,y1:h,x2:g,y2:b}];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(l,h,g,b,this._queryCell,V,{hitTest:P,overlapMode:z,seenUids:{box:{},circle:{}}},$);return V}query(l,h,g,b){return this._query(l,h,g,b,!1,null)}hitTest(l,h,g,b,P,z){return this._query(l,h,g,b,!0,P,z).length>0}hitTestCircle(l,h,g,b,P){const z=l-g,$=l+g,V=h-g,W=h+g;if($<0||z>this.width||W<0||V>this.height)return!1;const ee=[];return this._forEachCell(z,V,$,W,this._queryCellCircle,ee,{hitTest:!0,overlapMode:b,circle:{x:l,y:h,radius:g},seenUids:{box:{},circle:{}}},P),ee.length>0}_queryCell(l,h,g,b,P,z,$,V){const{seenUids:W,hitTest:ee,overlapMode:ie}=$,fe=this.boxCells[P];if(fe!==null){const _e=this.bboxes;for(const we of fe)if(!W.box[we]){W.box[we]=!0;const $e=4*we,Ue=this.boxKeys[we];if(l<=_e[$e+2]&&h<=_e[$e+3]&&g>=_e[$e+0]&&b>=_e[$e+1]&&(!V||V(Ue))&&(!ee||!Fe(ie,Ue.overlapMode))&&(z.push({key:Ue,x1:_e[$e],y1:_e[$e+1],x2:_e[$e+2],y2:_e[$e+3]}),ee))return!0}}const Se=this.circleCells[P];if(Se!==null){const _e=this.circles;for(const we of Se)if(!W.circle[we]){W.circle[we]=!0;const $e=3*we,Ue=this.circleKeys[we];if(this._circleAndRectCollide(_e[$e],_e[$e+1],_e[$e+2],l,h,g,b)&&(!V||V(Ue))&&(!ee||!Fe(ie,Ue.overlapMode))){const et=_e[$e],Pe=_e[$e+1],at=_e[$e+2];if(z.push({key:Ue,x1:et-at,y1:Pe-at,x2:et+at,y2:Pe+at}),ee)return!0}}}return!1}_queryCellCircle(l,h,g,b,P,z,$,V){const{circle:W,seenUids:ee,overlapMode:ie}=$,fe=this.boxCells[P];if(fe!==null){const _e=this.bboxes;for(const we of fe)if(!ee.box[we]){ee.box[we]=!0;const $e=4*we,Ue=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(Ue))&&!Fe(ie,Ue.overlapMode))return z.push(!0),!0}}const Se=this.circleCells[P];if(Se!==null){const _e=this.circles;for(const we of Se)if(!ee.circle[we]){ee.circle[we]=!0;const $e=3*we,Ue=this.circleKeys[we];if(this._circlesCollide(_e[$e],_e[$e+1],_e[$e+2],W.x,W.y,W.radius)&&(!V||V(Ue))&&!Fe(ie,Ue.overlapMode))return z.push(!0),!0}}}_forEachCell(l,h,g,b,P,z,$,V){const W=this._convertToXCellCoord(l),ee=this._convertToYCellCoord(h),ie=this._convertToXCellCoord(g),fe=this._convertToYCellCoord(b);for(let Se=W;Se<=ie;Se++)for(let _e=ee;_e<=fe;_e++)if(P.call(this,l,h,g,b,this.xCellCount*_e+Se,z,$,V))return}_convertToXCellCoord(l){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(l*this.xScale)))}_convertToYCellCoord(l){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(l*this.yScale)))}_circlesCollide(l,h,g,b,P,z){const $=b-l,V=P-h,W=g+z;return W*W>$*$+V*V}_circleAndRectCollide(l,h,g,b,P,z,$){const V=(z-b)/2,W=Math.abs(l-(b+V));if(W>V+g)return!1;const ee=($-P)/2,ie=Math.abs(h-(P+ee));if(ie>ee+g)return!1;if(W<=V||ie<=ee)return!0;const fe=W-V,Se=ie-ee;return fe*fe+Se*Se<=g*g}}function Xt(x,l,h,g,b){const P=o.create();return l?(o.scale(P,P,[1/b,1/b,1]),h||o.rotateZ(P,P,g.angle)):o.multiply(P,g.labelPlaneMatrix,x),P}function cr(x,l,h,g,b){if(l){const P=o.clone(x);return o.scale(P,P,[b,b,1]),h||o.rotateZ(P,P,-g.angle),P}return g.glCoordMatrix}function Vt(x,l,h){let g;h?(g=[x.x,x.y,h(x.x,x.y),1],o.transformMat4(g,g,l)):(g=[x.x,x.y,0,1],Tr(g,g,l));const b=g[3];return{point:new o.pointGeometry(g[0]/b,g[1]/b),signedDistanceFromCamera:b}}function Ut(x,l){return .5+x/l*.5}function rr(x,l){const h=x[0]/x[3],g=x[1]/x[3];return h>=-l[0]&&h<=l[0]&&g>=-l[1]&&g<=l[1]}function xr(x,l,h,g,b,P,z,$,V,W){const ee=g?x.textSizeData:x.iconSizeData,ie=o.evaluateSizeForZoom(ee,h.transform.zoom),fe=[256/h.width*2+1,256/h.height*2+1],Se=g?x.text.dynamicLayoutVertexArray:x.icon.dynamicLayoutVertexArray;Se.clear();const _e=x.lineVertexArray,we=g?x.text.placedSymbolArray:x.icon.placedSymbolArray,$e=h.transform.width/h.transform.height;let Ue=!1;for(let et=0;et<we.length;et++){const Pe=we.get(et);if(Pe.hidden||Pe.writingMode===o.WritingMode.vertical&&!Ue){Lt(Pe.numGlyphs,Se);continue}let at;if(Ue=!1,W?(at=[Pe.anchorX,Pe.anchorY,W(Pe.anchorX,Pe.anchorY),1],o.transformMat4(at,at,l)):(at=[Pe.anchorX,Pe.anchorY,0,1],Tr(at,at,l)),!rr(at,fe)){Lt(Pe.numGlyphs,Se);continue}const rt=Ut(h.transform.cameraToCenterDistance,at[3]),gt=o.evaluateSizeForFeature(ee,ie,Pe),yt=z?gt/rt:gt*rt,zt=new o.pointGeometry(Pe.anchorX,Pe.anchorY),vt=Vt(zt,b,W).point,nr={},Gt=qt(Pe,yt,!1,$,l,b,P,x.glyphOffsetArray,_e,Se,vt,zt,nr,$e,V,W);Ue=Gt.useVertical,(Gt.notEnoughRoom||Ue||Gt.needsFlipping&&qt(Pe,yt,!0,$,l,b,P,x.glyphOffsetArray,_e,Se,vt,zt,nr,$e,V,W).notEnoughRoom)&&Lt(Pe.numGlyphs,Se)}g?x.text.dynamicLayoutVertexBuffer.updateData(Se):x.icon.dynamicLayoutVertexBuffer.updateData(Se)}function Or(x,l,h,g,b,P,z,$,V,W,ee,ie,fe){const Se=$.glyphStartIndex+$.numGlyphs,_e=$.lineStartIndex,we=$.lineStartIndex+$.lineLength,$e=l.getoffsetX($.glyphStartIndex),Ue=l.getoffsetX(Se-1),et=$r(x*$e,h,g,b,P,z,$.segment,_e,we,V,W,ee,ie,fe);if(!et)return null;const Pe=$r(x*Ue,h,g,b,P,z,$.segment,_e,we,V,W,ee,ie,fe);return Pe?{first:et,last:Pe}:null}function _t(x,l,h,g){return x===o.WritingMode.horizontal&&Math.abs(h.y-l.y)>Math.abs(h.x-l.x)*g?{useVertical:!0}:(x===o.WritingMode.vertical?l.y<h.y:l.x>h.x)?{needsFlipping:!0}:null}function qt(x,l,h,g,b,P,z,$,V,W,ee,ie,fe,Se,_e,we){const $e=l/24,Ue=x.lineOffsetX*$e,et=x.lineOffsetY*$e;let Pe;if(x.numGlyphs>1){const at=x.glyphStartIndex+x.numGlyphs,rt=x.lineStartIndex,gt=x.lineStartIndex+x.lineLength,yt=Or($e,$,Ue,et,h,ee,ie,x,V,P,fe,_e,we);if(!yt)return{notEnoughRoom:!0};const zt=Vt(yt.first.point,z,we).point,vt=Vt(yt.last.point,z,we).point;if(g&&!h){const nr=_t(x.writingMode,zt,vt,Se);if(nr)return nr}Pe=[yt.first];for(let nr=x.glyphStartIndex+1;nr<at-1;nr++)Pe.push($r($e*$.getoffsetX(nr),Ue,et,h,ee,ie,x.segment,rt,gt,V,P,fe,_e,we));Pe.push(yt.last)}else{if(g&&!h){const rt=Vt(ie,b,we).point,gt=x.lineStartIndex+x.segment+1,yt=new o.pointGeometry(V.getx(gt),V.gety(gt)),zt=Vt(yt,b,we),vt=zt.signedDistanceFromCamera>0?zt.point:or(ie,yt,rt,1,b,we),nr=_t(x.writingMode,rt,vt,Se);if(nr)return nr}const at=$r($e*$.getoffsetX(x.glyphStartIndex),Ue,et,h,ee,ie,x.segment,x.lineStartIndex,x.lineStartIndex+x.lineLength,V,P,fe,_e,we);if(!at)return{notEnoughRoom:!0};Pe=[at]}for(const at of Pe)o.addDynamicAttributes(W,at.point,at.angle);return{}}function or(x,l,h,g,b,P){const z=Vt(x.add(x.sub(l)._unit()),b,P).point,$=h.sub(z);return h.add($._mult(g/$.mag()))}function $r(x,l,h,g,b,P,z,$,V,W,ee,ie,fe,Se){const _e=g?x-l:x+l;let we=_e>0?1:-1,$e=0;g&&(we*=-1,$e=Math.PI),we<0&&($e+=Math.PI);let Ue=we>0?$+z:$+z+1,et=b,Pe=b,at=0,rt=0;const gt=Math.abs(_e),yt=[];for(;at+rt<=gt;){if(Ue+=we,Ue<$||Ue>=V)return null;if(Pe=et,yt.push(et),et=ie[Ue],et===void 0){const sr=new o.pointGeometry(W.getx(Ue),W.gety(Ue)),Dr=Vt(sr,ee,Se);if(Dr.signedDistanceFromCamera>0)et=ie[Ue]=Dr.point;else{const Vr=Ue-we;et=or(at===0?P:new o.pointGeometry(W.getx(Vr),W.gety(Vr)),sr,Pe,gt-at+1,ee,Se)}}at+=rt,rt=Pe.dist(et)}const zt=(gt-at)/rt,vt=et.sub(Pe),nr=vt.mult(zt)._add(Pe);nr._add(vt._unit()._perp()._mult(h*we));const Gt=$e+Math.atan2(et.y-Pe.y,et.x-Pe.x);return yt.push(nr),{point:nr,angle:fe?Gt:0,path:yt}}const kr=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Lt(x,l){for(let h=0;h<x;h++){const g=l.length;l.resize(g+4),l.float32.set(kr,3*g)}}function Tr(x,l,h){const g=l[0],b=l[1];return x[0]=h[0]*g+h[4]*b+h[12],x[1]=h[1]*g+h[5]*b+h[13],x[3]=h[3]*g+h[7]*b+h[15],x}const Cr=100;class fr{constructor(l,h=new qe(l.width+200,l.height+200,25),g=new qe(l.width+200,l.height+200,25)){this.transform=l,this.grid=h,this.ignoredGrid=g,this.pitchfactor=Math.cos(l._pitch)*l.cameraToCenterDistance,this.screenRightBoundary=l.width+Cr,this.screenBottomBoundary=l.height+Cr,this.gridRightBoundary=l.width+200,this.gridBottomBoundary=l.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(l,h,g,b,P,z){const $=this.projectAndGetPerspectiveRatio(b,l.anchorPointX,l.anchorPointY,z),V=g*$.perspectiveRatio,W=l.x1*V+$.point.x,ee=l.y1*V+$.point.y,ie=l.x2*V+$.point.x,fe=l.y2*V+$.point.y;return!this.isInsideGrid(W,ee,ie,fe)||h!=="always"&&this.grid.hitTest(W,ee,ie,fe,h,P)||$.perspectiveRatio<this.perspectiveRatioCutoff?{box:[],offscreen:!1}:{box:[W,ee,ie,fe],offscreen:this.isOffscreen(W,ee,ie,fe)}}placeCollisionCircles(l,h,g,b,P,z,$,V,W,ee,ie,fe,Se,_e){const we=[],$e=new o.pointGeometry(h.anchorX,h.anchorY),Ue=Vt($e,z,_e),et=Ut(this.transform.cameraToCenterDistance,Ue.signedDistanceFromCamera),Pe=(ee?P/et:P*et)/o.ONE_EM,at=Vt($e,$,_e).point,rt=Or(Pe,b,h.lineOffsetX*Pe,h.lineOffsetY*Pe,!1,at,$e,h,g,$,{},!1,_e);let gt=!1,yt=!1,zt=!0;if(rt){const vt=.5*fe*et+Se,nr=new o.pointGeometry(-100,-100),Gt=new o.pointGeometry(this.screenRightBoundary,this.screenBottomBoundary),sr=new Qt,Dr=rt.first,Vr=rt.last;let _r=[];for(let Qr=Dr.path.length-1;Qr>=1;Qr--)_r.push(Dr.path[Qr]);for(let Qr=1;Qr<Vr.path.length;Qr++)_r.push(Vr.path[Qr]);const hn=2.5*vt;if(V){const Qr=_r.map(en=>Vt(en,V,_e));_r=Qr.some(en=>en.signedDistanceFromCamera<=0)?[]:Qr.map(en=>en.point)}let pn=[];if(_r.length>0){const Qr=_r[0].clone(),en=_r[0].clone();for(let gn=1;gn<_r.length;gn++)Qr.x=Math.min(Qr.x,_r[gn].x),Qr.y=Math.min(Qr.y,_r[gn].y),en.x=Math.max(en.x,_r[gn].x),en.y=Math.max(en.y,_r[gn].y);pn=Qr.x>=nr.x&&en.x<=Gt.x&&Qr.y>=nr.y&&en.y<=Gt.y?[_r]:en.x<nr.x||Qr.x>Gt.x||en.y<nr.y||Qr.y>Gt.y?[]:o.clipLine([_r],nr.x,nr.y,Gt.x,Gt.y)}for(const Qr of pn){sr.reset(Qr,.25*vt);let en=0;en=sr.length<=.5*vt?1:Math.ceil(sr.paddedLength/hn)+1;for(let gn=0;gn<en;gn++){const Ei=gn/Math.max(en-1,1),Ta=sr.lerp(Ei),na=Ta.x+Cr,Pa=Ta.y+Cr;we.push(na,Pa,vt,0);const Os=na-vt,Uo=Pa-vt,co=na+vt,ns=Pa+vt;if(zt=zt&&this.isOffscreen(Os,Uo,co,ns),yt=yt||this.isInsideGrid(Os,Uo,co,ns),l!=="always"&&this.grid.hitTestCircle(na,Pa,vt,l,ie)&&(gt=!0,!W))return{circles:[],offscreen:!1,collisionDetected:gt}}}}return{circles:!W&&gt||!yt||et<this.perspectiveRatioCutoff?[]:we,offscreen:zt,collisionDetected:gt}}queryRenderedSymbols(l){if(l.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};const h=[];let g=1/0,b=1/0,P=-1/0,z=-1/0;for(const ee of l){const ie=new o.pointGeometry(ee.x+Cr,ee.y+Cr);g=Math.min(g,ie.x),b=Math.min(b,ie.y),P=Math.max(P,ie.x),z=Math.max(z,ie.y),h.push(ie)}const $=this.grid.query(g,b,P,z).concat(this.ignoredGrid.query(g,b,P,z)),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(h,fe)&&(V[ie.bucketInstanceId][ie.featureIndex]=!0,W[ie.bucketInstanceId]===void 0&&(W[ie.bucketInstanceId]=[]),W[ie.bucketInstanceId].push(ie.featureIndex))}return W}insertCollisionBox(l,h,g,b,P,z){(g?this.ignoredGrid:this.grid).insert({bucketInstanceId:b,featureIndex:P,collisionGroupID:z,overlapMode:h},l[0],l[1],l[2],l[3])}insertCollisionCircles(l,h,g,b,P,z){const $=g?this.ignoredGrid:this.grid,V={bucketInstanceId:b,featureIndex:P,collisionGroupID:z,overlapMode:h};for(let W=0;W<l.length;W+=4)$.insertCircle(V,l[W],l[W+1],l[W+2])}projectAndGetPerspectiveRatio(l,h,g,b){let P;return b?(P=[h,g,b(h,g),1],o.transformMat4(P,P,l)):(P=[h,g,0,1],Tr(P,P,l)),{point:new o.pointGeometry((P[0]/P[3]+1)/2*this.transform.width+Cr,(-P[1]/P[3]+1)/2*this.transform.height+Cr),perspectiveRatio:.5+this.transform.cameraToCenterDistance/P[3]*.5}}isOffscreen(l,h,g,b){return g<Cr||l>=this.screenRightBoundary||b<Cr||h>this.screenBottomBoundary}isInsideGrid(l,h,g,b){return g>=0&&l<this.gridRightBoundary&&b>=0&&h<this.gridBottomBoundary}getViewportMatrix(){const l=o.identity([]);return o.translate(l,l,[-100,-100,0]),l}}function Nt(x,l,h){return l*(o.EXTENT/(x.tileSize*Math.pow(2,h-x.tileID.overscaledZ)))}class ot{constructor(l,h,g,b){this.opacity=l?Math.max(0,Math.min(1,l.opacity+(l.placed?h:-h))):b&&g?1:0,this.placed=g}isHidden(){return this.opacity===0&&!this.placed}}class ht{constructor(l,h,g,b,P){this.text=new ot(l?l.text:null,h,g,P),this.icon=new ot(l?l.icon:null,h,b,P)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Ot{constructor(l,h,g){this.text=l,this.icon=h,this.skipFade=g}}class $t{constructor(){this.invProjMatrix=o.create(),this.viewportMatrix=o.create(),this.circles=[]}}class ur{constructor(l,h,g,b,P){this.bucketInstanceId=l,this.featureIndex=h,this.sourceLayerIndex=g,this.bucketIndex=b,this.tileID=P}}class Ir{constructor(l){this.crossSourceCollisions=l,this.maxGroupID=0,this.collisionGroups={}}get(l){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[l]){const h=++this.maxGroupID;this.collisionGroups[l]={ID:h,predicate:g=>g.collisionGroupID===h}}return this.collisionGroups[l]}}function qr(x,l,h,g,b){const{horizontalAlign:P,verticalAlign:z}=o.getAnchorAlignment(x),$=-(P-.5)*l,V=-(z-.5)*h,W=o.evaluateVariableOffset(x,g);return new o.pointGeometry($+W[0]*b,V+W[1]*b)}function Gr(x,l,h,g,b,P){const{x1:z,x2:$,y1:V,y2:W,anchorPointX:ee,anchorPointY:ie}=x,fe=new o.pointGeometry(l,h);return g&&fe._rotate(b?P:-P),{x1:z+fe.x,y1:V+fe.y,x2:$+fe.x,y2:W+fe.y,anchorPointX:ee,anchorPointY:ie}}class me{constructor(l,h,g,b,P){this.transform=l.clone(),this.terrain=h,this.collisionIndex=new fr(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=g,this.retainedQueryData={},this.collisionGroups=new Ir(b),this.collisionCircleArrays={},this.prevPlacement=P,P&&(P.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(l,h,g,b){const P=g.getBucket(h),z=g.latestFeatureIndex;if(!P||!z||h.id!==P.layerIds[0])return;const $=g.collisionBoxArray,V=P.layers[0].layout,W=Math.pow(2,this.transform.zoom-g.tileID.overscaledZ),ee=g.tileSize/o.EXTENT,ie=this.transform.calculatePosMatrix(g.tileID.toUnwrapped()),fe=V.get("text-pitch-alignment")==="map",Se=V.get("text-rotation-alignment")==="map",_e=Nt(g,1,this.transform.zoom),we=Xt(ie,fe,Se,this.transform,_e);let $e=null;if(fe){const et=cr(ie,fe,Se,this.transform,_e);$e=o.multiply([],this.transform.labelPlaneMatrix,et)}this.retainedQueryData[P.bucketInstanceId]=new ur(P.bucketInstanceId,z,P.sourceLayerIndex,P.index,g.tileID);const Ue={bucket:P,layout:V,posMatrix:ie,textLabelPlaneMatrix:we,labelToScreenMatrix:$e,scale:W,textPixelRatio:ee,holdingForFade:g.holdingForFade(),collisionBoxArray:$,partiallyEvaluatedTextSize:o.evaluateSizeForZoom(P.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(P.sourceID)};if(b)for(const et of P.sortKeyRanges){const{sortKey:Pe,symbolInstanceStart:at,symbolInstanceEnd:rt}=et;l.push({sortKey:Pe,symbolInstanceStart:at,symbolInstanceEnd:rt,parameters:Ue})}else l.push({symbolInstanceStart:0,symbolInstanceEnd:P.symbolInstances.length,parameters:Ue})}attemptAnchorPlacement(l,h,g,b,P,z,$,V,W,ee,ie,fe,Se,_e,we,$e){const Ue=[fe.textOffset0,fe.textOffset1],et=qr(l,g,b,Ue,P),Pe=this.collisionIndex.placeCollisionBox(Gr(h,et.x,et.y,z,$,this.transform.angle),ie,V,W,ee.predicate,$e);if((!we||this.collisionIndex.placeCollisionBox(Gr(we,et.x,et.y,z,$,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:Ue,width:g,height:b,anchor:l,textBoxScale:P,prevAnchor:at},this.markUsedJustification(Se,l,fe,_e),Se.allowVerticalPlacement&&(this.markUsedOrientation(Se,_e,fe),this.placedOrientations[fe.crossTileID]=_e),{shift:et,placedGlyphBoxes:Pe}}}placeLayerBucketPart(l,h,g){const{bucket:b,layout:P,posMatrix:z,textLabelPlaneMatrix:$,labelToScreenMatrix:V,textPixelRatio:W,holdingForFade:ee,collisionBoxArray:ie,partiallyEvaluatedTextSize:fe,collisionGroup:Se}=l.parameters,_e=P.get("text-optional"),we=P.get("icon-optional"),$e=o.getOverlapMode(P,"text-overlap","text-allow-overlap"),Ue=$e==="always",et=o.getOverlapMode(P,"icon-overlap","icon-allow-overlap"),Pe=et==="always",at=P.get("text-rotation-alignment")==="map",rt=P.get("text-pitch-alignment")==="map",gt=P.get("icon-text-fit")!=="none",yt=P.get("symbol-z-order")==="viewport-y",zt=Ue&&(Pe||!b.hasIconData()||we),vt=Pe&&(Ue||!b.hasTextData()||_e);!b.collisionArrays&&ie&&b.deserializeCollisionBoxes(ie);const nr=(Gt,sr)=>{if(h[Gt.crossTileID])return;if(ee)return void(this.placements[Gt.crossTileID]=new Ot(!1,!1,!1));let Dr=!1,Vr=!1,_r=!0,hn=null,pn={box:null,offscreen:null},Qr={box:null,offscreen:null},en=null,gn=null,Ei=null,Ta=0,na=0,Pa=0;sr.textFeatureIndex?Ta=sr.textFeatureIndex:Gt.useRuntimeCollisionCircles&&(Ta=Gt.featureIndex),sr.verticalTextFeatureIndex&&(na=sr.verticalTextFeatureIndex);const Os=this.retainedQueryData[b.bucketInstanceId].tileID,Uo=this.terrain?(yi,Hr)=>this.terrain.getElevation(Os,yi,Hr):null;for(const yi of["textBox","verticalTextBox","iconBox","verticalIconBox"]){const Hr=sr[yi];Hr&&(Hr.elevation=Uo?Uo(Hr.anchorPointX,Hr.anchorPointY):0)}const co=sr.textBox;if(co){const yi=fn=>{let ki=o.WritingMode.horizontal;if(b.allowVerticalPlacement&&!fn&&this.prevPlacement){const Ti=this.prevPlacement.placedOrientations[Gt.crossTileID];Ti&&(this.placedOrientations[Gt.crossTileID]=Ti,ki=Ti,this.markUsedOrientation(b,ki,Gt))}return ki},Hr=(fn,ki)=>{if(b.allowVerticalPlacement&&Gt.numVerticalGlyphVertices>0&&sr.verticalTextBox){for(const Ti of b.writingModes)if(Ti===o.WritingMode.vertical?(pn=ki(),Qr=pn):pn=fn(),pn&&pn.box&&pn.box.length)break}else pn=fn()};if(P.get("text-variable-anchor")){let fn=P.get("text-variable-anchor");if(this.prevPlacement&&this.prevPlacement.variableOffsets[Gt.crossTileID]){const Ln=this.prevPlacement.variableOffsets[Gt.crossTileID];fn.indexOf(Ln.anchor)>0&&(fn=fn.filter(Ko=>Ko!==Ln.anchor),fn.unshift(Ln.anchor))}const ki=(Ln,Ko,sl)=>{const up=Ln.x2-Ln.x1,ou=Ln.y2-Ln.y1,kg=Gt.textBoxScale,cp=gt&&et==="never"?Ko:null;let As={box:[],offscreen:!1};const ll=$e!=="never"?2*fn.length:fn.length;for(let ul=0;ul<ll;++ul){const Kd=this.attemptAnchorPlacement(fn[ul%fn.length],Ln,up,ou,kg,at,rt,W,z,Se,ul>=fn.length?$e:"never",Gt,b,sl,cp,Uo);if(Kd&&(As=Kd.placedGlyphBoxes,As&&As.box&&As.box.length)){Dr=!0,hn=Kd.shift;break}}return As};Hr(()=>ki(co,sr.iconBox,o.WritingMode.horizontal),()=>{const Ln=sr.verticalTextBox;return b.allowVerticalPlacement&&!(pn&&pn.box&&pn.box.length)&&Gt.numVerticalGlyphVertices>0&&Ln?ki(Ln,sr.verticalIconBox,o.WritingMode.vertical):{box:null,offscreen:null}}),pn&&(Dr=pn.box,_r=pn.offscreen);const Ti=yi(pn&&pn.box);if(!Dr&&this.prevPlacement){const Ln=this.prevPlacement.variableOffsets[Gt.crossTileID];Ln&&(this.variableOffsets[Gt.crossTileID]=Ln,this.markUsedJustification(b,Ln.anchor,Gt,Ti))}}else{const fn=(ki,Ti)=>{const Ln=this.collisionIndex.placeCollisionBox(ki,$e,W,z,Se.predicate,Uo);return Ln&&Ln.box&&Ln.box.length&&(this.markUsedOrientation(b,Ti,Gt),this.placedOrientations[Gt.crossTileID]=Ti),Ln};Hr(()=>fn(co,o.WritingMode.horizontal),()=>{const ki=sr.verticalTextBox;return b.allowVerticalPlacement&&Gt.numVerticalGlyphVertices>0&&ki?fn(ki,o.WritingMode.vertical):{box:null,offscreen:null}}),yi(pn&&pn.box&&pn.box.length)}}if(en=pn,Dr=en&&en.box&&en.box.length>0,_r=en&&en.offscreen,Gt.useRuntimeCollisionCircles){const yi=b.text.placedSymbolArray.get(Gt.centerJustifiedTextSymbolIndex),Hr=o.evaluateSizeForFeature(b.textSizeData,fe,yi),fn=P.get("text-padding");gn=this.collisionIndex.placeCollisionCircles($e,yi,b.lineVertexArray,b.glyphOffsetArray,Hr,z,$,V,g,rt,Se.predicate,Gt.collisionCircleDiameter,fn,Uo),gn.circles.length&&gn.collisionDetected&&!g&&o.warnOnce("Collisions detected, but collision boxes are not shown"),Dr=Ue||gn.circles.length>0&&!gn.collisionDetected,_r=_r&&gn.offscreen}if(sr.iconFeatureIndex&&(Pa=sr.iconFeatureIndex),sr.iconBox){const yi=Hr=>{const fn=gt&&hn?Gr(Hr,hn.x,hn.y,at,rt,this.transform.angle):Hr;return this.collisionIndex.placeCollisionBox(fn,et,W,z,Se.predicate,Uo)};Qr&&Qr.box&&Qr.box.length&&sr.verticalIconBox?(Ei=yi(sr.verticalIconBox),Vr=Ei.box.length>0):(Ei=yi(sr.iconBox),Vr=Ei.box.length>0),_r=_r&&Ei.offscreen}const ns=_e||Gt.numHorizontalGlyphVertices===0&&Gt.numVerticalGlyphVertices===0,Ud=we||Gt.numIconVertices===0;if(ns||Ud?Ud?ns||(Vr=Vr&&Dr):Dr=Vr&&Dr:Vr=Dr=Vr&&Dr,Dr&&en&&en.box&&this.collisionIndex.insertCollisionBox(en.box,$e,P.get("text-ignore-placement"),b.bucketInstanceId,Qr&&Qr.box&&na?na:Ta,Se.ID),Vr&&Ei&&this.collisionIndex.insertCollisionBox(Ei.box,et,P.get("icon-ignore-placement"),b.bucketInstanceId,Pa,Se.ID),gn&&(Dr&&this.collisionIndex.insertCollisionCircles(gn.circles,$e,P.get("text-ignore-placement"),b.bucketInstanceId,Ta,Se.ID),g)){const yi=b.bucketInstanceId;let Hr=this.collisionCircleArrays[yi];Hr===void 0&&(Hr=this.collisionCircleArrays[yi]=new $t);for(let fn=0;fn<gn.circles.length;fn+=4)Hr.circles.push(gn.circles[fn+0]),Hr.circles.push(gn.circles[fn+1]),Hr.circles.push(gn.circles[fn+2]),Hr.circles.push(gn.collisionDetected?1:0)}if(Gt.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(b.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[Gt.crossTileID]=new Ot(Dr||zt,Vr||vt,_r||b.justReloaded),h[Gt.crossTileID]=!0};if(yt){if(l.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");const Gt=b.getSortedSymbolIndexes(this.transform.angle);for(let sr=Gt.length-1;sr>=0;--sr){const Dr=Gt[sr];nr(b.symbolInstances.get(Dr),b.collisionArrays[Dr])}}else for(let Gt=l.symbolInstanceStart;Gt<l.symbolInstanceEnd;Gt++)nr(b.symbolInstances.get(Gt),b.collisionArrays[Gt]);if(g&&b.bucketInstanceId in this.collisionCircleArrays){const Gt=this.collisionCircleArrays[b.bucketInstanceId];o.invert(Gt.invProjMatrix,z),Gt.viewportMatrix=this.collisionIndex.getViewportMatrix()}b.justReloaded=!1}markUsedJustification(l,h,g,b){let P;P=b===o.WritingMode.vertical?g.verticalPlacedTextSymbolIndex:{left:g.leftJustifiedTextSymbolIndex,center:g.centerJustifiedTextSymbolIndex,right:g.rightJustifiedTextSymbolIndex}[o.getAnchorJustification(h)];const z=[g.leftJustifiedTextSymbolIndex,g.centerJustifiedTextSymbolIndex,g.rightJustifiedTextSymbolIndex,g.verticalPlacedTextSymbolIndex];for(const $ of z)$>=0&&(l.text.placedSymbolArray.get($).crossTileID=P>=0&&$!==P?0:g.crossTileID)}markUsedOrientation(l,h,g){const b=h===o.WritingMode.horizontal||h===o.WritingMode.horizontalOnly?h:0,P=h===o.WritingMode.vertical?h:0,z=[g.leftJustifiedTextSymbolIndex,g.centerJustifiedTextSymbolIndex,g.rightJustifiedTextSymbolIndex];for(const $ of z)l.text.placedSymbolArray.get($).placedOrientation=b;g.verticalPlacedTextSymbolIndex&&(l.text.placedSymbolArray.get(g.verticalPlacedTextSymbolIndex).placedOrientation=P)}commit(l){this.commitTime=l,this.zoomAtLastRecencyCheck=this.transform.zoom;const h=this.prevPlacement;let g=!1;this.prevZoomAdjustment=h?h.zoomAdjustment(this.transform.zoom):0;const b=h?h.symbolFadeChange(l):1,P=h?h.opacities:{},z=h?h.variableOffsets:{},$=h?h.placedOrientations:{};for(const V in this.placements){const W=this.placements[V],ee=P[V];ee?(this.opacities[V]=new ht(ee,b,W.text,W.icon),g=g||W.text!==ee.text.placed||W.icon!==ee.icon.placed):(this.opacities[V]=new ht(null,b,W.text,W.icon,W.skipFade),g=g||W.text||W.icon)}for(const V in P){const W=P[V];if(!this.opacities[V]){const ee=new ht(W,b,!1,!1);ee.isHidden()||(this.opacities[V]=ee,g=g||W.text.placed||W.icon.placed)}}for(const V in z)this.variableOffsets[V]||!this.opacities[V]||this.opacities[V].isHidden()||(this.variableOffsets[V]=z[V]);for(const V in $)this.placedOrientations[V]||!this.opacities[V]||this.opacities[V].isHidden()||(this.placedOrientations[V]=$[V]);if(h&&h.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");g?this.lastPlacementChangeTime=l:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=h?h.lastPlacementChangeTime:l)}updateLayerOpacities(l,h){const g={};for(const b of h){const P=b.getBucket(l);P&&b.latestFeatureIndex&&l.id===P.layerIds[0]&&this.updateBucketOpacities(P,g,b.collisionBoxArray)}}updateBucketOpacities(l,h,g){l.hasTextData()&&l.text.opacityVertexArray.clear(),l.hasIconData()&&l.icon.opacityVertexArray.clear(),l.hasIconCollisionBoxData()&&l.iconCollisionBox.collisionVertexArray.clear(),l.hasTextCollisionBoxData()&&l.textCollisionBox.collisionVertexArray.clear();const b=l.layers[0].layout,P=new ht(null,0,!1,!1,!0),z=b.get("text-allow-overlap"),$=b.get("icon-allow-overlap"),V=b.get("text-variable-anchor"),W=b.get("text-rotation-alignment")==="map",ee=b.get("text-pitch-alignment")==="map",ie=b.get("icon-text-fit")!=="none",fe=new ht(null,0,z&&($||!l.hasIconData()||b.get("icon-optional")),$&&(z||!l.hasTextData()||b.get("text-optional")),!0);!l.collisionArrays&&g&&(l.hasIconCollisionBoxData()||l.hasTextCollisionBoxData())&&l.deserializeCollisionBoxes(g);const Se=(_e,we,$e)=>{for(let Ue=0;Ue<we/4;Ue++)_e.opacityVertexArray.emplaceBack($e)};for(let _e=0;_e<l.symbolInstances.length;_e++){const we=l.symbolInstances.get(_e),{numHorizontalGlyphVertices:$e,numVerticalGlyphVertices:Ue,crossTileID:et}=we;let Pe=this.opacities[et];h[et]?Pe=P:Pe||(Pe=fe,this.opacities[et]=Pe),h[et]=!0;const at=we.numIconVertices>0,rt=this.placedOrientations[we.crossTileID],gt=rt===o.WritingMode.vertical,yt=rt===o.WritingMode.horizontal||rt===o.WritingMode.horizontalOnly;if($e>0||Ue>0){const zt=Ae(Pe.text);Se(l.text,$e,gt?He:zt),Se(l.text,Ue,yt?He:zt);const vt=Pe.text.isHidden();[we.rightJustifiedTextSymbolIndex,we.centerJustifiedTextSymbolIndex,we.leftJustifiedTextSymbolIndex].forEach(sr=>{sr>=0&&(l.text.placedSymbolArray.get(sr).hidden=vt||gt?1:0)}),we.verticalPlacedTextSymbolIndex>=0&&(l.text.placedSymbolArray.get(we.verticalPlacedTextSymbolIndex).hidden=vt||yt?1:0);const nr=this.variableOffsets[we.crossTileID];nr&&this.markUsedJustification(l,nr.anchor,we,rt);const Gt=this.placedOrientations[we.crossTileID];Gt&&(this.markUsedJustification(l,"left",we,Gt),this.markUsedOrientation(l,Gt,we))}if(at){const zt=Ae(Pe.icon),vt=!(ie&&we.verticalPlacedIconSymbolIndex&&gt);we.placedIconSymbolIndex>=0&&(Se(l.icon,we.numIconVertices,vt?zt:He),l.icon.placedSymbolArray.get(we.placedIconSymbolIndex).hidden=Pe.icon.isHidden()),we.verticalPlacedIconSymbolIndex>=0&&(Se(l.icon,we.numVerticalIconVertices,vt?He:zt),l.icon.placedSymbolArray.get(we.verticalPlacedIconSymbolIndex).hidden=Pe.icon.isHidden())}if(l.hasIconCollisionBoxData()||l.hasTextCollisionBoxData()){const zt=l.collisionArrays[_e];if(zt){let vt=new o.pointGeometry(0,0);if(zt.textBox||zt.verticalTextBox){let Gt=!0;if(V){const sr=this.variableOffsets[et];sr?(vt=qr(sr.anchor,sr.width,sr.height,sr.textOffset,sr.textBoxScale),W&&vt._rotate(ee?this.transform.angle:-this.transform.angle)):Gt=!1}zt.textBox&&K(l.textCollisionBox.collisionVertexArray,Pe.text.placed,!Gt||gt,vt.x,vt.y),zt.verticalTextBox&&K(l.textCollisionBox.collisionVertexArray,Pe.text.placed,!Gt||yt,vt.x,vt.y)}const nr=Boolean(!yt&&zt.verticalIconBox);zt.iconBox&&K(l.iconCollisionBox.collisionVertexArray,Pe.icon.placed,nr,ie?vt.x:0,ie?vt.y:0),zt.verticalIconBox&&K(l.iconCollisionBox.collisionVertexArray,Pe.icon.placed,!nr,ie?vt.x:0,ie?vt.y:0)}}}if(l.sortFeatures(this.transform.angle),this.retainedQueryData[l.bucketInstanceId]&&(this.retainedQueryData[l.bucketInstanceId].featureSortOrder=l.featureSortOrder),l.hasTextData()&&l.text.opacityVertexBuffer&&l.text.opacityVertexBuffer.updateData(l.text.opacityVertexArray),l.hasIconData()&&l.icon.opacityVertexBuffer&&l.icon.opacityVertexBuffer.updateData(l.icon.opacityVertexArray),l.hasIconCollisionBoxData()&&l.iconCollisionBox.collisionVertexBuffer&&l.iconCollisionBox.collisionVertexBuffer.updateData(l.iconCollisionBox.collisionVertexArray),l.hasTextCollisionBoxData()&&l.textCollisionBox.collisionVertexBuffer&&l.textCollisionBox.collisionVertexBuffer.updateData(l.textCollisionBox.collisionVertexArray),l.text.opacityVertexArray.length!==l.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${l.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${l.text.layoutVertexArray.length}) / 4`);if(l.icon.opacityVertexArray.length!==l.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${l.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${l.icon.layoutVertexArray.length}) / 4`);if(l.bucketInstanceId in this.collisionCircleArrays){const _e=this.collisionCircleArrays[l.bucketInstanceId];l.placementInvProjMatrix=_e.invProjMatrix,l.placementViewportMatrix=_e.viewportMatrix,l.collisionCircleArray=_e.circles,delete this.collisionCircleArrays[l.bucketInstanceId]}}symbolFadeChange(l){return this.fadeDuration===0?1:(l-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(l){return Math.max(0,(this.transform.zoom-l)/1.5)}hasTransitions(l){return this.stale||l-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(l,h){const g=this.zoomAtLastRecencyCheck===h?1-this.zoomAdjustment(h):1;return this.zoomAtLastRecencyCheck=h,this.commitTime+this.fadeDuration*g>l}setStale(){this.stale=!0}}function K(x,l,h,g,b){x.emplaceBack(l?1:0,h?1:0,g||0,b||0),x.emplaceBack(l?1:0,h?1:0,g||0,b||0),x.emplaceBack(l?1:0,h?1:0,g||0,b||0),x.emplaceBack(l?1:0,h?1:0,g||0,b||0)}const q=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 Ae(x){if(x.opacity===0&&!x.placed)return 0;if(x.opacity===1&&x.placed)return 4294967295;const l=x.placed?1:0,h=Math.floor(127*x.opacity);return h*q+l*ce+h*ae+l*xe+h*Ee+l*be+h*Ce+l}const He=0;class We{constructor(l){this._sortAcrossTiles=l.layout.get("symbol-z-order")!=="viewport-y"&&!l.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(l,h,g,b,P){const z=this._bucketParts;for(;this._currentTileIndex<l.length;)if(h.getBucketParts(z,b,l[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,P())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,z.sort(($,V)=>$.sortKey-V.sortKey));this._currentPartIndex<z.length;)if(h.placeLayerBucketPart(z[this._currentPartIndex],this._seenCrossTileIDs,g),this._currentPartIndex++,P())return!0;return!1}}class Be{constructor(l,h,g,b,P,z,$,V){this.placement=new me(l,h,z,$,V),this._currentPlacementIndex=g.length-1,this._forceFullPlacement=b,this._showCollisionBoxes=P,this._done=!1}isDone(){return this._done}continuePlacement(l,h,g){const b=o.exported.now(),P=()=>{const z=o.exported.now()-b;return!this._forceFullPlacement&&z>2};for(;this._currentPlacementIndex>=0;){const z=h[l[this._currentPlacementIndex]],$=this.placement.collisionIndex.transform.zoom;if(z.type==="symbol"&&(!z.minzoom||z.minzoom<=$)&&(!z.maxzoom||z.maxzoom>$)){if(this._inProgressLayer||(this._inProgressLayer=new We(z)),this._inProgressLayer.continuePlacement(g[z.source],this.placement,this._showCollisionBoxes,z,P))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(l){return this.placement.commit(l),this.placement}}const At=512/o.EXTENT/2;class bt{constructor(l,h,g){this.tileID=l,this.indexedSymbolInstances={},this.bucketInstanceId=g;for(let b=0;b<h.length;b++){const P=h.get(b),z=P.key;this.indexedSymbolInstances[z]||(this.indexedSymbolInstances[z]=[]),this.indexedSymbolInstances[z].push({crossTileID:P.crossTileID,coord:this.getScaledCoordinates(P,l)})}}getScaledCoordinates(l,h){const g=At/Math.pow(2,h.canonical.z-this.tileID.canonical.z);return{x:Math.floor((h.canonical.x*o.EXTENT+l.anchorX)*g),y:Math.floor((h.canonical.y*o.EXTENT+l.anchorY)*g)}}findMatches(l,h,g){const b=this.tileID.canonical.z<h.canonical.z?1:Math.pow(2,this.tileID.canonical.z-h.canonical.z);for(let P=0;P<l.length;P++){const z=l.get(P);if(z.crossTileID)continue;const $=this.indexedSymbolInstances[z.key];if(!$)continue;const V=this.getScaledCoordinates(z,h);for(const W of $)if(Math.abs(W.coord.x-V.x)<=b&&Math.abs(W.coord.y-V.y)<=b&&!g[W.crossTileID]){g[W.crossTileID]=!0,z.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(l){const h=Math.round((l-this.lng)/360);if(h!==0)for(const g in this.indexes){const b=this.indexes[g],P={};for(const z in b){const $=b[z];$.tileID=$.tileID.unwrapTo($.tileID.wrap+h),P[$.tileID.key]=$}this.indexes[g]=P}this.lng=l}addBucket(l,h,g){if(this.indexes[l.overscaledZ]&&this.indexes[l.overscaledZ][l.key]){if(this.indexes[l.overscaledZ][l.key].bucketInstanceId===h.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(l.overscaledZ,this.indexes[l.overscaledZ][l.key])}for(let P=0;P<h.symbolInstances.length;P++)h.symbolInstances.get(P).crossTileID=0;this.usedCrossTileIDs[l.overscaledZ]||(this.usedCrossTileIDs[l.overscaledZ]={});const b=this.usedCrossTileIDs[l.overscaledZ];for(const P in this.indexes){const z=this.indexes[P];if(Number(P)>l.overscaledZ)for(const $ in z){const V=z[$];V.tileID.isChildOf(l)&&V.findMatches(h.symbolInstances,l,b)}else{const $=z[l.scaledTo(Number(P)).key];$&&$.findMatches(h.symbolInstances,l,b)}}for(let P=0;P<h.symbolInstances.length;P++){const z=h.symbolInstances.get(P);z.crossTileID||(z.crossTileID=g.generate(),b[z.crossTileID]=!0)}return this.indexes[l.overscaledZ]===void 0&&(this.indexes[l.overscaledZ]={}),this.indexes[l.overscaledZ][l.key]=new bt(l,h.symbolInstances,h.bucketInstanceId),!0}removeBucketCrossTileIDs(l,h){for(const g in h.indexedSymbolInstances)for(const b of h.indexedSymbolInstances[g])delete this.usedCrossTileIDs[l][b.crossTileID]}removeStaleBuckets(l){let h=!1;for(const g in this.indexes){const b=this.indexes[g];for(const P in b)l[b[P].bucketInstanceId]||(this.removeBucketCrossTileIDs(g,b[P]),delete b[P],h=!0)}return h}}class Bt{constructor(){this.layerIndexes={},this.crossTileIDs=new Je,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(l,h,g){let b=this.layerIndexes[l.id];b===void 0&&(b=this.layerIndexes[l.id]=new Rt);let P=!1;const z={};b.handleWrapJump(g);for(const $ of h){const V=$.getBucket(l);V&&l.id===V.layerIds[0]&&(V.bucketInstanceId||(V.bucketInstanceId=++this.maxBucketInstanceId),b.addBucket($.tileID,V,this.crossTileIDs)&&(P=!0),z[V.bucketInstanceId]=!0)}return b.removeStaleBuckets(z)&&(P=!0),P}pruneUnusedLayers(l){const h={};l.forEach(g=>{h[g]=!0});for(const g in this.layerIndexes)h[g]||delete this.layerIndexes[g]}}var vr=o.createLayout([{name:"a_pos",type:"Int16",components:2}]);class ir extends o.Evented{constructor(l){super(),this.sourceCache=l,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.renderHistory=[],this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,this.renderHistorySize=l._cache.max,l.usedForTerrain=!0,l.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null;for(const l in this._tiles){const h=this._tiles[l];h.textures.forEach(g=>g.destroy()),h.textures=[]}}update(l,h){this.sourceCache.update(l,h),this._renderableTilesKeys=[];for(const g of l.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:h}))this._renderableTilesKeys.push(g.key),this._tiles[g.key]||(g.posMatrix=new Float64Array(16),o.ortho(g.posMatrix,0,o.EXTENT,0,o.EXTENT,0,1),this._tiles[g.key]=new De(g,this.tileSize))}removeOutdated(l){const h={};this.renderHistory=this.renderHistory.filter((g,b)=>this.renderHistory.indexOf(g)===b).slice(0,this.renderHistorySize);for(const g of this._renderableTilesKeys)h[g]=!0;for(const g of this.renderHistory)h[g]=!0;for(const g in this._tiles)h[g]||(this._tiles[g].clearTextures(l),delete this._tiles[g])}getRenderableTiles(){return this._renderableTilesKeys.map(l=>this.getTileByID(l))}getTileByID(l){return this._tiles[l]}getTerrainCoords(l){const h={};for(const g of this._renderableTilesKeys){const b=this._tiles[g].tileID;if(b.canonical.equals(l.canonical)){const P=l.clone();P.posMatrix=new Float64Array(16),o.ortho(P.posMatrix,0,o.EXTENT,0,o.EXTENT,0,1),h[g]=P}else if(b.canonical.isChildOf(l.canonical)){const P=l.clone();P.posMatrix=new Float64Array(16);const z=b.canonical.z-l.canonical.z,$=b.canonical.x-(b.canonical.x>>z<<z),V=b.canonical.y-(b.canonical.y>>z<<z),W=o.EXTENT>>z;o.ortho(P.posMatrix,0,W,0,W,0,1),o.translate(P.posMatrix,P.posMatrix,[-$*W,-V*W,0]),h[g]=P}else if(l.canonical.isChildOf(b.canonical)){const P=l.clone();P.posMatrix=new Float64Array(16);const z=l.canonical.z-b.canonical.z,$=l.canonical.x-(l.canonical.x>>z<<z),V=l.canonical.y-(l.canonical.y>>z<<z),W=o.EXTENT>>z;o.ortho(P.posMatrix,0,o.EXTENT,0,o.EXTENT,0,1),o.translate(P.posMatrix,P.posMatrix,[$*W,V*W,0]),o.scale(P.posMatrix,P.posMatrix,[1/2**z,1/2**z,0]),h[g]=P}}return h}getSourceTile(l,h){const g=this.sourceCache._source;let b=l.overscaledZ-this.deltaZoom;if(b>g.maxzoom&&(b=g.maxzoom),b<g.minzoom)return null;this._sourceTileCache[l.key]||(this._sourceTileCache[l.key]=l.scaledTo(b).key);let P=this.sourceCache.getTileByID(this._sourceTileCache[l.key]);if((!P||!P.dem)&&h)for(;b>=g.minzoom&&(!P||!P.dem);)P=this.sourceCache.getTileByID(l.scaledTo(b--).key);return P}tilesAfterTime(l=Date.now()){return Object.values(this._tiles).filter(h=>h.timeLoaded>=l)}}class gr{constructor(l,h,g){this.style=l,this.sourceCache=new ir(h),this.options=g,this.exaggeration=typeof g.exaggeration=="number"?g.exaggeration:1,this.elevationOffset=typeof g.elevationOffset=="number"?g.elevationOffset:450,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024,this.clearRerenderCache()}getDEMElevation(l,h,g,b=o.EXTENT){if(!(h>=0&&h<b&&g>=0&&g<b))return this.elevationOffset;let P=0;const z=this.getTerrainData(l);if(z.tile&&z.tile.dem){const $=o.transformMat4$1([],[h/b*o.EXTENT,g/b*o.EXTENT],z.u_terrain_matrix),V=[$[0]*z.tile.dem.dim,$[1]*z.tile.dem.dim],W=[Math.floor(V[0]),Math.floor(V[1])],ee=z.tile.dem.get(W[0],W[1]),ie=z.tile.dem.get(W[0],W[1]+1),fe=z.tile.dem.get(W[0]+1,W[1]),Se=z.tile.dem.get(W[0]+1,W[1]+1);P=o.number(o.number(ee,ie,V[0]-W[0]),o.number(fe,Se,V[0]-W[0]),V[1]-W[1])}return P}rememberForRerender(l,h){for(const g in this.sourceCache._tiles){const b=this.sourceCache._tiles[g];(b.tileID.equals(h)||b.tileID.isChildOf(h))&&(l===this.sourceCache.sourceCache.id&&(b.timeLoaded=Date.now()),this._rerender[l]=this._rerender[l]||{},this._rerender[l][b.tileID.key]=!0)}}needsRerender(l,h){return this._rerender[l]&&this._rerender[l][h.key]}clearRerenderCache(){this._rerender={}}getElevation(l,h,g,b=o.EXTENT){return(this.getDEMElevation(l,h,g,b)+this.elevationOffset)*this.exaggeration}getTerrainData(l){if(!this._emptyDemTexture){const b=this.style.map.painter.context,P=new o.RGBAImage({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new R(b,P,b.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new R(b,new o.RGBAImage({width:1,height:1}),b.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(b.gl.NEAREST,b.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=o.identity([])}const h=this.sourceCache.getSourceTile(l,!0);if(h&&h.dem&&(!h.demTexture||h.needsTerrainPrepare)){const b=this.style.map.painter.context;h.demTexture=this.style.map.painter.getTileTexture(h.dem.stride),h.demTexture?h.demTexture.update(h.dem.getPixels(),{premultiply:!1}):h.demTexture=new R(b,h.dem.getPixels(),b.gl.RGBA,{premultiply:!1}),h.demTexture.bind(b.gl.NEAREST,b.gl.CLAMP_TO_EDGE),h.needsTerrainPrepare=!1}const g=h&&h+h.tileID.key+l.key;if(g&&!this._demMatrixCache[g]){const b=this.sourceCache.sourceCache._source.maxzoom;let P=l.canonical.z-h.tileID.canonical.z;l.overscaledZ>l.canonical.z&&(l.canonical.z>=b?P=l.canonical.z-b:o.warnOnce("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const z=l.canonical.x-(l.canonical.x>>P<<P),$=l.canonical.y-(l.canonical.y>>P<<P),V=o.fromScaling(new Float64Array(16),[1/(o.EXTENT<<P),1/(o.EXTENT<<P),0]);o.translate(V,V,[z*o.EXTENT,$*o.EXTENT,0]),this._demMatrixCache[l.key]={matrix:V,coord:l}}return{u_depth:2,u_terrain:3,u_terrain_dim:h&&h.dem&&h.dem.dim||1,u_terrain_matrix:g?this._demMatrixCache[l.key].matrix:this._emptyDemMatrix,u_terrain_unpack:h&&h.dem&&h.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_offset:this.elevationOffset,u_terrain_exaggeration:this.exaggeration,texture:(h&&h.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:h}}getRTTFramebuffer(){const l=this.style.map.painter;if(!this._rttFramebuffer){const h=this.sourceCache.tileSize*this.qualityFactor;this._rttFramebuffer=l.context.createFramebuffer(h,h,!0),this._rttFramebuffer.depthAttachment.set(l.context.createRenderbuffer(l.context.gl.DEPTH_COMPONENT16,h,h))}return this._rttFramebuffer}getFramebuffer(l){const h=this.style.map.painter,g=h.width/devicePixelRatio,b=h.height/devicePixelRatio;return!this._fbo||this._fbo.width===g&&this._fbo.height===b||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new R(h.context,{width:g,height:b,data:null},h.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(h.context.gl.NEAREST,h.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new R(h.context,{width:g,height:b,data:null},h.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(h.context.gl.NEAREST,h.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=h.context.createFramebuffer(g,b,!0),this._fbo.depthAttachment.set(h.context.createRenderbuffer(h.context.gl.DEPTH_COMPONENT16,g,b))),this._fbo.colorAttachment.set(l==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const l=this.style.map.painter.context;if(this._coordsTexture)return this._coordsTexture;const h=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let P=0,z=0;P<this._coordsTextureSize;P++)for(let $=0;$<this._coordsTextureSize;$++,z+=4)h[z+0]=255&$,h[z+1]=255&P,h[z+2]=$>>8<<4|P>>8,h[z+3]=0;const g=new o.RGBAImage({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(h.buffer)),b=new R(l,g,l.gl.RGBA,{premultiply:!1});return b.bind(l.gl.NEAREST,l.gl.CLAMP_TO_EDGE),this._coordsTexture=b,b}pointCoordinate(l){const h=new Uint8Array(4),g=this.style.map.painter,b=g.context,P=b.gl;b.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),P.readPixels(l.x,g.height/devicePixelRatio-l.y-1,1,1,P.RGBA,P.UNSIGNED_BYTE,h),b.bindFramebuffer.set(null);const z=h[0]+(h[2]>>4<<8),$=h[1]+((15&h[2])<<8),V=this.coordsIndex[255-h[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+z)/ie,(W.tileID.canonical.y*ee+$)/ie,this.getElevation(W.tileID,z,$,ee))}getTerrainMesh(){if(this._mesh)return this._mesh;const l=this.style.map.painter.context,h=new o.PosArray,g=new o.TriangleIndexArray,b=this.meshSize,P=o.EXTENT/b,z=b*b;for(let $=0;$<=b;$++)for(let V=0;V<=b;V++)h.emplaceBack(V*P,$*P);for(let $=0;$<z;$+=b+1)for(let V=0;V<b;V++)g.emplaceBack(V+$,b+V+$+1,b+V+$+2),g.emplaceBack(V+$,b+V+$+2,V+$+1);return this._mesh={indexBuffer:l.createIndexBuffer(g),vertexBuffer:l.createVertexBuffer(h,vr.members),segments:o.SegmentVector.simpleSegment(0,0,h.length,g.length)},this._mesh}getMinMaxElevation(l){const h=this.getTerrainData(l).tile,g={minElevation:null,maxElevation:null};return h&&h.dem&&(g.minElevation=(h.dem.min+this.elevationOffset)*this.exaggeration,g.maxElevation=(h.dem.max+this.elevationOffset)*this.exaggeration),g}}const Br=(x,l)=>o.emitValidationErrors(x,l&&l.filter(h=>h.identifier!=="source.canvas")),Jr=o.pick(lt,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),Vn=o.pick(lt,["setCenter","setZoom","setBearing","setPitch"]),an=function(){const x={},l=o.spec.$version;for(const h in o.spec.$root){const g=o.spec.$root[h];if(g.required){let b=null;b=h==="version"?l:g.type==="array"?[]:{},b!=null&&(x[h]=b)}}return x}();class An extends o.Evented{constructor(l,h={}){super(),this.map=l,this.dispatcher=new Y(It(),this),this.imageManager=new I,this.imageManager.setEventedParent(this),this.glyphManager=new B(l._requestManager,h.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 g=this;this._rtlTextPluginCallback=An.registerForPluginStateChange(b=>{g.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:b.pluginStatus,pluginURL:b.pluginURL},(P,z)=>{if(o.triggerPluginCompletionEvent(P),z&&z.every($=>$))for(const $ in g.sourceCaches)g.sourceCaches[$].reload()})}),this.on("data",b=>{if(b.dataType!=="source"||b.sourceDataType!=="metadata")return;const P=this.sourceCaches[b.sourceId];if(!P)return;const z=P.getSource();if(z&&z.vectorLayerIds)for(const $ in this._layers){const V=this._layers[$];V.source===z.id&&this._validateLayer(V)}})}loadURL(l,h={}){this.fire(new o.Event("dataloading",{dataType:"style"}));const g=typeof h.validate!="boolean"||h.validate,b=this.map._requestManager.transformRequest(l,o.ResourceType.Style);this._request=o.getJSON(b,(P,z)=>{this._request=null,P?this.fire(new o.ErrorEvent(P)):z&&this._load(z,g)})}loadJSON(l,h={}){this.fire(new o.Event("dataloading",{dataType:"style"})),this._request=o.exported.frame(()=>{this._request=null,this._load(l,h.validate!==!1)})}loadEmpty(){this.fire(new o.Event("dataloading",{dataType:"style"})),this._load(an,!1)}_load(l,h){if(h&&Br(this,o.validateStyle(l)))return;this._loaded=!0,this.stylesheet=l;for(const b in l.sources)this.addSource(b,l.sources[b],{validate:!1});l.sprite?this._loadSprite(l.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(l.glyphs);const g=Dt(this.stylesheet.layers);this._order=g.map(b=>b.id),this._layers={},this._serializedLayers={};for(let b of g)b=o.createStyleLayer(b),b.setEventedParent(this,{layer:{id:b.id}}),this._layers[b.id]=b,this._serializedLayers[b.id]=b.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(l){this._spriteRequest=function(h,g,b,P){let z,$,V;const W=b>1?"@2x":"";let ee=o.getJSON(g.transformRequest(g.normalizeSpriteURL(h,W,".json"),o.ResourceType.SpriteJSON),(Se,_e)=>{ee=null,V||(V=Se,z=_e,fe())}),ie=o.getImage(g.transformRequest(g.normalizeSpriteURL(h,W,".png"),o.ResourceType.SpriteImage),(Se,_e)=>{ie=null,V||(V=Se,$=_e,fe())});function fe(){if(V)P(V);else if(z&&$){const Se=o.exported.getImageData($),_e={};for(const we in z){const{width:$e,height:Ue,x:et,y:Pe,sdf:at,pixelRatio:rt,stretchX:gt,stretchY:yt,content:zt}=z[we],vt=new o.RGBAImage({width:$e,height:Ue});o.RGBAImage.copy(Se,vt,{x:et,y:Pe},{x:0,y:0},{width:$e,height:Ue}),_e[we]={data:vt,pixelRatio:rt,sdf:at,stretchX:gt,stretchY:yt,content:zt}}P(null,_e)}}return{cancel(){ee&&(ee.cancel(),ee=null),ie&&(ie.cancel(),ie=null)}}}(l,this.map._requestManager,this.map.getPixelRatio(),(h,g)=>{if(this._spriteRequest=null,h)this.fire(new o.ErrorEvent(h));else if(g)for(const b in g)this.imageManager.addImage(b,g[b]);this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new o.Event("data",{dataType:"style"}))})}_validateLayer(l){const h=this.sourceCaches[l.source];if(!h)return;const g=l.sourceLayer;if(!g)return;const b=h.getSource();(b.type==="geojson"||b.vectorLayerIds&&b.vectorLayerIds.indexOf(g)===-1)&&this.fire(new o.ErrorEvent(new Error(`Source layer "${g}" does not exist on source "${b.id}" as specified by style layer "${l.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const l in this.sourceCaches)if(!this.sourceCaches[l].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeLayers(l){const h=[];for(const g of l){const b=this._layers[g];b.type!=="custom"&&h.push(b.serialize())}return h}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;for(const l in this.sourceCaches)if(this.sourceCaches[l].hasTransition())return!0;for(const l in this._layers)if(this._layers[l].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(l){if(!this._loaded)return;const h=this._changed;if(this._changed){const b=Object.keys(this._updatedLayers),P=Object.keys(this._removedLayers);(b.length||P.length)&&this._updateWorkerLayers(b,P);for(const z in this._updatedSources){const $=this._updatedSources[z];if($==="reload")this._reloadSource(z);else{if($!=="clear")throw new Error(`Invalid action ${$}`);this._clearSource(z)}}this._updateTilesForChangedImages();for(const z in this._updatedPaintProps)this._layers[z].updateTransitions(l);this.light.updateTransitions(l),this._resetUpdates()}const g={};for(const b in this.sourceCaches){const P=this.sourceCaches[b];g[b]=P.used,P.used=!1}for(const b of this._order){const P=this._layers[b];P.recalculate(l,this._availableImages),!P.isHidden(l.zoom)&&P.source&&(this.sourceCaches[P.source].used=!0)}for(const b in g){const P=this.sourceCaches[b];g[b]!==P.used&&P.fire(new o.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:b}))}this.light.recalculate(l),this.z=l.zoom,h&&this.fire(new o.Event("data",{dataType:"style"}))}_updateTilesForChangedImages(){const l=Object.keys(this._changedImages);if(l.length){for(const h in this.sourceCaches)this.sourceCaches[h].reloadTilesForDependencies(["icons","patterns"],l);this._changedImages={}}}_updateWorkerLayers(l,h){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(l),removedIds:h})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}}setTerrain(l){if(this._checkLoaded(),this._terrainDataCallback&&this.off("data",this._terrainDataCallback),this._terrainfreezeElevationCallback&&this.map.off("freezeElevation",this._terrainfreezeElevationCallback),l){const h=this.sourceCaches[l.source];if(!h)throw new Error(`cannot load terrain, because there exists no source with ID: ${l.source}`);this.terrain=new gr(this,h,l),this.map.transform.updateElevation(this.terrain),this._terrainfreezeElevationCallback=g=>{g.freeze?this.map.transform.freezeElevation=!0:(this.map.transform.freezeElevation=!1,this.map.transform.recalculateZoom(this.terrain))},this._terrainDataCallback=g=>{g.tile&&(g.sourceId===l.source?(this.map.transform.updateElevation(this.terrain),this.terrain.rememberForRerender(g.sourceId,g.tile.tileID)):g.source.type==="geojson"&&this.terrain.rememberForRerender(g.sourceId,g.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:l}))}setState(l){if(this._checkLoaded(),Br(this,o.validateStyle(l)))return!1;(l=o.clone$1(l)).layers=Dt(l.layers);const h=function(b,P){if(!b)return[{command:lt.setStyle,args:[P]}];let z=[];try{if(!y(b.version,P.version))return[{command:lt.setStyle,args:[P]}];y(b.center,P.center)||z.push({command:lt.setCenter,args:[P.center]}),y(b.zoom,P.zoom)||z.push({command:lt.setZoom,args:[P.zoom]}),y(b.bearing,P.bearing)||z.push({command:lt.setBearing,args:[P.bearing]}),y(b.pitch,P.pitch)||z.push({command:lt.setPitch,args:[P.pitch]}),y(b.sprite,P.sprite)||z.push({command:lt.setSprite,args:[P.sprite]}),y(b.glyphs,P.glyphs)||z.push({command:lt.setGlyphs,args:[P.glyphs]}),y(b.transition,P.transition)||z.push({command:lt.setTransition,args:[P.transition]}),y(b.light,P.light)||z.push({command:lt.setLight,args:[P.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)?y(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))})(b.sources,P.sources,V,$);const W=[];b.layers&&b.layers.forEach(ee=>{$[ee.source]?z.push({command:lt.removeLayer,args:[ee.id]}):W.push(ee)}),z=z.concat(V),function(ee,ie,fe){ie=ie||[];const Se=(ee=ee||[]).map(Wt),_e=ie.map(Wt),we=ee.reduce(jt,{}),$e=ie.reduce(jt,{}),Ue=Se.slice(),et=Object.create(null);let Pe,at,rt,gt,yt,zt,vt;for(Pe=0,at=0;Pe<Se.length;Pe++)rt=Se[Pe],Object.prototype.hasOwnProperty.call($e,rt)?at++:(fe.push({command:lt.removeLayer,args:[rt]}),Ue.splice(Ue.indexOf(rt,at),1));for(Pe=0,at=0;Pe<_e.length;Pe++)rt=_e[_e.length-1-Pe],Ue[Ue.length-1-Pe]!==rt&&(Object.prototype.hasOwnProperty.call(we,rt)?(fe.push({command:lt.removeLayer,args:[rt]}),Ue.splice(Ue.lastIndexOf(rt,Ue.length-at),1)):at++,zt=Ue[Ue.length-Pe],fe.push({command:lt.addLayer,args:[$e[rt],zt]}),Ue.splice(Ue.length-Pe,0,rt),et[rt]=!0);for(Pe=0;Pe<_e.length;Pe++)if(rt=_e[Pe],gt=we[rt],yt=$e[rt],!et[rt]&&!y(gt,yt))if(y(gt.source,yt.source)&&y(gt["source-layer"],yt["source-layer"])&&y(gt.type,yt.type)){for(vt in xt(gt.layout,yt.layout,fe,rt,null,lt.setLayoutProperty),xt(gt.paint,yt.paint,fe,rt,null,lt.setPaintProperty),y(gt.filter,yt.filter)||fe.push({command:lt.setFilter,args:[rt,yt.filter]}),y(gt.minzoom,yt.minzoom)&&y(gt.maxzoom,yt.maxzoom)||fe.push({command:lt.setLayerZoomRange,args:[rt,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,rt,vt.slice(6),lt.setPaintProperty):y(gt[vt],yt[vt])||fe.push({command:lt.setLayerProperty,args:[rt,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,rt,vt.slice(6),lt.setPaintProperty):y(gt[vt],yt[vt])||fe.push({command:lt.setLayerProperty,args:[rt,vt,yt[vt]]}))}else fe.push({command:lt.removeLayer,args:[rt]}),zt=Ue[Ue.lastIndexOf(rt)+1],fe.push({command:lt.addLayer,args:[yt,zt]})}(W,P.layers,z)}catch($){console.warn("Unable to compute style diff:",$),z=[{command:lt.setStyle,args:[P]}]}return z}(this.serialize(),l).filter(b=>!(b.command in Vn));if(h.length===0)return!1;const g=h.filter(b=>!(b.command in Jr));if(g.length>0)throw new Error(`Unimplemented: ${g.map(b=>b.command).join(", ")}.`);return h.forEach(b=>{b.command!=="setTransition"&&this[b.command].apply(this,b.args)}),this.stylesheet=l,!0}addImage(l,h){if(this.getImage(l))return this.fire(new o.ErrorEvent(new Error(`An image named "${l}" already exists.`)));this.imageManager.addImage(l,h),this._afterImageUpdated(l)}updateImage(l,h){this.imageManager.updateImage(l,h)}getImage(l){return this.imageManager.getImage(l)}removeImage(l){if(!this.getImage(l))return this.fire(new o.ErrorEvent(new Error(`An image named "${l}" does not exist.`)));this.imageManager.removeImage(l),this._afterImageUpdated(l)}_afterImageUpdated(l){this._availableImages=this.imageManager.listImages(),this._changedImages[l]=!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(l,h,g={}){if(this._checkLoaded(),this.sourceCaches[l]!==void 0)throw new Error(`Source "${l}" already exists.`);if(!h.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(h).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(h.type)>=0&&this._validate(o.validateStyle.source,`sources.${l}`,h,null,g))return;this.map&&this.map._collectResourceTiming&&(h.collectResourceTiming=!0);const b=this.sourceCaches[l]=new je(l,h,this.dispatcher);b.style=this,b.setEventedParent(this,()=>({isSourceLoaded:this.loaded(),source:b.serialize(),sourceId:l})),b.onAdd(this.map),this._changed=!0}removeSource(l){if(this._checkLoaded(),this.sourceCaches[l]===void 0)throw new Error("There is no source with this ID");for(const g in this._layers)if(this._layers[g].source===l)return this.fire(new o.ErrorEvent(new Error(`Source "${l}" cannot be removed while layer "${g}" is using it.`)));const h=this.sourceCaches[l];delete this.sourceCaches[l],delete this._updatedSources[l],h.fire(new o.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:l})),h.setEventedParent(null),h.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(l,h){if(this._checkLoaded(),this.sourceCaches[l]===void 0)throw new Error(`There is no source with this ID=${l}`);const g=this.sourceCaches[l].getSource();if(g.type!=="geojson")throw new Error(`geojsonSource.type is ${g.type}, which is !== 'geojson`);g.setData(h),this._changed=!0}getSource(l){return this.sourceCaches[l]&&this.sourceCaches[l].getSource()}addLayer(l,h,g={}){this._checkLoaded();const b=l.id;if(this.getLayer(b))return void this.fire(new o.ErrorEvent(new Error(`Layer "${b}" already exists on this map.`)));let P;if(l.type==="custom"){if(Br(this,o.validateCustomStyleLayer(l)))return;P=o.createStyleLayer(l)}else{if(typeof l.source=="object"&&(this.addSource(b,l.source),l=o.clone$1(l),l=o.extend(l,{source:b})),this._validate(o.validateStyle.layer,`layers.${b}`,l,{arrayIndex:-1},g))return;P=o.createStyleLayer(l),this._validateLayer(P),P.setEventedParent(this,{layer:{id:b}}),this._serializedLayers[P.id]=P.serialize()}const z=h?this._order.indexOf(h):this._order.length;if(h&&z===-1)this.fire(new o.ErrorEvent(new Error(`Cannot add layer "${b}" before non-existing layer "${h}".`)));else{if(this._order.splice(z,0,b),this._layerOrderChanged=!0,this._layers[b]=P,this._removedLayers[b]&&P.source&&P.type!=="custom"){const $=this._removedLayers[b];delete this._removedLayers[b],$.type!==P.type?this._updatedSources[P.source]="clear":(this._updatedSources[P.source]="reload",this.sourceCaches[P.source].pause())}this._updateLayer(P),P.onAdd&&P.onAdd(this.map)}}moveLayer(l,h){if(this._checkLoaded(),this._changed=!0,!this._layers[l])return void this.fire(new o.ErrorEvent(new Error(`The layer '${l}' does not exist in the map's style and cannot be moved.`)));if(l===h)return;const g=this._order.indexOf(l);this._order.splice(g,1);const b=h?this._order.indexOf(h):this._order.length;h&&b===-1?this.fire(new o.ErrorEvent(new Error(`Cannot move layer "${l}" before non-existing layer "${h}".`))):(this._order.splice(b,0,l),this._layerOrderChanged=!0)}removeLayer(l){this._checkLoaded();const h=this._layers[l];if(!h)return void this.fire(new o.ErrorEvent(new Error(`Cannot remove non-existing layer "${l}".`)));h.setEventedParent(null);const g=this._order.indexOf(l);this._order.splice(g,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[l]=h,delete this._layers[l],delete this._serializedLayers[l],delete this._updatedLayers[l],delete this._updatedPaintProps[l],h.onRemove&&h.onRemove(this.map)}getLayer(l){return this._layers[l]}hasLayer(l){return l in this._layers}setLayerZoomRange(l,h,g){this._checkLoaded();const b=this.getLayer(l);b?b.minzoom===h&&b.maxzoom===g||(h!=null&&(b.minzoom=h),g!=null&&(b.maxzoom=g),this._updateLayer(b)):this.fire(new o.ErrorEvent(new Error(`Cannot set the zoom range of non-existing layer "${l}".`)))}setFilter(l,h,g={}){this._checkLoaded();const b=this.getLayer(l);if(b){if(!y(b.filter,h))return h==null?(b.filter=void 0,void this._updateLayer(b)):void(this._validate(o.validateStyle.filter,`layers.${b.id}.filter`,h,null,g)||(b.filter=o.clone$1(h),this._updateLayer(b)))}else this.fire(new o.ErrorEvent(new Error(`Cannot filter non-existing layer "${l}".`)))}getFilter(l){return o.clone$1(this.getLayer(l).filter)}setLayoutProperty(l,h,g,b={}){this._checkLoaded();const P=this.getLayer(l);P?y(P.getLayoutProperty(h),g)||(P.setLayoutProperty(h,g,b),this._updateLayer(P)):this.fire(new o.ErrorEvent(new Error(`Cannot style non-existing layer "${l}".`)))}getLayoutProperty(l,h){const g=this.getLayer(l);if(g)return g.getLayoutProperty(h);this.fire(new o.ErrorEvent(new Error(`Cannot get style of non-existing layer "${l}".`)))}setPaintProperty(l,h,g,b={}){this._checkLoaded();const P=this.getLayer(l);P?y(P.getPaintProperty(h),g)||(P.setPaintProperty(h,g,b)&&this._updateLayer(P),this._changed=!0,this._updatedPaintProps[l]=!0):this.fire(new o.ErrorEvent(new Error(`Cannot style non-existing layer "${l}".`)))}getPaintProperty(l,h){return this.getLayer(l).getPaintProperty(h)}setFeatureState(l,h){this._checkLoaded();const g=l.source,b=l.sourceLayer,P=this.sourceCaches[g];if(P===void 0)return void this.fire(new o.ErrorEvent(new Error(`The source '${g}' does not exist in the map's style.`)));const z=P.getSource().type;z==="geojson"&&b?this.fire(new o.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):z!=="vector"||b?(l.id===void 0&&this.fire(new o.ErrorEvent(new Error("The feature id parameter must be provided."))),P.setFeatureState(b,l.id,h)):this.fire(new o.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(l,h){this._checkLoaded();const g=l.source,b=this.sourceCaches[g];if(b===void 0)return void this.fire(new o.ErrorEvent(new Error(`The source '${g}' does not exist in the map's style.`)));const P=b.getSource().type,z=P==="vector"?l.sourceLayer:void 0;P!=="vector"||z?h&&typeof l.id!="string"&&typeof l.id!="number"?this.fire(new o.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):b.removeFeatureState(z,l.id,h):this.fire(new o.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(l){this._checkLoaded();const h=l.source,g=l.sourceLayer,b=this.sourceCaches[h];if(b!==void 0)return b.getSource().type!=="vector"||g?(l.id===void 0&&this.fire(new o.ErrorEvent(new Error("The feature id parameter must be provided."))),b.getFeatureState(g,l.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 '${h}' 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,l=>l.serialize()),layers:this._serializeLayers(this._order)},l=>l!==void 0)}_updateLayer(l){this._updatedLayers[l.id]=!0,l.source&&!this._updatedSources[l.source]&&this.sourceCaches[l.source].getSource().type!=="raster"&&(this._updatedSources[l.source]="reload",this.sourceCaches[l.source].pause()),this._changed=!0}_flattenAndSortRenderedFeatures(l){const h=z=>this._layers[z].type==="fill-extrusion",g={},b=[];for(let z=this._order.length-1;z>=0;z--){const $=this._order[z];if(h($)){g[$]=z;for(const V of l){const W=V[$];if(W)for(const ee of W)b.push(ee)}}}b.sort((z,$)=>$.intersectionZ-z.intersectionZ);const P=[];for(let z=this._order.length-1;z>=0;z--){const $=this._order[z];if(h($))for(let V=b.length-1;V>=0;V--){const W=b[V].feature;if(g[W.layer.id]<z)break;P.push(W),b.pop()}else for(const V of l){const W=V[$];if(W)for(const ee of W)P.push(ee.feature)}}return P}queryRenderedFeatures(l,h,g){h&&h.filter&&this._validate(o.validateStyle.filter,"queryRenderedFeatures.filter",h.filter,null,h);const b={};if(h&&h.layers){if(!Array.isArray(h.layers))return this.fire(new o.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(const z of h.layers){const $=this._layers[z];if(!$)return this.fire(new o.ErrorEvent(new Error(`The layer '${z}' does not exist in the map's style and cannot be queried for features.`))),[];b[$.source]=!0}}const P=[];h.availableImages=this._availableImages;for(const z in this.sourceCaches)h.layers&&!b[z]||P.push(Ie(this.sourceCaches[z],this._layers,this._serializedLayers,l,h,g));return this.placement&&P.push(function(z,$,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 Ue=$e.featureIndex.lookupSymbolFeatures(_e[$e.bucketInstanceId],$,$e.bucketIndex,$e.sourceLayerIndex,ee.filter,ee.layers,ee.availableImages,z);for(const et in Ue){const Pe=Se[et]=Se[et]||[],at=Ue[et];at.sort((rt,gt)=>{const yt=$e.featureSortOrder;if(yt){const zt=yt.indexOf(rt.featureIndex);return yt.indexOf(gt.featureIndex)-zt}return gt.featureIndex-rt.featureIndex});for(const rt of at)Pe.push(rt)}}for(const $e in Se)Se[$e].forEach(Ue=>{const et=Ue.feature,Pe=V[z[$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,l,h,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(P)}querySourceFeatures(l,h){h&&h.filter&&this._validate(o.validateStyle.filter,"querySourceFeatures.filter",h.filter,null,h);const g=this.sourceCaches[l];return g?function(b,P){const z=b.getRenderableIds().map(W=>b.getTileByID(W)),$=[],V={};for(let W=0;W<z.length;W++){const ee=z[W],ie=ee.tileID.canonical.key;V[ie]||(V[ie]=!0,ee.querySourceFeatures($,P))}return $}(g,h):[]}addSourceType(l,h,g){return An.getSourceType(l)?g(new Error(`A source type called "${l}" already exists.`)):(An.setSourceType(l,h),h.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:l,url:h.workerSourceURL},g):g(null,null))}getLight(){return this.light.getLight()}setLight(l,h={}){this._checkLoaded();const g=this.light.getLight();let b=!1;for(const z in l)if(!y(l[z],g[z])){b=!0;break}if(!b)return;const P={now:o.exported.now(),transition:o.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(l,h),this.light.updateTransitions(P)}_validate(l,h,g,b,P={}){return(!P||P.validate!==!1)&&Br(this,l.call(o.validateStyle,o.extend({key:h,style:this.serialize(),value:g,styleSpec:o.spec},b)))}_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 l in this._layers)this._layers[l].setEventedParent(null);for(const l in this.sourceCaches){const h=this.sourceCaches[l];h.setEventedParent(null),h.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()}_clearSource(l){this.sourceCaches[l].clearTiles()}_reloadSource(l){this.sourceCaches[l].resume(),this.sourceCaches[l].reload()}_updateSources(l){for(const h in this.sourceCaches)this.sourceCaches[h].update(l,this.terrain)}_generateCollisionBoxes(){for(const l in this.sourceCaches)this._reloadSource(l)}_updatePlacement(l,h,g,b,P=!1){let z=!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],l.center.lng);z=z||ie}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((P=P||this._layerOrderChanged||g===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(o.exported.now(),l.zoom))&&(this.pauseablePlacement=new Be(l,this.terrain,this._order,P,h,g,b,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),z&&this.pauseablePlacement.placement.setStale()),$||z)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 l in this.sourceCaches)this.sourceCaches[l].releaseSymbolFadeTiles()}getImages(l,h,g){this.imageManager.getImages(h.icons,g),this._updateTilesForChangedImages();const b=this.sourceCaches[h.source];b&&b.setDependencies(h.tileID.key,h.type,h.icons)}getGlyphs(l,h,g){this.glyphManager.getGlyphs(h.stacks,g)}getResource(l,h,g){return o.makeRequest(h,g)}}An.getSourceType=function(x){return ke[x]},An.setSourceType=function(x,l){ke[x]=l},An.registerForPluginStateChange=o.registerForPluginStateChange;var Pr="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 Sr={prelude:Rr(`#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:Rr(`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:Rr(`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:Rr(`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:Rr("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:Rr(`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:Rr(`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:Rr("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:Rr("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:Rr("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:Rr(`#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:Rr(`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:Rr(`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:Rr(`#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:Rr(`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:Rr(`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:Rr(`#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:Rr(`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:Rr(`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:Rr(`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:Rr(`#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:Rr(`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:Rr(`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:Rr(`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:Rr(`#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:Rr(`#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:Rr("uniform sampler2D u_texture;varying vec2 v_texture_pos;void main() {gl_FragColor=texture2D(u_texture,v_texture_pos);}",Pr),terrainDepth:Rr("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);}",Pr),terrainCoords:Rr("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);}",Pr)};function Rr(x,l){const h=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,g=l.match(/attribute ([\w]+) ([\w]+)/g),b=x.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),P=l.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),z=P?P.concat(b):b,$={};return{fragmentSource:x=x.replace(h,(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:l=l.replace(h,(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:g,staticUniforms:z}}class ei{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(l,h,g,b,P,z,$,V,W){this.context=l;let ee=this.boundPaintVertexBuffers.length!==b.length;for(let ie=0;!ee&&ie<b.length;ie++)this.boundPaintVertexBuffers[ie]!==b[ie]&&(ee=!0);l.extVertexArrayObject&&this.vao&&this.boundProgram===h&&this.boundLayoutVertexBuffer===g&&!ee&&this.boundIndexBuffer===P&&this.boundVertexOffset===z&&this.boundDynamicVertexBuffer===$&&this.boundDynamicVertexBuffer2===V&&this.boundDynamicVertexBuffer3===W?(l.bindVertexArrayOES.set(this.vao),$&&$.bind(),P&&P.dynamicDraw&&P.bind(),V&&V.bind(),W&&W.bind()):this.freshBind(h,g,b,P,z,$,V,W)}freshBind(l,h,g,b,P,z,$,V){let W;const ee=l.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=l,this.boundLayoutVertexBuffer=h,this.boundPaintVertexBuffers=g,this.boundIndexBuffer=b,this.boundVertexOffset=P,this.boundDynamicVertexBuffer=z,this.boundDynamicVertexBuffer2=$,this.boundDynamicVertexBuffer3=V;else{W=ie.currentNumAttributes||0;for(let Se=ee;Se<W;Se++)fe.disableVertexAttribArray(Se)}h.enableAttributes(fe,l);for(const Se of g)Se.enableAttributes(fe,l);z&&z.enableAttributes(fe,l),$&&$.enableAttributes(fe,l),V&&V.enableAttributes(fe,l),h.bind(),h.setVertexAttribPointers(fe,l,P);for(const Se of g)Se.bind(),Se.setVertexAttribPointers(fe,l,P);z&&(z.bind(),z.setVertexAttribPointers(fe,l,P)),b&&b.bind(),$&&($.bind(),$.setVertexAttribPointers(fe,l,P)),V&&(V.bind(),V.setVertexAttribPointers(fe,l,P)),ie.currentNumAttributes=ee}destroy(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)}}function yn(x){const l=[];for(let h=0;h<x.length;h++){if(x[h]===null)continue;const g=x[h].split(" ");l.push(g.pop())}return l}class Ur{constructor(l,h,g,b,P,z,$){const V=l.gl;this.program=V.createProgram();const W=yn(g.staticAttributes),ee=b?b.getBinderAttributes():[],ie=W.concat(ee),fe=Sr.prelude.staticUniforms?yn(Sr.prelude.staticUniforms):[],Se=g.staticUniforms?yn(g.staticUniforms):[],_e=b?b.getBinderUniforms():[],we=fe.concat(Se).concat(_e),$e=[];for(const yt of we)$e.indexOf(yt)<0&&$e.push(yt);const Ue=b?b.defines():[];z&&Ue.push("#define OVERDRAW_INSPECTOR;"),$&&Ue.push("#define TERRAIN3D;");const et=Ue.concat(Sr.prelude.fragmentSource,g.fragmentSource).join(`
`),Pe=Ue.concat(Sr.prelude.vertexSource,g.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 rt=V.createShader(V.VERTEX_SHADER);if(V.isContextLost())return void(this.failedToCreate=!0);V.shaderSource(rt,Pe),V.compileShader(rt),V.attachShader(this.program,rt),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(rt),V.deleteShader(at);for(let yt=0;yt<$e.length;yt++){const zt=$e[yt];if(zt&&!gt[zt]){const vt=V.getUniformLocation(this.program,zt);vt&&(gt[zt]=vt)}}this.fixedUniforms=P(l,gt),this.terrainUniforms=((yt,zt)=>({u_depth:new o.Uniform1i(yt,zt.u_depth),u_terrain:new o.Uniform1i(yt,zt.u_terrain),u_terrain_dim:new o.Uniform1f(yt,zt.u_terrain_dim),u_terrain_matrix:new o.UniformMatrix4f(yt,zt.u_terrain_matrix),u_terrain_unpack:new o.Uniform4f(yt,zt.u_terrain_unpack),u_terrain_offset:new o.Uniform1f(yt,zt.u_terrain_offset),u_terrain_exaggeration:new o.Uniform1f(yt,zt.u_terrain_exaggeration)}))(l,gt),this.binderUniforms=b?b.getUniforms(l,gt):[]}draw(l,h,g,b,P,z,$,V,W,ee,ie,fe,Se,_e,we,$e,Ue,et){const Pe=l.gl;if(this.failedToCreate)return;if(l.program.set(this.program),l.setDepthMode(g),l.setStencilMode(b),l.setColorMode(P),l.setCullFace(z),V){l.activeTexture.set(Pe.TEXTURE2),Pe.bindTexture(Pe.TEXTURE_2D,V.depthTexture),l.activeTexture.set(Pe.TEXTURE3),Pe.bindTexture(Pe.TEXTURE_2D,V.texture);for(const rt in this.terrainUniforms)this.terrainUniforms[rt].set(V[rt])}for(const rt in this.fixedUniforms)this.fixedUniforms[rt].set($[rt]);we&&we.setUniforms(l,this.binderUniforms,Se,{zoom:_e});let at=0;switch(h){case Pe.LINES:at=2;break;case Pe.TRIANGLES:at=3;break;case Pe.LINE_STRIP:at=1}for(const rt of fe.get()){const gt=rt.vaos||(rt.vaos={});(gt[W]||(gt[W]=new ei)).bind(l,this,ee,we?we.getPaintVertexBuffers():[],ie,rt.vertexOffset,$e,Ue,et),Pe.drawElements(h,rt.primitiveLength*at,Pe.UNSIGNED_SHORT,rt.primitiveOffset*at*2)}}}function Lr(x,l,h){const g=1/Nt(h,1,l.transform.tileZoom),b=Math.pow(2,h.tileID.overscaledZ),P=h.tileSize*Math.pow(2,l.transform.tileZoom)/b,z=P*(h.tileID.canonical.x+h.tileID.wrap*b),$=P*h.tileID.canonical.y;return{u_image:0,u_texsize:h.imageAtlasTexture.size,u_scale:[g,x.fromScale,x.toScale],u_fade:x.t,u_pixel_coord_upper:[z>>16,$>>16],u_pixel_coord_lower:[65535&z,65535&$]}}const Yr=(x,l,h,g)=>{const b=l.style.light,P=b.properties.get("position"),z=[P.x,P.y,P.z],$=o.create$1();b.properties.get("anchor")==="viewport"&&o.fromRotation($,-l.transform.angle),o.transformMat3(z,z,$);const V=b.properties.get("color");return{u_matrix:x,u_lightpos:z,u_lightintensity:b.properties.get("intensity"),u_lightcolor:[V.r,V.g,V.b],u_vertical_gradient:+h,u_opacity:g}},wn=(x,l,h,g,b,P,z)=>o.extend(Yr(x,l,h,g),Lr(P,l,z),{u_height_factor:-Math.pow(2,b.overscaledZ)/z.tileSize/8}),Sn=x=>({u_matrix:x}),jn=(x,l,h,g)=>o.extend(Sn(x),Lr(h,l,g)),bo=(x,l)=>({u_matrix:x,u_world:l}),Zl=(x,l,h,g,b)=>o.extend(jn(x,l,h,g),{u_world:b}),Td=(x,l,h,g)=>{const b=x.transform;let P,z;if(g.paint.get("circle-pitch-alignment")==="map"){const $=Nt(h,1,b.zoom);P=!0,z=[$,$]}else P=!1,z=b.pixelsToGLUnits;return{u_camera_to_center_distance:b.cameraToCenterDistance,u_scale_with_map:+(g.paint.get("circle-pitch-scale")==="map"),u_matrix:x.translatePosMatrix(l.posMatrix,h,g.paint.get("circle-translate"),g.paint.get("circle-translate-anchor")),u_pitch_with_map:+P,u_device_pixel_ratio:x.pixelRatio,u_extrude_scale:z}},Qa=(x,l,h)=>{const g=Nt(h,1,l.zoom),b=Math.pow(2,l.zoom-h.tileID.overscaledZ),P=h.tileID.overscaleFactor();return{u_matrix:x,u_camera_to_center_distance:l.cameraToCenterDistance,u_pixels_to_tile_units:g,u_extrude_scale:[l.pixelsToGLUnits[0]/(g*b),l.pixelsToGLUnits[1]/(g*b)],u_overscale_factor:P}},Fr=(x,l,h=1)=>({u_matrix:x,u_color:l,u_overlay:0,u_overlay_scale:h}),Zr=x=>({u_matrix:x}),Nn=(x,l,h,g)=>({u_matrix:x,u_extrude_scale:Nt(l,1,h),u_intensity:g});function Di(x,l){const h=Math.pow(2,l.canonical.z),g=l.canonical.y;return[new o.MercatorCoordinate(0,g/h).toLngLat().lat,new o.MercatorCoordinate(0,(g+1)/h).toLngLat().lat]}const Es=(x,l,h,g)=>{const b=x.transform;return{u_matrix:es(x,l,h,g),u_ratio:1/Nt(l,1,b.zoom),u_device_pixel_ratio:x.pixelRatio,u_units_to_pixels:[1/b.pixelsToGLUnits[0],1/b.pixelsToGLUnits[1]]}},Vo=(x,l,h,g,b)=>o.extend(Es(x,l,h,b),{u_image:0,u_image_height:g}),rl=(x,l,h,g,b)=>{const P=x.transform,z=xn(l,P);return{u_matrix:es(x,l,h,b),u_texsize:l.imageAtlasTexture.size,u_ratio:1/Nt(l,1,P.zoom),u_device_pixel_ratio:x.pixelRatio,u_image:0,u_scale:[z,g.fromScale,g.toScale],u_fade:g.t,u_units_to_pixels:[1/P.pixelsToGLUnits[0],1/P.pixelsToGLUnits[1]]}},Ja=(x,l,h,g,b,P)=>{const z=x.lineAtlas,$=xn(l,x.transform),V=h.layout.get("line-cap")==="round",W=z.getDash(g.from,V),ee=z.getDash(g.to,V),ie=W.width*b.fromScale,fe=ee.width*b.toScale;return o.extend(Es(x,l,h,P),{u_patternscale_a:[$/ie,-W.height/2],u_patternscale_b:[$/fe,-ee.height/2],u_sdfgamma:z.width/(256*Math.min(ie,fe)*x.pixelRatio)/2,u_image:0,u_tex_y_a:W.y,u_tex_y_b:ee.y,u_mix:b.t})};function xn(x,l){return 1/Nt(x,1,l.tileZoom)}function es(x,l,h,g){return x.translatePosMatrix(g?g.posMatrix:l.tileID.posMatrix,l,h.paint.get("line-translate"),h.paint.get("line-translate-anchor"))}const qv=(x,l,h,g,b)=>{return{u_matrix:x,u_tl_parent:l,u_scale_parent:h,u_buffer_scale:1,u_fade_t:g.mix,u_opacity:g.opacity*b.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:b.paint.get("raster-brightness-min"),u_brightness_high:b.paint.get("raster-brightness-max"),u_saturation_factor:(z=b.paint.get("raster-saturation"),z>0?1-1/(1.001-z):-z),u_contrast_factor:(P=b.paint.get("raster-contrast"),P>0?1/(1-P):1+P),u_spin_weights:Gv(b.paint.get("raster-hue-rotate"))};var P,z};function Gv(x){x*=Math.PI/180;const l=Math.sin(x),h=Math.cos(x);return[(2*h+1)/3,(-Math.sqrt(3)*l-h+1)/3,(Math.sqrt(3)*l-h+1)/3]}const Dh=(x,l,h,g,b,P,z,$,V,W)=>{const ee=b.transform;return{u_is_size_zoom_constant:+(x==="constant"||x==="source"),u_is_size_feature_constant:+(x==="constant"||x==="camera"),u_size_t:l?l.uSizeT:0,u_size:l?l.uSize:0,u_camera_to_center_distance:ee.cameraToCenterDistance,u_pitch:ee.pitch/360*2*Math.PI,u_rotate_symbol:+h,u_aspect_ratio:ee.width/ee.height,u_fade_change:b.options.fadeDuration?b.symbolFadeChange:1,u_matrix:P,u_label_plane_matrix:z,u_coord_matrix:$,u_is_text:+V,u_pitch_with_map:+g,u_texsize:W,u_texture:0}},Pd=(x,l,h,g,b,P,z,$,V,W,ee)=>{const ie=b.transform;return o.extend(Dh(x,l,h,g,b,P,z,$,V,W),{u_gamma_scale:g?Math.cos(ie._pitch)*ie.cameraToCenterDistance:1,u_device_pixel_ratio:b.pixelRatio,u_is_halo:+ee})},Zv=(x,l,h,g,b,P,z,$,V,W)=>o.extend(Pd(x,l,h,g,b,P,z,$,!0,V,!0),{u_texsize_icon:W,u_texture_icon:1}),a_=(x,l,h)=>({u_matrix:x,u_opacity:l,u_color:h}),s_=(x,l,h,g,b,P)=>o.extend(function(z,$,V,W){const ee=V.imageManager.getPattern(z.from.toString()),ie=V.imageManager.getPattern(z.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),Ue=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,Ue>>16],u_pixel_coord_lower:[65535&$e,65535&Ue]}}(g,P,h,b),{u_matrix:x,u_opacity:l}),Lh={fillExtrusion:(x,l)=>({u_matrix:new o.UniformMatrix4f(x,l.u_matrix),u_lightpos:new o.Uniform3f(x,l.u_lightpos),u_lightintensity:new o.Uniform1f(x,l.u_lightintensity),u_lightcolor:new o.Uniform3f(x,l.u_lightcolor),u_vertical_gradient:new o.Uniform1f(x,l.u_vertical_gradient),u_opacity:new o.Uniform1f(x,l.u_opacity)}),fillExtrusionPattern:(x,l)=>({u_matrix:new o.UniformMatrix4f(x,l.u_matrix),u_lightpos:new o.Uniform3f(x,l.u_lightpos),u_lightintensity:new o.Uniform1f(x,l.u_lightintensity),u_lightcolor:new o.Uniform3f(x,l.u_lightcolor),u_vertical_gradient:new o.Uniform1f(x,l.u_vertical_gradient),u_height_factor:new o.Uniform1f(x,l.u_height_factor),u_image:new o.Uniform1i(x,l.u_image),u_texsize:new o.Uniform2f(x,l.u_texsize),u_pixel_coord_upper:new o.Uniform2f(x,l.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(x,l.u_pixel_coord_lower),u_scale:new o.Uniform3f(x,l.u_scale),u_fade:new o.Uniform1f(x,l.u_fade),u_opacity:new o.Uniform1f(x,l.u_opacity)}),fill:(x,l)=>({u_matrix:new o.UniformMatrix4f(x,l.u_matrix)}),fillPattern:(x,l)=>({u_matrix:new o.UniformMatrix4f(x,l.u_matrix),u_image:new o.Uniform1i(x,l.u_image),u_texsize:new o.Uniform2f(x,l.u_texsize),u_pixel_coord_upper:new o.Uniform2f(x,l.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(x,l.u_pixel_coord_lower),u_scale:new o.Uniform3f(x,l.u_scale),u_fade:new o.Uniform1f(x,l.u_fade)}),fillOutline:(x,l)=>({u_matrix:new o.UniformMatrix4f(x,l.u_matrix),u_world:new o.Uniform2f(x,l.u_world)}),fillOutlinePattern:(x,l)=>({u_matrix:new o.UniformMatrix4f(x,l.u_matrix),u_world:new o.Uniform2f(x,l.u_world),u_image:new o.Uniform1i(x,l.u_image),u_texsize:new o.Uniform2f(x,l.u_texsize),u_pixel_coord_upper:new o.Uniform2f(x,l.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(x,l.u_pixel_coord_lower),u_scale:new o.Uniform3f(x,l.u_scale),u_fade:new o.Uniform1f(x,l.u_fade)}),circle:(x,l)=>({u_camera_to_center_distance:new o.Uniform1f(x,l.u_camera_to_center_distance),u_scale_with_map:new o.Uniform1i(x,l.u_scale_with_map),u_pitch_with_map:new o.Uniform1i(x,l.u_pitch_with_map),u_extrude_scale:new o.Uniform2f(x,l.u_extrude_scale),u_device_pixel_ratio:new o.Uniform1f(x,l.u_device_pixel_ratio),u_matrix:new o.UniformMatrix4f(x,l.u_matrix)}),collisionBox:(x,l)=>({u_matrix:new o.UniformMatrix4f(x,l.u_matrix),u_camera_to_center_distance:new o.Uniform1f(x,l.u_camera_to_center_distance),u_pixels_to_tile_units:new o.Uniform1f(x,l.u_pixels_to_tile_units),u_extrude_scale:new o.Uniform2f(x,l.u_extrude_scale),u_overscale_factor:new o.Uniform1f(x,l.u_overscale_factor)}),collisionCircle:(x,l)=>({u_matrix:new o.UniformMatrix4f(x,l.u_matrix),u_inv_matrix:new o.UniformMatrix4f(x,l.u_inv_matrix),u_camera_to_center_distance:new o.Uniform1f(x,l.u_camera_to_center_distance),u_viewport_size:new o.Uniform2f(x,l.u_viewport_size)}),debug:(x,l)=>({u_color:new o.UniformColor(x,l.u_color),u_matrix:new o.UniformMatrix4f(x,l.u_matrix),u_overlay:new o.Uniform1i(x,l.u_overlay),u_overlay_scale:new o.Uniform1f(x,l.u_overlay_scale)}),clippingMask:(x,l)=>({u_matrix:new o.UniformMatrix4f(x,l.u_matrix)}),heatmap:(x,l)=>({u_extrude_scale:new o.Uniform1f(x,l.u_extrude_scale),u_intensity:new o.Uniform1f(x,l.u_intensity),u_matrix:new o.UniformMatrix4f(x,l.u_matrix)}),heatmapTexture:(x,l)=>({u_matrix:new o.UniformMatrix4f(x,l.u_matrix),u_world:new o.Uniform2f(x,l.u_world),u_image:new o.Uniform1i(x,l.u_image),u_color_ramp:new o.Uniform1i(x,l.u_color_ramp),u_opacity:new o.Uniform1f(x,l.u_opacity)}),hillshade:(x,l)=>({u_matrix:new o.UniformMatrix4f(x,l.u_matrix),u_image:new o.Uniform1i(x,l.u_image),u_latrange:new o.Uniform2f(x,l.u_latrange),u_light:new o.Uniform2f(x,l.u_light),u_shadow:new o.UniformColor(x,l.u_shadow),u_highlight:new o.UniformColor(x,l.u_highlight),u_accent:new o.UniformColor(x,l.u_accent)}),hillshadePrepare:(x,l)=>({u_matrix:new o.UniformMatrix4f(x,l.u_matrix),u_image:new o.Uniform1i(x,l.u_image),u_dimension:new o.Uniform2f(x,l.u_dimension),u_zoom:new o.Uniform1f(x,l.u_zoom),u_unpack:new o.Uniform4f(x,l.u_unpack)}),line:(x,l)=>({u_matrix:new o.UniformMatrix4f(x,l.u_matrix),u_ratio:new o.Uniform1f(x,l.u_ratio),u_device_pixel_ratio:new o.Uniform1f(x,l.u_device_pixel_ratio),u_units_to_pixels:new o.Uniform2f(x,l.u_units_to_pixels)}),lineGradient:(x,l)=>({u_matrix:new o.UniformMatrix4f(x,l.u_matrix),u_ratio:new o.Uniform1f(x,l.u_ratio),u_device_pixel_ratio:new o.Uniform1f(x,l.u_device_pixel_ratio),u_units_to_pixels:new o.Uniform2f(x,l.u_units_to_pixels),u_image:new o.Uniform1i(x,l.u_image),u_image_height:new o.Uniform1f(x,l.u_image_height)}),linePattern:(x,l)=>({u_matrix:new o.UniformMatrix4f(x,l.u_matrix),u_texsize:new o.Uniform2f(x,l.u_texsize),u_ratio:new o.Uniform1f(x,l.u_ratio),u_device_pixel_ratio:new o.Uniform1f(x,l.u_device_pixel_ratio),u_image:new o.Uniform1i(x,l.u_image),u_units_to_pixels:new o.Uniform2f(x,l.u_units_to_pixels),u_scale:new o.Uniform3f(x,l.u_scale),u_fade:new o.Uniform1f(x,l.u_fade)}),lineSDF:(x,l)=>({u_matrix:new o.UniformMatrix4f(x,l.u_matrix),u_ratio:new o.Uniform1f(x,l.u_ratio),u_device_pixel_ratio:new o.Uniform1f(x,l.u_device_pixel_ratio),u_units_to_pixels:new o.Uniform2f(x,l.u_units_to_pixels),u_patternscale_a:new o.Uniform2f(x,l.u_patternscale_a),u_patternscale_b:new o.Uniform2f(x,l.u_patternscale_b),u_sdfgamma:new o.Uniform1f(x,l.u_sdfgamma),u_image:new o.Uniform1i(x,l.u_image),u_tex_y_a:new o.Uniform1f(x,l.u_tex_y_a),u_tex_y_b:new o.Uniform1f(x,l.u_tex_y_b),u_mix:new o.Uniform1f(x,l.u_mix)}),raster:(x,l)=>({u_matrix:new o.UniformMatrix4f(x,l.u_matrix),u_tl_parent:new o.Uniform2f(x,l.u_tl_parent),u_scale_parent:new o.Uniform1f(x,l.u_scale_parent),u_buffer_scale:new o.Uniform1f(x,l.u_buffer_scale),u_fade_t:new o.Uniform1f(x,l.u_fade_t),u_opacity:new o.Uniform1f(x,l.u_opacity),u_image0:new o.Uniform1i(x,l.u_image0),u_image1:new o.Uniform1i(x,l.u_image1),u_brightness_low:new o.Uniform1f(x,l.u_brightness_low),u_brightness_high:new o.Uniform1f(x,l.u_brightness_high),u_saturation_factor:new o.Uniform1f(x,l.u_saturation_factor),u_contrast_factor:new o.Uniform1f(x,l.u_contrast_factor),u_spin_weights:new o.Uniform3f(x,l.u_spin_weights)}),symbolIcon:(x,l)=>({u_is_size_zoom_constant:new o.Uniform1i(x,l.u_is_size_zoom_constant),u_is_size_feature_constant:new o.Uniform1i(x,l.u_is_size_feature_constant),u_size_t:new o.Uniform1f(x,l.u_size_t),u_size:new o.Uniform1f(x,l.u_size),u_camera_to_center_distance:new o.Uniform1f(x,l.u_camera_to_center_distance),u_pitch:new o.Uniform1f(x,l.u_pitch),u_rotate_symbol:new o.Uniform1i(x,l.u_rotate_symbol),u_aspect_ratio:new o.Uniform1f(x,l.u_aspect_ratio),u_fade_change:new o.Uniform1f(x,l.u_fade_change),u_matrix:new o.UniformMatrix4f(x,l.u_matrix),u_label_plane_matrix:new o.UniformMatrix4f(x,l.u_label_plane_matrix),u_coord_matrix:new o.UniformMatrix4f(x,l.u_coord_matrix),u_is_text:new o.Uniform1i(x,l.u_is_text),u_pitch_with_map:new o.Uniform1i(x,l.u_pitch_with_map),u_texsize:new o.Uniform2f(x,l.u_texsize),u_texture:new o.Uniform1i(x,l.u_texture)}),symbolSDF:(x,l)=>({u_is_size_zoom_constant:new o.Uniform1i(x,l.u_is_size_zoom_constant),u_is_size_feature_constant:new o.Uniform1i(x,l.u_is_size_feature_constant),u_size_t:new o.Uniform1f(x,l.u_size_t),u_size:new o.Uniform1f(x,l.u_size),u_camera_to_center_distance:new o.Uniform1f(x,l.u_camera_to_center_distance),u_pitch:new o.Uniform1f(x,l.u_pitch),u_rotate_symbol:new o.Uniform1i(x,l.u_rotate_symbol),u_aspect_ratio:new o.Uniform1f(x,l.u_aspect_ratio),u_fade_change:new o.Uniform1f(x,l.u_fade_change),u_matrix:new o.UniformMatrix4f(x,l.u_matrix),u_label_plane_matrix:new o.UniformMatrix4f(x,l.u_label_plane_matrix),u_coord_matrix:new o.UniformMatrix4f(x,l.u_coord_matrix),u_is_text:new o.Uniform1i(x,l.u_is_text),u_pitch_with_map:new o.Uniform1i(x,l.u_pitch_with_map),u_texsize:new o.Uniform2f(x,l.u_texsize),u_texture:new o.Uniform1i(x,l.u_texture),u_gamma_scale:new o.Uniform1f(x,l.u_gamma_scale),u_device_pixel_ratio:new o.Uniform1f(x,l.u_device_pixel_ratio),u_is_halo:new o.Uniform1i(x,l.u_is_halo)}),symbolTextAndIcon:(x,l)=>({u_is_size_zoom_constant:new o.Uniform1i(x,l.u_is_size_zoom_constant),u_is_size_feature_constant:new o.Uniform1i(x,l.u_is_size_feature_constant),u_size_t:new o.Uniform1f(x,l.u_size_t),u_size:new o.Uniform1f(x,l.u_size),u_camera_to_center_distance:new o.Uniform1f(x,l.u_camera_to_center_distance),u_pitch:new o.Uniform1f(x,l.u_pitch),u_rotate_symbol:new o.Uniform1i(x,l.u_rotate_symbol),u_aspect_ratio:new o.Uniform1f(x,l.u_aspect_ratio),u_fade_change:new o.Uniform1f(x,l.u_fade_change),u_matrix:new o.UniformMatrix4f(x,l.u_matrix),u_label_plane_matrix:new o.UniformMatrix4f(x,l.u_label_plane_matrix),u_coord_matrix:new o.UniformMatrix4f(x,l.u_coord_matrix),u_is_text:new o.Uniform1i(x,l.u_is_text),u_pitch_with_map:new o.Uniform1i(x,l.u_pitch_with_map),u_texsize:new o.Uniform2f(x,l.u_texsize),u_texsize_icon:new o.Uniform2f(x,l.u_texsize_icon),u_texture:new o.Uniform1i(x,l.u_texture),u_texture_icon:new o.Uniform1i(x,l.u_texture_icon),u_gamma_scale:new o.Uniform1f(x,l.u_gamma_scale),u_device_pixel_ratio:new o.Uniform1f(x,l.u_device_pixel_ratio),u_is_halo:new o.Uniform1i(x,l.u_is_halo)}),background:(x,l)=>({u_matrix:new o.UniformMatrix4f(x,l.u_matrix),u_opacity:new o.Uniform1f(x,l.u_opacity),u_color:new o.UniformColor(x,l.u_color)}),backgroundPattern:(x,l)=>({u_matrix:new o.UniformMatrix4f(x,l.u_matrix),u_opacity:new o.Uniform1f(x,l.u_opacity),u_image:new o.Uniform1i(x,l.u_image),u_pattern_tl_a:new o.Uniform2f(x,l.u_pattern_tl_a),u_pattern_br_a:new o.Uniform2f(x,l.u_pattern_br_a),u_pattern_tl_b:new o.Uniform2f(x,l.u_pattern_tl_b),u_pattern_br_b:new o.Uniform2f(x,l.u_pattern_br_b),u_texsize:new o.Uniform2f(x,l.u_texsize),u_mix:new o.Uniform1f(x,l.u_mix),u_pattern_size_a:new o.Uniform2f(x,l.u_pattern_size_a),u_pattern_size_b:new o.Uniform2f(x,l.u_pattern_size_b),u_scale_a:new o.Uniform1f(x,l.u_scale_a),u_scale_b:new o.Uniform1f(x,l.u_scale_b),u_pixel_coord_upper:new o.Uniform2f(x,l.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(x,l.u_pixel_coord_lower),u_tile_units_to_pixels:new o.Uniform1f(x,l.u_tile_units_to_pixels)}),terrain:(x,l)=>({u_matrix:new o.UniformMatrix4f(x,l.u_matrix),u_texture:new o.Uniform1i(x,l.u_texture)}),terrainDepth:(x,l)=>({u_matrix:new o.UniformMatrix4f(x,l.u_matrix)}),terrainCoords:(x,l)=>({u_matrix:new o.UniformMatrix4f(x,l.u_matrix),u_texture:new o.Uniform1i(x,l.u_texture),u_terrain_coords_id:new o.Uniform1f(x,l.u_terrain_coords_id)})};class Fh{constructor(l,h,g){this.context=l;const b=l.gl;this.buffer=b.createBuffer(),this.dynamicDraw=Boolean(g),this.context.unbindVAO(),l.bindElementBuffer.set(this.buffer),b.bufferData(b.ELEMENT_ARRAY_BUFFER,h.arrayBuffer,this.dynamicDraw?b.DYNAMIC_DRAW:b.STATIC_DRAW),this.dynamicDraw||delete h.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(l){const h=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),h.bufferSubData(h.ELEMENT_ARRAY_BUFFER,0,l.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const $h={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Bh{constructor(l,h,g,b){this.length=h.length,this.attributes=g,this.itemSize=h.bytesPerElement,this.dynamicDraw=b,this.context=l;const P=l.gl;this.buffer=P.createBuffer(),l.bindVertexBuffer.set(this.buffer),P.bufferData(P.ARRAY_BUFFER,h.arrayBuffer,this.dynamicDraw?P.DYNAMIC_DRAW:P.STATIC_DRAW),this.dynamicDraw||delete h.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(l){if(l.length!==this.length)throw new Error(`Length of new data is ${l.length}, which doesn't match current length of ${this.length}`);const h=this.context.gl;this.bind(),h.bufferSubData(h.ARRAY_BUFFER,0,l.arrayBuffer)}enableAttributes(l,h){for(let g=0;g<this.attributes.length;g++){const b=h.attributes[this.attributes[g].name];b!==void 0&&l.enableVertexAttribArray(b)}}setVertexAttribPointers(l,h,g){for(let b=0;b<this.attributes.length;b++){const P=this.attributes[b],z=h.attributes[P.name];z!==void 0&&l.vertexAttribPointer(z,P.components,l[$h[P.type]],!1,this.itemSize,P.offset+this.itemSize*(g||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class sn{constructor(l){this.gl=l.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(l){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class Xv extends sn{getDefault(){return o.Color.transparent}set(l){const h=this.current;(l.r!==h.r||l.g!==h.g||l.b!==h.b||l.a!==h.a||this.dirty)&&(this.gl.clearColor(l.r,l.g,l.b,l.a),this.current=l,this.dirty=!1)}}class l_ extends sn{getDefault(){return 1}set(l){(l!==this.current||this.dirty)&&(this.gl.clearDepth(l),this.current=l,this.dirty=!1)}}class lc extends sn{getDefault(){return 0}set(l){(l!==this.current||this.dirty)&&(this.gl.clearStencil(l),this.current=l,this.dirty=!1)}}class uc extends sn{getDefault(){return[!0,!0,!0,!0]}set(l){const h=this.current;(l[0]!==h[0]||l[1]!==h[1]||l[2]!==h[2]||l[3]!==h[3]||this.dirty)&&(this.gl.colorMask(l[0],l[1],l[2],l[3]),this.current=l,this.dirty=!1)}}class Yv extends sn{getDefault(){return!0}set(l){(l!==this.current||this.dirty)&&(this.gl.depthMask(l),this.current=l,this.dirty=!1)}}class wo extends sn{getDefault(){return 255}set(l){(l!==this.current||this.dirty)&&(this.gl.stencilMask(l),this.current=l,this.dirty=!1)}}class Vh extends sn{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(l){const h=this.current;(l.func!==h.func||l.ref!==h.ref||l.mask!==h.mask||this.dirty)&&(this.gl.stencilFunc(l.func,l.ref,l.mask),this.current=l,this.dirty=!1)}}class Md extends sn{getDefault(){const l=this.gl;return[l.KEEP,l.KEEP,l.KEEP]}set(l){const h=this.current;(l[0]!==h[0]||l[1]!==h[1]||l[2]!==h[2]||this.dirty)&&(this.gl.stencilOp(l[0],l[1],l[2]),this.current=l,this.dirty=!1)}}class Id extends sn{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const h=this.gl;l?h.enable(h.STENCIL_TEST):h.disable(h.STENCIL_TEST),this.current=l,this.dirty=!1}}class jh extends sn{getDefault(){return[0,1]}set(l){const h=this.current;(l[0]!==h[0]||l[1]!==h[1]||this.dirty)&&(this.gl.depthRange(l[0],l[1]),this.current=l,this.dirty=!1)}}class Uh extends sn{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const h=this.gl;l?h.enable(h.DEPTH_TEST):h.disable(h.DEPTH_TEST),this.current=l,this.dirty=!1}}class Rd extends sn{getDefault(){return this.gl.LESS}set(l){(l!==this.current||this.dirty)&&(this.gl.depthFunc(l),this.current=l,this.dirty=!1)}}class Kh extends sn{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const h=this.gl;l?h.enable(h.BLEND):h.disable(h.BLEND),this.current=l,this.dirty=!1}}class Hh extends sn{getDefault(){const l=this.gl;return[l.ONE,l.ZERO]}set(l){const h=this.current;(l[0]!==h[0]||l[1]!==h[1]||this.dirty)&&(this.gl.blendFunc(l[0],l[1]),this.current=l,this.dirty=!1)}}class Od extends sn{getDefault(){return o.Color.transparent}set(l){const h=this.current;(l.r!==h.r||l.g!==h.g||l.b!==h.b||l.a!==h.a||this.dirty)&&(this.gl.blendColor(l.r,l.g,l.b,l.a),this.current=l,this.dirty=!1)}}class Qv extends sn{getDefault(){return this.gl.FUNC_ADD}set(l){(l!==this.current||this.dirty)&&(this.gl.blendEquation(l),this.current=l,this.dirty=!1)}}class Jv extends sn{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const h=this.gl;l?h.enable(h.CULL_FACE):h.disable(h.CULL_FACE),this.current=l,this.dirty=!1}}class Xl extends sn{getDefault(){return this.gl.BACK}set(l){(l!==this.current||this.dirty)&&(this.gl.cullFace(l),this.current=l,this.dirty=!1)}}class u_ extends sn{getDefault(){return this.gl.CCW}set(l){(l!==this.current||this.dirty)&&(this.gl.frontFace(l),this.current=l,this.dirty=!1)}}class c_ extends sn{getDefault(){return null}set(l){(l!==this.current||this.dirty)&&(this.gl.useProgram(l),this.current=l,this.dirty=!1)}}class d_ extends sn{getDefault(){return this.gl.TEXTURE0}set(l){(l!==this.current||this.dirty)&&(this.gl.activeTexture(l),this.current=l,this.dirty=!1)}}class f_ extends sn{getDefault(){const l=this.gl;return[0,0,l.drawingBufferWidth,l.drawingBufferHeight]}set(l){const h=this.current;(l[0]!==h[0]||l[1]!==h[1]||l[2]!==h[2]||l[3]!==h[3]||this.dirty)&&(this.gl.viewport(l[0],l[1],l[2],l[3]),this.current=l,this.dirty=!1)}}class h_ extends sn{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;const h=this.gl;h.bindFramebuffer(h.FRAMEBUFFER,l),this.current=l,this.dirty=!1}}class p_ extends sn{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;const h=this.gl;h.bindRenderbuffer(h.RENDERBUFFER,l),this.current=l,this.dirty=!1}}class Wh extends sn{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;const h=this.gl;h.bindTexture(h.TEXTURE_2D,l),this.current=l,this.dirty=!1}}class Ad extends sn{getDefault(){return null}set(l){if(l===this.current&&!this.dirty)return;const h=this.gl;h.bindBuffer(h.ARRAY_BUFFER,l),this.current=l,this.dirty=!1}}class qh extends sn{getDefault(){return null}set(l){const h=this.gl;h.bindBuffer(h.ELEMENT_ARRAY_BUFFER,l),this.current=l,this.dirty=!1}}class Gh extends sn{constructor(l){super(l),this.vao=l.extVertexArrayObject}getDefault(){return null}set(l){this.vao&&(l!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(l),this.current=l,this.dirty=!1)}}class Yl extends sn{getDefault(){return 4}set(l){if(l===this.current&&!this.dirty)return;const h=this.gl;h.pixelStorei(h.UNPACK_ALIGNMENT,l),this.current=l,this.dirty=!1}}class eg extends sn{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const h=this.gl;h.pixelStorei(h.UNPACK_PREMULTIPLY_ALPHA_WEBGL,l),this.current=l,this.dirty=!1}}class tg extends sn{getDefault(){return!1}set(l){if(l===this.current&&!this.dirty)return;const h=this.gl;h.pixelStorei(h.UNPACK_FLIP_Y_WEBGL,l),this.current=l,this.dirty=!1}}class Nd extends sn{constructor(l,h){super(l),this.context=l,this.parent=h}getDefault(){return null}}class nl extends Nd{setDirty(){this.dirty=!0}set(l){if(l===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const h=this.gl;h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,l,0),this.current=l,this.dirty=!1}}class rg extends Nd{set(l){if(l===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const h=this.gl;h.framebufferRenderbuffer(h.FRAMEBUFFER,h.DEPTH_ATTACHMENT,h.RENDERBUFFER,l),this.current=l,this.dirty=!1}}class Ql{constructor(l,h,g,b){this.context=l,this.width=h,this.height=g;const P=l.gl,z=this.framebuffer=P.createFramebuffer();if(this.colorAttachment=new nl(l,z),b&&(this.depthAttachment=new rg(l,z)),P.checkFramebufferStatus(P.FRAMEBUFFER)!==P.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const l=this.context.gl,h=this.colorAttachment.get();if(h&&l.deleteTexture(h),this.depthAttachment){const g=this.depthAttachment.get();g&&l.deleteRenderbuffer(g)}l.deleteFramebuffer(this.framebuffer)}}class Mn{constructor(l,h,g){this.blendFunction=l,this.blendColor=h,this.mask=g}}Mn.Replace=[1,0],Mn.disabled=new Mn(Mn.Replace,o.Color.transparent,[!1,!1,!1,!1]),Mn.unblended=new Mn(Mn.Replace,o.Color.transparent,[!0,!0,!0,!0]),Mn.alphaBlended=new Mn([1,771],o.Color.transparent,[!0,!0,!0,!0]);class ng{constructor(l){this.gl=l,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new Xv(this),this.clearDepth=new l_(this),this.clearStencil=new lc(this),this.colorMask=new uc(this),this.depthMask=new Yv(this),this.stencilMask=new wo(this),this.stencilFunc=new Vh(this),this.stencilOp=new Md(this),this.stencilTest=new Id(this),this.depthRange=new jh(this),this.depthTest=new Uh(this),this.depthFunc=new Rd(this),this.blend=new Kh(this),this.blendFunc=new Hh(this),this.blendColor=new Od(this),this.blendEquation=new Qv(this),this.cullFace=new Jv(this),this.cullFaceSide=new Xl(this),this.frontFace=new u_(this),this.program=new c_(this),this.activeTexture=new d_(this),this.viewport=new f_(this),this.bindFramebuffer=new h_(this),this.bindRenderbuffer=new p_(this),this.bindTexture=new Wh(this),this.bindVertexBuffer=new Ad(this),this.bindElementBuffer=new qh(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new Gh(this),this.pixelStoreUnpack=new Yl(this),this.pixelStoreUnpackPremultiplyAlpha=new eg(this),this.pixelStoreUnpackFlipY=new tg(this),this.extTextureFilterAnisotropic=l.getExtension("EXT_texture_filter_anisotropic")||l.getExtension("MOZ_EXT_texture_filter_anisotropic")||l.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=l.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=l.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(l.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=l.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=l.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=l.getParameter(l.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(l,h){return new Fh(this,l,h)}createVertexBuffer(l,h,g){return new Bh(this,l,h,g)}createRenderbuffer(l,h,g){const b=this.gl,P=b.createRenderbuffer();return this.bindRenderbuffer.set(P),b.renderbufferStorage(b.RENDERBUFFER,l,h,g),this.bindRenderbuffer.set(null),P}createFramebuffer(l,h,g){return new Ql(this,l,h,g)}clear({color:l,depth:h}){const g=this.gl;let b=0;l&&(b|=g.COLOR_BUFFER_BIT,this.clearColor.set(l),this.colorMask.set([!0,!0,!0,!0])),h!==void 0&&(b|=g.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(h),this.depthMask.set(!0)),g.clear(b)}setCullFace(l){l.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(l.mode),this.frontFace.set(l.frontFace))}setDepthMode(l){l.func!==this.gl.ALWAYS||l.mask?(this.depthTest.set(!0),this.depthFunc.set(l.func),this.depthMask.set(l.mask),this.depthRange.set(l.range)):this.depthTest.set(!1)}setStencilMode(l){l.test.func!==this.gl.ALWAYS||l.mask?(this.stencilTest.set(!0),this.stencilMask.set(l.mask),this.stencilOp.set([l.fail,l.depthFail,l.pass]),this.stencilFunc.set({func:l.test.func,ref:l.ref,mask:l.test.mask})):this.stencilTest.set(!1)}setColorMode(l){y(l.blendFunction,Mn.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(l.blendFunction),this.blendColor.set(l.blendColor)),this.colorMask.set(l.mask)}unbindVAO(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)}}class Xr{constructor(l,h,g){this.func=l,this.mask=h,this.range=g}}Xr.ReadOnly=!1,Xr.ReadWrite=!0,Xr.disabled=new Xr(519,Xr.ReadOnly,[0,1]);const ln=7680;class En{constructor(l,h,g,b,P,z){this.test=l,this.ref=h,this.mask=g,this.fail=b,this.depthFail=P,this.pass=z}}En.disabled=new En({func:519,mask:0},0,0,ln,ln,ln);class zn{constructor(l,h,g){this.enable=l,this.mode=h,this.frontFace=g}}let cc;function Jl(x,l,h,g,b,P,z){const $=x.context,V=$.gl,W=x.useProgram("collisionBox"),ee=[];let ie=0,fe=0;for(let Pe=0;Pe<g.length;Pe++){const at=g[Pe],rt=l.getTile(at),gt=rt.getBucket(h);if(!gt)continue;let yt=at.posMatrix;b[0]===0&&b[1]===0||(yt=x.translatePosMatrix(at.posMatrix,rt,b,P));const zt=z?gt.textCollisionBox:gt.iconCollisionBox,vt=gt.collisionCircleArray;if(vt.length>0){const nr=o.create(),Gt=yt;o.mul(nr,gt.placementInvProjMatrix,x.transform.glCoordMatrix),o.mul(nr,nr,gt.placementViewportMatrix),ee.push({circleArray:vt,circleOffset:fe,transform:Gt,invTransform:nr,coord:at}),ie+=vt.length/4,fe=ie}zt&&W.draw($,V.LINES,Xr.disabled,En.disabled,x.colorModeForRenderPass(),zn.disabled,Qa(yt,x.transform,rt),x.style.terrain&&x.style.terrain.getTerrainData(at),h.id,zt.layoutVertexBuffer,zt.indexBuffer,zt.segments,null,x.transform.zoom,null,null,zt.collisionVertexBuffer)}if(!z||!ee.length)return;const Se=x.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 rt=4*at,gt=Pe.circleArray[rt+0],yt=Pe.circleArray[rt+1],zt=Pe.circleArray[rt+2],vt=Pe.circleArray[rt+3];_e.emplace(we++,gt,yt,zt,vt,0),_e.emplace(we++,gt,yt,zt,vt,1),_e.emplace(we++,gt,yt,zt,vt,2),_e.emplace(we++,gt,yt,zt,vt,3)}(!cc||cc.length<2*ie)&&(cc=function(Pe){const at=2*Pe,rt=new o.QuadTriangleArray;rt.resize(at),rt._trim();for(let gt=0;gt<at;gt++){const yt=6*gt;rt.uint16[yt+0]=4*gt+0,rt.uint16[yt+1]=4*gt+1,rt.uint16[yt+2]=4*gt+2,rt.uint16[yt+3]=4*gt+2,rt.uint16[yt+4]=4*gt+3,rt.uint16[yt+5]=4*gt+0}return rt}(ie));const $e=$.createIndexBuffer(cc,!0),Ue=$.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=x.transform).cameraToCenterDistance,u_viewport_size:[et.width,et.height]};Se.draw($,V.TRIANGLES,Xr.disabled,En.disabled,x.colorModeForRenderPass(),zn.disabled,at,x.style.terrain&&x.style.terrain.getTerrainData(Pe.coord),h.id,Ue,$e,o.SegmentVector.simpleSegment(0,2*Pe.circleOffset,Pe.circleArray.length,Pe.circleArray.length/2),null,x.transform.zoom,null,null,null)}var et;Ue.destroy(),$e.destroy()}zn.disabled=new zn(!1,1029,2305),zn.backCCW=new zn(!0,1029,2305);const m_=o.identity(new Float32Array(16));function v_(x,l,h,g,b,P){const{horizontalAlign:z,verticalAlign:$}=o.getAnchorAlignment(x),V=-(z-.5)*l,W=-($-.5)*h,ee=o.evaluateVariableOffset(x,g);return new o.pointGeometry((V/b+ee[0])*P,(W/b+ee[1])*P)}function ig(x,l,h,g,b,P,z,$,V,W,ee){const ie=x.text.placedSymbolArray,fe=x.text.dynamicLayoutVertexArray,Se=x.icon.dynamicLayoutVertexArray,_e={};fe.clear();for(let we=0;we<ie.length;we++){const $e=ie.get(we),Ue=x.allowVerticalPlacement&&!$e.placedOrientation,et=$e.hidden||!$e.crossTileID||Ue?null:g[$e.crossTileID];if(et){const Pe=new o.pointGeometry($e.anchorX,$e.anchorY),at=Vt(Pe,h?z:P,ee),rt=Ut(b.cameraToCenterDistance,at.signedDistanceFromCamera);let gt=o.evaluateSizeForFeature(x.textSizeData,V,$e)*rt/o.ONE_EM;h&&(gt*=x.tilePixelRatio/$);const{width:yt,height:zt,anchor:vt,textOffset:nr,textBoxScale:Gt}=et,sr=v_(vt,yt,zt,nr,Gt,gt),Dr=h?Vt(Pe.add(sr),P,ee).point:at.point.add(l?sr.rotate(-b.angle):sr),Vr=x.allowVerticalPlacement&&$e.placedOrientation===o.WritingMode.vertical?Math.PI/2:0;for(let _r=0;_r<$e.numGlyphs;_r++)o.addDynamicAttributes(fe,Dr,Vr);W&&$e.associatedIconIndex>=0&&(_e[$e.associatedIconIndex]={shiftedAnchor:Dr,angle:Vr})}else Lt($e.numGlyphs,fe)}if(W){Se.clear();const we=x.icon.placedSymbolArray;for(let $e=0;$e<we.length;$e++){const Ue=we.get($e);if(Ue.hidden)Lt(Ue.numGlyphs,Se);else{const et=_e[$e];if(et)for(let Pe=0;Pe<Ue.numGlyphs;Pe++)o.addDynamicAttributes(Se,et.shiftedAnchor,et.angle);else Lt(Ue.numGlyphs,Se)}}x.icon.dynamicLayoutVertexBuffer.updateData(Se)}x.text.dynamicLayoutVertexBuffer.updateData(fe)}function g_(x,l,h){return h.iconsInText&&l?"symbolTextAndIcon":x?"symbolSDF":"symbolIcon"}function zd(x,l,h,g,b,P,z,$,V,W,ee,ie){const fe=x.context,Se=fe.gl,_e=x.transform,we=$==="map",$e=V==="map",Ue=$!=="viewport"&&h.layout.get("symbol-placement")!=="point",et=we&&!$e&&!Ue,Pe=!h.layout.get("symbol-sort-key").isConstant();let at=!1;const rt=x.depthModeForSublayer(0,Xr.ReadOnly),gt=h.layout.get("text-variable-anchor"),yt=[];for(const zt of g){const vt=l.getTile(zt),nr=vt.getBucket(h);if(!nr)continue;const Gt=b?nr.text:nr.icon;if(!Gt||!Gt.segments.get().length)continue;const sr=Gt.programConfigurations.get(h.id),Dr=b||nr.sdfIcons,Vr=b?nr.textSizeData:nr.iconSizeData,_r=$e||_e.pitch!==0,hn=x.useProgram(g_(Dr,b,nr),sr),pn=o.evaluateSizeForZoom(Vr,_e.zoom),Qr=x.style.terrain&&x.style.terrain.getTerrainData(zt);let en,gn,Ei,Ta,na=[0,0],Pa=null;if(b){if(gn=vt.glyphAtlasTexture,Ei=Se.LINEAR,en=vt.glyphAtlasTexture.size,nr.iconsInText){na=vt.imageAtlasTexture.size,Pa=vt.imageAtlasTexture;const Ko=Vr.kind==="composite"||Vr.kind==="camera";Ta=_r||x.options.rotating||x.options.zooming||Ko?Se.LINEAR:Se.NEAREST}}else{const Ko=h.layout.get("icon-size").constantOr(0)!==1||nr.iconsNeedLinear;gn=vt.imageAtlasTexture,Ei=Dr||x.options.rotating||x.options.zooming||Ko||_r?Se.LINEAR:Se.NEAREST,en=vt.imageAtlasTexture.size}const Os=Nt(vt,1,x.transform.zoom),Uo=Xt(zt.posMatrix,$e,we,x.transform,Os),co=cr(zt.posMatrix,$e,we,x.transform,Os),ns=gt&&nr.hasTextData(),Ud=h.layout.get("icon-text-fit")!=="none"&&ns&&nr.hasIconData();if(Ue){const Ko=x.style.terrain?(up,ou)=>x.style.terrain.getElevation(zt,up,ou):null,sl=h.layout.get("text-rotation-alignment")==="map";xr(nr,zt.posMatrix,x,b,Uo,co,$e,W,sl,Ko)}const yi=x.translatePosMatrix(zt.posMatrix,vt,P,z),Hr=Ue||b&&gt||Ud?m_:Uo,fn=x.translatePosMatrix(co,vt,P,z,!0),ki=Dr&&h.paint.get(b?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let Ti;Ti=Dr?nr.iconsInText?Zv(Vr.kind,pn,et,$e,x,yi,Hr,fn,en,na):Pd(Vr.kind,pn,et,$e,x,yi,Hr,fn,b,en,!0):Dh(Vr.kind,pn,et,$e,x,yi,Hr,fn,b,en);const Ln={program:hn,buffers:Gt,uniformValues:Ti,atlasTexture:gn,atlasTextureIcon:Pa,atlasInterpolation:Ei,atlasInterpolationIcon:Ta,isSDF:Dr,hasHalo:ki};if(Pe&&nr.canOverlap){at=!0;const Ko=Gt.segments.get();for(const sl of Ko)yt.push({segments:new o.SegmentVector([sl]),sortKey:sl.sortKey,state:Ln,terrainData:Qr})}else yt.push({segments:Gt.segments,sortKey:0,state:Ln,terrainData:Qr})}at&&yt.sort((zt,vt)=>zt.sortKey-vt.sortKey);for(const zt of yt){const vt=zt.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 nr=vt.uniformValues;vt.hasHalo&&(nr.u_is_halo=1,dc(vt.buffers,zt.segments,h,x,vt.program,rt,ee,ie,nr,zt.terrainData)),nr.u_is_halo=0}dc(vt.buffers,zt.segments,h,x,vt.program,rt,ee,ie,vt.uniformValues,zt.terrainData)}}function dc(x,l,h,g,b,P,z,$,V,W){const ee=g.context;b.draw(ee,ee.gl.TRIANGLES,P,z,$,zn.disabled,V,W,h.id,x.layoutVertexBuffer,x.indexBuffer,l,h.paint,g.transform.zoom,x.programConfigurations.get(h.id),x.dynamicLayoutVertexBuffer,x.opacityVertexBuffer)}function fc(x,l,h,g,b,P,z){const $=x.context.gl,V=h.paint.get("fill-pattern"),W=V&&V.constantOr(1),ee=h.getCrossfadeParameters();let ie,fe,Se,_e,we;z?(fe=W&&!h.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",ie=$.LINES):(fe=W?"fillPattern":"fill",ie=$.TRIANGLES);for(const $e of g){const Ue=l.getTile($e);if(W&&!Ue.patternsLoaded())continue;const et=Ue.getBucket(h);if(!et)continue;const Pe=et.programConfigurations.get(h.id),at=x.useProgram(fe,Pe),rt=x.style.terrain&&x.style.terrain.getTerrainData($e);W&&(x.context.activeTexture.set($.TEXTURE0),Ue.imageAtlasTexture.bind($.LINEAR,$.CLAMP_TO_EDGE),Pe.updatePaintBuffers(ee));const gt=V.constantOr(null);if(gt&&Ue.imageAtlas){const vt=Ue.imageAtlas,nr=vt.patternPositions[gt.to.toString()],Gt=vt.patternPositions[gt.from.toString()];nr&&Gt&&Pe.setConstantPatternPositions(nr,Gt)}const yt=rt?$e:null,zt=x.translatePosMatrix(yt?yt.posMatrix:$e.posMatrix,Ue,h.paint.get("fill-translate"),h.paint.get("fill-translate-anchor"));if(z){_e=et.indexBuffer2,we=et.segments2;const vt=[$.drawingBufferWidth,$.drawingBufferHeight];Se=fe==="fillOutlinePattern"&&W?Zl(zt,x,ee,Ue,vt):bo(zt,vt)}else _e=et.indexBuffer,we=et.segments,Se=W?jn(zt,x,ee,Ue):Sn(zt);at.draw(x.context,ie,b,x.stencilModeForClipping($e),P,zn.disabled,Se,rt,h.id,et.layoutVertexBuffer,_e,we,h.paint,x.transform.zoom,Pe)}}function hc(x,l,h,g,b,P,z){const $=x.context,V=$.gl,W=h.paint.get("fill-extrusion-pattern"),ee=W.constantOr(1),ie=h.getCrossfadeParameters(),fe=h.paint.get("fill-extrusion-opacity");for(const Se of g){const _e=l.getTile(Se),we=_e.getBucket(h);if(!we)continue;const $e=x.style.terrain&&x.style.terrain.getTerrainData(Se),Ue=we.programConfigurations.get(h.id),et=x.useProgram(ee?"fillExtrusionPattern":"fillExtrusion",Ue);ee&&(x.context.activeTexture.set(V.TEXTURE0),_e.imageAtlasTexture.bind(V.LINEAR,V.CLAMP_TO_EDGE),Ue.updatePaintBuffers(ie));const Pe=W.constantOr(null);if(Pe&&_e.imageAtlas){const yt=_e.imageAtlas,zt=yt.patternPositions[Pe.to.toString()],vt=yt.patternPositions[Pe.from.toString()];zt&&vt&&Ue.setConstantPatternPositions(zt,vt)}const at=x.translatePosMatrix(Se.posMatrix,_e,h.paint.get("fill-extrusion-translate"),h.paint.get("fill-extrusion-translate-anchor")),rt=h.paint.get("fill-extrusion-vertical-gradient"),gt=ee?wn(at,x,rt,fe,Se,ie,_e):Yr(at,x,rt,fe);et.draw($,$.gl.TRIANGLES,b,P,z,zn.backCCW,gt,$e,h.id,we.layoutVertexBuffer,we.indexBuffer,we.segments,h.paint,x.transform.zoom,Ue,x.style.terrain&&we.centroidVertexBuffer)}}function Zh(x,l,h,g,b,P,z){const $=x.context,V=$.gl,W=h.fbo;if(!W)return;const ee=x.useProgram("hillshade"),ie=x.style.terrain&&x.style.terrain.getTerrainData(l);$.activeTexture.set(V.TEXTURE0),V.bindTexture(V.TEXTURE_2D,W.colorAttachment.get()),ee.draw($,V.TRIANGLES,b,P,z,zn.disabled,((fe,Se,_e,we)=>{const $e=_e.paint.get("hillshade-shadow-color"),Ue=_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:Di(0,Se.tileID),u_light:[_e.paint.get("hillshade-exaggeration"),Pe],u_shadow:$e,u_highlight:Ue,u_accent:et}})(x,h,g,ie?l:null),ie,g.id,x.rasterBoundsBuffer,x.quadTriangleIndexBuffer,x.rasterBoundsSegments)}function og(x,l,h,g,b,P){const z=x.context,$=z.gl,V=l.dem;if(V&&V.data){const W=V.dim,ee=V.stride,ie=V.getPixels();if(z.activeTexture.set($.TEXTURE1),z.pixelStoreUnpackPremultiplyAlpha.set(!1),l.demTexture=l.demTexture||x.getTileTexture(ee),l.demTexture){const Se=l.demTexture;Se.update(ie,{premultiply:!1}),Se.bind($.NEAREST,$.CLAMP_TO_EDGE)}else l.demTexture=new R(z,ie,$.RGBA,{premultiply:!1}),l.demTexture.bind($.NEAREST,$.CLAMP_TO_EDGE);z.activeTexture.set($.TEXTURE0);let fe=l.fbo;if(!fe){const Se=new R(z,{width:W,height:W,data:null},$.RGBA);Se.bind($.LINEAR,$.CLAMP_TO_EDGE),fe=l.fbo=z.createFramebuffer(W,W,!0),fe.colorAttachment.set(Se.texture)}z.bindFramebuffer.set(fe.framebuffer),z.viewport.set([0,0,W,W]),x.useProgram("hillshadePrepare").draw(z,$.TRIANGLES,g,b,P,zn.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()}})(l.tileID,V),null,h.id,x.rasterBoundsBuffer,x.quadTriangleIndexBuffer,x.rasterBoundsSegments),l.needsHillshadePrepare=!1}}function Dd(x,l,h,g,b,P){const z=g.paint.get("raster-fade-duration");if(!P&&z>0){const $=o.exported.now(),V=($-x.timeAdded)/z,W=l?($-l.timeAdded)/z:-1,ee=h.getSource(),ie=b.coveringZoomLevel({tileSize:ee.tileSize,roundZoom:ee.roundZoom}),fe=!l||Math.abs(l.tileID.overscaledZ-ie)>Math.abs(x.tileID.overscaledZ-ie),Se=fe&&x.refreshedUponExpiration?1:o.clamp(fe?V:1-W,0,1);return x.refreshedUponExpiration&&V>=1&&(x.refreshedUponExpiration=!1),l?{opacity:1,mix:1-Se}:{opacity:Se,mix:0}}return{opacity:1,mix:0}}const Ld=new o.Color(1,0,0,1),ra=new o.Color(0,1,0,1),ag=new o.Color(0,0,1,1),Xh=new o.Color(1,0,1,1),sg=new o.Color(0,1,1,1);function il(x,l,h,g){eu(x,0,l+h/2,x.transform.width,h,g)}function pc(x,l,h,g){eu(x,l-h/2,0,h,x.transform.height,g)}function eu(x,l,h,g,b,P){const z=x.context,$=z.gl;$.enable($.SCISSOR_TEST),$.scissor(l*x.pixelRatio,h*x.pixelRatio,g*x.pixelRatio,b*x.pixelRatio),z.clear({color:P}),$.disable($.SCISSOR_TEST)}function y_(x,l,h){const g=x.context,b=g.gl,P=h.posMatrix,z=x.useProgram("debug"),$=Xr.disabled,V=En.disabled,W=x.colorModeForRenderPass(),ee="$debug",ie=x.style.terrain&&x.style.terrain.getTerrainData(h);g.activeTexture.set(b.TEXTURE0),x.emptyTexture.bind(b.LINEAR,b.CLAMP_TO_EDGE);const fe=l.getTileByID(h.key).latestRawTileData,Se=Math.floor((fe&&fe.byteLength||0)/1024),_e=l.getTile(h).tileSize,we=512/Math.min(_e,512)*(h.overscaledZ/x.transform.zoom)*.5;let $e=h.canonical.toString();h.overscaledZ!==h.canonical.z&&($e+=` => ${h.overscaledZ}`),function(Ue,et){Ue.initDebugOverlayCanvas();const Pe=Ue.debugOverlayCanvas,at=Ue.context.gl,rt=Ue.debugOverlayCanvas.getContext("2d");rt.clearRect(0,0,Pe.width,Pe.height),rt.shadowColor="white",rt.shadowBlur=2,rt.lineWidth=1.5,rt.strokeStyle="white",rt.textBaseline="top",rt.font="bold 36px Open Sans, sans-serif",rt.fillText(et,5,5),rt.strokeText(et,5,5),Ue.debugOverlayTexture.update(Pe),Ue.debugOverlayTexture.bind(at.LINEAR,at.CLAMP_TO_EDGE)}(x,`${$e} ${Se}kB`),z.draw(g,b.TRIANGLES,$,V,Mn.alphaBlended,zn.disabled,Fr(P,o.Color.transparent,we),null,ee,x.debugBuffer,x.quadTriangleIndexBuffer,x.debugSegments),z.draw(g,b.LINE_STRIP,$,V,W,zn.disabled,Fr(P,o.Color.red),ie,ee,x.debugBuffer,x.tileBorderIndexBuffer,x.debugSegments)}function Fd(x,l,h){const g=x.context,b=g.gl,P=x.colorModeForRenderPass(),z=new Xr(b.LEQUAL,Xr.ReadWrite,x.depthRangeFor3D),$=x.useProgram("terrain"),V=l.getTerrainMesh(),W=l.getTerrainData(h.tileID);g.bindFramebuffer.set(null),g.viewport.set([0,0,x.width,x.height]),g.activeTexture.set(b.TEXTURE0),b.bindTexture(b.TEXTURE_2D,l.getRTTFramebuffer().colorAttachment.get());const ee=x.transform.calculatePosMatrix(h.tileID.toUnwrapped());$.draw(g,b.TRIANGLES,z,En.disabled,P,zn.backCCW,{u_matrix:ee,u_texture:0},W,"terrain",V.vertexBuffer,V.indexBuffer,V.segments)}function lg(x,l,h,g){const b=x.context,P=h.tileSize*l.qualityFactor;h.textures[g]||(h.textures[g]=x.getTileTexture(P)||new R(b,{width:P,height:P,data:null},b.gl.RGBA),h.textures[g].bind(b.gl.LINEAR,b.gl.CLAMP_TO_EDGE),g===0&&l.sourceCache.renderHistory.unshift(h.tileID.key));const z=l.getRTTFramebuffer();z.colorAttachment.set(h.textures[g].texture),b.bindFramebuffer.set(z.framebuffer),b.viewport.set([0,0,P,P])}class ug{constructor(l){this._coordsDescendingInv={},this._coordsDescendingInvStr={},this.painter=l,this._renderToTexture={background:!0,fill:!0,line:!0,raster:!0},this._coordsDescendingInv={},this._coordsDescendingInvStr={},this._stacks=[],this._prevType=null,this._rerender={},this._renderableTiles=l.style.terrain.sourceCache.getRenderableTiles(),this._init()}_init(){const l=this.painter.style,h=l.terrain;for(const g in l.sourceCaches){this._coordsDescendingInv[g]={};const b=l.sourceCaches[g].getVisibleCoordinates();for(const P of b){const z=h.sourceCache.getTerrainCoords(P);for(const $ in z)this._coordsDescendingInv[g][$]||(this._coordsDescendingInv[g][$]=[]),this._coordsDescendingInv[g][$].push(z[$])}}for(const g of l._order){const b=l._layers[g],P=b.source;if(this._renderToTexture[b.type]&&!this._coordsDescendingInvStr[P]){this._coordsDescendingInvStr[P]={};for(const z in this._coordsDescendingInv[P])this._coordsDescendingInvStr[P][z]=this._coordsDescendingInv[P][z].map($=>$.key).sort().join()}}return this._renderableTiles.forEach(g=>{for(const b in this._coordsDescendingInvStr){const P=this._coordsDescendingInvStr[b][g.tileID.key];P&&P!==g.textureCoords[b]&&g.clearTextures(this.painter),h.needsRerender(b,g.tileID)&&g.clearTextures(this.painter)}this._rerender[g.tileID.key]=!g.textures.length}),h.clearRerenderCache(),h.sourceCache.removeOutdated(this.painter),this}renderLayer(l){const h=l.type,g=this.painter,b=g.style._order,P=g.currentLayer,z=P+1===b.length;if(this._renderToTexture[h]&&(this._prevType&&this._renderToTexture[this._prevType]||this._stacks.push([]),this._prevType=h,this._stacks[this._stacks.length-1].push(b[P]),!z))return!0;if(this._renderToTexture[this._prevType]||h==="hillshade"||this._renderToTexture[h]&&z){this._prevType=h;const $=this._stacks.length-1,V=this._stacks[$]||[];for(const W of this._renderableTiles){if(lg(g,g.style.terrain,W,$),this._rerender[W.tileID.key]){g.context.clear({color:o.Color.transparent});for(let ee=0;ee<V.length;ee++){const ie=g.style._layers[V[ee]],fe=ie.source?this._coordsDescendingInv[ie.source][W.tileID.key]:[W.tileID];g._renderTileClippingMasks(ie,fe),g.renderLayer(g,g.style.sourceCaches[ie.source],ie,fe),ie.source&&(W.textureCoords[ie.source]=this._coordsDescendingInvStr[ie.source][W.tileID.key])}}Fd(g,g.style.terrain,W)}if(h==="hillshade"){this._stacks.push([b[P]]);for(const W of this._renderableTiles){const ee=this._coordsDescendingInv[l.source][W.tileID.key];lg(g,g.style.terrain,W,this._stacks.length-1),g.context.clear({color:o.Color.transparent}),g._renderTileClippingMasks(l,ee),g.renderLayer(g,g.style.sourceCaches[l.source],l,ee),Fd(g,g.style.terrain,W)}return!0}return this._renderToTexture[h]}return!1}}const mc={symbol:function(x,l,h,g,b){if(x.renderPass!=="translucent")return;const P=En.disabled,z=x.colorModeForRenderPass();h.layout.get("text-variable-anchor")&&function($,V,W,ee,ie,fe,Se){const _e=V.transform,we=ie==="map",$e=fe==="map";for(const Ue of $){const et=ee.getTile(Ue),Pe=et.getBucket(W);if(!Pe||!Pe.text||!Pe.text.segments.get().length)continue;const at=o.evaluateSizeForZoom(Pe.textSizeData,_e.zoom),rt=Nt(et,1,V.transform.zoom),gt=Xt(Ue.posMatrix,$e,we,V.transform,rt),yt=W.layout.get("icon-text-fit")!=="none"&&Pe.hasIconData();if(at){const zt=Math.pow(2,_e.zoom-et.tileID.overscaledZ);ig(Pe,we,$e,Se,_e,gt,Ue.posMatrix,zt,at,yt,V.style.terrain?(vt,nr)=>V.style.terrain.getElevation(Ue,vt,nr):null)}}}(g,x,h,l,h.layout.get("text-rotation-alignment"),h.layout.get("text-pitch-alignment"),b),h.paint.get("icon-opacity").constantOr(1)!==0&&zd(x,l,h,g,!1,h.paint.get("icon-translate"),h.paint.get("icon-translate-anchor"),h.layout.get("icon-rotation-alignment"),h.layout.get("icon-pitch-alignment"),h.layout.get("icon-keep-upright"),P,z),h.paint.get("text-opacity").constantOr(1)!==0&&zd(x,l,h,g,!0,h.paint.get("text-translate"),h.paint.get("text-translate-anchor"),h.layout.get("text-rotation-alignment"),h.layout.get("text-pitch-alignment"),h.layout.get("text-keep-upright"),P,z),l.map.showCollisionBoxes&&(Jl(x,l,h,g,h.paint.get("text-translate"),h.paint.get("text-translate-anchor"),!0),Jl(x,l,h,g,h.paint.get("icon-translate"),h.paint.get("icon-translate-anchor"),!1))},circle:function(x,l,h,g){if(x.renderPass!=="translucent")return;const b=h.paint.get("circle-opacity"),P=h.paint.get("circle-stroke-width"),z=h.paint.get("circle-stroke-opacity"),$=!h.layout.get("circle-sort-key").isConstant();if(b.constantOr(1)===0&&(P.constantOr(1)===0||z.constantOr(1)===0))return;const V=x.context,W=V.gl,ee=x.depthModeForSublayer(0,Xr.ReadOnly),ie=En.disabled,fe=x.colorModeForRenderPass(),Se=[];for(let _e=0;_e<g.length;_e++){const we=g[_e],$e=l.getTile(we),Ue=$e.getBucket(h);if(!Ue)continue;const et=Ue.programConfigurations.get(h.id),Pe=x.useProgram("circle",et),at=Ue.layoutVertexBuffer,rt=Ue.indexBuffer,gt=x.style.terrain&&x.style.terrain.getTerrainData(we),yt={programConfiguration:et,program:Pe,layoutVertexBuffer:at,indexBuffer:rt,uniformValues:Td(x,we,$e,h),terrainData:gt};if($){const zt=Ue.segments.get();for(const vt of zt)Se.push({segments:new o.SegmentVector([vt]),sortKey:vt.sortKey,state:yt})}else Se.push({segments:Ue.segments,sortKey:0,state:yt})}$&&Se.sort((_e,we)=>_e.sortKey-we.sortKey);for(const _e of Se){const{programConfiguration:we,program:$e,layoutVertexBuffer:Ue,indexBuffer:et,uniformValues:Pe,terrainData:at}=_e.state;$e.draw(V,W.TRIANGLES,ee,ie,fe,zn.disabled,Pe,at,h.id,Ue,et,_e.segments,h.paint,x.transform.zoom,we)}},heatmap:function(x,l,h,g){if(h.paint.get("heatmap-opacity")!==0)if(x.renderPass==="offscreen"){const b=x.context,P=b.gl,z=En.disabled,$=new Mn([P.ONE,P.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,Ue){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),Ue.colorAttachment.set($e)}(V,W,Se,fe)}})(b,x,h),b.clear({color:o.Color.transparent});for(let V=0;V<g.length;V++){const W=g[V];if(l.hasRenderableParent(W))continue;const ee=l.getTile(W),ie=ee.getBucket(h);if(!ie)continue;const fe=ie.programConfigurations.get(h.id),Se=x.useProgram("heatmap",fe),{zoom:_e}=x.transform;Se.draw(b,P.TRIANGLES,Xr.disabled,z,$,zn.disabled,Nn(W.posMatrix,ee,_e,h.paint.get("heatmap-intensity")),null,h.id,ie.layoutVertexBuffer,ie.indexBuffer,ie.segments,h.paint,x.transform.zoom,fe)}b.viewport.set([0,0,x.width,x.height])}else x.renderPass==="translucent"&&(x.context.setColorMode(x.colorModeForRenderPass()),function(b,P){const z=b.context,$=z.gl,V=P.heatmapFbo;if(!V)return;z.activeTexture.set($.TEXTURE0),$.bindTexture($.TEXTURE_2D,V.colorAttachment.get()),z.activeTexture.set($.TEXTURE1);let W=P.colorRampTexture;W||(W=P.colorRampTexture=new R(z,P.colorRamp,$.RGBA)),W.bind($.LINEAR,$.CLAMP_TO_EDGE),b.useProgram("heatmapTexture").draw(z,$.TRIANGLES,Xr.disabled,En.disabled,b.colorModeForRenderPass(),zn.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")}})(b,P),null,P.id,b.viewportBuffer,b.quadTriangleIndexBuffer,b.viewportSegments,P.paint,b.transform.zoom)}(x,h))},line:function(x,l,h,g){if(x.renderPass!=="translucent")return;const b=h.paint.get("line-opacity"),P=h.paint.get("line-width");if(b.constantOr(1)===0||P.constantOr(1)===0)return;const z=x.depthModeForSublayer(0,Xr.ReadOnly),$=x.colorModeForRenderPass(),V=h.paint.get("line-dasharray"),W=h.paint.get("line-pattern"),ee=W.constantOr(1),ie=h.paint.get("line-gradient"),fe=h.getCrossfadeParameters(),Se=ee?"linePattern":V?"lineSDF":ie?"lineGradient":"line",_e=x.context,we=_e.gl;let $e=!0;for(const Ue of g){const et=l.getTile(Ue);if(ee&&!et.patternsLoaded())continue;const Pe=et.getBucket(h);if(!Pe)continue;const at=Pe.programConfigurations.get(h.id),rt=x.context.program.get(),gt=x.useProgram(Se,at),yt=$e||gt.program!==rt,zt=x.style.terrain&&x.style.terrain.getTerrainData(Ue),vt=W.constantOr(null);if(vt&&et.imageAtlas){const sr=et.imageAtlas,Dr=sr.patternPositions[vt.to.toString()],Vr=sr.patternPositions[vt.from.toString()];Dr&&Vr&&at.setConstantPatternPositions(Dr,Vr)}const nr=zt?Ue:null,Gt=ee?rl(x,et,h,fe,nr):V?Ja(x,et,h,V,fe,nr):ie?Vo(x,et,h,Pe.lineClipsArray.length,nr):Es(x,et,h,nr);if(ee)_e.activeTexture.set(we.TEXTURE0),et.imageAtlasTexture.bind(we.LINEAR,we.CLAMP_TO_EDGE),at.updatePaintBuffers(fe);else if(V&&(yt||x.lineAtlas.dirty))_e.activeTexture.set(we.TEXTURE0),x.lineAtlas.bind(_e);else if(ie){const sr=Pe.gradients[h.id];let Dr=sr.texture;if(h.gradientVersion!==sr.version){let Vr=256;if(h.stepInterpolant){const _r=l.getSource().maxzoom,hn=Ue.canonical.z===_r?Math.ceil(1<<x.transform.maxZoom-Ue.canonical.z):1;Vr=o.clamp(o.nextPowerOfTwo(Pe.maxLineLength/o.EXTENT*1024*hn),256,_e.maxTextureSize)}sr.gradient=o.renderColorRamp({expression:h.gradientExpression(),evaluationKey:"lineProgress",resolution:Vr,image:sr.gradient||void 0,clips:Pe.lineClipsArray}),sr.texture?sr.texture.update(sr.gradient):sr.texture=new R(_e,sr.gradient,we.RGBA),sr.version=h.gradientVersion,Dr=sr.texture}_e.activeTexture.set(we.TEXTURE0),Dr.bind(h.stepInterpolant?we.NEAREST:we.LINEAR,we.CLAMP_TO_EDGE)}gt.draw(_e,we.TRIANGLES,z,x.stencilModeForClipping(Ue),$,zn.disabled,Gt,zt,h.id,Pe.layoutVertexBuffer,Pe.indexBuffer,Pe.segments,h.paint,x.transform.zoom,at,Pe.layoutVertexBuffer2),$e=!1}},fill:function(x,l,h,g){const b=h.paint.get("fill-color"),P=h.paint.get("fill-opacity");if(P.constantOr(1)===0)return;const z=x.colorModeForRenderPass(),$=h.paint.get("fill-pattern"),V=x.opaquePassEnabledForLayer()&&!$.constantOr(1)&&b.constantOr(o.Color.transparent).a===1&&P.constantOr(0)===1?"opaque":"translucent";if(x.renderPass===V){const W=x.depthModeForSublayer(1,x.renderPass==="opaque"?Xr.ReadWrite:Xr.ReadOnly);fc(x,l,h,g,W,z,!1)}if(x.renderPass==="translucent"&&h.paint.get("fill-antialias")){const W=x.depthModeForSublayer(h.getPaintProperty("fill-outline-color")?2:0,Xr.ReadOnly);fc(x,l,h,g,W,z,!0)}},"fill-extrusion":function(x,l,h,g){const b=h.paint.get("fill-extrusion-opacity");if(b!==0&&x.renderPass==="translucent"){const P=new Xr(x.context.gl.LEQUAL,Xr.ReadWrite,x.depthRangeFor3D);if(b!==1||h.paint.get("fill-extrusion-pattern").constantOr(1))hc(x,l,h,g,P,En.disabled,Mn.disabled),hc(x,l,h,g,P,x.stencilModeFor3D(),x.colorModeForRenderPass());else{const z=x.colorModeForRenderPass();hc(x,l,h,g,P,En.disabled,z)}}},hillshade:function(x,l,h,g){if(x.renderPass!=="offscreen"&&x.renderPass!=="translucent")return;const b=x.context,P=x.depthModeForSublayer(0,Xr.ReadOnly),z=x.colorModeForRenderPass(),[$,V]=x.renderPass==="translucent"?x.stencilConfigForOverlap(g):[{},g];for(const W of V){const ee=l.getTile(W);ee.needsHillshadePrepare!==void 0&&ee.needsHillshadePrepare&&x.renderPass==="offscreen"?og(x,ee,h,P,En.disabled,z):x.renderPass==="translucent"&&Zh(x,W,ee,h,P,$[W.overscaledZ],z)}b.viewport.set([0,0,x.width,x.height])},raster:function(x,l,h,g){if(x.renderPass!=="translucent"||h.paint.get("raster-opacity")===0||!g.length)return;const b=x.context,P=b.gl,z=l.getSource(),$=x.useProgram("raster"),V=x.colorModeForRenderPass(),[W,ee]=z instanceof ye?[{},g]:x.stencilConfigForOverlap(g),ie=ee[ee.length-1].overscaledZ,fe=!x.options.moving;for(const Se of ee){const _e=x.depthModeForSublayer(Se.overscaledZ-ie,h.paint.get("raster-opacity")===1?Xr.ReadWrite:Xr.ReadOnly,P.LESS),we=l.getTile(Se);we.registerFadeDuration(h.paint.get("raster-fade-duration"));const $e=l.findLoadedParent(Se,0),Ue=Dd(we,$e,l,h,x.transform,x.style.terrain);let et,Pe;const at=h.paint.get("raster-resampling")==="nearest"?P.NEAREST:P.LINEAR;b.activeTexture.set(P.TEXTURE0),we.texture.bind(at,P.CLAMP_TO_EDGE,P.LINEAR_MIPMAP_NEAREST),b.activeTexture.set(P.TEXTURE1),$e?($e.texture.bind(at,P.CLAMP_TO_EDGE,P.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,P.CLAMP_TO_EDGE,P.LINEAR_MIPMAP_NEAREST);const rt=x.style.terrain&&x.style.terrain.getTerrainData(Se),gt=rt?Se:null,yt=gt?gt.posMatrix:x.transform.calculatePosMatrix(Se.toUnwrapped(),fe),zt=qv(yt,Pe||[0,0],et||1,Ue,h);z instanceof ye?$.draw(b,P.TRIANGLES,_e,En.disabled,V,zn.disabled,zt,rt,h.id,z.boundsBuffer,x.quadTriangleIndexBuffer,z.boundsSegments):$.draw(b,P.TRIANGLES,_e,W[Se.overscaledZ],V,zn.disabled,zt,rt,h.id,x.rasterBoundsBuffer,x.quadTriangleIndexBuffer,x.rasterBoundsSegments)}},background:function(x,l,h,g){const b=h.paint.get("background-color"),P=h.paint.get("background-opacity");if(P===0)return;const z=x.context,$=z.gl,V=x.transform,W=V.tileSize,ee=h.paint.get("background-pattern");if(x.isPatternMissing(ee))return;const ie=!ee&&b.a===1&&P===1&&x.opaquePassEnabledForLayer()?"opaque":"translucent";if(x.renderPass!==ie)return;const fe=En.disabled,Se=x.depthModeForSublayer(0,ie==="opaque"?Xr.ReadWrite:Xr.ReadOnly),_e=x.colorModeForRenderPass(),we=x.useProgram(ee?"backgroundPattern":"background"),$e=g||V.coveringTiles({tileSize:W,terrain:x.style.terrain});ee&&(z.activeTexture.set($.TEXTURE0),x.imageManager.bind(x.context));const Ue=h.getCrossfadeParameters();for(const et of $e){const Pe=g?et.posMatrix:x.transform.calculatePosMatrix(et.toUnwrapped()),at=ee?s_(Pe,P,x,ee,{tileID:et,tileSize:W},Ue):a_(Pe,P,b),rt=x.style.terrain&&x.style.terrain.getTerrainData(et);we.draw(z,$.TRIANGLES,Se,fe,_e,zn.disabled,at,rt,h.id,x.tileExtentBuffer,x.quadTriangleIndexBuffer,x.tileExtentSegments)}},debug:function(x,l,h){for(let g=0;g<h.length;g++)y_(x,l,h[g])},custom:function(x,l,h){const g=x.context,b=h.implementation;if(x.renderPass==="offscreen"){const P=b.prerender;P&&(x.setCustomLayerDefaults(),g.setColorMode(x.colorModeForRenderPass()),P.call(b,g.gl,x.transform.customLayerMatrix()),g.setDirty(),x.setBaseState())}else if(x.renderPass==="translucent"){x.setCustomLayerDefaults(),g.setColorMode(x.colorModeForRenderPass()),g.setStencilMode(En.disabled);const P=b.renderingMode==="3d"?new Xr(x.context.gl.LEQUAL,Xr.ReadWrite,x.depthRangeFor3D):x.depthModeForSublayer(0,Xr.ReadOnly);g.setDepthMode(P),b.render(g.gl,x.transform.customLayerMatrix()),g.setDirty(),x.setBaseState(),g.bindFramebuffer.set(null)}}};class Yh{constructor(l,h){this.context=new ng(l),this.transform=h,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:o.create(),renderTime:0},this.setup(),this.numSublayers=je.maxUnderzooming+je.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Bt,this.gpuTimers={}}resize(l,h,g){if(this.width=l*g,this.height=h*g,this.pixelRatio=g,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const b of this.style._order)this.style._layers[b].resize()}setup(){const l=this.context,h=new o.PosArray;h.emplaceBack(0,0),h.emplaceBack(o.EXTENT,0),h.emplaceBack(0,o.EXTENT),h.emplaceBack(o.EXTENT,o.EXTENT),this.tileExtentBuffer=l.createVertexBuffer(h,vr.members),this.tileExtentSegments=o.SegmentVector.simpleSegment(0,0,4,2);const g=new o.PosArray;g.emplaceBack(0,0),g.emplaceBack(o.EXTENT,0),g.emplaceBack(0,o.EXTENT),g.emplaceBack(o.EXTENT,o.EXTENT),this.debugBuffer=l.createVertexBuffer(g,vr.members),this.debugSegments=o.SegmentVector.simpleSegment(0,0,4,5);const b=new o.RasterBoundsArray;b.emplaceBack(0,0,0,0),b.emplaceBack(o.EXTENT,0,o.EXTENT,0),b.emplaceBack(0,o.EXTENT,0,o.EXTENT),b.emplaceBack(o.EXTENT,o.EXTENT,o.EXTENT,o.EXTENT),this.rasterBoundsBuffer=l.createVertexBuffer(b,oe.members),this.rasterBoundsSegments=o.SegmentVector.simpleSegment(0,0,4,2);const P=new o.PosArray;P.emplaceBack(0,0),P.emplaceBack(1,0),P.emplaceBack(0,1),P.emplaceBack(1,1),this.viewportBuffer=l.createVertexBuffer(P,vr.members),this.viewportSegments=o.SegmentVector.simpleSegment(0,0,4,2);const z=new o.LineStripIndexArray;z.emplaceBack(0),z.emplaceBack(1),z.emplaceBack(3),z.emplaceBack(2),z.emplaceBack(0),this.tileBorderIndexBuffer=l.createIndexBuffer(z);const $=new o.TriangleIndexArray;$.emplaceBack(0,1,2),$.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=l.createIndexBuffer($),this.emptyTexture=new R(l,{width:1,height:1,data:new Uint8Array([0,0,0,0])},l.gl.RGBA);const V=this.context.gl;this.stencilClearMode=new En({func:V.ALWAYS,mask:0},0,255,V.ZERO,V.ZERO,V.ZERO)}clearStencil(){const l=this.context,h=l.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const g=o.create();o.ortho(g,0,this.width,this.height,0,0,1),o.scale(g,g,[h.drawingBufferWidth,h.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(l,h.TRIANGLES,Xr.disabled,this.stencilClearMode,Mn.disabled,zn.disabled,Zr(g),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(l,h){if(this.currentStencilSource===l.source||!l.isTileClipped()||!h||!h.length)return;this.currentStencilSource=l.source;const g=this.context,b=g.gl;this.nextStencilID+h.length>256&&this.clearStencil(),g.setColorMode(Mn.disabled),g.setDepthMode(Xr.disabled);const P=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const z of h){const $=this._tileClippingMaskIDs[z.key]=this.nextStencilID++,V=this.style.terrain&&this.style.terrain.getTerrainData(z);P.draw(g,b.TRIANGLES,Xr.disabled,new En({func:b.ALWAYS,mask:0},$,255,b.KEEP,b.KEEP,b.REPLACE),Mn.disabled,zn.disabled,Zr(z.posMatrix),V,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const l=this.nextStencilID++,h=this.context.gl;return new En({func:h.NOTEQUAL,mask:255},l,255,h.KEEP,h.KEEP,h.REPLACE)}stencilModeForClipping(l){const h=this.context.gl;return new En({func:h.EQUAL,mask:255},this._tileClippingMaskIDs[l.key],0,h.KEEP,h.KEEP,h.REPLACE)}stencilConfigForOverlap(l){const h=this.context.gl,g=l.sort((z,$)=>$.overscaledZ-z.overscaledZ),b=g[g.length-1].overscaledZ,P=g[0].overscaledZ-b+1;if(P>1){this.currentStencilSource=void 0,this.nextStencilID+P>256&&this.clearStencil();const z={};for(let $=0;$<P;$++)z[$+b]=new En({func:h.GEQUAL,mask:255},$+this.nextStencilID,255,h.KEEP,h.KEEP,h.REPLACE);return this.nextStencilID+=P,[z,g]}return[{[b]:En.disabled},g]}colorModeForRenderPass(){const l=this.context.gl;return this._showOverdrawInspector?new Mn([l.CONSTANT_COLOR,l.ONE],new o.Color(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Mn.unblended:Mn.alphaBlended}depthModeForSublayer(l,h,g){if(!this.opaquePassEnabledForLayer())return Xr.disabled;const b=1-((1+this.currentLayer)*this.numSublayers+l)*this.depthEpsilon;return new Xr(g||this.context.gl.LEQUAL,h,[b,b])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(l,h){this.style=l,this.options=h,this.lineAtlas=l.lineAtlas,this.imageManager=l.imageManager,this.glyphManager=l.glyphManager,this.symbolFadeChange=l.placement.symbolFadeChange(o.exported.now()),this.imageManager.beginFrame();const g=this.style._order,b=this.style.sourceCaches,P=this.style.terrain&&new ug(this);for(const W in b){const ee=b[W];ee.used&&ee.prepare(this.context)}const z={},$={},V={};for(const W in b){const ee=b[W];z[W]=ee.getVisibleCoordinates(),$[W]=z[W].slice().reverse(),V[W]=ee.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let W=0;W<g.length;W++)if(this.style._layers[g[W]].is3D()){this.opaquePassCutoff=W;break}if(P){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=Mn.unblended,we=new Xr(Se.LEQUAL,Xr.ReadWrite,[0,1]),$e=ie.getTerrainMesh(),Ue=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 Ue){const at=ie.getTerrainData(Pe.tileID),rt=ee.transform.calculatePosMatrix(Pe.tileID.toUnwrapped());et.draw(fe,Se.TRIANGLES,we,En.disabled,_e,zn.backCCW,{u_matrix:rt},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=Mn.unblended,we=new Xr(Se.LEQUAL,Xr.ReadWrite,[0,1]),$e=ie.getTerrainMesh(),Ue=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 rt=ie.getTerrainData(at.tileID);fe.activeTexture.set(Se.TEXTURE0),Se.bindTexture(Se.TEXTURE_2D,Ue.texture);const gt=ee.transform.calculatePosMatrix(at.tileID.toUnwrapped());Pe.draw(fe,Se.TRIANGLES,we,En.disabled,_e,zn.backCCW,{u_matrix:gt,u_terrain_coords_id:(255-ie.coordsIndex.length)/255,u_texture:0},rt,"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 g){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,b[ee.source],ee,ie)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:h.showOverdrawInspector?o.Color.black:o.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=h.showOverdrawInspector,this.depthRangeFor3D=[0,1-(l._order.length+2)*this.numSublayers*this.depthEpsilon],!P)for(this.renderPass="opaque",this.currentLayer=g.length-1;this.currentLayer>=0;this.currentLayer--){const W=this.style._layers[g[this.currentLayer]],ee=b[W.source],ie=z[W.source];this._renderTileClippingMasks(W,ie),this.renderLayer(this,ee,W,ie)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<g.length;this.currentLayer++){const W=this.style._layers[g[this.currentLayer]],ee=b[W.source];if(P&&P.renderLayer(W))continue;const ie=(W.type==="symbol"?V:$)[W.source];this._renderTileClippingMasks(W,z[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&&mc.debug(this,W,W.getVisibleCoordinates())}this.options.showPadding&&function(W){const ee=W.transform.padding;il(W,W.transform.height-(ee.top||0),3,Ld),il(W,ee.bottom||0,3,ra),pc(W,ee.left||0,3,ag),pc(W,W.transform.width-(ee.right||0),3,Xh);const ie=W.transform.centerPoint;(function(fe,Se,_e,we){eu(fe,Se-1,_e-10,2,20,we),eu(fe,Se-10,_e-1,20,2,we)})(W,ie.x,W.transform.height-ie.y,sg)}(this),this.context.setDefault()}renderLayer(l,h,g,b){g.isHidden(this.transform.zoom)||(g.type==="background"||g.type==="custom"||(b||[]).length)&&(this.id=g.id,this.gpuTimingStart(g),mc[g.type](l,h,g,b,this.style.placement.variableOffsets),this.gpuTimingEnd())}gpuTimingStart(l){if(!this.options.gpuTiming)return;const h=this.context.extTimerQuery;let g=this.gpuTimers[l.id];g||(g=this.gpuTimers[l.id]={calls:0,cpuTime:0,query:h.createQueryEXT()}),g.calls++,h.beginQueryEXT(h.TIME_ELAPSED_EXT,g.query)}gpuTimingEnd(){if(!this.options.gpuTiming)return;const l=this.context.extTimerQuery;l.endQueryEXT(l.TIME_ELAPSED_EXT)}collectGpuTimers(){const l=this.gpuTimers;return this.gpuTimers={},l}queryGpuTimers(l){const h={};for(const g in l){const b=l[g],P=this.context.extTimerQuery,z=P.getQueryObjectEXT(b.query,P.QUERY_RESULT_EXT)/1e6;P.deleteQueryEXT(b.query),h[g]=z}return h}translatePosMatrix(l,h,g,b,P){if(!g[0]&&!g[1])return l;const z=P?b==="map"?this.transform.angle:0:b==="viewport"?-this.transform.angle:0;if(z){const W=Math.sin(z),ee=Math.cos(z);g=[g[0]*ee-g[1]*W,g[0]*W+g[1]*ee]}const $=[P?g[0]:Nt(h,g[0],this.transform.zoom),P?g[1]:Nt(h,g[1],this.transform.zoom),0],V=new Float32Array(16);return o.translate(V,l,$),V}saveTileTexture(l){const h=this._tileTextures[l.size[0]];h?h.push(l):this._tileTextures[l.size[0]]=[l]}getTileTexture(l){const h=this._tileTextures[l];return h&&h.length>0?h.pop():null}isPatternMissing(l){if(!l)return!1;if(!l.from||!l.to)return!0;const h=this.imageManager.getPattern(l.from.toString()),g=this.imageManager.getPattern(l.to.toString());return!h||!g}useProgram(l,h){this.cache=this.cache||{};const g=l+(h?h.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.terrain?"/terrain":"");return this.cache[g]||(this.cache[g]=new Ur(this.context,l,Sr[l],h,Lh[l],this._showOverdrawInspector,this.style.terrain)),this.cache[g]}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 l=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(l.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new R(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}}class $d{constructor(l,h){this.points=l,this.planes=h}static fromInvProjectionMatrix(l,h,g){const b=Math.pow(2,g),P=[[-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([],$,l))[3]/h*b;return o.mul$1($,$,[V,V,1/$[3],V])}),z=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map($=>{const V=o.sub([],P[$[0]],P[$[1]]),W=o.sub([],P[$[2]],P[$[1]]),ee=o.normalize([],o.cross([],V,W)),ie=-o.dot(ee,P[$[1]]);return ee.concat(ie)});return new $d(P,z)}}class vc{constructor(l,h){this.min=l,this.max=h,this.center=o.scale$1([],o.add([],this.min,this.max),.5)}quadrant(l){const h=[l%2==0,l<2],g=o.clone$2(this.min),b=o.clone$2(this.max);for(let P=0;P<h.length;P++)g[P]=h[P]?this.min[P]:this.center[P],b[P]=h[P]?this.center[P]:this.max[P];return b[2]=this.max[2],new vc(g,b)}distanceX(l){return Math.max(Math.min(this.max[0],l[0]),this.min[0])-l[0]}distanceY(l){return Math.max(Math.min(this.max[1],l[1]),this.min[1])-l[1]}intersects(l){const h=[[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 g=!0;for(let b=0;b<l.planes.length;b++){const P=l.planes[b];let z=0;for(let $=0;$<h.length;$++)o.dot$1(P,h[$])>=0&&z++;if(z===0)return 0;z!==h.length&&(g=!1)}if(g)return 2;for(let b=0;b<3;b++){let P=Number.MAX_VALUE,z=-Number.MAX_VALUE;for(let $=0;$<l.points.length;$++){const V=l.points[$][b]-this.min[b];P=Math.min(P,V),z=Math.max(z,V)}if(z<0||P>this.max[b]-this.min[b])return 0}return 1}}class tu{constructor(l=0,h=0,g=0,b=0){if(isNaN(l)||l<0||isNaN(h)||h<0||isNaN(g)||g<0||isNaN(b)||b<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=l,this.bottom=h,this.left=g,this.right=b}interpolate(l,h,g){return h.top!=null&&l.top!=null&&(this.top=o.number(l.top,h.top,g)),h.bottom!=null&&l.bottom!=null&&(this.bottom=o.number(l.bottom,h.bottom,g)),h.left!=null&&l.left!=null&&(this.left=o.number(l.left,h.left,g)),h.right!=null&&l.right!=null&&(this.right=o.number(l.right,h.right,g)),this}getCenter(l,h){const g=o.clamp((this.left+l-this.right)/2,0,l),b=o.clamp((this.top+h-this.bottom)/2,0,h);return new o.pointGeometry(g,b)}equals(l){return this.top===l.top&&this.bottom===l.bottom&&this.left===l.left&&this.right===l.right}clone(){return new tu(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}class gc{constructor(l,h,g,b,P){this.tileSize=512,this.maxValidLatitude=85.051129,this.freezeElevation=!1,this._renderWorldCopies=P===void 0||!!P,this._minZoom=l||0,this._maxZoom=h||22,this._minPitch=g==null?0:g,this._maxPitch=b==null?60:b,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 tu,this._posMatrixCache={},this._alignedPosMatrixCache={}}clone(){const l=new gc(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return l.tileSize=this.tileSize,l.latRange=this.latRange,l.width=this.width,l.height=this.height,l._center=this._center,l._elevation=this._elevation,l.zoom=this.zoom,l.angle=this.angle,l._fov=this._fov,l._pitch=this._pitch,l._unmodified=this._unmodified,l._edgeInsets=this._edgeInsets.clone(),l._calcMatrices(),l}get minZoom(){return this._minZoom}set minZoom(l){this._minZoom!==l&&(this._minZoom=l,this.zoom=Math.max(this.zoom,l))}get maxZoom(){return this._maxZoom}set maxZoom(l){this._maxZoom!==l&&(this._maxZoom=l,this.zoom=Math.min(this.zoom,l))}get minPitch(){return this._minPitch}set minPitch(l){this._minPitch!==l&&(this._minPitch=l,this.pitch=Math.max(this.pitch,l))}get maxPitch(){return this._maxPitch}set maxPitch(l){this._maxPitch!==l&&(this._maxPitch=l,this.pitch=Math.min(this.pitch,l))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(l){l===void 0?l=!0:l===null&&(l=!1),this._renderWorldCopies=l}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(l){const h=-o.wrap(l,-180,180)*Math.PI/180;var g;this.angle!==h&&(this._unmodified=!1,this.angle=h,this._calcMatrices(),this.rotationMatrix=(g=new o.ARRAY_TYPE(4),o.ARRAY_TYPE!=Float32Array&&(g[1]=0,g[2]=0),g[0]=1,g[3]=1,g),function(b,P,z){var $=P[0],V=P[1],W=P[2],ee=P[3],ie=Math.sin(z),fe=Math.cos(z);b[0]=$*fe+W*ie,b[1]=V*fe+ee*ie,b[2]=$*-ie+W*fe,b[3]=V*-ie+ee*fe}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(l){const h=o.clamp(l,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==h&&(this._unmodified=!1,this._pitch=h,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(l){l=Math.max(.01,Math.min(60,l)),this._fov!==l&&(this._unmodified=!1,this._fov=l/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(l){const h=Math.min(Math.max(l,this.minZoom),this.maxZoom);this._zoom!==h&&(this._unmodified=!1,this._zoom=h,this.scale=this.zoomScale(h),this.tileZoom=Math.floor(h),this.zoomFraction=h-this.tileZoom,this._constrain(),this._calcMatrices())}get center(){return this._center}set center(l){l.lat===this._center.lat&&l.lng===this._center.lng||(this._unmodified=!1,this._center=l,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(l){l!==this._elevation&&(this._elevation=l,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(l){this._edgeInsets.equals(l)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,l,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(l){return this._edgeInsets.equals(l)}interpolatePadding(l,h,g){this._unmodified=!1,this._edgeInsets.interpolate(l,h,g),this._constrain(),this._calcMatrices()}coveringZoomLevel(l){const h=(l.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/l.tileSize));return Math.max(0,h)}getVisibleUnwrappedCoordinates(l){const h=[new o.UnwrappedTileID(0,l)];if(this._renderWorldCopies){const g=this.pointCoordinate(new o.pointGeometry(0,0)),b=this.pointCoordinate(new o.pointGeometry(this.width,0)),P=this.pointCoordinate(new o.pointGeometry(this.width,this.height)),z=this.pointCoordinate(new o.pointGeometry(0,this.height)),$=Math.floor(Math.min(g.x,b.x,P.x,z.x)),V=Math.floor(Math.max(g.x,b.x,P.x,z.x)),W=1;for(let ee=$-W;ee<=V+W;ee++)ee!==0&&h.push(new o.UnwrappedTileID(ee,l))}return h}coveringTiles(l){var h,g;let b=this.coveringZoomLevel(l);const P=b;if(l.minzoom!==void 0&&b<l.minzoom)return[];l.maxzoom!==void 0&&b>l.maxzoom&&(b=l.maxzoom);const z=this.pointCoordinate(this.getCameraPoint()),$=o.MercatorCoordinate.fromLngLat(this.center),V=Math.pow(2,b),W=[V*z.x,V*z.y,0],ee=[V*$.x,V*$.y,0],ie=$d.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,b);let fe=l.minzoom||0;!l.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(fe=b);const Se=l.terrain?2/Math.min(this.tileSize,l.tileSize)*this.tileSize:3,_e=Pe=>({aabb:new vc([Pe*V,0,0],[(Pe+1)*V,V,0]),zoom:0,x:0,y:0,wrap:Pe,fullyVisible:!1}),we=[],$e=[],Ue=b,et=l.reparseOverscaled?P:b;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,rt=Pe.y;let gt=Pe.fullyVisible;if(!gt){const sr=Pe.aabb.intersects(ie);if(sr===0)continue;gt=sr===2}const yt=l.terrain?W:ee,zt=Pe.aabb.distanceX(yt),vt=Pe.aabb.distanceY(yt),nr=Math.max(Math.abs(zt),Math.abs(vt)),Gt=Se+(1<<Ue-Pe.zoom)-2;if(Pe.zoom===Ue||nr>Gt&&Pe.zoom>=fe){const sr=Ue-Pe.zoom,Dr=W[0]-.5-(at<<sr),Vr=W[1]-.5-(rt<<sr);$e.push({tileID:new o.OverscaledTileID(Pe.zoom===Ue?et:Pe.zoom,Pe.wrap,Pe.zoom,at,rt),distanceSq:o.sqrLen([ee[0]-.5-at,ee[1]-.5-rt]),tileDistanceToCamera:Math.sqrt(Dr*Dr+Vr*Vr)})}else for(let sr=0;sr<4;sr++){const Dr=(at<<1)+sr%2,Vr=(rt<<1)+(sr>>1),_r=Pe.zoom+1;let hn=Pe.aabb.quadrant(sr);if(l.terrain){const pn=new o.OverscaledTileID(_r,Pe.wrap,_r,Dr,Vr),Qr=l.terrain.getMinMaxElevation(pn),en=(h=Qr.minElevation)!==null&&h!==void 0?h:this.elevation,gn=(g=Qr.maxElevation)!==null&&g!==void 0?g:this.elevation;hn=new vc([hn.min[0],hn.min[1],en],[hn.max[0],hn.max[1],gn])}we.push({aabb:hn,zoom:_r,x:Dr,y:Vr,wrap:Pe.wrap,fullyVisible:gt})}}return $e.sort((Pe,at)=>Pe.distanceSq-at.distanceSq).map(Pe=>Pe.tileID)}resize(l,h){this.width=l,this.height=h,this.pixelsToGLUnits=[2/l,-2/h],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(l){return Math.pow(2,l)}scaleZoom(l){return Math.log(l)/Math.LN2}project(l){const h=o.clamp(l.lat,-this.maxValidLatitude,this.maxValidLatitude);return new o.pointGeometry(o.mercatorXfromLng(l.lng)*this.worldSize,o.mercatorYfromLat(h)*this.worldSize)}unproject(l){return new o.MercatorCoordinate(l.x/this.worldSize,l.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}updateElevation(l){this.freezeElevation||(this.elevation=l?this.getElevation(this._center,l):0)}getElevation(l,h){const g=o.MercatorCoordinate.fromLngLat(l),b=(1<<this.tileZoom)*o.EXTENT,P=g.x*b,z=g.y*b,$=Math.floor(P/o.EXTENT),V=Math.floor(z/o.EXTENT),W=new o.OverscaledTileID(this.tileZoom,0,this.tileZoom,$,V);return h.getElevation(W,P%o.EXTENT,z%o.EXTENT,o.EXTENT)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(l){const h=this.pointLocation(this.centerPoint,l),g=this.getElevation(h,l);if(!(this.elevation-g))return;const b=this.getCameraPosition(),P=o.MercatorCoordinate.fromLngLat(b.lngLat,b.altitude),z=o.MercatorCoordinate.fromLngLat(h,g),$=P.x-z.x,V=P.y-z.y,W=P.z-z.z,ee=Math.sqrt($*$+V*V+W*W),ie=this.scaleZoom(this.cameraToCenterDistance/ee/this.tileSize);this._elevation=g,this._center=h,this.zoom=ie}setLocationAtPoint(l,h){const g=this.pointCoordinate(h),b=this.pointCoordinate(this.centerPoint),P=this.locationCoordinate(l),z=new o.MercatorCoordinate(P.x-(g.x-b.x),P.y-(g.y-b.y));this.center=this.coordinateLocation(z),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(l,h){return h?this.coordinatePoint(this.locationCoordinate(l),this.getElevation(l,h),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(l))}pointLocation(l,h){return this.coordinateLocation(this.pointCoordinate(l,h))}locationCoordinate(l){return o.MercatorCoordinate.fromLngLat(l)}coordinateLocation(l){return l&&l.toLngLat()}pointCoordinate(l,h){if(h){const fe=h.pointCoordinate(l);if(fe!=null)return fe}const g=[l.x,l.y,0,1],b=[l.x,l.y,1,1];o.transformMat4(g,g,this.pixelMatrixInverse),o.transformMat4(b,b,this.pixelMatrixInverse);const P=g[3],z=b[3],$=g[1]/P,V=b[1]/z,W=g[2]/P,ee=b[2]/z,ie=W===ee?0:(0-W)/(ee-W);return new o.MercatorCoordinate(o.number(g[0]/P,b[0]/z,ie)/this.worldSize,o.number($,V,ie)/this.worldSize)}coordinatePoint(l,h=0,g=this.pixelMatrix){const b=[l.x*this.worldSize,l.y*this.worldSize,h,1];return o.transformMat4(b,b,g),new o.pointGeometry(b[0]/b[3],b[1]/b[3])}getBounds(){const l=Math.max(0,this.height/2-this.getHorizon());return new o.LngLatBounds().extend(this.pointLocation(new o.pointGeometry(0,l))).extend(this.pointLocation(new o.pointGeometry(this.width,l))).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(l){l?(this.lngRange=[l.getWest(),l.getEast()],this.latRange=[l.getSouth(),l.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])}calculatePosMatrix(l,h=!1){const g=l.key,b=h?this._alignedPosMatrixCache:this._posMatrixCache;if(b[g])return b[g];const P=l.canonical,z=this.worldSize/this.zoomScale(P.z),$=P.x+Math.pow(2,P.z)*l.wrap,V=o.identity(new Float64Array(16));return o.translate(V,V,[$*z,P.y*z,0]),o.scale(V,V,[z/o.EXTENT,z/o.EXTENT,1]),o.multiply(V,h?this.alignedProjMatrix:this.projMatrix,V),b[g]=new Float32Array(V),b[g]}customLayerMatrix(){return this.mercatorMatrix.slice()}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let l,h,g,b,P=-90,z=90,$=-180,V=180;const W=this.size,ee=this._unmodified;if(this.latRange){const Se=this.latRange;P=o.mercatorYfromLat(Se[1])*this.worldSize,z=o.mercatorYfromLat(Se[0])*this.worldSize,l=z-P<W.y?W.y/(z-P):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),h=V-$<W.x?W.x/(V-$):0}const ie=this.point,fe=Math.max(h||0,l||0);if(fe)return this.center=this.unproject(new o.pointGeometry(h?(V+$)/2:ie.x,l?(z+P)/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<P&&(b=P+_e),Se+_e>z&&(b=z-_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<$&&(g=$+we),_e+we>V&&(g=V-we)}g===void 0&&b===void 0||(this.center=this.unproject(new o.pointGeometry(g!==void 0?g:ie.x,b!==void 0?b:ie.y)).wrap()),this._unmodified=ee,this._constraining=!1}_calcMatrices(){if(!this.height)return;const l=this.centerOffset,h=this.point.x,g=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=o.mercatorZfromAltitude(1,this.center.lat)*this.worldSize;let b=o.identity(new Float64Array(16));o.scale(b,b,[this.width/2,-this.height/2,1]),o.translate(b,b,[1,-1,0]),this.labelPlaneMatrix=b,b=o.identity(new Float64Array(16)),o.scale(b,b,[1,-1,1]),o.translate(b,b,[-1,-1,0]),o.scale(b,b,[2/this.width,2/this.height,1]),this.glCoordMatrix=b,this.cameraToSeaLevelDistance=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch);const P=Math.PI/2+this._pitch,z=this._fov*(.5+l.y/this.height),$=Math.sin(z)*this.cameraToSeaLevelDistance/Math.sin(o.clamp(Math.PI-P-z,.01,Math.PI-.01)),V=this.getHorizon(),W=2*Math.atan(V/this.cameraToCenterDistance)*(.5+l.y/(2*V)),ee=Math.sin(W)*this.cameraToSeaLevelDistance/Math.sin(o.clamp(Math.PI-P-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;b=new Float64Array(16),o.perspective(b,this._fov,this.width/this.height,_e,Se),b[8]=2*-l.x/this.width,b[9]=2*l.y/this.height,o.scale(b,b,[1,-1,1]),o.translate(b,b,[0,0,-this.cameraToCenterDistance]),o.rotateX(b,b,this._pitch),o.rotateZ(b,b,this.angle),o.translate(b,b,[-h,-g,0]),this.mercatorMatrix=o.scale([],b,[this.worldSize,this.worldSize,this.worldSize]),o.scale(b,b,[1,1,this._pixelPerMeter]),this.pixelMatrix=o.multiply(new Float64Array(16),this.labelPlaneMatrix,b),o.translate(b,b,[0,0,-this.elevation]),this.projMatrix=b,this.invProjMatrix=o.invert([],b),this.pixelMatrix3D=o.multiply(new Float64Array(16),this.labelPlaneMatrix,b);const we=this.width%2/2,$e=this.height%2/2,Ue=Math.cos(this.angle),et=Math.sin(this.angle),Pe=h-Math.round(h)+Ue*we+et*$e,at=g-Math.round(g)+Ue*$e+et*we,rt=new Float64Array(b);if(o.translate(rt,rt,[Pe>.5?Pe-1:Pe,at>.5?at-1:at,0]),this.alignedProjMatrix=rt,b=o.invert(new Float64Array(16),this.pixelMatrix),!b)throw new Error("failed to invert matrix");this.pixelMatrixInverse=b,this._posMatrixCache={},this._alignedPosMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const l=this.pointCoordinate(new o.pointGeometry(0,0)),h=[l.x*this.worldSize,l.y*this.worldSize,0,1];return o.transformMat4(h,h,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const l=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new o.pointGeometry(0,l))}getCameraQueryGeometry(l){const h=this.getCameraPoint();if(l.length===1)return[l[0],h];{let g=h.x,b=h.y,P=h.x,z=h.y;for(const $ of l)g=Math.min(g,$.x),b=Math.min(b,$.y),P=Math.max(P,$.x),z=Math.max(z,$.y);return[new o.pointGeometry(g,b),new o.pointGeometry(P,b),new o.pointGeometry(P,z),new o.pointGeometry(g,z),new o.pointGeometry(g,b)]}}}class cg{constructor(l){this._hashName=l&&encodeURIComponent(l),o.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=function(h,g){let b=!1,P=null;const z=()=>{P=null,b&&(h(),P=setTimeout(z,300),b=!1)};return()=>(b=!0,P||z(),P)}(this._updateHashUnthrottled.bind(this))}addTo(l){return this._map=l,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(l){const h=this._map.getCenter(),g=Math.round(100*this._map.getZoom())/100,b=Math.ceil((g*Math.LN2+Math.log(512/360/.5))/Math.LN10),P=Math.pow(10,b),z=Math.round(h.lng*P)/P,$=Math.round(h.lat*P)/P,V=this._map.getBearing(),W=this._map.getPitch();let ee="";if(ee+=l?`/${z}/${$}/${g}`:`${g}/${$}/${z}`,(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 l=window.location.hash.replace("#","");if(this._hashName){let h;return l.split("&").map(g=>g.split("=")).forEach(g=>{g[0]===this._hashName&&(h=g)}),(h&&h[1]||"").split("/")}return l.split("/")}_onHashChange(){const l=this._getCurrentHash();if(l.length>=3&&!l.some(h=>isNaN(h))){const h=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(l[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+l[2],+l[1]],zoom:+l[0],bearing:h,pitch:+(l[4]||0)}),!0}return!1}_updateHashUnthrottled(){const l=window.location.href.replace(/(#.+)?$/,this.getHashString());try{window.history.replaceState(window.history.state,null,l)}catch{}}}const yc={linearity:.3,easing:o.bezier(0,0,.3,1)},dg=o.extend({deceleration:2500,maxSpeed:1400},yc),fg=o.extend({deceleration:20,maxSpeed:1400},yc),hg=o.extend({deceleration:1e3,maxSpeed:360},yc),ru=o.extend({deceleration:1e3,maxSpeed:90},yc);class pg{constructor(l){this._map=l,this.clear()}clear(){this._inertiaBuffer=[]}record(l){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:o.exported.now(),settings:l})}_drainInertiaBuffer(){const l=this._inertiaBuffer,h=o.exported.now();for(;l.length>0&&h-l[0].time>160;)l.shift()}_onMoveEnd(l){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const h={zoom:0,bearing:0,pitch:0,pan:new o.pointGeometry(0,0),pinchAround:void 0,around:void 0};for(const{settings:P}of this._inertiaBuffer)h.zoom+=P.zoomDelta||0,h.bearing+=P.bearingDelta||0,h.pitch+=P.pitchDelta||0,P.panDelta&&h.pan._add(P.panDelta),P.around&&(h.around=P.around),P.pinchAround&&(h.pinchAround=P.pinchAround);const g=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,b={};if(h.pan.mag()){const P=_c(h.pan.mag(),g,o.extend({},dg,l||{}));b.offset=h.pan.mult(P.amount/h.pan.mag()),b.center=this._map.transform.center,xc(b,P)}if(h.zoom){const P=_c(h.zoom,g,fg);b.zoom=this._map.transform.zoom+P.amount,xc(b,P)}if(h.bearing){const P=_c(h.bearing,g,hg);b.bearing=this._map.transform.bearing+o.clamp(P.amount,-179,179),xc(b,P)}if(h.pitch){const P=_c(h.pitch,g,ru);b.pitch=this._map.transform.pitch+P.amount,xc(b,P)}if(b.zoom||b.bearing){const P=h.pinchAround===void 0?h.around:h.pinchAround;b.around=P?this._map.unproject(P):this._map.getCenter()}return this.clear(),o.extend(b,{noMoveStart:!0})}}function xc(x,l){(!x.duration||x.duration<l.duration)&&(x.duration=l.duration,x.easing=l.easing)}function _c(x,l,h){const{maxSpeed:g,linearity:b,deceleration:P}=h,z=o.clamp(x*b/(l/1e3),-g,g),$=Math.abs(z)/(P*b);return{easing:h.easing,duration:1e3*$,amount:z*($/2)}}class Co extends o.Event{constructor(l,h,g,b={}){const P=w.mousePos(h.getCanvasContainer(),g),z=h.unproject(P);super(l,o.extend({point:P,lngLat:z,originalEvent:g},b)),this._defaultPrevented=!1,this.target=h}preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}}class bc extends o.Event{constructor(l,h,g){const b=l==="touchend"?g.changedTouches:g.touches,P=w.touchPos(h.getCanvasContainer(),b),z=P.map(V=>h.unproject(V)),$=P.reduce((V,W,ee,ie)=>V.add(W.div(ie.length)),new o.pointGeometry(0,0));super(l,{points:P,point:$,lngLats:z,lngLat:h.unproject($),originalEvent:g}),this._defaultPrevented=!1}preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}}class So extends o.Event{constructor(l,h,g){super(l,{originalEvent:g}),this._defaultPrevented=!1}preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}}class x_{constructor(l,h){this._map=l,this._clickTolerance=h.clickTolerance}reset(){delete this._mousedownPos}wheel(l){return this._firePreventable(new So(l.type,this._map,l))}mousedown(l,h){return this._mousedownPos=h,this._firePreventable(new Co(l.type,this._map,l))}mouseup(l){this._map.fire(new Co(l.type,this._map,l))}click(l,h){this._mousedownPos&&this._mousedownPos.dist(h)>=this._clickTolerance||this._map.fire(new Co(l.type,this._map,l))}dblclick(l){return this._firePreventable(new Co(l.type,this._map,l))}mouseover(l){this._map.fire(new Co(l.type,this._map,l))}mouseout(l){this._map.fire(new Co(l.type,this._map,l))}touchstart(l){return this._firePreventable(new bc(l.type,this._map,l))}touchmove(l){this._map.fire(new bc(l.type,this._map,l))}touchend(l){this._map.fire(new bc(l.type,this._map,l))}touchcancel(l){this._map.fire(new bc(l.type,this._map,l))}_firePreventable(l){if(this._map.fire(l),l.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class ks{constructor(l){this._map=l}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(l){this._map.fire(new Co(l.type,this._map,l))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Co("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(l){this._delayContextMenu?this._contextMenuEvent=l:this._ignoreContextMenu||this._map.fire(new Co(l.type,this._map,l)),this._map.listens("contextmenu")&&l.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class mg{constructor(l,h){this._map=l,this._el=l.getCanvasContainer(),this._container=l.getContainer(),this._clickTolerance=h.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(l,h){this.isEnabled()&&l.shiftKey&&l.button===0&&(w.disableDrag(),this._startPos=this._lastPos=h,this._active=!0)}mousemoveWindow(l,h){if(!this._active)return;const g=h;if(this._lastPos.equals(g)||!this._box&&g.dist(this._startPos)<this._clickTolerance)return;const b=this._startPos;this._lastPos=g,this._box||(this._box=w.create("div","maplibregl-boxzoom mapboxgl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair","mapboxgl-crosshair"),this._fireEvent("boxzoomstart",l));const P=Math.min(b.x,g.x),z=Math.max(b.x,g.x),$=Math.min(b.y,g.y),V=Math.max(b.y,g.y);w.setTransform(this._box,`translate(${P}px,${$}px)`),this._box.style.width=z-P+"px",this._box.style.height=V-$+"px"}mouseupWindow(l,h){if(!this._active||l.button!==0)return;const g=this._startPos,b=h;if(this.reset(),w.suppressClick(),g.x!==b.x||g.y!==b.y)return this._map.fire(new o.Event("boxzoomend",{originalEvent:l})),{cameraAnimation:P=>P.fitScreenCoordinates(g,b,this._map.getBearing(),{linear:!0})};this._fireEvent("boxzoomcancel",l)}keydown(l){this._active&&l.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",l))}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(l,h){return this._map.fire(new o.Event(l,{originalEvent:h}))}}function ts(x,l){if(x.length!==l.length)throw new Error(`The number of touches and points are not equal - touches ${x.length}, points ${l.length}`);const h={};for(let g=0;g<x.length;g++)h[x[g].identifier]=l[g];return h}class wc{constructor(l){this.reset(),this.numTouches=l.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(l,h,g){(this.centroid||g.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=l.timeStamp),g.length===this.numTouches&&(this.centroid=function(b){const P=new o.pointGeometry(0,0);for(const z of b)P._add(z);return P.div(b.length)}(h),this.touches=ts(g,h)))}touchmove(l,h,g){if(this.aborted||!this.centroid)return;const b=ts(g,h);for(const P in this.touches){const z=this.touches[P],$=b[P];(!$||$.dist(z)>30)&&(this.aborted=!0)}}touchend(l,h,g){if((!this.centroid||l.timeStamp-this.startTime>500)&&(this.aborted=!0),g.length===0){const b=!this.aborted&&this.centroid;if(this.reset(),b)return b}}}class Qh{constructor(l){this.singleTap=new wc(l),this.numTaps=l.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(l,h,g){this.singleTap.touchstart(l,h,g)}touchmove(l,h,g){this.singleTap.touchmove(l,h,g)}touchend(l,h,g){const b=this.singleTap.touchend(l,h,g);if(b){const P=l.timeStamp-this.lastTime<500,z=!this.lastTap||this.lastTap.dist(b)<30;if(P&&z||this.reset(),this.count++,this.lastTime=l.timeStamp,this.lastTap=b,this.count===this.numTaps)return this.reset(),b}}}class __{constructor(){this._zoomIn=new Qh({numTouches:1,numTaps:2}),this._zoomOut=new Qh({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(l,h,g){this._zoomIn.touchstart(l,h,g),this._zoomOut.touchstart(l,h,g)}touchmove(l,h,g){this._zoomIn.touchmove(l,h,g),this._zoomOut.touchmove(l,h,g)}touchend(l,h,g){const b=this._zoomIn.touchend(l,h,g),P=this._zoomOut.touchend(l,h,g);return b?(this._active=!0,l.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:z=>z.easeTo({duration:300,zoom:z.getZoom()+1,around:z.unproject(b)},{originalEvent:l})}):P?(this._active=!0,l.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:z=>z.easeTo({duration:300,zoom:z.getZoom()-1,around:z.unproject(P)},{originalEvent:l})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}const b_={0:1,2:2};class Bd{constructor(l){this.reset(),this._clickTolerance=l.clickTolerance||1}reset(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton}_correctButton(l,h){return!1}_move(l,h){return{}}mousedown(l,h){if(this._lastPoint)return;const g=w.mouseButton(l);this._correctButton(l,g)&&(this._lastPoint=h,this._eventButton=g)}mousemoveWindow(l,h){const g=this._lastPoint;if(g){if(l.preventDefault(),function(b,P){const z=b_[P];return b.buttons===void 0||(b.buttons&z)!==z}(l,this._eventButton))this.reset();else if(this._moved||!(h.dist(g)<this._clickTolerance))return this._moved=!0,this._lastPoint=h,this._move(g,h)}}mouseupWindow(l){this._lastPoint&&w.mouseButton(l)===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 Cc extends Bd{mousedown(l,h){super.mousedown(l,h),this._lastPoint&&(this._active=!0)}_correctButton(l,h){return h===0&&!l.ctrlKey}_move(l,h){return{around:h,panDelta:h.sub(l)}}}class rs extends Bd{_correctButton(l,h){return h===0&&l.ctrlKey||h===2}_move(l,h){const g=.8*(h.x-l.x);if(g)return this._active=!0,{bearingDelta:g}}contextmenu(l){l.preventDefault()}}class dr extends Bd{_correctButton(l,h){return h===0&&l.ctrlKey||h===2}_move(l,h){const g=-.5*(h.y-l.y);if(g)return this._active=!0,{pitchDelta:g}}contextmenu(l){l.preventDefault()}}class vg{constructor(l,h){this._minTouches=l.cooperativeGestures?2:1,this._clickTolerance=l.clickTolerance||1,this._map=h,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new o.pointGeometry(0,0),setTimeout(()=>{this._cancelCooperativeMessage=!1},200)}touchstart(l,h,g){return this._calculateTransform(l,h,g)}touchmove(l,h,g){if(this._map._cooperativeGestures&&(this._minTouches===2&&g.length<2&&!this._cancelCooperativeMessage?this._map._onCooperativeGesture(l,!1,g.length):this._cancelCooperativeMessage||(this._cancelCooperativeMessage=!0)),this._active&&!(g.length<this._minTouches))return l.preventDefault(),this._calculateTransform(l,h,g)}touchend(l,h,g){this._calculateTransform(l,h,g),this._active&&g.length<this._minTouches&&this.reset()}touchcancel(){this.reset()}_calculateTransform(l,h,g){g.length>0&&(this._active=!0);const b=ts(g,h),P=new o.pointGeometry(0,0),z=new o.pointGeometry(0,0);let $=0;for(const W in b){const ee=b[W],ie=this._touches[W];ie&&(P._add(ee),z._add(ee.sub(ie)),$++,b[W]=ee)}if(this._touches=b,$<this._minTouches||!z.mag())return;const V=z.div($);return this._sum._add(V),this._sum.mag()<this._clickTolerance?void 0:{around:P.div($),panDelta:V}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ol{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}_start(l){}_move(l,h,g){return{}}touchstart(l,h,g){this._firstTwoTouches||g.length<2||(this._firstTwoTouches=[g[0].identifier,g[1].identifier],this._start([h[0],h[1]]))}touchmove(l,h,g){if(!this._firstTwoTouches)return;l.preventDefault();const[b,P]=this._firstTwoTouches,z=Ts(g,h,b),$=Ts(g,h,P);if(!z||!$)return;const V=this._aroundCenter?null:z.add($).div(2);return this._move([z,$],V,l)}touchend(l,h,g){if(!this._firstTwoTouches)return;const[b,P]=this._firstTwoTouches,z=Ts(g,h,b),$=Ts(g,h,P);z&&$||(this._active&&w.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(l){this._enabled=!0,this._aroundCenter=!!l&&l.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}function Ts(x,l,h){for(let g=0;g<x.length;g++)if(x[g].identifier===h)return l[g]}function Jh(x,l){return Math.log(x/l)/Math.LN2}class Jt extends ol{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(l){this._startDistance=this._distance=l[0].dist(l[1])}_move(l,h){const g=this._distance;if(this._distance=l[0].dist(l[1]),this._active||!(Math.abs(Jh(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Jh(this._distance,g),pinchAround:h}}}function Vd(x,l){return 180*x.angleWith(l)/Math.PI}class w_ extends ol{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(l){this._startVector=this._vector=l[0].sub(l[1]),this._minDiameter=l[0].dist(l[1])}_move(l,h){const g=this._vector;if(this._vector=l[0].sub(l[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Vd(this._vector,g),pinchAround:h}}_isBelowThreshold(l){this._minDiameter=Math.min(this._minDiameter,l.mag());const h=25/(Math.PI*this._minDiameter)*360,g=Vd(l,this._startVector);return Math.abs(g)<h}}function ep(x){return Math.abs(x.y)>Math.abs(x.x)}class tp extends ol{constructor(l){super(),this._map=l}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(l,h,g){super.touchstart(l,h,g),this._currentTouchCount=g.length}_start(l){this._lastPoints=l,ep(l[0].sub(l[1]))&&(this._valid=!1)}_move(l,h,g){if(this._map._cooperativeGestures&&this._currentTouchCount<3)return;const b=l[0].sub(this._lastPoints[0]),P=l[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(b,P,g.timeStamp),this._valid?(this._lastPoints=l,this._active=!0,{pitchDelta:(b.y+P.y)/2*-.5}):void 0}gestureBeginsVertically(l,h,g){if(this._valid!==void 0)return this._valid;const b=l.mag()>=2,P=h.mag()>=2;if(!b&&!P)return;if(!b||!P)return this._firstMove===void 0&&(this._firstMove=g),g-this._firstMove<100&&void 0;const z=l.y>0==h.y>0;return ep(l)&&ep(h)&&z}}const gg={panStep:100,bearingStep:15,pitchStep:10};class yg{constructor(){const l=gg;this._panStep=l.panStep,this._bearingStep=l.bearingStep,this._pitchStep=l.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(l){if(l.altKey||l.ctrlKey||l.metaKey)return;let h=0,g=0,b=0,P=0,z=0;switch(l.keyCode){case 61:case 107:case 171:case 187:h=1;break;case 189:case 109:case 173:h=-1;break;case 37:l.shiftKey?g=-1:(l.preventDefault(),P=-1);break;case 39:l.shiftKey?g=1:(l.preventDefault(),P=1);break;case 38:l.shiftKey?b=1:(l.preventDefault(),z=-1);break;case 40:l.shiftKey?b=-1:(l.preventDefault(),z=1);break;default:return}return this._rotationDisabled&&(g=0,b=0),{cameraAnimation:$=>{const V=$.getZoom();$.easeTo({duration:300,easeId:"keyboardHandler",easing:C_,zoom:h?Math.round(V)+h*(l.shiftKey?2:1):V,bearing:$.getBearing()+g*this._bearingStep,pitch:$.getPitch()+b*this._pitchStep,offset:[-P*this._panStep,-z*this._panStep],center:$.getCenter()},{originalEvent:l})}}}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 C_(x){return x*(2-x)}const xg=4.000244140625;class rp{constructor(l,h){this._map=l,this._el=l.getCanvasContainer(),this._handler=h,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222,o.bindAll(["_onTimeout"],this)}setZoomRate(l){this._defaultZoomRate=l}setWheelZoomRate(l){this._wheelZoomRate=l}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(l){this.isEnabled()||(this._enabled=!0,this._aroundCenter=l&&l.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}wheel(l){if(!this.isEnabled())return;if(this._map._cooperativeGestures){if(!this._map._metaPress)return;l.preventDefault()}let h=l.deltaMode===WheelEvent.DOM_DELTA_LINE?40*l.deltaY:l.deltaY;const g=o.exported.now(),b=g-(this._lastWheelEventTime||0);this._lastWheelEventTime=g,h!==0&&h%xg==0?this._type="wheel":h!==0&&Math.abs(h)<4?this._type="trackpad":b>400?(this._type=null,this._lastValue=h,this._timeout=setTimeout(this._onTimeout,40,l)):this._type||(this._type=Math.abs(b*h)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,h+=this._lastValue)),l.shiftKey&&h&&(h/=4),this._type&&(this._lastWheelEvent=l,this._delta-=h,this._active||this._start(l)),l.preventDefault()}_onTimeout(l){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(l)}_start(l){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 h=w.mousePos(this._el,l);this._around=o.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(h)),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 l=this._map.transform;if(this._delta!==0){const $=this._type==="wheel"&&Math.abs(this._delta)>xg?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"?l.zoomScale(this._targetZoom):l.scale;this._targetZoom=Math.min(l.maxZoom,Math.max(l.minZoom,l.scaleZoom(W*V))),this._type==="wheel"&&(this._startZoom=l.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const h=typeof this._targetZoom=="number"?this._targetZoom:l.zoom,g=this._startZoom,b=this._easing;let P,z=!1;if(this._type==="wheel"&&g&&b){const $=Math.min((o.exported.now()-this._lastWheelEventTime)/200,1),V=b($);P=o.number(g,h,V),$<1?this._frameId||(this._frameId=!0):z=!0}else P=h,z=!0;return this._active=!0,z&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._handler._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!z,zoomDelta:P-l.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(l){let h=o.ease;if(this._prevEase){const g=this._prevEase,b=(o.exported.now()-g.start)/g.duration,P=g.easing(b+.01)-g.easing(b),z=.27/Math.sqrt(P*P+1e-4)*.01,$=Math.sqrt(.0729-z*z);h=o.bezier(z,$,.25,1)}return this._prevEase={start:o.exported.now(),duration:l,easing:h},h}reset(){this._active=!1}}class np{constructor(l,h){this._clickZoom=l,this._tapZoom=h}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 ip{constructor(){this.reset()}reset(){this._active=!1}dblclick(l,h){return l.preventDefault(),{cameraAnimation:g=>{g.easeTo({duration:300,zoom:g.getZoom()+(l.shiftKey?-1:1),around:g.unproject(h)},{originalEvent:l})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class op{constructor(){this._tap=new Qh({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()}touchstart(l,h,g){this._swipePoint||(this._tapTime&&l.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?g.length>0&&(this._swipePoint=h[0],this._swipeTouch=g[0].identifier):this._tap.touchstart(l,h,g))}touchmove(l,h,g){if(this._tapTime){if(this._swipePoint){if(g[0].identifier!==this._swipeTouch)return;const b=h[0],P=b.y-this._swipePoint.y;return this._swipePoint=b,l.preventDefault(),this._active=!0,{zoomDelta:P/128}}}else this._tap.touchmove(l,h,g)}touchend(l,h,g){this._tapTime?this._swipePoint&&g.length===0&&this.reset():this._tap.touchend(l,h,g)&&(this._tapTime=l.timeStamp)}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class uo{constructor(l,h,g){this._el=l,this._mousePan=h,this._touchPan=g}enable(l){this._inertiaOptions=l||{},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 Ps{constructor(l,h,g){this._pitchWithRotate=l.pitchWithRotate,this._mouseRotate=h,this._mousePitch=g}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 _g{constructor(l,h,g,b){this._el=l,this._touchZoom=h,this._touchRotate=g,this._tapDragZoom=b,this._rotationDisabled=!1,this._enabled=!0}enable(l){this._touchZoom.enable(l),this._rotationDisabled||this._touchRotate.enable(l),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 nu=x=>x.zoom||x.drag||x.pitch||x.rotate;class ap extends o.Event{}function Sc(x){return x.panDelta&&x.panDelta.mag()||x.zoomDelta||x.bearingDelta||x.pitchDelta}class bg{constructor(l,h){this._map=l,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new pg(l),this._bearingSnap=h.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(h),o.bindAll(["handleEvent","handleWindowEvent"],this);const g=this._el;this._listeners=[[g,"touchstart",{passive:!0}],[g,"touchmove",{passive:!1}],[g,"touchend",void 0],[g,"touchcancel",void 0],[g,"mousedown",void 0],[g,"mousemove",void 0],[g,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[g,"mouseover",void 0],[g,"mouseout",void 0],[g,"dblclick",void 0],[g,"click",void 0],[g,"keydown",{capture:!1}],[g,"keyup",void 0],[g,"wheel",{passive:!1}],[g,"contextmenu",void 0],[window,"blur",void 0]];for(const[b,P,z]of this._listeners)w.addEventListener(b,P,b===document?this.handleWindowEvent:this.handleEvent,z)}destroy(){for(const[l,h,g]of this._listeners)w.removeEventListener(l,h,l===document?this.handleWindowEvent:this.handleEvent,g)}_addDefaultHandlers(l){const h=this._map,g=h.getCanvasContainer();this._add("mapEvent",new x_(h,l));const b=h.boxZoom=new mg(h,l);this._add("boxZoom",b);const P=new __,z=new ip;h.doubleClickZoom=new np(z,P),this._add("tapZoom",P),this._add("clickZoom",z);const $=new op;this._add("tapDragZoom",$);const V=h.touchPitch=new tp(h);this._add("touchPitch",V);const W=new rs(l),ee=new dr(l);h.dragRotate=new Ps(l,W,ee),this._add("mouseRotate",W,["mousePitch"]),this._add("mousePitch",ee,["mouseRotate"]);const ie=new Cc(l),fe=new vg(l,h);h.dragPan=new uo(g,ie,fe),this._add("mousePan",ie),this._add("touchPan",fe,["touchZoom","touchRotate"]);const Se=new w_,_e=new Jt;h.touchZoomRotate=new _g(g,_e,Se,$),this._add("touchRotate",Se,["touchPan","touchZoom"]),this._add("touchZoom",_e,["touchPan","touchRotate"]);const we=h.scrollZoom=new rp(h,this);this._add("scrollZoom",we,["mousePan"]);const $e=h.keyboard=new yg;this._add("keyboard",$e),this._add("blockableMapEvent",new ks(h));for(const Ue of["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"])l.interactive&&l[Ue]&&h[Ue].enable(l[Ue])}_add(l,h,g){this._handlers.push({handlerName:l,handler:h,allowed:g}),this._handlersById[l]=h}stop(l){if(!this._updatingCamera){for(const{handler:h}of this._handlers)h.reset();this._inertia.clear(),this._fireEvents({},{},l),this._changes=[]}}isActive(){for(const{handler:l}of this._handlers)if(l.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return Boolean(nu(this._eventsInProgress))||this.isZooming()}_blockedByActive(l,h,g){for(const b in l)if(b!==g&&(!h||h.indexOf(b)<0))return!0;return!1}handleWindowEvent(l){this.handleEvent(l,`${l.type}Window`)}_getMapTouches(l){const h=[];for(const g of l)this._el.contains(g.target)&&h.push(g);return h}handleEvent(l,h){if(l.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const g=l.type==="renderFrame"?void 0:l,b={needsRenderFrame:!1},P={},z={},$=l.touches,V=$?this._getMapTouches($):void 0,W=V?w.touchPos(this._el,V):w.mousePos(this._el,l);for(const{handlerName:fe,handler:Se,allowed:_e}of this._handlers){if(!Se.isEnabled())continue;let we;this._blockedByActive(z,_e,fe)?Se.reset():Se[h||l.type]&&(we=Se[h||l.type](l,W,V),this.mergeHandlerResult(b,P,we,fe,g),we&&we.needsRenderFrame&&this._triggerRenderFrame()),(we||Se.isActive())&&(z[fe]=Se)}const ee={};for(const fe in this._previousActiveHandlers)z[fe]||(ee[fe]=g);this._previousActiveHandlers=z,(Object.keys(ee).length||Sc(b))&&(this._changes.push([b,P,ee]),this._triggerRenderFrame()),(Object.keys(z).length||Sc(b))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:ie}=b;ie&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],ie(this._map))}mergeHandlerResult(l,h,g,b,P){if(!g)return;o.extend(l,g);const z={handlerName:b,originalEvent:g.originalEvent||P};g.zoomDelta!==void 0&&(h.zoom=z),g.panDelta!==void 0&&(h.drag=z),g.pitchDelta!==void 0&&(h.pitch=z),g.bearingDelta!==void 0&&(h.rotate=z)}_applyChanges(){const l={},h={},g={};for(const[b,P,z]of this._changes)b.panDelta&&(l.panDelta=(l.panDelta||new o.pointGeometry(0,0))._add(b.panDelta)),b.zoomDelta&&(l.zoomDelta=(l.zoomDelta||0)+b.zoomDelta),b.bearingDelta&&(l.bearingDelta=(l.bearingDelta||0)+b.bearingDelta),b.pitchDelta&&(l.pitchDelta=(l.pitchDelta||0)+b.pitchDelta),b.around!==void 0&&(l.around=b.around),b.pinchAround!==void 0&&(l.pinchAround=b.pinchAround),b.noInertia&&(l.noInertia=b.noInertia),o.extend(h,P),o.extend(g,z);this._updateMapTransform(l,h,g),this._changes=[]}_updateMapTransform(l,h,g){const b=this._map,P=b.transform,z=b.style&&b.style.terrain;if(!(Sc(l)||z&&this._drag))return this._fireEvents(h,g,!0);let{panDelta:$,zoomDelta:V,bearingDelta:W,pitchDelta:ee,around:ie,pinchAround:fe}=l;fe!==void 0&&(ie=fe),b._stop(!0),ie=ie||b.transform.centerPoint;const Se=P.pointLocation($?ie.sub($):ie);W&&(P.bearing+=W),ee&&(P.pitch+=ee),V&&(P.zoom+=V),z?h.drag&&!this._drag?(this._drag={center:P.centerPoint,lngLat:P.pointLocation(ie),point:ie,handlerName:h.drag.handlerName},b.fire(new o.Event("freezeElevation",{freeze:!0}))):this._drag&&g[this._drag.handlerName]?(b.fire(new o.Event("freezeElevation",{freeze:!1})),this._drag=null):h.drag&&this._drag&&(P.center=P.pointLocation(P.centerPoint.sub($))):P.setLocationAtPoint(Se,ie),this._map._update(),l.noInertia||this._inertia.record(l),this._fireEvents(h,g,!0)}_fireEvents(l,h,g){const b=nu(this._eventsInProgress),P=nu(l),z={};for(const ee in l){const{originalEvent:ie}=l[ee];this._eventsInProgress[ee]||(z[`${ee}start`]=ie),this._eventsInProgress[ee]=l[ee]}!b&&P&&this._fireEvent("movestart",P.originalEvent);for(const ee in z)this._fireEvent(ee,z[ee]);P&&this._fireEvent("move",P.originalEvent);for(const ee in l){const{originalEvent:ie}=l[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=h[ie]||fe,$[`${ee}end`]=V)}for(const ee in $)this._fireEvent(ee,$[ee]);const W=nu(this._eventsInProgress);if(g&&(b||P)&&!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(l,h){this._map.fire(new o.Event(l,h?{originalEvent:h}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(l=>{delete this._frameId,this.handleEvent(new ap("renderFrame",{timeStamp:l})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}const jo={extend:(x,...l)=>o.extend(x,...l),run(x){x()},logToElement(x,l=!1,h="log"){const g=window.document.getElementById(h);g&&(l&&(g.innerHTML=""),g.innerHTML+=`<br>${x}`)}};class Dn extends o.Evented{constructor(l,h){super(),this._moving=!1,this._zooming=!1,this.transform=l,this._bearingSnap=h.bearingSnap,o.bindAll(["_renderFrameCallback"],this)}getCenter(){return new o.LngLat(this.transform.center.lng,this.transform.center.lat)}setCenter(l,h){return this.jumpTo({center:l},h)}panBy(l,h,g){return l=o.pointGeometry.convert(l).mult(-1),this.panTo(this.transform.center,o.extend({offset:l},h),g)}panTo(l,h,g){return this.easeTo(o.extend({center:l},h),g)}getZoom(){return this.transform.zoom}setZoom(l,h){return this.jumpTo({zoom:l},h),this}zoomTo(l,h,g){return this.easeTo(o.extend({zoom:l},h),g)}zoomIn(l,h){return this.zoomTo(this.getZoom()+1,l,h),this}zoomOut(l,h){return this.zoomTo(this.getZoom()-1,l,h),this}getBearing(){return this.transform.bearing}setBearing(l,h){return this.jumpTo({bearing:l},h),this}getPadding(){return this.transform.padding}setPadding(l,h){return this.jumpTo({padding:l},h),this}rotateTo(l,h,g){return this.easeTo(o.extend({bearing:l},h),g)}resetNorth(l,h){return this.rotateTo(0,o.extend({duration:1e3},l),h),this}resetNorthPitch(l,h){return this.easeTo(o.extend({bearing:0,pitch:0,duration:1e3},l),h),this}snapToNorth(l,h){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(l,h):this}getPitch(){return this.transform.pitch}setPitch(l,h){return this.jumpTo({pitch:l},h),this}cameraForBounds(l,h){l=o.LngLatBounds.convert(l);const g=h&&h.bearing||0;return this._cameraForBoxAndBearing(l.getNorthWest(),l.getSouthEast(),g,h)}_cameraForBoxAndBearing(l,h,g,b){const P={top:0,bottom:0,right:0,left:0};if(typeof(b=o.extend({padding:P,offset:[0,0],maxZoom:this.transform.maxZoom},b)).padding=="number"){const rt=b.padding;b.padding={top:rt,bottom:rt,right:rt,left:rt}}b.padding=o.extend(P,b.padding);const z=this.transform,$=z.padding,V=z.project(o.LngLat.convert(l)),W=z.project(o.LngLat.convert(h)),ee=V.rotate(-g*Math.PI/180),ie=W.rotate(-g*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=(z.width-($.left+$.right+b.padding.left+b.padding.right))/_e.x,$e=(z.height-($.top+$.bottom+b.padding.top+b.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 Ue=Math.min(z.scaleZoom(z.scale*Math.min(we,$e)),b.maxZoom),et=o.pointGeometry.convert(b.offset),Pe=new o.pointGeometry((b.padding.left-b.padding.right)/2,(b.padding.top-b.padding.bottom)/2).rotate(g*Math.PI/180),at=et.add(Pe).mult(z.scale/z.zoomScale(Ue));return{center:z.unproject(V.add(W).div(2).sub(at)),zoom:Ue,bearing:g}}fitBounds(l,h,g){return this._fitInternal(this.cameraForBounds(l,h),h,g)}fitScreenCoordinates(l,h,g,b,P){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(o.pointGeometry.convert(l)),this.transform.pointLocation(o.pointGeometry.convert(h)),g,b),b,P)}_fitInternal(l,h,g){return l?(delete(h=o.extend(l,h)).padding,h.linear?this.easeTo(h,g):this.flyTo(h,g)):this}jumpTo(l,h){this.stop();const g=this.transform;let b=!1,P=!1,z=!1;return"zoom"in l&&g.zoom!==+l.zoom&&(b=!0,g.zoom=+l.zoom),l.center!==void 0&&(g.center=o.LngLat.convert(l.center)),"bearing"in l&&g.bearing!==+l.bearing&&(P=!0,g.bearing=+l.bearing),"pitch"in l&&g.pitch!==+l.pitch&&(z=!0,g.pitch=+l.pitch),l.padding==null||g.isPaddingEqual(l.padding)||(g.padding=l.padding),this.fire(new o.Event("movestart",h)).fire(new o.Event("move",h)),b&&this.fire(new o.Event("zoomstart",h)).fire(new o.Event("zoom",h)).fire(new o.Event("zoomend",h)),P&&this.fire(new o.Event("rotatestart",h)).fire(new o.Event("rotate",h)).fire(new o.Event("rotateend",h)),z&&this.fire(new o.Event("pitchstart",h)).fire(new o.Event("pitch",h)).fire(new o.Event("pitchend",h)),this.fire(new o.Event("moveend",h))}calculateCameraOptionsFromTo(l,h,g,b=0){const P=o.MercatorCoordinate.fromLngLat(l,h),z=o.MercatorCoordinate.fromLngLat(g,b),$=z.x-P.x,V=z.y-P.y,W=z.z-P.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:z.toLngLat(),zoom:fe,pitch:_e,bearing:Se}}easeTo(l,h){this._stop(!1,l.easeId),((l=o.extend({offset:[0,0],duration:500,easing:o.ease},l)).animate===!1||!l.essential&&o.exported.prefersReducedMotion)&&(l.duration=0);const g=this.transform,b=this.getZoom(),P=this.getBearing(),z=this.getPitch(),$=this.getPadding(),V="zoom"in l?+l.zoom:b,W="bearing"in l?this._normalizeBearing(l.bearing,P):P,ee="pitch"in l?+l.pitch:z,ie="padding"in l?l.padding:g.padding,fe=o.pointGeometry.convert(l.offset);let Se=g.centerPoint.add(fe);const _e=g.pointLocation(Se),we=o.LngLat.convert(l.center||_e);this._normalizeCenter(we);const $e=g.project(_e),Ue=g.project(we).sub($e),et=g.zoomScale(V-b);let Pe,at;l.around&&(Pe=o.LngLat.convert(l.around),at=g.locationPoint(Pe));const rt={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||V!==b,this._rotating=this._rotating||P!==W,this._pitching=this._pitching||ee!==z,this._padding=!g.isPaddingEqual(ie),this._easeId=l.easeId,this._prepareEase(h,l.noMoveStart,rt),this._ease(gt=>{if(this._zooming&&(g.zoom=o.number(b,V,gt)),this._rotating&&(g.bearing=o.number(P,W,gt)),this._pitching&&(g.pitch=o.number(z,ee,gt)),this._padding&&(g.interpolatePadding($,ie,gt),Se=g.centerPoint.add(fe)),Pe)g.setLocationAtPoint(Pe,at);else{const yt=g.zoomScale(g.zoom-b),zt=V>b?Math.min(2,et):Math.max(.5,et),vt=Math.pow(zt,1-gt),nr=g.unproject($e.add(Ue.mult(gt*vt)).mult(yt));g.setLocationAtPoint(g.renderWorldCopies?nr.wrap():nr,Se)}this._fireMoveEvents(h)},gt=>{this._afterEase(h,gt)},l),this}_prepareEase(l,h,g={}){this._moving=!0,this.fire(new o.Event("freezeElevation",{freeze:!0})),h||g.moving||this.fire(new o.Event("movestart",l)),this._zooming&&!g.zooming&&this.fire(new o.Event("zoomstart",l)),this._rotating&&!g.rotating&&this.fire(new o.Event("rotatestart",l)),this._pitching&&!g.pitching&&this.fire(new o.Event("pitchstart",l))}_fireMoveEvents(l){this.fire(new o.Event("move",l)),this._zooming&&this.fire(new o.Event("zoom",l)),this._rotating&&this.fire(new o.Event("rotate",l)),this._pitching&&this.fire(new o.Event("pitch",l))}_afterEase(l,h){if(this._easeId&&h&&this._easeId===h)return;delete this._easeId,this.fire(new o.Event("freezeElevation",{freeze:!1}));const g=this._zooming,b=this._rotating,P=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,g&&this.fire(new o.Event("zoomend",l)),b&&this.fire(new o.Event("rotateend",l)),P&&this.fire(new o.Event("pitchend",l)),this.fire(new o.Event("moveend",l))}flyTo(l,h){if(!l.essential&&o.exported.prefersReducedMotion){const _r=o.pick(l,["center","zoom","bearing","pitch","around"]);return this.jumpTo(_r,h)}this.stop(),l=o.extend({offset:[0,0],speed:1.2,curve:1.42,easing:o.ease},l);const g=this.transform,b=this.getZoom(),P=this.getBearing(),z=this.getPitch(),$=this.getPadding(),V="zoom"in l?o.clamp(+l.zoom,g.minZoom,g.maxZoom):b,W="bearing"in l?this._normalizeBearing(l.bearing,P):P,ee="pitch"in l?+l.pitch:z,ie="padding"in l?l.padding:g.padding,fe=g.zoomScale(V-b),Se=o.pointGeometry.convert(l.offset);let _e=g.centerPoint.add(Se);const we=g.pointLocation(_e),$e=o.LngLat.convert(l.center||we);this._normalizeCenter($e);const Ue=g.project(we),et=g.project($e).sub(Ue);let Pe=l.curve;const at=Math.max(g.width,g.height),rt=at/fe,gt=et.mag();if("minZoom"in l){const _r=o.clamp(Math.min(l.minZoom,b,V),g.minZoom,g.maxZoom),hn=at/g.zoomScale(_r-b);Pe=Math.sqrt(hn/gt*2)}const yt=Pe*Pe;function zt(_r){const hn=(rt*rt-at*at+(_r?-1:1)*yt*yt*gt*gt)/(2*(_r?rt:at)*yt*gt);return Math.log(Math.sqrt(hn*hn+1)-hn)}function vt(_r){return(Math.exp(_r)-Math.exp(-_r))/2}function nr(_r){return(Math.exp(_r)+Math.exp(-_r))/2}const Gt=zt(0);let sr=function(_r){return nr(Gt)/nr(Gt+Pe*_r)},Dr=function(_r){return at*((nr(Gt)*(vt(hn=Gt+Pe*_r)/nr(hn))-vt(Gt))/yt)/gt;var hn},Vr=(zt(1)-Gt)/Pe;if(Math.abs(gt)<1e-6||!isFinite(Vr)){if(Math.abs(at-rt)<1e-6)return this.easeTo(l,h);const _r=rt<at?-1:1;Vr=Math.abs(Math.log(rt/at))/Pe,Dr=function(){return 0},sr=function(hn){return Math.exp(_r*Pe*hn)}}return l.duration="duration"in l?+l.duration:1e3*Vr/("screenSpeed"in l?+l.screenSpeed/Pe:+l.speed),l.maxDuration&&l.duration>l.maxDuration&&(l.duration=0),this._zooming=!0,this._rotating=P!==W,this._pitching=ee!==z,this._padding=!g.isPaddingEqual(ie),this._prepareEase(h,!1),this._ease(_r=>{const hn=_r*Vr,pn=1/sr(hn);g.zoom=_r===1?V:b+g.scaleZoom(pn),this._rotating&&(g.bearing=o.number(P,W,_r)),this._pitching&&(g.pitch=o.number(z,ee,_r)),this._padding&&(g.interpolatePadding($,ie,_r),_e=g.centerPoint.add(Se));const Qr=_r===1?$e:g.unproject(Ue.add(et.mult(Dr(hn))).mult(pn));g.setLocationAtPoint(g.renderWorldCopies?Qr.wrap():Qr,_e),this._fireMoveEvents(h)},()=>this._afterEase(h),l),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(l,h){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const g=this._onEaseEnd;delete this._onEaseEnd,g.call(this,h)}if(!l){const g=this.handlers;g&&g.stop(!1)}return this}_ease(l,h,g){g.animate===!1||g.duration===0?(l(1),h()):(this._easeStart=o.exported.now(),this._easeOptions=g,this._onEaseFrame=l,this._onEaseEnd=h,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_renderFrameCallback(){const l=Math.min((o.exported.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(l)),l<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()}_normalizeBearing(l,h){l=o.wrap(l,-180,180);const g=Math.abs(l-h);return Math.abs(l-360-h)<g&&(l-=360),Math.abs(l+360-h)<g&&(l+=360),l}_normalizeCenter(l){const h=this.transform;if(!h.renderWorldCopies||h.lngRange)return;const g=l.lng-h.center.lng;l.lng+=g>180?-360:g<-180?360:0}}class Ec{constructor(l={}){this.options=l,o.bindAll(["_toggleAttribution","_updateData","_updateCompact","_updateCompactMinimize"],this)}getDefaultPosition(){return"bottom-right"}onAdd(l){return this._map=l,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(l,h){const g=this._map._getUIString(`AttributionControl.${h}`);l.title=g,l.setAttribute("aria-label",g)}_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(l){!l||l.sourceDataType!=="metadata"&&l.sourceDataType!=="visibility"&&l.dataType!=="style"&&l.type!=="terrain"||this._updateAttributions()}_updateAttributions(){if(!this._map.style)return;let l=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?l=l.concat(this.options.customAttribution.map(b=>typeof b!="string"?"":b)):typeof this.options.customAttribution=="string"&&l.push(this.options.customAttribution)),this._map.style.stylesheet){const b=this._map.style.stylesheet;this.styleOwner=b.owner,this.styleId=b.id}const h=this._map.style.sourceCaches;for(const b in h){const P=h[b];if(P.used||P.usedForTerrain){const z=P.getSource();z.attribution&&l.indexOf(z.attribution)<0&&l.push(z.attribution)}}l=l.filter(b=>String(b).trim()),l.sort((b,P)=>b.length-P.length),l=l.filter((b,P)=>{for(let z=P+1;z<l.length;z++)if(l[z].indexOf(b)>=0)return!1;return!0});const g=l.join(" | ");g!==this._attribHTML&&(this._attribHTML=g,l.length?(this._innerContainer.innerHTML=g,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 jd{constructor(l={}){this.options=l,o.bindAll(["_updateCompact"],this)}getDefaultPosition(){return"bottom-left"}onAdd(l){this._map=l,this._compact=this.options&&this.options.compact,this._container=w.create("div","maplibregl-ctrl mapboxgl-ctrl");const h=w.create("a","maplibregl-ctrl-logo mapboxgl-ctrl-logo");return h.target="_blank",h.rel="noopener nofollow",h.href="https://maplibre.org/",h.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),h.setAttribute("rel","noopener nofollow"),this._container.appendChild(h),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 l=this._container.children;if(l.length){const h=l[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&h.classList.add("maplibregl-compact","mapboxgl-compact"):h.classList.remove("maplibregl-compact","mapboxgl-compact")}}}class wg{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(l){const h=++this._id;return this._queue.push({callback:l,id:h,cancelled:!1}),h}remove(l){const h=this._currentlyRunning,g=h?this._queue.concat(h):this._queue;for(const b of g)if(b.id===l)return void(b.cancelled=!0)}run(l=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const h=this._currentlyRunning=this._queue;this._queue=[];for(const g of h)if(!g.cancelled&&(g.callback(l),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}const Cg={"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"},Sg={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},S_={showCompass:!0,showZoom:!0,visualizePitch:!1};class Ea{constructor(l,h,g=!1){this._clickTolerance=10,this.element=h,this.mouseRotate=new rs({clickTolerance:l.dragRotate._mouseRotate._clickTolerance}),this.map=l,g&&(this.mousePitch=new dr({clickTolerance:l.dragRotate._mousePitch._clickTolerance})),o.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),w.addEventListener(h,"mousedown",this.mousedown),w.addEventListener(h,"touchstart",this.touchstart,{passive:!1}),w.addEventListener(h,"touchmove",this.touchmove),w.addEventListener(h,"touchend",this.touchend),w.addEventListener(h,"touchcancel",this.reset)}down(l,h){this.mouseRotate.mousedown(l,h),this.mousePitch&&this.mousePitch.mousedown(l,h),w.disableDrag()}move(l,h){const g=this.map,b=this.mouseRotate.mousemoveWindow(l,h);if(b&&b.bearingDelta&&g.setBearing(g.getBearing()+b.bearingDelta),this.mousePitch){const P=this.mousePitch.mousemoveWindow(l,h);P&&P.pitchDelta&&g.setPitch(g.getPitch()+P.pitchDelta)}}off(){const l=this.element;w.removeEventListener(l,"mousedown",this.mousedown),w.removeEventListener(l,"touchstart",this.touchstart,{passive:!1}),w.removeEventListener(l,"touchmove",this.touchmove),w.removeEventListener(l,"touchend",this.touchend),w.removeEventListener(l,"touchcancel",this.reset),this.offTemp()}offTemp(){w.enableDrag(),w.removeEventListener(window,"mousemove",this.mousemove),w.removeEventListener(window,"mouseup",this.mouseup)}mousedown(l){this.down(o.extend({},l,{ctrlKey:!0,preventDefault:()=>l.preventDefault()}),w.mousePos(this.element,l)),w.addEventListener(window,"mousemove",this.mousemove),w.addEventListener(window,"mouseup",this.mouseup)}mousemove(l){this.move(l,w.mousePos(this.element,l))}mouseup(l){this.mouseRotate.mouseupWindow(l),this.mousePitch&&this.mousePitch.mouseupWindow(l),this.offTemp()}touchstart(l){l.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=w.touchPos(this.element,l.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:()=>l.preventDefault()},this._startPos))}touchmove(l){l.targetTouches.length!==1?this.reset():(this._lastPos=w.touchPos(this.element,l.targetTouches)[0],this.move({preventDefault:()=>l.preventDefault()},this._lastPos))}touchend(l){l.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 kc(x,l,h){if(x=new o.LngLat(x.lng,x.lat),l){const g=new o.LngLat(x.lng-360,x.lat),b=new o.LngLat(x.lng+360,x.lat),P=h.locationPoint(x).distSqr(l);h.locationPoint(g).distSqr(l)<P?x=g:h.locationPoint(b).distSqr(l)<P&&(x=b)}for(;Math.abs(x.lng-h.center.lng)>180;){const g=h.locationPoint(x);if(g.x>=0&&g.y>=0&&g.x<=h.width&&g.y<=h.height)break;x.lng>h.center.lng?x.lng-=360:x.lng+=360}return x}const pr={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 Er(x,l,h){const g=x.classList;for(const b in pr)g.remove(`maplibregl-${h}-anchor-${b}`,`mapboxgl-${h}-anchor-${b}`);g.add(`maplibregl-${h}-anchor-${l}`,`mapboxgl-${h}-anchor-${l}`)}class iu extends o.Evented{constructor(l,h){if(super(),(l instanceof HTMLElement||h)&&(l=o.extend({element:l},h)),o.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=l&&l.anchor||"center",this._color=l&&l.color||"#3FB1CE",this._scale=l&&l.scale||1,this._draggable=l&&l.draggable||!1,this._clickTolerance=l&&l.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=l&&l.rotation||0,this._rotationAlignment=l&&l.rotationAlignment||"auto",this._pitchAlignment=l&&l.pitchAlignment&&l.pitchAlignment!=="auto"?l.pitchAlignment:this._rotationAlignment,l&&l.element)this._element=l.element,this._offset=o.pointGeometry.convert(l&&l.offset||[0,0]);else{this._defaultMarker=!0,this._element=w.create("div"),this._element.setAttribute("aria-label","Map marker");const g=w.createNS("http://www.w3.org/2000/svg","svg"),b=41,P=27;g.setAttributeNS(null,"display","block"),g.setAttributeNS(null,"height",`${b}px`),g.setAttributeNS(null,"width",`${P}px`),g.setAttributeNS(null,"viewBox",`0 0 ${P} ${b}`);const z=w.createNS("http://www.w3.org/2000/svg","g");z.setAttributeNS(null,"stroke","none"),z.setAttributeNS(null,"stroke-width","1"),z.setAttributeNS(null,"fill","none"),z.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 Ue=w.createNS("http://www.w3.org/2000/svg","circle");Ue.setAttributeNS(null,"fill","#FFFFFF"),Ue.setAttributeNS(null,"cx","5.5"),Ue.setAttributeNS(null,"cy","5.5"),Ue.setAttributeNS(null,"r","5.4999962"),we.appendChild($e),we.appendChild(Ue),$.appendChild(V),$.appendChild(ee),$.appendChild(fe),$.appendChild(_e),$.appendChild(we),g.appendChild($),g.setAttributeNS(null,"height",b*this._scale+"px"),g.setAttributeNS(null,"width",P*this._scale+"px"),this._element.appendChild(g),this._offset=o.pointGeometry.convert(l&&l.offset||[0,-14])}this._element.classList.add("maplibregl-marker","mapboxgl-marker"),this._element.addEventListener("dragstart",g=>{g.preventDefault()}),this._element.addEventListener("mousedown",g=>{g.preventDefault()}),Er(this._element,this._anchor,"marker"),this._popup=null}addTo(l){return this.remove(),this._map=l,l.getCanvasContainer().appendChild(this._element),l.on("move",this._update),l.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(l){return this._lngLat=o.LngLat.convert(l),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(l){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),l){if(!("offset"in l.options)){const b=Math.sqrt(Math.pow(13.5,2)/2);l.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[b,-1*(38.1-13.5+b)],"bottom-right":[-b,-1*(38.1-13.5+b)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=l,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(l){const h=l.code,g=l.charCode||l.keyCode;h!=="Space"&&h!=="Enter"&&g!==32&&g!==13||this.togglePopup()}_onMapClick(l){const h=l.originalEvent.target,g=this._element;this._popup&&(h===g||g.contains(h))&&this.togglePopup()}getPopup(){return this._popup}togglePopup(){const l=this._popup;return l?(l.isOpen()?l.remove():l.addTo(this._map),this):this}_update(l){if(!this._map)return;this._map.transform.renderWorldCopies&&(this._lngLat=kc(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);let h="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?h=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(h=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let g="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?g="rotateX(0deg)":this._pitchAlignment==="map"&&(g=`rotateX(${this._map.getPitch()}deg)`),l&&l.type!=="moveend"||(this._pos=this._pos.round()),w.setTransform(this._element,`${pr[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${g} ${h}`),this._map.style&&this._map.style.terrain&&!this._opacityTimeout&&(this._opacityTimeout=setTimeout(()=>{const b=this._map.unproject(this._pos),P=40075016686e-3*Math.abs(Math.cos(this._lngLat.lat*Math.PI/180))/Math.pow(2,this._map.transform.tileZoom+8);this._element.style.opacity=b.distanceTo(this._lngLat)>20*P?"0.2":"1.0",this._opacityTimeout=null},100))}getOffset(){return this._offset}setOffset(l){return this._offset=o.pointGeometry.convert(l),this._update(),this}_onMove(l){if(!this._isDragging){const h=this._clickTolerance||this._map._clickTolerance;this._isDragging=l.point.dist(this._pointerdownPos)>=h}this._isDragging&&(this._pos=l.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(l){this._element.contains(l.originalEvent.target)&&(l.preventDefault(),this._positionDelta=l.point.sub(this._pos).add(this._offset),this._pointerdownPos=l.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(l){return this._draggable=!!l,this._map&&(l?(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(l){return this._rotation=l||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(l){return this._rotationAlignment=l||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(l){return this._pitchAlignment=l&&l!=="auto"?l:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}}const sp={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Ms,Li=0,Is=!1;const ka={maxWidth:100,unit:"metric"};function Eg(x,l,h){const g=h&&h.maxWidth||100,b=x._container.clientHeight/2,P=x.unproject([0,b]),z=x.unproject([g,b]),$=P.distanceTo(z);if(h&&h.unit==="imperial"){const V=3.2808*$;V>5280?Rs(l,g,V/5280,x._getUIString("ScaleControl.Miles")):Rs(l,g,V,x._getUIString("ScaleControl.Feet"))}else h&&h.unit==="nautical"?Rs(l,g,$/1852,x._getUIString("ScaleControl.NauticalMiles")):$>=1e3?Rs(l,g,$/1e3,x._getUIString("ScaleControl.Kilometers")):Rs(l,g,$,x._getUIString("ScaleControl.Meters"))}function Rs(x,l,h,g){const b=function(P){const z=Math.pow(10,`${Math.floor(P)}`.length-1);let $=P/z;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}($),z*$}(h);x.style.width=l*(b/h)+"px",x.innerHTML=`${b}&nbsp;${g}`}const ti={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},ci=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function lp(x){if(x){if(typeof x=="number"){const l=Math.round(Math.sqrt(.5*Math.pow(x,2)));return{center:new o.pointGeometry(0,0),top:new o.pointGeometry(0,x),"top-left":new o.pointGeometry(l,l),"top-right":new o.pointGeometry(-l,l),bottom:new o.pointGeometry(0,-x),"bottom-left":new o.pointGeometry(l,-l),"bottom-right":new o.pointGeometry(-l,-l),left:new o.pointGeometry(x,0),right:new o.pointGeometry(-x,0)}}if(x instanceof o.pointGeometry||Array.isArray(x)){const l=o.pointGeometry.convert(x);return{center:l,top:l,"top-left":l,"top-right":l,bottom:l,"bottom-left":l,"bottom-right":l,left:l,right:l}}return{center:o.pointGeometry.convert(x.center||[0,0]),top:o.pointGeometry.convert(x.top||[0,0]),"top-left":o.pointGeometry.convert(x["top-left"]||[0,0]),"top-right":o.pointGeometry.convert(x["top-right"]||[0,0]),bottom:o.pointGeometry.convert(x.bottom||[0,0]),"bottom-left":o.pointGeometry.convert(x["bottom-left"]||[0,0]),"bottom-right":o.pointGeometry.convert(x["bottom-right"]||[0,0]),left:o.pointGeometry.convert(x.left||[0,0]),right:o.pointGeometry.convert(x.right||[0,0])}}return lp(new o.pointGeometry(0,0))}const al={supported:f,setRTLTextPlugin:o.setRTLTextPlugin,getRTLTextPluginStatus:o.getRTLTextPluginStatus,Map:class extends Dn{constructor(x){var l;if(o.PerformanceUtils.mark(o.PerformanceMarkers.create),(x=o.extend({},Sg,x)).minZoom!=null&&x.maxZoom!=null&&x.minZoom>x.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(x.minPitch!=null&&x.maxPitch!=null&&x.minPitch>x.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(x.minPitch!=null&&x.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(x.maxPitch!=null&&x.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new gc(x.minZoom,x.maxZoom,x.minPitch,x.maxPitch,x.renderWorldCopies),{bearingSnap:x.bearingSnap}),this._interactive=x.interactive,this._cooperativeGestures=x.cooperativeGestures,this._maxTileCacheSize=x.maxTileCacheSize,this._failIfMajorPerformanceCaveat=x.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=x.preserveDrawingBuffer,this._antialias=x.antialias,this._trackResize=x.trackResize,this._bearingSnap=x.bearingSnap,this._refreshExpiredTiles=x.refreshExpiredTiles,this._fadeDuration=x.fadeDuration,this._crossSourceCollisions=x.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=x.collectResourceTiming,this._renderTaskQueue=new wg,this._controls=[],this._mapId=o.uniqueId(),this._locale=o.extend({},Cg,x.locale),this._clickTolerance=x.clickTolerance,this._pixelRatio=(l=x.pixelRatio)!==null&&l!==void 0?l:devicePixelRatio,this._requestManager=new k(x.transformRequest),typeof x.container=="string"){if(this._container=document.getElementById(x.container),!this._container)throw new Error(`Container '${x.container}' not found.`)}else{if(!(x.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=x.container}if(x.maxBounds&&this.setMaxBounds(x.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 bg(this,x),this._cooperativeGestures&&this._setupCooperativeGestures(),this._hash=x.hash&&new cg(typeof x.hash=="string"&&x.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:x.center,zoom:x.zoom,bearing:x.bearing,pitch:x.pitch}),x.bounds&&(this.resize(),this.fitBounds(x.bounds,o.extend({},x.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=x.localIdeographFontFamily,x.style&&this.setStyle(x.style,{localIdeographFontFamily:x.localIdeographFontFamily}),x.attributionControl&&this.addControl(new Ec({customAttribution:x.customAttribution})),x.maplibreLogo&&this.addControl(new jd,x.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",h=>{this._update(h.dataType==="style"),this.fire(new o.Event(`${h.dataType}data`,h))}),this.on("dataloading",h=>{this.fire(new o.Event(`${h.dataType}dataloading`,h))}),this.on("dataabort",h=>{this.fire(new o.Event("sourcedataabort",h))})}_getMapId(){return this._mapId}addControl(x,l){if(l===void 0&&(l=x.getDefaultPosition?x.getDefaultPosition():"top-right"),!x||!x.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 h=x.onAdd(this);this._controls.push(x);const g=this._controlPositions[l];return l.indexOf("bottom")!==-1?g.insertBefore(h,g.firstChild):g.appendChild(h),this}removeControl(x){if(!x||!x.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 l=this._controls.indexOf(x);return l>-1&&this._controls.splice(l,1),x.onRemove(this),this}hasControl(x){return this._controls.indexOf(x)>-1}calculateCameraOptionsFromTo(x,l,h,g){return g==null&&this.style.terrain&&(g=this.transform.getElevation(h,this.style.terrain)),super.calculateCameraOptionsFromTo(x,l,h,g)}resize(x){const l=this._containerDimensions(),h=l[0],g=l[1];this._resizeCanvas(h,g,this.getPixelRatio()),this.transform.resize(h,g),this.painter.resize(h,g,this.getPixelRatio());const b=!this._moving;return b&&(this.stop(),this.fire(new o.Event("movestart",x)).fire(new o.Event("move",x))),this.fire(new o.Event("resize",x)),b&&this.fire(new o.Event("moveend",x)),this}getPixelRatio(){return this._pixelRatio}setPixelRatio(x){const[l,h]=this._containerDimensions();this._pixelRatio=x,this._resizeCanvas(l,h,x),this.painter.resize(l,h,x)}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(x){return this.transform.setMaxBounds(o.LngLatBounds.convert(x)),this._update()}setMinZoom(x){if((x=x==null?-2:x)>=-2&&x<=this.transform.maxZoom)return this.transform.minZoom=x,this._update(),this.getZoom()<x&&this.setZoom(x),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(x){if((x=x==null?22:x)>=this.transform.minZoom)return this.transform.maxZoom=x,this._update(),this.getZoom()>x&&this.setZoom(x),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(x){if((x=x==null?0:x)<0)throw new Error("minPitch must be greater than or equal to 0");if(x>=0&&x<=this.transform.maxPitch)return this.transform.minPitch=x,this._update(),this.getPitch()<x&&this.setPitch(x),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(x){if((x=x==null?60:x)>85)throw new Error("maxPitch must be less than or equal to 85");if(x>=this.transform.minPitch)return this.transform.maxPitch=x,this._update(),this.getPitch()>x&&this.setPitch(x),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(x){return this.transform.renderWorldCopies=x,this._update()}project(x){return this.transform.locationPoint(o.LngLat.convert(x),this.style&&this.style.terrain)}unproject(x){return this.transform.pointLocation(o.pointGeometry.convert(x),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(x,l,h){if(x==="mouseenter"||x==="mouseover"){let g=!1;return{layer:l,listener:h,delegates:{mousemove:P=>{const z=this.getLayer(l)?this.queryRenderedFeatures(P.point,{layers:[l]}):[];z.length?g||(g=!0,h.call(this,new Co(x,this,P.originalEvent,{features:z}))):g=!1},mouseout:()=>{g=!1}}}}if(x==="mouseleave"||x==="mouseout"){let g=!1;return{layer:l,listener:h,delegates:{mousemove:z=>{(this.getLayer(l)?this.queryRenderedFeatures(z.point,{layers:[l]}):[]).length?g=!0:g&&(g=!1,h.call(this,new Co(x,this,z.originalEvent)))},mouseout:z=>{g&&(g=!1,h.call(this,new Co(x,this,z.originalEvent)))}}}}{const g=b=>{const P=this.getLayer(l)?this.queryRenderedFeatures(b.point,{layers:[l]}):[];P.length&&(b.features=P,h.call(this,b),delete b.features)};return{layer:l,listener:h,delegates:{[x]:g}}}}on(x,l,h){if(h===void 0)return super.on(x,l);const g=this._createDelegatedListener(x,l,h);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[x]=this._delegatedListeners[x]||[],this._delegatedListeners[x].push(g);for(const b in g.delegates)this.on(b,g.delegates[b]);return this}once(x,l,h){if(h===void 0)return super.once(x,l);const g=this._createDelegatedListener(x,l,h);for(const b in g.delegates)this.once(b,g.delegates[b]);return this}off(x,l,h){return h===void 0?super.off(x,l):(this._delegatedListeners&&this._delegatedListeners[x]&&(g=>{const b=this._delegatedListeners[x];for(let P=0;P<b.length;P++){const z=b[P];if(z.layer===l&&z.listener===h){for(const $ in z.delegates)this.off($,z.delegates[$]);return b.splice(P,1),this}}})(),this)}queryRenderedFeatures(x,l){if(!this.style)return[];let h;if(l!==void 0||x===void 0||x instanceof o.pointGeometry||Array.isArray(x)||(l=x,x=void 0),l=l||{},(x=x||[[0,0],[this.transform.width,this.transform.height]])instanceof o.pointGeometry||typeof x[0]=="number")h=[o.pointGeometry.convert(x)];else{const g=o.pointGeometry.convert(x[0]),b=o.pointGeometry.convert(x[1]);h=[g,new o.pointGeometry(b.x,g.y),b,new o.pointGeometry(g.x,b.y),g]}return this.style.queryRenderedFeatures(h,l,this.transform)}querySourceFeatures(x,l){return this.style.querySourceFeatures(x,l)}setStyle(x,l){return(l=o.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},l)).diff!==!1&&l.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&x?(this._diffStyle(x,l),this):(this._localIdeographFontFamily=l.localIdeographFontFamily,this._updateStyle(x,l))}setTransformRequest(x){return this._requestManager.setTransformRequest(x),this}_getUIString(x){const l=this._locale[x];if(l==null)throw new Error(`Missing UI string '${x}'`);return l}_updateStyle(x,l){return this.style&&(this.style.setEventedParent(null),this.style._remove()),x?(this.style=new An(this,l||{}),this.style.setEventedParent(this,{style:this.style}),typeof x=="string"?this.style.loadURL(x):this.style.loadJSON(x),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new An(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(x,l){if(typeof x=="string"){const h=this._requestManager.transformRequest(x,o.ResourceType.Style);o.getJSON(h,(g,b)=>{g?this.fire(new o.ErrorEvent(g)):b&&this._updateDiff(b,l)})}else typeof x=="object"&&this._updateDiff(x,l)}_updateDiff(x,l){try{this.style.setState(x)&&this._update(!0)}catch(h){o.warnOnce(`Unable to perform style diff: ${h.message||h.error||h}. Rebuilding the style from scratch.`),this._updateStyle(x,l)}}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(x,l){return this._lazyInitEmptyStyle(),this.style.addSource(x,l),this._update(!0)}isSourceLoaded(x){const l=this.style&&this.style.sourceCaches[x];if(l!==void 0)return l.loaded();this.fire(new o.ErrorEvent(new Error(`There is no source with ID '${x}'`)))}setTerrain(x){return this.style.setTerrain(x),this}getTerrain(){return this.style.terrain&&this.style.terrain.options}areTilesLoaded(){const x=this.style&&this.style.sourceCaches;for(const l in x){const h=x[l]._tiles;for(const g in h){const b=h[g];if(b.state!=="loaded"&&b.state!=="errored")return!1}}return!0}addSourceType(x,l,h){return this._lazyInitEmptyStyle(),this.style.addSourceType(x,l,h)}removeSource(x){return this.style.removeSource(x),this._update(!0)}getSource(x){return this.style.getSource(x)}addImage(x,l,{pixelRatio:h=1,sdf:g=!1,stretchX:b,stretchY:P,content:z}={}){if(this._lazyInitEmptyStyle(),l instanceof HTMLImageElement||o.isImageBitmap(l)){const{width:$,height:V,data:W}=o.exported.getImageData(l);this.style.addImage(x,{data:new o.RGBAImage({width:$,height:V},W),pixelRatio:h,stretchX:b,stretchY:P,content:z,sdf:g,version:0})}else{if(l.width===void 0||l.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}=l,ee=l;this.style.addImage(x,{data:new o.RGBAImage({width:$,height:V},new Uint8Array(W)),pixelRatio:h,stretchX:b,stretchY:P,content:z,sdf:g,version:0,userImage:ee}),ee.onAdd&&ee.onAdd(this,x)}}}updateImage(x,l){const h=this.style.getImage(x);if(!h)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 g=l instanceof HTMLImageElement||o.isImageBitmap(l)?o.exported.getImageData(l):l,{width:b,height:P,data:z}=g;if(b===void 0||P===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(b!==h.data.width||P!==h.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 $=!(l instanceof HTMLImageElement||o.isImageBitmap(l));h.data.replace(z,$),this.style.updateImage(x,h)}hasImage(x){return x?!!this.style.getImage(x):(this.fire(new o.ErrorEvent(new Error("Missing required image id"))),!1)}removeImage(x){this.style.removeImage(x)}loadImage(x,l){o.getImage(this._requestManager.transformRequest(x,o.ResourceType.Image),l)}listImages(){return this.style.listImages()}addLayer(x,l){return this._lazyInitEmptyStyle(),this.style.addLayer(x,l),this._update(!0)}moveLayer(x,l){return this.style.moveLayer(x,l),this._update(!0)}removeLayer(x){return this.style.removeLayer(x),this._update(!0)}getLayer(x){return this.style.getLayer(x)}setLayerZoomRange(x,l,h){return this.style.setLayerZoomRange(x,l,h),this._update(!0)}setFilter(x,l,h={}){return this.style.setFilter(x,l,h),this._update(!0)}getFilter(x){return this.style.getFilter(x)}setPaintProperty(x,l,h,g={}){return this.style.setPaintProperty(x,l,h,g),this._update(!0)}getPaintProperty(x,l){return this.style.getPaintProperty(x,l)}setLayoutProperty(x,l,h,g={}){return this.style.setLayoutProperty(x,l,h,g),this._update(!0)}getLayoutProperty(x,l){return this.style.getLayoutProperty(x,l)}setLight(x,l={}){return this._lazyInitEmptyStyle(),this.style.setLight(x,l),this._update(!0)}getLight(){return this.style.getLight()}setFeatureState(x,l){return this.style.setFeatureState(x,l),this._update()}removeFeatureState(x,l){return this.style.removeFeatureState(x,l),this._update()}getFeatureState(x){return this.style.getFeatureState(x)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let x=0,l=0;return this._container&&(x=this._container.clientWidth||400,l=this._container.clientHeight||300),[x,l]}_setupContainer(){const x=this._container;x.classList.add("maplibregl-map","mapboxgl-map");const l=this._canvasContainer=w.create("div","maplibregl-canvas-container mapboxgl-canvas-container",x);this._interactive&&l.classList.add("maplibregl-interactive","mapboxgl-interactive"),this._canvas=w.create("canvas","maplibregl-canvas mapboxgl-canvas",l),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 h=this._containerDimensions();this._resizeCanvas(h[0],h[1],this.getPixelRatio());const g=this._controlContainer=w.create("div","maplibregl-control-container mapboxgl-control-container",x),b=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(P=>{b[P]=w.create("div",`maplibregl-ctrl-${P} mapboxgl-ctrl-${P}`,g)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_setupCooperativeGestures(){const x=this._container;this._metaPress=!1,this._cooperativeGesturesScreen=w.create("div","maplibregl-cooperative-gesture-screen",x);let l="Control",h=typeof this._cooperativeGestures!="boolean"&&this._cooperativeGestures.windowsHelpText?this._cooperativeGestures.windowsHelpText:"Use Ctrl + scroll to zoom the map";navigator.platform.indexOf("Mac")===0&&(h=typeof this._cooperativeGestures!="boolean"&&this._cooperativeGestures.macHelpText?this._cooperativeGestures.macHelpText:"Use \u2318 + scroll to zoom the map",l="Meta"),this._cooperativeGesturesScreen.innerHTML=`
<div class="maplibregl-desktop-message">${h}</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",g=>{g.key===l&&(this._metaPress=!0)}),document.addEventListener("keyup",g=>{g.key===l&&(this._metaPress=!1)}),this._canvasContainer.addEventListener("wheel",g=>{this._onCooperativeGesture(g,this._metaPress,1)},!1),this._canvasContainer.classList.remove("mapboxgl-touch-drag-pan","maplibregl-touch-drag-pan")}_resizeCanvas(x,l,h){this._canvas.width=h*x,this._canvas.height=h*l,this._canvas.style.width=`${x}px`,this._canvas.style.height=`${l}px`}_setupPainter(){const x=o.extend({},f.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),l=this._canvas.getContext("webgl",x)||this._canvas.getContext("experimental-webgl",x);l?(this.painter=new Yh(l,this.transform),o.exported$1.testSupport(l)):this.fire(new o.ErrorEvent(new Error("Failed to initialize WebGL")))}_contextLost(x){x.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new o.Event("webglcontextlost",{originalEvent:x}))}_contextRestored(x){this._setupPainter(),this.resize(),this._update(),this.fire(new o.Event("webglcontextrestored",{originalEvent:x}))}_onMapScroll(x){if(x.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}_onCooperativeGesture(x,l,h){return!l&&h<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(x){return this.style?(this._styleDirty=this._styleDirty||x,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(x){return this._update(),this._renderTaskQueue.add(x)}_cancelRenderFrame(x){this._renderTaskQueue.remove(x)}_render(x){let l,h=0;const g=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(l=g.createQueryEXT(),g.beginQueryEXT(g.TIME_ELAPSED_EXT,l),h=o.exported.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(x),this._removed)return;let b=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const z=this.transform.zoom,$=o.exported.now();this.style.zoomHistory.update(z,$);const V=new o.EvaluationParameters(z,{now:$,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),W=V.crossFadingFactor();W===1&&W===this._crossFadingFactor||(b=!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()||b)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){const z=o.exported.now()-h;g.endQueryEXT(g.TIME_ELAPSED_EXT,l),setTimeout(()=>{const $=g.getQueryObjectEXT(l,g.QUERY_RESULT_EXT)/1e6;g.deleteQueryEXT(l),this.fire(new o.Event("gpu-timing-frame",{cpuTime:z,gpuTime:$}))},50)}if(this.listens("gpu-timing-layer")){const z=this.painter.collectGpuTimers();setTimeout(()=>{const $=this.painter.queryGpuTimers(z);this.fire(new o.Event("gpu-timing-layer",{layerTimes:$}))},50)}const P=this._sourcesDirty||this._styleDirty||this._placementDirty;return P||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new o.Event("idle")),!this._loaded||this._fullyLoaded||P||(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 l of this._controls)l.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 x=this.painter.context.gl.getExtension("WEBGL_lose_context");x&&x.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(x=>{o.PerformanceUtils.frame(x),this._frame=null,this._render(x)}))}_onWindowOnline(){this._update()}_onWindowResize(x){this._trackResize&&this.resize({originalEvent:x})._update()}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(x){this._showTileBoundaries!==x&&(this._showTileBoundaries=x,this._update())}get showPadding(){return!!this._showPadding}set showPadding(x){this._showPadding!==x&&(this._showPadding=x,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(x){this._showCollisionBoxes!==x&&(this._showCollisionBoxes=x,x?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(x){this._showOverdrawInspector!==x&&(this._showOverdrawInspector=x,this._update())}get repaint(){return!!this._repaint}set repaint(x){this._repaint!==x&&(this._repaint=x,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(x){this._vertices=x,this._update()}_setCacheLimits(x,l){o.setCacheLimits(x,l)}get version(){return"2.4.0"}},NavigationControl:class{constructor(x){this.options=o.extend({},S_,x),this._container=w.create("div","maplibregl-ctrl maplibregl-ctrl-group mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",l=>l.preventDefault()),this.options.showZoom&&(o.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in mapboxgl-ctrl-zoom-in",l=>this._map.zoomIn({},{originalEvent:l})),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",l=>this._map.zoomOut({},{originalEvent:l})),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",l=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:l}):this._map.resetNorth({},{originalEvent:l})}),this._compassIcon=w.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){const x=this._map.getZoom(),l=x===this._map.getMaxZoom(),h=x===this._map.getMinZoom();this._zoomInButton.disabled=l,this._zoomOutButton.disabled=h,this._zoomInButton.setAttribute("aria-disabled",l.toString()),this._zoomOutButton.setAttribute("aria-disabled",h.toString())}_rotateCompassArrow(){const x=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=x}onAdd(x){return this._map=x,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 Ea(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(x,l){const h=w.create("button",x,this._container);return h.type="button",h.addEventListener("click",l),h}_setButtonTitle(x,l){const h=this._map._getUIString(`NavigationControl.${l}`);x.title=h,x.setAttribute("aria-label",h)}},GeolocateControl:class extends o.Evented{constructor(x){super(),this.options=o.extend({},sp,x),o.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}onAdd(x){var l;return this._map=x,this._container=w.create("div","maplibregl-ctrl maplibregl-ctrl-group mapboxgl-ctrl mapboxgl-ctrl-group"),l=this._setupUI,Ms!==void 0?l(Ms):window.navigator.permissions!==void 0?window.navigator.permissions.query({name:"geolocation"}).then(h=>{Ms=h.state!=="denied",l(Ms)}):(Ms=!!window.navigator.geolocation,l(Ms)),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,Li=0,Is=!1}_isOutOfMapMaxBounds(x){const l=this._map.getMaxBounds(),h=x.coords;return l&&(h.longitude<l.getWest()||h.longitude>l.getEast()||h.latitude<l.getSouth()||h.latitude>l.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(x){if(this._map){if(this._isOutOfMapMaxBounds(x))return this._setErrorState(),this.fire(new o.Event("outofmaxbounds",x)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=x,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(x),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(x),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale","mapboxgl-user-location-dot-stale"),this.fire(new o.Event("geolocate",x)),this._finish()}}_updateCamera(x){const l=new o.LngLat(x.coords.longitude,x.coords.latitude),h=x.coords.accuracy,g=this._map.getBearing(),b=o.extend({bearing:g},this.options.fitBoundsOptions);this._map.fitBounds(l.toBounds(h),b,{geolocateSource:!0})}_updateMarker(x){if(x){const l=new o.LngLat(x.coords.longitude,x.coords.latitude);this._accuracyCircleMarker.setLngLat(l).addTo(this._map),this._userLocationDotMarker.setLngLat(l).addTo(this._map),this._accuracy=x.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){const x=this._map._container.clientHeight/2,l=this._map.unproject([0,x]),h=this._map.unproject([1,x]),g=l.distanceTo(h),b=Math.ceil(2*this._accuracy/g);this._circleElement.style.width=`${b}px`,this._circleElement.style.height=`${b}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_onError(x){if(this._map){if(this.options.trackUserLocation)if(x.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 l=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=l,this._geolocateButton.setAttribute("aria-label",l),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(x.code===3&&Is)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",x)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(x){if(this._container.addEventListener("contextmenu",l=>l.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",x===!1){o.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");const l=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=l,this._geolocateButton.setAttribute("aria-label",l)}else{const l=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=l,this._geolocateButton.setAttribute("aria-label",l)}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 iu(this._dotElement),this._circleElement=w.create("div","maplibregl-user-location-accuracy-circle mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new iu({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",l=>{l.geolocateSource||this._watchState!=="ACTIVE_LOCK"||l.originalEvent&&l.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":Li--,Is=!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 x;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Li++,Li>1?(x={maximumAge:6e5,timeout:0},Is=!0):(x=this.options.positionOptions,Is=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,x)}}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:Ec,LogoControl:jd,ScaleControl:class{constructor(x){this.options=o.extend({},ka,x),o.bindAll(["_onMove","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_onMove(){Eg(this._map,this._container,this.options)}onAdd(x){return this._map=x,this._container=w.create("div","maplibregl-ctrl maplibregl-ctrl-scale mapboxgl-ctrl mapboxgl-ctrl-scale",x.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(x){this.options.unit=x,Eg(this._map,this._container,this.options)}},FullscreenControl:class{constructor(x){this._fullscreen=!1,x&&x.container&&(x.container instanceof HTMLElement?this._container=x.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(x){return this._map=x,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 x=this._fullscreenButton=w.create("button","maplibregl-ctrl-fullscreen mapboxgl-ctrl-fullscreen",this._controlContainer);w.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",x).setAttribute("aria-hidden","true"),x.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){const x=this._getTitle();this._fullscreenButton.setAttribute("aria-label",x),this._fullscreenButton.title=x}_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(x){this.options=x,o.bindAll(["_toggleTerrain","_updateTerrainIcon"],this)}onAdd(x){return this._map=x,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(x){super(),this.options=o.extend(Object.create(ti),x),o.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}addTo(x){return this._map&&this.remove(),this._map=x,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(x){return this._lngLat=o.LngLat.convert(x),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(x){return this.setDOMContent(document.createTextNode(x))}setHTML(x){const l=document.createDocumentFragment(),h=document.createElement("body");let g;for(h.innerHTML=x;g=h.firstChild,g;)l.appendChild(g);return this.setDOMContent(l)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(x){return this.options.maxWidth=x,this._update(),this}setDOMContent(x){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(x),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(x){this._container&&this._container.classList.add(x)}removeClassName(x){this._container&&this._container.classList.remove(x)}setOffset(x){return this.options.offset=x,this._update(),this}toggleClassName(x){if(this._container)return this._container.classList.toggle(x)}_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(x){this._update(x.point)}_onMouseMove(x){this._update(x.point)}_onDrag(x){this._update(x.point)}_update(x){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(P=>this._container.classList.add(P)),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=kc(this._lngLat,this._pos,this._map.transform)),this._trackPointer&&!x))return;const l=this._pos=this._trackPointer&&x?x:this._map.project(this._lngLat);let h=this.options.anchor;const g=lp(this.options.offset);if(!h){const P=this._container.offsetWidth,z=this._container.offsetHeight;let $;$=l.y+g.bottom.y<z?["top"]:l.y>this._map.transform.height-z?["bottom"]:[],l.x<P/2?$.push("left"):l.x>this._map.transform.width-P/2&&$.push("right"),h=$.length===0?"bottom":$.join("-")}const b=l.add(g[h]).round();w.setTransform(this._container,`${pr[h]} translate(${b.x}px,${b.y}px)`),Er(this._container,h,"popup")}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const x=this._container.querySelector(ci);x&&x.focus()}_onClose(){this.remove()}},Marker:iu,Style:An,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:ne,RasterTileSource:Q,VectorTileSource:Z,VideoSource:Re,prewarm:function(){It().acquire(Tt)},clearPrewarmedResources:function(){const x=mt;x&&(x.isPreloaded()&&x.numActive()===1?(x.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 Ye.workerCount},set workerCount(x){Ye.workerCount=x},get maxParallelImageRequests(){return o.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(x){o.config.MAX_PARALLEL_IMAGE_REQUESTS=x},clearStorage(x){o.clearTileCache(x)},workerUrl:"",addProtocol(x,l){o.config.REGISTERED_PROTOCOLS[x]=l},removeProtocol(x){delete o.config.REGISTERED_PROTOCOLS[x]}};return jo.extend(al,{isSafari:o.isSafari,getPerformanceMetrics:o.PerformanceUtils.getPerformanceMetrics}),al});var u=i;return u})})(dL);const sme=dL.exports,lme="modulepreload",ume=function(e){return"/"+e},IM={},cme=function(t,r,n){if(!r||r.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(r.map(a=>{if(a=ume(a),a in IM)return;IM[a]=!0;const u=a.endsWith(".css"),o=u?'[rel="stylesheet"]':"";if(!!n)for(let v=i.length-1;v>=0;v--){const y=i[v];if(y.href===a&&(!u||y.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${o}`))return;const p=document.createElement("link");if(p.rel=u?"stylesheet":lme,u||(p.as="script",p.crossOrigin=""),p.href=a,document.head.appendChild(p),u)return new Promise((v,y)=>{p.addEventListener("load",v),p.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>t())},mE=C.exports.createContext(null),dme=e=>{const[t,r]=C.exports.useState({}),n=C.exports.useCallback((a,u="default")=>{r(o=>{if(u==="current")throw new Error("'current' cannot be used as map id");if(o[u])throw new Error(`Multiple maps with the same id: ${u}`);return{...o,[u]:a}})},[]),i=C.exports.useCallback((a="default")=>{r(u=>{if(u[a]){const o={...u};return delete o[a],o}return u})},[]);return S(mE.Provider,{value:{maps:t,onMapMount:n,onMapUnmount:i},children:e.children})};function vE(){var e;const t=(e=C.exports.useContext(mE))===null||e===void 0?void 0:e.maps,r=C.exports.useContext(_d);return C.exports.useMemo(()=>({...t,current:r==null?void 0:r.map}),[t,r])}function fme(e){const t=e.clone();return t.pixelsToGLUnits=e.pixelsToGLUnits,t}function RM(e){return{longitude:e.center.lng,latitude:e.center.lat,zoom:e.zoom,pitch:e.pitch,bearing:e.bearing,padding:e.padding}}function OM(e,t){const r=t.viewState||t;let n=!1;if("longitude"in r&&"latitude"in r){const i=e.center;e.center=new i.constructor(r.longitude,r.latitude),n=n||i!==e.center}if("zoom"in r){const i=e.zoom;e.zoom=r.zoom,n=n||i!==e.zoom}if("bearing"in r){const i=e.bearing;e.bearing=r.bearing,n=n||i!==e.bearing}if("pitch"in r){const i=e.pitch;e.pitch=r.pitch,n=n||i!==e.pitch}return r.padding&&!e.isPaddingEqual(r.padding)&&(n=!0,e.padding=r.padding),n}const hme=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function AM(e){if(!e)return null;if(typeof e=="string"||("toJS"in e&&(e=e.toJS()),!e.layers))return e;const t={};for(const n of e.layers)t[n.id]=n;const r=e.layers.map(n=>{const i=t[n.ref];let a=null;if("interactive"in n&&(a={...n},delete a.interactive),i){a=a||{...n},delete a.ref;for(const u of hme)u in i&&(a[u]=i[u])}return a||n});return{...e,layers:r}}function pme(e,t){const r=Array.isArray(e)?e[0]:e?e.x:0,n=Array.isArray(e)?e[1]:e?e.y:0,i=Array.isArray(t)?t[0]:t?t.x:0,a=Array.isArray(t)?t[1]:t?t.y:0;return r===i&&n===a}function $a(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 r=0;r<e.length;r++)if(!$a(e[r],t[r]))return!1;return!0}else if(Array.isArray(t))return!1;if(typeof e=="object"&&typeof t=="object"){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r)if(!t.hasOwnProperty(i)||!$a(e[i],t[i]))return!1;return!0}return!1}const NM={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"},F2={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"},zM={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"},mme=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],vme=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class Jf{constructor(t,r,n){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 a=this.props[zM[i.type]];a&&a(i)},this._onPointerEvent=i=>{(i.type==="mousemove"||i.type==="mouseout")&&this._updateHover(i);const a=this.props[NM[i.type]];if(a){if(this.props.interactiveLayerIds&&i.type!=="mouseover"&&i.type!=="mouseout"){const u=this._hoveredFeatures||this._map.queryRenderedFeatures(i.point,{layers:this.props.interactiveLayerIds});i.features=u}a(i),delete i.features}},this._onCameraEvent=i=>{if(!this._internalUpdate){const a=this.props[F2[i.type]];a&&a(i)}i.type in this._deferredEvents&&(this._deferredEvents[i.type]=!1)},this._MapClass=t,this.props=r,this._initialize(n)}get map(){return this._map}get transform(){return this._renderTransform}setProps(t){const r=this.props;this.props=t;const n=this._updateSettings(t,r);n&&this._createShadowTransform(this._map);const i=this._updateSize(t),a=this._updateViewState(t,!0);this._updateStyle(t,r),this._updateStyleComponents(t,r),this._updateHandlers(t,r),(n||i||a&&!this._map.isMoving())&&this.redraw()}static reuse(t,r){const n=Jf.savedMaps.pop();if(!n)return null;const i=n.map,a=i.getContainer();for(r.className=a.className;a.childNodes.length>0;)r.appendChild(a.childNodes[0]);i._container=r,n.setProps({...t,styleDiffing:!1}),i.resize();const{initialViewState:u}=t;return u&&(u.bounds?i.fitBounds(u.bounds,{...u.fitBoundsOptions,duration:0}):n._updateViewState(u,!1)),i.isStyleLoaded()?i.fire("load"):i.once("styledata",()=>i.fire("load")),n}_initialize(t){const{props:r}=this,n={...r,...r.initialViewState,accessToken:r.mapboxAccessToken||gme()||null,container:t,style:AM(r.mapStyle)},i=n.initialViewState||n.viewState||n;if(Object.assign(n,{center:[i.longitude||0,i.latitude||0],zoom:i.zoom||0,pitch:i.pitch||0,bearing:i.bearing||0}),r.gl){const p=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=p,r.gl)}const a=new this._MapClass(n);i.padding&&a.setPadding(i.padding),r.cursor&&(a.getCanvas().style.cursor=r.cursor),this._createShadowTransform(a);const u=a._render;a._render=p=>{this._inRender=!0,u.call(a,p),this._inRender=!1};const o=a._renderTaskQueue.run;a._renderTaskQueue.run=p=>{o.call(a._renderTaskQueue,p),this._onBeforeRepaint()},a.on("render",()=>this._onAfterRepaint());const f=a.fire;a.fire=this._fireEvent.bind(this,f),a.on("resize",()=>{this._renderTransform.resize(a.transform.width,a.transform.height)}),a.on("styledata",()=>this._updateStyleComponents(this.props,{})),a.on("sourcedata",()=>this._updateStyleComponents(this.props,{}));for(const p in NM)a.on(p,this._onPointerEvent);for(const p in F2)a.on(p,this._onCameraEvent);for(const p in zM)a.on(p,this._onEvent);this._map=a}recycle(){const r=this.map.getContainer().querySelector("[mapboxgl-children]");r==null||r.remove(),Jf.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 r=fme(t.transform);t.painter.transform=r,this._renderTransform=r}_updateSize(t){const{viewState:r}=t;if(r){const n=this._map;if(r.width!==n.transform.width||r.height!==n.transform.height)return n.resize(),!0}return!1}_updateViewState(t,r){if(this._internalUpdate)return!1;const n=this._map,i=this._renderTransform,{zoom:a,pitch:u,bearing:o}=i,f=n.isMoving();f&&(i.cameraElevationReference="sea");const p=OM(i,{...RM(n.transform),...t});if(f&&(i.cameraElevationReference="ground"),p&&r){const v=this._deferredEvents;v.move=!0,v.zoom||(v.zoom=a!==i.zoom),v.rotate||(v.rotate=o!==i.bearing),v.pitch||(v.pitch=u!==i.pitch)}return f||OM(n.transform,t),p}_updateSettings(t,r){const n=this._map;let i=!1;for(const a of mme)a in t&&!$a(t[a],r[a])&&(i=!0,n[`set${a[0].toUpperCase()}${a.slice(1)}`](t[a]));return i}_updateStyle(t,r){if(t.cursor!==r.cursor&&(this._map.getCanvas().style.cursor=t.cursor),t.mapStyle!==r.mapStyle){const n={diff:t.styleDiffing};return"localIdeographFontFamily"in t&&(n.localIdeographFontFamily=t.localIdeographFontFamily),this._map.setStyle(AM(t.mapStyle),n),!0}return!1}_updateStyleComponents(t,r){const n=this._map;let i=!1;return n.style.loaded()&&("light"in t&&!$a(t.light,r.light)&&(i=!0,n.setLight(t.light)),"fog"in t&&!$a(t.fog,r.fog)&&(i=!0,n.setFog(t.fog)),"terrain"in t&&!$a(t.terrain,r.terrain)&&(!t.terrain||n.getSource(t.terrain.source))&&(i=!0,n.setTerrain(t.terrain))),i}_updateHandlers(t,r){const n=this._map;let i=!1;for(const a of vme){const u=t[a];$a(u,r[a])||(i=!0,u?n[a].enable(u):n[a].disable())}return i}_updateHover(t){var r;const{props:n}=this;if(n.interactiveLayerIds&&(n.onMouseMove||n.onMouseEnter||n.onMouseLeave)){const a=t.type,u=((r=this._hoveredFeatures)===null||r===void 0?void 0:r.length)>0;let o;if(a==="mousemove")try{o=this._map.queryRenderedFeatures(t.point,{layers:n.interactiveLayerIds})}catch{o=[]}else o=[];const f=o.length>0;!f&&u&&(t.type="mouseleave",this._onPointerEvent(t)),this._hoveredFeatures=o,f&&!u&&(t.type="mouseenter",this._onPointerEvent(t)),t.type=a}else this._hoveredFeatures=null}_fireEvent(t,r,n){const i=this._map,a=i.transform,u=typeof r=="string"?r:r.type;return u==="move"&&this._updateViewState(this.props,!1),u in F2&&(typeof r=="object"&&(r.viewState=RM(a)),this._map.isMoving())?(i.transform=this._renderTransform,t.call(i,r,n),i.transform=a,i):(t.call(i,r,n),i)}_onBeforeRepaint(){const t=this._map;this._internalUpdate=!0;for(const n in this._deferredEvents)this._deferredEvents[n]&&t.fire(n);this._internalUpdate=!1;const r=this._map.transform;this._map.transform=this._renderTransform,this._onAfterRepaint=()=>{this._map.transform=r}}}Jf.savedMaps=[];function gme(){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 yme=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"];function xme(e,t){if(!e)return null;const r=e.map,n={getMap:()=>r,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,a)=>{const u=r.transform;r.transform=e.transform;const o=r.queryTerrainElevation(i,a);return r.transform=u,o}};for(const i of _me(r))!(i in n)&&!yme.includes(i)&&(n[i]=r[i].bind(r));return n}function _me(e){const t=new Set;let r=e;for(;r;){for(const n of Object.getOwnPropertyNames(r))n[0]!=="_"&&typeof e[n]=="function"&&n!=="fire"&&n!=="setEventedParent"&&t.add(n);r=Object.getPrototypeOf(r)}return Array.from(t)}const bme=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect,wme=["baseApiUrl","maxParallelImageRequests","workerClass","workerCount","workerUrl"];function Cme(e,t){for(const r of wme)r in t&&(e[r]=t[r]);t.RTLTextPlugin&&e.getRTLTextPluginStatus&&e.getRTLTextPluginStatus()==="unavailable"&&e.setRTLTextPlugin(t.RTLTextPlugin,r=>{r&&console.error(r)},!1)}const _d=C.exports.createContext(null),Sme={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"},gE=C.exports.forwardRef((e,t)=>{const r=C.exports.useContext(mE),[n,i]=C.exports.useState(null),a=C.exports.useRef(),{current:u}=C.exports.useRef({mapLib:null,map:null});C.exports.useEffect(()=>{const f=e.mapLib;let p=!0,v;return Promise.resolve(f||cme(()=>import("./index.764e1a39.js").then(y=>y.i),[])).then(y=>{if(!!p){if(y.Map||(y=y.default),!y||!y.Map)throw new Error("Invalid mapLib");if(y.supported(e))Cme(y,e),e.reuseMaps&&(v=Jf.reuse(e,a.current)),v||(v=new Jf(y.Map,e,a.current)),u.map=xme(v,y),u.mapLib=y,i(v),r==null||r.onMapMount(u.map,e.id);else throw new Error("Map is not supported by this browser")}}).catch(y=>{e.onError({type:"error",target:null,originalEvent:null,error:y})}),()=>{p=!1,v&&(r==null||r.onMapUnmount(e.id),e.reuseMaps?v.recycle():v.destroy())}},[]),bme(()=>{n&&n.setProps(e)}),C.exports.useImperativeHandle(t,()=>u.map,[n]);const o=C.exports.useMemo(()=>({position:"relative",width:"100%",height:"100%",...e.style}),[e.style]);return S("div",{id:e.id,ref:a,style:o,children:n&&S(_d.Provider,{value:u,children:S("div",{"mapboxgl-children":"",children:e.children})})})});gE.displayName="Map";gE.defaultProps=Sme;const Eme=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function bd(e,t){if(!e||!t)return;const r=e.style;for(const n in t){const i=t[n];Number.isFinite(i)&&!Eme.test(n)?r[n]=`${i}px`:r[n]=i}}const kme={draggable:!1,popup:null,rotation:0,rotationAlignment:"auto",pitchAlignment:"auto"};function hL(e){const{map:t,mapLib:r}=C.exports.useContext(_d),n=C.exports.useRef({props:e});n.current.props=e;const i=C.exports.useMemo(()=>{let a=!1;C.exports.Children.forEach(e.children,f=>{f&&(a=!0)});const u={...e,element:a?document.createElement("div"):null},o=new r.Marker(u).setLngLat([e.longitude,e.latitude]);return o.getElement().addEventListener("click",f=>{var p,v;(v=(p=n.current.props).onClick)===null||v===void 0||v.call(p,{type:"click",target:o,originalEvent:f})}),o.on("dragstart",f=>{var p,v;const y=f;y.lngLat=i.getLngLat(),(v=(p=n.current.props).onDragStart)===null||v===void 0||v.call(p,y)}),o.on("drag",f=>{var p,v;const y=f;y.lngLat=i.getLngLat(),(v=(p=n.current.props).onDrag)===null||v===void 0||v.call(p,y)}),o.on("dragend",f=>{var p,v;const y=f;y.lngLat=i.getLngLat(),(v=(p=n.current.props).onDragEnd)===null||v===void 0||v.call(p,y)}),o},[]);return C.exports.useEffect(()=>(i.addTo(t.getMap()),()=>{i.remove()}),[]),C.exports.useEffect(()=>{bd(i.getElement(),e.style)},[e.style]),(i.getLngLat().lng!==e.longitude||i.getLngLat().lat!==e.latitude)&&i.setLngLat([e.longitude,e.latitude]),e.offset&&!pme(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),Qu.exports.createPortal(e.children,i.getElement())}hL.defaultProps=kme;C.exports.memo(hL);function DM(e){return new Set(e?e.trim().split(/\s+/):[])}function Tme(e){const{map:t,mapLib:r}=C.exports.useContext(_d),n=C.exports.useMemo(()=>document.createElement("div"),[]),i=C.exports.useRef({props:e});i.current.props=e;const a=C.exports.useMemo(()=>{const u={...e},o=new r.Popup(u).setLngLat([e.longitude,e.latitude]);return o.once("open",f=>{var p,v;(v=(p=i.current.props).onOpen)===null||v===void 0||v.call(p,f)}),o},[]);if(C.exports.useEffect(()=>{const u=o=>{var f,p;(p=(f=i.current.props).onClose)===null||p===void 0||p.call(f,o)};return a.on("close",u),a.setDOMContent(n).addTo(t.getMap()),()=>{a.off("close",u),a.isOpen()&&a.remove()}},[]),C.exports.useEffect(()=>{bd(a.getElement(),e.style)},[e.style]),a.isOpen()&&((a.getLngLat().lng!==e.longitude||a.getLngLat().lat!==e.latitude)&&a.setLngLat([e.longitude,e.latitude]),e.offset&&!$a(a.options.offset,e.offset)&&a.setOffset(e.offset),(a.options.anchor!==e.anchor||a.options.maxWidth!==e.maxWidth)&&(a.options.anchor=e.anchor,a.setMaxWidth(e.maxWidth)),a.options.className!==e.className)){const u=DM(a.options.className),o=DM(e.className);for(const f of u)o.has(f)||a.removeClassName(f);for(const f of o)u.has(f)||a.addClassName(f);a.options.className=e.className}return Qu.exports.createPortal(e.children,n)}const Pme=C.exports.memo(Tme);function Fv(e,t,r,n){const i=C.exports.useContext(_d),a=C.exports.useMemo(()=>e(i),[]);return C.exports.useEffect(()=>{const u=n||r||t,o=typeof t=="function"&&typeof r=="function"?t:null,f=typeof r=="function"?r:typeof t=="function"?t:null,{map:p}=i;return p.hasControl(a)||(p.addControl(a,u==null?void 0:u.position),o&&o(i)),()=>{f&&f(i),p.hasControl(a)&&p.removeControl(a)}},[]),a}function Mme(e){const t=Fv(({mapLib:r})=>new r.AttributionControl(e),{position:e.position});return C.exports.useEffect(()=>{bd(t._container,e.style)},[e.style]),null}C.exports.memo(Mme);function Ime(e){const t=Fv(({mapLib:r})=>new r.FullscreenControl({container:e.containerId&&document.getElementById(e.containerId)}),{position:e.position});return C.exports.useEffect(()=>{bd(t._controlContainer,e.style)},[e.style]),null}C.exports.memo(Ime);const pL=C.exports.forwardRef((e,t)=>{const r=C.exports.useRef({props:e}),n=Fv(({mapLib:i})=>{const a=new i.GeolocateControl(e),u=a._setupUI;return a._setupUI=o=>{a._container.hasChildNodes()||u(o)},a.on("geolocate",o=>{var f,p;(p=(f=r.current.props).onGeolocate)===null||p===void 0||p.call(f,o)}),a.on("error",o=>{var f,p;(p=(f=r.current.props).onError)===null||p===void 0||p.call(f,o)}),a.on("outofmaxbounds",o=>{var f,p;(p=(f=r.current.props).onOutOfMaxBounds)===null||p===void 0||p.call(f,o)}),a.on("trackuserlocationstart",o=>{var f,p;(p=(f=r.current.props).onTrackUserLocationStart)===null||p===void 0||p.call(f,o)}),a.on("trackuserlocationend",o=>{var f,p;(p=(f=r.current.props).onTrackUserLocationEnd)===null||p===void 0||p.call(f,o)}),a},{position:e.position});return r.current.props=e,C.exports.useImperativeHandle(t,()=>({trigger:()=>n.trigger()}),[]),C.exports.useEffect(()=>{bd(n._container,e.style)},[e.style]),null});pL.displayName="GeolocateControl";C.exports.memo(pL);function Rme(e){const t=Fv(({mapLib:r})=>new r.NavigationControl(e),{position:e.position});return C.exports.useEffect(()=>{bd(t._container,e.style)},[e.style]),null}C.exports.memo(Rme);const Ome={unit:"metric",maxWidth:100};function mL(e){const t=Fv(({mapLib:r})=>new r.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(()=>{bd(t._container,e.style)},[e.style]),null}mL.defaultProps=Ome;C.exports.memo(mL);function S1(e,t){if(!e)throw new Error(t)}let Ame=0;function Nme(e,t,r){if(e.style&&e.style._loaded){const n={...r};return delete n.id,delete n.children,e.addSource(t,n),e.getSource(t)}return null}function zme(e,t,r){S1(t.id===r.id,"source id changed"),S1(t.type===r.type,"source type changed");let n="",i=0;for(const u in t)u!=="children"&&u!=="id"&&!$a(r[u],t[u])&&(n=u,i++);if(!i)return;const a=t.type;if(a==="geojson")e.setData(t.data);else if(a==="image")e.updateImage({url:t.url,coordinates:t.coordinates});else if((a==="canvas"||a==="video")&&i===1&&n==="coordinates")e.setCoordinates(t.coordinates);else if(a==="vector"&&"setUrl"in e)switch(n){case"url":e.setUrl(t.url);break;case"tiles":e.setTiles(t.tiles);break}else console.warn(`Unable to update <Source> prop: ${n}`)}function Tf(e){const t=C.exports.useContext(_d).map.getMap(),r=C.exports.useRef(e),[,n]=C.exports.useState(0),i=C.exports.useMemo(()=>e.id||`jsx-source-${Ame++}`,[]);C.exports.useEffect(()=>{if(t){const u=()=>setTimeout(()=>n(o=>o+1),0);return t.on("styledata",u),u(),()=>{var o;if(t.off("styledata",u),t.style&&t.style._loaded&&t.getSource(i)){const f=(o=t.getStyle())===null||o===void 0?void 0:o.layers;if(f)for(const p of f)p.source===i&&t.removeLayer(p.id);t.removeSource(i)}}}},[t]);let a=t&&t.style&&t.getSource(i);return a?zme(a,e,r.current):a=Nme(t,i,e),r.current=e,a&&C.exports.Children.map(e.children,u=>u&&C.exports.cloneElement(u,{source:i}))||null}function Dme(e,t,r,n){if(S1(r.id===n.id,"layer id changed"),S1(r.type===n.type,"layer type changed"),r.type==="custom"||n.type==="custom")return;const{layout:i={},paint:a={},filter:u,minzoom:o,maxzoom:f,beforeId:p}=r;if(p!==n.beforeId&&e.moveLayer(t,p),i!==n.layout){const v=n.layout||{};for(const y in i)$a(i[y],v[y])||e.setLayoutProperty(t,y,i[y]);for(const y in v)i.hasOwnProperty(y)||e.setLayoutProperty(t,y,void 0)}if(a!==n.paint){const v=n.paint||{};for(const y in a)$a(a[y],v[y])||e.setPaintProperty(t,y,a[y]);for(const y in v)a.hasOwnProperty(y)||e.setPaintProperty(t,y,void 0)}$a(u,n.filter)||e.setFilter(t,u),(o!==n.minzoom||f!==n.maxzoom)&&e.setLayerZoomRange(t,o,f)}function Lme(e,t,r){if(e.style&&e.style._loaded&&(!("source"in r)||e.getSource(r.source))){const n={...r,id:t};delete n.beforeId,e.addLayer(n,r.beforeId)}}let Fme=0;function Ha(e){const t=C.exports.useContext(_d).map.getMap(),r=C.exports.useRef(e),[,n]=C.exports.useState(0),i=C.exports.useMemo(()=>e.id||`jsx-layer-${Fme++}`,[]);if(C.exports.useEffect(()=>{if(t){const u=()=>n(o=>o+1);return t.on("styledata",u),u(),()=>{t.off("styledata",u),t.style&&t.style._loaded&&t.getLayer(i)&&t.removeLayer(i)}}},[t]),t&&t.style&&t.getLayer(i))try{Dme(t,i,e,r.current)}catch(u){console.warn(u)}else Lme(t,i,e);return r.current=e,null}const $me=e=>({updateCounter:-1,toggleUpdateCounter:()=>{e(t=>{t.updateCounter=t.updateCounter===-1?1:-1})}}),vL=ic(oc($me)),yE=({onSuccess:e})=>{const{toggleUpdateCounter:t}=vL();return fpe({mutationFn:r=>_a.put(`/api/placement_points/update_status?${r.toString()}`),onSuccess:()=>{t(),e()}})};function Bme(){for(var e=0,t,r,n="";e<arguments.length;)(t=arguments[e++])&&(r=gL(t))&&(n&&(n+=" "),n+=r);return n}function gL(e){if(typeof e=="string")return e;for(var t,r="",n=0;n<e.length;n++)e[n]&&(t=gL(e[n]))&&(r&&(r+=" "),r+=t);return r}var xE="-";function Vme(e){var t=Ume(e);function r(i){var a=i.split(xE);return a[0]===""&&a.length!==1&&a.shift(),yL(a,t)||jme(i)}function n(i){return e.conflictingClassGroups[i]||[]}return{getClassGroupId:r,getConflictingClassGroupIds:n}}function yL(e,t){var u;if(e.length===0)return t.classGroupId;var r=e[0],n=t.nextPart.get(r),i=n?yL(e.slice(1),n):void 0;if(i)return i;if(t.validators.length!==0){var a=e.join(xE);return(u=t.validators.find(function(o){var f=o.validator;return f(a)}))==null?void 0:u.classGroupId}}var LM=/^\[(.+)\]$/;function jme(e){if(LM.test(e)){var t=LM.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function Ume(e){var t=e.theme,r=e.prefix,n={nextPart:new Map,validators:[]},i=Hme(Object.entries(e.classGroups),r);return i.forEach(function(a){var u=a[0],o=a[1];EC(o,n,u,t)}),n}function EC(e,t,r,n){e.forEach(function(i){if(typeof i=="string"){var a=i===""?t:FM(t,i);a.classGroupId=r;return}if(typeof i=="function"){if(Kme(i)){EC(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(function(u){var o=u[0],f=u[1];EC(f,FM(t,o),r,n)})})}function FM(e,t){var r=e;return t.split(xE).forEach(function(n){r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function Kme(e){return e.isThemeGetter}function Hme(e,t){return t?e.map(function(r){var n=r[0],i=r[1],a=i.map(function(u){return typeof u=="string"?t+u:typeof u=="object"?Object.fromEntries(Object.entries(u).map(function(o){var f=o[0],p=o[1];return[t+f,p]})):u});return[n,a]}):e}function Wme(e){if(e<1)return{get:function(){},set:function(){}};var t=0,r=new Map,n=new Map;function i(a,u){r.set(a,u),t++,t>e&&(t=0,n=r,r=new Map)}return{get:function(u){var o=r.get(u);if(o!==void 0)return o;if((o=n.get(u))!==void 0)return i(u,o),o},set:function(u,o){r.has(u)?r.set(u,o):i(u,o)}}}var xL="!";function qme(e){var t=e.separator||":";return function(n){for(var i=0,a=[],u=0,o=0;o<n.length;o++){var f=n[o];i===0&&f===t[0]&&(t.length===1||n.slice(o,o+t.length)===t)&&(a.push(n.slice(u,o)),u=o+t.length),f==="["?i++:f==="]"&&i--}var p=a.length===0?n:n.substring(u),v=p.startsWith(xL),y=v?p.substring(1):p;return{modifiers:a,hasImportantModifier:v,baseClassName:y}}}function Gme(e){if(e.length<=1)return e;var t=[],r=[];return e.forEach(function(n){var i=n[0]==="[";i?(t.push.apply(t,r.sort().concat([n])),r=[]):r.push(n)}),t.push.apply(t,r.sort()),t}function Zme(e){return{cache:Wme(e.cacheSize),splitModifiers:qme(e),...Vme(e)}}var Xme=/\s+/;function Yme(e,t){var r=t.splitModifiers,n=t.getClassGroupId,i=t.getConflictingClassGroupIds,a=new Set;return e.trim().split(Xme).map(function(u){var o=r(u),f=o.modifiers,p=o.hasImportantModifier,v=o.baseClassName,y=n(v);if(!y)return{isTailwindClass:!1,originalClassName:u};var w=Gme(f).join(":"),k=p?w+xL:w;return{isTailwindClass:!0,modifierId:k,classGroupId:y,originalClassName:u}}).reverse().filter(function(u){if(!u.isTailwindClass)return!0;var o=u.modifierId,f=u.classGroupId,p=o+f;return a.has(p)?!1:(a.add(p),i(f).forEach(function(v){return a.add(o+v)}),!0)}).reverse().map(function(u){return u.originalClassName}).join(" ")}function Qme(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i,a,u=o;function o(p){var v=t[0],y=t.slice(1),w=y.reduce(function(k,T){return T(k)},v());return n=Zme(w),i=n.cache.get,a=n.cache.set,u=f,f(p)}function f(p){var v=i(p);if(v)return v;var y=Yme(p,n);return a(p,y),y}return function(){return u(Bme.apply(null,arguments))}}function ni(e){var t=function(n){return n[e]||[]};return t.isThemeGetter=!0,t}var _L=/^\[(?:([a-z-]+):)?(.+)\]$/i,Jme=/^\d+\/\d+$/,eve=new Set(["px","full","screen"]),tve=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,rve=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh)/,nve=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function us(e){return wm(e)||eve.has(e)||Jme.test(e)||Bc(e)}function Bc(e){return wd(e,"length",lve)}function ive(e){return wd(e,"size",bL)}function ove(e){return wd(e,"position",bL)}function ave(e){return wd(e,"url",uve)}function $2(e){return wd(e,"number",wm)}function wm(e){return!Number.isNaN(Number(e))}function jp(e){return $M(e)||wd(e,"number",$M)}function Ii(e){return _L.test(e)}function Up(){return!0}function pu(e){return tve.test(e)}function sve(e){return wd(e,"",cve)}function wd(e,t,r){var n=_L.exec(e);return n?n[1]?n[1]===t:r(n[2]):!1}function lve(e){return rve.test(e)}function bL(){return!1}function uve(e){return e.startsWith("url(")}function $M(e){return Number.isInteger(Number(e))}function cve(e){return nve.test(e)}function dve(){var e=ni("colors"),t=ni("spacing"),r=ni("blur"),n=ni("brightness"),i=ni("borderColor"),a=ni("borderRadius"),u=ni("borderSpacing"),o=ni("borderWidth"),f=ni("contrast"),p=ni("grayscale"),v=ni("hueRotate"),y=ni("invert"),w=ni("gap"),k=ni("gradientColorStops"),T=ni("inset"),R=ni("margin"),A=ni("opacity"),I=ni("padding"),O=ni("saturate"),N=ni("scale"),L=ni("sepia"),B=ni("skew"),j=ni("space"),G=ni("translate"),H=function(){return["auto","contain","none"]},te=function(){return["auto","hidden","clip","visible","scroll"]},Y=function(){return["auto",t]},le=function(){return["",us]},J=function(){return["auto",wm,Ii]},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"]},ne=function(){return["start","end","center","between","around","evenly"]},de=function(){return["","0",Ii]},oe=function(){return["auto","avoid","all","avoid-page","page","left","right","column"]},ye=function(){return[wm,$2]},Re=function(){return[wm,Ii]};return{cacheSize:500,theme:{colors:[Up],spacing:[us],blur:["none","",pu,Bc],brightness:ye(),borderColor:[e],borderRadius:["none","","full",pu,Bc],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",Ii]}],container:["container"],columns:[{columns:[pu]}],"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(),[Ii])}],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:[T]}],"inset-x":[{"inset-x":[T]}],"inset-y":[{"inset-y":[T]}],top:[{top:[T]}],right:[{right:[T]}],bottom:[{bottom:[T]}],left:[{left:[T]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",jp]}],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",Ii]}],grow:[{grow:de()}],shrink:[{shrink:de()}],order:[{order:["first","last","none",jp]}],"grid-cols":[{"grid-cols":[Up]}],"col-start-end":[{col:["auto",{span:[jp]},Ii]}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":[Up]}],"row-start-end":[{row:["auto",{span:[jp]},Ii]}],"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",Ii]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ii]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:ne()}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:[].concat(ne(),["baseline"])}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(ne(),["baseline","stretch"])}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],pt:[{pt:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],pl:[{pl:[I]}],m:[{m:[R]}],mx:[{mx:[R]}],my:[{my:[R]}],mt:[{mt:[R]}],mr:[{mr:[R]}],mb:[{mb:[R]}],ml:[{ml:[R]}],"space-x":[{"space-x":[j]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[j]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",t]}],"min-w":[{"min-w":["min","max","fit",us]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[pu]},pu,Bc]}],h:[{h:[t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",us]}],"max-h":[{"max-h":[t,"min","max","fit"]}],"font-size":[{text:["base",pu,Bc]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",$2]}],"font-family":[{font:[Up]}],"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",Bc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",us]}],"list-style-type":[{list:["none","disc","decimal",Ii]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(Q(),["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",us]}],"underline-offset":[{"underline-offset":["auto",us]}],"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",Bc]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap"]}],break:[{break:["normal","words","all","keep"]}],content:[{content:["none",Ii]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(Z(),[ove])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ive]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ave]}],"bg-color":[{bg:[e]}],"gradient-from":[{from:[k]}],"gradient-via":[{via:[k]}],"gradient-to":[{to:[k]}],rounded:[{rounded:[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"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":[A]}],"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":[A]}],"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":[us]}],"outline-w":[{outline:[us]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:le()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[us]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",pu,sve]}],"shadow-color":[{shadow:[Up]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":ge()}],"bg-blend":[{"bg-blend":ge()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",pu,Ii]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[y]}],saturate:[{saturate:[O]}],sepia:[{sepia:[L]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v]}],"backdrop-invert":[{"backdrop-invert":[y]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[O]}],"backdrop-sepia":[{"backdrop-sepia":[L]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[u]}],"border-spacing-x":[{"border-spacing-x":[u]}],"border-spacing-y":[{"border-spacing-y":[u]}],"table-layout":[{table:["auto","fixed"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ii]}],duration:[{duration:Re()}],ease:[{ease:["linear","in","out","in-out",Ii]}],delay:[{delay:Re()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ii]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[N]}],"scale-x":[{"scale-x":[N]}],"scale-y":[{"scale-y":[N]}],rotate:[{rotate:[jp,Ii]}],"translate-x":[{"translate-x":[G]}],"translate-y":[{"translate-y":[G]}],"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",Ii]}],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",Ii]}],"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",Ii]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[us,$2]}],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 dd=Qme(dve);const{Text:fve}=GS,Bl=({text:e,className:t,classNameText:r})=>S("div",{className:dd("mb-1",t),children:S(fve,{type:"secondary",className:dd("uppercase text-xs",r),children:e})}),hve=()=>{const{filters:e}=Ui(),{prediction:t,categories:r,region:n}=e,{selection:i}=Qs(),a=Dv(),[u,o]=C.exports.useState(!1),[f,p]=C.exports.useState(!1),{mutate:v}=yE({onSuccess:()=>{a.invalidateQueries(["table",1,e]),o(!1),p(!0)}});return Xe(Ar,{children:[S(_S,{trigger:"click",open:u,onOpenChange:o,content:Xe("div",{className:"p-2",children:[S(Bl,{text:"\u0423\u0432\u0435\u0440\u0435\u043D\u044B, \u0447\u0442\u043E \u0445\u043E\u0442\u0438\u0442\u0435 \u0432\u0437\u044F\u0442\u044C \u043E\u0442\u043E\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u043B\u043E\u043A\u0430\u0446\u0438\u0438 \u0432 \u0440\u0430\u0431\u043E\u0442\u0443?"}),Xe("div",{className:"flex items-center justify-center gap-x-4",children:[S(On,{onClick:()=>o(!1),children:"\u041E\u0442\u043C\u0435\u043D\u0430"}),S(On,{type:"primary",onClick:()=>{const w=new URLSearchParams({status:un.approve,"prediction_current[]":t,"categories[]":r,"included[]":[...i.included],"excluded[]":[...i.excluded]});n&&(n.type==="ao"&&w.append("ao[]",n.id),n.type==="rayon"&&w.append("rayon[]",n.id)),v(w)},children:"\u0414\u0430"})]})]}),children:Xe(On,{type:"primary",block:!0,className:"mt-2",children:[S("span",{className:"mr-1",children:"\u0412\u0437\u044F\u0442\u044C \u0432 \u0440\u0430\u0431\u043E\u0442\u0443"}),S(hD,{})]})}),S(Wte,{title:" ",centered:!0,open:f,footer:[S(On,{type:"primary",onClick:()=>p(!1),children:"\u0425\u043E\u0440\u043E\u0448\u043E"},"ok-button")],children:S(px,{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 pve(e,t,r){r===void 0&&(r={});var n={type:"Feature"};return(r.id===0||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function mve(e,t,r){r===void 0&&(r={});for(var n=0,i=e;n<i.length;n++){var a=i[n];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var u=0;u<a[a.length-1].length;u++)if(a[a.length-1][u]!==a[0][u])throw new Error("First and last Position are not equivalent.")}var o={type:"Polygon",coordinates:e};return pve(o,t,r)}function wL(e,t,r){if(e!==null)for(var n,i,a,u,o,f,p,v=0,y=0,w,k=e.type,T=k==="FeatureCollection",R=k==="Feature",A=T?e.features.length:1,I=0;I<A;I++){p=T?e.features[I].geometry:R?e.geometry:e,w=p?p.type==="GeometryCollection":!1,o=w?p.geometries.length:1;for(var O=0;O<o;O++){var N=0,L=0;if(u=w?p.geometries[O]:p,u!==null){f=u.coordinates;var B=u.type;switch(v=r&&(B==="Polygon"||B==="MultiPolygon")?1:0,B){case null:break;case"Point":if(t(f,y,I,N,L)===!1)return!1;y++,N++;break;case"LineString":case"MultiPoint":for(n=0;n<f.length;n++){if(t(f[n],y,I,N,L)===!1)return!1;y++,B==="MultiPoint"&&N++}B==="LineString"&&N++;break;case"Polygon":case"MultiLineString":for(n=0;n<f.length;n++){for(i=0;i<f[n].length-v;i++){if(t(f[n][i],y,I,N,L)===!1)return!1;y++}B==="MultiLineString"&&N++,B==="Polygon"&&L++}B==="Polygon"&&N++;break;case"MultiPolygon":for(n=0;n<f.length;n++){for(L=0,i=0;i<f[n].length;i++){for(a=0;a<f[n][i].length-v;a++){if(t(f[n][i][a],y,I,N,L)===!1)return!1;y++}L++}N++}break;case"GeometryCollection":for(n=0;n<u.geometries.length;n++)if(wL(u.geometries[n],t,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function kC(e){var t=[1/0,1/0,-1/0,-1/0];return wL(e,function(r){t[0]>r[0]&&(t[0]=r[0]),t[1]>r[1]&&(t[1]=r[1]),t[2]<r[0]&&(t[2]=r[0]),t[3]<r[1]&&(t[3]=r[1])}),t}kC.default=kC;var Th={exports:{}};Th.exports=CL;Th.exports.parse=CL;Th.exports.stringify=SL;var BM=/[-+]?([0-9]*\.[0-9]+|[0-9]+)([eE][-+]?[0-9]+)?/,VM=new RegExp("^"+BM.source+"(\\s"+BM.source+"){1,}");function CL(e){var t=e.split(";"),r=t.pop(),n=(t.shift()||"").split("=").pop(),i=0;function a(O){var N=r.substring(i).match(O);return N?(i+=N[0].length,N[0]):null}function u(O){return O&&n.match(/\d+/)&&(O.crs={type:"name",properties:{name:"urn:ogc:def:crs:EPSG::"+n}}),O}function o(){a(/^\s*/)}function f(){o();for(var O=0,N=[],L=[N],B=N,j;j=a(/^(\()/)||a(/^(\))/)||a(/^(,)/)||a(VM);){if(j==="(")L.push(B),B=[],L[L.length-1].push(B),O++;else if(j===")"){if(B.length===0||(B=L.pop(),!B))return null;if(O--,O===0)break}else if(j===",")B=[],L[L.length-1].push(B);else if(!j.split(/\s/g).some(isNaN))Array.prototype.push.apply(B,j.split(/\s/g).map(parseFloat));else return null;o()}return O!==0?null:N}function p(){for(var O=[],N,L;L=a(VM)||a(/^(,)/);)L===","?(O.push(N),N=[]):L.split(/\s/g).some(isNaN)||(N||(N=[]),Array.prototype.push.apply(N,L.split(/\s/g).map(parseFloat))),o();if(N)O.push(N);else return null;return O.length?O:null}function v(){if(!a(/^(point(\sz)?)/i)||(o(),!a(/^(\()/)))return null;var O=p();return!O||(o(),!a(/^(\))/))?null:{type:"Point",coordinates:O[0]}}function y(){if(!a(/^(multipoint)/i))return null;o();var O=r.substring(r.indexOf("(")+1,r.length-1).replace(/\(/g,"").replace(/\)/g,"");r="MULTIPOINT ("+O+")";var N=f();return N?(o(),{type:"MultiPoint",coordinates:N}):null}function w(){if(!a(/^(multilinestring)/i))return null;o();var O=f();return O?(o(),{type:"MultiLineString",coordinates:O}):null}function k(){if(!a(/^(linestring(\sz)?)/i)||(o(),!a(/^(\()/)))return null;var O=p();return!O||!a(/^(\))/)?null:{type:"LineString",coordinates:O}}function T(){if(!a(/^(polygon(\sz)?)/i))return null;o();var O=f();return O?{type:"Polygon",coordinates:O}:null}function R(){if(!a(/^(multipolygon)/i))return null;o();var O=f();return O?{type:"MultiPolygon",coordinates:O}:null}function A(){var O=[],N;if(!a(/^(geometrycollection)/i)||(o(),!a(/^(\()/)))return null;for(;N=I();)O.push(N),o(),a(/^(,)/),o();return a(/^(\))/)?{type:"GeometryCollection",geometries:O}:null}function I(){return v()||k()||T()||y()||w()||R()||A()}return u(I())}function SL(e){e.type==="Feature"&&(e=e.geometry);function t(u){return u.join(" ")}function r(u){return u.map(t).join(", ")}function n(u){return u.map(r).map(a).join(", ")}function i(u){return u.map(n).map(a).join(", ")}function a(u){return"("+u+")"}switch(e.type){case"Point":return"POINT ("+t(e.coordinates)+")";case"LineString":return"LINESTRING ("+r(e.coordinates)+")";case"Polygon":return"POLYGON ("+n(e.coordinates)+")";case"MultiPoint":return"MULTIPOINT ("+r(e.coordinates)+")";case"MultiPolygon":return"MULTIPOLYGON ("+i(e.coordinates)+")";case"MultiLineString":return"MULTILINESTRING ("+n(e.coordinates)+")";case"GeometryCollection":return"GEOMETRYCOLLECTION ("+e.geometries.map(SL).join(", ")+")";default:throw new Error("stringify requires a valid GeoJSON Feature or geometry object as input")}}const{TreeNode:jM}=eD,vve=e=>e?e.reduce((t,r)=>(t[r.id]=r,t[r.id].type="ao",r.rayons&&r.rayons.forEach(n=>{t[n.id]=n,t[n.id].type="rayon"}),t),{}):{},gve=({disabled:e})=>{const{map:t}=vE(),{filters:{region:r},setRegion:n}=Ui(),[i,a]=C.exports.useState([]),u=C.exports.useMemo(()=>vve(i),[i]),[o,f]=C.exports.useState(!1);C.exports.useEffect(()=>{(async()=>{f(!0);try{const w=await _a.get("/api/ao_rayons");a(w.data)}catch(w){console.error(w)}finally{f(!1)}})()},[]);const p=y=>{if(!y)return;const w=u[y],k=Th.exports(w.polygon),T=mve(k.coordinates[0]),R=kC(T);n({id:y,geometry:T,type:w.type}),t.fitBounds([[R[0],R[1]],[R[2],R[3]]],{padding:20})},v=()=>n(null);return Xe("div",{children:[S(Bl,{text:"\u0410\u041E / \u0440\u0430\u0439\u043E\u043D"}),S(eD,{showSearch:!0,style:{width:"100%"},value:r==null?void 0:r.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:v,notFoundContent:S($s,{image:$s.PRESENTED_IMAGE_SIMPLE,description:"\u041D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E"}),disabled:e,children:i==null?void 0:i.map(y=>{var w;return S(jM,{value:y.id,title:y.name,children:(w=y.rayons)==null?void 0:w.map(k=>S(jM,{value:k.id,title:k.name},k.id))},y.id)})})]})},yve=Object.entries(rL).map(([e,t])=>({value:t,label:t})),xve=({disabled:e})=>{const{filters:t,setCategories:r}=Ui();return Xe("div",{children:[S(Bl,{text:"\u041A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u0438"}),S(Ll,{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:r,options:yve,allowClear:!0,value:t.categories,disabled:e})]})},Cl=({value:e})=>S("span",{className:"text-grey text-xs",children:e}),UM=(e,t)=>{if(Array.isArray(t)){const[r,n]=t;return{...e,[r]:S(Cl,{value:r}),[n]:S(Cl,{value:n})}}else return{...e,[t]:S(Cl,{value:t})}},Gx=({title:e,value:t,onChange:r,onAfterChange:n,min:i=0,max:a=100,range:u=!1,step:o=1,disabled:f=!1,onMouseEnter:p,onMouseLeave:v,showZeroMark:y=!1})=>{const w={[i]:S(Cl,{value:i}),[a]:S(Cl,{value:a})},[k,T]=C.exports.useState(t),[R,A]=C.exports.useState(UM(w,t));C.exports.useEffect(()=>{T(t),A(UM(w,t))},[t]);const I=L=>{if(Array.isArray(L)){const[B,j]=L;A({...w,[B]:S(Cl,{value:B}),[j]:S(Cl,{value:j})})}else A({...w,[L]:S(Cl,{value:L})});n==null||n(L)},O=L=>{T(L),r==null||r(L)},N=y?{...R,0:S(Cl,{value:0})}:R;return Xe("div",{onMouseEnter:p,onMouseLeave:v,children:[S(Bl,{text:e}),S(Mre,{range:u,value:k,marks:N,onChange:O,onAfterChange:I,min:i,max:a,step:o,disabled:f})]})},_ve=({disabled:e,fullRange:t})=>{const{filters:{prediction:r},setPrediction:n}=Ui(),i=a=>n(a);return C.exports.useEffect(()=>{if(!t)return;const a=t.prediction_current[0],u=t.prediction_current[1];r[0]===$l.prediction[0]&&r[1]===$l.prediction[1]&&n([a,u])},[t]),S(Gx,{title:"\u041F\u0440\u043E\u0433\u043D\u043E\u0437\u043D\u044B\u0439 \u0442\u0440\u0430\u0444\u0438\u043A",value:r,onAfterChange:i,min:t==null?void 0:t.prediction_current[0],max:t==null?void 0:t.prediction_current[1],range:!0,disabled:e})},bve=e=>({mode:kn.INITIAL,setMode:t=>{e(r=>{r.mode=t})}}),Js=ic(oc(bve)),wve=({fullRange:e})=>{const{filters:{deltaTraffic:t},setDeltaTraffic:r}=Ui(),n=i=>r(i);return C.exports.useEffect(()=>{if(!e)return;const i=e.delta_current[0],a=e.delta_current[1];t[0]===$l.deltaTraffic[0]&&t[1]===$l.deltaTraffic[1]&&r([i,a])},[e,t]),S(Gx,{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:n,min:e==null?void 0:e.delta_current[0],max:e==null?void 0:e.delta_current[1],range:!0,showZeroMark:!0})},Cve=({fullRange:e})=>{const{filters:{factTraffic:t},setFactTraffic:r}=Ui(),n=i=>r(i);return C.exports.useEffect(()=>{if(!e)return;const i=e.fact[0],a=e.fact[1];t[0]===$l.factTraffic[0]&&t[1]===$l.factTraffic[1]&&r([i,a])},[e,t]),S(Gx,{title:"\u0424\u0430\u043A\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0442\u0440\u0430\u0444\u0438\u043A",value:t,onAfterChange:n,min:e==null?void 0:e.fact[0],max:e==null?void 0:e.fact[1],range:!0})},Sve=({fullRange:e})=>{const{filters:{age:t},setAge:r}=Ui(),n=i=>r(i);return C.exports.useEffect(()=>{if(!e)return;const i=e.age_day[0],a=e.age_day[1];t[0]===$l.age[0]&&t[1]===$l.age[1]&&r([i,a])},[e,t]),S(Gx,{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:n,min:e==null?void 0:e.age_day[0],max:e==null?void 0:e.age_day[1],range:!0})},Eve=({disabled:e})=>{const[t,r]=C.exports.useState(!1),{mode:n}=Js();C.exports.useEffect(()=>{const o=setTimeout(()=>r(!1),1500);return()=>clearTimeout(o)},[t]);const{data:i}=Xa(["max-min"],async()=>{const{data:o}=await _a.get("/api/placement_points/filters/");return o});return S(yo,{title:ppe,placement:"right",open:e&&t,onMouseEnter:()=>{r(!0)},onMouseLeave:()=>{r(!1)},children:Xe("div",{className:"space-y-5",children:[S(gve,{disabled:e}),n===kn.INITIAL&&Xe(Ar,{children:[S(xve,{disabled:e}),S(_ve,{disabled:e,fullRange:i})]}),n===kn.WORKING&&Xe("div",{className:"space-y-12",children:[S(wve,{fullRange:i}),S(Cve,{fullRange:i}),S(Sve,{fullRange:i})]})]})})},kve=()=>{const{data:e,isInitialLoading:t}=qpe(),{data:r,isInitialLoading:n}=Gpe(),i=t||n,{selection:{excluded:a}}=Qs();return Xe("div",{className:"flex items-center justify-between",children:[S("span",{children:"\u041E\u0442\u043E\u0431\u0440\u0430\u043D\u043E \u043B\u043E\u043A\u0430\u0446\u0438\u0439"}),i?S($S,{}):S("span",{children:`${r-a.size} / ${e}`})]})},Tve={[wr.initial]:!0,[wr.approve]:!1,[wr.working]:!1,[wr.filteredWorking]:!1,[wr.cancelled]:!1,[wr.pvz]:!0,[wr.other]:!0},Pve=[wr.pvz,wr.other],Mve=e=>({isVisible:Tve,toggleVisibility:t=>e(r=>{r.isVisible[t]=!r.isVisible[t]}),setLayersVisibility:t=>e(r=>{t.forEach(i=>{r.isVisible[i]=!0}),Object.keys(r.isVisible).filter(i=>!t.includes(i)&&!Pve.includes(i)).forEach(i=>{r.isVisible[i]=!1})})}),el=ic(oc(Mve)),Ive=C.exports.forwardRef(({isCollapsed:e},t)=>{const r=Wpe(),{mode:n}=Js(),{reset:i}=Qs(),{isVisible:a,toggleVisibility:u}=el();return S("div",{className:dd("h-screen p-3 overflow-y-auto shrink-0 border-solid border-border border-0 border-r-[1px] flex flex-col transition-all pt-20",e?"basis-0 px-0 -translate-x-[320px]":"basis-[320px]"),ref:t,children:Xe("div",{className:"space-y-5 flex flex-col justify-between flex-1",children:[Xe("div",{children:[S(Eve,{disabled:r}),n===kn.APPROVE_WORKING&&Xe("div",{className:"mt-4",children:[S(Bl,{text:"\u0421\u0442\u0430\u0442\u0443\u0441\u044B"}),Xe("div",{className:"flex flex-col space-y-2",children:[S(ed,{onChange:()=>u(wr.approve),checked:a[wr.approve],children:"\u0421\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u0438\u0435-\u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430"}),S(ed,{className:"!ml-0",onChange:()=>u(wr.working),checked:a[wr.working],children:"\u0420\u0430\u0431\u043E\u0442\u0430\u0435\u0442"}),S(ed,{className:"!ml-0",onChange:()=>u(wr.cancelled),checked:a[wr.cancelled],children:"\u041E\u0442\u043C\u0435\u043D\u0435\u043D"})]})]}),n===kn.INITIAL&&r?S(On,{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]}),S("div",{children:n===kn.INITIAL&&Xe(Ar,{children:[S(kve,{}),S(hve,{})]})})]})})}),Rve=5,Ove=3,EL="#001cd2",TC="#CC2222",kL="#ff7d00",PC="#006e01",Ave="#b4b4b4",TL="#da11b2",PL="#26a2a2",KM={type:"circle",paint:{"circle-stroke-width":.4,"circle-stroke-color":"#fff","circle-opacity":.8}},Cd=(e=EL,t=Rve)=>({...KM,paint:{...KM.paint,"circle-color":e,"circle-radius":t}}),Kp=Cd(),Nve=Cd(Ave,Ove),zve=Cd(kL),ML=Cd(PC),Dve=Cd(TC),Lve=Cd(TL,4),Fve=Cd(PL,4),IL="#676767",HM={id:"ao",type:"line",source:"ao","source-layer":"public.service_ao",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":IL,"line-width":1.5,"line-opacity":.8}},WM={id:"rayon",type:"line",source:"rayon","source-layer":"public.service_rayon",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":IL,"line-width":.5,"line-opacity":.8}},qM={id:"selected-region",type:"line",source:"selected-region",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":"#CC2222","line-width":4}},$ve={ao:"okrug_id",rayon:"rayon_id"},$v=()=>{const{filters:{region:e}}=Ui();return C.exports.useMemo(()=>e?["==",["get",$ve[e.type]],e.id]:null,[e])},GM=["==",["get","status"],un.initial],Bve=()=>{const{filters:e}=Ui(),{prediction:t,categories:r,region:n}=e,{selection:i}=Qs(),a=[...i.included],u=[...i.excluded],o=$v(),f=["in",["get","id"],["literal",a]],p=["in",["get","id"],["literal",u]],v=[[">=",["get","prediction_current"],t[0]],["<=",["get","prediction_current"],t[1]]],y=r.length>0?["in",["get","category"],["literal",r]]:!0,w=["all",GM,["!",p],["any",n?["all",...v,y,o]:["all",...v,y],f]],k=["all",GM,["!",f],["any",["!",n?["all",...v,y,o]:["all",...v,y]],p]];return{match:w,unmatch:k}},Vve=()=>{const{isVisible:e}=el(),{match:t,unmatch:r}=Bve();return Xe(Ar,{children:[S(Ha,{...Kp,id:wr["initial-unmatch"],source:"points","source-layer":"public.service_placementpoint",layout:{...Kp.layout,visibility:e[wr.initial]?"visible":"none"},filter:r,paint:Nve.paint}),S(Ha,{...Kp,id:wr["initial-match"],source:"points","source-layer":"public.service_placementpoint",layout:{...Kp.layout,visibility:e[wr.initial]?"visible":"none"},filter:t,paint:Kp.paint})]})},ZM=["==",["get","status"],un.approve],jve=()=>{const{isVisible:e}=el(),t=$v(),r=t?["all",ZM,t]:ZM;return S(Ar,{children:S(Ha,{...zve,id:wr.approve,source:"points","source-layer":"public.service_placementpoint",layout:{visibility:e[wr.approve]?"visible":"none"},filter:r})})},B2=["==",["get","status"],un.working],Uve=()=>{const{isVisible:e}=el(),t=$v(),{mode:r}=Js(),n=()=>r===kn.APPROVE_WORKING&&t?["all",B2,t]:B2;return S(Ar,{children:S(Ha,{...ML,id:wr.working,source:"points","source-layer":"public.service_placementpoint",layout:{visibility:e[wr.working]?"visible":"none"},filter:n()})})},XM=["==",["get","status"],un.working],Kve=()=>{const{isVisible:e}=el(),t=$v(),{filters:{deltaTraffic:r,factTraffic:n,age:i}}=Ui(),a=[[">=",["get","delta_current"],r[0]],["<=",["get","delta_current"],r[1]]],u=[[">=",["get","fact"],n[0]],["<=",["get","fact"],n[1]]],o=[[">=",["get","age_day"],i[0]],["<=",["get","age_day"],i[1]]],f=t?["all",XM,...a,...u,...o,t]:["all",XM,...a,...u,...o];return S(Ar,{children:S(Ha,{...ML,id:wr.filteredWorking,source:"points","source-layer":"public.service_placementpoint",layout:{visibility:e[wr.filteredWorking]?"visible":"none"},filter:f})})},V2=["==",["get","status"],un.cancelled],Hve=()=>{const{isVisible:e}=el(),t=$v(),{mode:r}=Js(),n=()=>r===kn.APPROVE_WORKING&&t?["all",V2,t]:V2;return S(Ar,{children:S(Ha,{...Dve,id:wr.cancelled,source:"points","source-layer":"public.service_placementpoint",layout:{visibility:e[wr.cancelled]?"visible":"none"},filter:n()})})},Wve=()=>{const{updateCounter:e}=vL();return S(Ar,{children:Xe(Tf,{id:"points",type:"vector",tiles:[`${bm}/martin/public.service_placementpoint/{z}/{x}/{y}.pbf`],children:[S(Vve,{}),S(jve,{}),S(Uve,{}),S(Kve,{}),S(Hve,{})]},`points-${e}`)})},qve=["==",["get","type"],"\u043F\u0432\u0437"],Gve=()=>{const{isVisible:e}=el();return S(Ar,{children:S(Ha,{...Lve,id:wr.pvz,source:"rivals","source-layer":"public.service_rivals",layout:{visibility:e[wr.pvz]?"visible":"none"},filter:qve})})},Zve=["==",["get","type"],"\u041F\u043E\u0441\u0442\u0430\u043C\u0430\u0442"],Xve=()=>{const{isVisible:e}=el();return S(Ar,{children:S(Ha,{...Fve,id:wr.other,source:"rivals","source-layer":"public.service_rivals",layout:{visibility:e[wr.other]?"visible":"none"},filter:Zve})})},Yve=()=>{const{filters:{prediction:e,region:t}}=Ui();return Xe(Ar,{children:[S(Tf,{id:"ao",type:"vector",tiles:[`${bm}/martin/public.service_ao/{z}/{x}/{y}.pbf`],children:S(Ha,{...HM,layout:{...HM.layout}})}),S(Tf,{id:"rayon",type:"vector",tiles:[`${bm}/martin/public.service_rayon/{z}/{x}/{y}.pbf`],children:S(Ha,{...WM,layout:{...WM.layout}})}),t&&t.geometry&&S(Tf,{id:"selected-region",type:"geojson",data:t.geometry,children:S(Ha,{...qM,layout:{...qM.layout,visibility:t?"visible":"none"}})}),Xe(Tf,{id:"rivals",type:"vector",tiles:[`${bm}/martin/public.service_rivals/{z}/{x}/{y}.pbf`],children:[S(Gve,{}),S(Xve,{})]}),S(Wve,{prediction:e})]})},Qve=({lat:e,lng:t,onClose:r,children:n})=>S(Pme,{longitude:t,latitude:e,onClose:r,closeOnClick:!1,style:{minWidth:"300px"},children:n}),Jve=e=>({clickedPointConfig:null,setClickedPointConfig:(t,r=!0)=>{e(n=>{if(t===null)return n.clickedPointConfig=null,n;n.clickedPointConfig={id:t,shouldSelect:r}})}}),ac=ic(oc(Jve)),ege=[{name:"Id",field:"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",render:e=>Xc[e]},{name:"\u041F\u0440\u043E\u0433\u043D\u043E\u0437\u043D\u044B\u0439 \u0442\u0440\u0430\u0444\u0438\u043A",field:"prediction_current"}],tge=[{name:"Id",field:"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",render:e=>Xc[e]},{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"}],rge=[{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"}],nge=[{name:"\u0418\u043D\u0444\u043E",field:"info"},{name:"\u041A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u044F",field:"type"}],ev=({feature:e,dynamicStatus:t})=>{const r=e.properties.category===rL.residential,n=e.properties.status===un.working,i=e.layer.id===wr.pvz||e.layer.id===wr.other;return S("div",{children:(()=>{if(i)return nge;const u=r?tge:ege;return n?[...u,...rge]:u})().map(({field:u,name:o,render:f})=>{const p=t&&u==="status"?t:e.properties[u],v=f?f(p):p;return Xe(v9,{className:dd("p-1"),children:[S(c1,{className:"font-semibold",span:12,children:o}),S(c1,{span:12,children:v})]},u)})})},ige=({feature:e})=>{const{include:t,selection:r,exclude:n}=Qs(),{setClickedPointConfig:i}=ac(),a=e.layer.id===wr["initial-match"],u=e.properties.id;C.exports.useEffect(()=>i(u,a),[e]);const o=(a||r.included.has(u))&&!r.excluded.has(u);return Xe(Ar,{children:[S(ev,{feature:e}),S(On,{type:"primary",className:"mt-2 mx-auto",block:!0,onClick:()=>{o?n(u):t(u)},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"})]})},oge=[{label:Xc[un.initial],value:un.initial},{label:Xc[un.approve],value:un.approve},{label:Xc[un.working],value:un.working},{label:Xc[un.cancelled],value:un.cancelled}],RL=({value:e,onChange:t,disabled:r})=>S(Ll,{style:{width:250},value:e,onChange:a=>{t(a)},options:oge,disabled:r,placeholder:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0442\u0430\u0442\u0443\u0441",onClick:a=>a.stopPropagation()}),age=({feature:e})=>{const t=e.properties.id,{setClickedPointConfig:r}=ac(),[n,i]=C.exports.useState(e.properties.status);C.exports.useEffect(()=>r(t,!1),[e]);const a=Dv(),{mutate:u}=yE({onSuccess:()=>{a.invalidateQueries(["approve-working-points"])}});return Xe(Ar,{children:[S(ev,{feature:e,dynamicStatus:n}),S("div",{className:"flex justify-center mt-4",children:Xe("div",{className:"flex flex-col items-center",children:[S(Bl,{text:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u0441\u0442\u0430\u0442\u0443\u0441"}),S(RL,{value:n,onChange:f=>{i(f);const p=new URLSearchParams({status:f,"location_ids[]":[t]});u(p)}})]})})]})},sge=({feature:e})=>{const t=e.properties.id,{setClickedPointConfig:r}=ac();return C.exports.useEffect(()=>r(t,!1),[e]),S(ev,{feature:e})},YM=({feature:e})=>{const{mode:t}=Js(),r=e.layer.id===wr.pvz||e.layer.id===wr.other,n=e.layer.id===wr["initial-match"]||e.layer.id===wr["initial-unmatch"];return r?S(ev,{feature:e}):t===kn.APPROVE_WORKING?S(age,{feature:e}):t===kn.WORKING?S(sge,{feature:e}):t===kn.INITIAL&&n?S(ige,{feature:e}):S(ev,{feature:e})},lge=({features:e,onSelect:t})=>S("div",{className:"space-y-2 p-1",children:e.map(r=>Xe(On,{type:r.layer.id===wr["initial-match"]?"primary":"",className:"flex items-center gap-x-1",block:!0,onClick:()=>t(r),children:[S("span",{children:r.properties.id}),S("span",{children:r.properties.category})]},r.properties.id))}),uge=({features:e,lat:t,lng:r,onClose:n})=>{const[i,a]=C.exports.useState(null);return S(Qve,{lat:t,lng:r,onClose:n,children:(()=>e.length===1?S(YM,{feature:e[0]}):i?S(YM,{feature:i}):S(lge,{features:e,onSelect:a}))()})},cge="https://api.mapbox.com/styles/v1/ghermant/cla2nwk5f00el14nxvtjlsi6z/tiles/256/{z}/{x}/{y}@2x?access_token=pk.eyJ1IjoiZ2hlcm1hbnQiLCJhIjoiY2xhMm5zZ3ZrMDF4MDN2bzc5Yjd0ZjZ1dCJ9.fqnvrEqKKBoguR7R6DR7Yw",dge=()=>S(Tf,{type:"raster",id:"basemap",tiles:[cge],tileSize:256,children:S(Ha,{type:"raster",source:"basemap",id:"basemap-layer",paint:{}})});function fge(){const e=async()=>{await _a.post("accounts/logout/"),pE(!1)},{data:t}=Xa(["profile"],async()=>{const{data:r}=await _a.get("/accounts/profile");return r});return S("div",{className:"absolute top-[20px] right-[20px]",children:S(_S,{content:Xe(Ar,{children:[S(Bl,{text:t==null?void 0:t.email,classNameText:"lowercase"}),Xe(On,{type:"primary",block:!0,onClick:e,children:[S("span",{className:"mr-1",children:"\u0412\u044B\u0439\u0442\u0438"}),S(hD,{})]})]}),trigger:"click",placement:"bottomRight",children:S(yo,{title:"\u0412\u044B\u0439\u0442\u0438",placement:"left",children:S(On,{icon:S(mfe,{}),type:"primary",size:"large"})})})})}var hge="Expected a function",QM=0/0,pge="[object Symbol]",mge=/^\s+|\s+$/g,vge=/^[-+]0x[0-9a-f]+$/i,gge=/^0b[01]+$/i,yge=/^0o[0-7]+$/i,xge=parseInt,_ge=typeof Sl=="object"&&Sl&&Sl.Object===Object&&Sl,bge=typeof self=="object"&&self&&self.Object===Object&&self,wge=_ge||bge||Function("return this")(),Cge=Object.prototype,Sge=Cge.toString,Ege=Math.max,kge=Math.min,j2=function(){return wge.Date.now()};function Tge(e,t,r){var n,i,a,u,o,f,p=0,v=!1,y=!1,w=!0;if(typeof e!="function")throw new TypeError(hge);t=JM(t)||0,MC(r)&&(v=!!r.leading,y="maxWait"in r,a=y?Ege(JM(r.maxWait)||0,t):a,w="trailing"in r?!!r.trailing:w);function k(j){var G=n,H=i;return n=i=void 0,p=j,u=e.apply(H,G),u}function T(j){return p=j,o=setTimeout(I,t),v?k(j):u}function R(j){var G=j-f,H=j-p,te=t-G;return y?kge(te,a-H):te}function A(j){var G=j-f,H=j-p;return f===void 0||G>=t||G<0||y&&H>=a}function I(){var j=j2();if(A(j))return O(j);o=setTimeout(I,R(j))}function O(j){return o=void 0,w&&n?k(j):(n=i=void 0,u)}function N(){o!==void 0&&clearTimeout(o),p=0,n=f=i=o=void 0}function L(){return o===void 0?u:O(j2())}function B(){var j=j2(),G=A(j);if(n=arguments,i=this,f=j,G){if(o===void 0)return T(f);if(y)return o=setTimeout(I,t),k(f)}return o===void 0&&(o=setTimeout(I,t)),u}return B.cancel=N,B.flush=L,B}function MC(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Pge(e){return!!e&&typeof e=="object"}function Mge(e){return typeof e=="symbol"||Pge(e)&&Sge.call(e)==pge}function JM(e){if(typeof e=="number")return e;if(Mge(e))return QM;if(MC(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=MC(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(mge,"");var r=gge.test(e);return r||yge.test(e)?xge(e.slice(2),r?2:8):vge.test(e)?QM:+e}var Ige=Tge;const Rge=e=>({popup:null,setPopup:t=>{e(r=>{if(!t)return r.popup=null,r;r.popup=t})}}),OL=ic(oc(Rge)),mu=({color:e,name:t})=>Xe("div",{className:"flex gap-2 items-center",children:[S("span",{className:"rounded-xl w-3 h-3 inline-block",style:{backgroundColor:e}}),S("span",{children:t})]});function Oge(){const{mode:e}=Js();return Xe("div",{className:"absolute bottom-[20px] left-[20px] text-xs text-grey z-10 bg-white-background rounded-xl p-3 space-y-3",children:[e!==kn.WORKING&&Xe("div",{children:[S(Bl,{text:"\u0421\u0442\u0430\u0442\u0443\u0441 \u043B\u043E\u043A\u0430\u0446\u0438\u0438",className:"text-center"}),Xe("div",{className:"space-y-1",children:[e===kn.INITIAL&&Xe(Ar,{children:[S(mu,{name:"\u041A \u0440\u0430\u0441\u0441\u043C\u043E\u0442\u0440\u0435\u043D\u0438\u044E",color:EL}),S(mu,{name:"\u0420\u0430\u0431\u043E\u0442\u0430\u0435\u0442",color:PC}),S(mu,{name:"\u041E\u0442\u043C\u0435\u043D\u0435\u043D",color:TC})]}),e===kn.APPROVE_WORKING&&Xe(Ar,{children:[S(mu,{name:"\u0421\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u0438\u0435-\u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430",color:kL}),S(mu,{name:"\u0420\u0430\u0431\u043E\u0442\u0430\u0435\u0442",color:PC}),S(mu,{name:"\u041E\u0442\u043C\u0435\u043D\u0435\u043D",color:TC})]})]})]}),Xe("div",{children:[S(Bl,{text:"\u041F\u0440\u043E\u0447\u0435\u0435",className:"text-center"}),Xe("div",{className:"space-y-1",children:[S(mu,{name:"\u041F\u0412\u0417",color:TL}),S(mu,{name:"\u041F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u044B \u043F\u0440\u043E\u0447\u0438\u0445 \u0441\u0435\u0442\u0435\u0439",color:PL})]})]})]})}let eI=e=>typeof e=="object"&&e!=null&&e.nodeType===1,tI=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",U2=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let r=getComputedStyle(e,null);return tI(r.overflowY,t)||tI(r.overflowX,t)||(n=>{let i=(a=>{if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!i&&(i.clientHeight<n.scrollHeight||i.clientWidth<n.scrollWidth)})(e)}return!1},Ly=(e,t,r,n,i,a,u,o)=>a<e&&u>t||a>e&&u<t?0:a<=e&&o<=r||u>=t&&o>=r?a-e-n:u>t&&o<r||a<e&&o>r?u-t+i:0,Age=e=>{let t=e.parentElement;return t==null?e.getRootNode().host||null:t},rI=(e,t)=>{var r,n,i,a;if(typeof document>"u")return[];let{scrollMode:u,block:o,inline:f,boundary:p,skipOverflowHiddenElements:v}=t,y=typeof p=="function"?p:J=>J!==p;if(!eI(e))throw new TypeError("Invalid target");let w=document.scrollingElement||document.documentElement,k=[],T=e;for(;eI(T)&&y(T);){if(T=Age(T),T===w){k.push(T);break}T!=null&&T===document.body&&U2(T)&&!U2(document.documentElement)||T!=null&&U2(T,v)&&k.push(T)}let R=(n=(r=window.visualViewport)==null?void 0:r.width)!=null?n:innerWidth,A=(a=(i=window.visualViewport)==null?void 0:i.height)!=null?a:innerHeight,{scrollX:I,scrollY:O}=window,{height:N,width:L,top:B,right:j,bottom:G,left:H}=e.getBoundingClientRect(),te=o==="start"||o==="nearest"?B:o==="end"?G:B+N/2,Y=f==="center"?H+L/2:f==="end"?j:H,le=[];for(let J=0;J<k.length;J++){let Z=k[J],{height:Q,width:ge,top:ne,right:de,bottom:oe,left:ye}=Z.getBoundingClientRect();if(u==="if-needed"&&B>=0&&H>=0&&G<=A&&j<=R&&B>=ne&&G<=oe&&H>=ye&&j<=de)return le;let Re=getComputedStyle(Z),Te=parseInt(Re.borderLeftWidth,10),ke=parseInt(Re.borderTopWidth,10),ze=parseInt(Re.borderRightWidth,10),Ie=parseInt(Re.borderBottomWidth,10),Ne=0,De=0,Ve="offsetWidth"in Z?Z.offsetWidth-Z.clientWidth-Te-ze:0,Ge="offsetHeight"in Z?Z.offsetHeight-Z.clientHeight-ke-Ie:0,je="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-A:o==="nearest"?Ly(O,O+A,A,ke,Ie,O+te,O+te+N,N):te-A/2,De=f==="start"?Y:f==="center"?Y-R/2:f==="end"?Y-R:Ly(I,I+R,R,Te,ze,I+Y,I+Y+L,L),Ne=Math.max(0,Ne+O),De=Math.max(0,De+I);else{Ne=o==="start"?te-ne-ke:o==="end"?te-oe+Ie+Ge:o==="nearest"?Ly(ne,oe,Q,ke,Ie+Ge,te,te+N,N):te-(ne+Q/2)+Ge/2,De=f==="start"?Y-ye-Te:f==="center"?Y-(ye+ge/2)+Ve/2:f==="end"?Y-de+ze+Ve:Ly(ye,de,ge,Te,ze+Ve,Y,Y+L,L);let{scrollLeft:pt,scrollTop:Tt}=Z;Ne=Math.max(0,Math.min(Tt+Ne/ct,Z.scrollHeight-Q/ct+Ge)),De=Math.max(0,Math.min(pt+De/je,Z.scrollWidth-ge/je+Ve)),te+=Tt-Ne,Y+=pt-De}le.push({el:Z,top:Ne,left:De})}return le},Nge=e=>typeof e=="object"&&typeof e.behavior=="function",zge=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function Dge(e,t){if(!e.isConnected||!e.ownerDocument.documentElement.contains(e))return;if(Nge(t))return t.behavior(rI(e,t));let r=typeof t=="boolean"||t==null?void 0:t.behavior;for(let{el:n,top:i,left:a}of rI(e,zge(t)))n.scroll({top:i,left:a,behavior:r})}function Lge(e,t){const r=window.document.createElement("a");r.href=window.URL.createObjectURL(new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})),r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r)}const _E=e=>{Lge("postamates.xlsx",e)},Fge=({provider:e})=>{const[t,r]=C.exports.useState(!1);return e(t,()=>r(!1)),S(yo,{title:"\u0421\u043A\u0430\u0447\u0430\u0442\u044C \u0434\u0430\u043D\u043D\u044B\u0435",children:S(On,{onClick:i=>{i.stopPropagation(),r(!0)},loading:t,disabled:t,children:S(ife,{})})})},$ge={isOpened:!1,fullScreen:!1},Bge=e=>({tableState:$ge,toggleOpened:t=>{e(r=>{r.tableState.isOpened=t[0]==="opened"})},toggleFullScreen:()=>{e(t=>{t.tableState.fullScreen=!t.tableState.fullScreen})},openTable:()=>{e(t=>{t.tableState.isOpened=!0})}}),bE=ic(oc(Bge)),Vge=()=>{const{tableState:{fullScreen:e},toggleFullScreen:t}=bE(),[r,n]=C.exports.useState(!1);return C.exports.useEffect(()=>{const o=setTimeout(()=>n(!1),1500);return()=>clearTimeout(o)},[r]),S(yo,{title:e?"\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C":"\u0420\u0430\u0441\u043A\u0440\u044B\u0442\u044C \u043D\u0430 \u043F\u043E\u043B\u043D\u044B\u0439 \u044D\u043A\u0440\u0430\u043D",placement:"topRight",open:r,children:S(On,{onClick:o=>{o.stopPropagation(),t()},onMouseEnter:()=>{n(!0)},onMouseLeave:()=>{n(!1)},children:e?S(sfe,{}):S(cfe,{})})})},Zx=({leftColumn:e,rightColumn:t,exportProvider:r,classes:n})=>Xe("div",{className:"flex items-center w-full justify-between",children:[Xe("div",{className:n==null?void 0:n.leftColumn,children:[S("span",{className:"py-[5px]",children:"\u0422\u0430\u0431\u043B\u0438\u0446\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043E\u0432"}),e]}),Xe("div",{className:n==null?void 0:n.rightColumn,children:[t,Xe("div",{className:"flex items-center gap-x-1",children:[r&&S(Fge,{provider:r}),S(Vge,{})]})]})]}),wE=tn.memo(({rowSelection:e,data:t,pageSize:r,isClickedPointLoading:n,page:i,onPageChange:a,columns:u,header:o,fullWidth:f,loading:p})=>{const{clickedPointConfig:v}=ac(),{map:y}=vE(),{tableState:w,toggleOpened:k}=bE(),T={y:w.fullScreen?"calc(100vh - 136px)":"200px",x:"max-content"};return C.exports.useEffect(()=>{if(v===null||n)return;const R=document.querySelector(".scroll-row");R&&Dge(R,{behavior:"smooth"})},[v,t]),S(kP,{bordered:!1,onChange:k,activeKey:w.isOpened?"opened":null,children:S(kP.Panel,{header:o||S(Zx,{}),collapsible:w.fullScreen?"disabled":void 0,children:S(Ace,{size:"small",locale:{emptyText:S($s,{description:"\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445"})},pagination:{pageSize:r,current:i,onChange:a,total:t==null?void 0:t.count,showSizeChanger:!1,position:"bottomCenter"},dataSource:t==null?void 0:t.results,columns:u,rowKey:"id",scroll:T,sticky:!0,onRow:R=>({onClick:()=>{const A=Th.exports(R.geometry);y.flyTo({center:[A.coordinates[0],A.coordinates[1]],zoom:13,essential:!0})}}),rowSelection:e,rowClassName:R=>dd("cursor-pointer",R.id===(v==null?void 0:v.id)&&"scroll-row"),"data-fullwidth":f,loading:p})},"opened")})}),Xx=30,jge=(e,t)=>{const{clickedPointConfig:r}=ac(),{data:n,isInitialLoading:i,isFetching:a}=Xa(["clicked-point",r==null?void 0:r.id],async()=>{const u=new URLSearchParams({"location_ids[]":[r.id]}),{data:o}=await _a.get(`/api/placement_points?${u.toString()}`);return o},{enabled:e,onSuccess:t});return{data:n,isLoading:i||a}},CE=(e,t)=>{const[r,n]=C.exports.useState(),[i,a]=C.exports.useState(!1),{data:u,isLoading:o}=jge(i,()=>a(!1)),{clickedPointConfig:f}=ac();return C.exports.useEffect(()=>{!e||n(e)},[e]),C.exports.useEffect(()=>{!e||f===null||e.results.find(v=>v.id===f.id)||a(!0)},[e,f]),C.exports.useEffect(()=>{!u||(t(p=>p+1),n(p=>{if(p)return{...p,count:p.count+1,results:[u.results[0],...p.results]}}))},[u]),C.exports.useEffect(()=>{f===null&&(t(Xx),n(e))},[f,e]),{data:r,isClickedPointLoading:o}},Uge=(e,t)=>{const[r,n]=C.exports.useState(Xx),{filters:i}=Ui(),{prediction:a,categories:u,region:o}=i,{selection:{included:f}}=Qs(),p=[...f],{data:v,isInitialLoading:y}=Xa(["table",e,i,p],async()=>{const T=new URLSearchParams({page:e,page_size:r,"prediction_current[]":a,"status[]":[un.initial],"categories[]":u,"included[]":p});return await Lv(T,o)},{keepPreviousData:!0,onError:T=>{T.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:k}=CE(v,n);return{data:w,pageSize:r,isClickedPointLoading:k,isDataLoading:y}},AL=[{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,render:(e,t)=>Xc[t.status]},{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}],Kge=(e,t)=>{const{filters:r}=Ui(),{prediction:n,status:i,categories:a,region:u}=r,{selection:o}=Qs();return Xa(["export-initial",r,o],async()=>{const f=new URLSearchParams({"prediction_current[]":n,"status[]":i,"categories[]":a,"included[]":[...o.included],"excluded[]":[...o.excluded]});return await hE(f,u)},{enabled:e,onSuccess:_E,onSettled:t})},Hge=({fullWidth:e})=>{const{selection:t,include:r,exclude:n}=Qs(),{clickedPointConfig:i}=ac(),[a,u]=C.exports.useState(1),{data:o,pageSize:f,isClickedPointLoading:p,isDataLoading:v}=Uge(a,()=>u(1)),w={selectedRowKeys:C.exports.useCallback(()=>{var O;const T=(O=o==null?void 0:o.results.map(N=>N.id))!=null?O:[],R=o==null?void 0:o.results.find(N=>N.id===(i==null?void 0:i.id)),A=N=>t.excluded.has(N),I=N=>N===(R==null?void 0:R.id)&&(i==null?void 0:i.shouldSelect)===!1;return[...T.filter(N=>!A(N)&&!I(N)),...t.included]},[o,i,t])(),onSelect:(T,R)=>{const{id:A}=T;R?r(A):n(A)},hideSelectAll:!0},k=C.exports.useCallback(T=>u(T),[]);return S(wE,{rowSelection:w,data:o,onPageChange:k,page:a,pageSize:f,isClickedPointLoading:p,columns:AL,fullWidth:e,header:S(Zx,{exportProvider:Kge}),loading:v})},Wge=(e,t)=>{const{filters:{region:r}}=Ui();return Xa(["export-approve-working",r],async()=>{const n=new URLSearchParams({"status[]":[un.approve,un.working]});return await hE(n,r)},{enabled:e,onSuccess:_E,onSettled:t})},qge=({selectedIds:e,selectedStatus:t})=>{const r=Dv(),{setPopup:n}=OL(),{mutate:i}=yE({onSuccess:()=>{r.invalidateQueries(["approve-working-points"]),n(null)}});return S(On,{type:"primary",onClick:u=>{u.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"})},Gge=({selectedIds:e,onClearSelected:t})=>{const[r,n]=C.exports.useState(un.initial),i=a=>{a.stopPropagation(),t()};return S(Zx,{leftColumn:e.length>0&&Xe(Ar,{children:[S(RL,{value:r,onChange:n}),S(qge,{selectedIds:e,selectedStatus:r})]}),rightColumn:e.length>0&&S(On,{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:Wge})},Zge=({fullWidth:e})=>{const[t,r]=C.exports.useState(Xx),[n,i]=C.exports.useState(1),[a,u]=C.exports.useState([]),{filters:{region:o}}=Ui(),f=()=>u([]),{data:p,isInitialLoading:v}=Xa(["approve-working-points",n,o],async()=>{const R=new URLSearchParams({page:n,page_size:t,"status[]":[un.approve,un.working,un.cancelled]});return await Lv(R,o)},{keepPreviousData:!0}),{data:y,isClickedPointLoading:w}=CE(p,r),k=C.exports.useCallback(R=>i(R),[]);return S(wE,{header:S(Gge,{selectedIds:a,onClearSelected:f}),rowSelection:{selectedRowKeys:a,onChange:R=>u(R),hideSelectAll:!0},data:y,onPageChange:k,page:n,pageSize:t,isClickedPointLoading:w,columns:AL,fullWidth:e,loading:v})},Xge=(e,t)=>{const{filters:{region:r,deltaTraffic:n,factTraffic:i,age:a}}=Ui();return Xa(["export-working",r,n,i,a],async()=>{const u=new URLSearchParams({"status[]":[un.working],"delta_current[]":n,"fact[]":i,"age_day[]":a});return await hE(u,r)},{enabled:e,onSuccess:_E,onSettled:t})},Yge=[{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}],Qge=({fullWidth:e})=>{const[t,r]=C.exports.useState(Xx),[n,i]=C.exports.useState(1),{filters:{region:a,deltaTraffic:u,factTraffic:o,age:f}}=Ui(),{data:p,isInitialLoading:v}=Xa(["working-points",n,a,u,o,f],async()=>{const T=new URLSearchParams({page:n,page_size:t,"status[]":[un.working],"delta_current[]":u,"fact[]":o,"age_day[]":f});return await Lv(T,a)},{keepPreviousData:!0}),{data:y,isClickedPointLoading:w}=CE(p,r),k=C.exports.useCallback(T=>i(T),[]);return S(wE,{data:y,onPageChange:k,page:n,pageSize:t,isClickedPointLoading:w,columns:Yge,fullWidth:e,header:S(Zx,{exportProvider:Xge}),loading:v})},Jge=({fullWidth:e})=>{const{mode:t}=Js();return t===kn.APPROVE_WORKING?S(Zge,{fullWidth:e}):t===kn.WORKING?S(Qge,{fullWidth:e}):S(Hge,{fullWidth:e})},eye=({width:e=24,height:t=24})=>Xe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",width:e,height:t,children:[S("polygon",{points:"23.7,4.1 23.7,6.1 0.1,6.2 0.1,4.1 "}),Xe("g",{children:[S("circle",{cx:"6.3",cy:"5.2",r:"3.1"}),S("circle",{fill:"#fff",cx:"6.3",cy:"5.2",r:"1.4"})]}),S("polygon",{points:"23.6,11.1 23.7,13.1 0,13.1 0,11 "}),Xe("g",{children:[S("circle",{cx:"18.6",cy:"12.1",r:"3.1"}),S("circle",{fill:"#fff",cx:"18.6",cy:"12.1",r:"1.4"})]}),S("polygon",{points:"23.8,18.2 23.9,20.1 0.2,20.2 0.2,18.2 "}),Xe("g",{children:[S("circle",{cx:"10.2",cy:"19.1",r:"3.1"}),S("circle",{fill:"#fff",cx:"10.2",cy:"19.1",r:"1.4"})]})]}),tye=({toggleCollapse:e})=>S(On,{icon:S(eye,{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 NL={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},nI=tn.createContext&&tn.createContext(NL),ju=globalThis&&globalThis.__assign||function(){return ju=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},ju.apply(this,arguments)},rye=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};function zL(e){return e&&e.map(function(t,r){return tn.createElement(t.tag,ju({key:r},t.attr),zL(t.child))})}function nye(e){return function(t){return S(iye,{...ju({attr:ju({},e.attr)},t),children:zL(e.child)})}}function iye(e){var t=function(r){var n=e.attr,i=e.size,a=e.title,u=rye(e,["attr","size","title"]),o=i||r.size||"1em",f;return r.className&&(f=r.className),e.className&&(f=(f?f+" ":"")+e.className),Xe("svg",{...ju({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,u,{className:f,style:ju(ju({color:e.color||r.color},r.style),e.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),children:[a&&S("title",{children:a}),e.children]})};return nI!==void 0?S(nI.Consumer,{children:function(r){return t(r)}}):t(NL)}function oye(e){return nye({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 aye=()=>{const{toggleVisibility:e,isVisible:t}=el(),{mode:r}=Js();return Xe("div",{className:"space-y-1 flex flex-col",children:[r===kn.INITIAL&&Xe(Ar,{children:[S(Sf,{className:"!ml-0",onChange:()=>e(wr.working),checked:t[wr.working],children:"\u0420\u0430\u0431\u043E\u0442\u0430\u044E\u0449\u0438\u0435 \u043F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u044B"}),S(Sf,{className:"!ml-0",onChange:()=>e(wr.cancelled),checked:t[wr.cancelled],children:"\u041E\u0442\u043C\u0435\u043D\u0435\u043D\u043D\u044B\u0435 \u043B\u043E\u043A\u0430\u0446\u0438\u0438"})]}),S(Sf,{className:"!ml-0",onChange:()=>e(wr.pvz),checked:t[wr.pvz],children:"\u041F\u0412\u0417"}),S(Sf,{className:"!ml-0",onChange:()=>e(wr.other),checked:t[wr.other],children:"\u041F\u043E\u0441\u0442\u0430\u043C\u0430\u0442\u044B \u043F\u0440\u043E\u0447\u0438\u0445 \u0441\u0435\u0442\u0435\u0439"})]})},sye=()=>S(_S,{content:S(aye,{}),trigger:"click",placement:"leftBottom",children:S(yo,{title:"\u0421\u043B\u043E\u0438",children:S(On,{className:"absolute bottom-[20px] right-[20px] flex items-center justify-center p-3",children:S(oye,{className:"w-4 h-4"})})})}),lye=({width:e=40,height:t=40})=>S("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:t,children:Xe("g",{children:[S("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 "}),S("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 "})]})});function uye(e,t){const[r,n]=C.exports.useState(e);return C.exports.useEffect(()=>{const i=setTimeout(()=>n(e),t||500);return()=>{clearTimeout(i)}},[e,t]),r}const cye=()=>{const{map:e}=vE(),[t,r]=C.exports.useState(""),n=uye(t),{data:i}=Xa(["address",n],async()=>(await _a.get(`/api/placement_points/search_address?page_size=100&address=${n}`)).data),a=C.exports.useMemo(()=>i?i.results.map(f=>({label:f.address,value:`${f.address}$${f.id}`,item:f})):[],[i]);return S("div",{children:S(pX,{options:a,style:{width:300},value:t,onChange:f=>{r(f&&f.split("$")[0])},onSelect:(f,p)=>{const v=Th.exports(p.item.geometry);e.flyTo({center:[v.coordinates[0],v.coordinates[1]],zoom:13,essential:!0})},allowClear:!0,onClear:()=>r(""),children:S(Ru,{prefix:S(xfe,{}),placeholder:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441 \u0442\u043E\u0447\u043A\u0438",className:"text-ellipsis"})})})},dye=({width:e=24,height:t=24})=>Xe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:t,children:[S("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 "}),S("polyline",{className:"ai-st0",points:"17.4,3 16.1,4.7 11.5,4.6 "}),S("polyline",{className:"ai-st0",points:"11.2,8.7 16,8.6 19.8,12.3 "}),S("line",{className:"ai-st0",x1:"11.2",y1:"12.2",x2:"13.4",y2:"12.2"}),S("polyline",{className:"ai-st0",points:"11.4,16.6 14.8,16.6 16.4,18.2 "}),Xe("g",{children:[S("circle",{className:"ai-st1",cx:"18.1",cy:"2",r:"1.9"}),S("circle",{className:"ai-st2",cx:"18.1",cy:"1.9",r:"1.1"})]}),Xe("g",{children:[S("circle",{className:"ai-st1",cx:"18.5",cy:"6.5",r:"1.9"}),S("circle",{className:"ai-st2",cx:"18.5",cy:"6.4",r:"1.1"})]}),Xe("g",{children:[S("circle",{className:"ai-st1",cx:"20.8",cy:"13.3",r:"1.9"}),S("circle",{className:"ai-st2",cx:"20.9",cy:"13.3",r:"1.1"})]}),Xe("g",{children:[S("circle",{className:"ai-st1",cx:"15",cy:"12.2",r:"1.9"}),S("circle",{className:"ai-st2",cx:"15",cy:"12.1",r:"1.1"})]}),Xe("g",{children:[S("circle",{className:"ai-st1",cx:"17.4",cy:"19.2",r:"1.9"}),S("circle",{className:"ai-st2",cx:"17.4",cy:"19.2",r:"1.1"})]}),Xe("g",{children:[S("circle",{className:"ai-st1",cx:"13",cy:"22",r:"1.9"}),S("circle",{className:"ai-st2",cx:"13.1",cy:"22",r:"1.1"})]}),S("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 fye=({width:e=24,height:t=24})=>Xe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"-293 385 24 24",width:e,height:t,className:"ml-[2px] mt-[2px]",children:[S("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 "}),S("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"}),S("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"}),S("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 "}),S("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 "}),S("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 "}),S("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 "}),S("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 "}),S("circle",{className:"approve-st4",cx:"-273.8",cy:"396",r:"1.8"})]}),hye=({width:e=24,height:t=24})=>Xe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"-293 385 24 24",width:e,height:t,children:[S("path",{className:"working-st0",d:"M-279.1,402.7"}),S("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 "}),S("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 "}),S("circle",{className:"working-st3",cx:"-277",cy:"397.6",r:"4.6"}),S("circle",{className:"working-st4",cx:"-277.1",cy:"397.5",r:"2.9"}),S("polygon",{className:"working-st3",points:"-270.9,405.7 -269,403.8 -273.5,399.6 -275.4,401 "})]}),pye=()=>{const{mode:e,setMode:t}=Js(),r=i=>{t(i)},n=i=>i===e?"primary":"default";return Xe(Ar,{children:[S(yo,{title:"\u041E\u0442\u0431\u043E\u0440 \u043B\u043E\u043A\u0430\u0446\u0438\u0439 \u0434\u043B\u044F \u0440\u0430\u0431\u043E\u0442\u044B",children:S(On,{icon:S(dye,{}),type:n(kn.INITIAL),onClick:()=>r(kn.INITIAL),className:"flex items-center justify-center",size:"large"})}),S(yo,{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:S(On,{icon:S(fye,{}),type:n(kn.APPROVE_WORKING),onClick:()=>r(kn.APPROVE_WORKING),className:"flex items-center justify-center",size:"large"})}),S(yo,{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:S(On,{icon:S(hye,{}),type:n(kn.WORKING),onClick:()=>r(kn.WORKING),className:"flex items-center justify-center",size:"large"})})]})},mye=()=>Xe("div",{className:"absolute top-[20px] left-[19px] flex items-center z-10",children:[Xe("div",{className:dd("flex items-center gap-x-20"),children:[S(lye,{}),S("div",{className:"flex items-center gap-x-3",children:S(pye,{})})]}),S("div",{className:"ml-[71px]",children:S(cye,{})})]}),vye=8,gye="Voyager",yye={},xye={carto:{type:"vector",url:"https://tiles.basemaps.cartocdn.com/vector/carto.streets/v1/tiles.json"}},_ye="https://tiles.basemaps.cartocdn.com/gl/voyager-gl-style/sprite",bye="https://tiles.basemaps.cartocdn.com/fonts/{fontstack}/{range}.pbf",wye=[{id:"background",type:"background",layout:{visibility:"visible"},paint:{"background-color":"#fbf8f3","background-opacity":1}},{id:"landcover",type:"fill",source:"carto","source-layer":"landcover",filter:["any",["==","class","wood"],["==","class","grass"],["==","subclass","recreation_ground"]],paint:{"fill-color":{stops:[[8,"rgba(197, 225, 178, 0.2)"],[9,"rgba(197, 225, 178, 0.25)"],[11,"rgba(197, 225, 178, 0.35)"],[13,"rgba(197, 225, 178, 0.4)"],[15,"#e0ecd3"]]},"fill-opacity":1}},{id:"park_national_park",type:"fill",source:"carto","source-layer":"park",minzoom:9,filter:["all",["==","class","national_park"]],layout:{visibility:"visible"},paint:{"fill-color":{stops:[[8,"rgba(197, 225, 178, 0.2)"],[9,"rgba(197, 225, 178, 0.25)"],[11,"rgba(197, 225, 178, 0.35)"],[13,"rgba(197, 225, 178, 0.4)"],[15,"#e0ecd3"]]},"fill-opacity":1,"fill-translate-anchor":"map"}},{id:"park_nature_reserve",type:"fill",source:"carto","source-layer":"park",minzoom:0,filter:["all",["==","class","nature_reserve"]],layout:{visibility:"visible"},paint:{"fill-color":{stops:[[8,"rgba(197, 225, 178, 0.2)"],[9,"rgba(197, 225, 178, 0.25)"],[11,"rgba(197, 225, 178, 0.35)"],[13,"rgba(197, 225, 178, 0.4)"],[15,"#e0ecd3"]]},"fill-antialias":!0,"fill-opacity":{stops:[[6,.7],[9,.9]]}}},{id:"landuse_residential",type:"fill",source:"carto","source-layer":"landuse",minzoom:6,filter:["any",["==","class","residential"]],paint:{"fill-color":{stops:[[5,"rgba(243, 234, 220, 0.5)"],[8,"rgba(243, 234, 220, 0.45)"],[9,"rgba(243, 234, 220, 0.4)"],[11,"rgba(243, 234, 220, 0.35)"],[13,"rgba(243, 234, 220, 0.3)"],[15,"rgba(243, 234, 220, 0.25)"],[16,"rgba(243, 234, 220, 0.15)"]]},"fill-opacity":{stops:[[6,.6],[9,1]]}}},{id:"landuse",type:"fill",source:"carto","source-layer":"landuse",filter:["any",["==","class","cemetery"],["==","class","stadium"]],paint:{"fill-color":{stops:[[8,"rgba(197, 225, 178, 0.2)"],[9,"rgba(197, 225, 178, 0.25)"],[11,"rgba(197, 225, 178, 0.35)"],[13,"rgba(197, 225, 178, 0.4)"],[15,"#e0ecd3"]]}}},{id:"waterway",type:"line",source:"carto","source-layer":"waterway",paint:{"line-color":"#cce7ea","line-width":{stops:[[8,.5],[9,1],[15,2],[16,3]]}}},{id:"boundary_county",type:"line",source:"carto","source-layer":"boundary",minzoom:9,maxzoom:24,filter:["all",["==","admin_level",6],["==","maritime",0]],paint:{"line-color":{stops:[[4,"#d4d5d6"],[5,"#d4d5d6"],[6,"#e1c5c7"]]},"line-width":{stops:[[4,.5],[7,1]]},"line-dasharray":{stops:[[6,[1]],[7,[2,2]]]}},layout:{visibility:"none"}},{id:"boundary_state",type:"line",source:"carto","source-layer":"boundary",minzoom:4,filter:["all",["==","admin_level",4],["==","maritime",0]],paint:{"line-color":{stops:[[4,"#d4d5d6"],[5,"#d4d5d6"],[6,"#e1c5c7"]]},"line-width":{stops:[[4,.5],[7,1],[8,1],[9,1.2]]},"line-dasharray":{stops:[[6,[1]],[7,[2,2]]]}},layout:{visibility:"none"}},{id:"water",type:"fill",source:"carto","source-layer":"water",minzoom:0,maxzoom:24,filter:["all",["==","$type","Polygon"]],layout:{visibility:"visible"},paint:{"fill-color":"#b0d0d6","fill-antialias":!0,"fill-translate-anchor":"map","fill-opacity":1}},{id:"water_shadow",type:"fill",source:"carto","source-layer":"water",minzoom:0,filter:["all",["==","$type","Polygon"]],layout:{visibility:"visible"},paint:{"fill-color":"rgba(203, 225, 228, 1)","fill-antialias":!0,"fill-translate-anchor":"map","fill-opacity":1,"fill-translate":{stops:[[0,[0,2]],[6,[0,1]],[14,[0,1]],[17,[0,2]]]}}},{id:"aeroway-runway",type:"line",source:"carto","source-layer":"aeroway",minzoom:12,filter:["all",["==","class","runway"]],layout:{"line-cap":"square"},paint:{"line-width":{stops:[[11,1],[13,4],[14,6],[15,8],[16,10]]},"line-color":"#e8e8e8"}},{id:"aeroway-taxiway",type:"line",source:"carto","source-layer":"aeroway",minzoom:13,filter:["all",["==","class","taxiway"]],paint:{"line-color":"#e8e8e8","line-width":{stops:[[13,.5],[14,1],[15,2],[16,4]]}}},{id:"waterway_label",type:"symbol",source:"carto","source-layer":"waterway",filter:["all",["has","name"],["==","class","river"]],layout:{"text-field":"{name:ru}","text-font":["Montserrat Regular Italic","Open Sans Italic","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"],"symbol-placement":"line","symbol-spacing":300,"symbol-avoid-edges":!1,"text-size":{stops:[[9,8],[10,9]]},"text-padding":2,"text-pitch-alignment":"auto","text-rotation-alignment":"auto","text-offset":{stops:[[6,[0,-.2]],[11,[0,-.4]],[12,[0,-.6]]]},"text-letter-spacing":0,"text-keep-upright":!0},paint:{"text-color":"#51909c","text-halo-color":"#e2eef0","text-halo-width":1}},{id:"tunnel_service_case",type:"line",source:"carto","source-layer":"transportation",minzoom:15,maxzoom:24,filter:["all",["==","class","service"],["==","brunnel","tunnel"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":{stops:[[15,1],[16,3],[17,6],[18,8]]},"line-opacity":1,"line-color":"#e6dfcb"}},{id:"tunnel_minor_case",type:"line",source:"carto","source-layer":"transportation",minzoom:13,maxzoom:24,filter:["all",["==","class","minor"],["==","brunnel","tunnel"]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-width":{stops:[[11,.5],[12,.5],[14,2],[15,4],[16,6],[17,10],[18,14]]},"line-opacity":1,"line-color":"#e6dfcb"}},{id:"tunnel_sec_case",type:"line",source:"carto","source-layer":"transportation",minzoom:11,maxzoom:24,filter:["all",["in","class","secondary","tertiary"],["==","brunnel","tunnel"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":{stops:[[11,.5],[12,1],[13,2],[14,5],[15,6],[16,8],[17,12],[18,16]]},"line-opacity":1,"line-color":"#e6dfcb"}},{id:"tunnel_pri_case",type:"line",source:"carto","source-layer":"transportation",minzoom:8,maxzoom:24,filter:["all",["==","class","primary"],["!=","ramp",1],["==","brunnel","tunnel"]],layout:{"line-cap":"butt","line-join":"round"},paint:{"line-width":{stops:[[6,.5],[7,.8],[8,1],[11,3],[13,4],[14,6],[15,8],[16,10],[17,14],[18,18]]},"line-opacity":{stops:[[5,.5],[7,1]]},"line-color":"#e6dfcb"}},{id:"tunnel_trunk_case",type:"line",source:"carto","source-layer":"transportation",minzoom:5,maxzoom:24,filter:["all",["==","class","trunk"],["!=","ramp",1],["==","brunnel","tunnel"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-width":{stops:[[6,.5],[7,.8],[8,1],[11,3],[13,4],[14,6],[15,8],[16,10],[17,14],[18,18]]},"line-opacity":{stops:[[5,.5],[7,1]]},"line-color":"#fbdb98"}},{id:"tunnel_mot_case",type:"line",source:"carto","source-layer":"transportation",minzoom:5,maxzoom:24,filter:["all",["==","class","motorway"],["!=","ramp",1],["==","brunnel","tunnel"]],layout:{"line-cap":"butt","line-join":"round"},paint:{"line-width":{stops:[[6,.5],[7,.8],[8,1],[11,3],[12,4],[13,5],[14,7],[15,9],[16,11],[17,13],[18,22]]},"line-opacity":{stops:[[6,.5],[7,1]]},"line-color":"#fbdb98"}},{id:"tunnel_path",type:"line",source:"carto","source-layer":"transportation",minzoom:15,maxzoom:24,filter:["all",["==","class","path"],["==","brunnel","tunnel"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":{stops:[[15,.5],[16,1],[18,3]]},"line-opacity":1,"line-color":"#d7d7d7","line-dasharray":{stops:[[15,[2,2]],[18,[3,3]]]}}},{id:"tunnel_service_fill",type:"line",source:"carto","source-layer":"transportation",minzoom:15,maxzoom:24,filter:["all",["==","class","service"],["==","brunnel","tunnel"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":{stops:[[15,2],[16,2],[17,4],[18,6]]},"line-opacity":1,"line-color":"#f0eee7"}},{id:"tunnel_minor_fill",type:"line",source:"carto","source-layer":"transportation",minzoom:15,maxzoom:24,filter:["all",["==","class","minor"],["==","brunnel","tunnel"]],layout:{"line-cap":"butt","line-join":"round"},paint:{"line-width":{stops:[[15,3],[16,4],[17,8],[18,12]]},"line-opacity":1,"line-color":"rgba(238, 238, 238, 1)"}},{id:"tunnel_sec_fill",type:"line",source:"carto","source-layer":"transportation",minzoom:13,maxzoom:24,filter:["all",["in","class","secondary","tertiary"],["==","brunnel","tunnel"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":{stops:[[11,2],[13,2],[14,3],[15,4],[16,6],[17,10],[18,14]]},"line-opacity":1,"line-color":"#f0eee7"}},{id:"tunnel_pri_fill",type:"line",source:"carto","source-layer":"transportation",minzoom:11,maxzoom:24,filter:["all",["==","class","primary"],["!=","ramp",1],["==","brunnel","tunnel"]],layout:{"line-cap":"butt","line-join":"round"},paint:{"line-width":{stops:[[11,1],[13,2],[14,4],[15,6],[16,8],[17,12],[18,16]]},"line-opacity":1,"line-color":"#f0eee7"}},{id:"tunnel_trunk_fill",type:"line",source:"carto","source-layer":"transportation",minzoom:11,maxzoom:24,filter:["all",["==","class","trunk"],["!=","ramp",1],["==","brunnel","tunnel"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-width":{stops:[[11,1],[13,2],[14,4],[15,6],[16,8],[17,12],[18,16]]},"line-opacity":1,"line-color":"#f0eee7"}},{id:"tunnel_mot_fill",type:"line",source:"carto","source-layer":"transportation",minzoom:10,maxzoom:24,filter:["all",["==","class","motorway"],["!=","ramp",1],["==","brunnel","tunnel"]],layout:{"line-cap":"butt","line-join":"round"},paint:{"line-width":{stops:[[10,1],[12,2],[13,3],[14,5],[15,7],[16,9],[17,11],[18,20]]},"line-opacity":1,"line-color":"#f0eee7"}},{id:"tunnel_rail",type:"line",source:"carto","source-layer":"transportation",minzoom:13,filter:["all",["==","class","rail"],["==","brunnel","tunnel"]],layout:{visibility:"visible","line-join":"round"},paint:{"line-color":"#dddddd","line-width":{base:1.3,stops:[[13,.5],[14,1],[15,1],[16,3],[21,7]]},"line-opacity":.5}},{id:"tunnel_rail_dash",type:"line",source:"carto","source-layer":"transportation",minzoom:15,filter:["all",["==","class","rail"],["==","brunnel","tunnel"]],layout:{visibility:"visible","line-join":"round"},paint:{"line-color":"#ffffff","line-width":{base:1.3,stops:[[15,.5],[16,1],[20,5]]},"line-dasharray":{stops:[[15,[5,5]],[16,[6,6]]]},"line-opacity":.5}},{id:"road_service_case",type:"line",source:"carto","source-layer":"transportation",minzoom:15,maxzoom:24,filter:["all",["==","class","service"],["!has","brunnel"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":{stops:[[15,1],[16,3],[17,6],[18,8]]},"line-opacity":1,"line-color":"#fdebce"}},{id:"road_minor_case",type:"line",source:"carto","source-layer":"transportation",minzoom:13,maxzoom:24,filter:["all",["==","class","minor"],["!has","brunnel"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":{stops:[[11,.5],[12,.5],[14,2],[15,3],[16,4.3],[17,10],[18,14]]},"line-opacity":1,"line-color":{stops:[[13,"#ffffff"],[15.7,"#ffffff"],[16,"#fdebce"]]}}},{id:"road_pri_case_ramp",type:"line",source:"carto","source-layer":"transportation",minzoom:12,maxzoom:24,filter:["all",["==","class","primary"],["==","ramp",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":{stops:[[12,2],[13,3],[14,4],[15,5],[16,8],[17,10]]},"line-opacity":{stops:[[5,.5],[7,1]]},"line-color":"#ffeabb"}},{id:"road_trunk_case_ramp",type:"line",source:"carto","source-layer":"transportation",minzoom:12,maxzoom:24,filter:["all",["==","class","trunk"],["==","ramp",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":{stops:[[12,2],[13,3],[14,4],[15,5],[16,8],[17,10]]},"line-opacity":1,"line-color":{stops:[[12,"#fbdb98"],[14,"#fbdb98"]]}}},{id:"road_mot_case_ramp",type:"line",source:"carto","source-layer":"transportation",minzoom:12,maxzoom:24,filter:["all",["==","class","motorway"],["==","ramp",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":{stops:[[12,2],[13,3],[14,4],[15,5],[16,8],[17,10]]},"line-opacity":1,"line-color":{stops:[[12,"#fbdb98"],[14,"#fbdb98"]]}}},{id:"road_sec_case_noramp",type:"line",source:"carto","source-layer":"transportation",minzoom:11,maxzoom:24,filter:["all",["in","class","secondary","tertiary"],["!has","brunnel"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":{stops:[[11,.5],[12,1.5],[13,3],[14,5],[15,6],[16,8],[17,12],[18,16]]},"line-opacity":1,"line-color":{stops:[[11,"#fffef9"],[12.99,"#fffef9"],[13,"#ffedc0"]]}}},{id:"road_pri_case_noramp",type:"line",source:"carto","source-layer":"transportation",minzoom:7,maxzoom:24,filter:["all",["==","class","primary"],["!=","ramp",1],["!has","brunnel"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":{stops:[[6,.5],[7,.8],[8,1],[11,3],[13,4],[14,6],[15,8],[16,10],[17,14],[18,18]]},"line-opacity":{stops:[[5,.5],[7,1]]},"line-color":{stops:[[7,"#ffe7b7"],[12,"#ffeabb"]]}}},{id:"road_trunk_case_noramp",type:"line",source:"carto","source-layer":"transportation",minzoom:5,maxzoom:24,filter:["all",["==","class","trunk"],["!=","ramp",1],["!has","brunnel"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":{stops:[[6,.5],[7,.8],[8,1],[11,3],[13,4],[14,6],[15,8],[16,10],[17,14],[18,18]]},"line-opacity":{stops:[[5,.5],[7,1]]},"line-color":{stops:[[5,"#ffe7b7"],[12,"#fbdb98"]]}}},{id:"road_mot_case_noramp",type:"line",source:"carto","source-layer":"transportation",minzoom:5,maxzoom:24,filter:["all",["==","class","motorway"],["!=","ramp",1],["!has","brunnel"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":{stops:[[6,.5],[7,.7],[8,.8],[11,3],[12,4],[13,5],[14,7],[15,9],[16,11],[17,13],[18,22]]},"line-opacity":{stops:[[6,.5],[7,1]]},"line-color":{stops:[[5,"#fbdb98"],[12,"#fbdb98"]]}}},{id:"road_path",type:"line",source:"carto","source-layer":"transportation",minzoom:15,maxzoom:24,filter:["all",["in","class","path","track"],["!has","brunnel"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":{stops:[[15,.5],[16,1],[18,3]]},"line-opacity":1,"line-color":"#d7d7d7","line-dasharray":{stops:[[15,[2,2]],[18,[3,3]]]}}},{id:"road_service_fill",type:"line",source:"carto","source-layer":"transportation",minzoom:15,maxzoom:24,filter:["all",["==","class","service"],["!has","brunnel"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":{stops:[[15,2],[16,2],[17,4],[18,6]]},"line-opacity":1,"line-color":"#ffffff"}},{id:"road_minor_fill",type:"line",source:"carto","source-layer":"transportation",minzoom:15,maxzoom:24,filter:["all",["==","class","minor"],["!has","brunnel"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":{stops:[[15,3],[16,4],[17,8],[18,12]]},"line-opacity":1,"line-color":"#ffffff"}},{id:"road_pri_fill_ramp",type:"line",source:"carto","source-layer":"transportation",minzoom:12,maxzoom:24,filter:["all",["==","class","primary"],["==","ramp",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":{stops:[[12,1],[13,1.5],[14,2],[15,3],[16,6],[17,8]]},"line-opacity":1,"line-color":"#fefdd7"}},{id:"road_trunk_fill_ramp",type:"line",source:"carto","source-layer":"transportation",minzoom:12,maxzoom:24,filter:["all",["==","class","trunk"],["==","ramp",1]],layout:{"line-cap":"square","line-join":"round"},paint:{"line-width":{stops:[[12,1],[13,1.5],[14,2],[15,3],[16,6],[17,8]]},"line-opacity":1,"line-color":"#FFE9A5"}},{id:"road_mot_fill_ramp",type:"line",source:"carto","source-layer":"transportation",minzoom:12,maxzoom:24,filter:["all",["==","class","motorway"],["==","ramp",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":{stops:[[12,1],[13,1.5],[14,2],[15,3],[16,6],[17,8]]},"line-opacity":1,"line-color":"#FFE9A5"}},{id:"road_sec_fill_noramp",type:"line",source:"carto","source-layer":"transportation",minzoom:13,maxzoom:24,filter:["all",["in","class","secondary","tertiary"],["!has","brunnel"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":{stops:[[11,2],[13,2],[14,3],[15,4],[16,6],[17,10],[18,14]]},"line-opacity":1,"line-color":"#fefdd7"}},{id:"road_pri_fill_noramp",type:"line",source:"carto","source-layer":"transportation",minzoom:10,maxzoom:24,filter:["all",["==","class","primary"],["!=","ramp",1],["!has","brunnel"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":{stops:[[10,.3],[13,2],[14,4],[15,6],[16,8],[17,12],[18,16]]},"line-opacity":1,"line-color":"#fefdd7"}},{id:"road_trunk_fill_noramp",type:"line",source:"carto","source-layer":"transportation",minzoom:10,maxzoom:24,filter:["all",["==","class","trunk"],["!=","ramp",1],["!has","brunnel"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":{stops:[[11,1],[13,2],[14,4],[15,6],[16,8],[17,12],[18,16]]},"line-opacity":1,"line-color":"#FFE9A5"}},{id:"road_mot_fill_noramp",type:"line",source:"carto","source-layer":"transportation",minzoom:10,maxzoom:24,filter:["all",["==","class","motorway"],["!=","ramp",1],["!has","brunnel"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":{stops:[[10,1],[12,2],[13,3],[14,5],[15,7],[16,9],[17,11],[18,20]]},"line-opacity":1,"line-color":"#FFE9A5"}},{id:"rail",type:"line",source:"carto","source-layer":"transportation",minzoom:13,filter:["all",["==","class","rail"],["!=","brunnel","tunnel"]],layout:{visibility:"visible","line-join":"round"},paint:{"line-color":"#dddddd","line-width":{base:1.3,stops:[[13,.5],[14,1],[15,1],[16,3],[21,7]]}}},{id:"rail_dash",type:"line",source:"carto","source-layer":"transportation",minzoom:15,filter:["all",["==","class","rail"],["!=","brunnel","tunnel"]],layout:{visibility:"visible","line-join":"round"},paint:{"line-color":"#ffffff","line-width":{base:1.3,stops:[[15,.5],[16,1],[20,5]]},"line-dasharray":{stops:[[15,[5,5]],[16,[6,6]]]}}},{id:"bridge_service_case",type:"line",source:"carto","source-layer":"transportation",minzoom:15,maxzoom:24,filter:["all",["==","class","service"],["==","brunnel","bridge"]],layout:{"line-cap":"butt","line-join":"round"},paint:{"line-width":{stops:[[15,1],[16,3],[17,6],[18,8]]},"line-opacity":1,"line-color":"#fdebce"}},{id:"bridge_minor_case",type:"line",source:"carto","source-layer":"transportation",minzoom:13,maxzoom:24,filter:["all",["==","class","minor"],["==","brunnel","bridge"]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-width":{stops:[[11,.5],[12,.5],[14,2],[15,3],[16,4.3],[17,10],[18,14]]},"line-opacity":1,"line-color":{stops:[[13,"#ffffff"],[15.7,"#ffffff"],[16,"#fdebce"]]}}},{id:"bridge_sec_case",type:"line",source:"carto","source-layer":"transportation",minzoom:11,maxzoom:24,filter:["all",["in","class","secondary","tertiary"],["==","brunnel","bridge"]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-width":{stops:[[11,.5],[12,1.5],[13,3],[14,5],[15,6],[16,8],[17,12],[18,16]]},"line-opacity":1,"line-color":{stops:[[11,"#fffef9"],[12.99,"#fffef9"],[13,"#ffedc0"]]}}},{id:"bridge_pri_case",type:"line",source:"carto","source-layer":"transportation",minzoom:8,maxzoom:24,filter:["all",["==","class","primary"],["!=","ramp",1],["==","brunnel","bridge"]],layout:{"line-cap":"butt","line-join":"round"},paint:{"line-width":{stops:[[6,.5],[7,.8],[8,1],[11,3],[13,4],[14,6],[15,8],[16,10],[17,14],[18,18]]},"line-opacity":{stops:[[5,.5],[7,1]]},"line-color":{stops:[[8,"#ffe7b7"],[12,"#ffeabb"]]}}},{id:"bridge_trunk_case",type:"line",source:"carto","source-layer":"transportation",minzoom:5,maxzoom:24,filter:["all",["==","class","trunk"],["!=","ramp",1],["==","brunnel","bridge"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-width":{stops:[[6,.5],[7,.8],[8,1],[11,3],[13,4],[14,6],[15,8],[16,10],[17,14],[18,18]]},"line-opacity":{stops:[[5,.5],[7,1]]},"line-color":{stops:[[5,"#fbdb98"],[12,"#fbdb98"]]}}},{id:"bridge_mot_case",type:"line",source:"carto","source-layer":"transportation",minzoom:5,maxzoom:24,filter:["all",["==","class","motorway"],["!=","ramp",1],["==","brunnel","bridge"]],layout:{"line-cap":"butt","line-join":"round"},paint:{"line-width":{stops:[[6,.5],[7,.8],[8,1],[11,3],[12,4],[13,5],[14,7],[15,9],[16,11],[17,13],[18,22]]},"line-opacity":{stops:[[6,.5],[7,1]]},"line-color":{stops:[[5,"#fbdb98"],[10,"#fbdb98"]]}}},{id:"bridge_path",type:"line",source:"carto","source-layer":"transportation",minzoom:15,maxzoom:24,filter:["all",["==","class","path"],["==","brunnel","bridge"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":{stops:[[15,.5],[16,1],[18,3]]},"line-opacity":1,"line-color":"#d7d7d7","line-dasharray":{stops:[[15,[2,2]],[18,[3,3]]]}}},{id:"bridge_service_fill",type:"line",source:"carto","source-layer":"transportation",minzoom:15,maxzoom:24,filter:["all",["==","class","service"],["==","brunnel","bridge"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":{stops:[[15,2],[16,2],[17,4],[18,6]]},"line-opacity":1,"line-color":"#ffffff"}},{id:"bridge_minor_fill",type:"line",source:"carto","source-layer":"transportation",minzoom:15,maxzoom:24,filter:["all",["==","class","minor"],["==","brunnel","bridge"]],layout:{"line-cap":"butt","line-join":"round"},paint:{"line-width":{stops:[[15,3],[16,4],[17,8],[18,12]]},"line-opacity":1,"line-color":"#ffffff"}},{id:"bridge_sec_fill",type:"line",source:"carto","source-layer":"transportation",minzoom:13,maxzoom:24,filter:["all",["in","class","secondary","tertiary"],["==","brunnel","bridge"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":{stops:[[11,2],[13,2],[14,3],[15,4],[16,6],[17,10],[18,14]]},"line-opacity":1,"line-color":"#fefdd7"}},{id:"bridge_pri_fill",type:"line",source:"carto","source-layer":"transportation",minzoom:11,maxzoom:24,filter:["all",["==","class","primary"],["!=","ramp",1],["==","brunnel","bridge"]],layout:{"line-cap":"butt","line-join":"round"},paint:{"line-width":{stops:[[11,1],[13,2],[14,4],[15,6],[16,8],[17,12],[18,16]]},"line-opacity":1,"line-color":"#fefdd7"}},{id:"bridge_trunk_fill",type:"line",source:"carto","source-layer":"transportation",minzoom:11,maxzoom:24,filter:["all",["==","class","trunk"],["!=","ramp",1],["==","brunnel","bridge"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-width":{stops:[[11,1],[13,2],[14,4],[15,6],[16,8],[17,12],[18,16]]},"line-opacity":1,"line-color":"#FFE9A5"}},{id:"bridge_mot_fill",type:"line",source:"carto","source-layer":"transportation",minzoom:10,maxzoom:24,filter:["all",["==","class","motorway"],["!=","ramp",1],["==","brunnel","bridge"]],layout:{"line-cap":"butt","line-join":"round"},paint:{"line-width":{stops:[[10,1],[12,2],[13,3],[14,5],[15,7],[16,9],[17,11],[18,20]]},"line-opacity":1,"line-color":"#FFE9A5"}},{id:"building",type:"fill",source:"carto","source-layer":"building",layout:{visibility:"visible"},paint:{"fill-color":{base:1,stops:[[15.5,"#e4dcd0"],[16,"#e4dcd0"]]},"fill-antialias":!0}},{id:"building-top",type:"fill",source:"carto","source-layer":"building",layout:{visibility:"visible"},paint:{"fill-translate":{base:1,stops:[[14,[0,0]],[16,[-2,-2]]]},"fill-outline-color":"#e9d8be","fill-color":"#f3eadc","fill-opacity":{base:1,stops:[[13,0],[16,1]]}}},{id:"boundary_country_outline",type:"line",source:"carto","source-layer":"boundary",minzoom:6,maxzoom:24,filter:["all",["==","admin_level",2],["==","maritime",0]],layout:{"line-cap":"round","line-join":"round",visibility:"none"},paint:{"line-color":"#f3efed","line-opacity":.5,"line-width":8,"line-offset":0}},{id:"boundary_country_inner",type:"line",source:"carto","source-layer":"boundary",minzoom:0,filter:["all",["==","admin_level",2],["==","maritime",0]],layout:{"line-cap":"round","line-join":"round",visibility:"none"},paint:{"line-color":{stops:[[4,"#ead5d7"],[5,"#ebd6d8"],[6,"#ebd6d8"]]},"line-opacity":1,"line-width":{stops:[[3,1],[6,1.5]]},"line-offset":0}},{id:"watername_ocean",type:"symbol",source:"carto","source-layer":"water_name",minzoom:0,maxzoom:5,filter:["all",["has","name"],["==","$type","Point"],["==","class","ocean"]],layout:{"text-field":"{name}","symbol-placement":"point","text-size":{stops:[[0,13],[2,14],[4,18]]},"text-font":["Montserrat Medium Italic","Open Sans Italic","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"],"text-line-height":1.2,"text-padding":2,"text-allow-overlap":!1,"text-ignore-placement":!1,"text-pitch-alignment":"auto","text-rotation-alignment":"auto","text-max-width":6,"text-letter-spacing":.1},paint:{"text-color":"#ffffff","text-halo-color":"#98c2ca","text-halo-width":1,"text-halo-blur":0}},{id:"watername_sea",type:"symbol",source:"carto","source-layer":"water_name",minzoom:5,filter:["all",["has","name"],["==","$type","Point"],["==","class","sea"]],layout:{"text-field":"{name}","symbol-placement":"point","text-size":12,"text-font":["Montserrat Medium Italic","Open Sans Italic","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"],"text-line-height":1.2,"text-padding":2,"text-allow-overlap":!1,"text-ignore-placement":!1,"text-pitch-alignment":"auto","text-rotation-alignment":"auto","text-max-width":6,"text-letter-spacing":.1},paint:{"text-color":"#ffffff","text-halo-color":"#98c2ca","text-halo-width":1,"text-halo-blur":0}},{id:"watername_lake",type:"symbol",source:"carto","source-layer":"water_name",minzoom:4,filter:["all",["has","name"],["==","$type","Point"],["==","class","lake"]],layout:{"text-field":{stops:[[8,"{name:ru}"],[13,"{name}"]]},"symbol-placement":"point","text-size":{stops:[[13,9],[14,10],[15,11],[16,12],[17,13]]},"text-font":["Montserrat Regular Italic","Open Sans Italic","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"],"text-line-height":1.2,"text-padding":2,"text-allow-overlap":!1,"text-ignore-placement":!1,"text-pitch-alignment":"auto","text-rotation-alignment":"auto"},paint:{"text-color":"#51909c","text-halo-color":"#e2eef0","text-halo-width":1,"text-halo-blur":1}},{id:"watername_lake_line",type:"symbol",source:"carto","source-layer":"water_name",filter:["all",["has","name"],["==","$type","LineString"]],layout:{"text-field":{stops:[[8,"{name:ru}"],[13,"{name}"]]},"symbol-placement":"line","text-size":{stops:[[13,9],[14,10],[15,11],[16,12],[17,13]]},"text-font":["Montserrat Regular Italic","Open Sans Italic","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"],"symbol-spacing":350,"text-pitch-alignment":"auto","text-rotation-alignment":"auto","text-line-height":1.2},paint:{"text-color":"#51909c","text-halo-color":"#e2eef0","text-halo-width":1,"text-halo-blur":1}},{id:"place_hamlet",type:"symbol",source:"carto","source-layer":"place",minzoom:12,maxzoom:16,filter:["any",["==","class","neighbourhood"],["==","class","hamlet"]],layout:{"text-field":{stops:[[8,"{name:ru}"],[14,"{name}"]]},"text-font":["Montserrat Regular","Open Sans Regular","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"],"text-size":{stops:[[13,8],[14,10],[16,11]]},"icon-image":"","icon-offset":[16,0],"text-anchor":"center","icon-size":1,"text-max-width":10,"text-keep-upright":!0,"text-offset":[.2,.2],"text-transform":{stops:[[12,"none"],[14,"uppercase"]]}},paint:{"text-color":"#405c78","icon-color":"#405c78","icon-translate-anchor":"map","text-halo-color":"#f2f5f8","text-halo-width":1}},{id:"place_suburbs",type:"symbol",source:"carto","source-layer":"place",minzoom:12,maxzoom:16,filter:["all",["==","class","suburb"]],layout:{"text-field":{stops:[[8,"{name:ru}"],[13,"{name}"]]},"text-font":["Montserrat Regular","Open Sans Regular","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"],"text-size":{stops:[[12,9],[13,10],[14,11],[15,12],[16,13]]},"icon-image":"","icon-offset":[16,0],"text-anchor":"center","icon-size":1,"text-max-width":10,"text-keep-upright":!0,"text-offset":[.2,.2],"text-transform":{stops:[[8,"none"],[12,"uppercase"]]}},paint:{"text-color":"#405c78","icon-color":"#405c78","icon-translate-anchor":"map","text-halo-color":"#f2f5f8","text-halo-width":1}},{id:"place_villages",type:"symbol",source:"carto","source-layer":"place",minzoom:10,maxzoom:16,filter:["all",["==","class","village"]],layout:{"text-field":{stops:[[8,"{name:ru}"],[13,"{name}"]]},"text-font":["Montserrat Medium","Open Sans Bold","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"],"text-size":{stops:[[10,9],[12,10],[13,11],[14,12],[16,13]]},"icon-image":"","icon-offset":[16,0],"text-anchor":"center","icon-size":1,"text-max-width":10,"text-keep-upright":!0,"text-offset":[.2,.2],"text-transform":"none"},paint:{"text-color":"#405c78","icon-color":"#405c78","icon-translate-anchor":"map","text-halo-color":"#f2f5f8","text-halo-width":1}},{id:"place_town",type:"symbol",source:"carto","source-layer":"place",minzoom:8,maxzoom:14,filter:["all",["==","class","town"]],layout:{"text-field":{stops:[[8,"{name:ru}"],[13,"{name}"]]},"text-font":["Montserrat Medium","Open Sans Bold","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"],"text-size":{stops:[[8,10],[9,10],[10,11],[13,14],[14,15]]},"icon-image":"","icon-offset":[16,0],"text-anchor":"center","icon-size":1,"text-max-width":10,"text-keep-upright":!0,"text-offset":[.2,.2],"text-transform":"none"},paint:{"text-color":"#405c78","icon-color":"#405c78","icon-translate-anchor":"map","text-halo-color":"#f2f5f8","text-halo-width":1}},{id:"place_country_2",type:"symbol",source:"carto","source-layer":"place",minzoom:3,maxzoom:10,filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-field":"{name:ru}","text-font":["Montserrat Medium","Open Sans Bold","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"],"text-size":{stops:[[3,10],[5,11],[6,12],[7,13],[8,14]]},"text-transform":"uppercase"},paint:{"text-color":{stops:[[3,"#6b7d91"],[5,"#8894a3"],[6,"#a3abb5"]]},"text-halo-color":"#fbf8f3","text-halo-width":1}},{id:"place_country_1",type:"symbol",source:"carto","source-layer":"place",minzoom:2,maxzoom:7,filter:["all",["==","class","country"],["<=","rank",2]],layout:{"text-field":"{name:ru}","text-font":["Montserrat Medium","Open Sans Bold","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"],"text-size":{stops:[[3,11],[4,12],[5,13],[6,14]]},"text-transform":"uppercase","text-max-width":{stops:[[2,6],[3,6],[4,9],[5,12]]}},paint:{"text-color":{stops:[[3,"#6b7d91"],[5,"#8894a3"],[6,"#a3abb5"]]},"text-halo-color":"#fbf8f3","text-halo-width":1}},{id:"place_state",type:"symbol",source:"carto","source-layer":"place",minzoom:5,maxzoom:10,filter:["all",["==","class","state"],["<=","rank",4]],layout:{"text-field":"{name:ru}","text-font":["Montserrat Medium","Open Sans Bold","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"],"text-size":{stops:[[5,12],[7,14]]},"text-transform":"uppercase","text-max-width":9},paint:{"text-color":"#7c8a9b","text-halo-color":"#fbf8f3","text-halo-width":0}},{id:"place_continent",type:"symbol",source:"carto","source-layer":"place",minzoom:0,maxzoom:2,filter:["all",["==","class","continent"]],layout:{"text-field":"{name:ru}","text-font":["Montserrat Medium","Open Sans Bold","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"],"text-transform":"uppercase","text-size":14,"text-letter-spacing":.1,"text-max-width":9,"text-justify":"center","text-keep-upright":!1},paint:{"text-color":"#405c78","text-halo-color":"#fbf8f3","text-halo-width":1}},{id:"place_city_r6",type:"symbol",source:"carto","source-layer":"place",minzoom:8,maxzoom:15,filter:["all",["==","class","city"],[">=","rank",6]],layout:{"text-field":{stops:[[8,"{name:ru}"],[13,"{name}"]]},"text-font":["Montserrat Medium","Open Sans Bold","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"],"text-size":{stops:[[8,12],[9,13],[10,14],[13,17],[14,20]]},"icon-image":"","icon-offset":[16,0],"text-anchor":"center","icon-size":1,"text-max-width":10,"text-keep-upright":!0,"text-offset":[.2,.2],"text-transform":"uppercase"},paint:{"text-color":"#405c78","icon-color":"#405c78","icon-translate-anchor":"map","text-halo-color":"#f2f5f8","text-halo-width":1}},{id:"place_city_r5",type:"symbol",source:"carto","source-layer":"place",minzoom:8,maxzoom:15,filter:["all",["==","class","city"],[">=","rank",0],["<=","rank",5]],layout:{"text-field":{stops:[[8,"{name:ru}"],[13,"{name}"]]},"text-font":["Montserrat Medium","Open Sans Bold","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"],"text-size":{stops:[[8,14],[10,16],[13,19],[14,22]]},"icon-image":"","icon-offset":[16,0],"text-anchor":"center","icon-size":1,"text-max-width":10,"text-keep-upright":!0,"text-offset":[.2,.2],"text-transform":"uppercase"},paint:{"text-color":"#405c78","icon-color":"#405c78","icon-translate-anchor":"map","text-halo-color":"#f2f5f8","text-halo-width":1}},{id:"place_city_dot_r7",type:"symbol",source:"carto","source-layer":"place",minzoom:6,maxzoom:7,filter:["all",["==","class","city"],["<=","rank",7]],layout:{"text-field":"{name:ru}","text-font":["Montserrat Medium","Open Sans Bold","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"],"text-size":12,"icon-image":"circle-11","icon-offset":[16,5],"text-anchor":"right","icon-size":.4,"text-max-width":8,"text-keep-upright":!0,"text-offset":[.2,.2]},paint:{"text-color":"#405c78","icon-color":"#405c78","icon-translate-anchor":"map","text-halo-color":"#f2f5f8","text-halo-width":1}},{id:"place_city_dot_r4",type:"symbol",source:"carto","source-layer":"place",minzoom:5,maxzoom:7,filter:["all",["==","class","city"],["<=","rank",4]],layout:{"text-field":"{name:ru}","text-font":["Montserrat Medium","Open Sans Bold","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"],"text-size":12,"icon-image":"circle-11","icon-offset":[16,5],"text-anchor":"right","icon-size":.4,"text-max-width":8,"text-keep-upright":!0,"text-offset":[.2,.2]},paint:{"text-color":"#405c78","icon-color":"#405c78","icon-translate-anchor":"map","text-halo-color":"#f2f5f8","text-halo-width":1}},{id:"place_city_dot_r2",type:"symbol",source:"carto","source-layer":"place",minzoom:4,maxzoom:7,filter:["all",["==","class","city"],["<=","rank",2]],layout:{"text-field":"{name:ru}","text-font":["Montserrat Medium","Open Sans Bold","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"],"text-size":12,"icon-image":"circle-11","icon-offset":[16,5],"text-anchor":"right","icon-size":.4,"text-max-width":8,"text-keep-upright":!0,"text-offset":[.2,.2]},paint:{"text-color":"#405c78","icon-color":"#405c78","icon-translate-anchor":"map","text-halo-color":"#f2f5f8","text-halo-width":1}},{id:"place_city_dot_z7",type:"symbol",source:"carto","source-layer":"place",minzoom:7,maxzoom:8,filter:["all",["!has","capital"],["!in","class","country","state"]],layout:{"text-field":"{name:ru}","text-font":["Montserrat Medium","Open Sans Bold","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"],"text-size":12,"icon-image":"circle-11","icon-offset":[16,5],"text-anchor":"right","icon-size":.4,"text-max-width":8,"text-keep-upright":!0,"text-offset":[.2,.2]},paint:{"text-color":"#405c78","icon-color":"#405c78","icon-translate-anchor":"map","text-halo-color":"#f2f5f8","text-halo-width":1}},{id:"place_capital_dot_z7",type:"symbol",source:"carto","source-layer":"place",minzoom:7,maxzoom:8,filter:["all",[">","capital",0]],layout:{"text-field":"{name:ru}","text-font":["Montserrat Medium","Open Sans Bold","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"],"text-size":12,"icon-image":"circle-11","icon-offset":[16,5],"text-anchor":"right","icon-size":.4,"text-max-width":8,"text-keep-upright":!0,"text-offset":[.2,.2],"text-transform":"uppercase"},paint:{"text-color":"#405c78","icon-color":"#405c78","icon-translate-anchor":"map","text-halo-color":"#f2f5f8","text-halo-width":1}},{id:"poi_stadium",type:"symbol",source:"carto","source-layer":"poi",minzoom:15,filter:["all",["in","class","stadium","cemetery","attraction"],["<=","rank",3]],layout:{"text-field":"{name}","text-font":["Montserrat Medium","Open Sans Bold","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"],"text-size":{stops:[[15,8],[17,9],[18,10]]},"text-transform":"uppercase"},paint:{"text-color":"#666666","text-halo-color":"rgba(255,255,255,0.15)","text-halo-width":1}},{id:"poi_park",type:"symbol",source:"carto","source-layer":"poi",minzoom:15,filter:["all",["==","class","park"]],layout:{"text-field":"{name}","text-font":["Montserrat Medium","Open Sans Bold","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"],"text-size":{stops:[[15,8],[17,9],[18,10]]},"text-transform":"uppercase"},paint:{"text-color":"#666666","text-halo-color":"rgba(255,255,255,0.15)","text-halo-width":1}},{id:"roadname_minor",type:"symbol",source:"carto","source-layer":"transportation_name",minzoom:16,filter:["all",["in","class","minor","service"]],layout:{"symbol-placement":"line","text-font":["Montserrat Regular","Open Sans Regular","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"],"text-size":9,"text-field":"{name}","symbol-avoid-edges":!1,"symbol-spacing":200,"text-pitch-alignment":"auto","text-rotation-alignment":"auto","text-justify":"center"},paint:{"text-color":"#87919e","text-halo-color":"#fbf8f3","text-halo-width":1}},{id:"roadname_sec",type:"symbol",source:"carto","source-layer":"transportation_name",minzoom:15,filter:["all",["in","class","secondary","tertiary"]],layout:{"symbol-placement":"line","text-font":["Montserrat Regular","Open Sans Regular","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"],"text-size":{stops:[[15,9],[16,11],[18,12]]},"text-field":"{name}","symbol-avoid-edges":!1,"symbol-spacing":200,"text-pitch-alignment":"auto","text-rotation-alignment":"auto","text-justify":"center"},paint:{"text-color":"#87919e","text-halo-color":"#fbf8f3","text-halo-width":1}},{id:"roadname_pri",type:"symbol",source:"carto","source-layer":"transportation_name",minzoom:14,filter:["all",["in","class","primary"]],layout:{"symbol-placement":"line","text-font":["Montserrat Regular","Open Sans Regular","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"],"text-size":{stops:[[14,10],[15,10],[16,11],[18,12]]},"text-field":"{name}","symbol-avoid-edges":!1,"symbol-spacing":{stops:[[6,200],[16,250]]},"text-pitch-alignment":"auto","text-rotation-alignment":"auto","text-justify":"center","text-letter-spacing":{stops:[[14,0],[16,.2]]}},paint:{"text-color":"#798493","text-halo-color":"#fefde1","text-halo-width":1}},{id:"roadname_major",type:"symbol",source:"carto","source-layer":"transportation_name",minzoom:13,filter:["all",["in","class","trunk","motorway"]],layout:{"symbol-placement":"line","text-font":["Montserrat Regular","Open Sans Regular","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"],"text-size":{stops:[[14,10],[15,10],[16,11],[18,12]]},"text-field":"{name}","symbol-avoid-edges":!1,"symbol-spacing":{stops:[[6,200],[16,250]]},"text-pitch-alignment":"auto","text-rotation-alignment":"auto","text-justify":"center","text-letter-spacing":{stops:[[13,0],[16,.2]]}},paint:{"text-color":"#798493","text-halo-color":"#fff0c4","text-halo-width":1}},{id:"housenumber",type:"symbol",source:"carto","source-layer":"housenumber",minzoom:17,maxzoom:24,layout:{"text-field":"{housenumber}","text-size":{stops:[[17,9],[18,11]]},"text-font":["Montserrat Regular","Open Sans Regular","Noto Sans Regular","HanWangHeiLight Regular","NanumBarunGothic Regular"]},paint:{"text-halo-color":"rgba(255,255,255,0.15)","text-color":"#d2b17d","text-halo-width":.75}}],Cye="voyager",Sye="Carto",Eye={version:vye,name:gye,metadata:yye,sources:xye,sprite:_ye,glyphs:bye,layers:wye,id:Cye,owner:Sye};var Bv="delete",Gn=5,Va=1<<Gn,Ao=Va-1,cn={};function IC(){return{value:!1}}function ja(e){e&&(e.value=!0)}function SE(){}function eh(e){return e.size===void 0&&(e.size=e.__iterate(DL)),e.size}function Xu(e,t){if(typeof t!="number"){var r=t>>>0;if(""+r!==t||r===4294967295)return NaN;t=r}return t<0?eh(e)+t:t}function DL(){return!0}function Yx(e,t,r){return(e===0&&!FL(e)||r!==void 0&&e<=-r)&&(t===void 0||r!==void 0&&t>=r)}function Vv(e,t){return LL(e,t,0)}function Qx(e,t){return LL(e,t,t)}function LL(e,t,r){return e===void 0?r:FL(e)?t===1/0?t:Math.max(0,t+e)|0:t===void 0||t===e?e:Math.min(t,e)|0}function FL(e){return e<0||e===0&&1/e===-1/0}var $L="@@__IMMUTABLE_ITERABLE__@@";function Qo(e){return Boolean(e&&e[$L])}var BL="@@__IMMUTABLE_KEYED__@@";function Zn(e){return Boolean(e&&e[BL])}var VL="@@__IMMUTABLE_INDEXED__@@";function zo(e){return Boolean(e&&e[VL])}function Jx(e){return Zn(e)||zo(e)}var Ci=function(t){return Qo(t)?t:ea(t)},Ya=function(e){function t(r){return Zn(r)?r:sc(r)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Ci),Sd=function(e){function t(r){return zo(r)?r:Ss(r)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Ci),Ph=function(e){function t(r){return Qo(r)&&!Jx(r)?r:Oh(r)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Ci);Ci.Keyed=Ya;Ci.Indexed=Sd;Ci.Set=Ph;var jL="@@__IMMUTABLE_SEQ__@@";function EE(e){return Boolean(e&&e[jL])}var UL="@@__IMMUTABLE_RECORD__@@";function Mh(e){return Boolean(e&&e[UL])}function Cs(e){return Qo(e)||Mh(e)}var Ih="@@__IMMUTABLE_ORDERED__@@";function xs(e){return Boolean(e&&e[Ih])}var jv=0,ws=1,Ga=2,RC=typeof Symbol=="function"&&Symbol.iterator,KL="@@iterator",e_=RC||KL,bn=function(t){this.next=t};bn.prototype.toString=function(){return"[Iterator]"};bn.KEYS=jv;bn.VALUES=ws;bn.ENTRIES=Ga;bn.prototype.inspect=bn.prototype.toSource=function(){return this.toString()};bn.prototype[e_]=function(){return this};function oi(e,t,r,n){var i=e===0?t:e===1?r:[t,r];return n?n.value=i:n={value:i,done:!1},n}function Jo(){return{value:void 0,done:!0}}function kE(e){return Array.isArray(e)?!0:!!t_(e)}function iI(e){return e&&typeof e.next=="function"}function OC(e){var t=t_(e);return t&&t.call(e)}function t_(e){var t=e&&(RC&&e[RC]||e[KL]);if(typeof t=="function")return t}function kye(e){var t=t_(e);return t&&t===e.entries}function Tye(e){var t=t_(e);return t&&t===e.keys}var Rh=Object.prototype.hasOwnProperty;function TE(e){return Array.isArray(e)||typeof e=="string"?!0:e&&typeof e=="object"&&Number.isInteger(e.length)&&e.length>=0&&(e.length===0?Object.keys(e).length===1:e.hasOwnProperty(e.length-1))}var ea=function(e){function t(r){return r==null?ME():Cs(r)?r.toSeq():Mye(r)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(n,i){var a=this._cache;if(a){for(var u=a.length,o=0;o!==u;){var f=a[i?u-++o:o++];if(n(f[1],f[0],this)===!1)break}return o}return this.__iterateUncached(n,i)},t.prototype.__iterator=function(n,i){var a=this._cache;if(a){var u=a.length,o=0;return new bn(function(){if(o===u)return Jo();var f=a[i?u-++o:o++];return oi(n,f[0],f[1])})}return this.__iteratorUncached(n,i)},t}(Ci),sc=function(e){function t(r){return r==null?ME().toKeyedSeq():Qo(r)?Zn(r)?r.toSeq():r.fromEntrySeq():Mh(r)?r.toSeq():IE(r)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(ea),Ss=function(e){function t(r){return r==null?ME():Qo(r)?Zn(r)?r.entrySeq():r.toIndexedSeq():Mh(r)?r.toSeq().entrySeq():HL(r)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(ea),Oh=function(e){function t(r){return(Qo(r)&&!Jx(r)?r:Ss(r)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(ea);ea.isSeq=EE;ea.Keyed=sc;ea.Set=Oh;ea.Indexed=Ss;ea.prototype[jL]=!0;var fd=function(e){function t(r){this._array=r,this.size=r.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(n,i){return this.has(n)?this._array[Xu(this,n)]:i},t.prototype.__iterate=function(n,i){for(var a=this._array,u=a.length,o=0;o!==u;){var f=i?u-++o:o++;if(n(a[f],f,this)===!1)break}return o},t.prototype.__iterator=function(n,i){var a=this._array,u=a.length,o=0;return new bn(function(){if(o===u)return Jo();var f=i?u-++o:o++;return oi(n,f,a[f])})},t}(Ss),PE=function(e){function t(r){var n=Object.keys(r).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(r):[]);this._object=r,this._keys=n,this.size=n.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(n,i){return i!==void 0&&!this.has(n)?i:this._object[n]},t.prototype.has=function(n){return Rh.call(this._object,n)},t.prototype.__iterate=function(n,i){for(var a=this._object,u=this._keys,o=u.length,f=0;f!==o;){var p=u[i?o-++f:f++];if(n(a[p],p,this)===!1)break}return f},t.prototype.__iterator=function(n,i){var a=this._object,u=this._keys,o=u.length,f=0;return new bn(function(){if(f===o)return Jo();var p=u[i?o-++f:f++];return oi(n,p,a[p])})},t}(sc);PE.prototype[Ih]=!0;var Pye=function(e){function t(r){this._collection=r,this.size=r.length||r.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(n,i){if(i)return this.cacheResult().__iterate(n,i);var a=this._collection,u=OC(a),o=0;if(iI(u))for(var f;!(f=u.next()).done&&n(f.value,o++,this)!==!1;);return o},t.prototype.__iteratorUncached=function(n,i){if(i)return this.cacheResult().__iterator(n,i);var a=this._collection,u=OC(a);if(!iI(u))return new bn(Jo);var o=0;return new bn(function(){var f=u.next();return f.done?f:oi(n,o++,f.value)})},t}(Ss),oI;function ME(){return oI||(oI=new fd([]))}function IE(e){var t=RE(e);if(t)return t.fromEntrySeq();if(typeof e=="object")return new PE(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function HL(e){var t=RE(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function Mye(e){var t=RE(e);if(t)return kye(e)?t.fromEntrySeq():Tye(e)?t.toSetSeq():t;if(typeof e=="object")return new PE(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}function RE(e){return TE(e)?new fd(e):kE(e)?new Pye(e):void 0}var WL="@@__IMMUTABLE_MAP__@@";function OE(e){return Boolean(e&&e[WL])}function qL(e){return OE(e)&&xs(e)}function aI(e){return Boolean(e&&typeof e.equals=="function"&&typeof e.hashCode=="function")}function ma(e,t){if(e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1;if(typeof e.valueOf=="function"&&typeof t.valueOf=="function"){if(e=e.valueOf(),t=t.valueOf(),e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1}return!!(aI(e)&&aI(t)&&e.equals(t))}var Hp=typeof Math.imul=="function"&&Math.imul(4294967295,2)===-2?Math.imul:function(t,r){t|=0,r|=0;var n=t&65535,i=r&65535;return n*i+((t>>>16)*i+n*(r>>>16)<<16>>>0)|0};function r_(e){return e>>>1&1073741824|e&3221225471}var Iye=Object.prototype.valueOf;function fa(e){if(e==null)return sI(e);if(typeof e.hashCode=="function")return r_(e.hashCode(e));var t=Dye(e);if(t==null)return sI(t);switch(typeof t){case"boolean":return t?1108378657:1108378656;case"number":return Rye(t);case"string":return t.length>Lye?Oye(t):AC(t);case"object":case"function":return Nye(t);case"symbol":return Aye(t);default:if(typeof t.toString=="function")return AC(t.toString());throw new Error("Value type "+typeof t+" cannot be hashed.")}}function sI(e){return e===null?1108378658:1108378659}function Rye(e){if(e!==e||e===1/0)return 0;var t=e|0;for(t!==e&&(t^=e*4294967295);e>4294967295;)e/=4294967295,t^=e;return r_(t)}function Oye(e){var t=W2[e];return t===void 0&&(t=AC(e),H2===Fye&&(H2=0,W2={}),H2++,W2[e]=t),t}function AC(e){for(var t=0,r=0;r<e.length;r++)t=31*t+e.charCodeAt(r)|0;return r_(t)}function Aye(e){var t=cI[e];return t!==void 0||(t=GL(),cI[e]=t),t}function Nye(e){var t;if(NC&&(t=zC.get(e),t!==void 0)||(t=e[jc],t!==void 0)||!uI&&(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[jc],t!==void 0||(t=zye(e),t!==void 0)))return t;if(t=GL(),NC)zC.set(e,t);else{if(lI!==void 0&&lI(e)===!1)throw new Error("Non-extensible objects are not allowed as keys.");if(uI)Object.defineProperty(e,jc,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(e.propertyIsEnumerable!==void 0&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[jc]=t;else if(e.nodeType!==void 0)e[jc]=t;else throw new Error("Unable to set a non-enumerable property on object.")}return t}var lI=Object.isExtensible,uI=function(){try{return Object.defineProperty({},"@",{}),!0}catch{return!1}}();function zye(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}function Dye(e){return e.valueOf!==Iye&&typeof e.valueOf=="function"?e.valueOf(e):e}function GL(){var e=++K2;return K2&1073741824&&(K2=0),e}var NC=typeof WeakMap=="function",zC;NC&&(zC=new WeakMap);var cI=Object.create(null),K2=0,jc="__immutablehash__";typeof Symbol=="function"&&(jc=Symbol(jc));var Lye=16,Fye=255,H2=0,W2={},n_=function(e){function t(r,n){this._iter=r,this._useKeys=n,this.size=r.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(n,i){return this._iter.get(n,i)},t.prototype.has=function(n){return this._iter.has(n)},t.prototype.valueSeq=function(){return this._iter.valueSeq()},t.prototype.reverse=function(){var n=this,i=AE(this,!0);return this._useKeys||(i.valueSeq=function(){return n._iter.toSeq().reverse()}),i},t.prototype.map=function(n,i){var a=this,u=JL(this,n,i);return this._useKeys||(u.valueSeq=function(){return a._iter.toSeq().map(n,i)}),u},t.prototype.__iterate=function(n,i){var a=this;return this._iter.__iterate(function(u,o){return n(u,o,a)},i)},t.prototype.__iterator=function(n,i){return this._iter.__iterator(n,i)},t}(sc);n_.prototype[Ih]=!0;var ZL=function(e){function t(r){this._iter=r,this.size=r.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.includes=function(n){return this._iter.includes(n)},t.prototype.__iterate=function(n,i){var a=this,u=0;return i&&eh(this),this._iter.__iterate(function(o){return n(o,i?a.size-++u:u++,a)},i)},t.prototype.__iterator=function(n,i){var a=this,u=this._iter.__iterator(ws,i),o=0;return i&&eh(this),new bn(function(){var f=u.next();return f.done?f:oi(n,i?a.size-++o:o++,f.value,f)})},t}(Ss),XL=function(e){function t(r){this._iter=r,this.size=r.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.has=function(n){return this._iter.includes(n)},t.prototype.__iterate=function(n,i){var a=this;return this._iter.__iterate(function(u){return n(u,u,a)},i)},t.prototype.__iterator=function(n,i){var a=this._iter.__iterator(ws,i);return new bn(function(){var u=a.next();return u.done?u:oi(n,u.value,u.value,u)})},t}(Oh),YL=function(e){function t(r){this._iter=r,this.size=r.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.entrySeq=function(){return this._iter.toSeq()},t.prototype.__iterate=function(n,i){var a=this;return this._iter.__iterate(function(u){if(u){fI(u);var o=Qo(u);return n(o?u.get(1):u[1],o?u.get(0):u[0],a)}},i)},t.prototype.__iterator=function(n,i){var a=this._iter.__iterator(ws,i);return new bn(function(){for(;;){var u=a.next();if(u.done)return u;var o=u.value;if(o){fI(o);var f=Qo(o);return oi(n,f?o.get(0):o[0],f?o.get(1):o[1],u)}}})},t}(sc);ZL.prototype.cacheResult=n_.prototype.cacheResult=XL.prototype.cacheResult=YL.prototype.cacheResult=DE;function QL(e){var t=tl(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var r=e.reverse.apply(this);return r.flip=function(){return e.reverse()},r},t.has=function(r){return e.includes(r)},t.includes=function(r){return e.has(r)},t.cacheResult=DE,t.__iterateUncached=function(r,n){var i=this;return e.__iterate(function(a,u){return r(u,a,i)!==!1},n)},t.__iteratorUncached=function(r,n){if(r===Ga){var i=e.__iterator(r,n);return new bn(function(){var a=i.next();if(!a.done){var u=a.value[0];a.value[0]=a.value[1],a.value[1]=u}return a})}return e.__iterator(r===ws?jv:ws,n)},t}function JL(e,t,r){var n=tl(e);return n.size=e.size,n.has=function(i){return e.has(i)},n.get=function(i,a){var u=e.get(i,cn);return u===cn?a:t.call(r,u,i,e)},n.__iterateUncached=function(i,a){var u=this;return e.__iterate(function(o,f,p){return i(t.call(r,o,f,p),f,u)!==!1},a)},n.__iteratorUncached=function(i,a){var u=e.__iterator(Ga,a);return new bn(function(){var o=u.next();if(o.done)return o;var f=o.value,p=f[0];return oi(i,p,t.call(r,f[1],p,e),o)})},n}function AE(e,t){var r=this,n=tl(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var i=QL(e);return i.reverse=function(){return e.flip()},i}),n.get=function(i,a){return e.get(t?i:-1-i,a)},n.has=function(i){return e.has(t?i:-1-i)},n.includes=function(i){return e.includes(i)},n.cacheResult=DE,n.__iterate=function(i,a){var u=this,o=0;return a&&eh(e),e.__iterate(function(f,p){return i(f,t?p:a?u.size-++o:o++,u)},!a)},n.__iterator=function(i,a){var u=0;a&&eh(e);var o=e.__iterator(Ga,!a);return new bn(function(){var f=o.next();if(f.done)return f;var p=f.value;return oi(i,t?p[0]:a?r.size-++u:u++,p[1],f)})},n}function eF(e,t,r,n){var i=tl(e);return n&&(i.has=function(a){var u=e.get(a,cn);return u!==cn&&!!t.call(r,u,a,e)},i.get=function(a,u){var o=e.get(a,cn);return o!==cn&&t.call(r,o,a,e)?o:u}),i.__iterateUncached=function(a,u){var o=this,f=0;return e.__iterate(function(p,v,y){if(t.call(r,p,v,y))return f++,a(p,n?v:f-1,o)},u),f},i.__iteratorUncached=function(a,u){var o=e.__iterator(Ga,u),f=0;return new bn(function(){for(;;){var p=o.next();if(p.done)return p;var v=p.value,y=v[0],w=v[1];if(t.call(r,w,y,e))return oi(a,n?y:f++,w,p)}})},i}function $ye(e,t,r){var n=Nh().asMutable();return e.__iterate(function(i,a){n.update(t.call(r,i,a,e),0,function(u){return u+1})}),n.asImmutable()}function Bye(e,t,r){var n=Zn(e),i=(xs(e)?jl():Nh()).asMutable();e.__iterate(function(u,o){i.update(t.call(r,u,o,e),function(f){return f=f||[],f.push(n?[o,u]:u),f})});var a=zE(e);return i.map(function(u){return $n(e,a(u))}).asImmutable()}function Vye(e,t,r){var n=Zn(e),i=[[],[]];e.__iterate(function(u,o){i[t.call(r,u,o,e)?1:0].push(n?[o,u]:u)});var a=zE(e);return i.map(function(u){return $n(e,a(u))})}function NE(e,t,r,n){var i=e.size;if(Yx(t,r,i))return e;var a=Vv(t,i),u=Qx(r,i);if(a!==a||u!==u)return NE(e.toSeq().cacheResult(),t,r,n);var o=u-a,f;o===o&&(f=o<0?0:o);var p=tl(e);return p.size=f===0?f:e.size&&f||void 0,!n&&EE(e)&&f>=0&&(p.get=function(v,y){return v=Xu(this,v),v>=0&&v<f?e.get(v+a,y):y}),p.__iterateUncached=function(v,y){var w=this;if(f===0)return 0;if(y)return this.cacheResult().__iterate(v,y);var k=0,T=!0,R=0;return e.__iterate(function(A,I){if(!(T&&(T=k++<a)))return R++,v(A,n?I:R-1,w)!==!1&&R!==f}),R},p.__iteratorUncached=function(v,y){if(f!==0&&y)return this.cacheResult().__iterator(v,y);if(f===0)return new bn(Jo);var w=e.__iterator(v,y),k=0,T=0;return new bn(function(){for(;k++<a;)w.next();if(++T>f)return Jo();var R=w.next();return n||v===ws||R.done?R:v===jv?oi(v,T-1,void 0,R):oi(v,T-1,R.value[1],R)})},p}function jye(e,t,r){var n=tl(e);return n.__iterateUncached=function(i,a){var u=this;if(a)return this.cacheResult().__iterate(i,a);var o=0;return e.__iterate(function(f,p,v){return t.call(r,f,p,v)&&++o&&i(f,p,u)}),o},n.__iteratorUncached=function(i,a){var u=this;if(a)return this.cacheResult().__iterator(i,a);var o=e.__iterator(Ga,a),f=!0;return new bn(function(){if(!f)return Jo();var p=o.next();if(p.done)return p;var v=p.value,y=v[0],w=v[1];return t.call(r,w,y,u)?i===Ga?p:oi(i,y,w,p):(f=!1,Jo())})},n}function tF(e,t,r,n){var i=tl(e);return i.__iterateUncached=function(a,u){var o=this;if(u)return this.cacheResult().__iterate(a,u);var f=!0,p=0;return e.__iterate(function(v,y,w){if(!(f&&(f=t.call(r,v,y,w))))return p++,a(v,n?y:p-1,o)}),p},i.__iteratorUncached=function(a,u){var o=this;if(u)return this.cacheResult().__iterator(a,u);var f=e.__iterator(Ga,u),p=!0,v=0;return new bn(function(){var y,w,k;do{if(y=f.next(),y.done)return n||a===ws?y:a===jv?oi(a,v++,void 0,y):oi(a,v++,y.value[1],y);var T=y.value;w=T[0],k=T[1],p&&(p=t.call(r,k,w,o))}while(p);return a===Ga?y:oi(a,w,k,y)})},i}function Uye(e,t){var r=Zn(e),n=[e].concat(t).map(function(u){return Qo(u)?r&&(u=Ya(u)):u=r?IE(u):HL(Array.isArray(u)?u:[u]),u}).filter(function(u){return u.size!==0});if(n.length===0)return e;if(n.length===1){var i=n[0];if(i===e||r&&Zn(i)||zo(e)&&zo(i))return i}var a=new fd(n);return r?a=a.toKeyedSeq():zo(e)||(a=a.toSetSeq()),a=a.flatten(!0),a.size=n.reduce(function(u,o){if(u!==void 0){var f=o.size;if(f!==void 0)return u+f}},0),a}function rF(e,t,r){var n=tl(e);return n.__iterateUncached=function(i,a){if(a)return this.cacheResult().__iterate(i,a);var u=0,o=!1;function f(p,v){p.__iterate(function(y,w){return(!t||v<t)&&Qo(y)?f(y,v+1):(u++,i(y,r?w:u-1,n)===!1&&(o=!0)),!o},a)}return f(e,0),u},n.__iteratorUncached=function(i,a){if(a)return this.cacheResult().__iterator(i,a);var u=e.__iterator(i,a),o=[],f=0;return new bn(function(){for(;u;){var p=u.next();if(p.done!==!1){u=o.pop();continue}var v=p.value;if(i===Ga&&(v=v[1]),(!t||o.length<t)&&Qo(v))o.push(u),u=v.__iterator(i,a);else return r?p:oi(i,f++,v,p)}return Jo()})},n}function Kye(e,t,r){var n=zE(e);return e.toSeq().map(function(i,a){return n(t.call(r,i,a,e))}).flatten(!0)}function Hye(e,t){var r=tl(e);return r.size=e.size&&e.size*2-1,r.__iterateUncached=function(n,i){var a=this,u=0;return e.__iterate(function(o){return(!u||n(t,u++,a)!==!1)&&n(o,u++,a)!==!1},i),u},r.__iteratorUncached=function(n,i){var a=e.__iterator(ws,i),u=0,o;return new bn(function(){return(!o||u%2)&&(o=a.next(),o.done)?o:u%2?oi(n,u++,t):oi(n,u++,o.value,o)})},r}function th(e,t,r){t||(t=nF);var n=Zn(e),i=0,a=e.toSeq().map(function(u,o){return[o,u,i++,r?r(u,o,e):u]}).valueSeq().toArray();return a.sort(function(u,o){return t(u[3],o[3])||u[2]-o[2]}).forEach(n?function(u,o){a[o].length=2}:function(u,o){a[o]=u[1]}),n?sc(a):zo(e)?Ss(a):Oh(a)}function Fy(e,t,r){if(t||(t=nF),r){var n=e.toSeq().map(function(i,a){return[i,r(i,a,e)]}).reduce(function(i,a){return dI(t,i[1],a[1])?a:i});return n&&n[0]}return e.reduce(function(i,a){return dI(t,i,a)?a:i})}function dI(e,t,r){var n=e(r,t);return n===0&&r!==t&&(r==null||r!==r)||n>0}function $y(e,t,r,n){var i=tl(e),a=new fd(r).map(function(u){return u.size});return i.size=n?a.max():a.min(),i.__iterate=function(u,o){for(var f=this.__iterator(ws,o),p,v=0;!(p=f.next()).done&&u(p.value,v++,this)!==!1;);return v},i.__iteratorUncached=function(u,o){var f=r.map(function(y){return y=Ci(y),OC(o?y.reverse():y)}),p=0,v=!1;return new bn(function(){var y;return v||(y=f.map(function(w){return w.next()}),v=n?y.every(function(w){return w.done}):y.some(function(w){return w.done})),v?Jo():oi(u,p++,t.apply(null,y.map(function(w){return w.value})))})},i}function $n(e,t){return e===t?e:EE(e)?t:e.constructor(t)}function fI(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function zE(e){return Zn(e)?Ya:zo(e)?Sd:Ph}function tl(e){return Object.create((Zn(e)?sc:zo(e)?Ss:Oh).prototype)}function DE(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):ea.prototype.cacheResult.call(this)}function nF(e,t){return e===void 0&&t===void 0?0:e===void 0?1:t===void 0?-1:e>t?1:e<t?-1:0}function Bs(e,t){t=t||0;for(var r=Math.max(0,e.length-t),n=new Array(r),i=0;i<r;i++)n[i]=e[i+t];return n}function LE(e,t){if(!e)throw new Error(t)}function Ua(e){LE(e!==1/0,"Cannot perform this action with an infinite size.")}function iF(e){if(TE(e)&&typeof e!="string")return e;if(xs(e))return e.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+e)}var Wye=Object.prototype.toString;function oF(e){if(!e||typeof e!="object"||Wye.call(e)!=="[object Object]")return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t,n=Object.getPrototypeOf(t);n!==null;)r=n,n=Object.getPrototypeOf(r);return r===t}function Yu(e){return typeof e=="object"&&(Cs(e)||Array.isArray(e)||oF(e))}function tv(e){try{return typeof e=="string"?JSON.stringify(e):String(e)}catch{return JSON.stringify(e)}}function qye(e,t){return Cs(e)?e.has(t):Yu(e)&&Rh.call(e,t)}function aF(e,t,r){return Cs(e)?e.get(t,r):qye(e,t)?typeof e.get=="function"?e.get(t):e[t]:r}function E1(e){if(Array.isArray(e))return Bs(e);var t={};for(var r in e)Rh.call(e,r)&&(t[r]=e[r]);return t}function Gye(e,t){if(!Yu(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(Cs(e)){if(!e.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+e);return e.remove(t)}if(!Rh.call(e,t))return e;var r=E1(e);return Array.isArray(r)?r.splice(t,1):delete r[t],r}function Zye(e,t,r){if(!Yu(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(Cs(e)){if(!e.set)throw new TypeError("Cannot update immutable value without .set() method: "+e);return e.set(t,r)}if(Rh.call(e,t)&&r===e[t])return e;var n=E1(e);return n[t]=r,n}function Ah(e,t,r,n){n||(n=r,r=void 0);var i=sF(Cs(e),e,iF(t),0,r,n);return i===cn?r:i}function sF(e,t,r,n,i,a){var u=t===cn;if(n===r.length){var o=u?i:t,f=a(o);return f===o?t:f}if(!u&&!Yu(t))throw new TypeError("Cannot update within non-data-structure value in path ["+r.slice(0,n).map(tv)+"]: "+t);var p=r[n],v=u?cn:aF(t,p,cn),y=sF(v===cn?e:Cs(v),v,r,n+1,i,a);return y===v?t:y===cn?Gye(t,p):Zye(u?e?vs():{}:t,p,y)}function Xye(e,t,r){return Ah(e,t,cn,function(){return r})}function FE(e,t){return Xye(this,e,t)}function Yye(e,t){return Ah(e,t,function(){return cn})}function $E(e){return Yye(this,e)}function lF(e,t,r,n){return Ah(e,[t],r,n)}function BE(e,t,r){return arguments.length===1?e(this):lF(this,e,t,r)}function VE(e,t,r){return Ah(this,e,t,r)}function uF(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return dF(this,e)}function cF(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];if(typeof e!="function")throw new TypeError("Invalid merger function: "+e);return dF(this,t,e)}function dF(e,t,r){for(var n=[],i=0;i<t.length;i++){var a=Ya(t[i]);a.size!==0&&n.push(a)}return n.length===0?e:e.toSeq().size===0&&!e.__ownerID&&n.length===1?e.constructor(n[0]):e.withMutations(function(u){for(var o=r?function(p,v){lF(u,v,cn,function(y){return y===cn?p:r(y,p,v)})}:function(p,v){u.set(v,p)},f=0;f<n.length;f++)n[f].forEach(o)})}function jE(e,t,r){return UE(e,t,Qye(r))}function UE(e,t,r){if(!Yu(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(Cs(e))return typeof r=="function"&&e.mergeWith?e.mergeWith.apply(e,[r].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var n=Array.isArray(e),i=e,a=n?Sd:Ya,u=n?function(f){i===e&&(i=E1(i)),i.push(f)}:function(f,p){var v=Rh.call(i,p),y=v&&r?r(i[p],f,p):f;(!v||y!==i[p])&&(i===e&&(i=E1(i)),i[p]=y)},o=0;o<t.length;o++)a(t[o]).forEach(u);return i}function Qye(e){function t(r,n,i){return Yu(r)&&Yu(n)&&Jye(r,n)?UE(r,[n],t):e?e(r,n,i):n}return t}function Jye(e,t){var r=ea(e),n=ea(t);return zo(r)===zo(n)&&Zn(r)===Zn(n)}function fF(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return jE(this,e)}function hF(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return jE(this,t,e)}function KE(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Ah(this,e,vs(),function(n){return UE(n,t)})}function HE(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Ah(this,e,vs(),function(n){return jE(n,t)})}function Uv(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}function Kv(){return this.__ownerID?this:this.__ensureOwner(new SE)}function Hv(){return this.__ensureOwner()}function WE(){return this.__altered}var Nh=function(e){function t(r){return r==null?vs():OE(r)&&!xs(r)?r:vs().withMutations(function(n){var i=e(r);Ua(i.size),i.forEach(function(a,u){return n.set(u,a)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){for(var n=[],i=arguments.length;i--;)n[i]=arguments[i];return vs().withMutations(function(a){for(var u=0;u<n.length;u+=2){if(u+1>=n.length)throw new Error("Missing value for key: "+n[u]);a.set(n[u],n[u+1])}})},t.prototype.toString=function(){return this.__toString("Map {","}")},t.prototype.get=function(n,i){return this._root?this._root.get(0,void 0,n,i):i},t.prototype.set=function(n,i){return mI(this,n,i)},t.prototype.remove=function(n){return mI(this,n,cn)},t.prototype.deleteAll=function(n){var i=Ci(n);return i.size===0?this:this.withMutations(function(a){i.forEach(function(u){return a.remove(u)})})},t.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):vs()},t.prototype.sort=function(n){return jl(th(this,n))},t.prototype.sortBy=function(n,i){return jl(th(this,i,n))},t.prototype.map=function(n,i){var a=this;return this.withMutations(function(u){u.forEach(function(o,f){u.set(f,n.call(i,o,f,a))})})},t.prototype.__iterator=function(n,i){return new e0e(this,n,i)},t.prototype.__iterate=function(n,i){var a=this,u=0;return this._root&&this._root.iterate(function(o){return u++,n(o[1],o[0],a)},i),u},t.prototype.__ensureOwner=function(n){return n===this.__ownerID?this:n?qE(this.size,this._root,n,this.__hash):this.size===0?vs():(this.__ownerID=n,this.__altered=!1,this)},t}(Ya);Nh.isMap=OE;var Yn=Nh.prototype;Yn[WL]=!0;Yn[Bv]=Yn.remove;Yn.removeAll=Yn.deleteAll;Yn.setIn=FE;Yn.removeIn=Yn.deleteIn=$E;Yn.update=BE;Yn.updateIn=VE;Yn.merge=Yn.concat=uF;Yn.mergeWith=cF;Yn.mergeDeep=fF;Yn.mergeDeepWith=hF;Yn.mergeIn=KE;Yn.mergeDeepIn=HE;Yn.withMutations=Uv;Yn.wasAltered=WE;Yn.asImmutable=Hv;Yn["@@transducer/init"]=Yn.asMutable=Kv;Yn["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])};Yn["@@transducer/result"]=function(e){return e.asImmutable()};var rv=function(t,r){this.ownerID=t,this.entries=r};rv.prototype.get=function(t,r,n,i){for(var a=this.entries,u=0,o=a.length;u<o;u++)if(ma(n,a[u][0]))return a[u][1];return i};rv.prototype.update=function(t,r,n,i,a,u,o){for(var f=a===cn,p=this.entries,v=0,y=p.length;v<y&&!ma(i,p[v][0]);v++);var w=v<y;if(w?p[v][1]===a:f)return this;if(ja(o),(f||!w)&&ja(u),!(f&&p.length===1)){if(!w&&!f&&p.length>=a0e)return t0e(t,p,i,a);var k=t&&t===this.ownerID,T=k?p:Bs(p);return w?f?v===y-1?T.pop():T[v]=T.pop():T[v]=[i,a]:T.push([i,a]),k?(this.entries=T,this):new rv(t,T)}};var rh=function(t,r,n){this.ownerID=t,this.bitmap=r,this.nodes=n};rh.prototype.get=function(t,r,n,i){r===void 0&&(r=fa(n));var a=1<<((t===0?r:r>>>t)&Ao),u=this.bitmap;return(u&a)===0?i:this.nodes[pF(u&a-1)].get(t+Gn,r,n,i)};rh.prototype.update=function(t,r,n,i,a,u,o){n===void 0&&(n=fa(i));var f=(r===0?n:n>>>r)&Ao,p=1<<f,v=this.bitmap,y=(v&p)!==0;if(!y&&a===cn)return this;var w=pF(v&p-1),k=this.nodes,T=y?k[w]:void 0,R=GE(T,t,r+Gn,n,i,a,u,o);if(R===T)return this;if(!y&&R&&k.length>=s0e)return n0e(t,k,v,f,R);if(y&&!R&&k.length===2&&vI(k[w^1]))return k[w^1];if(y&&R&&k.length===1&&vI(R))return R;var A=t&&t===this.ownerID,I=y?R?v:v^p:v|p,O=y?R?mF(k,w,R,A):o0e(k,w,A):i0e(k,w,R,A);return A?(this.bitmap=I,this.nodes=O,this):new rh(t,I,O)};var nv=function(t,r,n){this.ownerID=t,this.count=r,this.nodes=n};nv.prototype.get=function(t,r,n,i){r===void 0&&(r=fa(n));var a=(t===0?r:r>>>t)&Ao,u=this.nodes[a];return u?u.get(t+Gn,r,n,i):i};nv.prototype.update=function(t,r,n,i,a,u,o){n===void 0&&(n=fa(i));var f=(r===0?n:n>>>r)&Ao,p=a===cn,v=this.nodes,y=v[f];if(p&&!y)return this;var w=GE(y,t,r+Gn,n,i,a,u,o);if(w===y)return this;var k=this.count;if(!y)k++;else if(!w&&(k--,k<l0e))return r0e(t,v,k,f);var T=t&&t===this.ownerID,R=mF(v,f,w,T);return T?(this.count=k,this.nodes=R,this):new nv(t,k,R)};var nh=function(t,r,n){this.ownerID=t,this.keyHash=r,this.entries=n};nh.prototype.get=function(t,r,n,i){for(var a=this.entries,u=0,o=a.length;u<o;u++)if(ma(n,a[u][0]))return a[u][1];return i};nh.prototype.update=function(t,r,n,i,a,u,o){n===void 0&&(n=fa(i));var f=a===cn;if(n!==this.keyHash)return f?this:(ja(o),ja(u),ZE(this,t,r,n,[i,a]));for(var p=this.entries,v=0,y=p.length;v<y&&!ma(i,p[v][0]);v++);var w=v<y;if(w?p[v][1]===a:f)return this;if(ja(o),(f||!w)&&ja(u),f&&y===2)return new Vl(t,this.keyHash,p[v^1]);var k=t&&t===this.ownerID,T=k?p:Bs(p);return w?f?v===y-1?T.pop():T[v]=T.pop():T[v]=[i,a]:T.push([i,a]),k?(this.entries=T,this):new nh(t,this.keyHash,T)};var Vl=function(t,r,n){this.ownerID=t,this.keyHash=r,this.entry=n};Vl.prototype.get=function(t,r,n,i){return ma(n,this.entry[0])?this.entry[1]:i};Vl.prototype.update=function(t,r,n,i,a,u,o){var f=a===cn,p=ma(i,this.entry[0]);if(p?a===this.entry[1]:f)return this;if(ja(o),f){ja(u);return}return p?t&&t===this.ownerID?(this.entry[1]=a,this):new Vl(t,this.keyHash,[i,a]):(ja(u),ZE(this,t,r,fa(i),[i,a]))};rv.prototype.iterate=nh.prototype.iterate=function(e,t){for(var r=this.entries,n=0,i=r.length-1;n<=i;n++)if(e(r[t?i-n:n])===!1)return!1};rh.prototype.iterate=nv.prototype.iterate=function(e,t){for(var r=this.nodes,n=0,i=r.length-1;n<=i;n++){var a=r[t?i-n:n];if(a&&a.iterate(e,t)===!1)return!1}};Vl.prototype.iterate=function(e,t){return e(this.entry)};var e0e=function(e){function t(r,n,i){this._type=n,this._reverse=i,this._stack=r._root&&hI(r._root)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){for(var n=this._type,i=this._stack;i;){var a=i.node,u=i.index++,o=void 0;if(a.entry){if(u===0)return q2(n,a.entry)}else if(a.entries){if(o=a.entries.length-1,u<=o)return q2(n,a.entries[this._reverse?o-u:u])}else if(o=a.nodes.length-1,u<=o){var f=a.nodes[this._reverse?o-u:u];if(f){if(f.entry)return q2(n,f.entry);i=this._stack=hI(f,i)}continue}i=this._stack=this._stack.__prev}return Jo()},t}(bn);function q2(e,t){return oi(e,t[0],t[1])}function hI(e,t){return{node:e,index:0,__prev:t}}function qE(e,t,r,n){var i=Object.create(Yn);return i.size=e,i._root=t,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}var pI;function vs(){return pI||(pI=qE(0))}function mI(e,t,r){var n,i;if(e._root){var a=IC(),u=IC();if(n=GE(e._root,e.__ownerID,0,void 0,t,r,a,u),!u.value)return e;i=e.size+(a.value?r===cn?-1:1:0)}else{if(r===cn)return e;i=1,n=new rv(e.__ownerID,[[t,r]])}return e.__ownerID?(e.size=i,e._root=n,e.__hash=void 0,e.__altered=!0,e):n?qE(i,n):vs()}function GE(e,t,r,n,i,a,u,o){return e?e.update(t,r,n,i,a,u,o):a===cn?e:(ja(o),ja(u),new Vl(t,n,[i,a]))}function vI(e){return e.constructor===Vl||e.constructor===nh}function ZE(e,t,r,n,i){if(e.keyHash===n)return new nh(t,n,[e.entry,i]);var a=(r===0?e.keyHash:e.keyHash>>>r)&Ao,u=(r===0?n:n>>>r)&Ao,o,f=a===u?[ZE(e,t,r+Gn,n,i)]:(o=new Vl(t,n,i),a<u?[e,o]:[o,e]);return new rh(t,1<<a|1<<u,f)}function t0e(e,t,r,n){e||(e=new SE);for(var i=new Vl(e,fa(r),[r,n]),a=0;a<t.length;a++){var u=t[a];i=i.update(e,0,void 0,u[0],u[1])}return i}function r0e(e,t,r,n){for(var i=0,a=0,u=new Array(r),o=0,f=1,p=t.length;o<p;o++,f<<=1){var v=t[o];v!==void 0&&o!==n&&(i|=f,u[a++]=v)}return new rh(e,i,u)}function n0e(e,t,r,n,i){for(var a=0,u=new Array(Va),o=0;r!==0;o++,r>>>=1)u[o]=r&1?t[a++]:void 0;return u[n]=i,new nv(e,a+1,u)}function pF(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,e+=e>>16,e&127}function mF(e,t,r,n){var i=n?e:Bs(e);return i[t]=r,i}function i0e(e,t,r,n){var i=e.length+1;if(n&&t+1===i)return e[t]=r,e;for(var a=new Array(i),u=0,o=0;o<i;o++)o===t?(a[o]=r,u=-1):a[o]=e[o+u];return a}function o0e(e,t,r){var n=e.length-1;if(r&&t===n)return e.pop(),e;for(var i=new Array(n),a=0,u=0;u<n;u++)u===t&&(a=1),i[u]=e[u+a];return i}var a0e=Va/4,s0e=Va/2,l0e=Va/4,vF="@@__IMMUTABLE_LIST__@@";function gF(e){return Boolean(e&&e[vF])}var i_=function(e){function t(r){var n=v0();if(r==null)return n;if(gF(r))return r;var i=e(r),a=i.size;return a===0?n:(Ua(a),a>0&&a<Va?iv(0,a,Gn,null,new Uu(i.toArray())):n.withMutations(function(u){u.setSize(a),i.forEach(function(o,f){return u.set(f,o)})}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("List [","]")},t.prototype.get=function(n,i){if(n=Xu(this,n),n>=0&&n<this.size){n+=this._origin;var a=yF(this,n);return a&&a.array[n&Ao]}return i},t.prototype.set=function(n,i){return u0e(this,n,i)},t.prototype.remove=function(n){return this.has(n)?n===0?this.shift():n===this.size-1?this.pop():this.splice(n,1):this},t.prototype.insert=function(n,i){return this.splice(n,0,i)},t.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=Gn,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):v0()},t.prototype.push=function(){var n=arguments,i=this.size;return this.withMutations(function(a){bu(a,0,i+n.length);for(var u=0;u<n.length;u++)a.set(i+u,n[u])})},t.prototype.pop=function(){return bu(this,0,-1)},t.prototype.unshift=function(){var n=arguments;return this.withMutations(function(i){bu(i,-n.length);for(var a=0;a<n.length;a++)i.set(a,n[a])})},t.prototype.shift=function(){return bu(this,1)},t.prototype.concat=function(){for(var n=arguments,i=[],a=0;a<arguments.length;a++){var u=n[a],o=e(typeof u!="string"&&kE(u)?u:[u]);o.size!==0&&i.push(o)}return i.length===0?this:this.size===0&&!this.__ownerID&&i.length===1?this.constructor(i[0]):this.withMutations(function(f){i.forEach(function(p){return p.forEach(function(v){return f.push(v)})})})},t.prototype.setSize=function(n){return bu(this,0,n)},t.prototype.map=function(n,i){var a=this;return this.withMutations(function(u){for(var o=0;o<a.size;o++)u.set(o,n.call(i,u.get(o),o,a))})},t.prototype.slice=function(n,i){var a=this.size;return Yx(n,i,a)?this:bu(this,Vv(n,a),Qx(i,a))},t.prototype.__iterator=function(n,i){var a=i?this.size:0,u=gI(this,i);return new bn(function(){var o=u();return o===Cm?Jo():oi(n,i?--a:a++,o)})},t.prototype.__iterate=function(n,i){for(var a=i?this.size:0,u=gI(this,i),o;(o=u())!==Cm&&n(o,i?--a:a++,this)!==!1;);return a},t.prototype.__ensureOwner=function(n){return n===this.__ownerID?this:n?iv(this._origin,this._capacity,this._level,this._root,this._tail,n,this.__hash):this.size===0?v0():(this.__ownerID=n,this.__altered=!1,this)},t}(Sd);i_.isList=gF;var zi=i_.prototype;zi[vF]=!0;zi[Bv]=zi.remove;zi.merge=zi.concat;zi.setIn=FE;zi.deleteIn=zi.removeIn=$E;zi.update=BE;zi.updateIn=VE;zi.mergeIn=KE;zi.mergeDeepIn=HE;zi.withMutations=Uv;zi.wasAltered=WE;zi.asImmutable=Hv;zi["@@transducer/init"]=zi.asMutable=Kv;zi["@@transducer/step"]=function(e,t){return e.push(t)};zi["@@transducer/result"]=function(e){return e.asImmutable()};var Uu=function(t,r){this.array=t,this.ownerID=r};Uu.prototype.removeBefore=function(t,r,n){if(n===r?1<<r:this.array.length===0)return this;var i=n>>>r&Ao;if(i>=this.array.length)return new Uu([],t);var a=i===0,u;if(r>0){var o=this.array[i];if(u=o&&o.removeBefore(t,r-Gn,n),u===o&&a)return this}if(a&&!u)return this;var f=ih(this,t);if(!a)for(var p=0;p<i;p++)f.array[p]=void 0;return u&&(f.array[i]=u),f};Uu.prototype.removeAfter=function(t,r,n){if(n===(r?1<<r:0)||this.array.length===0)return this;var i=n-1>>>r&Ao;if(i>=this.array.length)return this;var a;if(r>0){var u=this.array[i];if(a=u&&u.removeAfter(t,r-Gn,n),a===u&&i===this.array.length-1)return this}var o=ih(this,t);return o.array.splice(i+1),a&&(o.array[i]=a),o};var Cm={};function gI(e,t){var r=e._origin,n=e._capacity,i=ov(n),a=e._tail;return u(e._root,e._level,0);function u(p,v,y){return v===0?o(p,y):f(p,v,y)}function o(p,v){var y=v===i?a&&a.array:p&&p.array,w=v>r?0:r-v,k=n-v;return k>Va&&(k=Va),function(){if(w===k)return Cm;var T=t?--k:w++;return y&&y[T]}}function f(p,v,y){var w,k=p&&p.array,T=y>r?0:r-y>>v,R=(n-y>>v)+1;return R>Va&&(R=Va),function(){for(;;){if(w){var A=w();if(A!==Cm)return A;w=null}if(T===R)return Cm;var I=t?--R:T++;w=u(k&&k[I],v-Gn,y+(I<<v))}}}}function iv(e,t,r,n,i,a,u){var o=Object.create(zi);return o.size=t-e,o._origin=e,o._capacity=t,o._level=r,o._root=n,o._tail=i,o.__ownerID=a,o.__hash=u,o.__altered=!1,o}var yI;function v0(){return yI||(yI=iv(0,0,Gn))}function u0e(e,t,r){if(t=Xu(e,t),t!==t)return e;if(t>=e.size||t<0)return e.withMutations(function(u){t<0?bu(u,t).set(0,r):bu(u,0,t+1).set(t,r)});t+=e._origin;var n=e._tail,i=e._root,a=IC();return t>=ov(e._capacity)?n=DC(n,e.__ownerID,0,t,r,a):i=DC(i,e.__ownerID,e._level,t,r,a),a.value?e.__ownerID?(e._root=i,e._tail=n,e.__hash=void 0,e.__altered=!0,e):iv(e._origin,e._capacity,e._level,i,n):e}function DC(e,t,r,n,i,a){var u=n>>>r&Ao,o=e&&u<e.array.length;if(!o&&i===void 0)return e;var f;if(r>0){var p=e&&e.array[u],v=DC(p,t,r-Gn,n,i,a);return v===p?e:(f=ih(e,t),f.array[u]=v,f)}return o&&e.array[u]===i?e:(a&&ja(a),f=ih(e,t),i===void 0&&u===f.array.length-1?f.array.pop():f.array[u]=i,f)}function ih(e,t){return t&&e&&t===e.ownerID?e:new Uu(e?e.array.slice():[],t)}function yF(e,t){if(t>=ov(e._capacity))return e._tail;if(t<1<<e._level+Gn){for(var r=e._root,n=e._level;r&&n>0;)r=r.array[t>>>n&Ao],n-=Gn;return r}}function bu(e,t,r){t!==void 0&&(t|=0),r!==void 0&&(r|=0);var n=e.__ownerID||new SE,i=e._origin,a=e._capacity,u=i+t,o=r===void 0?a:r<0?a+r:i+r;if(u===i&&o===a)return e;if(u>=o)return e.clear();for(var f=e._level,p=e._root,v=0;u+v<0;)p=new Uu(p&&p.array.length?[void 0,p]:[],n),f+=Gn,v+=1<<f;v&&(u+=v,i+=v,o+=v,a+=v);for(var y=ov(a),w=ov(o);w>=1<<f+Gn;)p=new Uu(p&&p.array.length?[p]:[],n),f+=Gn;var k=e._tail,T=w<y?yF(e,o-1):w>y?new Uu([],n):k;if(k&&w>y&&u<a&&k.array.length){p=ih(p,n);for(var R=p,A=f;A>Gn;A-=Gn){var I=y>>>A&Ao;R=R.array[I]=ih(R.array[I],n)}R.array[y>>>Gn&Ao]=k}if(o<a&&(T=T&&T.removeAfter(n,0,o)),u>=w)u-=w,o-=w,f=Gn,p=null,T=T&&T.removeBefore(n,0,u);else if(u>i||w<y){for(v=0;p;){var O=u>>>f&Ao;if(O!==w>>>f&Ao)break;O&&(v+=(1<<f)*O),f-=Gn,p=p.array[O]}p&&u>i&&(p=p.removeBefore(n,f,u-v)),p&&w<y&&(p=p.removeAfter(n,f,w-v)),v&&(u-=v,o-=v)}return e.__ownerID?(e.size=o-u,e._origin=u,e._capacity=o,e._level=f,e._root=p,e._tail=T,e.__hash=void 0,e.__altered=!0,e):iv(u,o,f,p,T)}function ov(e){return e<Va?0:e-1>>>Gn<<Gn}var jl=function(e){function t(r){return r==null?tm():qL(r)?r:tm().withMutations(function(n){var i=Ya(r);Ua(i.size),i.forEach(function(a,u){return n.set(u,a)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},t.prototype.get=function(n,i){var a=this._map.get(n);return a!==void 0?this._list.get(a)[1]:i},t.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):tm()},t.prototype.set=function(n,i){return _I(this,n,i)},t.prototype.remove=function(n){return _I(this,n,cn)},t.prototype.__iterate=function(n,i){var a=this;return this._list.__iterate(function(u){return u&&n(u[1],u[0],a)},i)},t.prototype.__iterator=function(n,i){return this._list.fromEntrySeq().__iterator(n,i)},t.prototype.__ensureOwner=function(n){if(n===this.__ownerID)return this;var i=this._map.__ensureOwner(n),a=this._list.__ensureOwner(n);return n?XE(i,a,n,this.__hash):this.size===0?tm():(this.__ownerID=n,this.__altered=!1,this._map=i,this._list=a,this)},t}(Nh);jl.isOrderedMap=qL;jl.prototype[Ih]=!0;jl.prototype[Bv]=jl.prototype.remove;function XE(e,t,r,n){var i=Object.create(jl.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}var xI;function tm(){return xI||(xI=XE(vs(),v0()))}function _I(e,t,r){var n=e._map,i=e._list,a=n.get(t),u=a!==void 0,o,f;if(r===cn){if(!u)return e;i.size>=Va&&i.size>=n.size*2?(f=i.filter(function(p,v){return p!==void 0&&a!==v}),o=f.toKeyedSeq().map(function(p){return p[0]}).flip().toMap(),e.__ownerID&&(o.__ownerID=f.__ownerID=e.__ownerID)):(o=n.remove(t),f=a===i.size-1?i.pop():i.set(a,void 0))}else if(u){if(r===i.get(a)[1])return e;o=n,f=i.set(a,[t,r])}else o=n.set(t,i.size),f=i.set(i.size,[t,r]);return e.__ownerID?(e.size=o.size,e._map=o,e._list=f,e.__hash=void 0,e.__altered=!0,e):XE(o,f)}var xF="@@__IMMUTABLE_STACK__@@";function LC(e){return Boolean(e&&e[xF])}var YE=function(e){function t(r){return r==null?By():LC(r)?r:By().pushAll(r)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(n,i){var a=this._head;for(n=Xu(this,n);a&&n--;)a=a.next;return a?a.value:i},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var n=arguments;if(arguments.length===0)return this;for(var i=this.size+arguments.length,a=this._head,u=arguments.length-1;u>=0;u--)a={value:n[u],next:a};return this.__ownerID?(this.size=i,this._head=a,this.__hash=void 0,this.__altered=!0,this):rm(i,a)},t.prototype.pushAll=function(n){if(n=e(n),n.size===0)return this;if(this.size===0&&LC(n))return n;Ua(n.size);var i=this.size,a=this._head;return n.__iterate(function(u){i++,a={value:u,next:a}},!0),this.__ownerID?(this.size=i,this._head=a,this.__hash=void 0,this.__altered=!0,this):rm(i,a)},t.prototype.pop=function(){return this.slice(1)},t.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):By()},t.prototype.slice=function(n,i){if(Yx(n,i,this.size))return this;var a=Vv(n,this.size),u=Qx(i,this.size);if(u!==this.size)return e.prototype.slice.call(this,n,i);for(var o=this.size-a,f=this._head;a--;)f=f.next;return this.__ownerID?(this.size=o,this._head=f,this.__hash=void 0,this.__altered=!0,this):rm(o,f)},t.prototype.__ensureOwner=function(n){return n===this.__ownerID?this:n?rm(this.size,this._head,n,this.__hash):this.size===0?By():(this.__ownerID=n,this.__altered=!1,this)},t.prototype.__iterate=function(n,i){var a=this;if(i)return new fd(this.toArray()).__iterate(function(f,p){return n(f,p,a)},i);for(var u=0,o=this._head;o&&n(o.value,u++,this)!==!1;)o=o.next;return u},t.prototype.__iterator=function(n,i){if(i)return new fd(this.toArray()).__iterator(n,i);var a=0,u=this._head;return new bn(function(){if(u){var o=u.value;return u=u.next,oi(n,a++,o)}return Jo()})},t}(Sd);YE.isStack=LC;var Fo=YE.prototype;Fo[xF]=!0;Fo.shift=Fo.pop;Fo.unshift=Fo.push;Fo.unshiftAll=Fo.pushAll;Fo.withMutations=Uv;Fo.wasAltered=WE;Fo.asImmutable=Hv;Fo["@@transducer/init"]=Fo.asMutable=Kv;Fo["@@transducer/step"]=function(e,t){return e.unshift(t)};Fo["@@transducer/result"]=function(e){return e.asImmutable()};function rm(e,t,r,n){var i=Object.create(Fo);return i.size=e,i._head=t,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}var bI;function By(){return bI||(bI=rm(0))}var _F="@@__IMMUTABLE_SET__@@";function QE(e){return Boolean(e&&e[_F])}function bF(e){return QE(e)&&xs(e)}function wF(e,t){if(e===t)return!0;if(!Qo(t)||e.size!==void 0&&t.size!==void 0&&e.size!==t.size||e.__hash!==void 0&&t.__hash!==void 0&&e.__hash!==t.__hash||Zn(e)!==Zn(t)||zo(e)!==zo(t)||xs(e)!==xs(t))return!1;if(e.size===0&&t.size===0)return!0;var r=!Jx(e);if(xs(e)){var n=e.entries();return t.every(function(f,p){var v=n.next().value;return v&&ma(v[1],f)&&(r||ma(v[0],p))})&&n.next().done}var i=!1;if(e.size===void 0)if(t.size===void 0)typeof e.cacheResult=="function"&&e.cacheResult();else{i=!0;var a=e;e=t,t=a}var u=!0,o=t.__iterate(function(f,p){if(r?!e.has(f):i?!ma(f,e.get(p,cn)):!ma(e.get(p,cn),f))return u=!1,!1});return u&&e.size===o}function Ed(e,t){var r=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(r),e}function k1(e){if(!e||typeof e!="object")return e;if(!Qo(e)){if(!Yu(e))return e;e=ea(e)}if(Zn(e)){var t={};return e.__iterate(function(n,i){t[i]=k1(n)}),t}var r=[];return e.__iterate(function(n){r.push(k1(n))}),r}var o_=function(e){function t(r){return r==null?nm():QE(r)&&!xs(r)?r:nm().withMutations(function(n){var i=e(r);Ua(i.size),i.forEach(function(a){return n.add(a)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(n){return this(Ya(n).keySeq())},t.intersect=function(n){return n=Ci(n).toArray(),n.length?ao.intersect.apply(t(n.pop()),n):nm()},t.union=function(n){return n=Ci(n).toArray(),n.length?ao.union.apply(t(n.pop()),n):nm()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(n){return this._map.has(n)},t.prototype.add=function(n){return Vy(this,this._map.set(n,n))},t.prototype.remove=function(n){return Vy(this,this._map.remove(n))},t.prototype.clear=function(){return Vy(this,this._map.clear())},t.prototype.map=function(n,i){var a=this,u=!1,o=Vy(this,this._map.mapEntries(function(f){var p=f[1],v=n.call(i,p,p,a);return v!==p&&(u=!0),[v,v]},i));return u?o:this},t.prototype.union=function(){for(var n=[],i=arguments.length;i--;)n[i]=arguments[i];return n=n.filter(function(a){return a.size!==0}),n.length===0?this:this.size===0&&!this.__ownerID&&n.length===1?this.constructor(n[0]):this.withMutations(function(a){for(var u=0;u<n.length;u++)typeof n[u]=="string"?a.add(n[u]):e(n[u]).forEach(function(o){return a.add(o)})})},t.prototype.intersect=function(){for(var n=[],i=arguments.length;i--;)n[i]=arguments[i];if(n.length===0)return this;n=n.map(function(u){return e(u)});var a=[];return this.forEach(function(u){n.every(function(o){return o.includes(u)})||a.push(u)}),this.withMutations(function(u){a.forEach(function(o){u.remove(o)})})},t.prototype.subtract=function(){for(var n=[],i=arguments.length;i--;)n[i]=arguments[i];if(n.length===0)return this;n=n.map(function(u){return e(u)});var a=[];return this.forEach(function(u){n.some(function(o){return o.includes(u)})&&a.push(u)}),this.withMutations(function(u){a.forEach(function(o){u.remove(o)})})},t.prototype.sort=function(n){return av(th(this,n))},t.prototype.sortBy=function(n,i){return av(th(this,i,n))},t.prototype.wasAltered=function(){return this._map.wasAltered()},t.prototype.__iterate=function(n,i){var a=this;return this._map.__iterate(function(u){return n(u,u,a)},i)},t.prototype.__iterator=function(n,i){return this._map.__iterator(n,i)},t.prototype.__ensureOwner=function(n){if(n===this.__ownerID)return this;var i=this._map.__ensureOwner(n);return n?this.__make(i,n):this.size===0?this.__empty():(this.__ownerID=n,this._map=i,this)},t}(Ph);o_.isSet=QE;var ao=o_.prototype;ao[_F]=!0;ao[Bv]=ao.remove;ao.merge=ao.concat=ao.union;ao.withMutations=Uv;ao.asImmutable=Hv;ao["@@transducer/init"]=ao.asMutable=Kv;ao["@@transducer/step"]=function(e,t){return e.add(t)};ao["@@transducer/result"]=function(e){return e.asImmutable()};ao.__empty=nm;ao.__make=CF;function Vy(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:t.size===0?e.__empty():e.__make(t)}function CF(e,t){var r=Object.create(ao);return r.size=e?e.size:0,r._map=e,r.__ownerID=t,r}var wI;function nm(){return wI||(wI=CF(vs()))}var c0e=function(e){function t(r,n,i){if(!(this instanceof t))return new t(r,n,i);if(LE(i!==0,"Cannot step a Range by 0"),r=r||0,n===void 0&&(n=1/0),i=i===void 0?1:Math.abs(i),n<r&&(i=-i),this._start=r,this._end=n,this._step=i,this.size=Math.max(0,Math.ceil((n-r)/i-1)+1),this.size===0){if(G2)return G2;G2=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.size===0?"Range []":"Range [ "+this._start+"..."+this._end+(this._step!==1?" by "+this._step:"")+" ]"},t.prototype.get=function(n,i){return this.has(n)?this._start+Xu(this,n)*this._step:i},t.prototype.includes=function(n){var i=(n-this._start)/this._step;return i>=0&&i<this.size&&i===Math.floor(i)},t.prototype.slice=function(n,i){return Yx(n,i,this.size)?this:(n=Vv(n,this.size),i=Qx(i,this.size),i<=n?new t(0,0):new t(this.get(n,this._end),this.get(i,this._end),this._step))},t.prototype.indexOf=function(n){var i=n-this._start;if(i%this._step===0){var a=i/this._step;if(a>=0&&a<this.size)return a}return-1},t.prototype.lastIndexOf=function(n){return this.indexOf(n)},t.prototype.__iterate=function(n,i){for(var a=this.size,u=this._step,o=i?this._start+(a-1)*u:this._start,f=0;f!==a&&n(o,i?a-++f:f++,this)!==!1;)o+=i?-u:u;return f},t.prototype.__iterator=function(n,i){var a=this.size,u=this._step,o=i?this._start+(a-1)*u:this._start,f=0;return new bn(function(){if(f===a)return Jo();var p=o;return o+=i?-u:u,oi(n,i?a-++f:f++,p)})},t.prototype.equals=function(n){return n instanceof t?this._start===n._start&&this._end===n._end&&this._step===n._step:wF(this,n)},t}(Ss),G2;function SF(e,t,r){for(var n=iF(t),i=0;i!==n.length;)if(e=aF(e,n[i++],cn),e===cn)return r;return e}function EF(e,t){return SF(this,e,t)}function d0e(e,t){return SF(e,t,cn)!==cn}function f0e(e){return d0e(this,e)}function kF(){Ua(this.size);var e={};return this.__iterate(function(t,r){e[r]=t}),e}Ci.isIterable=Qo;Ci.isKeyed=Zn;Ci.isIndexed=zo;Ci.isAssociative=Jx;Ci.isOrdered=xs;Ci.Iterator=bn;Ed(Ci,{toArray:function(){Ua(this.size);var t=new Array(this.size||0),r=Zn(this),n=0;return this.__iterate(function(i,a){t[n++]=r?[a,i]:i}),t},toIndexedSeq:function(){return new ZL(this)},toJS:function(){return k1(this)},toKeyedSeq:function(){return new n_(this,!0)},toMap:function(){return Nh(this.toKeyedSeq())},toObject:kF,toOrderedMap:function(){return jl(this.toKeyedSeq())},toOrderedSet:function(){return av(Zn(this)?this.valueSeq():this)},toSet:function(){return o_(Zn(this)?this.valueSeq():this)},toSetSeq:function(){return new XL(this)},toSeq:function(){return zo(this)?this.toIndexedSeq():Zn(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return YE(Zn(this)?this.valueSeq():this)},toList:function(){return i_(Zn(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(t,r){return this.size===0?t+r:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+r},concat:function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return $n(this,Uye(this,t))},includes:function(t){return this.some(function(r){return ma(r,t)})},entries:function(){return this.__iterator(Ga)},every:function(t,r){Ua(this.size);var n=!0;return this.__iterate(function(i,a,u){if(!t.call(r,i,a,u))return n=!1,!1}),n},filter:function(t,r){return $n(this,eF(this,t,r,!0))},partition:function(t,r){return Vye(this,t,r)},find:function(t,r,n){var i=this.findEntry(t,r);return i?i[1]:n},forEach:function(t,r){return Ua(this.size),this.__iterate(r?t.bind(r):t)},join:function(t){Ua(this.size),t=t!==void 0?""+t:",";var r="",n=!0;return this.__iterate(function(i){n?n=!1:r+=t,r+=i!=null?i.toString():""}),r},keys:function(){return this.__iterator(jv)},map:function(t,r){return $n(this,JL(this,t,r))},reduce:function(t,r,n){return CI(this,t,r,n,arguments.length<2,!1)},reduceRight:function(t,r,n){return CI(this,t,r,n,arguments.length<2,!0)},reverse:function(){return $n(this,AE(this,!0))},slice:function(t,r){return $n(this,NE(this,t,r,!0))},some:function(t,r){return!this.every(jy(t),r)},sort:function(t){return $n(this,th(this,t))},values:function(){return this.__iterator(ws)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return this.size!==void 0?this.size===0:!this.some(function(){return!0})},count:function(t,r){return eh(t?this.toSeq().filter(t,r):this)},countBy:function(t,r){return $ye(this,t,r)},equals:function(t){return wF(this,t)},entrySeq:function(){var t=this;if(t._cache)return new fd(t._cache);var r=t.toSeq().map(p0e).toIndexedSeq();return r.fromEntrySeq=function(){return t.toSeq()},r},filterNot:function(t,r){return this.filter(jy(t),r)},findEntry:function(t,r,n){var i=n;return this.__iterate(function(a,u,o){if(t.call(r,a,u,o))return i=[u,a],!1}),i},findKey:function(t,r){var n=this.findEntry(t,r);return n&&n[0]},findLast:function(t,r,n){return this.toKeyedSeq().reverse().find(t,r,n)},findLastEntry:function(t,r,n){return this.toKeyedSeq().reverse().findEntry(t,r,n)},findLastKey:function(t,r){return this.toKeyedSeq().reverse().findKey(t,r)},first:function(t){return this.find(DL,null,t)},flatMap:function(t,r){return $n(this,Kye(this,t,r))},flatten:function(t){return $n(this,rF(this,t,!0))},fromEntrySeq:function(){return new YL(this)},get:function(t,r){return this.find(function(n,i){return ma(i,t)},void 0,r)},getIn:EF,groupBy:function(t,r){return Bye(this,t,r)},has:function(t){return this.get(t,cn)!==cn},hasIn:f0e,isSubset:function(t){return t=typeof t.includes=="function"?t:Ci(t),this.every(function(r){return t.includes(r)})},isSuperset:function(t){return t=typeof t.isSubset=="function"?t:Ci(t),t.isSubset(this)},keyOf:function(t){return this.findKey(function(r){return ma(r,t)})},keySeq:function(){return this.toSeq().map(h0e).toIndexedSeq()},last:function(t){return this.toSeq().reverse().first(t)},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return Fy(this,t)},maxBy:function(t,r){return Fy(this,r,t)},min:function(t){return Fy(this,t?SI(t):kI)},minBy:function(t,r){return Fy(this,r?SI(r):kI,t)},rest:function(){return this.slice(1)},skip:function(t){return t===0?this:this.slice(Math.max(0,t))},skipLast:function(t){return t===0?this:this.slice(0,-Math.max(0,t))},skipWhile:function(t,r){return $n(this,tF(this,t,r,!0))},skipUntil:function(t,r){return this.skipWhile(jy(t),r)},sortBy:function(t,r){return $n(this,th(this,r,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return this.slice(-Math.max(0,t))},takeWhile:function(t,r){return $n(this,jye(this,t,r))},takeUntil:function(t,r){return this.takeWhile(jy(t),r)},update:function(t){return t(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=m0e(this))}});var _o=Ci.prototype;_o[$L]=!0;_o[e_]=_o.values;_o.toJSON=_o.toArray;_o.__toStringMapper=tv;_o.inspect=_o.toSource=function(){return this.toString()};_o.chain=_o.flatMap;_o.contains=_o.includes;Ed(Ya,{flip:function(){return $n(this,QL(this))},mapEntries:function(t,r){var n=this,i=0;return $n(this,this.toSeq().map(function(a,u){return t.call(r,[u,a],i++,n)}).fromEntrySeq())},mapKeys:function(t,r){var n=this;return $n(this,this.toSeq().flip().map(function(i,a){return t.call(r,i,a,n)}).flip())}});var Wv=Ya.prototype;Wv[BL]=!0;Wv[e_]=_o.entries;Wv.toJSON=kF;Wv.__toStringMapper=function(e,t){return tv(t)+": "+tv(e)};Ed(Sd,{toKeyedSeq:function(){return new n_(this,!1)},filter:function(t,r){return $n(this,eF(this,t,r,!1))},findIndex:function(t,r){var n=this.findEntry(t,r);return n?n[0]:-1},indexOf:function(t){var r=this.keyOf(t);return r===void 0?-1:r},lastIndexOf:function(t){var r=this.lastKeyOf(t);return r===void 0?-1:r},reverse:function(){return $n(this,AE(this,!1))},slice:function(t,r){return $n(this,NE(this,t,r,!1))},splice:function(t,r){var n=arguments.length;if(r=Math.max(r||0,0),n===0||n===2&&!r)return this;t=Vv(t,t<0?this.count():this.size);var i=this.slice(0,t);return $n(this,n===1?i:i.concat(Bs(arguments,2),this.slice(t+r)))},findLastIndex:function(t,r){var n=this.findLastEntry(t,r);return n?n[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return $n(this,rF(this,t,!1))},get:function(t,r){return t=Xu(this,t),t<0||this.size===1/0||this.size!==void 0&&t>this.size?r:this.find(function(n,i){return i===t},void 0,r)},has:function(t){return t=Xu(this,t),t>=0&&(this.size!==void 0?this.size===1/0||t<this.size:this.indexOf(t)!==-1)},interpose:function(t){return $n(this,Hye(this,t))},interleave:function(){var t=[this].concat(Bs(arguments)),r=$y(this.toSeq(),Ss.of,t),n=r.flatten(!0);return r.size&&(n.size=r.size*t.length),$n(this,n)},keySeq:function(){return c0e(0,this.size)},last:function(t){return this.get(-1,t)},skipWhile:function(t,r){return $n(this,tF(this,t,r,!1))},zip:function(){var t=[this].concat(Bs(arguments));return $n(this,$y(this,EI,t))},zipAll:function(){var t=[this].concat(Bs(arguments));return $n(this,$y(this,EI,t,!0))},zipWith:function(t){var r=Bs(arguments);return r[0]=this,$n(this,$y(this,t,r))}});var zh=Sd.prototype;zh[VL]=!0;zh[Ih]=!0;Ed(Ph,{get:function(t,r){return this.has(t)?t:r},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}});var oh=Ph.prototype;oh.has=_o.includes;oh.contains=oh.includes;oh.keys=oh.values;Ed(sc,Wv);Ed(Ss,zh);Ed(Oh,oh);function CI(e,t,r,n,i,a){return Ua(e.size),e.__iterate(function(u,o,f){i?(i=!1,r=u):r=t.call(n,r,u,o,f)},a),r}function h0e(e,t){return t}function p0e(e,t){return[t,e]}function jy(e){return function(){return!e.apply(this,arguments)}}function SI(e){return function(){return-e.apply(this,arguments)}}function EI(){return Bs(arguments)}function kI(e,t){return e<t?1:e>t?-1:0}function m0e(e){if(e.size===1/0)return 0;var t=xs(e),r=Zn(e),n=t?1:0,i=e.__iterate(r?t?function(a,u){n=31*n+TI(fa(a),fa(u))|0}:function(a,u){n=n+TI(fa(a),fa(u))|0}:t?function(a){n=31*n+fa(a)|0}:function(a){n=n+fa(a)|0});return v0e(i,n)}function v0e(e,t){return t=Hp(t,3432918353),t=Hp(t<<15|t>>>-15,461845907),t=Hp(t<<13|t>>>-13,5),t=(t+3864292196|0)^e,t=Hp(t^t>>>16,2246822507),t=Hp(t^t>>>13,3266489909),t=r_(t^t>>>16),t}function TI(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}var av=function(e){function t(r){return r==null?FC():bF(r)?r:FC().withMutations(function(n){var i=Ph(r);Ua(i.size),i.forEach(function(a){return n.add(a)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(n){return this(Ya(n).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(o_);av.isOrderedSet=bF;var kd=av.prototype;kd[Ih]=!0;kd.zip=zh.zip;kd.zipWith=zh.zipWith;kd.zipAll=zh.zipAll;kd.__empty=FC;kd.__make=TF;function TF(e,t){var r=Object.create(kd);return r.size=e?e.size:0,r._map=e,r.__ownerID=t,r}var PI;function FC(){return PI||(PI=TF(tm()))}function g0e(e){if(Mh(e))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(Cs(e))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(e===null||typeof e!="object")throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}var Ji=function(t,r){var n;g0e(t);var i=function(o){var f=this;if(o instanceof i)return o;if(!(this instanceof i))return new i(o);if(!n){n=!0;var p=Object.keys(t),v=a._indices={};a._name=r,a._keys=p,a._defaultValues=t;for(var y=0;y<p.length;y++){var w=p[y];v[w]=y,a[w]?typeof console=="object"&&console.warn&&console.warn("Cannot define "+e5(this)+' with property "'+w+'" since that property name is part of the Record API.'):y0e(a,w)}}return this.__ownerID=void 0,this._values=i_().withMutations(function(k){k.setSize(f._keys.length),Ya(o).forEach(function(T,R){k.set(f._indices[R],T===f._defaultValues[R]?void 0:T)})}),this},a=i.prototype=Object.create(Hn);return a.constructor=i,r&&(i.displayName=r),i};Ji.prototype.toString=function(){for(var t=e5(this)+" { ",r=this._keys,n,i=0,a=r.length;i!==a;i++)n=r[i],t+=(i?", ":"")+n+": "+tv(this.get(n));return t+" }"};Ji.prototype.equals=function(t){return this===t||Mh(t)&&ah(this).equals(ah(t))};Ji.prototype.hashCode=function(){return ah(this).hashCode()};Ji.prototype.has=function(t){return this._indices.hasOwnProperty(t)};Ji.prototype.get=function(t,r){if(!this.has(t))return r;var n=this._indices[t],i=this._values.get(n);return i===void 0?this._defaultValues[t]:i};Ji.prototype.set=function(t,r){if(this.has(t)){var n=this._values.set(this._indices[t],r===this._defaultValues[t]?void 0:r);if(n!==this._values&&!this.__ownerID)return JE(this,n)}return this};Ji.prototype.remove=function(t){return this.set(t)};Ji.prototype.clear=function(){var t=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:JE(this,t)};Ji.prototype.wasAltered=function(){return this._values.wasAltered()};Ji.prototype.toSeq=function(){return ah(this)};Ji.prototype.toJS=function(){return k1(this)};Ji.prototype.entries=function(){return this.__iterator(Ga)};Ji.prototype.__iterator=function(t,r){return ah(this).__iterator(t,r)};Ji.prototype.__iterate=function(t,r){return ah(this).__iterate(t,r)};Ji.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var r=this._values.__ensureOwner(t);return t?JE(this,r,t):(this.__ownerID=t,this._values=r,this)};Ji.isRecord=Mh;Ji.getDescriptiveName=e5;var Hn=Ji.prototype;Hn[UL]=!0;Hn[Bv]=Hn.remove;Hn.deleteIn=Hn.removeIn=$E;Hn.getIn=EF;Hn.hasIn=_o.hasIn;Hn.merge=uF;Hn.mergeWith=cF;Hn.mergeIn=KE;Hn.mergeDeep=fF;Hn.mergeDeepWith=hF;Hn.mergeDeepIn=HE;Hn.setIn=FE;Hn.update=BE;Hn.updateIn=VE;Hn.withMutations=Uv;Hn.asMutable=Kv;Hn.asImmutable=Hv;Hn[e_]=Hn.entries;Hn.toJSON=Hn.toObject=_o.toObject;Hn.inspect=Hn.toSource=function(){return this.toString()};function JE(e,t,r){var n=Object.create(Object.getPrototypeOf(e));return n._values=t,n.__ownerID=r,n}function e5(e){return e.constructor.displayName||e.constructor.name||"Record"}function ah(e){return IE(e._keys.map(function(t){return[t,e.get(t)]}))}function y0e(e,t){try{Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(r){LE(this.__ownerID,"Cannot set on an immutable record."),this.set(t,r)}})}catch{}}function x0e(e,t){return PF([],t||_0e,e,"",t&&t.length>2?[]:void 0,{"":e})}function PF(e,t,r,n,i,a){if(typeof r!="string"&&!Cs(r)&&(TE(r)||kE(r)||oF(r))){if(~e.indexOf(r))throw new TypeError("Cannot convert circular structure to Immutable");e.push(r),i&&n!==""&&i.push(n);var u=t.call(a,n,ea(r).map(function(o,f){return PF(e,t,o,f,i,r)}),i&&i.slice());return e.pop(),i&&i.pop(),u}return r}function _0e(e,t){return zo(t)?t.toList():Zn(t)?t.toMap():t.toSet()}x0e(Eye);const b0e=()=>{const e=C.exports.useRef(null),t=C.exports.useRef(null),r=C.exports.useRef(null),{popup:n,setPopup:i}=OL(),{setClickedPointConfig:a}=ac(),{setLayersVisibility:u}=el(),{setStatus:o}=Ui(),{mode:f}=Js(),{tableState:p,openTable:v}=bE();C.exports.useEffect(()=>{o(mpe[f]),u(vpe[f]),i(null),a(null)},[f]);const y=I=>{if(!I.features){i(null),a(null);return}const O=I.features[0];if(!O){i(null),a(null);return}const{lng:N}=I.lngLat;if(O.geometry.type==="Point"){const L=O.geometry.coordinates.slice();for(;Math.abs(N-L[0])>180;)L[0]+=N>L[0]?360:-360;i({features:I.features,coordinates:L})}},w=I=>{!I.features[0]||(e.current.getCanvas().style.cursor="pointer")},k=I=>{!I.features[0]||(e.current.getCanvas().style.cursor="")};C.exports.useEffect(()=>{const I=new ResizeObserver(Ige(()=>{var O;(O=e==null?void 0:e.current)==null||O.resize()},16));return t.current&&I.observe(t.current),()=>{I.disconnect()}},[t.current]),C.exports.useEffect(()=>{p.fullScreen&&!p.isOpened&&v()},[p.fullScreen]);const[T,R]=C.exports.useState(!1),A=()=>R(I=>!I);return S(dme,{children:Xe("div",{className:"w-screen h-screen relative flex overflow-hidden",children:[S(mye,{}),S(Ive,{isCollapsed:T,ref:r}),Xe("div",{className:"flex-1 h-screen flex flex-col ",children:[S("div",{ref:t,className:dd(p.fullScreen?"":"flex-1"),children:Xe(gE,{mapLib:sme,initialViewState:{latitude:55.7558,longitude:37.6173,zoom:9},dragRotate:!1,ref:e,interactiveLayerIds:[wr["initial-match"],wr["initial-unmatch"],wr.approve,wr.working,wr.filteredWorking,wr.cancelled,wr.pvz,wr.other],onClick:y,onMouseEnter:w,onMouseLeave:k,id:"map",children:[n&&S(uge,{lat:n.coordinates[1],lng:n.coordinates[0],features:n.features,onClose:()=>{i(null),a(null)}}),S(tye,{toggleCollapse:A}),S(dge,{}),S(Yve,{}),S(Oge,{}),S(fge,{}),S(sye,{})]})}),S("div",{className:"w-full border-solid border-border border-0 border-t-[1px] z-20",children:S(Jge,{fullWidth:T})})]})]})})};function w0e(){return S(ame,{children:S(b0e,{})})}const C0e=new Zhe;zpe();function S0e(){return S(Jhe,{client:C0e,children:S(jU,{basename:"/",children:Xe(DU,{children:[S(Xp,{path:"/",element:S(w0e,{})}),S(Xp,{path:"/signin",element:S(eme,{})}),S(Xp,{path:"/verify-user",element:S(rme,{})}),S(Xp,{path:"/register",element:S(ome,{})})]})})})}Z2.createRoot(document.getElementById("root")).render(S(tn.StrictMode,{children:S(S0e,{})}));