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.

918 lines
1.9 MiB

var DK=Object.defineProperty;var OK=(e,t,n)=>t in e?DK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ln=(e,t,n)=>(OK(e,typeof t!="symbol"?t+"":t,n),n);function IF(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(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 r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var Vl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function WE(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var E={exports:{}},cr={};/**
* @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 Kg=Symbol.for("react.element"),AK=Symbol.for("react.portal"),NK=Symbol.for("react.fragment"),LK=Symbol.for("react.strict_mode"),FK=Symbol.for("react.profiler"),zK=Symbol.for("react.provider"),$K=Symbol.for("react.context"),BK=Symbol.for("react.forward_ref"),VK=Symbol.for("react.suspense"),UK=Symbol.for("react.memo"),jK=Symbol.for("react.lazy"),F3=Symbol.iterator;function HK(e){return e===null||typeof e!="object"?null:(e=F3&&e[F3]||e["@@iterator"],typeof e=="function"?e:null)}var MF={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},RF=Object.assign,DF={};function Oh(e,t,n){this.props=e,this.context=t,this.refs=DF,this.updater=n||MF}Oh.prototype.isReactComponent={};Oh.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")};Oh.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function OF(){}OF.prototype=Oh.prototype;function GE(e,t,n){this.props=e,this.context=t,this.refs=DF,this.updater=n||MF}var qE=GE.prototype=new OF;qE.constructor=GE;RF(qE,Oh.prototype);qE.isPureReactComponent=!0;var z3=Array.isArray,AF=Object.prototype.hasOwnProperty,ZE={current:null},NF={key:!0,ref:!0,__self:!0,__source:!0};function LF(e,t,n){var r,i={},a=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(a=""+t.key),t)AF.call(t,r)&&!NF.hasOwnProperty(r)&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var c=Array(o),f=0;f<o;f++)c[f]=arguments[f+2];i.children=c}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return{$$typeof:Kg,type:e,key:a,ref:s,props:i,_owner:ZE.current}}function KK(e,t){return{$$typeof:Kg,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function XE(e){return typeof e=="object"&&e!==null&&e.$$typeof===Kg}function WK(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var $3=/\/+/g;function Zw(e,t){return typeof e=="object"&&e!==null&&e.key!=null?WK(""+e.key):t.toString(36)}function G0(e,t,n,r,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(a){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Kg:case AK:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+Zw(s,0):r,z3(i)?(n="",e!=null&&(n=e.replace($3,"$&/")+"/"),G0(i,t,n,"",function(f){return f})):i!=null&&(XE(i)&&(i=KK(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace($3,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",z3(e))for(var o=0;o<e.length;o++){a=e[o];var c=r+Zw(a,o);s+=G0(a,t,n,c,i)}else if(c=HK(e),typeof c=="function")for(e=c.call(e),o=0;!(a=e.next()).done;)a=a.value,c=r+Zw(a,o++),s+=G0(a,t,n,c,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 s}function zy(e,t,n){if(e==null)return e;var r=[],i=0;return G0(e,r,"","",function(a){return t.call(n,a,i++)}),r}function GK(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var jo={current:null},q0={transition:null},qK={ReactCurrentDispatcher:jo,ReactCurrentBatchConfig:q0,ReactCurrentOwner:ZE};cr.Children={map:zy,forEach:function(e,t,n){zy(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return zy(e,function(){t++}),t},toArray:function(e){return zy(e,function(t){return t})||[]},only:function(e){if(!XE(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};cr.Component=Oh;cr.Fragment=NK;cr.Profiler=FK;cr.PureComponent=GE;cr.StrictMode=LK;cr.Suspense=VK;cr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qK;cr.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=RF({},e.props),i=e.key,a=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,s=ZE.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(c in t)AF.call(t,c)&&!NF.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&o!==void 0?o[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){o=Array(c);for(var f=0;f<c;f++)o[f]=arguments[f+2];r.children=o}return{$$typeof:Kg,type:e.type,key:i,ref:a,props:r,_owner:s}};cr.createContext=function(e){return e={$$typeof:$K,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:zK,_context:e},e.Consumer=e};cr.createElement=LF;cr.createFactory=function(e){var t=LF.bind(null,e);return t.type=e,t};cr.createRef=function(){return{current:null}};cr.forwardRef=function(e){return{$$typeof:BK,render:e}};cr.isValidElement=XE;cr.lazy=function(e){return{$$typeof:jK,_payload:{_status:-1,_result:e},_init:GK}};cr.memo=function(e,t){return{$$typeof:UK,type:e,compare:t===void 0?null:t}};cr.startTransition=function(e){var t=q0.transition;q0.transition={};try{e()}finally{q0.transition=t}};cr.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};cr.useCallback=function(e,t){return jo.current.useCallback(e,t)};cr.useContext=function(e){return jo.current.useContext(e)};cr.useDebugValue=function(){};cr.useDeferredValue=function(e){return jo.current.useDeferredValue(e)};cr.useEffect=function(e,t){return jo.current.useEffect(e,t)};cr.useId=function(){return jo.current.useId()};cr.useImperativeHandle=function(e,t,n){return jo.current.useImperativeHandle(e,t,n)};cr.useInsertionEffect=function(e,t){return jo.current.useInsertionEffect(e,t)};cr.useLayoutEffect=function(e,t){return jo.current.useLayoutEffect(e,t)};cr.useMemo=function(e,t){return jo.current.useMemo(e,t)};cr.useReducer=function(e,t,n){return jo.current.useReducer(e,t,n)};cr.useRef=function(e){return jo.current.useRef(e)};cr.useState=function(e){return jo.current.useState(e)};cr.useSyncExternalStore=function(e,t,n){return jo.current.useSyncExternalStore(e,t,n)};cr.useTransition=function(){return jo.current.useTransition()};cr.version="18.2.0";(function(e){e.exports=cr})(E);const Un=WE(E.exports),Ix=IF({__proto__:null,default:Un},[E.exports]);var n2={},cl={exports:{}},Oa={},FF={exports:{}},zF={};/**
* @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,me){var Te=oe.length;oe.push(me);e:for(;0<Te;){var we=Te-1>>>1,be=oe[we];if(0<i(be,me))oe[we]=me,oe[Te]=be,Te=we;else break e}}function n(oe){return oe.length===0?null:oe[0]}function r(oe){if(oe.length===0)return null;var me=oe[0],Te=oe.pop();if(Te!==me){oe[0]=Te;e:for(var we=0,be=oe.length,Re=be>>>1;we<Re;){var Ee=2*(we+1)-1,Me=oe[Ee],Ae=Ee+1,Fe=oe[Ae];if(0>i(Me,Te))Ae<be&&0>i(Fe,Me)?(oe[we]=Fe,oe[Ae]=Te,we=Ae):(oe[we]=Me,oe[Ee]=Te,we=Ee);else if(Ae<be&&0>i(Fe,Te))oe[we]=Fe,oe[Ae]=Te,we=Ae;else break e}}return me}function i(oe,me){var Te=oe.sortIndex-me.sortIndex;return Te!==0?Te:oe.id-me.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,o=s.now();e.unstable_now=function(){return s.now()-o}}var c=[],f=[],p=1,g=null,v=3,b=!1,_=!1,T=!1,k=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function O(oe){for(var me=n(f);me!==null;){if(me.callback===null)r(f);else if(me.startTime<=oe)r(f),me.sortIndex=me.expirationTime,t(c,me);else break;me=n(f)}}function N(oe){if(T=!1,O(oe),!_)if(n(c)!==null)_=!0,ie(L);else{var me=n(f);me!==null&&ue(N,me.startTime-oe)}}function L(oe,me){_=!1,T&&(T=!1,P(U),U=-1),b=!0;var Te=v;try{for(O(me),g=n(c);g!==null&&(!(g.expirationTime>me)||oe&&!Q());){var we=g.callback;if(typeof we=="function"){g.callback=null,v=g.priorityLevel;var be=we(g.expirationTime<=me);me=e.unstable_now(),typeof be=="function"?g.callback=be:g===n(c)&&r(c),O(me)}else r(c);g=n(c)}if(g!==null)var Re=!0;else{var Ee=n(f);Ee!==null&&ue(N,Ee.startTime-me),Re=!1}return Re}finally{g=null,v=Te,b=!1}}var $=!1,j=null,U=-1,G=5,Z=-1;function Q(){return!(e.unstable_now()-Z<G)}function J(){if(j!==null){var oe=e.unstable_now();Z=oe;var me=!0;try{me=j(!0,oe)}finally{me?re():($=!1,j=null)}}else $=!1}var re;if(typeof M=="function")re=function(){M(J)};else if(typeof MessageChannel<"u"){var ne=new MessageChannel,ge=ne.port2;ne.port1.onmessage=J,re=function(){ge.postMessage(null)}}else re=function(){k(J,0)};function ie(oe){j=oe,$||($=!0,re())}function ue(oe,me){U=k(function(){oe(e.unstable_now())},me)}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(){_||b||(_=!0,ie(L))},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"):G=0<oe?Math.floor(1e3/oe):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(oe){switch(v){case 1:case 2:case 3:var me=3;break;default:me=v}var Te=v;v=me;try{return oe()}finally{v=Te}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(oe,me){switch(oe){case 1:case 2:case 3:case 4:case 5:break;default:oe=3}var Te=v;v=oe;try{return me()}finally{v=Te}},e.unstable_scheduleCallback=function(oe,me,Te){var we=e.unstable_now();switch(typeof Te=="object"&&Te!==null?(Te=Te.delay,Te=typeof Te=="number"&&0<Te?we+Te:we):Te=we,oe){case 1:var be=-1;break;case 2:be=250;break;case 5:be=1073741823;break;case 4:be=1e4;break;default:be=5e3}return be=Te+be,oe={id:p++,callback:me,priorityLevel:oe,startTime:Te,expirationTime:be,sortIndex:-1},Te>we?(oe.sortIndex=Te,t(f,oe),n(c)===null&&oe===n(f)&&(T?(P(U),U=-1):T=!0,ue(N,Te-we))):(oe.sortIndex=be,t(c,oe),_||b||(_=!0,ie(L))),oe},e.unstable_shouldYield=Q,e.unstable_wrapCallback=function(oe){var me=v;return function(){var Te=v;v=me;try{return oe.apply(this,arguments)}finally{v=Te}}}})(zF);(function(e){e.exports=zF})(FF);/**
* @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 $F=E.exports,ka=FF.exports;function Yt(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var BF=new Set,ig={};function Fd(e,t){lh(e,t),lh(e+"Capture",t)}function lh(e,t){for(ig[e]=t,e=0;e<t.length;e++)BF.add(t[e])}var ql=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),r2=Object.prototype.hasOwnProperty,ZK=/^[: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]*$/,B3={},V3={};function XK(e){return r2.call(V3,e)?!0:r2.call(B3,e)?!1:ZK.test(e)?V3[e]=!0:(B3[e]=!0,!1)}function YK(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function QK(e,t,n,r){if(t===null||typeof t>"u"||YK(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ho(e,t,n,r,i,a,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=s}var po={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){po[e]=new Ho(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];po[t]=new Ho(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){po[e]=new Ho(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){po[e]=new Ho(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){po[e]=new Ho(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){po[e]=new Ho(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){po[e]=new Ho(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){po[e]=new Ho(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){po[e]=new Ho(e,5,!1,e.toLowerCase(),null,!1,!1)});var YE=/[\-:]([a-z])/g;function QE(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(YE,QE);po[t]=new Ho(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(YE,QE);po[t]=new Ho(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(YE,QE);po[t]=new Ho(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){po[e]=new Ho(e,1,!1,e.toLowerCase(),null,!1,!1)});po.xlinkHref=new Ho("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){po[e]=new Ho(e,1,!1,e.toLowerCase(),null,!0,!0)});function JE(e,t,n,r){var i=po.hasOwnProperty(t)?po[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(QK(t,n,i,r)&&(n=null),r||i===null?XK(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var eu=$F.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,$y=Symbol.for("react.element"),Of=Symbol.for("react.portal"),Af=Symbol.for("react.fragment"),eP=Symbol.for("react.strict_mode"),i2=Symbol.for("react.profiler"),VF=Symbol.for("react.provider"),UF=Symbol.for("react.context"),tP=Symbol.for("react.forward_ref"),o2=Symbol.for("react.suspense"),a2=Symbol.for("react.suspense_list"),nP=Symbol.for("react.memo"),Tu=Symbol.for("react.lazy"),jF=Symbol.for("react.offscreen"),U3=Symbol.iterator;function qp(e){return e===null||typeof e!="object"?null:(e=U3&&e[U3]||e["@@iterator"],typeof e=="function"?e:null)}var di=Object.assign,Xw;function _m(e){if(Xw===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Xw=t&&t[1]||""}return`
`+Xw+e}var Yw=!1;function Qw(e,t){if(!e||Yw)return"";Yw=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(f){var r=f}Reflect.construct(e,[],t)}else{try{t.call()}catch(f){r=f}e.call(t.prototype)}else{try{throw Error()}catch(f){r=f}e()}}catch(f){if(f&&r&&typeof f.stack=="string"){for(var i=f.stack.split(`
`),a=r.stack.split(`
`),s=i.length-1,o=a.length-1;1<=s&&0<=o&&i[s]!==a[o];)o--;for(;1<=s&&0<=o;s--,o--)if(i[s]!==a[o]){if(s!==1||o!==1)do if(s--,o--,0>o||i[s]!==a[o]){var c=`
`+i[s].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=s&&0<=o);break}}}finally{Yw=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?_m(e):""}function JK(e){switch(e.tag){case 5:return _m(e.type);case 16:return _m("Lazy");case 13:return _m("Suspense");case 19:return _m("SuspenseList");case 0:case 2:case 15:return e=Qw(e.type,!1),e;case 11:return e=Qw(e.type.render,!1),e;case 1:return e=Qw(e.type,!0),e;default:return""}}function s2(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 Af:return"Fragment";case Of:return"Portal";case i2:return"Profiler";case eP:return"StrictMode";case o2:return"Suspense";case a2:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case UF:return(e.displayName||"Context")+".Consumer";case VF:return(e._context.displayName||"Context")+".Provider";case tP:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case nP:return t=e.displayName||null,t!==null?t:s2(e.type)||"Memo";case Tu:t=e._payload,e=e._init;try{return s2(e(t))}catch{}}return null}function eW(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 s2(t);case 8:return t===eP?"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 rc(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function HF(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function tW(e){var t=HF(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,a.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function By(e){e._valueTracker||(e._valueTracker=tW(e))}function KF(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=HF(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Mx(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 l2(e,t){var n=t.checked;return di({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function j3(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=rc(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function WF(e,t){t=t.checked,t!=null&&JE(e,"checked",t,!1)}function u2(e,t){WF(e,t);var n=rc(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?c2(e,t.type,n):t.hasOwnProperty("defaultValue")&&c2(e,t.type,rc(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function H3(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function c2(e,t,n){(t!=="number"||Mx(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var wm=Array.isArray;function Zf(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+rc(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function d2(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Yt(91));return di({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function K3(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Yt(92));if(wm(n)){if(1<n.length)throw Error(Yt(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:rc(n)}}function GF(e,t){var n=rc(t.value),r=rc(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function W3(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function qF(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 f2(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?qF(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Vy,ZF=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Vy=Vy||document.createElement("div"),Vy.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Vy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function og(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Am={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},nW=["Webkit","ms","Moz","O"];Object.keys(Am).forEach(function(e){nW.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Am[t]=Am[e]})});function XF(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Am.hasOwnProperty(e)&&Am[e]?(""+t).trim():t+"px"}function YF(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=XF(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var rW=di({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 h2(e,t){if(t){if(rW[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Yt(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Yt(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Yt(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Yt(62))}}function p2(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 m2=null;function rP(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var g2=null,Xf=null,Yf=null;function G3(e){if(e=qg(e)){if(typeof g2!="function")throw Error(Yt(280));var t=e.stateNode;t&&(t=d_(t),g2(e.stateNode,e.type,t))}}function QF(e){Xf?Yf?Yf.push(e):Yf=[e]:Xf=e}function JF(){if(Xf){var e=Xf,t=Yf;if(Yf=Xf=null,G3(e),t)for(e=0;e<t.length;e++)G3(t[e])}}function ez(e,t){return e(t)}function tz(){}var Jw=!1;function nz(e,t,n){if(Jw)return e(t,n);Jw=!0;try{return ez(e,t,n)}finally{Jw=!1,(Xf!==null||Yf!==null)&&(tz(),JF())}}function ag(e,t){var n=e.stateNode;if(n===null)return null;var r=d_(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Yt(231,t,typeof n));return n}var v2=!1;if(ql)try{var Zp={};Object.defineProperty(Zp,"passive",{get:function(){v2=!0}}),window.addEventListener("test",Zp,Zp),window.removeEventListener("test",Zp,Zp)}catch{v2=!1}function iW(e,t,n,r,i,a,s,o,c){var f=Array.prototype.slice.call(arguments,3);try{t.apply(n,f)}catch(p){this.onError(p)}}var Nm=!1,Rx=null,Dx=!1,y2=null,oW={onError:function(e){Nm=!0,Rx=e}};function aW(e,t,n,r,i,a,s,o,c){Nm=!1,Rx=null,iW.apply(oW,arguments)}function sW(e,t,n,r,i,a,s,o,c){if(aW.apply(this,arguments),Nm){if(Nm){var f=Rx;Nm=!1,Rx=null}else throw Error(Yt(198));Dx||(Dx=!0,y2=f)}}function zd(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function rz(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 q3(e){if(zd(e)!==e)throw Error(Yt(188))}function lW(e){var t=e.alternate;if(!t){if(t=zd(e),t===null)throw Error(Yt(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return q3(i),e;if(a===r)return q3(i),t;a=a.sibling}throw Error(Yt(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,o=i.child;o;){if(o===n){s=!0,n=i,r=a;break}if(o===r){s=!0,r=i,n=a;break}o=o.sibling}if(!s){for(o=a.child;o;){if(o===n){s=!0,n=a,r=i;break}if(o===r){s=!0,r=a,n=i;break}o=o.sibling}if(!s)throw Error(Yt(189))}}if(n.alternate!==r)throw Error(Yt(190))}if(n.tag!==3)throw Error(Yt(188));return n.stateNode.current===n?e:t}function iz(e){return e=lW(e),e!==null?oz(e):null}function oz(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=oz(e);if(t!==null)return t;e=e.sibling}return null}var az=ka.unstable_scheduleCallback,Z3=ka.unstable_cancelCallback,uW=ka.unstable_shouldYield,cW=ka.unstable_requestPaint,_i=ka.unstable_now,dW=ka.unstable_getCurrentPriorityLevel,iP=ka.unstable_ImmediatePriority,sz=ka.unstable_UserBlockingPriority,Ox=ka.unstable_NormalPriority,fW=ka.unstable_LowPriority,lz=ka.unstable_IdlePriority,s_=null,il=null;function hW(e){if(il&&typeof il.onCommitFiberRoot=="function")try{il.onCommitFiberRoot(s_,e,void 0,(e.current.flags&128)===128)}catch{}}var Is=Math.clz32?Math.clz32:gW,pW=Math.log,mW=Math.LN2;function gW(e){return e>>>=0,e===0?32:31-(pW(e)/mW|0)|0}var Uy=64,jy=4194304;function Cm(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 Ax(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,s=n&268435455;if(s!==0){var o=s&~i;o!==0?r=Cm(o):(a&=s,a!==0&&(r=Cm(a)))}else s=n&~i,s!==0?r=Cm(s):a!==0&&(r=Cm(a));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Is(t),i=1<<n,r|=e[n],t&=~i;return r}function vW(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 yW(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var s=31-Is(a),o=1<<s,c=i[s];c===-1?((o&n)===0||(o&r)!==0)&&(i[s]=vW(o,t)):c<=t&&(e.expiredLanes|=o),a&=~o}}function x2(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function uz(){var e=Uy;return Uy<<=1,(Uy&4194240)===0&&(Uy=64),e}function eC(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Wg(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Is(t),e[t]=n}function xW(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Is(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function oP(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Is(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Mr=0;function cz(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var dz,aP,fz,hz,pz,b2=!1,Hy=[],ju=null,Hu=null,Ku=null,sg=new Map,lg=new Map,Mu=[],bW="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 X3(e,t){switch(e){case"focusin":case"focusout":ju=null;break;case"dragenter":case"dragleave":Hu=null;break;case"mouseover":case"mouseout":Ku=null;break;case"pointerover":case"pointerout":sg.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":lg.delete(t.pointerId)}}function Xp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=qg(t),t!==null&&aP(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function _W(e,t,n,r,i){switch(t){case"focusin":return ju=Xp(ju,e,t,n,r,i),!0;case"dragenter":return Hu=Xp(Hu,e,t,n,r,i),!0;case"mouseover":return Ku=Xp(Ku,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return sg.set(a,Xp(sg.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,lg.set(a,Xp(lg.get(a)||null,e,t,n,r,i)),!0}return!1}function mz(e){var t=sd(e.target);if(t!==null){var n=zd(t);if(n!==null){if(t=n.tag,t===13){if(t=rz(n),t!==null){e.blockedOn=t,pz(e.priority,function(){fz(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Z0(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=_2(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);m2=r,n.target.dispatchEvent(r),m2=null}else return t=qg(n),t!==null&&aP(t),e.blockedOn=n,!1;t.shift()}return!0}function Y3(e,t,n){Z0(e)&&n.delete(t)}function wW(){b2=!1,ju!==null&&Z0(ju)&&(ju=null),Hu!==null&&Z0(Hu)&&(Hu=null),Ku!==null&&Z0(Ku)&&(Ku=null),sg.forEach(Y3),lg.forEach(Y3)}function Yp(e,t){e.blockedOn===t&&(e.blockedOn=null,b2||(b2=!0,ka.unstable_scheduleCallback(ka.unstable_NormalPriority,wW)))}function ug(e){function t(i){return Yp(i,e)}if(0<Hy.length){Yp(Hy[0],e);for(var n=1;n<Hy.length;n++){var r=Hy[n];r.blockedOn===e&&(r.blockedOn=null)}}for(ju!==null&&Yp(ju,e),Hu!==null&&Yp(Hu,e),Ku!==null&&Yp(Ku,e),sg.forEach(t),lg.forEach(t),n=0;n<Mu.length;n++)r=Mu[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Mu.length&&(n=Mu[0],n.blockedOn===null);)mz(n),n.blockedOn===null&&Mu.shift()}var Qf=eu.ReactCurrentBatchConfig,Nx=!0;function CW(e,t,n,r){var i=Mr,a=Qf.transition;Qf.transition=null;try{Mr=1,sP(e,t,n,r)}finally{Mr=i,Qf.transition=a}}function SW(e,t,n,r){var i=Mr,a=Qf.transition;Qf.transition=null;try{Mr=4,sP(e,t,n,r)}finally{Mr=i,Qf.transition=a}}function sP(e,t,n,r){if(Nx){var i=_2(e,t,n,r);if(i===null)cC(e,t,r,Lx,n),X3(e,r);else if(_W(i,e,t,n,r))r.stopPropagation();else if(X3(e,r),t&4&&-1<bW.indexOf(e)){for(;i!==null;){var a=qg(i);if(a!==null&&dz(a),a=_2(e,t,n,r),a===null&&cC(e,t,r,Lx,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else cC(e,t,r,null,n)}}var Lx=null;function _2(e,t,n,r){if(Lx=null,e=rP(r),e=sd(e),e!==null)if(t=zd(e),t===null)e=null;else if(n=t.tag,n===13){if(e=rz(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Lx=e,null}function gz(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(dW()){case iP:return 1;case sz:return 4;case Ox:case fW:return 16;case lz:return 536870912;default:return 16}default:return 16}}var Du=null,lP=null,X0=null;function vz(){if(X0)return X0;var e,t=lP,n=t.length,r,i="value"in Du?Du.value:Du.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[a-r];r++);return X0=i.slice(e,1<r?1-r:void 0)}function Y0(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 Ky(){return!0}function Q3(){return!1}function Aa(e){function t(n,r,i,a,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=a,this.target=s,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(a):a[o]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Ky:Q3,this.isPropagationStopped=Q3,this}return di(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ky)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ky)},persist:function(){},isPersistent:Ky}),t}var Ah={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},uP=Aa(Ah),Gg=di({},Ah,{view:0,detail:0}),EW=Aa(Gg),tC,nC,Qp,l_=di({},Gg,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cP,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!==Qp&&(Qp&&e.type==="mousemove"?(tC=e.screenX-Qp.screenX,nC=e.screenY-Qp.screenY):nC=tC=0,Qp=e),tC)},movementY:function(e){return"movementY"in e?e.movementY:nC}}),J3=Aa(l_),PW=di({},l_,{dataTransfer:0}),TW=Aa(PW),kW=di({},Gg,{relatedTarget:0}),rC=Aa(kW),IW=di({},Ah,{animationName:0,elapsedTime:0,pseudoElement:0}),MW=Aa(IW),RW=di({},Ah,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),DW=Aa(RW),OW=di({},Ah,{data:0}),eM=Aa(OW),AW={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},NW={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"},LW={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function FW(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=LW[e])?!!t[e]:!1}function cP(){return FW}var zW=di({},Gg,{key:function(e){if(e.key){var t=AW[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Y0(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?NW[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cP,charCode:function(e){return e.type==="keypress"?Y0(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Y0(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),$W=Aa(zW),BW=di({},l_,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tM=Aa(BW),VW=di({},Gg,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cP}),UW=Aa(VW),jW=di({},Ah,{propertyName:0,elapsedTime:0,pseudoElement:0}),HW=Aa(jW),KW=di({},l_,{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}),WW=Aa(KW),GW=[9,13,27,32],dP=ql&&"CompositionEvent"in window,Lm=null;ql&&"documentMode"in document&&(Lm=document.documentMode);var qW=ql&&"TextEvent"in window&&!Lm,yz=ql&&(!dP||Lm&&8<Lm&&11>=Lm),nM=String.fromCharCode(32),rM=!1;function xz(e,t){switch(e){case"keyup":return GW.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bz(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Nf=!1;function ZW(e,t){switch(e){case"compositionend":return bz(t);case"keypress":return t.which!==32?null:(rM=!0,nM);case"textInput":return e=t.data,e===nM&&rM?null:e;default:return null}}function XW(e,t){if(Nf)return e==="compositionend"||!dP&&xz(e,t)?(e=vz(),X0=lP=Du=null,Nf=!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 yz&&t.locale!=="ko"?null:t.data;default:return null}}var YW={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 iM(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!YW[e.type]:t==="textarea"}function _z(e,t,n,r){QF(r),t=Fx(t,"onChange"),0<t.length&&(n=new uP("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Fm=null,cg=null;function QW(e){Dz(e,0)}function u_(e){var t=zf(e);if(KF(t))return e}function JW(e,t){if(e==="change")return t}var wz=!1;if(ql){var iC;if(ql){var oC="oninput"in document;if(!oC){var oM=document.createElement("div");oM.setAttribute("oninput","return;"),oC=typeof oM.oninput=="function"}iC=oC}else iC=!1;wz=iC&&(!document.documentMode||9<document.documentMode)}function aM(){Fm&&(Fm.detachEvent("onpropertychange",Cz),cg=Fm=null)}function Cz(e){if(e.propertyName==="value"&&u_(cg)){var t=[];_z(t,cg,e,rP(e)),nz(QW,t)}}function eG(e,t,n){e==="focusin"?(aM(),Fm=t,cg=n,Fm.attachEvent("onpropertychange",Cz)):e==="focusout"&&aM()}function tG(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return u_(cg)}function nG(e,t){if(e==="click")return u_(t)}function rG(e,t){if(e==="input"||e==="change")return u_(t)}function iG(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ds=typeof Object.is=="function"?Object.is:iG;function dg(e,t){if(Ds(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!r2.call(t,i)||!Ds(e[i],t[i]))return!1}return!0}function sM(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function lM(e,t){var n=sM(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=sM(n)}}function Sz(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sz(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ez(){for(var e=window,t=Mx();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Mx(e.document)}return t}function fP(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 oG(e){var t=Ez(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Sz(n.ownerDocument.documentElement,n)){if(r!==null&&fP(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=lM(n,a);var s=lM(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var aG=ql&&"documentMode"in document&&11>=document.documentMode,Lf=null,w2=null,zm=null,C2=!1;function uM(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;C2||Lf==null||Lf!==Mx(r)||(r=Lf,"selectionStart"in r&&fP(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),zm&&dg(zm,r)||(zm=r,r=Fx(w2,"onSelect"),0<r.length&&(t=new uP("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Lf)))}function Wy(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ff={animationend:Wy("Animation","AnimationEnd"),animationiteration:Wy("Animation","AnimationIteration"),animationstart:Wy("Animation","AnimationStart"),transitionend:Wy("Transition","TransitionEnd")},aC={},Pz={};ql&&(Pz=document.createElement("div").style,"AnimationEvent"in window||(delete Ff.animationend.animation,delete Ff.animationiteration.animation,delete Ff.animationstart.animation),"TransitionEvent"in window||delete Ff.transitionend.transition);function c_(e){if(aC[e])return aC[e];if(!Ff[e])return e;var t=Ff[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Pz)return aC[e]=t[n];return e}var Tz=c_("animationend"),kz=c_("animationiteration"),Iz=c_("animationstart"),Mz=c_("transitionend"),Rz=new Map,cM="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 lc(e,t){Rz.set(e,t),Fd(t,[e])}for(var sC=0;sC<cM.length;sC++){var lC=cM[sC],sG=lC.toLowerCase(),lG=lC[0].toUpperCase()+lC.slice(1);lc(sG,"on"+lG)}lc(Tz,"onAnimationEnd");lc(kz,"onAnimationIteration");lc(Iz,"onAnimationStart");lc("dblclick","onDoubleClick");lc("focusin","onFocus");lc("focusout","onBlur");lc(Mz,"onTransitionEnd");lh("onMouseEnter",["mouseout","mouseover"]);lh("onMouseLeave",["mouseout","mouseover"]);lh("onPointerEnter",["pointerout","pointerover"]);lh("onPointerLeave",["pointerout","pointerover"]);Fd("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Fd("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Fd("onBeforeInput",["compositionend","keypress","textInput","paste"]);Fd("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Fd("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Fd("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sm="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(" "),uG=new Set("cancel close invalid load scroll toggle".split(" ").concat(Sm));function dM(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,sW(r,t,void 0,e),e.currentTarget=null}function Dz(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var s=r.length-1;0<=s;s--){var o=r[s],c=o.instance,f=o.currentTarget;if(o=o.listener,c!==a&&i.isPropagationStopped())break e;dM(i,o,f),a=c}else for(s=0;s<r.length;s++){if(o=r[s],c=o.instance,f=o.currentTarget,o=o.listener,c!==a&&i.isPropagationStopped())break e;dM(i,o,f),a=c}}}if(Dx)throw e=y2,Dx=!1,y2=null,e}function Yr(e,t){var n=t[k2];n===void 0&&(n=t[k2]=new Set);var r=e+"__bubble";n.has(r)||(Oz(t,e,2,!1),n.add(r))}function uC(e,t,n){var r=0;t&&(r|=4),Oz(n,e,r,t)}var Gy="_reactListening"+Math.random().toString(36).slice(2);function fg(e){if(!e[Gy]){e[Gy]=!0,BF.forEach(function(n){n!=="selectionchange"&&(uG.has(n)||uC(n,!1,e),uC(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Gy]||(t[Gy]=!0,uC("selectionchange",!1,t))}}function Oz(e,t,n,r){switch(gz(t)){case 1:var i=CW;break;case 4:i=SW;break;default:i=sP}n=i.bind(null,t,n,e),i=void 0,!v2||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function cC(e,t,n,r,i){var a=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var o=r.stateNode.containerInfo;if(o===i||o.nodeType===8&&o.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var c=s.tag;if((c===3||c===4)&&(c=s.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;s=s.return}for(;o!==null;){if(s=sd(o),s===null)return;if(c=s.tag,c===5||c===6){r=a=s;continue e}o=o.parentNode}}r=r.return}nz(function(){var f=a,p=rP(n),g=[];e:{var v=Rz.get(e);if(v!==void 0){var b=uP,_=e;switch(e){case"keypress":if(Y0(n)===0)break e;case"keydown":case"keyup":b=$W;break;case"focusin":_="focus",b=rC;break;case"focusout":_="blur",b=rC;break;case"beforeblur":case"afterblur":b=rC;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":b=J3;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":b=TW;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":b=UW;break;case Tz:case kz:case Iz:b=MW;break;case Mz:b=HW;break;case"scroll":b=EW;break;case"wheel":b=WW;break;case"copy":case"cut":case"paste":b=DW;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":b=tM}var T=(t&4)!==0,k=!T&&e==="scroll",P=T?v!==null?v+"Capture":null:v;T=[];for(var M=f,O;M!==null;){O=M;var N=O.stateNode;if(O.tag===5&&N!==null&&(O=N,P!==null&&(N=ag(M,P),N!=null&&T.push(hg(M,N,O)))),k)break;M=M.return}0<T.length&&(v=new b(v,_,null,n,p),g.push({event:v,listeners:T}))}}if((t&7)===0){e:{if(v=e==="mouseover"||e==="pointerover",b=e==="mouseout"||e==="pointerout",v&&n!==m2&&(_=n.relatedTarget||n.fromElement)&&(sd(_)||_[Zl]))break e;if((b||v)&&(v=p.window===p?p:(v=p.ownerDocument)?v.defaultView||v.parentWindow:window,b?(_=n.relatedTarget||n.toElement,b=f,_=_?sd(_):null,_!==null&&(k=zd(_),_!==k||_.tag!==5&&_.tag!==6)&&(_=null)):(b=null,_=f),b!==_)){if(T=J3,N="onMouseLeave",P="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(T=tM,N="onPointerLeave",P="onPointerEnter",M="pointer"),k=b==null?v:zf(b),O=_==null?v:zf(_),v=new T(N,M+"leave",b,n,p),v.target=k,v.relatedTarget=O,N=null,sd(p)===f&&(T=new T(P,M+"enter",_,n,p),T.target=O,T.relatedTarget=k,N=T),k=N,b&&_)t:{for(T=b,P=_,M=0,O=T;O;O=wf(O))M++;for(O=0,N=P;N;N=wf(N))O++;for(;0<M-O;)T=wf(T),M--;for(;0<O-M;)P=wf(P),O--;for(;M--;){if(T===P||P!==null&&T===P.alternate)break t;T=wf(T),P=wf(P)}T=null}else T=null;b!==null&&fM(g,v,b,T,!1),_!==null&&k!==null&&fM(g,k,_,T,!0)}}e:{if(v=f?zf(f):window,b=v.nodeName&&v.nodeName.toLowerCase(),b==="select"||b==="input"&&v.type==="file")var L=JW;else if(iM(v))if(wz)L=rG;else{L=tG;var $=eG}else(b=v.nodeName)&&b.toLowerCase()==="input"&&(v.type==="checkbox"||v.type==="radio")&&(L=nG);if(L&&(L=L(e,f))){_z(g,L,n,p);break e}$&&$(e,v,f),e==="focusout"&&($=v._wrapperState)&&$.controlled&&v.type==="number"&&c2(v,"number",v.value)}switch($=f?zf(f):window,e){case"focusin":(iM($)||$.contentEditable==="true")&&(Lf=$,w2=f,zm=null);break;case"focusout":zm=w2=Lf=null;break;case"mousedown":C2=!0;break;case"contextmenu":case"mouseup":case"dragend":C2=!1,uM(g,n,p);break;case"selectionchange":if(aG)break;case"keydown":case"keyup":uM(g,n,p)}var j;if(dP)e:{switch(e){case"compositionstart":var U="onCompositionStart";break e;case"compositionend":U="onCompositionEnd";break e;case"compositionupdate":U="onCompositionUpdate";break e}U=void 0}else Nf?xz(e,n)&&(U="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(U="onCompositionStart");U&&(yz&&n.locale!=="ko"&&(Nf||U!=="onCompositionStart"?U==="onCompositionEnd"&&Nf&&(j=vz()):(Du=p,lP="value"in Du?Du.value:Du.textContent,Nf=!0)),$=Fx(f,U),0<$.length&&(U=new eM(U,e,null,n,p),g.push({event:U,listeners:$}),j?U.data=j:(j=bz(n),j!==null&&(U.data=j)))),(j=qW?ZW(e,n):XW(e,n))&&(f=Fx(f,"onBeforeInput"),0<f.length&&(p=new eM("onBeforeInput","beforeinput",null,n,p),g.push({event:p,listeners:f}),p.data=j))}Dz(g,t)})}function hg(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Fx(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=ag(e,n),a!=null&&r.unshift(hg(e,a,i)),a=ag(e,t),a!=null&&r.push(hg(e,a,i))),e=e.return}return r}function wf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function fM(e,t,n,r,i){for(var a=t._reactName,s=[];n!==null&&n!==r;){var o=n,c=o.alternate,f=o.stateNode;if(c!==null&&c===r)break;o.tag===5&&f!==null&&(o=f,i?(c=ag(n,a),c!=null&&s.unshift(hg(n,c,o))):i||(c=ag(n,a),c!=null&&s.push(hg(n,c,o)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var cG=/\r\n?/g,dG=/\u0000|\uFFFD/g;function hM(e){return(typeof e=="string"?e:""+e).replace(cG,`
`).replace(dG,"")}function qy(e,t,n){if(t=hM(t),hM(e)!==t&&n)throw Error(Yt(425))}function zx(){}var S2=null,E2=null;function P2(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 T2=typeof setTimeout=="function"?setTimeout:void 0,fG=typeof clearTimeout=="function"?clearTimeout:void 0,pM=typeof Promise=="function"?Promise:void 0,hG=typeof queueMicrotask=="function"?queueMicrotask:typeof pM<"u"?function(e){return pM.resolve(null).then(e).catch(pG)}:T2;function pG(e){setTimeout(function(){throw e})}function dC(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),ug(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);ug(t)}function Wu(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 mM(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Nh=Math.random().toString(36).slice(2),tl="__reactFiber$"+Nh,pg="__reactProps$"+Nh,Zl="__reactContainer$"+Nh,k2="__reactEvents$"+Nh,mG="__reactListeners$"+Nh,gG="__reactHandles$"+Nh;function sd(e){var t=e[tl];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Zl]||n[tl]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=mM(e);e!==null;){if(n=e[tl])return n;e=mM(e)}return t}e=n,n=e.parentNode}return null}function qg(e){return e=e[tl]||e[Zl],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function zf(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Yt(33))}function d_(e){return e[pg]||null}var I2=[],$f=-1;function uc(e){return{current:e}}function Jr(e){0>$f||(e.current=I2[$f],I2[$f]=null,$f--)}function Zr(e,t){$f++,I2[$f]=e.current,e.current=t}var ic={},Po=uc(ic),na=uc(!1),Cd=ic;function uh(e,t){var n=e.type.contextTypes;if(!n)return ic;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ra(e){return e=e.childContextTypes,e!=null}function $x(){Jr(na),Jr(Po)}function gM(e,t,n){if(Po.current!==ic)throw Error(Yt(168));Zr(Po,t),Zr(na,n)}function Az(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Yt(108,eW(e)||"Unknown",i));return di({},n,r)}function Bx(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ic,Cd=Po.current,Zr(Po,e),Zr(na,na.current),!0}function vM(e,t,n){var r=e.stateNode;if(!r)throw Error(Yt(169));n?(e=Az(e,t,Cd),r.__reactInternalMemoizedMergedChildContext=e,Jr(na),Jr(Po),Zr(Po,e)):Jr(na),Zr(na,n)}var Ll=null,f_=!1,fC=!1;function Nz(e){Ll===null?Ll=[e]:Ll.push(e)}function vG(e){f_=!0,Nz(e)}function cc(){if(!fC&&Ll!==null){fC=!0;var e=0,t=Mr;try{var n=Ll;for(Mr=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ll=null,f_=!1}catch(i){throw Ll!==null&&(Ll=Ll.slice(e+1)),az(iP,cc),i}finally{Mr=t,fC=!1}}return null}var Bf=[],Vf=0,Vx=null,Ux=0,Xa=[],Ya=0,Sd=null,Ul=1,jl="";function Zc(e,t){Bf[Vf++]=Ux,Bf[Vf++]=Vx,Vx=e,Ux=t}function Lz(e,t,n){Xa[Ya++]=Ul,Xa[Ya++]=jl,Xa[Ya++]=Sd,Sd=e;var r=Ul;e=jl;var i=32-Is(r)-1;r&=~(1<<i),n+=1;var a=32-Is(t)+i;if(30<a){var s=i-i%5;a=(r&(1<<s)-1).toString(32),r>>=s,i-=s,Ul=1<<32-Is(t)+i|n<<i|r,jl=a+e}else Ul=1<<a|n<<i|r,jl=e}function hP(e){e.return!==null&&(Zc(e,1),Lz(e,1,0))}function pP(e){for(;e===Vx;)Vx=Bf[--Vf],Bf[Vf]=null,Ux=Bf[--Vf],Bf[Vf]=null;for(;e===Sd;)Sd=Xa[--Ya],Xa[Ya]=null,jl=Xa[--Ya],Xa[Ya]=null,Ul=Xa[--Ya],Xa[Ya]=null}var Ea=null,ba=null,ii=!1,Ps=null;function Fz(e,t){var n=es(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function yM(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ea=e,ba=Wu(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ea=e,ba=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Sd!==null?{id:Ul,overflow:jl}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=es(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ea=e,ba=null,!0):!1;default:return!1}}function M2(e){return(e.mode&1)!==0&&(e.flags&128)===0}function R2(e){if(ii){var t=ba;if(t){var n=t;if(!yM(e,t)){if(M2(e))throw Error(Yt(418));t=Wu(n.nextSibling);var r=Ea;t&&yM(e,t)?Fz(r,n):(e.flags=e.flags&-4097|2,ii=!1,Ea=e)}}else{if(M2(e))throw Error(Yt(418));e.flags=e.flags&-4097|2,ii=!1,Ea=e}}}function xM(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ea=e}function Zy(e){if(e!==Ea)return!1;if(!ii)return xM(e),ii=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!P2(e.type,e.memoizedProps)),t&&(t=ba)){if(M2(e))throw zz(),Error(Yt(418));for(;t;)Fz(e,t),t=Wu(t.nextSibling)}if(xM(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Yt(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ba=Wu(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ba=null}}else ba=Ea?Wu(e.stateNode.nextSibling):null;return!0}function zz(){for(var e=ba;e;)e=Wu(e.nextSibling)}function ch(){ba=Ea=null,ii=!1}function mP(e){Ps===null?Ps=[e]:Ps.push(e)}var yG=eu.ReactCurrentBatchConfig;function Cs(e,t){if(e&&e.defaultProps){t=di({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var jx=uc(null),Hx=null,Uf=null,gP=null;function vP(){gP=Uf=Hx=null}function yP(e){var t=jx.current;Jr(jx),e._currentValue=t}function D2(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Jf(e,t){Hx=e,gP=Uf=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(ta=!0),e.firstContext=null)}function as(e){var t=e._currentValue;if(gP!==e)if(e={context:e,memoizedValue:t,next:null},Uf===null){if(Hx===null)throw Error(Yt(308));Uf=e,Hx.dependencies={lanes:0,firstContext:e}}else Uf=Uf.next=e;return t}var ld=null;function xP(e){ld===null?ld=[e]:ld.push(e)}function $z(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,xP(t)):(n.next=i.next,i.next=n),t.interleaved=n,Xl(e,r)}function Xl(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var ku=!1;function bP(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Bz(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 Kl(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Gu(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(yr&2)!==0){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Xl(e,n)}return i=r.interleaved,i===null?(t.next=t,xP(r)):(t.next=i.next,i.next=t),r.interleaved=t,Xl(e,n)}function Q0(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,oP(e,n)}}function bM(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=s:a=a.next=s,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Kx(e,t,n,r){var i=e.updateQueue;ku=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var c=o,f=c.next;c.next=null,s===null?a=f:s.next=f,s=c;var p=e.alternate;p!==null&&(p=p.updateQueue,o=p.lastBaseUpdate,o!==s&&(o===null?p.firstBaseUpdate=f:o.next=f,p.lastBaseUpdate=c))}if(a!==null){var g=i.baseState;s=0,p=f=c=null,o=a;do{var v=o.lane,b=o.eventTime;if((r&v)===v){p!==null&&(p=p.next={eventTime:b,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var _=e,T=o;switch(v=t,b=n,T.tag){case 1:if(_=T.payload,typeof _=="function"){g=_.call(b,g,v);break e}g=_;break e;case 3:_.flags=_.flags&-65537|128;case 0:if(_=T.payload,v=typeof _=="function"?_.call(b,g,v):_,v==null)break e;g=di({},g,v);break e;case 2:ku=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,v=i.effects,v===null?i.effects=[o]:v.push(o))}else b={eventTime:b,lane:v,tag:o.tag,payload:o.payload,callback:o.callback,next:null},p===null?(f=p=b,c=g):p=p.next=b,s|=v;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;v=o,o=v.next,v.next=null,i.lastBaseUpdate=v,i.shared.pending=null}}while(1);if(p===null&&(c=g),i.baseState=c,i.firstBaseUpdate=f,i.lastBaseUpdate=p,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Pd|=s,e.lanes=s,e.memoizedState=g}}function _M(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(Yt(191,i));i.call(r)}}}var Vz=new $F.Component().refs;function O2(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:di({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var h_={isMounted:function(e){return(e=e._reactInternals)?zd(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Uo(),i=Zu(e),a=Kl(r,i);a.payload=t,n!=null&&(a.callback=n),t=Gu(e,a,i),t!==null&&(Ms(t,e,i,r),Q0(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Uo(),i=Zu(e),a=Kl(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=Gu(e,a,i),t!==null&&(Ms(t,e,i,r),Q0(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Uo(),r=Zu(e),i=Kl(n,r);i.tag=2,t!=null&&(i.callback=t),t=Gu(e,i,r),t!==null&&(Ms(t,e,r,n),Q0(t,e,r))}};function wM(e,t,n,r,i,a,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,a,s):t.prototype&&t.prototype.isPureReactComponent?!dg(n,r)||!dg(i,a):!0}function Uz(e,t,n){var r=!1,i=ic,a=t.contextType;return typeof a=="object"&&a!==null?a=as(a):(i=ra(t)?Cd:Po.current,r=t.contextTypes,a=(r=r!=null)?uh(e,i):ic),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=h_,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function CM(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&h_.enqueueReplaceState(t,t.state,null)}function A2(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Vz,bP(e);var a=t.contextType;typeof a=="object"&&a!==null?i.context=as(a):(a=ra(t)?Cd:Po.current,i.context=uh(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(O2(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&h_.enqueueReplaceState(i,i.state,null),Kx(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Jp(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Yt(309));var r=n.stateNode}if(!r)throw Error(Yt(147,e));var i=r,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(s){var o=i.refs;o===Vz&&(o=i.refs={}),s===null?delete o[a]:o[a]=s},t._stringRef=a,t)}if(typeof e!="string")throw Error(Yt(284));if(!n._owner)throw Error(Yt(290,e))}return e}function Xy(e,t){throw e=Object.prototype.toString.call(t),Error(Yt(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function SM(e){var t=e._init;return t(e._payload)}function jz(e){function t(P,M){if(e){var O=P.deletions;O===null?(P.deletions=[M],P.flags|=16):O.push(M)}}function n(P,M){if(!e)return null;for(;M!==null;)t(P,M),M=M.sibling;return null}function r(P,M){for(P=new Map;M!==null;)M.key!==null?P.set(M.key,M):P.set(M.index,M),M=M.sibling;return P}function i(P,M){return P=Xu(P,M),P.index=0,P.sibling=null,P}function a(P,M,O){return P.index=O,e?(O=P.alternate,O!==null?(O=O.index,O<M?(P.flags|=2,M):O):(P.flags|=2,M)):(P.flags|=1048576,M)}function s(P){return e&&P.alternate===null&&(P.flags|=2),P}function o(P,M,O,N){return M===null||M.tag!==6?(M=xC(O,P.mode,N),M.return=P,M):(M=i(M,O),M.return=P,M)}function c(P,M,O,N){var L=O.type;return L===Af?p(P,M,O.props.children,N,O.key):M!==null&&(M.elementType===L||typeof L=="object"&&L!==null&&L.$$typeof===Tu&&SM(L)===M.type)?(N=i(M,O.props),N.ref=Jp(P,M,O),N.return=P,N):(N=ix(O.type,O.key,O.props,null,P.mode,N),N.ref=Jp(P,M,O),N.return=P,N)}function f(P,M,O,N){return M===null||M.tag!==4||M.stateNode.containerInfo!==O.containerInfo||M.stateNode.implementation!==O.implementation?(M=bC(O,P.mode,N),M.return=P,M):(M=i(M,O.children||[]),M.return=P,M)}function p(P,M,O,N,L){return M===null||M.tag!==7?(M=yd(O,P.mode,N,L),M.return=P,M):(M=i(M,O),M.return=P,M)}function g(P,M,O){if(typeof M=="string"&&M!==""||typeof M=="number")return M=xC(""+M,P.mode,O),M.return=P,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case $y:return O=ix(M.type,M.key,M.props,null,P.mode,O),O.ref=Jp(P,null,M),O.return=P,O;case Of:return M=bC(M,P.mode,O),M.return=P,M;case Tu:var N=M._init;return g(P,N(M._payload),O)}if(wm(M)||qp(M))return M=yd(M,P.mode,O,null),M.return=P,M;Xy(P,M)}return null}function v(P,M,O,N){var L=M!==null?M.key:null;if(typeof O=="string"&&O!==""||typeof O=="number")return L!==null?null:o(P,M,""+O,N);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case $y:return O.key===L?c(P,M,O,N):null;case Of:return O.key===L?f(P,M,O,N):null;case Tu:return L=O._init,v(P,M,L(O._payload),N)}if(wm(O)||qp(O))return L!==null?null:p(P,M,O,N,null);Xy(P,O)}return null}function b(P,M,O,N,L){if(typeof N=="string"&&N!==""||typeof N=="number")return P=P.get(O)||null,o(M,P,""+N,L);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case $y:return P=P.get(N.key===null?O:N.key)||null,c(M,P,N,L);case Of:return P=P.get(N.key===null?O:N.key)||null,f(M,P,N,L);case Tu:var $=N._init;return b(P,M,O,$(N._payload),L)}if(wm(N)||qp(N))return P=P.get(O)||null,p(M,P,N,L,null);Xy(M,N)}return null}function _(P,M,O,N){for(var L=null,$=null,j=M,U=M=0,G=null;j!==null&&U<O.length;U++){j.index>U?(G=j,j=null):G=j.sibling;var Z=v(P,j,O[U],N);if(Z===null){j===null&&(j=G);break}e&&j&&Z.alternate===null&&t(P,j),M=a(Z,M,U),$===null?L=Z:$.sibling=Z,$=Z,j=G}if(U===O.length)return n(P,j),ii&&Zc(P,U),L;if(j===null){for(;U<O.length;U++)j=g(P,O[U],N),j!==null&&(M=a(j,M,U),$===null?L=j:$.sibling=j,$=j);return ii&&Zc(P,U),L}for(j=r(P,j);U<O.length;U++)G=b(j,P,U,O[U],N),G!==null&&(e&&G.alternate!==null&&j.delete(G.key===null?U:G.key),M=a(G,M,U),$===null?L=G:$.sibling=G,$=G);return e&&j.forEach(function(Q){return t(P,Q)}),ii&&Zc(P,U),L}function T(P,M,O,N){var L=qp(O);if(typeof L!="function")throw Error(Yt(150));if(O=L.call(O),O==null)throw Error(Yt(151));for(var $=L=null,j=M,U=M=0,G=null,Z=O.next();j!==null&&!Z.done;U++,Z=O.next()){j.index>U?(G=j,j=null):G=j.sibling;var Q=v(P,j,Z.value,N);if(Q===null){j===null&&(j=G);break}e&&j&&Q.alternate===null&&t(P,j),M=a(Q,M,U),$===null?L=Q:$.sibling=Q,$=Q,j=G}if(Z.done)return n(P,j),ii&&Zc(P,U),L;if(j===null){for(;!Z.done;U++,Z=O.next())Z=g(P,Z.value,N),Z!==null&&(M=a(Z,M,U),$===null?L=Z:$.sibling=Z,$=Z);return ii&&Zc(P,U),L}for(j=r(P,j);!Z.done;U++,Z=O.next())Z=b(j,P,U,Z.value,N),Z!==null&&(e&&Z.alternate!==null&&j.delete(Z.key===null?U:Z.key),M=a(Z,M,U),$===null?L=Z:$.sibling=Z,$=Z);return e&&j.forEach(function(J){return t(P,J)}),ii&&Zc(P,U),L}function k(P,M,O,N){if(typeof O=="object"&&O!==null&&O.type===Af&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case $y:e:{for(var L=O.key,$=M;$!==null;){if($.key===L){if(L=O.type,L===Af){if($.tag===7){n(P,$.sibling),M=i($,O.props.children),M.return=P,P=M;break e}}else if($.elementType===L||typeof L=="object"&&L!==null&&L.$$typeof===Tu&&SM(L)===$.type){n(P,$.sibling),M=i($,O.props),M.ref=Jp(P,$,O),M.return=P,P=M;break e}n(P,$);break}else t(P,$);$=$.sibling}O.type===Af?(M=yd(O.props.children,P.mode,N,O.key),M.return=P,P=M):(N=ix(O.type,O.key,O.props,null,P.mode,N),N.ref=Jp(P,M,O),N.return=P,P=N)}return s(P);case Of:e:{for($=O.key;M!==null;){if(M.key===$)if(M.tag===4&&M.stateNode.containerInfo===O.containerInfo&&M.stateNode.implementation===O.implementation){n(P,M.sibling),M=i(M,O.children||[]),M.return=P,P=M;break e}else{n(P,M);break}else t(P,M);M=M.sibling}M=bC(O,P.mode,N),M.return=P,P=M}return s(P);case Tu:return $=O._init,k(P,M,$(O._payload),N)}if(wm(O))return _(P,M,O,N);if(qp(O))return T(P,M,O,N);Xy(P,O)}return typeof O=="string"&&O!==""||typeof O=="number"?(O=""+O,M!==null&&M.tag===6?(n(P,M.sibling),M=i(M,O),M.return=P,P=M):(n(P,M),M=xC(O,P.mode,N),M.return=P,P=M),s(P)):n(P,M)}return k}var dh=jz(!0),Hz=jz(!1),Zg={},ol=uc(Zg),mg=uc(Zg),gg=uc(Zg);function ud(e){if(e===Zg)throw Error(Yt(174));return e}function _P(e,t){switch(Zr(gg,t),Zr(mg,e),Zr(ol,Zg),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:f2(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=f2(t,e)}Jr(ol),Zr(ol,t)}function fh(){Jr(ol),Jr(mg),Jr(gg)}function Kz(e){ud(gg.current);var t=ud(ol.current),n=f2(t,e.type);t!==n&&(Zr(mg,e),Zr(ol,n))}function wP(e){mg.current===e&&(Jr(ol),Jr(mg))}var ui=uc(0);function Wx(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var hC=[];function CP(){for(var e=0;e<hC.length;e++)hC[e]._workInProgressVersionPrimary=null;hC.length=0}var J0=eu.ReactCurrentDispatcher,pC=eu.ReactCurrentBatchConfig,Ed=0,ci=null,Vi=null,Ji=null,Gx=!1,$m=!1,vg=0,xG=0;function bo(){throw Error(Yt(321))}function SP(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ds(e[n],t[n]))return!1;return!0}function EP(e,t,n,r,i,a){if(Ed=a,ci=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,J0.current=e===null||e.memoizedState===null?CG:SG,e=n(r,i),$m){a=0;do{if($m=!1,vg=0,25<=a)throw Error(Yt(301));a+=1,Ji=Vi=null,t.updateQueue=null,J0.current=EG,e=n(r,i)}while($m)}if(J0.current=qx,t=Vi!==null&&Vi.next!==null,Ed=0,Ji=Vi=ci=null,Gx=!1,t)throw Error(Yt(300));return e}function PP(){var e=vg!==0;return vg=0,e}function Qs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ji===null?ci.memoizedState=Ji=e:Ji=Ji.next=e,Ji}function ss(){if(Vi===null){var e=ci.alternate;e=e!==null?e.memoizedState:null}else e=Vi.next;var t=Ji===null?ci.memoizedState:Ji.next;if(t!==null)Ji=t,Vi=e;else{if(e===null)throw Error(Yt(310));Vi=e,e={memoizedState:Vi.memoizedState,baseState:Vi.baseState,baseQueue:Vi.baseQueue,queue:Vi.queue,next:null},Ji===null?ci.memoizedState=Ji=e:Ji=Ji.next=e}return Ji}function yg(e,t){return typeof t=="function"?t(e):t}function mC(e){var t=ss(),n=t.queue;if(n===null)throw Error(Yt(311));n.lastRenderedReducer=e;var r=Vi,i=r.baseQueue,a=n.pending;if(a!==null){if(i!==null){var s=i.next;i.next=a.next,a.next=s}r.baseQueue=i=a,n.pending=null}if(i!==null){a=i.next,r=r.baseState;var o=s=null,c=null,f=a;do{var p=f.lane;if((Ed&p)===p)c!==null&&(c=c.next={lane:0,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null}),r=f.hasEagerState?f.eagerState:e(r,f.action);else{var g={lane:p,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null};c===null?(o=c=g,s=r):c=c.next=g,ci.lanes|=p,Pd|=p}f=f.next}while(f!==null&&f!==a);c===null?s=r:c.next=o,Ds(r,t.memoizedState)||(ta=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do a=i.lane,ci.lanes|=a,Pd|=a,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function gC(e){var t=ss(),n=t.queue;if(n===null)throw Error(Yt(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do a=e(a,s.action),s=s.next;while(s!==i);Ds(a,t.memoizedState)||(ta=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Wz(){}function Gz(e,t){var n=ci,r=ss(),i=t(),a=!Ds(r.memoizedState,i);if(a&&(r.memoizedState=i,ta=!0),r=r.queue,TP(Xz.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||Ji!==null&&Ji.memoizedState.tag&1){if(n.flags|=2048,xg(9,Zz.bind(null,n,r,i,t),void 0,null),to===null)throw Error(Yt(349));(Ed&30)!==0||qz(n,t,i)}return i}function qz(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ci.updateQueue,t===null?(t={lastEffect:null,stores:null},ci.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Zz(e,t,n,r){t.value=n,t.getSnapshot=r,Yz(t)&&Qz(e)}function Xz(e,t,n){return n(function(){Yz(t)&&Qz(e)})}function Yz(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ds(e,n)}catch{return!0}}function Qz(e){var t=Xl(e,1);t!==null&&Ms(t,e,1,-1)}function EM(e){var t=Qs();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:yg,lastRenderedState:e},t.queue=e,e=e.dispatch=wG.bind(null,ci,e),[t.memoizedState,e]}function xg(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ci.updateQueue,t===null?(t={lastEffect:null,stores:null},ci.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Jz(){return ss().memoizedState}function ex(e,t,n,r){var i=Qs();ci.flags|=e,i.memoizedState=xg(1|t,n,void 0,r===void 0?null:r)}function p_(e,t,n,r){var i=ss();r=r===void 0?null:r;var a=void 0;if(Vi!==null){var s=Vi.memoizedState;if(a=s.destroy,r!==null&&SP(r,s.deps)){i.memoizedState=xg(t,n,a,r);return}}ci.flags|=e,i.memoizedState=xg(1|t,n,a,r)}function PM(e,t){return ex(8390656,8,e,t)}function TP(e,t){return p_(2048,8,e,t)}function e5(e,t){return p_(4,2,e,t)}function t5(e,t){return p_(4,4,e,t)}function n5(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 r5(e,t,n){return n=n!=null?n.concat([e]):null,p_(4,4,n5.bind(null,t,e),n)}function kP(){}function i5(e,t){var n=ss();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&SP(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function o5(e,t){var n=ss();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&SP(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function a5(e,t,n){return(Ed&21)===0?(e.baseState&&(e.baseState=!1,ta=!0),e.memoizedState=n):(Ds(n,t)||(n=uz(),ci.lanes|=n,Pd|=n,e.baseState=!0),t)}function bG(e,t){var n=Mr;Mr=n!==0&&4>n?n:4,e(!0);var r=pC.transition;pC.transition={};try{e(!1),t()}finally{Mr=n,pC.transition=r}}function s5(){return ss().memoizedState}function _G(e,t,n){var r=Zu(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},l5(e))u5(t,n);else if(n=$z(e,t,n,r),n!==null){var i=Uo();Ms(n,e,r,i),c5(n,t,r)}}function wG(e,t,n){var r=Zu(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(l5(e))u5(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var s=t.lastRenderedState,o=a(s,n);if(i.hasEagerState=!0,i.eagerState=o,Ds(o,s)){var c=t.interleaved;c===null?(i.next=i,xP(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=$z(e,t,i,r),n!==null&&(i=Uo(),Ms(n,e,r,i),c5(n,t,r))}}function l5(e){var t=e.alternate;return e===ci||t!==null&&t===ci}function u5(e,t){$m=Gx=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function c5(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,oP(e,n)}}var qx={readContext:as,useCallback:bo,useContext:bo,useEffect:bo,useImperativeHandle:bo,useInsertionEffect:bo,useLayoutEffect:bo,useMemo:bo,useReducer:bo,useRef:bo,useState:bo,useDebugValue:bo,useDeferredValue:bo,useTransition:bo,useMutableSource:bo,useSyncExternalStore:bo,useId:bo,unstable_isNewReconciler:!1},CG={readContext:as,useCallback:function(e,t){return Qs().memoizedState=[e,t===void 0?null:t],e},useContext:as,useEffect:PM,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ex(4194308,4,n5.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ex(4194308,4,e,t)},useInsertionEffect:function(e,t){return ex(4,2,e,t)},useMemo:function(e,t){var n=Qs();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Qs();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=_G.bind(null,ci,e),[r.memoizedState,e]},useRef:function(e){var t=Qs();return e={current:e},t.memoizedState=e},useState:EM,useDebugValue:kP,useDeferredValue:function(e){return Qs().memoizedState=e},useTransition:function(){var e=EM(!1),t=e[0];return e=bG.bind(null,e[1]),Qs().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ci,i=Qs();if(ii){if(n===void 0)throw Error(Yt(407));n=n()}else{if(n=t(),to===null)throw Error(Yt(349));(Ed&30)!==0||qz(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,PM(Xz.bind(null,r,a,e),[e]),r.flags|=2048,xg(9,Zz.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Qs(),t=to.identifierPrefix;if(ii){var n=jl,r=Ul;n=(r&~(1<<32-Is(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=vg++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=xG++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},SG={readContext:as,useCallback:i5,useContext:as,useEffect:TP,useImperativeHandle:r5,useInsertionEffect:e5,useLayoutEffect:t5,useMemo:o5,useReducer:mC,useRef:Jz,useState:function(){return mC(yg)},useDebugValue:kP,useDeferredValue:function(e){var t=ss();return a5(t,Vi.memoizedState,e)},useTransition:function(){var e=mC(yg)[0],t=ss().memoizedState;return[e,t]},useMutableSource:Wz,useSyncExternalStore:Gz,useId:s5,unstable_isNewReconciler:!1},EG={readContext:as,useCallback:i5,useContext:as,useEffect:TP,useImperativeHandle:r5,useInsertionEffect:e5,useLayoutEffect:t5,useMemo:o5,useReducer:gC,useRef:Jz,useState:function(){return gC(yg)},useDebugValue:kP,useDeferredValue:function(e){var t=ss();return Vi===null?t.memoizedState=e:a5(t,Vi.memoizedState,e)},useTransition:function(){var e=gC(yg)[0],t=ss().memoizedState;return[e,t]},useMutableSource:Wz,useSyncExternalStore:Gz,useId:s5,unstable_isNewReconciler:!1};function hh(e,t){try{var n="",r=t;do n+=JK(r),r=r.return;while(r);var i=n}catch(a){i=`
Error generating stack: `+a.message+`
`+a.stack}return{value:e,source:t,stack:i,digest:null}}function vC(e,t,n){return{value:e,source:null,stack:n!=null?n:null,digest:t!=null?t:null}}function N2(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var PG=typeof WeakMap=="function"?WeakMap:Map;function d5(e,t,n){n=Kl(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Xx||(Xx=!0,K2=r),N2(e,t)},n}function f5(e,t,n){n=Kl(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){N2(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){N2(e,t),typeof r!="function"&&(qu===null?qu=new Set([this]):qu.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function TM(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new PG;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=BG.bind(null,e,t,n),t.then(e,e))}function kM(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 IM(e,t,n,r,i){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Kl(-1,1),t.tag=2,Gu(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var TG=eu.ReactCurrentOwner,ta=!1;function Bo(e,t,n,r){t.child=e===null?Hz(t,null,n,r):dh(t,e.child,n,r)}function MM(e,t,n,r,i){n=n.render;var a=t.ref;return Jf(t,i),r=EP(e,t,n,r,a,i),n=PP(),e!==null&&!ta?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Yl(e,t,i)):(ii&&n&&hP(t),t.flags|=1,Bo(e,t,r,i),t.child)}function RM(e,t,n,r,i){if(e===null){var a=n.type;return typeof a=="function"&&!LP(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,h5(e,t,a,r,i)):(e=ix(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var s=a.memoizedProps;if(n=n.compare,n=n!==null?n:dg,n(s,r)&&e.ref===t.ref)return Yl(e,t,i)}return t.flags|=1,e=Xu(a,r),e.ref=t.ref,e.return=t,t.child=e}function h5(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(dg(a,r)&&e.ref===t.ref)if(ta=!1,t.pendingProps=r=a,(e.lanes&i)!==0)(e.flags&131072)!==0&&(ta=!0);else return t.lanes=e.lanes,Yl(e,t,i)}return L2(e,t,n,r,i)}function p5(e,t,n){var r=t.pendingProps,i=r.children,a=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Zr(Hf,xa),xa|=n;else{if((n&1073741824)===0)return e=a!==null?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Zr(Hf,xa),xa|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a!==null?a.baseLanes:n,Zr(Hf,xa),xa|=r}else a!==null?(r=a.baseLanes|n,t.memoizedState=null):r=n,Zr(Hf,xa),xa|=r;return Bo(e,t,i,n),t.child}function m5(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function L2(e,t,n,r,i){var a=ra(n)?Cd:Po.current;return a=uh(t,a),Jf(t,i),n=EP(e,t,n,r,a,i),r=PP(),e!==null&&!ta?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Yl(e,t,i)):(ii&&r&&hP(t),t.flags|=1,Bo(e,t,n,i),t.child)}function DM(e,t,n,r,i){if(ra(n)){var a=!0;Bx(t)}else a=!1;if(Jf(t,i),t.stateNode===null)tx(e,t),Uz(t,n,r),A2(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,o=t.memoizedProps;s.props=o;var c=s.context,f=n.contextType;typeof f=="object"&&f!==null?f=as(f):(f=ra(n)?Cd:Po.current,f=uh(t,f));var p=n.getDerivedStateFromProps,g=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function";g||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==r||c!==f)&&CM(t,s,r,f),ku=!1;var v=t.memoizedState;s.state=v,Kx(t,r,s,i),c=t.memoizedState,o!==r||v!==c||na.current||ku?(typeof p=="function"&&(O2(t,n,p,r),c=t.memoizedState),(o=ku||wM(t,n,o,r,v,c,f))?(g||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),s.props=r,s.state=c,s.context=f,r=o):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Bz(e,t),o=t.memoizedProps,f=t.type===t.elementType?o:Cs(t.type,o),s.props=f,g=t.pendingProps,v=s.context,c=n.contextType,typeof c=="object"&&c!==null?c=as(c):(c=ra(n)?Cd:Po.current,c=uh(t,c));var b=n.getDerivedStateFromProps;(p=typeof b=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==g||v!==c)&&CM(t,s,r,c),ku=!1,v=t.memoizedState,s.state=v,Kx(t,r,s,i);var _=t.memoizedState;o!==g||v!==_||na.current||ku?(typeof b=="function"&&(O2(t,n,b,r),_=t.memoizedState),(f=ku||wM(t,n,f,r,v,_,c)||!1)?(p||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,_,c),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,_,c)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&v===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&v===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=_),s.props=r,s.state=_,s.context=c,r=f):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&v===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&v===e.memoizedState||(t.flags|=1024),r=!1)}return F2(e,t,n,r,a,i)}function F2(e,t,n,r,i,a){m5(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&vM(t,n,!1),Yl(e,t,a);r=t.stateNode,TG.current=t;var o=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=dh(t,e.child,null,a),t.child=dh(t,null,o,a)):Bo(e,t,o,a),t.memoizedState=r.state,i&&vM(t,n,!0),t.child}function g5(e){var t=e.stateNode;t.pendingContext?gM(e,t.pendingContext,t.pendingContext!==t.context):t.context&&gM(e,t.context,!1),_P(e,t.containerInfo)}function OM(e,t,n,r,i){return ch(),mP(i),t.flags|=256,Bo(e,t,n,r),t.child}var z2={dehydrated:null,treeContext:null,retryLane:0};function $2(e){return{baseLanes:e,cachePool:null,transitions:null}}function v5(e,t,n){var r=t.pendingProps,i=ui.current,a=!1,s=(t.flags&128)!==0,o;if((o=s)||(o=e!==null&&e.memoizedState===null?!1:(i&2)!==0),o?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Zr(ui,i&1),e===null)return R2(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):(s=r.children,e=r.fallback,a?(r=t.mode,a=t.child,s={mode:"hidden",children:s},(r&1)===0&&a!==null?(a.childLanes=0,a.pendingProps=s):a=v_(s,r,0,null),e=yd(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=$2(n),t.memoizedState=z2,e):IP(t,s));if(i=e.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return kG(e,t,s,r,o,i,n);if(a){a=r.fallback,s=t.mode,i=e.child,o=i.sibling;var c={mode:"hidden",children:r.children};return(s&1)===0&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Xu(i,c),r.subtreeFlags=i.subtreeFlags&14680064),o!==null?a=Xu(o,a):(a=yd(a,s,n,null),a.flags|=2),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,s=e.child.memoizedState,s=s===null?$2(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},a.memoizedState=s,a.childLanes=e.childLanes&~n,t.memoizedState=z2,r}return a=e.child,e=a.sibling,r=Xu(a,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function IP(e,t){return t=v_({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Yy(e,t,n,r){return r!==null&&mP(r),dh(t,e.child,null,n),e=IP(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function kG(e,t,n,r,i,a,s){if(n)return t.flags&256?(t.flags&=-257,r=vC(Error(Yt(422))),Yy(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=v_({mode:"visible",children:r.children},i,0,null),a=yd(a,i,s,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,(t.mode&1)!==0&&dh(t,e.child,null,s),t.child.memoizedState=$2(s),t.memoizedState=z2,a);if((t.mode&1)===0)return Yy(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var o=r.dgst;return r=o,a=Error(Yt(419)),r=vC(a,r,void 0),Yy(e,t,s,r)}if(o=(s&e.childLanes)!==0,ta||o){if(r=to,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=(i&(r.suspendedLanes|s))!==0?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,Xl(e,i),Ms(r,e,i,-1))}return NP(),r=vC(Error(Yt(421))),Yy(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=VG.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,ba=Wu(i.nextSibling),Ea=t,ii=!0,Ps=null,e!==null&&(Xa[Ya++]=Ul,Xa[Ya++]=jl,Xa[Ya++]=Sd,Ul=e.id,jl=e.overflow,Sd=t),t=IP(t,r.children),t.flags|=4096,t)}function AM(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),D2(e.return,t,n)}function yC(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function y5(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Bo(e,t,r.children,n),r=ui.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&AM(e,n,t);else if(e.tag===19)AM(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Zr(ui,r),(t.mode&1)===0)t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Wx(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),yC(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Wx(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}yC(t,!0,n,null,a);break;case"together":yC(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function tx(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Yl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Pd|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(Yt(153));if(t.child!==null){for(e=t.child,n=Xu(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Xu(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function IG(e,t,n){switch(t.tag){case 3:g5(t),ch();break;case 5:Kz(t);break;case 1:ra(t.type)&&Bx(t);break;case 4:_P(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Zr(jx,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Zr(ui,ui.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?v5(e,t,n):(Zr(ui,ui.current&1),e=Yl(e,t,n),e!==null?e.sibling:null);Zr(ui,ui.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return y5(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Zr(ui,ui.current),r)break;return null;case 22:case 23:return t.lanes=0,p5(e,t,n)}return Yl(e,t,n)}var x5,B2,b5,_5;x5=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};B2=function(){};b5=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,ud(ol.current);var a=null;switch(n){case"input":i=l2(e,i),r=l2(e,r),a=[];break;case"select":i=di({},i,{value:void 0}),r=di({},r,{value:void 0}),a=[];break;case"textarea":i=d2(e,i),r=d2(e,r),a=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=zx)}h2(n,r);var s;n=null;for(f in i)if(!r.hasOwnProperty(f)&&i.hasOwnProperty(f)&&i[f]!=null)if(f==="style"){var o=i[f];for(s in o)o.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(ig.hasOwnProperty(f)?a||(a=[]):(a=a||[]).push(f,null));for(f in r){var c=r[f];if(o=i!=null?i[f]:void 0,r.hasOwnProperty(f)&&c!==o&&(c!=null||o!=null))if(f==="style")if(o){for(s in o)!o.hasOwnProperty(s)||c&&c.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in c)c.hasOwnProperty(s)&&o[s]!==c[s]&&(n||(n={}),n[s]=c[s])}else n||(a||(a=[]),a.push(f,n)),n=c;else f==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,o=o?o.__html:void 0,c!=null&&o!==c&&(a=a||[]).push(f,c)):f==="children"?typeof c!="string"&&typeof c!="number"||(a=a||[]).push(f,""+c):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(ig.hasOwnProperty(f)?(c!=null&&f==="onScroll"&&Yr("scroll",e),a||o===c||(a=[])):(a=a||[]).push(f,c))}n&&(a=a||[]).push("style",n);var f=a;(t.updateQueue=f)&&(t.flags|=4)}};_5=function(e,t,n,r){n!==r&&(t.flags|=4)};function em(e,t){if(!ii)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function _o(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function MG(e,t,n){var r=t.pendingProps;switch(pP(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _o(t),null;case 1:return ra(t.type)&&$x(),_o(t),null;case 3:return r=t.stateNode,fh(),Jr(na),Jr(Po),CP(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Zy(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ps!==null&&(q2(Ps),Ps=null))),B2(e,t),_o(t),null;case 5:wP(t);var i=ud(gg.current);if(n=t.type,e!==null&&t.stateNode!=null)b5(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Yt(166));return _o(t),null}if(e=ud(ol.current),Zy(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[tl]=t,r[pg]=a,e=(t.mode&1)!==0,n){case"dialog":Yr("cancel",r),Yr("close",r);break;case"iframe":case"object":case"embed":Yr("load",r);break;case"video":case"audio":for(i=0;i<Sm.length;i++)Yr(Sm[i],r);break;case"source":Yr("error",r);break;case"img":case"image":case"link":Yr("error",r),Yr("load",r);break;case"details":Yr("toggle",r);break;case"input":j3(r,a),Yr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Yr("invalid",r);break;case"textarea":K3(r,a),Yr("invalid",r)}h2(n,a),i=null;for(var s in a)if(a.hasOwnProperty(s)){var o=a[s];s==="children"?typeof o=="string"?r.textContent!==o&&(a.suppressHydrationWarning!==!0&&qy(r.textContent,o,e),i=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(a.suppressHydrationWarning!==!0&&qy(r.textContent,o,e),i=["children",""+o]):ig.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&Yr("scroll",r)}switch(n){case"input":By(r),H3(r,a,!0);break;case"textarea":By(r),W3(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=zx)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=qF(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[tl]=t,e[pg]=r,x5(e,t,!1,!1),t.stateNode=e;e:{switch(s=p2(n,r),n){case"dialog":Yr("cancel",e),Yr("close",e),i=r;break;case"iframe":case"object":case"embed":Yr("load",e),i=r;break;case"video":case"audio":for(i=0;i<Sm.length;i++)Yr(Sm[i],e);i=r;break;case"source":Yr("error",e),i=r;break;case"img":case"image":case"link":Yr("error",e),Yr("load",e),i=r;break;case"details":Yr("toggle",e),i=r;break;case"input":j3(e,r),i=l2(e,r),Yr("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=di({},r,{value:void 0}),Yr("invalid",e);break;case"textarea":K3(e,r),i=d2(e,r),Yr("invalid",e);break;default:i=r}h2(n,i),o=i;for(a in o)if(o.hasOwnProperty(a)){var c=o[a];a==="style"?YF(e,c):a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&ZF(e,c)):a==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&og(e,c):typeof c=="number"&&og(e,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(ig.hasOwnProperty(a)?c!=null&&a==="onScroll"&&Yr("scroll",e):c!=null&&JE(e,a,c,s))}switch(n){case"input":By(e),H3(e,r,!1);break;case"textarea":By(e),W3(e);break;case"option":r.value!=null&&e.setAttribute("value",""+rc(r.value));break;case"select":e.multiple=!!r.multiple,a=r.value,a!=null?Zf(e,!!r.multiple,a,!1):r.defaultValue!=null&&Zf(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=zx)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return _o(t),null;case 6:if(e&&t.stateNode!=null)_5(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Yt(166));if(n=ud(gg.current),ud(ol.current),Zy(t)){if(r=t.stateNode,n=t.memoizedProps,r[tl]=t,(a=r.nodeValue!==n)&&(e=Ea,e!==null))switch(e.tag){case 3:qy(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&qy(r.nodeValue,n,(e.mode&1)!==0)}a&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[tl]=t,t.stateNode=r}return _o(t),null;case 13:if(Jr(ui),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ii&&ba!==null&&(t.mode&1)!==0&&(t.flags&128)===0)zz(),ch(),t.flags|=98560,a=!1;else if(a=Zy(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(Yt(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(Yt(317));a[tl]=t}else ch(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;_o(t),a=!1}else Ps!==null&&(q2(Ps),Ps=null),a=!0;if(!a)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(ui.current&1)!==0?ji===0&&(ji=3):NP())),t.updateQueue!==null&&(t.flags|=4),_o(t),null);case 4:return fh(),B2(e,t),e===null&&fg(t.stateNode.containerInfo),_o(t),null;case 10:return yP(t.type._context),_o(t),null;case 17:return ra(t.type)&&$x(),_o(t),null;case 19:if(Jr(ui),a=t.memoizedState,a===null)return _o(t),null;if(r=(t.flags&128)!==0,s=a.rendering,s===null)if(r)em(a,!1);else{if(ji!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=Wx(e),s!==null){for(t.flags|=128,em(a,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)a=n,e=r,a.flags&=14680066,s=a.alternate,s===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=s.childLanes,a.lanes=s.lanes,a.child=s.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=s.memoizedProps,a.memoizedState=s.memoizedState,a.updateQueue=s.updateQueue,a.type=s.type,e=s.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Zr(ui,ui.current&1|2),t.child}e=e.sibling}a.tail!==null&&_i()>ph&&(t.flags|=128,r=!0,em(a,!1),t.lanes=4194304)}else{if(!r)if(e=Wx(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),em(a,!0),a.tail===null&&a.tailMode==="hidden"&&!s.alternate&&!ii)return _o(t),null}else 2*_i()-a.renderingStartTime>ph&&n!==1073741824&&(t.flags|=128,r=!0,em(a,!1),t.lanes=4194304);a.isBackwards?(s.sibling=t.child,t.child=s):(n=a.last,n!==null?n.sibling=s:t.child=s,a.last=s)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=_i(),t.sibling=null,n=ui.current,Zr(ui,r?n&1|2:n&1),t):(_o(t),null);case 22:case 23:return AP(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(xa&1073741824)!==0&&(_o(t),t.subtreeFlags&6&&(t.flags|=8192)):_o(t),null;case 24:return null;case 25:return null}throw Error(Yt(156,t.tag))}function RG(e,t){switch(pP(t),t.tag){case 1:return ra(t.type)&&$x(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fh(),Jr(na),Jr(Po),CP(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return wP(t),null;case 13:if(Jr(ui),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Yt(340));ch()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Jr(ui),null;case 4:return fh(),null;case 10:return yP(t.type._context),null;case 22:case 23:return AP(),null;case 24:return null;default:return null}}var Qy=!1,So=!1,DG=typeof WeakSet=="function"?WeakSet:Set,Sn=null;function jf(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){mi(e,t,r)}else n.current=null}function V2(e,t,n){try{n()}catch(r){mi(e,t,r)}}var NM=!1;function OG(e,t){if(S2=Nx,e=Ez(),fP(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var s=0,o=-1,c=-1,f=0,p=0,g=e,v=null;t:for(;;){for(var b;g!==n||i!==0&&g.nodeType!==3||(o=s+i),g!==a||r!==0&&g.nodeType!==3||(c=s+r),g.nodeType===3&&(s+=g.nodeValue.length),(b=g.firstChild)!==null;)v=g,g=b;for(;;){if(g===e)break t;if(v===n&&++f===i&&(o=s),v===a&&++p===r&&(c=s),(b=g.nextSibling)!==null)break;g=v,v=g.parentNode}g=b}n=o===-1||c===-1?null:{start:o,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(E2={focusedElem:e,selectionRange:n},Nx=!1,Sn=t;Sn!==null;)if(t=Sn,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Sn=e;else for(;Sn!==null;){t=Sn;try{var _=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(_!==null){var T=_.memoizedProps,k=_.memoizedState,P=t.stateNode,M=P.getSnapshotBeforeUpdate(t.elementType===t.type?T:Cs(t.type,T),k);P.__reactInternalSnapshotBeforeUpdate=M}break;case 3:var O=t.stateNode.containerInfo;O.nodeType===1?O.textContent="":O.nodeType===9&&O.documentElement&&O.removeChild(O.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Yt(163))}}catch(N){mi(t,t.return,N)}if(e=t.sibling,e!==null){e.return=t.return,Sn=e;break}Sn=t.return}return _=NM,NM=!1,_}function Bm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&V2(t,n,a)}i=i.next}while(i!==r)}}function m_(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function U2(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function w5(e){var t=e.alternate;t!==null&&(e.alternate=null,w5(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[tl],delete t[pg],delete t[k2],delete t[mG],delete t[gG])),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 C5(e){return e.tag===5||e.tag===3||e.tag===4}function LM(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||C5(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 j2(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=zx));else if(r!==4&&(e=e.child,e!==null))for(j2(e,t,n),e=e.sibling;e!==null;)j2(e,t,n),e=e.sibling}function H2(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(H2(e,t,n),e=e.sibling;e!==null;)H2(e,t,n),e=e.sibling}var uo=null,Ss=!1;function _u(e,t,n){for(n=n.child;n!==null;)S5(e,t,n),n=n.sibling}function S5(e,t,n){if(il&&typeof il.onCommitFiberUnmount=="function")try{il.onCommitFiberUnmount(s_,n)}catch{}switch(n.tag){case 5:So||jf(n,t);case 6:var r=uo,i=Ss;uo=null,_u(e,t,n),uo=r,Ss=i,uo!==null&&(Ss?(e=uo,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):uo.removeChild(n.stateNode));break;case 18:uo!==null&&(Ss?(e=uo,n=n.stateNode,e.nodeType===8?dC(e.parentNode,n):e.nodeType===1&&dC(e,n),ug(e)):dC(uo,n.stateNode));break;case 4:r=uo,i=Ss,uo=n.stateNode.containerInfo,Ss=!0,_u(e,t,n),uo=r,Ss=i;break;case 0:case 11:case 14:case 15:if(!So&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,s=a.destroy;a=a.tag,s!==void 0&&((a&2)!==0||(a&4)!==0)&&V2(n,t,s),i=i.next}while(i!==r)}_u(e,t,n);break;case 1:if(!So&&(jf(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){mi(n,t,o)}_u(e,t,n);break;case 21:_u(e,t,n);break;case 22:n.mode&1?(So=(r=So)||n.memoizedState!==null,_u(e,t,n),So=r):_u(e,t,n);break;default:_u(e,t,n)}}function FM(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new DG),t.forEach(function(r){var i=UG.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function bs(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,s=t,o=s;e:for(;o!==null;){switch(o.tag){case 5:uo=o.stateNode,Ss=!1;break e;case 3:uo=o.stateNode.containerInfo,Ss=!0;break e;case 4:uo=o.stateNode.containerInfo,Ss=!0;break e}o=o.return}if(uo===null)throw Error(Yt(160));S5(a,s,i),uo=null,Ss=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(f){mi(i,t,f)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)E5(t,e),t=t.sibling}function E5(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(bs(t,e),qs(e),r&4){try{Bm(3,e,e.return),m_(3,e)}catch(T){mi(e,e.return,T)}try{Bm(5,e,e.return)}catch(T){mi(e,e.return,T)}}break;case 1:bs(t,e),qs(e),r&512&&n!==null&&jf(n,n.return);break;case 5:if(bs(t,e),qs(e),r&512&&n!==null&&jf(n,n.return),e.flags&32){var i=e.stateNode;try{og(i,"")}catch(T){mi(e,e.return,T)}}if(r&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,s=n!==null?n.memoizedProps:a,o=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{o==="input"&&a.type==="radio"&&a.name!=null&&WF(i,a),p2(o,s);var f=p2(o,a);for(s=0;s<c.length;s+=2){var p=c[s],g=c[s+1];p==="style"?YF(i,g):p==="dangerouslySetInnerHTML"?ZF(i,g):p==="children"?og(i,g):JE(i,p,g,f)}switch(o){case"input":u2(i,a);break;case"textarea":GF(i,a);break;case"select":var v=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var b=a.value;b!=null?Zf(i,!!a.multiple,b,!1):v!==!!a.multiple&&(a.defaultValue!=null?Zf(i,!!a.multiple,a.defaultValue,!0):Zf(i,!!a.multiple,a.multiple?[]:"",!1))}i[pg]=a}catch(T){mi(e,e.return,T)}}break;case 6:if(bs(t,e),qs(e),r&4){if(e.stateNode===null)throw Error(Yt(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(T){mi(e,e.return,T)}}break;case 3:if(bs(t,e),qs(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ug(t.containerInfo)}catch(T){mi(e,e.return,T)}break;case 4:bs(t,e),qs(e);break;case 13:bs(t,e),qs(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(DP=_i())),r&4&&FM(e);break;case 22:if(p=n!==null&&n.memoizedState!==null,e.mode&1?(So=(f=So)||p,bs(t,e),So=f):bs(t,e),qs(e),r&8192){if(f=e.memoizedState!==null,(e.stateNode.isHidden=f)&&!p&&(e.mode&1)!==0)for(Sn=e,p=e.child;p!==null;){for(g=Sn=p;Sn!==null;){switch(v=Sn,b=v.child,v.tag){case 0:case 11:case 14:case 15:Bm(4,v,v.return);break;case 1:jf(v,v.return);var _=v.stateNode;if(typeof _.componentWillUnmount=="function"){r=v,n=v.return;try{t=r,_.props=t.memoizedProps,_.state=t.memoizedState,_.componentWillUnmount()}catch(T){mi(r,n,T)}}break;case 5:jf(v,v.return);break;case 22:if(v.memoizedState!==null){$M(g);continue}}b!==null?(b.return=v,Sn=b):$M(g)}p=p.sibling}e:for(p=null,g=e;;){if(g.tag===5){if(p===null){p=g;try{i=g.stateNode,f?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(o=g.stateNode,c=g.memoizedProps.style,s=c!=null&&c.hasOwnProperty("display")?c.display:null,o.style.display=XF("display",s))}catch(T){mi(e,e.return,T)}}}else if(g.tag===6){if(p===null)try{g.stateNode.nodeValue=f?"":g.memoizedProps}catch(T){mi(e,e.return,T)}}else if((g.tag!==22&&g.tag!==23||g.memoizedState===null||g===e)&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===e)break e;for(;g.sibling===null;){if(g.return===null||g.return===e)break e;p===g&&(p=null),g=g.return}p===g&&(p=null),g.sibling.return=g.return,g=g.sibling}}break;case 19:bs(t,e),qs(e),r&4&&FM(e);break;case 21:break;default:bs(t,e),qs(e)}}function qs(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(C5(n)){var r=n;break e}n=n.return}throw Error(Yt(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(og(i,""),r.flags&=-33);var a=LM(e);H2(e,a,i);break;case 3:case 4:var s=r.stateNode.containerInfo,o=LM(e);j2(e,o,s);break;default:throw Error(Yt(161))}}catch(c){mi(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function AG(e,t,n){Sn=e,P5(e)}function P5(e,t,n){for(var r=(e.mode&1)!==0;Sn!==null;){var i=Sn,a=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||Qy;if(!s){var o=i.alternate,c=o!==null&&o.memoizedState!==null||So;o=Qy;var f=So;if(Qy=s,(So=c)&&!f)for(Sn=i;Sn!==null;)s=Sn,c=s.child,s.tag===22&&s.memoizedState!==null?BM(i):c!==null?(c.return=s,Sn=c):BM(i);for(;a!==null;)Sn=a,P5(a),a=a.sibling;Sn=i,Qy=o,So=f}zM(e)}else(i.subtreeFlags&8772)!==0&&a!==null?(a.return=i,Sn=a):zM(e)}}function zM(e){for(;Sn!==null;){var t=Sn;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:So||m_(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!So)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Cs(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&_M(t,a,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}_M(t,s,n)}break;case 5:var o=t.stateNode;if(n===null&&t.flags&4){n=o;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var f=t.alternate;if(f!==null){var p=f.memoizedState;if(p!==null){var g=p.dehydrated;g!==null&&ug(g)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Yt(163))}So||t.flags&512&&U2(t)}catch(v){mi(t,t.return,v)}}if(t===e){Sn=null;break}if(n=t.sibling,n!==null){n.return=t.return,Sn=n;break}Sn=t.return}}function $M(e){for(;Sn!==null;){var t=Sn;if(t===e){Sn=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Sn=n;break}Sn=t.return}}function BM(e){for(;Sn!==null;){var t=Sn;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{m_(4,t)}catch(c){mi(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(c){mi(t,i,c)}}var a=t.return;try{U2(t)}catch(c){mi(t,a,c)}break;case 5:var s=t.return;try{U2(t)}catch(c){mi(t,s,c)}}}catch(c){mi(t,t.return,c)}if(t===e){Sn=null;break}var o=t.sibling;if(o!==null){o.return=t.return,Sn=o;break}Sn=t.return}}var NG=Math.ceil,Zx=eu.ReactCurrentDispatcher,MP=eu.ReactCurrentOwner,rs=eu.ReactCurrentBatchConfig,yr=0,to=null,Ai=null,fo=0,xa=0,Hf=uc(0),ji=0,bg=null,Pd=0,g_=0,RP=0,Vm=null,Qo=null,DP=0,ph=1/0,Al=null,Xx=!1,K2=null,qu=null,Jy=!1,Ou=null,Yx=0,Um=0,W2=null,nx=-1,rx=0;function Uo(){return(yr&6)!==0?_i():nx!==-1?nx:nx=_i()}function Zu(e){return(e.mode&1)===0?1:(yr&2)!==0&&fo!==0?fo&-fo:yG.transition!==null?(rx===0&&(rx=uz()),rx):(e=Mr,e!==0||(e=window.event,e=e===void 0?16:gz(e.type)),e)}function Ms(e,t,n,r){if(50<Um)throw Um=0,W2=null,Error(Yt(185));Wg(e,n,r),((yr&2)===0||e!==to)&&(e===to&&((yr&2)===0&&(g_|=n),ji===4&&Ru(e,fo)),ia(e,r),n===1&&yr===0&&(t.mode&1)===0&&(ph=_i()+500,f_&&cc()))}function ia(e,t){var n=e.callbackNode;yW(e,t);var r=Ax(e,e===to?fo:0);if(r===0)n!==null&&Z3(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Z3(n),t===1)e.tag===0?vG(VM.bind(null,e)):Nz(VM.bind(null,e)),hG(function(){(yr&6)===0&&cc()}),n=null;else{switch(cz(r)){case 1:n=iP;break;case 4:n=sz;break;case 16:n=Ox;break;case 536870912:n=lz;break;default:n=Ox}n=A5(n,T5.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function T5(e,t){if(nx=-1,rx=0,(yr&6)!==0)throw Error(Yt(327));var n=e.callbackNode;if(eh()&&e.callbackNode!==n)return null;var r=Ax(e,e===to?fo:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=Qx(e,r);else{t=r;var i=yr;yr|=2;var a=I5();(to!==e||fo!==t)&&(Al=null,ph=_i()+500,vd(e,t));do try{zG();break}catch(o){k5(e,o)}while(1);vP(),Zx.current=a,yr=i,Ai!==null?t=0:(to=null,fo=0,t=ji)}if(t!==0){if(t===2&&(i=x2(e),i!==0&&(r=i,t=G2(e,i))),t===1)throw n=bg,vd(e,0),Ru(e,r),ia(e,_i()),n;if(t===6)Ru(e,r);else{if(i=e.current.alternate,(r&30)===0&&!LG(i)&&(t=Qx(e,r),t===2&&(a=x2(e),a!==0&&(r=a,t=G2(e,a))),t===1))throw n=bg,vd(e,0),Ru(e,r),ia(e,_i()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Yt(345));case 2:Xc(e,Qo,Al);break;case 3:if(Ru(e,r),(r&130023424)===r&&(t=DP+500-_i(),10<t)){if(Ax(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Uo(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=T2(Xc.bind(null,e,Qo,Al),t);break}Xc(e,Qo,Al);break;case 4:if(Ru(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-Is(r);a=1<<s,s=t[s],s>i&&(i=s),r&=~a}if(r=i,r=_i()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*NG(r/1960))-r,10<r){e.timeoutHandle=T2(Xc.bind(null,e,Qo,Al),r);break}Xc(e,Qo,Al);break;case 5:Xc(e,Qo,Al);break;default:throw Error(Yt(329))}}}return ia(e,_i()),e.callbackNode===n?T5.bind(null,e):null}function G2(e,t){var n=Vm;return e.current.memoizedState.isDehydrated&&(vd(e,t).flags|=256),e=Qx(e,t),e!==2&&(t=Qo,Qo=n,t!==null&&q2(t)),e}function q2(e){Qo===null?Qo=e:Qo.push.apply(Qo,e)}function LG(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Ds(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ru(e,t){for(t&=~RP,t&=~g_,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Is(t),r=1<<n;e[n]=-1,t&=~r}}function VM(e){if((yr&6)!==0)throw Error(Yt(327));eh();var t=Ax(e,0);if((t&1)===0)return ia(e,_i()),null;var n=Qx(e,t);if(e.tag!==0&&n===2){var r=x2(e);r!==0&&(t=r,n=G2(e,r))}if(n===1)throw n=bg,vd(e,0),Ru(e,t),ia(e,_i()),n;if(n===6)throw Error(Yt(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Xc(e,Qo,Al),ia(e,_i()),null}function OP(e,t){var n=yr;yr|=1;try{return e(t)}finally{yr=n,yr===0&&(ph=_i()+500,f_&&cc())}}function Td(e){Ou!==null&&Ou.tag===0&&(yr&6)===0&&eh();var t=yr;yr|=1;var n=rs.transition,r=Mr;try{if(rs.transition=null,Mr=1,e)return e()}finally{Mr=r,rs.transition=n,yr=t,(yr&6)===0&&cc()}}function AP(){xa=Hf.current,Jr(Hf)}function vd(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,fG(n)),Ai!==null)for(n=Ai.return;n!==null;){var r=n;switch(pP(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&$x();break;case 3:fh(),Jr(na),Jr(Po),CP();break;case 5:wP(r);break;case 4:fh();break;case 13:Jr(ui);break;case 19:Jr(ui);break;case 10:yP(r.type._context);break;case 22:case 23:AP()}n=n.return}if(to=e,Ai=e=Xu(e.current,null),fo=xa=t,ji=0,bg=null,RP=g_=Pd=0,Qo=Vm=null,ld!==null){for(t=0;t<ld.length;t++)if(n=ld[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var s=a.next;a.next=i,r.next=s}n.pending=r}ld=null}return e}function k5(e,t){do{var n=Ai;try{if(vP(),J0.current=qx,Gx){for(var r=ci.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Gx=!1}if(Ed=0,Ji=Vi=ci=null,$m=!1,vg=0,MP.current=null,n===null||n.return===null){ji=1,bg=t,Ai=null;break}e:{var a=e,s=n.return,o=n,c=t;if(t=fo,o.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var f=c,p=o,g=p.tag;if((p.mode&1)===0&&(g===0||g===11||g===15)){var v=p.alternate;v?(p.updateQueue=v.updateQueue,p.memoizedState=v.memoizedState,p.lanes=v.lanes):(p.updateQueue=null,p.memoizedState=null)}var b=kM(s);if(b!==null){b.flags&=-257,IM(b,s,o,a,t),b.mode&1&&TM(a,f,t),t=b,c=f;var _=t.updateQueue;if(_===null){var T=new Set;T.add(c),t.updateQueue=T}else _.add(c);break e}else{if((t&1)===0){TM(a,f,t),NP();break e}c=Error(Yt(426))}}else if(ii&&o.mode&1){var k=kM(s);if(k!==null){(k.flags&65536)===0&&(k.flags|=256),IM(k,s,o,a,t),mP(hh(c,o));break e}}a=c=hh(c,o),ji!==4&&(ji=2),Vm===null?Vm=[a]:Vm.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var P=d5(a,c,t);bM(a,P);break e;case 1:o=c;var M=a.type,O=a.stateNode;if((a.flags&128)===0&&(typeof M.getDerivedStateFromError=="function"||O!==null&&typeof O.componentDidCatch=="function"&&(qu===null||!qu.has(O)))){a.flags|=65536,t&=-t,a.lanes|=t;var N=f5(a,o,t);bM(a,N);break e}}a=a.return}while(a!==null)}R5(n)}catch(L){t=L,Ai===n&&n!==null&&(Ai=n=n.return);continue}break}while(1)}function I5(){var e=Zx.current;return Zx.current=qx,e===null?qx:e}function NP(){(ji===0||ji===3||ji===2)&&(ji=4),to===null||(Pd&268435455)===0&&(g_&268435455)===0||Ru(to,fo)}function Qx(e,t){var n=yr;yr|=2;var r=I5();(to!==e||fo!==t)&&(Al=null,vd(e,t));do try{FG();break}catch(i){k5(e,i)}while(1);if(vP(),yr=n,Zx.current=r,Ai!==null)throw Error(Yt(261));return to=null,fo=0,ji}function FG(){for(;Ai!==null;)M5(Ai)}function zG(){for(;Ai!==null&&!uW();)M5(Ai)}function M5(e){var t=O5(e.alternate,e,xa);e.memoizedProps=e.pendingProps,t===null?R5(e):Ai=t,MP.current=null}function R5(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=MG(n,t,xa),n!==null){Ai=n;return}}else{if(n=RG(n,t),n!==null){n.flags&=32767,Ai=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ji=6,Ai=null;return}}if(t=t.sibling,t!==null){Ai=t;return}Ai=t=e}while(t!==null);ji===0&&(ji=5)}function Xc(e,t,n){var r=Mr,i=rs.transition;try{rs.transition=null,Mr=1,$G(e,t,n,r)}finally{rs.transition=i,Mr=r}return null}function $G(e,t,n,r){do eh();while(Ou!==null);if((yr&6)!==0)throw Error(Yt(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Yt(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(xW(e,a),e===to&&(Ai=to=null,fo=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||Jy||(Jy=!0,A5(Ox,function(){return eh(),null})),a=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||a){a=rs.transition,rs.transition=null;var s=Mr;Mr=1;var o=yr;yr|=4,MP.current=null,OG(e,n),E5(n,e),oG(E2),Nx=!!S2,E2=S2=null,e.current=n,AG(n),cW(),yr=o,Mr=s,rs.transition=a}else e.current=n;if(Jy&&(Jy=!1,Ou=e,Yx=i),a=e.pendingLanes,a===0&&(qu=null),hW(n.stateNode),ia(e,_i()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Xx)throw Xx=!1,e=K2,K2=null,e;return(Yx&1)!==0&&e.tag!==0&&eh(),a=e.pendingLanes,(a&1)!==0?e===W2?Um++:(Um=0,W2=e):Um=0,cc(),null}function eh(){if(Ou!==null){var e=cz(Yx),t=rs.transition,n=Mr;try{if(rs.transition=null,Mr=16>e?16:e,Ou===null)var r=!1;else{if(e=Ou,Ou=null,Yx=0,(yr&6)!==0)throw Error(Yt(331));var i=yr;for(yr|=4,Sn=e.current;Sn!==null;){var a=Sn,s=a.child;if((Sn.flags&16)!==0){var o=a.deletions;if(o!==null){for(var c=0;c<o.length;c++){var f=o[c];for(Sn=f;Sn!==null;){var p=Sn;switch(p.tag){case 0:case 11:case 15:Bm(8,p,a)}var g=p.child;if(g!==null)g.return=p,Sn=g;else for(;Sn!==null;){p=Sn;var v=p.sibling,b=p.return;if(w5(p),p===f){Sn=null;break}if(v!==null){v.return=b,Sn=v;break}Sn=b}}}var _=a.alternate;if(_!==null){var T=_.child;if(T!==null){_.child=null;do{var k=T.sibling;T.sibling=null,T=k}while(T!==null)}}Sn=a}}if((a.subtreeFlags&2064)!==0&&s!==null)s.return=a,Sn=s;else e:for(;Sn!==null;){if(a=Sn,(a.flags&2048)!==0)switch(a.tag){case 0:case 11:case 15:Bm(9,a,a.return)}var P=a.sibling;if(P!==null){P.return=a.return,Sn=P;break e}Sn=a.return}}var M=e.current;for(Sn=M;Sn!==null;){s=Sn;var O=s.child;if((s.subtreeFlags&2064)!==0&&O!==null)O.return=s,Sn=O;else e:for(s=M;Sn!==null;){if(o=Sn,(o.flags&2048)!==0)try{switch(o.tag){case 0:case 11:case 15:m_(9,o)}}catch(L){mi(o,o.return,L)}if(o===s){Sn=null;break e}var N=o.sibling;if(N!==null){N.return=o.return,Sn=N;break e}Sn=o.return}}if(yr=i,cc(),il&&typeof il.onPostCommitFiberRoot=="function")try{il.onPostCommitFiberRoot(s_,e)}catch{}r=!0}return r}finally{Mr=n,rs.transition=t}}return!1}function UM(e,t,n){t=hh(n,t),t=d5(e,t,1),e=Gu(e,t,1),t=Uo(),e!==null&&(Wg(e,1,t),ia(e,t))}function mi(e,t,n){if(e.tag===3)UM(e,e,n);else for(;t!==null;){if(t.tag===3){UM(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(qu===null||!qu.has(r))){e=hh(n,e),e=f5(t,e,1),t=Gu(t,e,1),e=Uo(),t!==null&&(Wg(t,1,e),ia(t,e));break}}t=t.return}}function BG(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Uo(),e.pingedLanes|=e.suspendedLanes&n,to===e&&(fo&n)===n&&(ji===4||ji===3&&(fo&130023424)===fo&&500>_i()-DP?vd(e,0):RP|=n),ia(e,t)}function D5(e,t){t===0&&((e.mode&1)===0?t=1:(t=jy,jy<<=1,(jy&130023424)===0&&(jy=4194304)));var n=Uo();e=Xl(e,t),e!==null&&(Wg(e,t,n),ia(e,n))}function VG(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),D5(e,n)}function UG(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Yt(314))}r!==null&&r.delete(t),D5(e,n)}var O5;O5=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||na.current)ta=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return ta=!1,IG(e,t,n);ta=(e.flags&131072)!==0}else ta=!1,ii&&(t.flags&1048576)!==0&&Lz(t,Ux,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;tx(e,t),e=t.pendingProps;var i=uh(t,Po.current);Jf(t,n),i=EP(null,t,r,e,i,n);var a=PP();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,ra(r)?(a=!0,Bx(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,bP(t),i.updater=h_,t.stateNode=i,i._reactInternals=t,A2(t,r,e,n),t=F2(null,t,r,!0,a,n)):(t.tag=0,ii&&a&&hP(t),Bo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(tx(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=HG(r),e=Cs(r,e),i){case 0:t=L2(null,t,r,e,n);break e;case 1:t=DM(null,t,r,e,n);break e;case 11:t=MM(null,t,r,e,n);break e;case 14:t=RM(null,t,r,Cs(r.type,e),n);break e}throw Error(Yt(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Cs(r,i),L2(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Cs(r,i),DM(e,t,r,i,n);case 3:e:{if(g5(t),e===null)throw Error(Yt(387));r=t.pendingProps,a=t.memoizedState,i=a.element,Bz(e,t),Kx(t,r,null,n);var s=t.memoizedState;if(r=s.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=hh(Error(Yt(423)),t),t=OM(e,t,r,n,i);break e}else if(r!==i){i=hh(Error(Yt(424)),t),t=OM(e,t,r,n,i);break e}else for(ba=Wu(t.stateNode.containerInfo.firstChild),Ea=t,ii=!0,Ps=null,n=Hz(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ch(),r===i){t=Yl(e,t,n);break e}Bo(e,t,r,n)}t=t.child}return t;case 5:return Kz(t),e===null&&R2(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,s=i.children,P2(r,i)?s=null:a!==null&&P2(r,a)&&(t.flags|=32),m5(e,t),Bo(e,t,s,n),t.child;case 6:return e===null&&R2(t),null;case 13:return v5(e,t,n);case 4:return _P(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=dh(t,null,r,n):Bo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Cs(r,i),MM(e,t,r,i,n);case 7:return Bo(e,t,t.pendingProps,n),t.child;case 8:return Bo(e,t,t.pendingProps.children,n),t.child;case 12:return Bo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,s=i.value,Zr(jx,r._currentValue),r._currentValue=s,a!==null)if(Ds(a.value,s)){if(a.children===i.children&&!na.current){t=Yl(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var o=a.dependencies;if(o!==null){s=a.child;for(var c=o.firstContext;c!==null;){if(c.context===r){if(a.tag===1){c=Kl(-1,n&-n),c.tag=2;var f=a.updateQueue;if(f!==null){f=f.shared;var p=f.pending;p===null?c.next=c:(c.next=p.next,p.next=c),f.pending=c}}a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),D2(a.return,n,t),o.lanes|=n;break}c=c.next}}else if(a.tag===10)s=a.type===t.type?null:a.child;else if(a.tag===18){if(s=a.return,s===null)throw Error(Yt(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),D2(s,n,t),s=a.sibling}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===t){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}Bo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Jf(t,n),i=as(i),r=r(i),t.flags|=1,Bo(e,t,r,n),t.child;case 14:return r=t.type,i=Cs(r,t.pendingProps),i=Cs(r.type,i),RM(e,t,r,i,n);case 15:return h5(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Cs(r,i),tx(e,t),t.tag=1,ra(r)?(e=!0,Bx(t)):e=!1,Jf(t,n),Uz(t,r,i),A2(t,r,i,n),F2(null,t,r,!0,e,n);case 19:return y5(e,t,n);case 22:return p5(e,t,n)}throw Error(Yt(156,t.tag))};function A5(e,t){return az(e,t)}function jG(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function es(e,t,n,r){return new jG(e,t,n,r)}function LP(e){return e=e.prototype,!(!e||!e.isReactComponent)}function HG(e){if(typeof e=="function")return LP(e)?1:0;if(e!=null){if(e=e.$$typeof,e===tP)return 11;if(e===nP)return 14}return 2}function Xu(e,t){var n=e.alternate;return n===null?(n=es(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ix(e,t,n,r,i,a){var s=2;if(r=e,typeof e=="function")LP(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Af:return yd(n.children,i,a,t);case eP:s=8,i|=8;break;case i2:return e=es(12,n,t,i|2),e.elementType=i2,e.lanes=a,e;case o2:return e=es(13,n,t,i),e.elementType=o2,e.lanes=a,e;case a2:return e=es(19,n,t,i),e.elementType=a2,e.lanes=a,e;case jF:return v_(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case VF:s=10;break e;case UF:s=9;break e;case tP:s=11;break e;case nP:s=14;break e;case Tu:s=16,r=null;break e}throw Error(Yt(130,e==null?e:typeof e,""))}return t=es(s,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function yd(e,t,n,r){return e=es(7,e,r,t),e.lanes=n,e}function v_(e,t,n,r){return e=es(22,e,r,t),e.elementType=jF,e.lanes=n,e.stateNode={isHidden:!1},e}function xC(e,t,n){return e=es(6,e,null,t),e.lanes=n,e}function bC(e,t,n){return t=es(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function KG(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=eC(0),this.expirationTimes=eC(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=eC(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function FP(e,t,n,r,i,a,s,o,c){return e=new KG(e,t,n,o,c),t===1?(t=1,a===!0&&(t|=8)):t=0,a=es(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},bP(a),e}function WG(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Of,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function N5(e){if(!e)return ic;e=e._reactInternals;e:{if(zd(e)!==e||e.tag!==1)throw Error(Yt(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ra(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Yt(171))}if(e.tag===1){var n=e.type;if(ra(n))return Az(e,n,t)}return t}function L5(e,t,n,r,i,a,s,o,c){return e=FP(n,r,!0,e,i,a,s,o,c),e.context=N5(null),n=e.current,r=Uo(),i=Zu(n),a=Kl(r,i),a.callback=t!=null?t:null,Gu(n,a,i),e.current.lanes=i,Wg(e,i,r),ia(e,r),e}function y_(e,t,n,r){var i=t.current,a=Uo(),s=Zu(i);return n=N5(n),t.context===null?t.context=n:t.pendingContext=n,t=Kl(a,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Gu(i,t,s),e!==null&&(Ms(e,i,s,a),Q0(e,i,s)),s}function Jx(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 jM(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function zP(e,t){jM(e,t),(e=e.alternate)&&jM(e,t)}function GG(){return null}var F5=typeof reportError=="function"?reportError:function(e){console.error(e)};function $P(e){this._internalRoot=e}x_.prototype.render=$P.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Yt(409));y_(e,t,null,null)};x_.prototype.unmount=$P.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Td(function(){y_(null,e,null,null)}),t[Zl]=null}};function x_(e){this._internalRoot=e}x_.prototype.unstable_scheduleHydration=function(e){if(e){var t=hz();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mu.length&&t!==0&&t<Mu[n].priority;n++);Mu.splice(n,0,e),n===0&&mz(e)}};function BP(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function b_(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function HM(){}function qG(e,t,n,r,i){if(i){if(typeof r=="function"){var a=r;r=function(){var f=Jx(s);a.call(f)}}var s=L5(t,r,e,0,null,!1,!1,"",HM);return e._reactRootContainer=s,e[Zl]=s.current,fg(e.nodeType===8?e.parentNode:e),Td(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var o=r;r=function(){var f=Jx(c);o.call(f)}}var c=FP(e,0,!1,null,null,!1,!1,"",HM);return e._reactRootContainer=c,e[Zl]=c.current,fg(e.nodeType===8?e.parentNode:e),Td(function(){y_(t,c,n,r)}),c}function __(e,t,n,r,i){var a=n._reactRootContainer;if(a){var s=a;if(typeof i=="function"){var o=i;i=function(){var c=Jx(s);o.call(c)}}y_(t,s,e,i)}else s=qG(n,t,e,i,r);return Jx(s)}dz=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Cm(t.pendingLanes);n!==0&&(oP(t,n|1),ia(t,_i()),(yr&6)===0&&(ph=_i()+500,cc()))}break;case 13:Td(function(){var r=Xl(e,1);if(r!==null){var i=Uo();Ms(r,e,1,i)}}),zP(e,1)}};aP=function(e){if(e.tag===13){var t=Xl(e,134217728);if(t!==null){var n=Uo();Ms(t,e,134217728,n)}zP(e,134217728)}};fz=function(e){if(e.tag===13){var t=Zu(e),n=Xl(e,t);if(n!==null){var r=Uo();Ms(n,e,t,r)}zP(e,t)}};hz=function(){return Mr};pz=function(e,t){var n=Mr;try{return Mr=e,t()}finally{Mr=n}};g2=function(e,t,n){switch(t){case"input":if(u2(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=d_(r);if(!i)throw Error(Yt(90));KF(r),u2(r,i)}}}break;case"textarea":GF(e,n);break;case"select":t=n.value,t!=null&&Zf(e,!!n.multiple,t,!1)}};ez=OP;tz=Td;var ZG={usingClientEntryPoint:!1,Events:[qg,zf,d_,QF,JF,OP]},tm={findFiberByHostInstance:sd,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},XG={bundleType:tm.bundleType,version:tm.version,rendererPackageName:tm.rendererPackageName,rendererConfig:tm.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:eu.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=iz(e),e===null?null:e.stateNode},findFiberByHostInstance:tm.findFiberByHostInstance||GG,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 e0=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!e0.isDisabled&&e0.supportsFiber)try{s_=e0.inject(XG),il=e0}catch{}}Oa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ZG;Oa.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!BP(t))throw Error(Yt(200));return WG(e,t,null,n)};Oa.createRoot=function(e,t){if(!BP(e))throw Error(Yt(299));var n=!1,r="",i=F5;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=FP(e,1,!1,null,null,n,!1,r,i),e[Zl]=t.current,fg(e.nodeType===8?e.parentNode:e),new $P(t)};Oa.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(Yt(188)):(e=Object.keys(e).join(","),Error(Yt(268,e)));return e=iz(t),e=e===null?null:e.stateNode,e};Oa.flushSync=function(e){return Td(e)};Oa.hydrate=function(e,t,n){if(!b_(t))throw Error(Yt(200));return __(null,e,t,!0,n)};Oa.hydrateRoot=function(e,t,n){if(!BP(e))throw Error(Yt(405));var r=n!=null&&n.hydratedSources||null,i=!1,a="",s=F5;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=L5(t,null,e,1,n!=null?n:null,i,!1,a,s),e[Zl]=t.current,fg(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new x_(t)};Oa.render=function(e,t,n){if(!b_(t))throw Error(Yt(200));return __(null,e,t,!1,n)};Oa.unmountComponentAtNode=function(e){if(!b_(e))throw Error(Yt(40));return e._reactRootContainer?(Td(function(){__(null,null,e,!1,function(){e._reactRootContainer=null,e[Zl]=null})}),!0):!1};Oa.unstable_batchedUpdates=OP;Oa.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!b_(n))throw Error(Yt(200));if(e==null||e._reactInternals===void 0)throw Error(Yt(38));return __(e,t,n,!1,r)};Oa.version="18.2.0-next-9e3b772b8-20220608";(function(e){function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=Oa})(cl);const oc=WE(cl.exports),YG=IF({__proto__:null,default:oc},[cl.exports]);var KM=cl.exports;n2.createRoot=KM.createRoot,n2.hydrateRoot=KM.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 eb(){return eb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},eb.apply(this,arguments)}var Au;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Au||(Au={}));const WM="popstate";function QG(e){e===void 0&&(e={});function t(r,i){let{pathname:a,search:s,hash:o}=r.location;return Z2("",{pathname:a,search:s,hash:o},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:z5(i)}return eq(t,n,null,e)}function aa(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function JG(){return Math.random().toString(36).substr(2,8)}function GM(e,t){return{usr:e.state,key:e.key,idx:t}}function Z2(e,t,n,r){return n===void 0&&(n=null),eb({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?w_(t):t,{state:n,key:t&&t.key||r||JG()})}function z5(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function w_(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function eq(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:a=!1}=r,s=i.history,o=Au.Pop,c=null,f=p();f==null&&(f=0,s.replaceState(eb({},s.state,{idx:f}),""));function p(){return(s.state||{idx:null}).idx}function g(){o=Au.Pop;let k=p(),P=k==null?null:k-f;f=k,c&&c({action:o,location:T.location,delta:P})}function v(k,P){o=Au.Push;let M=Z2(T.location,k,P);n&&n(M,k),f=p()+1;let O=GM(M,f),N=T.createHref(M);try{s.pushState(O,"",N)}catch{i.location.assign(N)}a&&c&&c({action:o,location:T.location,delta:1})}function b(k,P){o=Au.Replace;let M=Z2(T.location,k,P);n&&n(M,k),f=p();let O=GM(M,f),N=T.createHref(M);s.replaceState(O,"",N),a&&c&&c({action:o,location:T.location,delta:0})}function _(k){let P=i.location.origin!=="null"?i.location.origin:i.location.href,M=typeof k=="string"?k:z5(k);return aa(P,"No window.location.(origin|href) available to create URL for href: "+M),new URL(M,P)}let T={get action(){return o},get location(){return e(i,s)},listen(k){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(WM,g),c=k,()=>{i.removeEventListener(WM,g),c=null}},createHref(k){return t(i,k)},createURL:_,encodeLocation(k){let P=_(k);return{pathname:P.pathname,search:P.search,hash:P.hash}},push:v,replace:b,go(k){return s.go(k)}};return T}var qM;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(qM||(qM={}));function tq(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?w_(t):t,i=V5(r.pathname||"/",n);if(i==null)return null;let a=$5(e);nq(a);let s=null;for(let o=0;s==null&&o<a.length;++o)s=dq(a[o],pq(i));return s}function $5(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(a,s,o)=>{let c={relativePath:o===void 0?a.path||"":o,caseSensitive:a.caseSensitive===!0,childrenIndex:s,route:a};c.relativePath.startsWith("/")&&(aa(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let f=th([r,c.relativePath]),p=n.concat(c);a.children&&a.children.length>0&&(aa(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+f+'".')),$5(a.children,t,p,f)),!(a.path==null&&!a.index)&&t.push({path:f,score:uq(f,a.index),routesMeta:p})};return e.forEach((a,s)=>{var o;if(a.path===""||!((o=a.path)!=null&&o.includes("?")))i(a,s);else for(let c of B5(a.path))i(a,s,c)}),t}function B5(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return i?[a,""]:[a];let s=B5(r.join("/")),o=[];return o.push(...s.map(c=>c===""?a:[a,c].join("/"))),i&&o.push(...s),o.map(c=>e.startsWith("/")&&c===""?"/":c)}function nq(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:cq(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const rq=/^:\w+$/,iq=3,oq=2,aq=1,sq=10,lq=-2,ZM=e=>e==="*";function uq(e,t){let n=e.split("/"),r=n.length;return n.some(ZM)&&(r+=lq),t&&(r+=oq),n.filter(i=>!ZM(i)).reduce((i,a)=>i+(rq.test(a)?iq:a===""?aq:sq),r)}function cq(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function dq(e,t){let{routesMeta:n}=e,r={},i="/",a=[];for(let s=0;s<n.length;++s){let o=n[s],c=s===n.length-1,f=i==="/"?t:t.slice(i.length)||"/",p=fq({path:o.relativePath,caseSensitive:o.caseSensitive,end:c},f);if(!p)return null;Object.assign(r,p.params);let g=o.route;a.push({params:r,pathname:th([i,p.pathname]),pathnameBase:gq(th([i,p.pathnameBase])),route:g}),p.pathnameBase!=="/"&&(i=th([i,p.pathnameBase]))}return a}function fq(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=hq(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],s=a.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:r.reduce((f,p,g)=>{if(p==="*"){let v=o[g]||"";s=a.slice(0,a.length-v.length).replace(/(.)\/+$/,"$1")}return f[p]=mq(o[g]||"",p),f},{}),pathname:a,pathnameBase:s,pattern:e}}function hq(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),VP(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,o)=>(r.push(o),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function pq(e){try{return decodeURI(e)}catch(t){return VP(!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 mq(e,t){try{return decodeURIComponent(e)}catch(n){return VP(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function V5(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function VP(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}const th=e=>e.join("/").replace(/\/\/+/g,"/"),gq=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");function vq(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const yq=["post","put","patch","delete"];[...yq];var C_={exports:{}},S_={};/**
* @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 xq=E.exports,bq=Symbol.for("react.element"),_q=Symbol.for("react.fragment"),wq=Object.prototype.hasOwnProperty,Cq=xq.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Sq={key:!0,ref:!0,__self:!0,__source:!0};function U5(e,t,n){var r,i={},a=null,s=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)wq.call(t,r)&&!Sq.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:bq,type:e,key:a,ref:s,props:i,_owner:Cq.current}}S_.Fragment=_q;S_.jsx=U5;S_.jsxs=U5;(function(e){e.exports=S_})(C_);const nr=C_.exports.Fragment,A=C_.exports.jsx,it=C_.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 X2(){return X2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},X2.apply(this,arguments)}function Eq(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const Pq=typeof Object.is=="function"?Object.is:Eq,{useState:Tq,useEffect:kq,useLayoutEffect:Iq,useDebugValue:Mq}=Ix;function Rq(e,t,n){const r=t(),[{inst:i},a]=Tq({inst:{value:r,getSnapshot:t}});return Iq(()=>{i.value=r,i.getSnapshot=t,_C(i)&&a({inst:i})},[e,r,t]),kq(()=>(_C(i)&&a({inst:i}),e(()=>{_C(i)&&a({inst:i})})),[e]),Mq(r),r}function _C(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!Pq(n,r)}catch{return!0}}function Dq(e,t,n){return t()}const Oq=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Aq=!Oq,Nq=Aq?Dq:Rq;"useSyncExternalStore"in Ix&&(e=>e.useSyncExternalStore)(Ix);const j5=E.exports.createContext(null),H5=E.exports.createContext(null),K5=E.exports.createContext(null),E_=E.exports.createContext(null),P_=E.exports.createContext({outlet:null,matches:[]}),W5=E.exports.createContext(null);function UP(){return E.exports.useContext(E_)!=null}function Lq(){return UP()||aa(!1),E.exports.useContext(E_).location}function Fq(e,t){UP()||aa(!1);let{navigator:n}=E.exports.useContext(K5),r=E.exports.useContext(H5),{matches:i}=E.exports.useContext(P_),a=i[i.length-1],s=a?a.params:{};a&&a.pathname;let o=a?a.pathnameBase:"/";a&&a.route;let c=Lq(),f;if(t){var p;let T=typeof t=="string"?w_(t):t;o==="/"||((p=T.pathname)==null?void 0:p.startsWith(o))||aa(!1),f=T}else f=c;let g=f.pathname||"/",v=o==="/"?g:g.slice(o.length)||"/",b=tq(e,{pathname:v}),_=Vq(b&&b.map(T=>Object.assign({},T,{params:Object.assign({},s,T.params),pathname:th([o,n.encodeLocation?n.encodeLocation(T.pathname).pathname:T.pathname]),pathnameBase:T.pathnameBase==="/"?o:th([o,n.encodeLocation?n.encodeLocation(T.pathnameBase).pathname:T.pathnameBase])})),i,r||void 0);return t&&_?A(E_.Provider,{value:{location:X2({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:Au.Pop},children:_}):_}function zq(){let e=Kq(),t=vq(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return it(nr,{children:[A("h2",{children:"Unexpected Application Error!"}),A("h3",{style:{fontStyle:"italic"},children:t}),n?A("pre",{style:{padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},children:n}):null,null]})}class $q extends E.exports.Component{constructor(t){super(t),this.state={location:t.location,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location?{error:t.error,location:t.location}:{error:t.error||n.error,location:n.location}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?A(P_.Provider,{value:this.props.routeContext,children:A(W5.Provider,{value:this.state.error,children:this.props.component})}):this.props.children}}function Bq(e){let{routeContext:t,match:n,children:r}=e,i=E.exports.useContext(j5);return i&&i.static&&i.staticContext&&n.route.errorElement&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),A(P_.Provider,{value:t,children:r})}function Vq(e,t,n){if(t===void 0&&(t=[]),e==null)if(n!=null&&n.errors)e=n.matches;else return null;let r=e,i=n==null?void 0:n.errors;if(i!=null){let a=r.findIndex(s=>s.route.id&&(i==null?void 0:i[s.route.id]));a>=0||aa(!1),r=r.slice(0,Math.min(r.length,a+1))}return r.reduceRight((a,s,o)=>{let c=s.route.id?i==null?void 0:i[s.route.id]:null,f=n?s.route.errorElement||A(zq,{}):null,p=t.concat(r.slice(0,o+1)),g=()=>A(Bq,{match:s,routeContext:{outlet:a,matches:p},children:c?f:s.route.element!==void 0?s.route.element:a});return n&&(s.route.errorElement||o===0)?A($q,{location:n.location,component:f,error:c,children:g(),routeContext:{outlet:null,matches:p}}):g()},null)}var XM;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator"})(XM||(XM={}));var tb;(function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(tb||(tb={}));function Uq(e){let t=E.exports.useContext(H5);return t||aa(!1),t}function jq(e){let t=E.exports.useContext(P_);return t||aa(!1),t}function Hq(e){let t=jq(),n=t.matches[t.matches.length-1];return n.route.id||aa(!1),n.route.id}function Kq(){var e;let t=E.exports.useContext(W5),n=Uq(tb.UseRouteError),r=Hq(tb.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function G5(e){aa(!1)}function Wq(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Au.Pop,navigator:a,static:s=!1}=e;UP()&&aa(!1);let o=t.replace(/^\/*/,"/"),c=E.exports.useMemo(()=>({basename:o,navigator:a,static:s}),[o,a,s]);typeof r=="string"&&(r=w_(r));let{pathname:f="/",search:p="",hash:g="",state:v=null,key:b="default"}=r,_=E.exports.useMemo(()=>{let T=V5(f,o);return T==null?null:{pathname:T,search:p,hash:g,state:v,key:b}},[o,f,p,g,v,b]);return _==null?null:A(K5.Provider,{value:c,children:A(E_.Provider,{children:n,value:{location:_,navigationType:i}})})}function Gq(e){let{children:t,location:n}=e,r=E.exports.useContext(j5),i=r&&!t?r.router.routes:Y2(t);return Fq(i,n)}var YM;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(YM||(YM={}));new Promise(()=>{});function Y2(e,t){t===void 0&&(t=[]);let n=[];return E.exports.Children.forEach(e,(r,i)=>{if(!E.exports.isValidElement(r))return;if(r.type===E.exports.Fragment){n.push.apply(n,Y2(r.props.children,t));return}r.type!==G5&&aa(!1),!r.props.index||!r.props.children||aa(!1);let a=[...t,i],s={id:r.props.id||a.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,hasErrorBoundary:r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle};r.props.children&&(s.children=Y2(r.props.children,a)),n.push(s)}),n}/**
* React Router DOM v6.8.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function qq(e){let{basename:t,children:n,window:r}=e,i=E.exports.useRef();i.current==null&&(i.current=QG({window:r,v5Compat:!0}));let a=i.current,[s,o]=E.exports.useState({action:a.action,location:a.location});return E.exports.useLayoutEffect(()=>a.listen(o),[a]),A(Wq,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a})}var QM;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(QM||(QM={}));var JM;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(JM||(JM={}));var Zq="Expected a function",eR=0/0,Xq="[object Symbol]",Yq=/^\s+|\s+$/g,Qq=/^[-+]0x[0-9a-f]+$/i,Jq=/^0b[01]+$/i,eZ=/^0o[0-7]+$/i,tZ=parseInt,nZ=typeof Vl=="object"&&Vl&&Vl.Object===Object&&Vl,rZ=typeof self=="object"&&self&&self.Object===Object&&self,iZ=nZ||rZ||Function("return this")(),oZ=Object.prototype,aZ=oZ.toString,sZ=Math.max,lZ=Math.min,wC=function(){return iZ.Date.now()};function uZ(e,t,n){var r,i,a,s,o,c,f=0,p=!1,g=!1,v=!0;if(typeof e!="function")throw new TypeError(Zq);t=tR(t)||0,Q2(n)&&(p=!!n.leading,g="maxWait"in n,a=g?sZ(tR(n.maxWait)||0,t):a,v="trailing"in n?!!n.trailing:v);function b($){var j=r,U=i;return r=i=void 0,f=$,s=e.apply(U,j),s}function _($){return f=$,o=setTimeout(P,t),p?b($):s}function T($){var j=$-c,U=$-f,G=t-j;return g?lZ(G,a-U):G}function k($){var j=$-c,U=$-f;return c===void 0||j>=t||j<0||g&&U>=a}function P(){var $=wC();if(k($))return M($);o=setTimeout(P,T($))}function M($){return o=void 0,v&&r?b($):(r=i=void 0,s)}function O(){o!==void 0&&clearTimeout(o),f=0,r=c=i=o=void 0}function N(){return o===void 0?s:M(wC())}function L(){var $=wC(),j=k($);if(r=arguments,i=this,c=$,j){if(o===void 0)return _(c);if(g)return o=setTimeout(P,t),b(c)}return o===void 0&&(o=setTimeout(P,t)),s}return L.cancel=O,L.flush=N,L}function Q2(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function cZ(e){return!!e&&typeof e=="object"}function dZ(e){return typeof e=="symbol"||cZ(e)&&aZ.call(e)==Xq}function tR(e){if(typeof e=="number")return e;if(dZ(e))return eR;if(Q2(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Q2(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(Yq,"");var n=Jq.test(e);return n||eZ.test(e)?tZ(e.slice(2),n?2:8):Qq.test(e)?eR:+e}var fZ=uZ,q5={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Vl,function(){var n,r,i;function a(o,c){if(!n)n=c;else if(!r)r=c;else{var f="var sharedChunk = {}; ("+n+")(sharedChunk); ("+r+")(sharedChunk);",p={};n(p),i=c(p),typeof window<"u"&&(i.workerUrl=window.URL.createObjectURL(new Blob([f],{type:"text/javascript"})))}}a(["exports"],function(o){var c=f;function f(d,l,h,y){this.cx=3*d,this.bx=3*(h-d)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*l,this.by=3*(y-l)-this.cy,this.ay=1-this.cy-this.by,this.p1x=d,this.p1y=l,this.p2x=h,this.p2y=y}function p(d,l,h,y){const C=new c(d,l,h,y);return function(I){return C.solve(I)}}f.prototype={sampleCurveX:function(d){return((this.ax*d+this.bx)*d+this.cx)*d},sampleCurveY:function(d){return((this.ay*d+this.by)*d+this.cy)*d},sampleCurveDerivativeX:function(d){return(3*this.ax*d+2*this.bx)*d+this.cx},solveCurveX:function(d,l){if(l===void 0&&(l=1e-6),d<0)return 0;if(d>1)return 1;for(var h=d,y=0;y<8;y++){var C=this.sampleCurveX(h)-d;if(Math.abs(C)<l)return h;var I=this.sampleCurveDerivativeX(h);if(Math.abs(I)<1e-6)break;h-=C/I}var D=0,z=1;for(h=d,y=0;y<20&&(C=this.sampleCurveX(h),!(Math.abs(C-d)<l));y++)d>C?D=h:z=h,h=.5*(z-D)+D;return h},solve:function(d,l){return this.sampleCurveY(this.solveCurveX(d,l))}};const g=p(.25,.1,.25,1);function v(d,l,h){return Math.min(h,Math.max(l,d))}function b(d,l,h){const y=h-l,C=((d-l)%y+y)%y+l;return C===l?h:C}function _(d,...l){for(const h of l)for(const y in h)d[y]=h[y];return d}let T=1;function k(d,l){d.forEach(h=>{l[h]&&(l[h]=l[h].bind(l))})}function P(d,l,h){const y={};for(const C in d)y[C]=l.call(h||this,d[C],C,d);return y}function M(d,l,h){const y={};for(const C in d)l.call(h||this,d[C],C,d)&&(y[C]=d[C]);return y}function O(d){return Array.isArray(d)?d.map(O):typeof d=="object"&&d?P(d,O):d}const N={};function L(d){N[d]||(typeof console<"u"&&console.warn(d),N[d]=!0)}function $(d,l,h){return(h.y-d.y)*(l.x-d.x)>(l.y-d.y)*(h.x-d.x)}function j(d){let l=0;for(let h,y,C=0,I=d.length,D=I-1;C<I;D=C++)h=d[C],y=d[D],l+=(y.x-h.x)*(h.y+y.y);return l}function U(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function G(d){const l={};if(d.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(h,y,C,I)=>{const D=C||I;return l[y]=!D||D.toLowerCase(),""}),l["max-age"]){const h=parseInt(l["max-age"],10);isNaN(h)?delete l["max-age"]:l["max-age"]=h}return l}let Z,Q,J=null;function re(d){if(J==null){const l=d.navigator?d.navigator.userAgent:null;J=!!d.safari||!(!l||!(/\b(iPad|iPhone|iPod)\b/.test(l)||l.match("Safari")&&!l.match("Chrome")))}return J}function ne(d){return typeof ImageBitmap<"u"&&d instanceof ImageBitmap}const ge={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frame(d){const l=requestAnimationFrame(d);return{cancel:()=>cancelAnimationFrame(l)}},getImageData(d,l=0){const h=window.document.createElement("canvas"),y=h.getContext("2d");if(!y)throw new Error("failed to create canvas 2d context");return h.width=d.width,h.height=d.height,y.drawImage(d,0,0,d.width,d.height),y.getImageData(-l,-l,d.width+2*l,d.height+2*l)},resolveURL:d=>(Z||(Z=document.createElement("a")),Z.href=d,Z.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(Q==null&&(Q=matchMedia("(prefers-reduced-motion: reduce)")),Q.matches)}};var ie=ue;function ue(d,l){this.x=d,this.y=l}ue.prototype={clone:function(){return new ue(this.x,this.y)},add:function(d){return this.clone()._add(d)},sub:function(d){return this.clone()._sub(d)},multByPoint:function(d){return this.clone()._multByPoint(d)},divByPoint:function(d){return this.clone()._divByPoint(d)},mult:function(d){return this.clone()._mult(d)},div:function(d){return this.clone()._div(d)},rotate:function(d){return this.clone()._rotate(d)},rotateAround:function(d,l){return this.clone()._rotateAround(d,l)},matMult:function(d){return this.clone()._matMult(d)},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(d){return this.x===d.x&&this.y===d.y},dist:function(d){return Math.sqrt(this.distSqr(d))},distSqr:function(d){var l=d.x-this.x,h=d.y-this.y;return l*l+h*h},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(d){return Math.atan2(this.y-d.y,this.x-d.x)},angleWith:function(d){return this.angleWithSep(d.x,d.y)},angleWithSep:function(d,l){return Math.atan2(this.x*l-this.y*d,this.x*d+this.y*l)},_matMult:function(d){var l=d[2]*this.x+d[3]*this.y;return this.x=d[0]*this.x+d[1]*this.y,this.y=l,this},_add:function(d){return this.x+=d.x,this.y+=d.y,this},_sub:function(d){return this.x-=d.x,this.y-=d.y,this},_mult:function(d){return this.x*=d,this.y*=d,this},_div:function(d){return this.x/=d,this.y/=d,this},_multByPoint:function(d){return this.x*=d.x,this.y*=d.y,this},_divByPoint:function(d){return this.x/=d.x,this.y/=d.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var d=this.y;return this.y=this.x,this.x=-d,this},_rotate:function(d){var l=Math.cos(d),h=Math.sin(d),y=h*this.x+l*this.y;return this.x=l*this.x-h*this.y,this.y=y,this},_rotateAround:function(d,l){var h=Math.cos(d),y=Math.sin(d),C=l.y+y*(this.x-l.x)+h*(this.y-l.y);return this.x=l.x+h*(this.x-l.x)-y*(this.y-l.y),this.y=C,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},ue.convert=function(d){return d instanceof ue?d:Array.isArray(d)?new ue(d[0],d[1]):d};const oe={MAX_PARALLEL_IMAGE_REQUESTS:16,REGISTERED_PROTOCOLS:{}},me="mapbox-tiles";let Te,we,be=500,Re=50;function Ee(){typeof caches>"u"||Te||(Te=caches.open(me))}let Me=1/0;const Ae={supported:!1,testSupport:function(d){!je&&We&&(pt?gt(d):Fe=d)}};let Fe,We,je=!1,pt=!1;function gt(d){const l=d.createTexture();d.bindTexture(d.TEXTURE_2D,l);try{if(d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,d.UNSIGNED_BYTE,We),d.isContextLost())return;Ae.supported=!0}catch{}d.deleteTexture(l),je=!0}typeof document<"u"&&(We=document.createElement("img"),We.onload=function(){Fe&&gt(Fe),Fe=null,pt=!0},We.onerror=function(){je=!0,Fe=null},We.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const Ot={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(Ot);class Ze extends Error{constructor(l,h,y,C){super(`AJAXError: ${h} (${l}): ${y}`),this.status=l,this.statusText=h,this.url=y,this.body=C}}const St=U()?()=>self.worker&&self.worker.referrer:()=>(window.location.protocol==="blob:"?window.parent:window).location.href;function ot(d,l){const h=new AbortController,y=new Request(d.url,{method:d.method||"GET",body:d.body,credentials:d.credentials,headers:d.headers,referrer:St(),signal:h.signal});let C=!1,I=!1;return d.type==="json"&&y.headers.set("Accept","application/json"),((D,z,B)=>{if(I)return;const K=Date.now();fetch(y).then(Y=>Y.ok?((te,ce,pe)=>{(d.type==="arrayBuffer"?te.arrayBuffer():d.type==="json"?te.json():te.text()).then(ve=>{I||(ce&&pe&&function(Ne,Oe,Je){if(Ee(),!Te)return;const ht={status:Oe.status,statusText:Oe.statusText,headers:new Headers};Oe.headers.forEach((lt,Dt)=>ht.headers.set(Dt,lt));const qe=G(Oe.headers.get("Cache-Control")||"");qe["no-store"]||(qe["max-age"]&&ht.headers.set("Expires",new Date(Je+1e3*qe["max-age"]).toUTCString()),new Date(ht.headers.get("Expires")).getTime()-Je<42e4||function(lt,Dt){if(we===void 0)try{new Response(new ReadableStream),we=!0}catch{we=!1}we?Dt(lt.body):lt.blob().then(Dt)}(Oe,lt=>{const Dt=new Response(lt,ht);Ee(),Te&&Te.then(Mt=>Mt.put(function(hn){const vn=hn.indexOf("?");return vn<0?hn:hn.slice(0,vn)}(Ne.url),Dt)).catch(Mt=>L(Mt.message))}))}(y,ce,pe),C=!0,l(null,ve,te.headers.get("Cache-Control"),te.headers.get("Expires")))}).catch(ve=>{I||l(new Error(ve.message))})})(Y,null,K):Y.blob().then(te=>l(new Ze(Y.status,Y.statusText,d.url,te)))).catch(Y=>{Y.code!==20&&l(new Error(Y.message))})})(),{cancel:()=>{I=!0,C||h.abort()}}}const vt=function(d,l){if(/:\/\//.test(d.url)&&!/^https?:|^file:/.test(d.url)){if(U()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",d,l);if(!U()){const y=d.url.substring(0,d.url.indexOf("://"));return(oe.REGISTERED_PROTOCOLS[y]||ot)(d,l)}}if(!(/^file:/.test(h=d.url)||/^file:/.test(St())&&!/^\w+:/.test(h))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return ot(d,l);if(U()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",d,l,void 0,!0)}var h;return function(y,C){const I=new XMLHttpRequest;I.open(y.method||"GET",y.url,!0),y.type==="arrayBuffer"&&(I.responseType="arraybuffer");for(const D in y.headers)I.setRequestHeader(D,y.headers[D]);return y.type==="json"&&(I.responseType="text",I.setRequestHeader("Accept","application/json")),I.withCredentials=y.credentials==="include",I.onerror=()=>{C(new Error(I.statusText))},I.onload=()=>{if((I.status>=200&&I.status<300||I.status===0)&&I.response!==null){let D=I.response;if(y.type==="json")try{D=JSON.parse(I.response)}catch(z){return C(z)}C(null,D,I.getResponseHeader("Cache-Control"),I.getResponseHeader("Expires"))}else{const D=new Blob([I.response],{type:I.getResponseHeader("Content-Type")});C(new Ze(I.status,I.statusText,y.url,D))}},I.send(y.body),{cancel:()=>I.abort()}}(d,l)},yt=function(d,l){return vt(_(d,{type:"arrayBuffer"}),l)};function kt(d){const l=window.document.createElement("a");return l.href=d,l.protocol===window.document.location.protocol&&l.host===window.document.location.host}const et="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let ut,at;ut=[],at=0;const Ke=function(d,l){if(Ae.supported&&(d.headers||(d.headers={}),d.headers.accept="image/webp,*/*"),at>=oe.MAX_PARALLEL_IMAGE_REQUESTS){const I={requestParameters:d,callback:l,cancelled:!1,cancel(){this.cancelled=!0}};return ut.push(I),I}at++;let h=!1;const y=()=>{if(!h)for(h=!0,at--;ut.length&&at<oe.MAX_PARALLEL_IMAGE_REQUESTS;){const I=ut.shift(),{requestParameters:D,callback:z,cancelled:B}=I;B||(I.cancel=Ke(D,z).cancel)}},C=yt(d,(I,D,z,B)=>{y(),I?l(I):D&&function(K,Y){typeof createImageBitmap=="function"?function(te,ce){const pe=new Blob([new Uint8Array(te)],{type:"image/png"});createImageBitmap(pe).then(ve=>{ce(null,ve)}).catch(ve=>{ce(new Error(`Could not load image because of ${ve.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})}(K,Y):function(te,ce){const pe=new Image;pe.onload=()=>{ce(null,pe),URL.revokeObjectURL(pe.src),pe.onload=null,window.requestAnimationFrame(()=>{pe.src=et})},pe.onerror=()=>ce(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 ve=new Blob([new Uint8Array(te)],{type:"image/png"});pe.src=te.byteLength?URL.createObjectURL(ve):et}(K,Y)}(D,(K,Y)=>{K!=null?l(K):Y!=null&&l(null,Y,{cacheControl:z,expires:B})})});return{cancel:()=>{C.cancel(),y()}}};function ct(d,l,h){h[d]&&h[d].indexOf(l)!==-1||(h[d]=h[d]||[],h[d].push(l))}function bt(d,l,h){if(h&&h[d]){const y=h[d].indexOf(l);y!==-1&&h[d].splice(y,1)}}class At{constructor(l,h={}){_(this,h),this.type=l}}class Lt extends At{constructor(l,h={}){super("error",_({error:l},h))}}class Ht{on(l,h){return this._listeners=this._listeners||{},ct(l,h,this._listeners),this}off(l,h){return bt(l,h,this._listeners),bt(l,h,this._oneTimeListeners),this}once(l,h){return this._oneTimeListeners=this._oneTimeListeners||{},ct(l,h,this._oneTimeListeners),this}fire(l,h){typeof l=="string"&&(l=new At(l,h||{}));const y=l.type;if(this.listens(y)){l.target=this;const C=this._listeners&&this._listeners[y]?this._listeners[y].slice():[];for(const z of C)z.call(this,l);const I=this._oneTimeListeners&&this._oneTimeListeners[y]?this._oneTimeListeners[y].slice():[];for(const z of I)bt(y,z,this._oneTimeListeners),z.call(this,l);const D=this._eventedParent;D&&(_(l,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),D.fire(l))}else l instanceof Lt&&console.error(l.error);return this}listens(l){return this._listeners&&this._listeners[l]&&this._listeners[l].length>0||this._oneTimeListeners&&this._oneTimeListeners[l]&&this._oneTimeListeners[l].length>0||this._eventedParent&&this._eventedParent.listens(l)}setEventedParent(l,h){return this._eventedParent=l,this._eventedParentData=h,this}}var ze={$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(l,h,y,C){this.message=(l?`${l}: `:"")+y,C&&(this.identifier=C),h!=null&&h.__line__&&(this.line=h.__line__)}}function Zt(d){const l=d.value;return l?[new Qe(d.key,l,"constants have been deprecated as of v8")]:[]}function an(d,...l){for(const h of l)for(const y in h)d[y]=h[y];return d}function Kt(d){return d instanceof Number||d instanceof String||d instanceof Boolean?d.valueOf():d}function Vt(d){if(Array.isArray(d))return d.map(Vt);if(d instanceof Object&&!(d instanceof Number||d instanceof String||d instanceof Boolean)){const l={};for(const h in d)l[h]=Vt(d[h]);return l}return Kt(d)}class It extends Error{constructor(l,h){super(h),this.message=h,this.key=l}}class Xt{constructor(l,h=[]){this.parent=l,this.bindings={};for(const[y,C]of h)this.bindings[y]=C}concat(l){return new Xt(this,l)}get(l){if(this.bindings[l])return this.bindings[l];if(this.parent)return this.parent.get(l);throw new Error(`${l} not found in scope.`)}has(l){return!!this.bindings[l]||!!this.parent&&this.parent.has(l)}}const pn={kind:"null"},tt={kind:"number"},Nt={kind:"string"},qt={kind:"boolean"},En={kind:"color"},yn={kind:"object"},Et={kind:"value"},Pn={kind:"collator"},_n={kind:"formatted"},tn={kind:"padding"},zt={kind:"resolvedImage"};function dt(d,l){return{kind:"array",itemType:d,N:l}}function mt(d){if(d.kind==="array"){const l=mt(d.itemType);return typeof d.N=="number"?`array<${l}, ${d.N}>`:d.itemType.kind==="value"?"array":`array<${l}>`}return d.kind}const $t=[pn,tt,Nt,qt,En,_n,yn,dt(Et),tn,zt];function Wt(d,l){if(l.kind==="error")return null;if(d.kind==="array"){if(l.kind==="array"&&(l.N===0&&l.itemType.kind==="value"||!Wt(d.itemType,l.itemType))&&(typeof d.N!="number"||d.N===l.N))return null}else{if(d.kind===l.kind)return null;if(d.kind==="value"){for(const h of $t)if(!Wt(h,l))return null}}return`Expected ${mt(d)} but found ${mt(l)} instead.`}function mn(d,l){return l.some(h=>h.kind===d.kind)}function An(d,l){return l.some(h=>h==="null"?d===null:h==="array"?Array.isArray(d):h==="object"?d&&!Array.isArray(d)&&typeof d=="object":h===typeof d)}var Qn,Jn={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 ye(d){return(d=Math.round(d))<0?0:d>255?255:d}function W(d){return ye(d[d.length-1]==="%"?parseFloat(d)/100*255:parseInt(d))}function X(d){return(l=d[d.length-1]==="%"?parseFloat(d)/100:parseFloat(d))<0?0:l>1?1:l;var l}function de(d,l,h){return h<0?h+=1:h>1&&(h-=1),6*h<1?d+(l-d)*h*6:2*h<1?l:3*h<2?d+(l-d)*(2/3-h)*6:d}try{Qn={}.parseCSSColor=function(d){var l,h=d.replace(/ /g,"").toLowerCase();if(h in Jn)return Jn[h].slice();if(h[0]==="#")return h.length===4?(l=parseInt(h.substr(1),16))>=0&&l<=4095?[(3840&l)>>4|(3840&l)>>8,240&l|(240&l)>>4,15&l|(15&l)<<4,1]:null:h.length===7&&(l=parseInt(h.substr(1),16))>=0&&l<=16777215?[(16711680&l)>>16,(65280&l)>>8,255&l,1]:null;var y=h.indexOf("("),C=h.indexOf(")");if(y!==-1&&C+1===h.length){var I=h.substr(0,y),D=h.substr(y+1,C-(y+1)).split(","),z=1;switch(I){case"rgba":if(D.length!==4)return null;z=X(D.pop());case"rgb":return D.length!==3?null:[W(D[0]),W(D[1]),W(D[2]),z];case"hsla":if(D.length!==4)return null;z=X(D.pop());case"hsl":if(D.length!==3)return null;var B=(parseFloat(D[0])%360+360)%360/360,K=X(D[1]),Y=X(D[2]),te=Y<=.5?Y*(K+1):Y+K-Y*K,ce=2*Y-te;return[ye(255*de(ce,te,B+1/3)),ye(255*de(ce,te,B)),ye(255*de(ce,te,B-1/3)),z];default:return null}}return null}}catch{}class le{constructor(l,h,y,C=1){this.r=l,this.g=h,this.b=y,this.a=C}static parse(l){if(!l)return;if(l instanceof le)return l;if(typeof l!="string")return;const h=Qn(l);return h?new le(h[0]/255*h[3],h[1]/255*h[3],h[2]/255*h[3],h[3]):void 0}toString(){const[l,h,y,C]=this.toArray();return`rgba(${Math.round(l)},${Math.round(h)},${Math.round(y)},${C})`}toArray(){const{r:l,g:h,b:y,a:C}=this;return C===0?[0,0,0,0]:[255*l/C,255*h/C,255*y/C,C]}}le.black=new le(0,0,0,1),le.white=new le(1,1,1,1),le.transparent=new le(0,0,0,0),le.red=new le(1,0,0,1);class xe{constructor(l,h,y){this.sensitivity=l?h?"variant":"case":h?"accent":"base",this.locale=y,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(l,h){return this.collator.compare(l,h)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Ie{constructor(l,h,y,C,I){this.text=l,this.image=h,this.scale=y,this.fontStack=C,this.textColor=I}}class Ce{constructor(l){this.sections=l}static fromString(l){return new Ce([new Ie(l,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(l=>l.text.length!==0||l.image&&l.image.name.length!==0)}static factory(l){return l instanceof Ce?l:Ce.fromString(l)}toString(){return this.sections.length===0?"":this.sections.map(l=>l.text).join("")}}class Pe{constructor(l){this.values=l.slice()}static parse(l){if(l instanceof Pe)return l;if(typeof l=="number")return new Pe([l,l,l,l]);if(Array.isArray(l)&&!(l.length<1||l.length>4)){for(const h of l)if(typeof h!="number")return;switch(l.length){case 1:l=[l[0],l[0],l[0],l[0]];break;case 2:l=[l[0],l[1],l[0],l[1]];break;case 3:l=[l[0],l[1],l[2],l[1]]}return new Pe(l)}}toString(){return JSON.stringify(this.values)}}class Le{constructor(l){this.name=l.name,this.available=l.available}toString(){return this.name}static fromString(l){return l?new Le({name:l,available:!1}):null}}function Xe(d,l,h,y){return typeof d=="number"&&d>=0&&d<=255&&typeof l=="number"&&l>=0&&l<=255&&typeof h=="number"&&h>=0&&h<=255?y===void 0||typeof y=="number"&&y>=0&&y<=1?null:`Invalid rgba value [${[d,l,h,y].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof y=="number"?[d,l,h,y]:[d,l,h]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Ye(d){if(d===null||typeof d=="string"||typeof d=="boolean"||typeof d=="number"||d instanceof le||d instanceof xe||d instanceof Ce||d instanceof Pe||d instanceof Le)return!0;if(Array.isArray(d)){for(const l of d)if(!Ye(l))return!1;return!0}if(typeof d=="object"){for(const l in d)if(!Ye(d[l]))return!1;return!0}return!1}function Ue(d){if(d===null)return pn;if(typeof d=="string")return Nt;if(typeof d=="boolean")return qt;if(typeof d=="number")return tt;if(d instanceof le)return En;if(d instanceof xe)return Pn;if(d instanceof Ce)return _n;if(d instanceof Pe)return tn;if(d instanceof Le)return zt;if(Array.isArray(d)){const l=d.length;let h;for(const y of d){const C=Ue(y);if(h){if(h===C)continue;h=Et;break}h=C}return dt(h||Et,l)}return yn}function Bt(d){const l=typeof d;return d===null?"":l==="string"||l==="number"||l==="boolean"?String(d):d instanceof le||d instanceof Ce||d instanceof Pe||d instanceof Le?d.toString():JSON.stringify(d)}class Pt{constructor(l,h){this.type=l,this.value=h}static parse(l,h){if(l.length!==2)return h.error(`'literal' expression requires exactly one argument, but found ${l.length-1} instead.`);if(!Ye(l[1]))return h.error("invalid value");const y=l[1];let C=Ue(y);const I=h.expectedType;return C.kind!=="array"||C.N!==0||!I||I.kind!=="array"||typeof I.N=="number"&&I.N!==0||(C=I),new Pt(C,y)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class nt{constructor(l){this.name="ExpressionEvaluationError",this.message=l}toJSON(){return this.message}}const Ft={string:Nt,number:tt,boolean:qt,object:yn};class Gt{constructor(l,h){this.type=l,this.args=h}static parse(l,h){if(l.length<2)return h.error("Expected at least one argument.");let y,C=1;const I=l[0];if(I==="array"){let z,B;if(l.length>2){const K=l[1];if(typeof K!="string"||!(K in Ft)||K==="object")return h.error('The item type argument of "array" must be one of string, number, boolean',1);z=Ft[K],C++}else z=Et;if(l.length>3){if(l[2]!==null&&(typeof l[2]!="number"||l[2]<0||l[2]!==Math.floor(l[2])))return h.error('The length argument to "array" must be a positive integer literal',2);B=l[2],C++}y=dt(z,B)}else{if(!Ft[I])throw new Error(`Types doesn't contain name = ${I}`);y=Ft[I]}const D=[];for(;C<l.length;C++){const z=h.parse(l[C],C,Et);if(!z)return null;D.push(z)}return new Gt(y,D)}evaluate(l){for(let h=0;h<this.args.length;h++){const y=this.args[h].evaluate(l);if(!Wt(this.type,Ue(y)))return y;if(h===this.args.length-1)throw new nt(`Expected value to be of type ${mt(this.type)}, but found ${mt(Ue(y))} instead.`)}throw new Error}eachChild(l){this.args.forEach(l)}outputDefined(){return this.args.every(l=>l.outputDefined())}}const wn={"to-boolean":qt,"to-color":En,"to-number":tt,"to-string":Nt};class dn{constructor(l,h){this.type=l,this.args=h}static parse(l,h){if(l.length<2)return h.error("Expected at least one argument.");const y=l[0];if(!wn[y])throw new Error(`Can't parse ${y} as it is not part of the known types`);if((y==="to-boolean"||y==="to-string")&&l.length!==2)return h.error("Expected one argument.");const C=wn[y],I=[];for(let D=1;D<l.length;D++){const z=h.parse(l[D],D,Et);if(!z)return null;I.push(z)}return new dn(C,I)}evaluate(l){if(this.type.kind==="boolean")return Boolean(this.args[0].evaluate(l));if(this.type.kind==="color"){let h,y;for(const C of this.args){if(h=C.evaluate(l),y=null,h instanceof le)return h;if(typeof h=="string"){const I=l.parseColor(h);if(I)return I}else if(Array.isArray(h)&&(y=h.length<3||h.length>4?`Invalid rbga value ${JSON.stringify(h)}: expected an array containing either three or four numeric values.`:Xe(h[0],h[1],h[2],h[3]),!y))return new le(h[0]/255,h[1]/255,h[2]/255,h[3])}throw new nt(y||`Could not parse color from value '${typeof h=="string"?h:JSON.stringify(h)}'`)}if(this.type.kind==="padding"){let h;for(const y of this.args){h=y.evaluate(l);const C=Pe.parse(h);if(C)return C}throw new nt(`Could not parse padding from value '${typeof h=="string"?h:JSON.stringify(h)}'`)}if(this.type.kind==="number"){let h=null;for(const y of this.args){if(h=y.evaluate(l),h===null)return 0;const C=Number(h);if(!isNaN(C))return C}throw new nt(`Could not convert ${JSON.stringify(h)} to number.`)}return this.type.kind==="formatted"?Ce.fromString(Bt(this.args[0].evaluate(l))):this.type.kind==="resolvedImage"?Le.fromString(Bt(this.args[0].evaluate(l))):Bt(this.args[0].evaluate(l))}eachChild(l){this.args.forEach(l)}outputDefined(){return this.args.every(l=>l.outputDefined())}}const Cn=["Unknown","Point","LineString","Polygon"];class jn{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"?Cn[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(l){let h=this._parseColorCache[l];return h||(h=this._parseColorCache[l]=le.parse(l)),h}}class or{constructor(l,h,y,C){this.name=l,this.type=h,this._evaluate=y,this.args=C}evaluate(l){return this._evaluate(l,this.args)}eachChild(l){this.args.forEach(l)}outputDefined(){return!1}static parse(l,h){const y=l[0],C=or.definitions[y];if(!C)return h.error(`Unknown expression "${y}". If you wanted a literal array, use ["literal", [...]].`,0);const I=Array.isArray(C)?C[0]:C.type,D=Array.isArray(C)?[[C[1],C[2]]]:C.overloads,z=D.filter(([K])=>!Array.isArray(K)||K.length===l.length-1);let B=null;for(const[K,Y]of z){B=new zs(h.registry,h.path,null,h.scope);const te=[];let ce=!1;for(let pe=1;pe<l.length;pe++){const ve=l[pe],Ne=Array.isArray(K)?K[pe-1]:K.type,Oe=B.parse(ve,1+te.length,Ne);if(!Oe){ce=!0;break}te.push(Oe)}if(!ce)if(Array.isArray(K)&&K.length!==te.length)B.error(`Expected ${K.length} arguments, but found ${te.length} instead.`);else{for(let pe=0;pe<te.length;pe++){const ve=Array.isArray(K)?K[pe]:K.type,Ne=te[pe];B.concat(pe+1).checkSubtype(ve,Ne.type)}if(B.errors.length===0)return new or(y,I,Y,te)}}if(z.length===1)h.errors.push(...B.errors);else{const K=(z.length?z:D).map(([te])=>{return ce=te,Array.isArray(ce)?`(${ce.map(mt).join(", ")})`:`(${mt(ce.type)}...)`;var ce}).join(" | "),Y=[];for(let te=1;te<l.length;te++){const ce=h.parse(l[te],1+Y.length);if(!ce)return null;Y.push(mt(ce.type))}h.error(`Expected arguments of type ${K}, but found (${Y.join(", ")}) instead.`)}return null}static register(l,h){or.definitions=h;for(const y in h)l[y]=or}}class Kr{constructor(l,h,y){this.type=Pn,this.locale=y,this.caseSensitive=l,this.diacriticSensitive=h}static parse(l,h){if(l.length!==2)return h.error("Expected one argument.");const y=l[1];if(typeof y!="object"||Array.isArray(y))return h.error("Collator options argument must be an object.");const C=h.parse(y["case-sensitive"]!==void 0&&y["case-sensitive"],1,qt);if(!C)return null;const I=h.parse(y["diacritic-sensitive"]!==void 0&&y["diacritic-sensitive"],1,qt);if(!I)return null;let D=null;return y.locale&&(D=h.parse(y.locale,1,Nt),!D)?null:new Kr(C,I,D)}evaluate(l){return new xe(this.caseSensitive.evaluate(l),this.diacriticSensitive.evaluate(l),this.locale?this.locale.evaluate(l):null)}eachChild(l){l(this.caseSensitive),l(this.diacriticSensitive),this.locale&&l(this.locale)}outputDefined(){return!1}}const dr=8192;function Lr(d,l){d[0]=Math.min(d[0],l[0]),d[1]=Math.min(d[1],l[1]),d[2]=Math.max(d[2],l[0]),d[3]=Math.max(d[3],l[1])}function Dn(d,l){return!(d[0]<=l[0]||d[2]>=l[2]||d[1]<=l[1]||d[3]>=l[3])}function Mn(d,l){const h=(180+d[0])/360,y=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+d[1]*Math.PI/360)))/360,C=Math.pow(2,l.z);return[Math.round(h*C*dr),Math.round(y*C*dr)]}function Nn(d,l,h){const y=d[0]-l[0],C=d[1]-l[1],I=d[0]-h[0],D=d[1]-h[1];return y*D-I*C==0&&y*I<=0&&C*D<=0}function ei(d,l){let h=!1;for(let D=0,z=l.length;D<z;D++){const B=l[D];for(let K=0,Y=B.length;K<Y-1;K++){if(Nn(d,B[K],B[K+1]))return!1;(C=B[K])[1]>(y=d)[1]!=(I=B[K+1])[1]>y[1]&&y[0]<(I[0]-C[0])*(y[1]-C[1])/(I[1]-C[1])+C[0]&&(h=!h)}}var y,C,I;return h}function _r(d,l){for(let h=0;h<l.length;h++)if(ei(d,l[h]))return!0;return!1}function Wn(d,l,h,y){const C=y[0]-h[0],I=y[1]-h[1],D=(d[0]-h[0])*I-C*(d[1]-h[1]),z=(l[0]-h[0])*I-C*(l[1]-h[1]);return D>0&&z<0||D<0&&z>0}function Bn(d,l,h){for(const K of h)for(let Y=0;Y<K.length-1;++Y)if((z=[(D=K[Y+1])[0]-(I=K[Y])[0],D[1]-I[1]])[0]*(B=[(C=l)[0]-(y=d)[0],C[1]-y[1]])[1]-z[1]*B[0]!=0&&Wn(y,C,I,D)&&Wn(I,D,y,C))return!0;var y,C,I,D,z,B;return!1}function rr(d,l){for(let h=0;h<d.length;++h)if(!ei(d[h],l))return!1;for(let h=0;h<d.length-1;++h)if(Bn(d[h],d[h+1],l))return!1;return!0}function Sr(d,l){for(let h=0;h<l.length;h++)if(rr(d,l[h]))return!0;return!1}function Pr(d,l,h){const y=[];for(let C=0;C<d.length;C++){const I=[];for(let D=0;D<d[C].length;D++){const z=Mn(d[C][D],h);Lr(l,z),I.push(z)}y.push(I)}return y}function Wr(d,l,h){const y=[];for(let C=0;C<d.length;C++){const I=Pr(d[C],l,h);y.push(I)}return y}function Mo(d,l,h,y){if(d[0]<h[0]||d[0]>h[2]){const C=.5*y;let I=d[0]-h[0]>C?-y:h[0]-d[0]>C?y:0;I===0&&(I=d[0]-h[2]>C?-y:h[2]-d[0]>C?y:0),d[0]+=I}Lr(l,d)}function ou(d,l,h,y){const C=Math.pow(2,y.z)*dr,I=[y.x*dr,y.y*dr],D=[];for(const z of d)for(const B of z){const K=[B.x+I[0],B.y+I[1]];Mo(K,l,h,C),D.push(K)}return D}function qd(d,l,h,y){const C=Math.pow(2,y.z)*dr,I=[y.x*dr,y.y*dr],D=[];for(const B of d){const K=[];for(const Y of B){const te=[Y.x+I[0],Y.y+I[1]];Lr(l,te),K.push(te)}D.push(K)}if(l[2]-l[0]<=C/2){(z=l)[0]=z[1]=1/0,z[2]=z[3]=-1/0;for(const B of D)for(const K of B)Mo(K,l,h,C)}var z;return D}class cs{constructor(l,h){this.type=qt,this.geojson=l,this.geometries=h}static parse(l,h){if(l.length!==2)return h.error(`'within' expression requires exactly one argument, but found ${l.length-1} instead.`);if(Ye(l[1])){const y=l[1];if(y.type==="FeatureCollection")for(let C=0;C<y.features.length;++C){const I=y.features[C].geometry.type;if(I==="Polygon"||I==="MultiPolygon")return new cs(y,y.features[C].geometry)}else if(y.type==="Feature"){const C=y.geometry.type;if(C==="Polygon"||C==="MultiPolygon")return new cs(y,y.geometry)}else if(y.type==="Polygon"||y.type==="MultiPolygon")return new cs(y,y)}return h.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(l){if(l.geometry()!=null&&l.canonicalID()!=null){if(l.geometryType()==="Point")return function(h,y){const C=[1/0,1/0,-1/0,-1/0],I=[1/0,1/0,-1/0,-1/0],D=h.canonicalID();if(y.type==="Polygon"){const z=Pr(y.coordinates,I,D),B=ou(h.geometry(),C,I,D);if(!Dn(C,I))return!1;for(const K of B)if(!ei(K,z))return!1}if(y.type==="MultiPolygon"){const z=Wr(y.coordinates,I,D),B=ou(h.geometry(),C,I,D);if(!Dn(C,I))return!1;for(const K of B)if(!_r(K,z))return!1}return!0}(l,this.geometries);if(l.geometryType()==="LineString")return function(h,y){const C=[1/0,1/0,-1/0,-1/0],I=[1/0,1/0,-1/0,-1/0],D=h.canonicalID();if(y.type==="Polygon"){const z=Pr(y.coordinates,I,D),B=qd(h.geometry(),C,I,D);if(!Dn(C,I))return!1;for(const K of B)if(!rr(K,z))return!1}if(y.type==="MultiPolygon"){const z=Wr(y.coordinates,I,D),B=qd(h.geometry(),C,I,D);if(!Dn(C,I))return!1;for(const K of B)if(!Sr(K,z))return!1}return!0}(l,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}function Vn(d){if(d instanceof or&&(d.name==="get"&&d.args.length===1||d.name==="feature-state"||d.name==="has"&&d.args.length===1||d.name==="properties"||d.name==="geometry-type"||d.name==="id"||/^filter-/.test(d.name))||d instanceof cs)return!1;let l=!0;return d.eachChild(h=>{l&&!Vn(h)&&(l=!1)}),l}function er(d){if(d instanceof or&&d.name==="feature-state")return!1;let l=!0;return d.eachChild(h=>{l&&!er(h)&&(l=!1)}),l}function Fr(d,l){if(d instanceof or&&l.indexOf(d.name)>=0)return!1;let h=!0;return d.eachChild(y=>{h&&!Fr(y,l)&&(h=!1)}),h}class zi{constructor(l,h){this.type=h.type,this.name=l,this.boundExpression=h}static parse(l,h){if(l.length!==2||typeof l[1]!="string")return h.error("'var' expression requires exactly one string literal argument.");const y=l[1];return h.scope.has(y)?new zi(y,h.scope.get(y)):h.error(`Unknown variable "${y}". Make sure "${y}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(l){return this.boundExpression.evaluate(l)}eachChild(){}outputDefined(){return!1}}class zs{constructor(l,h=[],y,C=new Xt,I=[]){this.registry=l,this.path=h,this.key=h.map(D=>`[${D}]`).join(""),this.scope=C,this.errors=I,this.expectedType=y}parse(l,h,y,C,I={}){return h?this.concat(h,y,C)._parse(l,I):this._parse(l,I)}_parse(l,h){function y(C,I,D){return D==="assert"?new Gt(I,[C]):D==="coerce"?new dn(I,[C]):C}if(l!==null&&typeof l!="string"&&typeof l!="boolean"&&typeof l!="number"||(l=["literal",l]),Array.isArray(l)){if(l.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const C=l[0];if(typeof C!="string")return this.error(`Expression name must be a string, but found ${typeof C} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const I=this.registry[C];if(I){let D=I.parse(l,this);if(!D)return null;if(this.expectedType){const z=this.expectedType,B=D.type;if(z.kind!=="string"&&z.kind!=="number"&&z.kind!=="boolean"&&z.kind!=="object"&&z.kind!=="array"||B.kind!=="value")if(z.kind!=="color"&&z.kind!=="formatted"&&z.kind!=="resolvedImage"||B.kind!=="value"&&B.kind!=="string")if(z.kind!=="padding"||B.kind!=="value"&&B.kind!=="number"&&B.kind!=="array"){if(this.checkSubtype(z,B))return null}else D=y(D,z,h.typeAnnotation||"coerce");else D=y(D,z,h.typeAnnotation||"coerce");else D=y(D,z,h.typeAnnotation||"assert")}if(!(D instanceof Pt)&&D.type.kind!=="resolvedImage"&&Ko(D)){const z=new jn;try{D=new Pt(D.type,D.evaluate(z))}catch(B){return this.error(B.message),null}}return D}return this.error(`Unknown expression "${C}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(l===void 0?"'undefined' value invalid. Use null instead.":typeof l=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof l} instead.`)}concat(l,h,y){const C=typeof l=="number"?this.path.concat(l):this.path,I=y?this.scope.concat(y):this.scope;return new zs(this.registry,C,h||null,I,this.errors)}error(l,...h){const y=`${this.key}${h.map(C=>`[${C}]`).join("")}`;this.errors.push(new It(y,l))}checkSubtype(l,h){const y=Wt(l,h);return y&&this.error(y),y}}function Ko(d){if(d instanceof zi)return Ko(d.boundExpression);if(d instanceof or&&d.name==="error"||d instanceof Kr||d instanceof cs)return!1;const l=d instanceof dn||d instanceof Gt;let h=!0;return d.eachChild(y=>{h=l?h&&Ko(y):h&&y instanceof Pt}),!!h&&Vn(d)&&Fr(d,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function ml(d,l){const h=d.length-1;let y,C,I=0,D=h,z=0;for(;I<=D;)if(z=Math.floor((I+D)/2),y=d[z],C=d[z+1],y<=l){if(z===h||l<C)return z;I=z+1}else{if(!(y>l))throw new nt("Input is not a number.");D=z-1}return 0}class ds{constructor(l,h,y){this.type=l,this.input=h,this.labels=[],this.outputs=[];for(const[C,I]of y)this.labels.push(C),this.outputs.push(I)}static parse(l,h){if(l.length-1<4)return h.error(`Expected at least 4 arguments, but found only ${l.length-1}.`);if((l.length-1)%2!=0)return h.error("Expected an even number of arguments.");const y=h.parse(l[1],1,tt);if(!y)return null;const C=[];let I=null;h.expectedType&&h.expectedType.kind!=="value"&&(I=h.expectedType);for(let D=1;D<l.length;D+=2){const z=D===1?-1/0:l[D],B=l[D+1],K=D,Y=D+1;if(typeof z!="number")return h.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',K);if(C.length&&C[C.length-1][0]>=z)return h.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',K);const te=h.parse(B,Y,I);if(!te)return null;I=I||te.type,C.push([z,te])}return new ds(I,y,C)}evaluate(l){const h=this.labels,y=this.outputs;if(h.length===1)return y[0].evaluate(l);const C=this.input.evaluate(l);if(C<=h[0])return y[0].evaluate(l);const I=h.length;return C>=h[I-1]?y[I-1].evaluate(l):y[ml(h,C)].evaluate(l)}eachChild(l){l(this.input);for(const h of this.outputs)l(h)}outputDefined(){return this.outputs.every(l=>l.outputDefined())}}function wr(d,l,h){return d*(1-h)+l*h}var fs=Object.freeze({__proto__:null,number:wr,color:function(d,l,h){return new le(wr(d.r,l.r,h),wr(d.g,l.g,h),wr(d.b,l.b,h),wr(d.a,l.a,h))},array:function(d,l,h){return d.map((y,C)=>wr(y,l[C],h))},padding:function(d,l,h){const y=d.values,C=l.values;return new Pe([wr(y[0],C[0],h),wr(y[1],C[1],h),wr(y[2],C[2],h),wr(y[3],C[3],h)])}});const Lv=.95047,Fv=1.08883,np=4/29,Zd=6/29,zv=3*Zd*Zd,W1=Math.PI/180,G1=180/Math.PI;function rp(d){return d>.008856451679035631?Math.pow(d,1/3):d/zv+np}function ip(d){return d>Zd?d*d*d:zv*(d-np)}function op(d){return 255*(d<=.0031308?12.92*d:1.055*Math.pow(d,1/2.4)-.055)}function ap(d){return(d/=255)<=.04045?d/12.92:Math.pow((d+.055)/1.055,2.4)}function fr(d){const l=ap(d.r),h=ap(d.g),y=ap(d.b),C=rp((.4124564*l+.3575761*h+.1804375*y)/Lv),I=rp((.2126729*l+.7151522*h+.072175*y)/1);return{l:116*I-16,a:500*(C-I),b:200*(I-rp((.0193339*l+.119192*h+.9503041*y)/Fv)),alpha:d.a}}function $v(d){let l=(d.l+16)/116,h=isNaN(d.a)?l:l+d.a/500,y=isNaN(d.b)?l:l-d.b/200;return l=1*ip(l),h=Lv*ip(h),y=Fv*ip(y),new le(op(3.2404542*h-1.5371385*l-.4985314*y),op(-.969266*h+1.8760108*l+.041556*y),op(.0556434*h-.2040259*l+1.0572252*y),d.alpha)}function q1(d,l,h){const y=l-d;return d+h*(y>180||y<-180?y-360*Math.round(y/360):y)}const vc={forward:fr,reverse:$v,interpolate:function(d,l,h){return{l:wr(d.l,l.l,h),a:wr(d.a,l.a,h),b:wr(d.b,l.b,h),alpha:wr(d.alpha,l.alpha,h)}}},yc={forward:function(d){const{l,a:h,b:y}=fr(d),C=Math.atan2(y,h)*G1;return{h:C<0?C+360:C,c:Math.sqrt(h*h+y*y),l,alpha:d.a}},reverse:function(d){const l=d.h*W1,h=d.c;return $v({l:d.l,a:Math.cos(l)*h,b:Math.sin(l)*h,alpha:d.alpha})},interpolate:function(d,l,h){return{h:q1(d.h,l.h,h),c:wr(d.c,l.c,h),l:wr(d.l,l.l,h),alpha:wr(d.alpha,l.alpha,h)}}};var Bv=Object.freeze({__proto__:null,lab:vc,hcl:yc});class Ro{constructor(l,h,y,C,I){this.type=l,this.operator=h,this.interpolation=y,this.input=C,this.labels=[],this.outputs=[];for(const[D,z]of I)this.labels.push(D),this.outputs.push(z)}static interpolationFactor(l,h,y,C){let I=0;if(l.name==="exponential")I=sp(h,l.base,y,C);else if(l.name==="linear")I=sp(h,1,y,C);else if(l.name==="cubic-bezier"){const D=l.controlPoints;I=new c(D[0],D[1],D[2],D[3]).solve(sp(h,1,y,C))}return I}static parse(l,h){let[y,C,I,...D]=l;if(!Array.isArray(C)||C.length===0)return h.error("Expected an interpolation type expression.",1);if(C[0]==="linear")C={name:"linear"};else if(C[0]==="exponential"){const K=C[1];if(typeof K!="number")return h.error("Exponential interpolation requires a numeric base.",1,1);C={name:"exponential",base:K}}else{if(C[0]!=="cubic-bezier")return h.error(`Unknown interpolation type ${String(C[0])}`,1,0);{const K=C.slice(1);if(K.length!==4||K.some(Y=>typeof Y!="number"||Y<0||Y>1))return h.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);C={name:"cubic-bezier",controlPoints:K}}}if(l.length-1<4)return h.error(`Expected at least 4 arguments, but found only ${l.length-1}.`);if((l.length-1)%2!=0)return h.error("Expected an even number of arguments.");if(I=h.parse(I,2,tt),!I)return null;const z=[];let B=null;y==="interpolate-hcl"||y==="interpolate-lab"?B=En:h.expectedType&&h.expectedType.kind!=="value"&&(B=h.expectedType);for(let K=0;K<D.length;K+=2){const Y=D[K],te=D[K+1],ce=K+3,pe=K+4;if(typeof Y!="number")return h.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',ce);if(z.length&&z[z.length-1][0]>=Y)return h.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',ce);const ve=h.parse(te,pe,B);if(!ve)return null;B=B||ve.type,z.push([Y,ve])}return B.kind==="number"||B.kind==="color"||B.kind==="padding"||B.kind==="array"&&B.itemType.kind==="number"&&typeof B.N=="number"?new Ro(B,y,C,I,z):h.error(`Type ${mt(B)} is not interpolatable.`)}evaluate(l){const h=this.labels,y=this.outputs;if(h.length===1)return y[0].evaluate(l);const C=this.input.evaluate(l);if(C<=h[0])return y[0].evaluate(l);const I=h.length;if(C>=h[I-1])return y[I-1].evaluate(l);const D=ml(h,C),z=Ro.interpolationFactor(this.interpolation,C,h[D],h[D+1]),B=y[D].evaluate(l),K=y[D+1].evaluate(l);return this.operator==="interpolate"?fs[this.type.kind.toLowerCase()](B,K,z):this.operator==="interpolate-hcl"?yc.reverse(yc.interpolate(yc.forward(B),yc.forward(K),z)):vc.reverse(vc.interpolate(vc.forward(B),vc.forward(K),z))}eachChild(l){l(this.input);for(const h of this.outputs)l(h)}outputDefined(){return this.outputs.every(l=>l.outputDefined())}}function sp(d,l,h,y){const C=y-h,I=d-h;return C===0?0:l===1?I/C:(Math.pow(l,I)-1)/(Math.pow(l,C)-1)}class Xd{constructor(l,h){this.type=l,this.args=h}static parse(l,h){if(l.length<2)return h.error("Expectected at least one argument.");let y=null;const C=h.expectedType;C&&C.kind!=="value"&&(y=C);const I=[];for(const z of l.slice(1)){const B=h.parse(z,1+I.length,y,void 0,{typeAnnotation:"omit"});if(!B)return null;y=y||B.type,I.push(B)}if(!y)throw new Error("No output type");const D=C&&I.some(z=>Wt(C,z.type));return new Xd(D?Et:y,I)}evaluate(l){let h,y=null,C=0;for(const I of this.args)if(C++,y=I.evaluate(l),y&&y instanceof Le&&!y.available&&(h||(h=y.name),y=null,C===this.args.length&&(y=h)),y!==null)break;return y}eachChild(l){this.args.forEach(l)}outputDefined(){return this.args.every(l=>l.outputDefined())}}class Yd{constructor(l,h){this.type=h.type,this.bindings=[].concat(l),this.result=h}evaluate(l){return this.result.evaluate(l)}eachChild(l){for(const h of this.bindings)l(h[1]);l(this.result)}static parse(l,h){if(l.length<4)return h.error(`Expected at least 3 arguments, but found ${l.length-1} instead.`);const y=[];for(let I=1;I<l.length-1;I+=2){const D=l[I];if(typeof D!="string")return h.error(`Expected string, but found ${typeof D} instead.`,I);if(/[^a-zA-Z0-9_]/.test(D))return h.error("Variable names must contain only alphanumeric characters or '_'.",I);const z=h.parse(l[I+1],I+1);if(!z)return null;y.push([D,z])}const C=h.parse(l[l.length-1],l.length-1,h.expectedType,y);return C?new Yd(y,C):null}outputDefined(){return this.result.outputDefined()}}class lp{constructor(l,h,y){this.type=l,this.index=h,this.input=y}static parse(l,h){if(l.length!==3)return h.error(`Expected 2 arguments, but found ${l.length-1} instead.`);const y=h.parse(l[1],1,tt),C=h.parse(l[2],2,dt(h.expectedType||Et));return y&&C?new lp(C.type.itemType,y,C):null}evaluate(l){const h=this.index.evaluate(l),y=this.input.evaluate(l);if(h<0)throw new nt(`Array index out of bounds: ${h} < 0.`);if(h>=y.length)throw new nt(`Array index out of bounds: ${h} > ${y.length-1}.`);if(h!==Math.floor(h))throw new nt(`Array index must be an integer, but found ${h} instead.`);return y[h]}eachChild(l){l(this.index),l(this.input)}outputDefined(){return!1}}class up{constructor(l,h){this.type=qt,this.needle=l,this.haystack=h}static parse(l,h){if(l.length!==3)return h.error(`Expected 2 arguments, but found ${l.length-1} instead.`);const y=h.parse(l[1],1,Et),C=h.parse(l[2],2,Et);return y&&C?mn(y.type,[qt,Nt,tt,pn,Et])?new up(y,C):h.error(`Expected first argument to be of type boolean, string, number or null, but found ${mt(y.type)} instead`):null}evaluate(l){const h=this.needle.evaluate(l),y=this.haystack.evaluate(l);if(!y)return!1;if(!An(h,["boolean","string","number","null"]))throw new nt(`Expected first argument to be of type boolean, string, number or null, but found ${mt(Ue(h))} instead.`);if(!An(y,["string","array"]))throw new nt(`Expected second argument to be of type array or string, but found ${mt(Ue(y))} instead.`);return y.indexOf(h)>=0}eachChild(l){l(this.needle),l(this.haystack)}outputDefined(){return!0}}class Qd{constructor(l,h,y){this.type=tt,this.needle=l,this.haystack=h,this.fromIndex=y}static parse(l,h){if(l.length<=2||l.length>=5)return h.error(`Expected 3 or 4 arguments, but found ${l.length-1} instead.`);const y=h.parse(l[1],1,Et),C=h.parse(l[2],2,Et);if(!y||!C)return null;if(!mn(y.type,[qt,Nt,tt,pn,Et]))return h.error(`Expected first argument to be of type boolean, string, number or null, but found ${mt(y.type)} instead`);if(l.length===4){const I=h.parse(l[3],3,tt);return I?new Qd(y,C,I):null}return new Qd(y,C)}evaluate(l){const h=this.needle.evaluate(l),y=this.haystack.evaluate(l);if(!An(h,["boolean","string","number","null"]))throw new nt(`Expected first argument to be of type boolean, string, number or null, but found ${mt(Ue(h))} instead.`);if(!An(y,["string","array"]))throw new nt(`Expected second argument to be of type array or string, but found ${mt(Ue(y))} instead.`);if(this.fromIndex){const C=this.fromIndex.evaluate(l);return y.indexOf(h,C)}return y.indexOf(h)}eachChild(l){l(this.needle),l(this.haystack),this.fromIndex&&l(this.fromIndex)}outputDefined(){return!1}}class cp{constructor(l,h,y,C,I,D){this.inputType=l,this.type=h,this.input=y,this.cases=C,this.outputs=I,this.otherwise=D}static parse(l,h){if(l.length<5)return h.error(`Expected at least 4 arguments, but found only ${l.length-1}.`);if(l.length%2!=1)return h.error("Expected an even number of arguments.");let y,C;h.expectedType&&h.expectedType.kind!=="value"&&(C=h.expectedType);const I={},D=[];for(let K=2;K<l.length-1;K+=2){let Y=l[K];const te=l[K+1];Array.isArray(Y)||(Y=[Y]);const ce=h.concat(K);if(Y.length===0)return ce.error("Expected at least one branch label.");for(const ve of Y){if(typeof ve!="number"&&typeof ve!="string")return ce.error("Branch labels must be numbers or strings.");if(typeof ve=="number"&&Math.abs(ve)>Number.MAX_SAFE_INTEGER)return ce.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof ve=="number"&&Math.floor(ve)!==ve)return ce.error("Numeric branch labels must be integer values.");if(y){if(ce.checkSubtype(y,Ue(ve)))return null}else y=Ue(ve);if(I[String(ve)]!==void 0)return ce.error("Branch labels must be unique.");I[String(ve)]=D.length}const pe=h.parse(te,K,C);if(!pe)return null;C=C||pe.type,D.push(pe)}const z=h.parse(l[1],1,Et);if(!z)return null;const B=h.parse(l[l.length-1],l.length-1,C);return B?z.type.kind!=="value"&&h.concat(1).checkSubtype(y,z.type)?null:new cp(y,C,z,I,D,B):null}evaluate(l){const h=this.input.evaluate(l);return(Ue(h)===this.inputType&&this.outputs[this.cases[h]]||this.otherwise).evaluate(l)}eachChild(l){l(this.input),this.outputs.forEach(l),l(this.otherwise)}outputDefined(){return this.outputs.every(l=>l.outputDefined())&&this.otherwise.outputDefined()}}class dp{constructor(l,h,y){this.type=l,this.branches=h,this.otherwise=y}static parse(l,h){if(l.length<4)return h.error(`Expected at least 3 arguments, but found only ${l.length-1}.`);if(l.length%2!=0)return h.error("Expected an odd number of arguments.");let y;h.expectedType&&h.expectedType.kind!=="value"&&(y=h.expectedType);const C=[];for(let D=1;D<l.length-1;D+=2){const z=h.parse(l[D],D,qt);if(!z)return null;const B=h.parse(l[D+1],D+1,y);if(!B)return null;C.push([z,B]),y=y||B.type}const I=h.parse(l[l.length-1],l.length-1,y);if(!I)return null;if(!y)throw new Error("Can't infer output type");return new dp(y,C,I)}evaluate(l){for(const[h,y]of this.branches)if(h.evaluate(l))return y.evaluate(l);return this.otherwise.evaluate(l)}eachChild(l){for(const[h,y]of this.branches)l(h),l(y);l(this.otherwise)}outputDefined(){return this.branches.every(([l,h])=>h.outputDefined())&&this.otherwise.outputDefined()}}class Jd{constructor(l,h,y,C){this.type=l,this.input=h,this.beginIndex=y,this.endIndex=C}static parse(l,h){if(l.length<=2||l.length>=5)return h.error(`Expected 3 or 4 arguments, but found ${l.length-1} instead.`);const y=h.parse(l[1],1,Et),C=h.parse(l[2],2,tt);if(!y||!C)return null;if(!mn(y.type,[dt(Et),Nt,Et]))return h.error(`Expected first argument to be of type array or string, but found ${mt(y.type)} instead`);if(l.length===4){const I=h.parse(l[3],3,tt);return I?new Jd(y.type,y,C,I):null}return new Jd(y.type,y,C)}evaluate(l){const h=this.input.evaluate(l),y=this.beginIndex.evaluate(l);if(!An(h,["string","array"]))throw new nt(`Expected first argument to be of type array or string, but found ${mt(Ue(h))} instead.`);if(this.endIndex){const C=this.endIndex.evaluate(l);return h.slice(y,C)}return h.slice(y)}eachChild(l){l(this.input),l(this.beginIndex),this.endIndex&&l(this.endIndex)}outputDefined(){return!1}}function Vv(d,l){return d==="=="||d==="!="?l.kind==="boolean"||l.kind==="string"||l.kind==="number"||l.kind==="null"||l.kind==="value":l.kind==="string"||l.kind==="number"||l.kind==="value"}function Uv(d,l,h,y){return y.compare(l,h)===0}function au(d,l,h){const y=d!=="=="&&d!=="!=";return class Z5{constructor(I,D,z){this.type=qt,this.lhs=I,this.rhs=D,this.collator=z,this.hasUntypedArgument=I.type.kind==="value"||D.type.kind==="value"}static parse(I,D){if(I.length!==3&&I.length!==4)return D.error("Expected two or three arguments.");const z=I[0];let B=D.parse(I[1],1,Et);if(!B)return null;if(!Vv(z,B.type))return D.concat(1).error(`"${z}" comparisons are not supported for type '${mt(B.type)}'.`);let K=D.parse(I[2],2,Et);if(!K)return null;if(!Vv(z,K.type))return D.concat(2).error(`"${z}" comparisons are not supported for type '${mt(K.type)}'.`);if(B.type.kind!==K.type.kind&&B.type.kind!=="value"&&K.type.kind!=="value")return D.error(`Cannot compare types '${mt(B.type)}' and '${mt(K.type)}'.`);y&&(B.type.kind==="value"&&K.type.kind!=="value"?B=new Gt(K.type,[B]):B.type.kind!=="value"&&K.type.kind==="value"&&(K=new Gt(B.type,[K])));let Y=null;if(I.length===4){if(B.type.kind!=="string"&&K.type.kind!=="string"&&B.type.kind!=="value"&&K.type.kind!=="value")return D.error("Cannot use collator to compare non-string types.");if(Y=D.parse(I[3],3,Pn),!Y)return null}return new Z5(B,K,Y)}evaluate(I){const D=this.lhs.evaluate(I),z=this.rhs.evaluate(I);if(y&&this.hasUntypedArgument){const B=Ue(D),K=Ue(z);if(B.kind!==K.kind||B.kind!=="string"&&B.kind!=="number")throw new nt(`Expected arguments for "${d}" to be (string, string) or (number, number), but found (${B.kind}, ${K.kind}) instead.`)}if(this.collator&&!y&&this.hasUntypedArgument){const B=Ue(D),K=Ue(z);if(B.kind!=="string"||K.kind!=="string")return l(I,D,z)}return this.collator?h(I,D,z,this.collator.evaluate(I)):l(I,D,z)}eachChild(I){I(this.lhs),I(this.rhs),this.collator&&I(this.collator)}outputDefined(){return!0}}}const Z1=au("==",function(d,l,h){return l===h},Uv),X1=au("!=",function(d,l,h){return l!==h},function(d,l,h,y){return!Uv(0,l,h,y)}),Y1=au("<",function(d,l,h){return l<h},function(d,l,h,y){return y.compare(l,h)<0}),Q1=au(">",function(d,l,h){return l>h},function(d,l,h,y){return y.compare(l,h)>0}),J1=au("<=",function(d,l,h){return l<=h},function(d,l,h,y){return y.compare(l,h)<=0}),ew=au(">=",function(d,l,h){return l>=h},function(d,l,h,y){return y.compare(l,h)>=0});class fp{constructor(l,h,y,C,I){this.type=Nt,this.number=l,this.locale=h,this.currency=y,this.minFractionDigits=C,this.maxFractionDigits=I}static parse(l,h){if(l.length!==3)return h.error("Expected two arguments.");const y=h.parse(l[1],1,tt);if(!y)return null;const C=l[2];if(typeof C!="object"||Array.isArray(C))return h.error("NumberFormat options argument must be an object.");let I=null;if(C.locale&&(I=h.parse(C.locale,1,Nt),!I))return null;let D=null;if(C.currency&&(D=h.parse(C.currency,1,Nt),!D))return null;let z=null;if(C["min-fraction-digits"]&&(z=h.parse(C["min-fraction-digits"],1,tt),!z))return null;let B=null;return C["max-fraction-digits"]&&(B=h.parse(C["max-fraction-digits"],1,tt),!B)?null:new fp(y,I,D,z,B)}evaluate(l){return new Intl.NumberFormat(this.locale?this.locale.evaluate(l):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(l):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(l):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(l):void 0}).format(this.number.evaluate(l))}eachChild(l){l(this.number),this.locale&&l(this.locale),this.currency&&l(this.currency),this.minFractionDigits&&l(this.minFractionDigits),this.maxFractionDigits&&l(this.maxFractionDigits)}outputDefined(){return!1}}class ef{constructor(l){this.type=_n,this.sections=l}static parse(l,h){if(l.length<2)return h.error("Expected at least one argument.");const y=l[1];if(!Array.isArray(y)&&typeof y=="object")return h.error("First argument must be an image or text section.");const C=[];let I=!1;for(let D=1;D<=l.length-1;++D){const z=l[D];if(I&&typeof z=="object"&&!Array.isArray(z)){I=!1;let B=null;if(z["font-scale"]&&(B=h.parse(z["font-scale"],1,tt),!B))return null;let K=null;if(z["text-font"]&&(K=h.parse(z["text-font"],1,dt(Nt)),!K))return null;let Y=null;if(z["text-color"]&&(Y=h.parse(z["text-color"],1,En),!Y))return null;const te=C[C.length-1];te.scale=B,te.font=K,te.textColor=Y}else{const B=h.parse(l[D],1,Et);if(!B)return null;const K=B.type.kind;if(K!=="string"&&K!=="value"&&K!=="null"&&K!=="resolvedImage")return h.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");I=!0,C.push({content:B,scale:null,font:null,textColor:null})}}return new ef(C)}evaluate(l){return new Ce(this.sections.map(h=>{const y=h.content.evaluate(l);return Ue(y)===zt?new Ie("",y,null,null,null):new Ie(Bt(y),null,h.scale?h.scale.evaluate(l):null,h.font?h.font.evaluate(l).join(","):null,h.textColor?h.textColor.evaluate(l):null)}))}eachChild(l){for(const h of this.sections)l(h.content),h.scale&&l(h.scale),h.font&&l(h.font),h.textColor&&l(h.textColor)}outputDefined(){return!1}}class hp{constructor(l){this.type=zt,this.input=l}static parse(l,h){if(l.length!==2)return h.error("Expected two arguments.");const y=h.parse(l[1],1,Nt);return y?new hp(y):h.error("No image name provided.")}evaluate(l){const h=this.input.evaluate(l),y=Le.fromString(h);return y&&l.availableImages&&(y.available=l.availableImages.indexOf(h)>-1),y}eachChild(l){l(this.input)}outputDefined(){return!1}}class pp{constructor(l){this.type=tt,this.input=l}static parse(l,h){if(l.length!==2)return h.error(`Expected 1 argument, but found ${l.length-1} instead.`);const y=h.parse(l[1],1);return y?y.type.kind!=="array"&&y.type.kind!=="string"&&y.type.kind!=="value"?h.error(`Expected argument of type string or array, but found ${mt(y.type)} instead.`):new pp(y):null}evaluate(l){const h=this.input.evaluate(l);if(typeof h=="string"||Array.isArray(h))return h.length;throw new nt(`Expected value to be of type string or array, but found ${mt(Ue(h))} instead.`)}eachChild(l){l(this.input)}outputDefined(){return!1}}const su={"==":Z1,"!=":X1,">":Q1,"<":Y1,">=":ew,"<=":J1,array:Gt,at:lp,boolean:Gt,case:dp,coalesce:Xd,collator:Kr,format:ef,image:hp,in:up,"index-of":Qd,interpolate:Ro,"interpolate-hcl":Ro,"interpolate-lab":Ro,length:pp,let:Yd,literal:Pt,match:cp,number:Gt,"number-format":fp,object:Gt,slice:Jd,step:ds,string:Gt,"to-boolean":dn,"to-color":dn,"to-number":dn,"to-string":dn,var:zi,within:cs};function jv(d,[l,h,y,C]){l=l.evaluate(d),h=h.evaluate(d),y=y.evaluate(d);const I=C?C.evaluate(d):1,D=Xe(l,h,y,I);if(D)throw new nt(D);return new le(l/255*I,h/255*I,y/255*I,I)}function Hv(d,l){return d in l}function tf(d,l){const h=l[d];return h===void 0?null:h}function gl(d){return{type:d}}function Kv(d){return{result:"success",value:d}}function lu(d){return{result:"error",value:d}}function Dr(d){return d["property-type"]==="data-driven"||d["property-type"]==="cross-faded-data-driven"}function Wv(d){return!!d.expression&&d.expression.parameters.indexOf("zoom")>-1}function tr(d){return!!d.expression&&d.expression.interpolated}function hr(d){return d instanceof Number?"number":d instanceof String?"string":d instanceof Boolean?"boolean":Array.isArray(d)?"array":d===null?"null":typeof d}function Tr(d){return typeof d=="object"&&d!==null&&!Array.isArray(d)}function zr(d){return d}function xc(d,l){const h=l.type==="color",y=d.stops&&typeof d.stops[0][0]=="object",C=y||!(y||d.property!==void 0),I=d.type||(tr(l)?"exponential":"interval");if(h||l.type==="padding"){const K=h?le.parse:Pe.parse;(d=an({},d)).stops&&(d.stops=d.stops.map(Y=>[Y[0],K(Y[1])])),d.default=K(d.default?d.default:l.default)}if(d.colorSpace&&d.colorSpace!=="rgb"&&!Bv[d.colorSpace])throw new Error(`Unknown color space: ${d.colorSpace}`);let D,z,B;if(I==="exponential")D=Gv;else if(I==="interval")D=nw;else if(I==="categorical"){D=tw,z=Object.create(null);for(const K of d.stops)z[K[0]]=K[1];B=typeof d.stops[0][0]}else{if(I!=="identity")throw new Error(`Unknown function type "${I}"`);D=rw}if(y){const K={},Y=[];for(let pe=0;pe<d.stops.length;pe++){const ve=d.stops[pe],Ne=ve[0].zoom;K[Ne]===void 0&&(K[Ne]={zoom:Ne,type:d.type,property:d.property,default:d.default,stops:[]},Y.push(Ne)),K[Ne].stops.push([ve[0].value,ve[1]])}const te=[];for(const pe of Y)te.push([K[pe].zoom,xc(K[pe],l)]);const ce={name:"linear"};return{kind:"composite",interpolationType:ce,interpolationFactor:Ro.interpolationFactor.bind(void 0,ce),zoomStops:te.map(pe=>pe[0]),evaluate:({zoom:pe},ve)=>Gv({stops:te,base:d.base},l,pe).evaluate(pe,ve)}}if(C){const K=I==="exponential"?{name:"exponential",base:d.base!==void 0?d.base:1}:null;return{kind:"camera",interpolationType:K,interpolationFactor:Ro.interpolationFactor.bind(void 0,K),zoomStops:d.stops.map(Y=>Y[0]),evaluate:({zoom:Y})=>D(d,l,Y,z,B)}}return{kind:"source",evaluate(K,Y){const te=Y&&Y.properties?Y.properties[d.property]:void 0;return te===void 0?uu(d.default,l.default):D(d,l,te,z,B)}}}function uu(d,l,h){return d!==void 0?d:l!==void 0?l:h!==void 0?h:void 0}function tw(d,l,h,y,C){return uu(typeof h===C?y[h]:void 0,d.default,l.default)}function nw(d,l,h){if(hr(h)!=="number")return uu(d.default,l.default);const y=d.stops.length;if(y===1||h<=d.stops[0][0])return d.stops[0][1];if(h>=d.stops[y-1][0])return d.stops[y-1][1];const C=ml(d.stops.map(I=>I[0]),h);return d.stops[C][1]}function Gv(d,l,h){const y=d.base!==void 0?d.base:1;if(hr(h)!=="number")return uu(d.default,l.default);const C=d.stops.length;if(C===1||h<=d.stops[0][0])return d.stops[0][1];if(h>=d.stops[C-1][0])return d.stops[C-1][1];const I=ml(d.stops.map(Y=>Y[0]),h),D=function(Y,te,ce,pe){const ve=pe-ce,Ne=Y-ce;return ve===0?0:te===1?Ne/ve:(Math.pow(te,Ne)-1)/(Math.pow(te,ve)-1)}(h,y,d.stops[I][0],d.stops[I+1][0]),z=d.stops[I][1],B=d.stops[I+1][1];let K=fs[l.type]||zr;if(d.colorSpace&&d.colorSpace!=="rgb"){const Y=Bv[d.colorSpace];K=(te,ce)=>Y.reverse(Y.interpolate(Y.forward(te),Y.forward(ce),D))}return typeof z.evaluate=="function"?{evaluate(...Y){const te=z.evaluate.apply(void 0,Y),ce=B.evaluate.apply(void 0,Y);if(te!==void 0&&ce!==void 0)return K(te,ce,D)}}:K(z,B,D)}function rw(d,l,h){switch(l.type){case"color":h=le.parse(h);break;case"formatted":h=Ce.fromString(h.toString());break;case"resolvedImage":h=Le.fromString(h.toString());break;case"padding":h=Pe.parse(h);break;default:hr(h)===l.type||l.type==="enum"&&l.values[h]||(h=void 0)}return uu(h,d.default,l.default)}or.register(su,{error:[{kind:"error"},[Nt],(d,[l])=>{throw new nt(l.evaluate(d))}],typeof:[Nt,[Et],(d,[l])=>mt(Ue(l.evaluate(d)))],"to-rgba":[dt(tt,4),[En],(d,[l])=>l.evaluate(d).toArray()],rgb:[En,[tt,tt,tt],jv],rgba:[En,[tt,tt,tt,tt],jv],has:{type:qt,overloads:[[[Nt],(d,[l])=>Hv(l.evaluate(d),d.properties())],[[Nt,yn],(d,[l,h])=>Hv(l.evaluate(d),h.evaluate(d))]]},get:{type:Et,overloads:[[[Nt],(d,[l])=>tf(l.evaluate(d),d.properties())],[[Nt,yn],(d,[l,h])=>tf(l.evaluate(d),h.evaluate(d))]]},"feature-state":[Et,[Nt],(d,[l])=>tf(l.evaluate(d),d.featureState||{})],properties:[yn,[],d=>d.properties()],"geometry-type":[Nt,[],d=>d.geometryType()],id:[Et,[],d=>d.id()],zoom:[tt,[],d=>d.globals.zoom],"heatmap-density":[tt,[],d=>d.globals.heatmapDensity||0],"line-progress":[tt,[],d=>d.globals.lineProgress||0],accumulated:[Et,[],d=>d.globals.accumulated===void 0?null:d.globals.accumulated],"+":[tt,gl(tt),(d,l)=>{let h=0;for(const y of l)h+=y.evaluate(d);return h}],"*":[tt,gl(tt),(d,l)=>{let h=1;for(const y of l)h*=y.evaluate(d);return h}],"-":{type:tt,overloads:[[[tt,tt],(d,[l,h])=>l.evaluate(d)-h.evaluate(d)],[[tt],(d,[l])=>-l.evaluate(d)]]},"/":[tt,[tt,tt],(d,[l,h])=>l.evaluate(d)/h.evaluate(d)],"%":[tt,[tt,tt],(d,[l,h])=>l.evaluate(d)%h.evaluate(d)],ln2:[tt,[],()=>Math.LN2],pi:[tt,[],()=>Math.PI],e:[tt,[],()=>Math.E],"^":[tt,[tt,tt],(d,[l,h])=>Math.pow(l.evaluate(d),h.evaluate(d))],sqrt:[tt,[tt],(d,[l])=>Math.sqrt(l.evaluate(d))],log10:[tt,[tt],(d,[l])=>Math.log(l.evaluate(d))/Math.LN10],ln:[tt,[tt],(d,[l])=>Math.log(l.evaluate(d))],log2:[tt,[tt],(d,[l])=>Math.log(l.evaluate(d))/Math.LN2],sin:[tt,[tt],(d,[l])=>Math.sin(l.evaluate(d))],cos:[tt,[tt],(d,[l])=>Math.cos(l.evaluate(d))],tan:[tt,[tt],(d,[l])=>Math.tan(l.evaluate(d))],asin:[tt,[tt],(d,[l])=>Math.asin(l.evaluate(d))],acos:[tt,[tt],(d,[l])=>Math.acos(l.evaluate(d))],atan:[tt,[tt],(d,[l])=>Math.atan(l.evaluate(d))],min:[tt,gl(tt),(d,l)=>Math.min(...l.map(h=>h.evaluate(d)))],max:[tt,gl(tt),(d,l)=>Math.max(...l.map(h=>h.evaluate(d)))],abs:[tt,[tt],(d,[l])=>Math.abs(l.evaluate(d))],round:[tt,[tt],(d,[l])=>{const h=l.evaluate(d);return h<0?-Math.round(-h):Math.round(h)}],floor:[tt,[tt],(d,[l])=>Math.floor(l.evaluate(d))],ceil:[tt,[tt],(d,[l])=>Math.ceil(l.evaluate(d))],"filter-==":[qt,[Nt,Et],(d,[l,h])=>d.properties()[l.value]===h.value],"filter-id-==":[qt,[Et],(d,[l])=>d.id()===l.value],"filter-type-==":[qt,[Nt],(d,[l])=>d.geometryType()===l.value],"filter-<":[qt,[Nt,Et],(d,[l,h])=>{const y=d.properties()[l.value],C=h.value;return typeof y==typeof C&&y<C}],"filter-id-<":[qt,[Et],(d,[l])=>{const h=d.id(),y=l.value;return typeof h==typeof y&&h<y}],"filter->":[qt,[Nt,Et],(d,[l,h])=>{const y=d.properties()[l.value],C=h.value;return typeof y==typeof C&&y>C}],"filter-id->":[qt,[Et],(d,[l])=>{const h=d.id(),y=l.value;return typeof h==typeof y&&h>y}],"filter-<=":[qt,[Nt,Et],(d,[l,h])=>{const y=d.properties()[l.value],C=h.value;return typeof y==typeof C&&y<=C}],"filter-id-<=":[qt,[Et],(d,[l])=>{const h=d.id(),y=l.value;return typeof h==typeof y&&h<=y}],"filter->=":[qt,[Nt,Et],(d,[l,h])=>{const y=d.properties()[l.value],C=h.value;return typeof y==typeof C&&y>=C}],"filter-id->=":[qt,[Et],(d,[l])=>{const h=d.id(),y=l.value;return typeof h==typeof y&&h>=y}],"filter-has":[qt,[Et],(d,[l])=>l.value in d.properties()],"filter-has-id":[qt,[],d=>d.id()!==null&&d.id()!==void 0],"filter-type-in":[qt,[dt(Nt)],(d,[l])=>l.value.indexOf(d.geometryType())>=0],"filter-id-in":[qt,[dt(Et)],(d,[l])=>l.value.indexOf(d.id())>=0],"filter-in-small":[qt,[Nt,dt(Et)],(d,[l,h])=>h.value.indexOf(d.properties()[l.value])>=0],"filter-in-large":[qt,[Nt,dt(Et)],(d,[l,h])=>function(y,C,I,D){for(;I<=D;){const z=I+D>>1;if(C[z]===y)return!0;C[z]>y?D=z-1:I=z+1}return!1}(d.properties()[l.value],h.value,0,h.value.length-1)],all:{type:qt,overloads:[[[qt,qt],(d,[l,h])=>l.evaluate(d)&&h.evaluate(d)],[gl(qt),(d,l)=>{for(const h of l)if(!h.evaluate(d))return!1;return!0}]]},any:{type:qt,overloads:[[[qt,qt],(d,[l,h])=>l.evaluate(d)||h.evaluate(d)],[gl(qt),(d,l)=>{for(const h of l)if(h.evaluate(d))return!0;return!1}]]},"!":[qt,[qt],(d,[l])=>!l.evaluate(d)],"is-supported-script":[qt,[Nt],(d,[l])=>{const h=d.globals&&d.globals.isSupportedScript;return!h||h(l.evaluate(d))}],upcase:[Nt,[Nt],(d,[l])=>l.evaluate(d).toUpperCase()],downcase:[Nt,[Nt],(d,[l])=>l.evaluate(d).toLowerCase()],concat:[Nt,gl(Et),(d,l)=>l.map(h=>Bt(h.evaluate(d))).join("")],"resolved-locale":[Nt,[Pn],(d,[l])=>l.evaluate(d).resolvedLocale()]});class nf{constructor(l,h){this.expression=l,this._warningHistory={},this._evaluator=new jn,this._defaultValue=h?function(y){return y.type==="color"&&Tr(y.default)?new le(0,0,0,0):y.type==="color"?le.parse(y.default)||null:y.type==="padding"?Pe.parse(y.default)||null:y.default===void 0?null:y.default}(h):null,this._enumValues=h&&h.type==="enum"?h.values:null}evaluateWithoutErrorHandling(l,h,y,C,I,D){return this._evaluator.globals=l,this._evaluator.feature=h,this._evaluator.featureState=y,this._evaluator.canonical=C,this._evaluator.availableImages=I||null,this._evaluator.formattedSection=D,this.expression.evaluate(this._evaluator)}evaluate(l,h,y,C,I,D){this._evaluator.globals=l,this._evaluator.feature=h||null,this._evaluator.featureState=y||null,this._evaluator.canonical=C,this._evaluator.availableImages=I||null,this._evaluator.formattedSection=D||null;try{const z=this.expression.evaluate(this._evaluator);if(z==null||typeof z=="number"&&z!=z)return this._defaultValue;if(this._enumValues&&!(z in this._enumValues))throw new nt(`Expected value to be one of ${Object.keys(this._enumValues).map(B=>JSON.stringify(B)).join(", ")}, but found ${JSON.stringify(z)} instead.`);return z}catch(z){return this._warningHistory[z.message]||(this._warningHistory[z.message]=!0,typeof console<"u"&&console.warn(z.message)),this._defaultValue}}}function bc(d){return Array.isArray(d)&&d.length>0&&typeof d[0]=="string"&&d[0]in su}function _c(d,l){const h=new zs(su,[],l?function(C){const I={color:En,string:Nt,number:tt,enum:Nt,boolean:qt,formatted:_n,padding:tn,resolvedImage:zt};return C.type==="array"?dt(I[C.value]||Et,C.length):I[C.type]}(l):void 0),y=h.parse(d,void 0,void 0,void 0,l&&l.type==="string"?{typeAnnotation:"coerce"}:void 0);return y?Kv(new nf(y,l)):lu(h.errors)}class wc{constructor(l,h){this.kind=l,this._styleExpression=h,this.isStateDependent=l!=="constant"&&!er(h.expression)}evaluateWithoutErrorHandling(l,h,y,C,I,D){return this._styleExpression.evaluateWithoutErrorHandling(l,h,y,C,I,D)}evaluate(l,h,y,C,I,D){return this._styleExpression.evaluate(l,h,y,C,I,D)}}class mp{constructor(l,h,y,C){this.kind=l,this.zoomStops=y,this._styleExpression=h,this.isStateDependent=l!=="camera"&&!er(h.expression),this.interpolationType=C}evaluateWithoutErrorHandling(l,h,y,C,I,D){return this._styleExpression.evaluateWithoutErrorHandling(l,h,y,C,I,D)}evaluate(l,h,y,C,I,D){return this._styleExpression.evaluate(l,h,y,C,I,D)}interpolationFactor(l,h,y){return this.interpolationType?Ro.interpolationFactor(this.interpolationType,l,h,y):0}}function qv(d,l){const h=_c(d,l);if(h.result==="error")return h;const y=h.value.expression,C=Vn(y);if(!C&&!Dr(l))return lu([new It("","data expressions not supported")]);const I=Fr(y,["zoom"]);if(!I&&!Wv(l))return lu([new It("","zoom expressions not supported")]);const D=of(y);return D||I?D instanceof It?lu([D]):D instanceof Ro&&!tr(l)?lu([new It("",'"interpolate" expressions cannot be used with this property')]):Kv(D?new mp(C?"camera":"composite",h.value,D.labels,D instanceof Ro?D.interpolation:void 0):new wc(C?"constant":"source",h.value)):lu([new It("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class rf{constructor(l,h){this._parameters=l,this._specification=h,an(this,xc(this._parameters,this._specification))}static deserialize(l){return new rf(l._parameters,l._specification)}static serialize(l){return{_parameters:l._parameters,_specification:l._specification}}}function of(d){let l=null;if(d instanceof Yd)l=of(d.result);else if(d instanceof Xd){for(const h of d.args)if(l=of(h),l)break}else(d instanceof ds||d instanceof Ro)&&d.input instanceof or&&d.input.name==="zoom"&&(l=d);return l instanceof It||d.eachChild(h=>{const y=of(h);y instanceof It?l=y:!l&&y?l=new It("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):l&&y&&l!==y&&(l=new It("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),l}function ua(d){const l=d.key,h=d.value,y=d.valueSpec||{},C=d.objectElementValidators||{},I=d.style,D=d.styleSpec;let z=[];const B=hr(h);if(B!=="object")return[new Qe(l,h,`object expected, ${B} found`)];for(const K in h){const Y=K.split(".")[0],te=y[Y]||y["*"];let ce;if(C[Y])ce=C[Y];else if(y[Y])ce=Oo;else if(C["*"])ce=C["*"];else{if(!y["*"]){z.push(new Qe(l,h[K],`unknown property "${K}"`));continue}ce=Oo}z=z.concat(ce({key:(l&&`${l}.`)+K,value:h[K],valueSpec:te,style:I,styleSpec:D,object:h,objectKey:K},h))}for(const K in y)C[K]||y[K].required&&y[K].default===void 0&&h[K]===void 0&&z.push(new Qe(l,h,`missing required property "${K}"`));return z}function Zv(d){const l=d.value,h=d.valueSpec,y=d.style,C=d.styleSpec,I=d.key,D=d.arrayElementValidator||Oo;if(hr(l)!=="array")return[new Qe(I,l,`array expected, ${hr(l)} found`)];if(h.length&&l.length!==h.length)return[new Qe(I,l,`array length ${h.length} expected, length ${l.length} found`)];if(h["min-length"]&&l.length<h["min-length"])return[new Qe(I,l,`array length at least ${h["min-length"]} expected, length ${l.length} found`)];let z={type:h.value,values:h.values};C.$version<7&&(z.function=h.function),hr(h.value)==="object"&&(z=h.value);let B=[];for(let K=0;K<l.length;K++)B=B.concat(D({array:l,arrayIndex:K,value:l[K],valueSpec:z,style:y,styleSpec:C,key:`${I}[${K}]`}));return B}function gp(d){const l=d.key,h=d.value,y=d.valueSpec;let C=hr(h);return C==="number"&&h!=h&&(C="NaN"),C!=="number"?[new Qe(l,h,`number expected, ${C} found`)]:"minimum"in y&&h<y.minimum?[new Qe(l,h,`${h} is less than the minimum value ${y.minimum}`)]:"maximum"in y&&h>y.maximum?[new Qe(l,h,`${h} is greater than the maximum value ${y.maximum}`)]:[]}function Xv(d){const l=d.valueSpec,h=Kt(d.value.type);let y,C,I,D={};const z=h!=="categorical"&&d.value.property===void 0,B=!z,K=hr(d.value.stops)==="array"&&hr(d.value.stops[0])==="array"&&hr(d.value.stops[0][0])==="object",Y=ua({key:d.key,value:d.value,valueSpec:d.styleSpec.function,style:d.style,styleSpec:d.styleSpec,objectElementValidators:{stops:function(pe){if(h==="identity")return[new Qe(pe.key,pe.value,'identity function may not have a "stops" property')];let ve=[];const Ne=pe.value;return ve=ve.concat(Zv({key:pe.key,value:Ne,valueSpec:pe.valueSpec,style:pe.style,styleSpec:pe.styleSpec,arrayElementValidator:te})),hr(Ne)==="array"&&Ne.length===0&&ve.push(new Qe(pe.key,Ne,"array must have at least one stop")),ve},default:function(pe){return Oo({key:pe.key,value:pe.value,valueSpec:l,style:pe.style,styleSpec:pe.styleSpec})}}});return h==="identity"&&z&&Y.push(new Qe(d.key,d.value,'missing required property "property"')),h==="identity"||d.value.stops||Y.push(new Qe(d.key,d.value,'missing required property "stops"')),h==="exponential"&&d.valueSpec.expression&&!tr(d.valueSpec)&&Y.push(new Qe(d.key,d.value,"exponential functions not supported")),d.styleSpec.$version>=8&&(B&&!Dr(d.valueSpec)?Y.push(new Qe(d.key,d.value,"property functions not supported")):z&&!Wv(d.valueSpec)&&Y.push(new Qe(d.key,d.value,"zoom functions not supported"))),h!=="categorical"&&!K||d.value.property!==void 0||Y.push(new Qe(d.key,d.value,'"property" property is required')),Y;function te(pe){let ve=[];const Ne=pe.value,Oe=pe.key;if(hr(Ne)!=="array")return[new Qe(Oe,Ne,`array expected, ${hr(Ne)} found`)];if(Ne.length!==2)return[new Qe(Oe,Ne,`array length 2 expected, length ${Ne.length} found`)];if(K){if(hr(Ne[0])!=="object")return[new Qe(Oe,Ne,`object expected, ${hr(Ne[0])} found`)];if(Ne[0].zoom===void 0)return[new Qe(Oe,Ne,"object stop key must have zoom")];if(Ne[0].value===void 0)return[new Qe(Oe,Ne,"object stop key must have value")];if(I&&I>Kt(Ne[0].zoom))return[new Qe(Oe,Ne[0].zoom,"stop zoom values must appear in ascending order")];Kt(Ne[0].zoom)!==I&&(I=Kt(Ne[0].zoom),C=void 0,D={}),ve=ve.concat(ua({key:`${Oe}[0]`,value:Ne[0],valueSpec:{zoom:{}},style:pe.style,styleSpec:pe.styleSpec,objectElementValidators:{zoom:gp,value:ce}}))}else ve=ve.concat(ce({key:`${Oe}[0]`,value:Ne[0],valueSpec:{},style:pe.style,styleSpec:pe.styleSpec},Ne));return bc(Vt(Ne[1]))?ve.concat([new Qe(`${Oe}[1]`,Ne[1],"expressions are not allowed in function stops.")]):ve.concat(Oo({key:`${Oe}[1]`,value:Ne[1],valueSpec:l,style:pe.style,styleSpec:pe.styleSpec}))}function ce(pe,ve){const Ne=hr(pe.value),Oe=Kt(pe.value),Je=pe.value!==null?pe.value:ve;if(y){if(Ne!==y)return[new Qe(pe.key,Je,`${Ne} stop domain type must match previous stop domain type ${y}`)]}else y=Ne;if(Ne!=="number"&&Ne!=="string"&&Ne!=="boolean")return[new Qe(pe.key,Je,"stop domain value must be a number, string, or boolean")];if(Ne!=="number"&&h!=="categorical"){let ht=`number expected, ${Ne} found`;return Dr(l)&&h===void 0&&(ht+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Qe(pe.key,Je,ht)]}return h!=="categorical"||Ne!=="number"||isFinite(Oe)&&Math.floor(Oe)===Oe?h!=="categorical"&&Ne==="number"&&C!==void 0&&Oe<C?[new Qe(pe.key,Je,"stop domain values must appear in ascending order")]:(C=Oe,h==="categorical"&&Oe in D?[new Qe(pe.key,Je,"stop domain values must be unique")]:(D[Oe]=!0,[])):[new Qe(pe.key,Je,`integer expected, found ${Oe}`)]}}function vl(d){const l=(d.expressionContext==="property"?qv:_c)(Vt(d.value),d.valueSpec);if(l.result==="error")return l.value.map(y=>new Qe(`${d.key}${y.key}`,d.value,y.message));const h=l.value.expression||l.value._styleExpression.expression;if(d.expressionContext==="property"&&d.propertyKey==="text-font"&&!h.outputDefined())return[new Qe(d.key,d.value,`Invalid data expression for "${d.propertyKey}". Output values must be contained as literals within the expression.`)];if(d.expressionContext==="property"&&d.propertyType==="layout"&&!er(h))return[new Qe(d.key,d.value,'"feature-state" data expressions are not supported with layout properties.')];if(d.expressionContext==="filter"&&!er(h))return[new Qe(d.key,d.value,'"feature-state" data expressions are not supported with filters.')];if(d.expressionContext&&d.expressionContext.indexOf("cluster")===0){if(!Fr(h,["zoom","feature-state"]))return[new Qe(d.key,d.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(d.expressionContext==="cluster-initial"&&!Vn(h))return[new Qe(d.key,d.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Cc(d){const l=d.key,h=d.value,y=d.valueSpec,C=[];return Array.isArray(y.values)?y.values.indexOf(Kt(h))===-1&&C.push(new Qe(l,h,`expected one of [${y.values.join(", ")}], ${JSON.stringify(h)} found`)):Object.keys(y.values).indexOf(Kt(h))===-1&&C.push(new Qe(l,h,`expected one of [${Object.keys(y.values).join(", ")}], ${JSON.stringify(h)} found`)),C}function cu(d){if(d===!0||d===!1)return!0;if(!Array.isArray(d)||d.length===0)return!1;switch(d[0]){case"has":return d.length>=2&&d[1]!=="$id"&&d[1]!=="$type";case"in":return d.length>=3&&(typeof d[1]!="string"||Array.isArray(d[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return d.length!==3||Array.isArray(d[1])||Array.isArray(d[2]);case"any":case"all":for(const l of d.slice(1))if(!cu(l)&&typeof l!="boolean")return!1;return!0;default:return!0}}const iw={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function af(d){if(d==null)return{filter:()=>!0,needGeometry:!1};cu(d)||(d=Sc(d));const l=_c(d,iw);if(l.result==="error")throw new Error(l.value.map(h=>`${h.key}: ${h.message}`).join(", "));return{filter:(h,y,C)=>l.value.evaluate(h,y,{},C),needGeometry:Qv(d)}}function Yv(d,l){return d<l?-1:d>l?1:0}function Qv(d){if(!Array.isArray(d))return!1;if(d[0]==="within")return!0;for(let l=1;l<d.length;l++)if(Qv(d[l]))return!0;return!1}function Sc(d){if(!d)return!0;const l=d[0];return d.length<=1?l!=="any":l==="=="?vp(d[1],d[2],"=="):l==="!="?du(vp(d[1],d[2],"==")):l==="<"||l===">"||l==="<="||l===">="?vp(d[1],d[2],l):l==="any"?(h=d.slice(1),["any"].concat(h.map(Sc))):l==="all"?["all"].concat(d.slice(1).map(Sc)):l==="none"?["all"].concat(d.slice(1).map(Sc).map(du)):l==="in"?sf(d[1],d.slice(2)):l==="!in"?du(sf(d[1],d.slice(2))):l==="has"?Ec(d[1]):l==="!has"?du(Ec(d[1])):l!=="within"||d;var h}function vp(d,l,h){switch(d){case"$type":return[`filter-type-${h}`,l];case"$id":return[`filter-id-${h}`,l];default:return[`filter-${h}`,d,l]}}function sf(d,l){if(l.length===0)return!1;switch(d){case"$type":return["filter-type-in",["literal",l]];case"$id":return["filter-id-in",["literal",l]];default:return l.length>200&&!l.some(h=>typeof h!=typeof l[0])?["filter-in-large",d,["literal",l.sort(Yv)]]:["filter-in-small",d,["literal",l]]}}function Ec(d){switch(d){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",d]}}function du(d){return["!",d]}function Pc(d){return cu(Vt(d.value))?vl(an({},d,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Jv(d)}function Jv(d){const l=d.value,h=d.key;if(hr(l)!=="array")return[new Qe(h,l,`array expected, ${hr(l)} found`)];const y=d.styleSpec;let C,I=[];if(l.length<1)return[new Qe(h,l,"filter array must have at least 1 element")];switch(I=I.concat(Cc({key:`${h}[0]`,value:l[0],valueSpec:y.filter_operator,style:d.style,styleSpec:d.styleSpec})),Kt(l[0])){case"<":case"<=":case">":case">=":l.length>=2&&Kt(l[1])==="$type"&&I.push(new Qe(h,l,`"$type" cannot be use with operator "${l[0]}"`));case"==":case"!=":l.length!==3&&I.push(new Qe(h,l,`filter array for operator "${l[0]}" must have 3 elements`));case"in":case"!in":l.length>=2&&(C=hr(l[1]),C!=="string"&&I.push(new Qe(`${h}[1]`,l[1],`string expected, ${C} found`)));for(let D=2;D<l.length;D++)C=hr(l[D]),Kt(l[1])==="$type"?I=I.concat(Cc({key:`${h}[${D}]`,value:l[D],valueSpec:y.geometry_type,style:d.style,styleSpec:d.styleSpec})):C!=="string"&&C!=="number"&&C!=="boolean"&&I.push(new Qe(`${h}[${D}]`,l[D],`string, number, or boolean expected, ${C} found`));break;case"any":case"all":case"none":for(let D=1;D<l.length;D++)I=I.concat(Jv({key:`${h}[${D}]`,value:l[D],style:d.style,styleSpec:d.styleSpec}));break;case"has":case"!has":C=hr(l[1]),l.length!==2?I.push(new Qe(h,l,`filter array for "${l[0]}" operator must have 2 elements`)):C!=="string"&&I.push(new Qe(`${h}[1]`,l[1],`string expected, ${C} found`));break;case"within":C=hr(l[1]),l.length!==2?I.push(new Qe(h,l,`filter array for "${l[0]}" operator must have 2 elements`)):C!=="object"&&I.push(new Qe(`${h}[1]`,l[1],`object expected, ${C} found`))}return I}function Tc(d,l){const h=d.key,y=d.style,C=d.styleSpec,I=d.value,D=d.objectKey,z=C[`${l}_${d.layerType}`];if(!z)return[];const B=D.match(/^(.*)-transition$/);if(l==="paint"&&B&&z[B[1]]&&z[B[1]].transition)return Oo({key:h,value:I,valueSpec:C.transition,style:y,styleSpec:C});const K=d.valueSpec||z[D];if(!K)return[new Qe(h,I,`unknown property "${D}"`)];let Y;if(hr(I)==="string"&&Dr(K)&&!K.tokens&&(Y=/^{([^}]+)}$/.exec(I)))return[new Qe(h,I,`"${D}" does not support interpolation syntax
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(Y[1])} }\`.`)];const te=[];return d.layerType==="symbol"&&(D==="text-field"&&y&&!y.glyphs&&te.push(new Qe(h,I,'use of "text-field" requires a style "glyphs" property')),D==="text-font"&&Tr(Vt(I))&&Kt(I.type)==="identity"&&te.push(new Qe(h,I,'"text-font" does not support identity functions'))),te.concat(Oo({key:d.key,value:I,valueSpec:K,style:y,styleSpec:C,expressionContext:"property",propertyType:l,propertyKey:D}))}function ey(d){return Tc(d,"paint")}function ty(d){return Tc(d,"layout")}function ny(d){let l=[];const h=d.value,y=d.key,C=d.style,I=d.styleSpec;h.type||h.ref||l.push(new Qe(y,h,'either "type" or "ref" is required'));let D=Kt(h.type);const z=Kt(h.ref);if(h.id){const B=Kt(h.id);for(let K=0;K<d.arrayIndex;K++){const Y=C.layers[K];Kt(Y.id)===B&&l.push(new Qe(y,h.id,`duplicate layer id "${h.id}", previously used at line ${Y.id.__line__}`))}}if("ref"in h){let B;["type","source","source-layer","filter","layout"].forEach(K=>{K in h&&l.push(new Qe(y,h[K],`"${K}" is prohibited for ref layers`))}),C.layers.forEach(K=>{Kt(K.id)===z&&(B=K)}),B?B.ref?l.push(new Qe(y,h.ref,"ref cannot reference another ref layer")):D=Kt(B.type):l.push(new Qe(y,h.ref,`ref layer "${z}" not found`))}else if(D!=="background")if(h.source){const B=C.sources&&C.sources[h.source],K=B&&Kt(B.type);B?K==="vector"&&D==="raster"?l.push(new Qe(y,h.source,`layer "${h.id}" requires a raster source`)):K==="raster"&&D!=="raster"?l.push(new Qe(y,h.source,`layer "${h.id}" requires a vector source`)):K!=="vector"||h["source-layer"]?K==="raster-dem"&&D!=="hillshade"?l.push(new Qe(y,h.source,"raster-dem source can only be used with layer type 'hillshade'.")):D!=="line"||!h.paint||!h.paint["line-gradient"]||K==="geojson"&&B.lineMetrics||l.push(new Qe(y,h,`layer "${h.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):l.push(new Qe(y,h,`layer "${h.id}" must specify a "source-layer"`)):l.push(new Qe(y,h.source,`source "${h.source}" not found`))}else l.push(new Qe(y,h,'missing required property "source"'));return l=l.concat(ua({key:y,value:h,valueSpec:I.layer,style:d.style,styleSpec:d.styleSpec,objectElementValidators:{"*":()=>[],type:()=>Oo({key:`${y}.type`,value:h.type,valueSpec:I.layer.type,style:d.style,styleSpec:d.styleSpec,object:h,objectKey:"type"}),filter:Pc,layout:B=>ua({layer:h,key:B.key,value:B.value,style:B.style,styleSpec:B.styleSpec,objectElementValidators:{"*":K=>ty(an({layerType:D},K))}}),paint:B=>ua({layer:h,key:B.key,value:B.value,style:B.style,styleSpec:B.styleSpec,objectElementValidators:{"*":K=>ey(an({layerType:D},K))}})}})),l}function fu(d){const l=d.value,h=d.key,y=hr(l);return y!=="string"?[new Qe(h,l,`string expected, ${y} found`)]:[]}const ry={promoteId:function({key:d,value:l}){if(hr(l)==="string")return fu({key:d,value:l});{const h=[];for(const y in l)h.push(...fu({key:`${d}.${y}`,value:l[y]}));return h}}};function kc(d){const l=d.value,h=d.key,y=d.styleSpec,C=d.style;if(!l.type)return[new Qe(h,l,'"type" is required')];const I=Kt(l.type);let D;switch(I){case"vector":case"raster":case"raster-dem":return D=ua({key:h,value:l,valueSpec:y[`source_${I.replace("-","_")}`],style:d.style,styleSpec:y,objectElementValidators:ry}),D;case"geojson":if(D=ua({key:h,value:l,valueSpec:y.source_geojson,style:C,styleSpec:y,objectElementValidators:ry}),l.cluster)for(const z in l.clusterProperties){const[B,K]=l.clusterProperties[z],Y=typeof B=="string"?[B,["accumulated"],["get",z]]:B;D.push(...vl({key:`${h}.${z}.map`,value:K,expressionContext:"cluster-map"})),D.push(...vl({key:`${h}.${z}.reduce`,value:Y,expressionContext:"cluster-reduce"}))}return D;case"video":return ua({key:h,value:l,valueSpec:y.source_video,style:C,styleSpec:y});case"image":return ua({key:h,value:l,valueSpec:y.source_image,style:C,styleSpec:y});case"canvas":return[new Qe(h,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Cc({key:`${h}.type`,value:l.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:C,styleSpec:y})}}function Ic(d){const l=d.value,h=d.styleSpec,y=h.light,C=d.style;let I=[];const D=hr(l);if(l===void 0)return I;if(D!=="object")return I=I.concat([new Qe("light",l,`object expected, ${D} found`)]),I;for(const z in l){const B=z.match(/^(.*)-transition$/);I=I.concat(B&&y[B[1]]&&y[B[1]].transition?Oo({key:z,value:l[z],valueSpec:h.transition,style:C,styleSpec:h}):y[z]?Oo({key:z,value:l[z],valueSpec:y[z],style:C,styleSpec:h}):[new Qe(z,l[z],`unknown property "${z}"`)])}return I}function Do(d){const l=d.value,h=d.styleSpec,y=h.terrain,C=d.style;let I=[];const D=hr(l);if(l===void 0)return I;if(D!=="object")return I=I.concat([new Qe("terrain",l,`object expected, ${D} found`)]),I;for(const z in l)I=I.concat(y[z]?Oo({key:z,value:l[z],valueSpec:y[z],style:C,styleSpec:h}):[new Qe(z,l[z],`unknown property "${z}"`)]);return I}const Mc={"*":()=>[],array:Zv,boolean:function(d){const l=d.value,h=d.key,y=hr(l);return y!=="boolean"?[new Qe(h,l,`boolean expected, ${y} found`)]:[]},number:gp,color:function(d){const l=d.key,h=d.value,y=hr(h);return y!=="string"?[new Qe(l,h,`color expected, ${y} found`)]:Qn(h)===null?[new Qe(l,h,`color expected, "${h}" found`)]:[]},constants:Zt,enum:Cc,filter:Pc,function:Xv,layer:ny,object:ua,source:kc,light:Ic,terrain:Do,string:fu,formatted:function(d){return fu(d).length===0?[]:vl(d)},resolvedImage:function(d){return fu(d).length===0?[]:vl(d)},padding:function(d){const l=d.key,h=d.value;if(hr(h)==="array"){if(h.length<1||h.length>4)return[new Qe(l,h,`padding requires 1 to 4 values; ${h.length} values found`)];const y={type:"number"};let C=[];for(let I=0;I<h.length;I++)C=C.concat(Oo({key:`${l}[${I}]`,value:h[I],valueSpec:y}));return C}return gp({key:l,value:h,valueSpec:{}})}};function Oo(d){const l=d.value,h=d.valueSpec,y=d.styleSpec;return h.expression&&Tr(Kt(l))?Xv(d):h.expression&&bc(Vt(l))?vl(d):h.type&&Mc[h.type]?Mc[h.type](d):ua(an({},d,{valueSpec:h.type?y[h.type]:h}))}function ow(d){const l=d.value,h=d.key,y=fu(d);return y.length||(l.indexOf("{fontstack}")===-1&&y.push(new Qe(h,l,'"glyphs" url must include a "{fontstack}" token')),l.indexOf("{range}")===-1&&y.push(new Qe(h,l,'"glyphs" url must include a "{range}" token'))),y}function $s(d,l=ze){let h=[];return h=h.concat(Oo({key:"",value:d,valueSpec:l.$root,styleSpec:l,style:d,objectElementValidators:{glyphs:ow,"*":()=>[]}})),d.constants&&(h=h.concat(Zt({key:"constants",value:d.constants,style:d,styleSpec:l}))),iy(h)}function iy(d){return[].concat(d).sort((l,h)=>l.line-h.line)}function hs(d){return function(...l){return iy(d.apply(this,l))}}$s.source=hs(kc),$s.light=hs(Ic),$s.terrain=hs(Do),$s.layer=hs(ny),$s.filter=hs(Pc),$s.paintProperty=hs(ey),$s.layoutProperty=hs(ty);const Rc=$s,yp=Rc.light,aw=Rc.paintProperty,sw=Rc.layoutProperty;function lf(d,l){let h=!1;if(l&&l.length)for(const y of l)d.fire(new Lt(new Error(y.message))),h=!0;return h}class Dc{constructor(l,h,y){const C=this.cells=[];if(l instanceof ArrayBuffer){this.arrayBuffer=l;const D=new Int32Array(this.arrayBuffer);l=D[0],this.d=(h=D[1])+2*(y=D[2]);for(let B=0;B<this.d*this.d;B++){const K=D[3+B],Y=D[3+B+1];C.push(K===Y?null:D.subarray(K,Y))}const z=D[3+C.length+1];this.keys=D.subarray(D[3+C.length],z),this.bboxes=D.subarray(z),this.insert=this._insertReadonly}else{this.d=h+2*y;for(let D=0;D<this.d*this.d;D++)C.push([]);this.keys=[],this.bboxes=[]}this.n=h,this.extent=l,this.padding=y,this.scale=h/l,this.uid=0;const I=y/h*l;this.min=-I,this.max=l+I}insert(l,h,y,C,I){this._forEachCell(h,y,C,I,this._insertCell,this.uid++,void 0,void 0),this.keys.push(l),this.bboxes.push(h),this.bboxes.push(y),this.bboxes.push(C),this.bboxes.push(I)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(l,h,y,C,I,D){this.cells[I].push(D)}query(l,h,y,C,I){const D=this.min,z=this.max;if(l<=D&&h<=D&&z<=y&&z<=C&&!I)return Array.prototype.slice.call(this.keys);{const B=[];return this._forEachCell(l,h,y,C,this._queryCell,B,{},I),B}}_queryCell(l,h,y,C,I,D,z,B){const K=this.cells[I];if(K!==null){const Y=this.keys,te=this.bboxes;for(let ce=0;ce<K.length;ce++){const pe=K[ce];if(z[pe]===void 0){const ve=4*pe;(B?B(te[ve+0],te[ve+1],te[ve+2],te[ve+3]):l<=te[ve+2]&&h<=te[ve+3]&&y>=te[ve+0]&&C>=te[ve+1])?(z[pe]=!0,D.push(Y[pe])):z[pe]=!1}}}}_forEachCell(l,h,y,C,I,D,z,B){const K=this._convertToCellCoord(l),Y=this._convertToCellCoord(h),te=this._convertToCellCoord(y),ce=this._convertToCellCoord(C);for(let pe=K;pe<=te;pe++)for(let ve=Y;ve<=ce;ve++){const Ne=this.d*ve+pe;if((!B||B(this._convertFromCellCoord(pe),this._convertFromCellCoord(ve),this._convertFromCellCoord(pe+1),this._convertFromCellCoord(ve+1)))&&I.call(this,l,h,y,C,Ne,D,z,B))return}}_convertFromCellCoord(l){return(l-this.padding)/this.scale}_convertToCellCoord(l){return Math.max(0,Math.min(this.d-1,Math.floor(l*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const l=this.cells,h=3+this.cells.length+1+1;let y=0;for(let D=0;D<this.cells.length;D++)y+=this.cells[D].length;const C=new Int32Array(h+y+this.keys.length+this.bboxes.length);C[0]=this.extent,C[1]=this.n,C[2]=this.padding;let I=h;for(let D=0;D<l.length;D++){const z=l[D];C[3+D]=I,C.set(z,I),I+=z.length}return C[3+l.length]=I,C.set(this.keys,I),I+=this.keys.length,C[3+l.length+1]=I,C.set(this.bboxes,I),I+=this.bboxes.length,C.buffer}static serialize(l,h){const y=l.toArrayBuffer();return h&&h.push(y),{buffer:y}}static deserialize(l){return new Dc(l.buffer)}}const ps={};function gn(d,l,h={}){if(ps[d])throw new Error(`${d} is already registered.`);Object.defineProperty(l,"_classRegistryKey",{value:d,writeable:!1}),ps[d]={klass:l,omit:h.omit||[],shallow:h.shallow||[]}}gn("Object",Object),gn("TransferableGridIndex",Dc),gn("Color",le),gn("Error",Error),gn("AJAXError",Ze),gn("ResolvedImage",Le),gn("StylePropertyFunction",rf),gn("StyleExpression",nf,{omit:["_evaluator"]}),gn("ZoomDependentExpression",mp),gn("ZoomConstantExpression",wc),gn("CompoundExpression",or,{omit:["_evaluate"]});for(const d in su)su[d]._classRegistryKey||gn(`Expression_${d}`,su[d]);function oy(d){return d&&typeof ArrayBuffer<"u"&&(d instanceof ArrayBuffer||d.constructor&&d.constructor.name==="ArrayBuffer")}function yl(d,l){if(d==null||typeof d=="boolean"||typeof d=="number"||typeof d=="string"||d instanceof Boolean||d instanceof Number||d instanceof String||d instanceof Date||d instanceof RegExp||d instanceof Blob)return d;if(oy(d)||ne(d))return l&&l.push(d),d;if(ArrayBuffer.isView(d)){const h=d;return l&&l.push(h.buffer),h}if(d instanceof ImageData)return l&&l.push(d.data.buffer),d;if(Array.isArray(d)){const h=[];for(const y of d)h.push(yl(y,l));return h}if(typeof d=="object"){const h=d.constructor,y=h._classRegistryKey;if(!y)throw new Error("can't serialize object of unregistered class");if(!ps[y])throw new Error(`${y} is not registered.`);const C=h.serialize?h.serialize(d,l):{};if(h.serialize){if(l&&C===l[l.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(const I in d){if(!d.hasOwnProperty(I)||ps[y].omit.indexOf(I)>=0)continue;const D=d[I];C[I]=ps[y].shallow.indexOf(I)>=0?D:yl(D,l)}d instanceof Error&&(C.message=d.message)}if(C.$name)throw new Error("$name property is reserved for worker serialization logic.");return y!=="Object"&&(C.$name=y),C}throw new Error("can't serialize object of type "+typeof d)}function Bs(d){if(d==null||typeof d=="boolean"||typeof d=="number"||typeof d=="string"||d instanceof Boolean||d instanceof Number||d instanceof String||d instanceof Date||d instanceof RegExp||d instanceof Blob||oy(d)||ne(d)||ArrayBuffer.isView(d)||d instanceof ImageData)return d;if(Array.isArray(d))return d.map(Bs);if(typeof d=="object"){const l=d.$name||"Object";if(!ps[l])throw new Error(`can't deserialize unregistered class ${l}`);const{klass:h}=ps[l];if(!h)throw new Error(`can't deserialize unregistered class ${l}`);if(h.deserialize)return h.deserialize(d);const y=Object.create(h.prototype);for(const C of Object.keys(d)){if(C==="$name")continue;const I=d[C];y[C]=ps[l].shallow.indexOf(C)>=0?I:Bs(I)}return y}throw new Error("can't deserialize object of type "+typeof d)}class xp{constructor(){this.first=!0}update(l,h){const y=Math.floor(l);return this.first?(this.first=!1,this.lastIntegerZoom=y,this.lastIntegerZoomTime=0,this.lastZoom=l,this.lastFloorZoom=y,!0):(this.lastFloorZoom>y?(this.lastIntegerZoom=y+1,this.lastIntegerZoomTime=h):this.lastFloorZoom<y&&(this.lastIntegerZoom=y,this.lastIntegerZoomTime=h),l!==this.lastZoom&&(this.lastZoom=l,this.lastFloorZoom=y,!0))}}const sn={"Latin-1 Supplement":d=>d>=128&&d<=255,Arabic:d=>d>=1536&&d<=1791,"Arabic Supplement":d=>d>=1872&&d<=1919,"Arabic Extended-A":d=>d>=2208&&d<=2303,"Hangul Jamo":d=>d>=4352&&d<=4607,"Unified Canadian Aboriginal Syllabics":d=>d>=5120&&d<=5759,Khmer:d=>d>=6016&&d<=6143,"Unified Canadian Aboriginal Syllabics Extended":d=>d>=6320&&d<=6399,"General Punctuation":d=>d>=8192&&d<=8303,"Letterlike Symbols":d=>d>=8448&&d<=8527,"Number Forms":d=>d>=8528&&d<=8591,"Miscellaneous Technical":d=>d>=8960&&d<=9215,"Control Pictures":d=>d>=9216&&d<=9279,"Optical Character Recognition":d=>d>=9280&&d<=9311,"Enclosed Alphanumerics":d=>d>=9312&&d<=9471,"Geometric Shapes":d=>d>=9632&&d<=9727,"Miscellaneous Symbols":d=>d>=9728&&d<=9983,"Miscellaneous Symbols and Arrows":d=>d>=11008&&d<=11263,"CJK Radicals Supplement":d=>d>=11904&&d<=12031,"Kangxi Radicals":d=>d>=12032&&d<=12255,"Ideographic Description Characters":d=>d>=12272&&d<=12287,"CJK Symbols and Punctuation":d=>d>=12288&&d<=12351,Hiragana:d=>d>=12352&&d<=12447,Katakana:d=>d>=12448&&d<=12543,Bopomofo:d=>d>=12544&&d<=12591,"Hangul Compatibility Jamo":d=>d>=12592&&d<=12687,Kanbun:d=>d>=12688&&d<=12703,"Bopomofo Extended":d=>d>=12704&&d<=12735,"CJK Strokes":d=>d>=12736&&d<=12783,"Katakana Phonetic Extensions":d=>d>=12784&&d<=12799,"Enclosed CJK Letters and Months":d=>d>=12800&&d<=13055,"CJK Compatibility":d=>d>=13056&&d<=13311,"CJK Unified Ideographs Extension A":d=>d>=13312&&d<=19903,"Yijing Hexagram Symbols":d=>d>=19904&&d<=19967,"CJK Unified Ideographs":d=>d>=19968&&d<=40959,"Yi Syllables":d=>d>=40960&&d<=42127,"Yi Radicals":d=>d>=42128&&d<=42191,"Hangul Jamo Extended-A":d=>d>=43360&&d<=43391,"Hangul Syllables":d=>d>=44032&&d<=55215,"Hangul Jamo Extended-B":d=>d>=55216&&d<=55295,"Private Use Area":d=>d>=57344&&d<=63743,"CJK Compatibility Ideographs":d=>d>=63744&&d<=64255,"Arabic Presentation Forms-A":d=>d>=64336&&d<=65023,"Vertical Forms":d=>d>=65040&&d<=65055,"CJK Compatibility Forms":d=>d>=65072&&d<=65103,"Small Form Variants":d=>d>=65104&&d<=65135,"Arabic Presentation Forms-B":d=>d>=65136&&d<=65279,"Halfwidth and Fullwidth Forms":d=>d>=65280&&d<=65519};function uf(d){for(const l of d)if(_p(l.charCodeAt(0)))return!0;return!1}function lw(d){for(const l of d)if(!bp(l.charCodeAt(0)))return!1;return!0}function bp(d){return!(sn.Arabic(d)||sn["Arabic Supplement"](d)||sn["Arabic Extended-A"](d)||sn["Arabic Presentation Forms-A"](d)||sn["Arabic Presentation Forms-B"](d))}function _p(d){return!(d!==746&&d!==747&&(d<4352||!(sn["Bopomofo Extended"](d)||sn.Bopomofo(d)||sn["CJK Compatibility Forms"](d)&&!(d>=65097&&d<=65103)||sn["CJK Compatibility Ideographs"](d)||sn["CJK Compatibility"](d)||sn["CJK Radicals Supplement"](d)||sn["CJK Strokes"](d)||!(!sn["CJK Symbols and Punctuation"](d)||d>=12296&&d<=12305||d>=12308&&d<=12319||d===12336)||sn["CJK Unified Ideographs Extension A"](d)||sn["CJK Unified Ideographs"](d)||sn["Enclosed CJK Letters and Months"](d)||sn["Hangul Compatibility Jamo"](d)||sn["Hangul Jamo Extended-A"](d)||sn["Hangul Jamo Extended-B"](d)||sn["Hangul Jamo"](d)||sn["Hangul Syllables"](d)||sn.Hiragana(d)||sn["Ideographic Description Characters"](d)||sn.Kanbun(d)||sn["Kangxi Radicals"](d)||sn["Katakana Phonetic Extensions"](d)||sn.Katakana(d)&&d!==12540||!(!sn["Halfwidth and Fullwidth Forms"](d)||d===65288||d===65289||d===65293||d>=65306&&d<=65310||d===65339||d===65341||d===65343||d>=65371&&d<=65503||d===65507||d>=65512&&d<=65519)||!(!sn["Small Form Variants"](d)||d>=65112&&d<=65118||d>=65123&&d<=65126)||sn["Unified Canadian Aboriginal Syllabics"](d)||sn["Unified Canadian Aboriginal Syllabics Extended"](d)||sn["Vertical Forms"](d)||sn["Yijing Hexagram Symbols"](d)||sn["Yi Syllables"](d)||sn["Yi Radicals"](d))))}function ay(d){return!(_p(d)||function(l){return!!(sn["Latin-1 Supplement"](l)&&(l===167||l===169||l===174||l===177||l===188||l===189||l===190||l===215||l===247)||sn["General Punctuation"](l)&&(l===8214||l===8224||l===8225||l===8240||l===8241||l===8251||l===8252||l===8258||l===8263||l===8264||l===8265||l===8273)||sn["Letterlike Symbols"](l)||sn["Number Forms"](l)||sn["Miscellaneous Technical"](l)&&(l>=8960&&l<=8967||l>=8972&&l<=8991||l>=8996&&l<=9e3||l===9003||l>=9085&&l<=9114||l>=9150&&l<=9165||l===9167||l>=9169&&l<=9179||l>=9186&&l<=9215)||sn["Control Pictures"](l)&&l!==9251||sn["Optical Character Recognition"](l)||sn["Enclosed Alphanumerics"](l)||sn["Geometric Shapes"](l)||sn["Miscellaneous Symbols"](l)&&!(l>=9754&&l<=9759)||sn["Miscellaneous Symbols and Arrows"](l)&&(l>=11026&&l<=11055||l>=11088&&l<=11097||l>=11192&&l<=11243)||sn["CJK Symbols and Punctuation"](l)||sn.Katakana(l)||sn["Private Use Area"](l)||sn["CJK Compatibility Forms"](l)||sn["Small Form Variants"](l)||sn["Halfwidth and Fullwidth Forms"](l)||l===8734||l===8756||l===8757||l>=9984&&l<=10087||l>=10102&&l<=10131||l===65532||l===65533)}(d))}function sy(d){return d>=1424&&d<=2303||sn["Arabic Presentation Forms-A"](d)||sn["Arabic Presentation Forms-B"](d)}function uw(d,l){return!(!l&&sy(d)||d>=2304&&d<=3583||d>=3840&&d<=4255||sn.Khmer(d))}function ly(d){for(const l of d)if(sy(l.charCodeAt(0)))return!0;return!1}const wp="deferred",Cp="loading",Sp="loaded";let Ep=null,mo="unavailable",Vs=null;const uy=function(d){d&&typeof d=="string"&&d.indexOf("NetworkError")>-1&&(mo="error"),Ep&&Ep(d)};function hu(){Pp.fire(new At("pluginStateChange",{pluginStatus:mo,pluginURL:Vs}))}const Pp=new Ht,Oc=function(){return mo},cy=function(){if(mo!==wp||!Vs)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");mo=Cp,hu(),Vs&&yt({url:Vs},d=>{d?uy(d):(mo=Sp,hu())})},Wo={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>mo===Sp||Wo.applyArabicShaping!=null,isLoading:()=>mo===Cp,setState(d){if(!U())throw new Error("Cannot set the state of the rtl-text-plugin when not in the web-worker context");mo=d.pluginStatus,Vs=d.pluginURL},isParsed(){if(!U())throw new Error("rtl-text-plugin is only parsed on the worker-threads");return Wo.applyArabicShaping!=null&&Wo.processBidirectionalText!=null&&Wo.processStyledBidirectionalText!=null},getPluginURL(){if(!U())throw new Error("rtl-text-plugin url can only be queried from the worker threads");return Vs}};class $r{constructor(l,h){this.zoom=l,h?(this.now=h.now,this.fadeDuration=h.fadeDuration,this.zoomHistory=h.zoomHistory,this.transition=h.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new xp,this.transition={})}isSupportedScript(l){return function(h,y){for(const C of h)if(!uw(C.charCodeAt(0),y))return!1;return!0}(l,Wo.isLoaded())}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const l=this.zoom,h=l-Math.floor(l),y=this.crossFadingFactor();return l>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:h+(1-h)*y}:{fromScale:.5,toScale:1,t:1-(1-y)*h}}}class Ac{constructor(l,h){this.property=l,this.value=h,this.expression=function(y,C){if(Tr(y))return new rf(y,C);if(bc(y)){const I=qv(y,C);if(I.result==="error")throw new Error(I.value.map(D=>`${D.key}: ${D.message}`).join(", "));return I.value}{let I=y;return C.type==="color"&&typeof y=="string"?I=le.parse(y):C.type!=="padding"||typeof y!="number"&&!Array.isArray(y)||(I=Pe.parse(y)),{kind:"constant",evaluate:()=>I}}}(h===void 0?l.specification.default:h,l.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(l,h,y){return this.property.possiblyEvaluate(this,l,h,y)}}class cf{constructor(l){this.property=l,this.value=new Ac(l,void 0)}transitioned(l,h){return new fy(this.property,this.value,h,_({},l.transition,this.transition),l.now)}untransitioned(){return new fy(this.property,this.value,null,{},0)}}class dy{constructor(l){this._properties=l,this._values=Object.create(l.defaultTransitionablePropertyValues)}getValue(l){return O(this._values[l].value.value)}setValue(l,h){Object.prototype.hasOwnProperty.call(this._values,l)||(this._values[l]=new cf(this._values[l].property)),this._values[l].value=new Ac(this._values[l].property,h===null?void 0:O(h))}getTransition(l){return O(this._values[l].transition)}setTransition(l,h){Object.prototype.hasOwnProperty.call(this._values,l)||(this._values[l]=new cf(this._values[l].property)),this._values[l].transition=O(h)||void 0}serialize(){const l={};for(const h of Object.keys(this._values)){const y=this.getValue(h);y!==void 0&&(l[h]=y);const C=this.getTransition(h);C!==void 0&&(l[`${h}-transition`]=C)}return l}transitioned(l,h){const y=new hy(this._properties);for(const C of Object.keys(this._values))y._values[C]=this._values[C].transitioned(l,h._values[C]);return y}untransitioned(){const l=new hy(this._properties);for(const h of Object.keys(this._values))l._values[h]=this._values[h].untransitioned();return l}}class fy{constructor(l,h,y,C,I){this.property=l,this.value=h,this.begin=I+C.delay||0,this.end=this.begin+C.duration||0,l.specification.transition&&(C.delay||C.duration)&&(this.prior=y)}possiblyEvaluate(l,h,y){const C=l.now||0,I=this.value.possiblyEvaluate(l,h,y),D=this.prior;if(D){if(C>this.end)return this.prior=null,I;if(this.value.isDataDriven())return this.prior=null,I;if(C<this.begin)return D.possiblyEvaluate(l,h,y);{const z=(C-this.begin)/(this.end-this.begin);return this.property.interpolate(D.possiblyEvaluate(l,h,y),I,function(B){if(B<=0)return 0;if(B>=1)return 1;const K=B*B,Y=K*B;return 4*(B<.5?Y:3*(B-K)+Y-.75)}(z))}}return I}}class hy{constructor(l){this._properties=l,this._values=Object.create(l.defaultTransitioningPropertyValues)}possiblyEvaluate(l,h,y){const C=new Nc(this._properties);for(const I of Object.keys(this._values))C._values[I]=this._values[I].possiblyEvaluate(l,h,y);return C}hasTransition(){for(const l of Object.keys(this._values))if(this._values[l].prior)return!0;return!1}}class cw{constructor(l){this._properties=l,this._values=Object.create(l.defaultPropertyValues)}getValue(l){return O(this._values[l].value)}setValue(l,h){this._values[l]=new Ac(this._values[l].property,h===null?void 0:O(h))}serialize(){const l={};for(const h of Object.keys(this._values)){const y=this.getValue(h);y!==void 0&&(l[h]=y)}return l}possiblyEvaluate(l,h,y){const C=new Nc(this._properties);for(const I of Object.keys(this._values))C._values[I]=this._values[I].possiblyEvaluate(l,h,y);return C}}class Fa{constructor(l,h,y){this.property=l,this.value=h,this.parameters=y}isConstant(){return this.value.kind==="constant"}constantOr(l){return this.value.kind==="constant"?this.value.value:l}evaluate(l,h,y,C){return this.property.evaluate(this.value,this.parameters,l,h,y,C)}}class Nc{constructor(l){this._properties=l,this._values=Object.create(l.defaultPossiblyEvaluatedValues)}get(l){return this._values[l]}}class xn{constructor(l){this.specification=l}possiblyEvaluate(l,h){if(l.isDataDriven())throw new Error("Value should not be data driven");return l.expression.evaluate(h)}interpolate(l,h,y){const C=fs[this.specification.type];return C?C(l,h,y):l}}class Rn{constructor(l,h){this.specification=l,this.overrides=h}possiblyEvaluate(l,h,y,C){return new Fa(this,l.expression.kind==="constant"||l.expression.kind==="camera"?{kind:"constant",value:l.expression.evaluate(h,null,{},y,C)}:l.expression,h)}interpolate(l,h,y){if(l.value.kind!=="constant"||h.value.kind!=="constant")return l;if(l.value.value===void 0||h.value.value===void 0)return new Fa(this,{kind:"constant",value:void 0},l.parameters);const C=fs[this.specification.type];return C?new Fa(this,{kind:"constant",value:C(l.value.value,h.value.value,y)},l.parameters):l}evaluate(l,h,y,C,I,D){return l.kind==="constant"?l.value:l.evaluate(h,y,C,I,D)}}class pu extends Rn{possiblyEvaluate(l,h,y,C){if(l.value===void 0)return new Fa(this,{kind:"constant",value:void 0},h);if(l.expression.kind==="constant"){const I=l.expression.evaluate(h,null,{},y,C),D=l.property.specification.type==="resolvedImage"&&typeof I!="string"?I.name:I,z=this._calculate(D,D,D,h);return new Fa(this,{kind:"constant",value:z},h)}if(l.expression.kind==="camera"){const I=this._calculate(l.expression.evaluate({zoom:h.zoom-1}),l.expression.evaluate({zoom:h.zoom}),l.expression.evaluate({zoom:h.zoom+1}),h);return new Fa(this,{kind:"constant",value:I},h)}return new Fa(this,l.expression,h)}evaluate(l,h,y,C,I,D){if(l.kind==="source"){const z=l.evaluate(h,y,C,I,D);return this._calculate(z,z,z,h)}return l.kind==="composite"?this._calculate(l.evaluate({zoom:Math.floor(h.zoom)-1},y,C),l.evaluate({zoom:Math.floor(h.zoom)},y,C),l.evaluate({zoom:Math.floor(h.zoom)+1},y,C),h):l.value}_calculate(l,h,y,C){return C.zoom>C.zoomHistory.lastIntegerZoom?{from:l,to:h}:{from:y,to:h}}interpolate(l){return l}}class Tp{constructor(l){this.specification=l}possiblyEvaluate(l,h,y,C){if(l.value!==void 0){if(l.expression.kind==="constant"){const I=l.expression.evaluate(h,null,{},y,C);return this._calculate(I,I,I,h)}return this._calculate(l.expression.evaluate(new $r(Math.floor(h.zoom-1),h)),l.expression.evaluate(new $r(Math.floor(h.zoom),h)),l.expression.evaluate(new $r(Math.floor(h.zoom+1),h)),h)}}_calculate(l,h,y,C){return C.zoom>C.zoomHistory.lastIntegerZoom?{from:l,to:h}:{from:y,to:h}}interpolate(l){return l}}class Us{constructor(l){this.specification=l}possiblyEvaluate(l,h,y,C){return!!l.expression.evaluate(h,null,{},y,C)}interpolate(){return!1}}class $i{constructor(l){this.properties=l,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const h in l){const y=l[h];y.specification.overridable&&this.overridableProperties.push(h);const C=this.defaultPropertyValues[h]=new Ac(y,void 0),I=this.defaultTransitionablePropertyValues[h]=new cf(y);this.defaultTransitioningPropertyValues[h]=I.untransitioned(),this.defaultPossiblyEvaluatedValues[h]=C.possiblyEvaluate({})}}}gn("DataDrivenProperty",Rn),gn("DataConstantProperty",xn),gn("CrossFadedDataDrivenProperty",pu),gn("CrossFadedProperty",Tp),gn("ColorRampProperty",Us);const js="-transition";class za extends Ht{constructor(l,h){if(super(),this.id=l.id,this.type=l.type,this._featureFilter={filter:()=>!0,needGeometry:!1},l.type!=="custom"&&(this.metadata=l.metadata,this.minzoom=l.minzoom,this.maxzoom=l.maxzoom,l.type!=="background"&&(this.source=l.source,this.sourceLayer=l["source-layer"],this.filter=l.filter),h.layout&&(this._unevaluatedLayout=new cw(h.layout)),h.paint)){this._transitionablePaint=new dy(h.paint);for(const y in l.paint)this.setPaintProperty(y,l.paint[y],{validate:!1});for(const y in l.layout)this.setLayoutProperty(y,l.layout[y],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Nc(h.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(l){return l==="visibility"?this.visibility:this._unevaluatedLayout.getValue(l)}setLayoutProperty(l,h,y={}){h!=null&&this._validate(sw,`layers.${this.id}.layout.${l}`,l,h,y)||(l!=="visibility"?this._unevaluatedLayout.setValue(l,h):this.visibility=h)}getPaintProperty(l){return l.endsWith(js)?this._transitionablePaint.getTransition(l.slice(0,-js.length)):this._transitionablePaint.getValue(l)}setPaintProperty(l,h,y={}){if(h!=null&&this._validate(aw,`layers.${this.id}.paint.${l}`,l,h,y))return!1;if(l.endsWith(js))return this._transitionablePaint.setTransition(l.slice(0,-js.length),h||void 0),!1;{const C=this._transitionablePaint._values[l],I=C.property.specification["property-type"]==="cross-faded-data-driven",D=C.value.isDataDriven(),z=C.value;this._transitionablePaint.setValue(l,h),this._handleSpecialPaintPropertyUpdate(l);const B=this._transitionablePaint._values[l].value;return B.isDataDriven()||D||I||this._handleOverridablePaintPropertyUpdate(l,z,B)}}_handleSpecialPaintPropertyUpdate(l){}_handleOverridablePaintPropertyUpdate(l,h,y){return!1}isHidden(l){return!!(this.minzoom&&l<this.minzoom)||!!(this.maxzoom&&l>=this.maxzoom)||this.visibility==="none"}updateTransitions(l){this._transitioningPaint=this._transitionablePaint.transitioned(l,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(l,h){l.getCrossfadeParameters&&(this._crossfadeParameters=l.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(l,void 0,h)),this.paint=this._transitioningPaint.possiblyEvaluate(l,void 0,h)}serialize(){const l={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&&(l.layout=l.layout||{},l.layout.visibility=this.visibility),M(l,(h,y)=>!(h===void 0||y==="layout"&&!Object.keys(h).length||y==="paint"&&!Object.keys(h).length))}_validate(l,h,y,C,I={}){return(!I||I.validate!==!1)&&lf(this,l.call(Rc,{key:h,layerType:this.type,objectKey:y,value:C,styleSpec:ze,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const l in this.paint._values){const h=this.paint.get(l);if(h instanceof Fa&&Dr(h.property.specification)&&(h.value.kind==="source"||h.value.kind==="composite")&&h.value.isStateDependent)return!0}return!1}}const py={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Hs{constructor(l,h){this._structArray=l,this._pos1=h*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(l,h){return l._trim(),h&&(l.isTransferred=!0,h.push(l.arrayBuffer)),{length:l.length,arrayBuffer:l.arrayBuffer}}static deserialize(l){const h=Object.create(this.prototype);return h.arrayBuffer=l.arrayBuffer,h.length=l.length,h.capacity=l.arrayBuffer.byteLength/h.bytesPerElement,h._refreshViews(),h}_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(l){this.reserve(l),this.length=l}reserve(l){if(l>this.capacity){this.capacity=Math.max(l,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const h=this.uint8;this._refreshViews(),h&&this.uint8.set(h)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function fi(d,l=1){let h=0,y=0;return{members:d.map(C=>{const I=py[C.type].BYTES_PER_ELEMENT,D=h=kp(h,Math.max(l,I)),z=C.components||1;return y=Math.max(y,I),h+=I*z,{name:C.name,type:C.type,components:z,offset:D}}),size:kp(h,Math.max(y,l)),alignment:l}}function kp(d,l){return Math.ceil(d/l)*l}class xl extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h){const y=this.length;return this.resize(y+1),this.emplace(y,l,h)}emplace(l,h,y){const C=2*l;return this.int16[C+0]=h,this.int16[C+1]=y,l}}xl.prototype.bytesPerElement=4,gn("StructArrayLayout2i4",xl);class w extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h,y,C){const I=this.length;return this.resize(I+1),this.emplace(I,l,h,y,C)}emplace(l,h,y,C,I){const D=4*l;return this.int16[D+0]=h,this.int16[D+1]=y,this.int16[D+2]=C,this.int16[D+3]=I,l}}w.prototype.bytesPerElement=8,gn("StructArrayLayout4i8",w);class u extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h,y,C,I,D){const z=this.length;return this.resize(z+1),this.emplace(z,l,h,y,C,I,D)}emplace(l,h,y,C,I,D,z){const B=6*l;return this.int16[B+0]=h,this.int16[B+1]=y,this.int16[B+2]=C,this.int16[B+3]=I,this.int16[B+4]=D,this.int16[B+5]=z,l}}u.prototype.bytesPerElement=12,gn("StructArrayLayout2i4i12",u);class m extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h,y,C,I,D){const z=this.length;return this.resize(z+1),this.emplace(z,l,h,y,C,I,D)}emplace(l,h,y,C,I,D,z){const B=4*l,K=8*l;return this.int16[B+0]=h,this.int16[B+1]=y,this.uint8[K+4]=C,this.uint8[K+5]=I,this.uint8[K+6]=D,this.uint8[K+7]=z,l}}m.prototype.bytesPerElement=8,gn("StructArrayLayout2i4ub8",m);class x extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l,h){const y=this.length;return this.resize(y+1),this.emplace(y,l,h)}emplace(l,h,y){const C=2*l;return this.float32[C+0]=h,this.float32[C+1]=y,l}}x.prototype.bytesPerElement=8,gn("StructArrayLayout2f8",x);class S extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l,h,y,C,I,D,z,B,K,Y){const te=this.length;return this.resize(te+1),this.emplace(te,l,h,y,C,I,D,z,B,K,Y)}emplace(l,h,y,C,I,D,z,B,K,Y,te){const ce=10*l;return this.uint16[ce+0]=h,this.uint16[ce+1]=y,this.uint16[ce+2]=C,this.uint16[ce+3]=I,this.uint16[ce+4]=D,this.uint16[ce+5]=z,this.uint16[ce+6]=B,this.uint16[ce+7]=K,this.uint16[ce+8]=Y,this.uint16[ce+9]=te,l}}S.prototype.bytesPerElement=20,gn("StructArrayLayout10ui20",S);class R extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l,h,y,C,I,D,z,B,K,Y,te,ce){const pe=this.length;return this.resize(pe+1),this.emplace(pe,l,h,y,C,I,D,z,B,K,Y,te,ce)}emplace(l,h,y,C,I,D,z,B,K,Y,te,ce,pe){const ve=12*l;return this.int16[ve+0]=h,this.int16[ve+1]=y,this.int16[ve+2]=C,this.int16[ve+3]=I,this.uint16[ve+4]=D,this.uint16[ve+5]=z,this.uint16[ve+6]=B,this.uint16[ve+7]=K,this.int16[ve+8]=Y,this.int16[ve+9]=te,this.int16[ve+10]=ce,this.int16[ve+11]=pe,l}}R.prototype.bytesPerElement=24,gn("StructArrayLayout4i4ui4i24",R);class F extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l,h,y){const C=this.length;return this.resize(C+1),this.emplace(C,l,h,y)}emplace(l,h,y,C){const I=3*l;return this.float32[I+0]=h,this.float32[I+1]=y,this.float32[I+2]=C,l}}F.prototype.bytesPerElement=12,gn("StructArrayLayout3f12",F);class V extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(l){const h=this.length;return this.resize(h+1),this.emplace(h,l)}emplace(l,h){return this.uint32[1*l+0]=h,l}}V.prototype.bytesPerElement=4,gn("StructArrayLayout1ul4",V);class H 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(l,h,y,C,I,D,z,B,K){const Y=this.length;return this.resize(Y+1),this.emplace(Y,l,h,y,C,I,D,z,B,K)}emplace(l,h,y,C,I,D,z,B,K,Y){const te=10*l,ce=5*l;return this.int16[te+0]=h,this.int16[te+1]=y,this.int16[te+2]=C,this.int16[te+3]=I,this.int16[te+4]=D,this.int16[te+5]=z,this.uint32[ce+3]=B,this.uint16[te+8]=K,this.uint16[te+9]=Y,l}}H.prototype.bytesPerElement=20,gn("StructArrayLayout6i1ul2ui20",H);class q extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h,y,C,I,D){const z=this.length;return this.resize(z+1),this.emplace(z,l,h,y,C,I,D)}emplace(l,h,y,C,I,D,z){const B=6*l;return this.int16[B+0]=h,this.int16[B+1]=y,this.int16[B+2]=C,this.int16[B+3]=I,this.int16[B+4]=D,this.int16[B+5]=z,l}}q.prototype.bytesPerElement=12,gn("StructArrayLayout2i2i2i12",q);class ee extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h,y,C,I){const D=this.length;return this.resize(D+1),this.emplace(D,l,h,y,C,I)}emplace(l,h,y,C,I,D){const z=4*l,B=8*l;return this.float32[z+0]=h,this.float32[z+1]=y,this.float32[z+2]=C,this.int16[B+6]=I,this.int16[B+7]=D,l}}ee.prototype.bytesPerElement=16,gn("StructArrayLayout2f1f2i16",ee);class se extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l,h,y,C){const I=this.length;return this.resize(I+1),this.emplace(I,l,h,y,C)}emplace(l,h,y,C,I){const D=12*l,z=3*l;return this.uint8[D+0]=h,this.uint8[D+1]=y,this.float32[z+1]=C,this.float32[z+2]=I,l}}se.prototype.bytesPerElement=12,gn("StructArrayLayout2ub2f12",se);class he extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l,h,y){const C=this.length;return this.resize(C+1),this.emplace(C,l,h,y)}emplace(l,h,y,C){const I=3*l;return this.uint16[I+0]=h,this.uint16[I+1]=y,this.uint16[I+2]=C,l}}he.prototype.bytesPerElement=6,gn("StructArrayLayout3ui6",he);class ke 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(l,h,y,C,I,D,z,B,K,Y,te,ce,pe,ve,Ne,Oe,Je){const ht=this.length;return this.resize(ht+1),this.emplace(ht,l,h,y,C,I,D,z,B,K,Y,te,ce,pe,ve,Ne,Oe,Je)}emplace(l,h,y,C,I,D,z,B,K,Y,te,ce,pe,ve,Ne,Oe,Je,ht){const qe=24*l,lt=12*l,Dt=48*l;return this.int16[qe+0]=h,this.int16[qe+1]=y,this.uint16[qe+2]=C,this.uint16[qe+3]=I,this.uint32[lt+2]=D,this.uint32[lt+3]=z,this.uint32[lt+4]=B,this.uint16[qe+10]=K,this.uint16[qe+11]=Y,this.uint16[qe+12]=te,this.float32[lt+7]=ce,this.float32[lt+8]=pe,this.uint8[Dt+36]=ve,this.uint8[Dt+37]=Ne,this.uint8[Dt+38]=Oe,this.uint32[lt+10]=Je,this.int16[qe+22]=ht,l}}ke.prototype.bytesPerElement=48,gn("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",ke);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(l,h,y,C,I,D,z,B,K,Y,te,ce,pe,ve,Ne,Oe,Je,ht,qe,lt,Dt,Mt,hn,vn,ln,en,Qt,un){const nn=this.length;return this.resize(nn+1),this.emplace(nn,l,h,y,C,I,D,z,B,K,Y,te,ce,pe,ve,Ne,Oe,Je,ht,qe,lt,Dt,Mt,hn,vn,ln,en,Qt,un)}emplace(l,h,y,C,I,D,z,B,K,Y,te,ce,pe,ve,Ne,Oe,Je,ht,qe,lt,Dt,Mt,hn,vn,ln,en,Qt,un,nn){const jt=34*l,kn=17*l;return this.int16[jt+0]=h,this.int16[jt+1]=y,this.int16[jt+2]=C,this.int16[jt+3]=I,this.int16[jt+4]=D,this.int16[jt+5]=z,this.int16[jt+6]=B,this.int16[jt+7]=K,this.uint16[jt+8]=Y,this.uint16[jt+9]=te,this.uint16[jt+10]=ce,this.uint16[jt+11]=pe,this.uint16[jt+12]=ve,this.uint16[jt+13]=Ne,this.uint16[jt+14]=Oe,this.uint16[jt+15]=Je,this.uint16[jt+16]=ht,this.uint16[jt+17]=qe,this.uint16[jt+18]=lt,this.uint16[jt+19]=Dt,this.uint16[jt+20]=Mt,this.uint16[jt+21]=hn,this.uint16[jt+22]=vn,this.uint32[kn+12]=ln,this.float32[kn+13]=en,this.float32[kn+14]=Qt,this.float32[kn+15]=un,this.float32[kn+16]=nn,l}}_e.prototype.bytesPerElement=68,gn("StructArrayLayout8i15ui1ul4f68",_e);class Se extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l){const h=this.length;return this.resize(h+1),this.emplace(h,l)}emplace(l,h){return this.float32[1*l+0]=h,l}}Se.prototype.bytesPerElement=4,gn("StructArrayLayout1f4",Se);class Ve extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h,y){const C=this.length;return this.resize(C+1),this.emplace(C,l,h,y)}emplace(l,h,y,C){const I=3*l;return this.int16[I+0]=h,this.int16[I+1]=y,this.int16[I+2]=C,l}}Ve.prototype.bytesPerElement=6,gn("StructArrayLayout3i6",Ve);class Ge extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l,h,y){const C=this.length;return this.resize(C+1),this.emplace(C,l,h,y)}emplace(l,h,y,C){const I=4*l;return this.uint32[2*l+0]=h,this.uint16[I+2]=y,this.uint16[I+3]=C,l}}Ge.prototype.bytesPerElement=8,gn("StructArrayLayout1ul2ui8",Ge);class rt extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l,h){const y=this.length;return this.resize(y+1),this.emplace(y,l,h)}emplace(l,h,y){const C=2*l;return this.uint16[C+0]=h,this.uint16[C+1]=y,l}}rt.prototype.bytesPerElement=4,gn("StructArrayLayout2ui4",rt);class De extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l){const h=this.length;return this.resize(h+1),this.emplace(h,l)}emplace(l,h){return this.uint16[1*l+0]=h,l}}De.prototype.bytesPerElement=2,gn("StructArrayLayout1ui2",De);class ft extends ti{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l,h,y,C){const I=this.length;return this.resize(I+1),this.emplace(I,l,h,y,C)}emplace(l,h,y,C,I){const D=4*l;return this.float32[D+0]=h,this.float32[D+1]=y,this.float32[D+2]=C,this.float32[D+3]=I,l}}ft.prototype.bytesPerElement=16,gn("StructArrayLayout4f16",ft);class st extends Hs{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 ie(this.anchorPointX,this.anchorPointY)}}st.prototype.size=20;class wt extends H{get(l){return new st(this,l)}}gn("CollisionBoxArray",wt);class Ct extends Hs{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(l){this._structArray.uint8[this._pos1+37]=l}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(l){this._structArray.uint8[this._pos1+38]=l}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(l){this._structArray.uint32[this._pos4+10]=l}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Ct.prototype.size=48;class Ut extends ke{get(l){return new Ct(this,l)}}gn("PlacedSymbolArray",Ut);class xt extends Hs{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(l){this._structArray.uint32[this._pos4+12]=l}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]}}xt.prototype.size=68;class cn extends _e{get(l){return new xt(this,l)}}gn("SymbolInstanceArray",cn);class Jt extends Se{getoffsetX(l){return this.float32[1*l+0]}}gn("GlyphOffsetArray",Jt);class fn extends Ve{getx(l){return this.int16[3*l+0]}gety(l){return this.int16[3*l+1]}gettileUnitDistanceFromAnchor(l){return this.int16[3*l+2]}}gn("SymbolLineVertexArray",fn);class $n extends Hs{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]}}$n.prototype.size=8;class Hn extends Ge{get(l){return new $n(this,l)}}gn("FeatureIndexArray",Hn);class Tn extends xl{}class mr extends xl{}class gr extends xl{}class ir extends u{}class ar extends m{}class xr extends x{}class Pi extends S{}class $a extends R{}class ca extends F{}class Ba extends V{}class Ks extends q{}class Go extends se{}class go extends he{}class ms extends rt{}const df=fi([{name:"a_pos",components:2,type:"Int16"}],4),{members:vi}=df;class qn{constructor(l=[]){this.segments=l}prepareSegment(l,h,y,C){let I=this.segments[this.segments.length-1];return l>qn.MAX_VERTEX_ARRAY_LENGTH&&L(`Max vertices per segment is ${qn.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${l}`),(!I||I.vertexLength+l>qn.MAX_VERTEX_ARRAY_LENGTH||I.sortKey!==C)&&(I={vertexOffset:h.length,primitiveOffset:y.length,vertexLength:0,primitiveLength:0},C!==void 0&&(I.sortKey=C),this.segments.push(I)),I}get(){return this.segments}destroy(){for(const l of this.segments)for(const h in l.vaos)l.vaos[h].destroy()}static simpleSegment(l,h,y,C){return new qn([{vertexOffset:l,primitiveOffset:h,vertexLength:y,primitiveLength:C,vaos:{},sortKey:0}])}}function pr(d,l){return 256*(d=v(Math.floor(d),0,255))+v(Math.floor(l),0,255)}qn.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,gn("SegmentVector",qn);const Ti=fi([{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 ki={exports:{}},Br={exports:{}};Br.exports=function(d,l){var h,y,C,I,D,z,B,K;for(y=d.length-(h=3&d.length),C=l,D=3432918353,z=461845907,K=0;K<y;)B=255&d.charCodeAt(K)|(255&d.charCodeAt(++K))<<8|(255&d.charCodeAt(++K))<<16|(255&d.charCodeAt(++K))<<24,++K,C=27492+(65535&(I=5*(65535&(C=(C^=B=(65535&(B=(B=(65535&B)*D+(((B>>>16)*D&65535)<<16)&4294967295)<<15|B>>>17))*z+(((B>>>16)*z&65535)<<16)&4294967295)<<13|C>>>19))+((5*(C>>>16)&65535)<<16)&4294967295))+((58964+(I>>>16)&65535)<<16);switch(B=0,h){case 3:B^=(255&d.charCodeAt(K+2))<<16;case 2:B^=(255&d.charCodeAt(K+1))<<8;case 1:C^=B=(65535&(B=(B=(65535&(B^=255&d.charCodeAt(K)))*D+(((B>>>16)*D&65535)<<16)&4294967295)<<15|B>>>17))*z+(((B>>>16)*z&65535)<<16)&4294967295}return C^=d.length,C=2246822507*(65535&(C^=C>>>16))+((2246822507*(C>>>16)&65535)<<16)&4294967295,C=3266489909*(65535&(C^=C>>>13))+((3266489909*(C>>>16)&65535)<<16)&4294967295,(C^=C>>>16)>>>0};var qo={exports:{}};qo.exports=function(d,l){for(var h,y=d.length,C=l^y,I=0;y>=4;)h=1540483477*(65535&(h=255&d.charCodeAt(I)|(255&d.charCodeAt(++I))<<8|(255&d.charCodeAt(++I))<<16|(255&d.charCodeAt(++I))<<24))+((1540483477*(h>>>16)&65535)<<16),C=1540483477*(65535&C)+((1540483477*(C>>>16)&65535)<<16)^(h=1540483477*(65535&(h^=h>>>24))+((1540483477*(h>>>16)&65535)<<16)),y-=4,++I;switch(y){case 3:C^=(255&d.charCodeAt(I+2))<<16;case 2:C^=(255&d.charCodeAt(I+1))<<8;case 1:C=1540483477*(65535&(C^=255&d.charCodeAt(I)))+((1540483477*(C>>>16)&65535)<<16)}return C=1540483477*(65535&(C^=C>>>13))+((1540483477*(C>>>16)&65535)<<16),(C^=C>>>15)>>>0};var bl=Br.exports,Ip=qo.exports;ki.exports=bl,ki.exports.murmur3=bl,ki.exports.murmur2=Ip;class mu{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(l,h,y,C){this.ids.push(my(l)),this.positions.push(h,y,C)}getPositions(l){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const h=my(l);let y=0,C=this.ids.length-1;for(;y<C;){const D=y+C>>1;this.ids[D]>=h?C=D:y=D+1}const I=[];for(;this.ids[y]===h;)I.push({index:this.positions[3*y],start:this.positions[3*y+1],end:this.positions[3*y+2]}),y++;return I}static serialize(l,h){const y=new Float64Array(l.ids),C=new Uint32Array(l.positions);return Mp(y,C,0,y.length-1),h&&h.push(y.buffer,C.buffer),{ids:y,positions:C}}static deserialize(l){const h=new mu;return h.ids=l.ids,h.positions=l.positions,h.indexed=!0,h}}function my(d){const l=+d;return!isNaN(l)&&l<=Number.MAX_SAFE_INTEGER?l:ki.exports(String(d))}function Mp(d,l,h,y){for(;h<y;){const C=d[h+y>>1];let I=h-1,D=y+1;for(;;){do I++;while(d[I]<C);do D--;while(d[D]>C);if(I>=D)break;Ws(d,I,D),Ws(l,3*I,3*D),Ws(l,3*I+1,3*D+1),Ws(l,3*I+2,3*D+2)}D-h<y-D?(Mp(d,l,h,D),h=D+1):(Mp(d,l,D+1,y),y=D)}}function Ws(d,l,h){const y=d[l];d[l]=d[h],d[h]=y}gn("FeaturePositionMap",mu);class _l{constructor(l,h){this.gl=l.gl,this.location=h}}class wl extends _l{constructor(l,h){super(l,h),this.current=0}set(l){this.current!==l&&(this.current=l,this.gl.uniform1f(this.location,l))}}class ff extends _l{constructor(l,h){super(l,h),this.current=[0,0,0,0]}set(l){l[0]===this.current[0]&&l[1]===this.current[1]&&l[2]===this.current[2]&&l[3]===this.current[3]||(this.current=l,this.gl.uniform4f(this.location,l[0],l[1],l[2],l[3]))}}class mI extends _l{constructor(l,h){super(l,h),this.current=le.transparent}set(l){l.r===this.current.r&&l.g===this.current.g&&l.b===this.current.b&&l.a===this.current.a||(this.current=l,this.gl.uniform4f(this.location,l.r,l.g,l.b,l.a))}}const Hj=new Float32Array(16);function dw(d){return[pr(255*d.r,255*d.g),pr(255*d.b,255*d.a)]}class Rp{constructor(l,h,y){this.value=l,this.uniformNames=h.map(C=>`u_${C}`),this.type=y}setUniform(l,h,y){l.set(y.constantOr(this.value))}getBinding(l,h,y){return this.type==="color"?new mI(l,h):new wl(l,h)}}class hf{constructor(l,h){this.uniformNames=h.map(y=>`u_${y}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(l,h){this.pixelRatioFrom=h.pixelRatio,this.pixelRatioTo=l.pixelRatio,this.patternFrom=h.tlbr,this.patternTo=l.tlbr}setUniform(l,h,y,C){const I=C==="u_pattern_to"?this.patternTo:C==="u_pattern_from"?this.patternFrom:C==="u_pixel_ratio_to"?this.pixelRatioTo:C==="u_pixel_ratio_from"?this.pixelRatioFrom:null;I&&l.set(I)}getBinding(l,h,y){return y.substr(0,9)==="u_pattern"?new ff(l,h):new wl(l,h)}}class Cl{constructor(l,h,y,C){this.expression=l,this.type=y,this.maxValue=0,this.paintVertexAttributes=h.map(I=>({name:`a_${I}`,type:"Float32",components:y==="color"?2:1,offset:0})),this.paintVertexArray=new C}populatePaintArray(l,h,y,C,I){const D=this.paintVertexArray.length,z=this.expression.evaluate(new $r(0),h,{},C,[],I);this.paintVertexArray.resize(l),this._setPaintValue(D,l,z)}updatePaintArray(l,h,y,C){const I=this.expression.evaluate({zoom:0},y,C);this._setPaintValue(l,h,I)}_setPaintValue(l,h,y){if(this.type==="color"){const C=dw(y);for(let I=l;I<h;I++)this.paintVertexArray.emplace(I,C[0],C[1])}else{for(let C=l;C<h;C++)this.paintVertexArray.emplace(C,y);this.maxValue=Math.max(this.maxValue,Math.abs(y))}}upload(l){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=l.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class gs{constructor(l,h,y,C,I,D){this.expression=l,this.uniformNames=h.map(z=>`u_${z}_t`),this.type=y,this.useIntegerZoom=C,this.zoom=I,this.maxValue=0,this.paintVertexAttributes=h.map(z=>({name:`a_${z}`,type:"Float32",components:y==="color"?4:2,offset:0})),this.paintVertexArray=new D}populatePaintArray(l,h,y,C,I){const D=this.expression.evaluate(new $r(this.zoom),h,{},C,[],I),z=this.expression.evaluate(new $r(this.zoom+1),h,{},C,[],I),B=this.paintVertexArray.length;this.paintVertexArray.resize(l),this._setPaintValue(B,l,D,z)}updatePaintArray(l,h,y,C){const I=this.expression.evaluate({zoom:this.zoom},y,C),D=this.expression.evaluate({zoom:this.zoom+1},y,C);this._setPaintValue(l,h,I,D)}_setPaintValue(l,h,y,C){if(this.type==="color"){const I=dw(y),D=dw(C);for(let z=l;z<h;z++)this.paintVertexArray.emplace(z,I[0],I[1],D[0],D[1])}else{for(let I=l;I<h;I++)this.paintVertexArray.emplace(I,y,C);this.maxValue=Math.max(this.maxValue,Math.abs(y),Math.abs(C))}}upload(l){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=l.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(l,h){const y=this.useIntegerZoom?Math.floor(h.zoom):h.zoom,C=v(this.expression.interpolationFactor(y,this.zoom,this.zoom+1),0,1);l.set(C)}getBinding(l,h,y){return new wl(l,h)}}class gu{constructor(l,h,y,C,I,D){this.expression=l,this.type=h,this.useIntegerZoom=y,this.zoom=C,this.layerId=D,this.zoomInPaintVertexArray=new I,this.zoomOutPaintVertexArray=new I}populatePaintArray(l,h,y){const C=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(l),this.zoomOutPaintVertexArray.resize(l),this._setPaintValues(C,l,h.patterns&&h.patterns[this.layerId],y)}updatePaintArray(l,h,y,C,I){this._setPaintValues(l,h,y.patterns&&y.patterns[this.layerId],I)}_setPaintValues(l,h,y,C){if(!C||!y)return;const{min:I,mid:D,max:z}=y,B=C[I],K=C[D],Y=C[z];if(B&&K&&Y)for(let te=l;te<h;te++)this.zoomInPaintVertexArray.emplace(te,K.tl[0],K.tl[1],K.br[0],K.br[1],B.tl[0],B.tl[1],B.br[0],B.br[1],K.pixelRatio,B.pixelRatio),this.zoomOutPaintVertexArray.emplace(te,K.tl[0],K.tl[1],K.br[0],K.br[1],Y.tl[0],Y.tl[1],Y.br[0],Y.br[1],K.pixelRatio,Y.pixelRatio)}upload(l){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=l.createVertexBuffer(this.zoomInPaintVertexArray,Ti.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=l.createVertexBuffer(this.zoomOutPaintVertexArray,Ti.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class gI{constructor(l,h,y){this.binders={},this._buffers=[];const C=[];for(const I in l.paint._values){if(!y(I))continue;const D=l.paint.get(I);if(!(D instanceof Fa&&Dr(D.property.specification)))continue;const z=Kj(I,l.type),B=D.value,K=D.property.specification.type,Y=D.property.useIntegerZoom,te=D.property.specification["property-type"],ce=te==="cross-faded"||te==="cross-faded-data-driven";if(B.kind==="constant")this.binders[I]=ce?new hf(B.value,z):new Rp(B.value,z,K),C.push(`/u_${I}`);else if(B.kind==="source"||ce){const pe=vI(I,K,"source");this.binders[I]=ce?new gu(B,K,Y,h,pe,l.id):new Cl(B,z,K,pe),C.push(`/a_${I}`)}else{const pe=vI(I,K,"composite");this.binders[I]=new gs(B,z,K,Y,h,pe),C.push(`/z_${I}`)}}this.cacheKey=C.sort().join("")}getMaxValue(l){const h=this.binders[l];return h instanceof Cl||h instanceof gs?h.maxValue:0}populatePaintArrays(l,h,y,C,I){for(const D in this.binders){const z=this.binders[D];(z instanceof Cl||z instanceof gs||z instanceof gu)&&z.populatePaintArray(l,h,y,C,I)}}setConstantPatternPositions(l,h){for(const y in this.binders){const C=this.binders[y];C instanceof hf&&C.setConstantPatternPositions(l,h)}}updatePaintArrays(l,h,y,C,I){let D=!1;for(const z in l){const B=h.getPositions(z);for(const K of B){const Y=y.feature(K.index);for(const te in this.binders){const ce=this.binders[te];if((ce instanceof Cl||ce instanceof gs||ce instanceof gu)&&ce.expression.isStateDependent===!0){const pe=C.paint.get(te);ce.expression=pe.value,ce.updatePaintArray(K.start,K.end,Y,l[z],I),D=!0}}}}return D}defines(){const l=[];for(const h in this.binders){const y=this.binders[h];(y instanceof Rp||y instanceof hf)&&l.push(...y.uniformNames.map(C=>`#define HAS_UNIFORM_${C}`))}return l}getBinderAttributes(){const l=[];for(const h in this.binders){const y=this.binders[h];if(y instanceof Cl||y instanceof gs)for(let C=0;C<y.paintVertexAttributes.length;C++)l.push(y.paintVertexAttributes[C].name);else if(y instanceof gu)for(let C=0;C<Ti.members.length;C++)l.push(Ti.members[C].name)}return l}getBinderUniforms(){const l=[];for(const h in this.binders){const y=this.binders[h];if(y instanceof Rp||y instanceof hf||y instanceof gs)for(const C of y.uniformNames)l.push(C)}return l}getPaintVertexBuffers(){return this._buffers}getUniforms(l,h){const y=[];for(const C in this.binders){const I=this.binders[C];if(I instanceof Rp||I instanceof hf||I instanceof gs){for(const D of I.uniformNames)if(h[D]){const z=I.getBinding(l,h[D],D);y.push({name:D,property:C,binding:z})}}}return y}setUniforms(l,h,y,C){for(const{name:I,property:D,binding:z}of h)this.binders[D].setUniform(z,C,y.get(D),I)}updatePaintBuffers(l){this._buffers=[];for(const h in this.binders){const y=this.binders[h];if(l&&y instanceof gu){const C=l.fromScale===2?y.zoomInPaintVertexBuffer:y.zoomOutPaintVertexBuffer;C&&this._buffers.push(C)}else(y instanceof Cl||y instanceof gs)&&y.paintVertexBuffer&&this._buffers.push(y.paintVertexBuffer)}}upload(l){for(const h in this.binders){const y=this.binders[h];(y instanceof Cl||y instanceof gs||y instanceof gu)&&y.upload(l)}this.updatePaintBuffers()}destroy(){for(const l in this.binders){const h=this.binders[l];(h instanceof Cl||h instanceof gs||h instanceof gu)&&h.destroy()}}}class Lc{constructor(l,h,y=()=>!0){this.programConfigurations={};for(const C of l)this.programConfigurations[C.id]=new gI(C,h,y);this.needsUpload=!1,this._featureMap=new mu,this._bufferOffset=0}populatePaintArrays(l,h,y,C,I,D){for(const z in this.programConfigurations)this.programConfigurations[z].populatePaintArrays(l,h,C,I,D);h.id!==void 0&&this._featureMap.add(h.id,y,this._bufferOffset,l),this._bufferOffset=l,this.needsUpload=!0}updatePaintArrays(l,h,y,C){for(const I of y)this.needsUpload=this.programConfigurations[I.id].updatePaintArrays(l,this._featureMap,h,I,C)||this.needsUpload}get(l){return this.programConfigurations[l]}upload(l){if(this.needsUpload){for(const h in this.programConfigurations)this.programConfigurations[h].upload(l);this.needsUpload=!1}}destroy(){for(const l in this.programConfigurations)this.programConfigurations[l].destroy()}}function Kj(d,l){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"]}[d]||[d.replace(`${l}-`,"").replace(/-/g,"_")]}function vI(d,l,h){const y={color:{source:x,composite:ft},number:{source:Se,composite:x}},C=function(I){return{"line-pattern":{source:Pi,composite:Pi},"fill-pattern":{source:Pi,composite:Pi},"fill-extrusion-pattern":{source:Pi,composite:Pi}}[I]}(d);return C&&C[h]||y[l][h]}gn("ConstantBinder",Rp),gn("CrossFadedConstantBinder",hf),gn("SourceExpressionBinder",Cl),gn("CrossFadedCompositeBinder",gu),gn("CompositeExpressionBinder",gs),gn("ProgramConfiguration",gI,{omit:["_buffers"]}),gn("ProgramConfigurationSet",Lc);var yi=8192;const fw=Math.pow(2,14)-1,yI=-fw-1;function Fc(d){const l=yi/d.extent,h=d.loadGeometry();for(let y=0;y<h.length;y++){const C=h[y];for(let I=0;I<C.length;I++){const D=C[I],z=Math.round(D.x*l),B=Math.round(D.y*l);D.x=v(z,yI,fw),D.y=v(B,yI,fw),(z<D.x||z>D.x+1||B<D.y||B>D.y+1)&&L("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return h}function zc(d,l){return{type:d.type,id:d.id,properties:d.properties,geometry:l?Fc(d):[]}}function gy(d,l,h,y,C){d.emplaceBack(2*l+(y+1)/2,2*h+(C+1)/2)}class hw{constructor(l){this.zoom=l.zoom,this.overscaling=l.overscaling,this.layers=l.layers,this.layerIds=this.layers.map(h=>h.id),this.index=l.index,this.hasPattern=!1,this.layoutVertexArray=new mr,this.indexArray=new go,this.segments=new qn,this.programConfigurations=new Lc(l.layers,l.zoom),this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(l,h,y){const C=this.layers[0],I=[];let D=null,z=!1;C.type==="circle"&&(D=C.layout.get("circle-sort-key"),z=!D.isConstant());for(const{feature:B,id:K,index:Y,sourceLayerIndex:te}of l){const ce=this.layers[0]._featureFilter.needGeometry,pe=zc(B,ce);if(!this.layers[0]._featureFilter.filter(new $r(this.zoom),pe,y))continue;const ve=z?D.evaluate(pe,{},y):void 0,Ne={id:K,properties:B.properties,type:B.type,sourceLayerIndex:te,index:Y,geometry:ce?pe.geometry:Fc(B),patterns:{},sortKey:ve};I.push(Ne)}z&&I.sort((B,K)=>B.sortKey-K.sortKey);for(const B of I){const{geometry:K,index:Y,sourceLayerIndex:te}=B,ce=l[Y].feature;this.addFeature(B,K,Y,y),h.featureIndex.insert(ce,K,Y,te,this.index)}}update(l,h,y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(l,h,this.stateDependentLayers,y)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(l){this.uploaded||(this.layoutVertexBuffer=l.createVertexBuffer(this.layoutVertexArray,vi),this.indexBuffer=l.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(l),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(l,h,y,C){for(const I of h)for(const D of I){const z=D.x,B=D.y;if(z<0||z>=yi||B<0||B>=yi)continue;const K=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,l.sortKey),Y=K.vertexLength;gy(this.layoutVertexArray,z,B,-1,-1),gy(this.layoutVertexArray,z,B,1,-1),gy(this.layoutVertexArray,z,B,1,1),gy(this.layoutVertexArray,z,B,-1,1),this.indexArray.emplaceBack(Y,Y+1,Y+2),this.indexArray.emplaceBack(Y,Y+3,Y+2),K.vertexLength+=4,K.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,l,y,{},C)}}function xI(d,l){for(let h=0;h<d.length;h++)if(pf(l,d[h]))return!0;for(let h=0;h<l.length;h++)if(pf(d,l[h]))return!0;return!!pw(d,l)}function Wj(d,l,h){return!!pf(d,l)||!!mw(l,d,h)}function bI(d,l){if(d.length===1)return wI(l,d[0]);for(let h=0;h<l.length;h++){const y=l[h];for(let C=0;C<y.length;C++)if(pf(d,y[C]))return!0}for(let h=0;h<d.length;h++)if(wI(l,d[h]))return!0;for(let h=0;h<l.length;h++)if(pw(d,l[h]))return!0;return!1}function Gj(d,l,h){if(d.length>1){if(pw(d,l))return!0;for(let y=0;y<l.length;y++)if(mw(l[y],d,h))return!0}for(let y=0;y<d.length;y++)if(mw(d[y],l,h))return!0;return!1}function pw(d,l){if(d.length===0||l.length===0)return!1;for(let h=0;h<d.length-1;h++){const y=d[h],C=d[h+1];for(let I=0;I<l.length-1;I++)if(qj(y,C,l[I],l[I+1]))return!0}return!1}function qj(d,l,h,y){return $(d,h,y)!==$(l,h,y)&&$(d,l,h)!==$(d,l,y)}function mw(d,l,h){const y=h*h;if(l.length===1)return d.distSqr(l[0])<y;for(let C=1;C<l.length;C++)if(_I(d,l[C-1],l[C])<y)return!0;return!1}function _I(d,l,h){const y=l.distSqr(h);if(y===0)return d.distSqr(l);const C=((d.x-l.x)*(h.x-l.x)+(d.y-l.y)*(h.y-l.y))/y;return d.distSqr(C<0?l:C>1?h:h.sub(l)._mult(C)._add(l))}function wI(d,l){let h,y,C,I=!1;for(let D=0;D<d.length;D++){h=d[D];for(let z=0,B=h.length-1;z<h.length;B=z++)y=h[z],C=h[B],y.y>l.y!=C.y>l.y&&l.x<(C.x-y.x)*(l.y-y.y)/(C.y-y.y)+y.x&&(I=!I)}return I}function pf(d,l){let h=!1;for(let y=0,C=d.length-1;y<d.length;C=y++){const I=d[y],D=d[C];I.y>l.y!=D.y>l.y&&l.x<(D.x-I.x)*(l.y-I.y)/(D.y-I.y)+I.x&&(h=!h)}return h}function Zj(d,l,h){const y=h[0],C=h[2];if(d.x<y.x&&l.x<y.x||d.x>C.x&&l.x>C.x||d.y<y.y&&l.y<y.y||d.y>C.y&&l.y>C.y)return!1;const I=$(d,l,h[0]);return I!==$(d,l,h[1])||I!==$(d,l,h[2])||I!==$(d,l,h[3])}function Dp(d,l,h){const y=l.paint.get(d).value;return y.kind==="constant"?y.value:h.programConfigurations.get(l.id).getMaxValue(d)}function vy(d){return Math.sqrt(d[0]*d[0]+d[1]*d[1])}function yy(d,l,h,y,C){if(!l[0]&&!l[1])return d;const I=ie.convert(l)._mult(C);h==="viewport"&&I._rotate(-y);const D=[];for(let z=0;z<d.length;z++)D.push(d[z].sub(I));return D}gn("CircleBucket",hw,{omit:["layers"]});const Xj=new $i({"circle-sort-key":new Rn(ze.layout_circle["circle-sort-key"])});var Yj={paint:new $i({"circle-radius":new Rn(ze.paint_circle["circle-radius"]),"circle-color":new Rn(ze.paint_circle["circle-color"]),"circle-blur":new Rn(ze.paint_circle["circle-blur"]),"circle-opacity":new Rn(ze.paint_circle["circle-opacity"]),"circle-translate":new xn(ze.paint_circle["circle-translate"]),"circle-translate-anchor":new xn(ze.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new xn(ze.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new xn(ze.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Rn(ze.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Rn(ze.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Rn(ze.paint_circle["circle-stroke-opacity"])}),layout:Xj},vo=1e-6,yo=typeof Float32Array<"u"?Float32Array:Array;function CI(){var d=new yo(9);return yo!=Float32Array&&(d[1]=0,d[2]=0,d[3]=0,d[5]=0,d[6]=0,d[7]=0),d[0]=1,d[4]=1,d[8]=1,d}function gw(d){return d[0]=1,d[1]=0,d[2]=0,d[3]=0,d[4]=0,d[5]=1,d[6]=0,d[7]=0,d[8]=0,d[9]=0,d[10]=1,d[11]=0,d[12]=0,d[13]=0,d[14]=0,d[15]=1,d}function SI(d,l,h){var y=l[0],C=l[1],I=l[2],D=l[3],z=l[4],B=l[5],K=l[6],Y=l[7],te=l[8],ce=l[9],pe=l[10],ve=l[11],Ne=l[12],Oe=l[13],Je=l[14],ht=l[15],qe=h[0],lt=h[1],Dt=h[2],Mt=h[3];return d[0]=qe*y+lt*z+Dt*te+Mt*Ne,d[1]=qe*C+lt*B+Dt*ce+Mt*Oe,d[2]=qe*I+lt*K+Dt*pe+Mt*Je,d[3]=qe*D+lt*Y+Dt*ve+Mt*ht,d[4]=(qe=h[4])*y+(lt=h[5])*z+(Dt=h[6])*te+(Mt=h[7])*Ne,d[5]=qe*C+lt*B+Dt*ce+Mt*Oe,d[6]=qe*I+lt*K+Dt*pe+Mt*Je,d[7]=qe*D+lt*Y+Dt*ve+Mt*ht,d[8]=(qe=h[8])*y+(lt=h[9])*z+(Dt=h[10])*te+(Mt=h[11])*Ne,d[9]=qe*C+lt*B+Dt*ce+Mt*Oe,d[10]=qe*I+lt*K+Dt*pe+Mt*Je,d[11]=qe*D+lt*Y+Dt*ve+Mt*ht,d[12]=(qe=h[12])*y+(lt=h[13])*z+(Dt=h[14])*te+(Mt=h[15])*Ne,d[13]=qe*C+lt*B+Dt*ce+Mt*Oe,d[14]=qe*I+lt*K+Dt*pe+Mt*Je,d[15]=qe*D+lt*Y+Dt*ve+Mt*ht,d}Math.hypot||(Math.hypot=function(){for(var d=0,l=arguments.length;l--;)d+=arguments[l]*arguments[l];return Math.sqrt(d)});var Op,Qj=SI;function EI(){var d=new yo(3);return yo!=Float32Array&&(d[0]=0,d[1]=0,d[2]=0),d}function PI(d,l,h){var y=new yo(3);return y[0]=d,y[1]=l,y[2]=h,y}function xy(d,l,h){var y=l[0],C=l[1],I=l[2],D=l[3];return d[0]=h[0]*y+h[4]*C+h[8]*I+h[12]*D,d[1]=h[1]*y+h[5]*C+h[9]*I+h[13]*D,d[2]=h[2]*y+h[6]*C+h[10]*I+h[14]*D,d[3]=h[3]*y+h[7]*C+h[11]*I+h[15]*D,d}function TI(){var d=new yo(4);return yo!=Float32Array&&(d[0]=0,d[1]=0,d[2]=0),d[3]=1,d}function kI(d,l){const h=xy([],[d.x,d.y,0,1],l);return new ie(h[0]/h[3],h[1]/h[3])}EI(),Op=new yo(4),yo!=Float32Array&&(Op[0]=0,Op[1]=0,Op[2]=0,Op[3]=0),EI(),PI(1,0,0),PI(0,1,0),TI(),TI(),CI(),function(){var d;d=new yo(2),yo!=Float32Array&&(d[0]=0,d[1]=0)}();class II extends hw{}gn("HeatmapBucket",II,{omit:["layers"]});var Jj={paint:new $i({"heatmap-radius":new Rn(ze.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Rn(ze.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new xn(ze.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Us(ze.paint_heatmap["heatmap-color"]),"heatmap-opacity":new xn(ze.paint_heatmap["heatmap-opacity"])})};function vw(d,{width:l,height:h},y,C){if(C){if(C instanceof Uint8ClampedArray)C=new Uint8Array(C.buffer);else if(C.length!==l*h*y)throw new RangeError(`mismatched image size. expected: ${C.length} but got: ${l*h*y}`)}else C=new Uint8Array(l*h*y);return d.width=l,d.height=h,d.data=C,d}function MI(d,{width:l,height:h},y){if(l===d.width&&h===d.height)return;const C=vw({},{width:l,height:h},y);yw(d,C,{x:0,y:0},{x:0,y:0},{width:Math.min(d.width,l),height:Math.min(d.height,h)},y),d.width=l,d.height=h,d.data=C.data}function yw(d,l,h,y,C,I){if(C.width===0||C.height===0)return l;if(C.width>d.width||C.height>d.height||h.x>d.width-C.width||h.y>d.height-C.height)throw new RangeError("out of range source coordinates for image copy");if(C.width>l.width||C.height>l.height||y.x>l.width-C.width||y.y>l.height-C.height)throw new RangeError("out of range destination coordinates for image copy");const D=d.data,z=l.data;if(D===z)throw new Error("srcData equals dstData, so image is already copied");for(let B=0;B<C.height;B++){const K=((h.y+B)*d.width+h.x)*I,Y=((y.y+B)*l.width+y.x)*I;for(let te=0;te<C.width*I;te++)z[Y+te]=D[K+te]}return l}class Ap{constructor(l,h){vw(this,l,1,h)}resize(l){MI(this,l,1)}clone(){return new Ap({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(l,h,y,C,I){yw(l,h,y,C,I,1)}}class da{constructor(l,h){vw(this,l,4,h)}resize(l){MI(this,l,4)}replace(l,h){h?this.data.set(l):this.data=l instanceof Uint8ClampedArray?new Uint8Array(l.buffer):l}clone(){return new da({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(l,h,y,C,I){yw(l,h,y,C,I,4)}}function RI(d){const l={},h=d.resolution||256,y=d.clips?d.clips.length:1,C=d.image||new da({width:h,height:y});if(Math.log(h)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${h}`);const I=(D,z,B)=>{l[d.evaluationKey]=B;const K=d.expression.evaluate(l);C.data[D+z+0]=Math.floor(255*K.r/K.a),C.data[D+z+1]=Math.floor(255*K.g/K.a),C.data[D+z+2]=Math.floor(255*K.b/K.a),C.data[D+z+3]=Math.floor(255*K.a)};if(d.clips)for(let D=0,z=0;D<y;++D,z+=4*h)for(let B=0,K=0;B<h;B++,K+=4){const Y=B/(h-1),{start:te,end:ce}=d.clips[D];I(z,K,te*(1-Y)+ce*Y)}else for(let D=0,z=0;D<h;D++,z+=4)I(0,z,D/(h-1));return C}gn("AlphaImage",Ap),gn("RGBAImage",da);var eH={paint:new $i({"hillshade-illumination-direction":new xn(ze.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new xn(ze.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new xn(ze.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new xn(ze.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new xn(ze.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new xn(ze.paint_hillshade["hillshade-accent-color"])})};const tH=fi([{name:"a_pos",components:2,type:"Int16"}],4),{members:nH}=tH;var by={exports:{}};function _y(d,l,h){h=h||2;var y,C,I,D,z,B,K,Y=l&&l.length,te=Y?l[0]*h:d.length,ce=DI(d,0,te,h,!0),pe=[];if(!ce||ce.next===ce.prev)return pe;if(Y&&(ce=function(Ne,Oe,Je,ht){var qe,lt,Dt,Mt=[];for(qe=0,lt=Oe.length;qe<lt;qe++)(Dt=DI(Ne,Oe[qe]*ht,qe<lt-1?Oe[qe+1]*ht:Ne.length,ht,!1))===Dt.next&&(Dt.steiner=!0),Mt.push(cH(Dt));for(Mt.sort(sH),qe=0;qe<Mt.length;qe++)Je=lH(Mt[qe],Je);return Je}(d,l,ce,h)),d.length>80*h){y=I=d[0],C=D=d[1];for(var ve=h;ve<te;ve+=h)(z=d[ve])<y&&(y=z),(B=d[ve+1])<C&&(C=B),z>I&&(I=z),B>D&&(D=B);K=(K=Math.max(I-y,D-C))!==0?32767/K:0}return Np(ce,pe,h,y,C,K,0),pe}function DI(d,l,h,y,C){var I,D;if(C===_w(d,l,h,y)>0)for(I=l;I<h;I+=y)D=NI(I,d[I],d[I+1],D);else for(I=h-y;I>=l;I-=y)D=NI(I,d[I],d[I+1],D);return D&&wy(D,D.next)&&(Fp(D),D=D.next),D}function $c(d,l){if(!d)return d;l||(l=d);var h,y=d;do if(h=!1,y.steiner||!wy(y,y.next)&&li(y.prev,y,y.next)!==0)y=y.next;else{if(Fp(y),(y=l=y.prev)===y.next)break;h=!0}while(h||y!==l);return l}function Np(d,l,h,y,C,I,D){if(d){!D&&I&&function(Y,te,ce,pe){var ve=Y;do ve.z===0&&(ve.z=xw(ve.x,ve.y,te,ce,pe)),ve.prevZ=ve.prev,ve.nextZ=ve.next,ve=ve.next;while(ve!==Y);ve.prevZ.nextZ=null,ve.prevZ=null,function(Ne){var Oe,Je,ht,qe,lt,Dt,Mt,hn,vn=1;do{for(Je=Ne,Ne=null,lt=null,Dt=0;Je;){for(Dt++,ht=Je,Mt=0,Oe=0;Oe<vn&&(Mt++,ht=ht.nextZ);Oe++);for(hn=vn;Mt>0||hn>0&&ht;)Mt!==0&&(hn===0||!ht||Je.z<=ht.z)?(qe=Je,Je=Je.nextZ,Mt--):(qe=ht,ht=ht.nextZ,hn--),lt?lt.nextZ=qe:Ne=qe,qe.prevZ=lt,lt=qe;Je=ht}lt.nextZ=null,vn*=2}while(Dt>1)}(ve)}(d,y,C,I);for(var z,B,K=d;d.prev!==d.next;)if(z=d.prev,B=d.next,I?iH(d,y,C,I):rH(d))l.push(z.i/h|0),l.push(d.i/h|0),l.push(B.i/h|0),Fp(d),d=B.next,K=B.next;else if((d=B)===K){D?D===1?Np(d=oH($c(d),l,h),l,h,y,C,I,2):D===2&&aH(d,l,h,y,C,I):Np($c(d),l,h,y,C,I,1);break}}}function rH(d){var l=d.prev,h=d,y=d.next;if(li(l,h,y)>=0)return!1;for(var C=l.x,I=h.x,D=y.x,z=l.y,B=h.y,K=y.y,Y=C<I?C<D?C:D:I<D?I:D,te=z<B?z<K?z:K:B<K?B:K,ce=C>I?C>D?C:D:I>D?I:D,pe=z>B?z>K?z:K:B>K?B:K,ve=y.next;ve!==l;){if(ve.x>=Y&&ve.x<=ce&&ve.y>=te&&ve.y<=pe&&mf(C,z,I,B,D,K,ve.x,ve.y)&&li(ve.prev,ve,ve.next)>=0)return!1;ve=ve.next}return!0}function iH(d,l,h,y){var C=d.prev,I=d,D=d.next;if(li(C,I,D)>=0)return!1;for(var z=C.x,B=I.x,K=D.x,Y=C.y,te=I.y,ce=D.y,pe=z<B?z<K?z:K:B<K?B:K,ve=Y<te?Y<ce?Y:ce:te<ce?te:ce,Ne=z>B?z>K?z:K:B>K?B:K,Oe=Y>te?Y>ce?Y:ce:te>ce?te:ce,Je=xw(pe,ve,l,h,y),ht=xw(Ne,Oe,l,h,y),qe=d.prevZ,lt=d.nextZ;qe&&qe.z>=Je&&lt&&lt.z<=ht;){if(qe.x>=pe&&qe.x<=Ne&&qe.y>=ve&&qe.y<=Oe&&qe!==C&&qe!==D&&mf(z,Y,B,te,K,ce,qe.x,qe.y)&&li(qe.prev,qe,qe.next)>=0||(qe=qe.prevZ,lt.x>=pe&&lt.x<=Ne&&lt.y>=ve&&lt.y<=Oe&&lt!==C&&lt!==D&&mf(z,Y,B,te,K,ce,lt.x,lt.y)&&li(lt.prev,lt,lt.next)>=0))return!1;lt=lt.nextZ}for(;qe&&qe.z>=Je;){if(qe.x>=pe&&qe.x<=Ne&&qe.y>=ve&&qe.y<=Oe&&qe!==C&&qe!==D&&mf(z,Y,B,te,K,ce,qe.x,qe.y)&&li(qe.prev,qe,qe.next)>=0)return!1;qe=qe.prevZ}for(;lt&&lt.z<=ht;){if(lt.x>=pe&&lt.x<=Ne&&lt.y>=ve&&lt.y<=Oe&&lt!==C&&lt!==D&&mf(z,Y,B,te,K,ce,lt.x,lt.y)&&li(lt.prev,lt,lt.next)>=0)return!1;lt=lt.nextZ}return!0}function oH(d,l,h){var y=d;do{var C=y.prev,I=y.next.next;!wy(C,I)&&OI(C,y,y.next,I)&&Lp(C,I)&&Lp(I,C)&&(l.push(C.i/h|0),l.push(y.i/h|0),l.push(I.i/h|0),Fp(y),Fp(y.next),y=d=I),y=y.next}while(y!==d);return $c(y)}function aH(d,l,h,y,C,I){var D=d;do{for(var z=D.next.next;z!==D.prev;){if(D.i!==z.i&&dH(D,z)){var B=AI(D,z);return D=$c(D,D.next),B=$c(B,B.next),Np(D,l,h,y,C,I,0),void Np(B,l,h,y,C,I,0)}z=z.next}D=D.next}while(D!==d)}function sH(d,l){return d.x-l.x}function lH(d,l){var h=function(C,I){var D,z=I,B=C.x,K=C.y,Y=-1/0;do{if(K<=z.y&&K>=z.next.y&&z.next.y!==z.y){var te=z.x+(K-z.y)*(z.next.x-z.x)/(z.next.y-z.y);if(te<=B&&te>Y&&(Y=te,D=z.x<z.next.x?z:z.next,te===B))return D}z=z.next}while(z!==I);if(!D)return null;var ce,pe=D,ve=D.x,Ne=D.y,Oe=1/0;z=D;do B>=z.x&&z.x>=ve&&B!==z.x&&mf(K<Ne?B:Y,K,ve,Ne,K<Ne?Y:B,K,z.x,z.y)&&(ce=Math.abs(K-z.y)/(B-z.x),Lp(z,C)&&(ce<Oe||ce===Oe&&(z.x>D.x||z.x===D.x&&uH(D,z)))&&(D=z,Oe=ce)),z=z.next;while(z!==pe);return D}(d,l);if(!h)return l;var y=AI(h,d);return $c(y,y.next),$c(h,h.next)}function uH(d,l){return li(d.prev,d,l.prev)<0&&li(l.next,d,d.next)<0}function xw(d,l,h,y,C){return(d=1431655765&((d=858993459&((d=252645135&((d=16711935&((d=(d-h)*C|0)|d<<8))|d<<4))|d<<2))|d<<1))|(l=1431655765&((l=858993459&((l=252645135&((l=16711935&((l=(l-y)*C|0)|l<<8))|l<<4))|l<<2))|l<<1))<<1}function cH(d){var l=d,h=d;do(l.x<h.x||l.x===h.x&&l.y<h.y)&&(h=l),l=l.next;while(l!==d);return h}function mf(d,l,h,y,C,I,D,z){return(C-D)*(l-z)>=(d-D)*(I-z)&&(d-D)*(y-z)>=(h-D)*(l-z)&&(h-D)*(I-z)>=(C-D)*(y-z)}function dH(d,l){return d.next.i!==l.i&&d.prev.i!==l.i&&!function(h,y){var C=h;do{if(C.i!==h.i&&C.next.i!==h.i&&C.i!==y.i&&C.next.i!==y.i&&OI(C,C.next,h,y))return!0;C=C.next}while(C!==h);return!1}(d,l)&&(Lp(d,l)&&Lp(l,d)&&function(h,y){var C=h,I=!1,D=(h.x+y.x)/2,z=(h.y+y.y)/2;do C.y>z!=C.next.y>z&&C.next.y!==C.y&&D<(C.next.x-C.x)*(z-C.y)/(C.next.y-C.y)+C.x&&(I=!I),C=C.next;while(C!==h);return I}(d,l)&&(li(d.prev,d,l.prev)||li(d,l.prev,l))||wy(d,l)&&li(d.prev,d,d.next)>0&&li(l.prev,l,l.next)>0)}function li(d,l,h){return(l.y-d.y)*(h.x-l.x)-(l.x-d.x)*(h.y-l.y)}function wy(d,l){return d.x===l.x&&d.y===l.y}function OI(d,l,h,y){var C=Sy(li(d,l,h)),I=Sy(li(d,l,y)),D=Sy(li(h,y,d)),z=Sy(li(h,y,l));return C!==I&&D!==z||!(C!==0||!Cy(d,h,l))||!(I!==0||!Cy(d,y,l))||!(D!==0||!Cy(h,d,y))||!(z!==0||!Cy(h,l,y))}function Cy(d,l,h){return l.x<=Math.max(d.x,h.x)&&l.x>=Math.min(d.x,h.x)&&l.y<=Math.max(d.y,h.y)&&l.y>=Math.min(d.y,h.y)}function Sy(d){return d>0?1:d<0?-1:0}function Lp(d,l){return li(d.prev,d,d.next)<0?li(d,l,d.next)>=0&&li(d,d.prev,l)>=0:li(d,l,d.prev)<0||li(d,d.next,l)<0}function AI(d,l){var h=new bw(d.i,d.x,d.y),y=new bw(l.i,l.x,l.y),C=d.next,I=l.prev;return d.next=l,l.prev=d,h.next=C,C.prev=h,y.next=h,h.prev=y,I.next=y,y.prev=I,y}function NI(d,l,h,y){var C=new bw(d,l,h);return y?(C.next=y.next,C.prev=y,y.next.prev=C,y.next=C):(C.prev=C,C.next=C),C}function Fp(d){d.next.prev=d.prev,d.prev.next=d.next,d.prevZ&&(d.prevZ.nextZ=d.nextZ),d.nextZ&&(d.nextZ.prevZ=d.prevZ)}function bw(d,l,h){this.i=d,this.x=l,this.y=h,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function _w(d,l,h,y){for(var C=0,I=l,D=h-y;I<h;I+=y)C+=(d[D]-d[I])*(d[I+1]+d[D+1]),D=I;return C}function fH(d,l,h,y,C){LI(d,l,h||0,y||d.length-1,C||hH)}function LI(d,l,h,y,C){for(;y>h;){if(y-h>600){var I=y-h+1,D=l-h+1,z=Math.log(I),B=.5*Math.exp(2*z/3),K=.5*Math.sqrt(z*B*(I-B)/I)*(D-I/2<0?-1:1);LI(d,l,Math.max(h,Math.floor(l-D*B/I+K)),Math.min(y,Math.floor(l+(I-D)*B/I+K)),C)}var Y=d[l],te=h,ce=y;for(zp(d,h,l),C(d[y],Y)>0&&zp(d,h,y);te<ce;){for(zp(d,te,ce),te++,ce--;C(d[te],Y)<0;)te++;for(;C(d[ce],Y)>0;)ce--}C(d[h],Y)===0?zp(d,h,ce):zp(d,++ce,y),ce<=l&&(h=ce+1),l<=ce&&(y=ce-1)}}function zp(d,l,h){var y=d[l];d[l]=d[h],d[h]=y}function hH(d,l){return d<l?-1:d>l?1:0}function ww(d,l){const h=d.length;if(h<=1)return[d];const y=[];let C,I;for(let D=0;D<h;D++){const z=j(d[D]);z!==0&&(d[D].area=Math.abs(z),I===void 0&&(I=z<0),I===z<0?(C&&y.push(C),C=[d[D]]):C.push(d[D]))}if(C&&y.push(C),l>1)for(let D=0;D<y.length;D++)y[D].length<=l||(fH(y[D],l,1,y[D].length-1,pH),y[D]=y[D].slice(0,l));return y}function pH(d,l){return l.area-d.area}function Cw(d,l,h){const y=h.patternDependencies;let C=!1;for(const I of l){const D=I.paint.get(`${d}-pattern`);D.isConstant()||(C=!0);const z=D.constantOr(null);z&&(C=!0,y[z.to]=!0,y[z.from]=!0)}return C}function Sw(d,l,h,y,C){const I=C.patternDependencies;for(const D of l){const z=D.paint.get(`${d}-pattern`).value;if(z.kind!=="constant"){let B=z.evaluate({zoom:y-1},h,{},C.availableImages),K=z.evaluate({zoom:y},h,{},C.availableImages),Y=z.evaluate({zoom:y+1},h,{},C.availableImages);B=B&&B.name?B.name:B,K=K&&K.name?K.name:K,Y=Y&&Y.name?Y.name:Y,I[B]=!0,I[K]=!0,I[Y]=!0,h.patterns[D.id]={min:B,mid:K,max:Y}}}return h}by.exports=_y,by.exports.default=_y,_y.deviation=function(d,l,h,y){var C=l&&l.length,I=Math.abs(_w(d,0,C?l[0]*h:d.length,h));if(C)for(var D=0,z=l.length;D<z;D++)I-=Math.abs(_w(d,l[D]*h,D<z-1?l[D+1]*h:d.length,h));var B=0;for(D=0;D<y.length;D+=3){var K=y[D]*h,Y=y[D+1]*h,te=y[D+2]*h;B+=Math.abs((d[K]-d[te])*(d[Y+1]-d[K+1])-(d[K]-d[Y])*(d[te+1]-d[K+1]))}return I===0&&B===0?0:Math.abs((B-I)/I)},_y.flatten=function(d){for(var l=d[0][0].length,h={vertices:[],holes:[],dimensions:l},y=0,C=0;C<d.length;C++){for(var I=0;I<d[C].length;I++)for(var D=0;D<l;D++)h.vertices.push(d[C][I][D]);C>0&&h.holes.push(y+=d[C-1].length)}return h};class Ew{constructor(l){this.zoom=l.zoom,this.overscaling=l.overscaling,this.layers=l.layers,this.layerIds=this.layers.map(h=>h.id),this.index=l.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new gr,this.indexArray=new go,this.indexArray2=new ms,this.programConfigurations=new Lc(l.layers,l.zoom),this.segments=new qn,this.segments2=new qn,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(l,h,y){this.hasPattern=Cw("fill",this.layers,h);const C=this.layers[0].layout.get("fill-sort-key"),I=!C.isConstant(),D=[];for(const{feature:z,id:B,index:K,sourceLayerIndex:Y}of l){const te=this.layers[0]._featureFilter.needGeometry,ce=zc(z,te);if(!this.layers[0]._featureFilter.filter(new $r(this.zoom),ce,y))continue;const pe=I?C.evaluate(ce,{},y,h.availableImages):void 0,ve={id:B,properties:z.properties,type:z.type,sourceLayerIndex:Y,index:K,geometry:te?ce.geometry:Fc(z),patterns:{},sortKey:pe};D.push(ve)}I&&D.sort((z,B)=>z.sortKey-B.sortKey);for(const z of D){const{geometry:B,index:K,sourceLayerIndex:Y}=z;if(this.hasPattern){const te=Sw("fill",this.layers,z,this.zoom,h);this.patternFeatures.push(te)}else this.addFeature(z,B,K,y,{});h.featureIndex.insert(l[K].feature,B,K,Y,this.index)}}update(l,h,y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(l,h,this.stateDependentLayers,y)}addFeatures(l,h,y){for(const C of this.patternFeatures)this.addFeature(C,C.geometry,C.index,h,y)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(l){this.uploaded||(this.layoutVertexBuffer=l.createVertexBuffer(this.layoutVertexArray,nH),this.indexBuffer=l.createIndexBuffer(this.indexArray),this.indexBuffer2=l.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(l),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(l,h,y,C,I){for(const D of ww(h,500)){let z=0;for(const pe of D)z+=pe.length;const B=this.segments.prepareSegment(z,this.layoutVertexArray,this.indexArray),K=B.vertexLength,Y=[],te=[];for(const pe of D){if(pe.length===0)continue;pe!==D[0]&&te.push(Y.length/2);const ve=this.segments2.prepareSegment(pe.length,this.layoutVertexArray,this.indexArray2),Ne=ve.vertexLength;this.layoutVertexArray.emplaceBack(pe[0].x,pe[0].y),this.indexArray2.emplaceBack(Ne+pe.length-1,Ne),Y.push(pe[0].x),Y.push(pe[0].y);for(let Oe=1;Oe<pe.length;Oe++)this.layoutVertexArray.emplaceBack(pe[Oe].x,pe[Oe].y),this.indexArray2.emplaceBack(Ne+Oe-1,Ne+Oe),Y.push(pe[Oe].x),Y.push(pe[Oe].y);ve.vertexLength+=pe.length,ve.primitiveLength+=pe.length}const ce=by.exports(Y,te);for(let pe=0;pe<ce.length;pe+=3)this.indexArray.emplaceBack(K+ce[pe],K+ce[pe+1],K+ce[pe+2]);B.vertexLength+=z,B.primitiveLength+=ce.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,l,y,I,C)}}gn("FillBucket",Ew,{omit:["layers","patternFeatures"]});const mH=new $i({"fill-sort-key":new Rn(ze.layout_fill["fill-sort-key"])});var gH={paint:new $i({"fill-antialias":new xn(ze.paint_fill["fill-antialias"]),"fill-opacity":new Rn(ze.paint_fill["fill-opacity"]),"fill-color":new Rn(ze.paint_fill["fill-color"]),"fill-outline-color":new Rn(ze.paint_fill["fill-outline-color"]),"fill-translate":new xn(ze.paint_fill["fill-translate"]),"fill-translate-anchor":new xn(ze.paint_fill["fill-translate-anchor"]),"fill-pattern":new pu(ze.paint_fill["fill-pattern"])}),layout:mH};const vH=fi([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),yH=fi([{name:"a_centroid",components:2,type:"Int16"}],4),{members:xH}=vH;var vu={},bH=ie,FI=gf;function gf(d,l,h,y,C){this.properties={},this.extent=h,this.type=0,this._pbf=d,this._geometry=-1,this._keys=y,this._values=C,d.readFields(_H,this,l)}function _H(d,l,h){d==1?l.id=h.readVarint():d==2?function(y,C){for(var I=y.readVarint()+y.pos;y.pos<I;){var D=C._keys[y.readVarint()],z=C._values[y.readVarint()];C.properties[D]=z}}(h,l):d==3?l.type=h.readVarint():d==4&&(l._geometry=h.pos)}function wH(d){for(var l,h,y=0,C=0,I=d.length,D=I-1;C<I;D=C++)y+=((h=d[D]).x-(l=d[C]).x)*(l.y+h.y);return y}gf.types=["Unknown","Point","LineString","Polygon"],gf.prototype.loadGeometry=function(){var d=this._pbf;d.pos=this._geometry;for(var l,h=d.readVarint()+d.pos,y=1,C=0,I=0,D=0,z=[];d.pos<h;){if(C<=0){var B=d.readVarint();y=7&B,C=B>>3}if(C--,y===1||y===2)I+=d.readSVarint(),D+=d.readSVarint(),y===1&&(l&&z.push(l),l=[]),l.push(new bH(I,D));else{if(y!==7)throw new Error("unknown command "+y);l&&l.push(l[0].clone())}}return l&&z.push(l),z},gf.prototype.bbox=function(){var d=this._pbf;d.pos=this._geometry;for(var l=d.readVarint()+d.pos,h=1,y=0,C=0,I=0,D=1/0,z=-1/0,B=1/0,K=-1/0;d.pos<l;){if(y<=0){var Y=d.readVarint();h=7&Y,y=Y>>3}if(y--,h===1||h===2)(C+=d.readSVarint())<D&&(D=C),C>z&&(z=C),(I+=d.readSVarint())<B&&(B=I),I>K&&(K=I);else if(h!==7)throw new Error("unknown command "+h)}return[D,B,z,K]},gf.prototype.toGeoJSON=function(d,l,h){var y,C,I=this.extent*Math.pow(2,h),D=this.extent*d,z=this.extent*l,B=this.loadGeometry(),K=gf.types[this.type];function Y(pe){for(var ve=0;ve<pe.length;ve++){var Ne=pe[ve];pe[ve]=[360*(Ne.x+D)/I-180,360/Math.PI*Math.atan(Math.exp((180-360*(Ne.y+z)/I)*Math.PI/180))-90]}}switch(this.type){case 1:var te=[];for(y=0;y<B.length;y++)te[y]=B[y][0];Y(B=te);break;case 2:for(y=0;y<B.length;y++)Y(B[y]);break;case 3:for(B=function(pe){var ve=pe.length;if(ve<=1)return[pe];for(var Ne,Oe,Je=[],ht=0;ht<ve;ht++){var qe=wH(pe[ht]);qe!==0&&(Oe===void 0&&(Oe=qe<0),Oe===qe<0?(Ne&&Je.push(Ne),Ne=[pe[ht]]):Ne.push(pe[ht]))}return Ne&&Je.push(Ne),Je}(B),y=0;y<B.length;y++)for(C=0;C<B[y].length;C++)Y(B[y][C])}B.length===1?B=B[0]:K="Multi"+K;var ce={type:"Feature",geometry:{type:K,coordinates:B},properties:this.properties};return"id"in this&&(ce.id=this.id),ce};var CH=FI,zI=$I;function $I(d,l){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=d,this._keys=[],this._values=[],this._features=[],d.readFields(SH,this,l),this.length=this._features.length}function SH(d,l,h){d===15?l.version=h.readVarint():d===1?l.name=h.readString():d===5?l.extent=h.readVarint():d===2?l._features.push(h.pos):d===3?l._keys.push(h.readString()):d===4&&l._values.push(function(y){for(var C=null,I=y.readVarint()+y.pos;y.pos<I;){var D=y.readVarint()>>3;C=D===1?y.readString():D===2?y.readFloat():D===3?y.readDouble():D===4?y.readVarint64():D===5?y.readVarint():D===6?y.readSVarint():D===7?y.readBoolean():null}return C}(h))}$I.prototype.feature=function(d){if(d<0||d>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[d];var l=this._pbf.readVarint()+this._pbf.pos;return new CH(this._pbf,l,this.extent,this._keys,this._values)};var EH=zI;function PH(d,l,h){if(d===3){var y=new EH(h,h.readVarint()+h.pos);y.length&&(l[y.name]=y)}}vu.VectorTile=function(d,l){this.layers=d.readFields(PH,{},l)},vu.VectorTileFeature=FI,vu.VectorTileLayer=zI;const TH=vu.VectorTileFeature.types,Pw=Math.pow(2,13);function $p(d,l,h,y,C,I,D,z){d.emplaceBack(l,h,2*Math.floor(y*Pw)+D,C*Pw*2,I*Pw*2,Math.round(z))}class Tw{constructor(l){this.zoom=l.zoom,this.overscaling=l.overscaling,this.layers=l.layers,this.layerIds=this.layers.map(h=>h.id),this.index=l.index,this.hasPattern=!1,this.layoutVertexArray=new ir,this.centroidVertexArray=new Tn,this.indexArray=new go,this.programConfigurations=new Lc(l.layers,l.zoom),this.segments=new qn,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(l,h,y){this.features=[],this.hasPattern=Cw("fill-extrusion",this.layers,h);for(const{feature:C,id:I,index:D,sourceLayerIndex:z}of l){const B=this.layers[0]._featureFilter.needGeometry,K=zc(C,B);if(!this.layers[0]._featureFilter.filter(new $r(this.zoom),K,y))continue;const Y={id:I,sourceLayerIndex:z,index:D,geometry:B?K.geometry:Fc(C),properties:C.properties,type:C.type,patterns:{}};this.hasPattern?this.features.push(Sw("fill-extrusion",this.layers,Y,this.zoom,h)):this.addFeature(Y,Y.geometry,D,y,{}),h.featureIndex.insert(C,Y.geometry,D,z,this.index,!0)}}addFeatures(l,h,y){for(const C of this.features){const{geometry:I}=C;this.addFeature(C,I,C.index,h,y)}}update(l,h,y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(l,h,this.stateDependentLayers,y)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(l){this.uploaded||(this.layoutVertexBuffer=l.createVertexBuffer(this.layoutVertexArray,xH),this.centroidVertexBuffer=l.createVertexBuffer(this.centroidVertexArray,yH.members,!0),this.indexBuffer=l.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(l),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(l,h,y,C,I){const D={x:0,y:0,vertexCount:0};for(const z of ww(h,500)){let B=0;for(const ve of z)B+=ve.length;let K=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const ve of z){if(ve.length===0||IH(ve))continue;let Ne=0;for(let Oe=0;Oe<ve.length;Oe++){const Je=ve[Oe];if(Oe>=1){const ht=ve[Oe-1];if(!kH(Je,ht)){K.vertexLength+4>qn.MAX_VERTEX_ARRAY_LENGTH&&(K=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const qe=Je.sub(ht)._perp()._unit(),lt=ht.dist(Je);Ne+lt>32768&&(Ne=0),$p(this.layoutVertexArray,Je.x,Je.y,qe.x,qe.y,0,0,Ne),$p(this.layoutVertexArray,Je.x,Je.y,qe.x,qe.y,0,1,Ne),D.x+=2*Je.x,D.y+=2*Je.y,D.vertexCount+=2,Ne+=lt,$p(this.layoutVertexArray,ht.x,ht.y,qe.x,qe.y,0,0,Ne),$p(this.layoutVertexArray,ht.x,ht.y,qe.x,qe.y,0,1,Ne),D.x+=2*ht.x,D.y+=2*ht.y,D.vertexCount+=2;const Dt=K.vertexLength;this.indexArray.emplaceBack(Dt,Dt+2,Dt+1),this.indexArray.emplaceBack(Dt+1,Dt+2,Dt+3),K.vertexLength+=4,K.primitiveLength+=2}}}}if(K.vertexLength+B>qn.MAX_VERTEX_ARRAY_LENGTH&&(K=this.segments.prepareSegment(B,this.layoutVertexArray,this.indexArray)),TH[l.type]!=="Polygon")continue;const Y=[],te=[],ce=K.vertexLength;for(const ve of z)if(ve.length!==0){ve!==z[0]&&te.push(Y.length/2);for(let Ne=0;Ne<ve.length;Ne++){const Oe=ve[Ne];$p(this.layoutVertexArray,Oe.x,Oe.y,0,0,1,1,0),D.x+=Oe.x,D.y+=Oe.y,D.vertexCount+=1,Y.push(Oe.x),Y.push(Oe.y)}}const pe=by.exports(Y,te);for(let ve=0;ve<pe.length;ve+=3)this.indexArray.emplaceBack(ce+pe[ve],ce+pe[ve+2],ce+pe[ve+1]);K.primitiveLength+=pe.length/3,K.vertexLength+=B}for(let z=0;z<D.vertexCount;z++)this.centroidVertexArray.emplaceBack(Math.floor(D.x/D.vertexCount),Math.floor(D.y/D.vertexCount));this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,l,y,I,C)}}function kH(d,l){return d.x===l.x&&(d.x<0||d.x>yi)||d.y===l.y&&(d.y<0||d.y>yi)}function IH(d){return d.every(l=>l.x<0)||d.every(l=>l.x>yi)||d.every(l=>l.y<0)||d.every(l=>l.y>yi)}gn("FillExtrusionBucket",Tw,{omit:["layers","features"]});var MH={paint:new $i({"fill-extrusion-opacity":new xn(ze["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Rn(ze["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new xn(ze["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new xn(ze["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new pu(ze["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Rn(ze["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Rn(ze["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new xn(ze["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})};function Bp(d,l){return d.x*l.x+d.y*l.y}function BI(d,l){if(d.length===1){let h=0;const y=l[h++];let C;for(;!C||y.equals(C);)if(C=l[h++],!C)return 1/0;for(;h<l.length;h++){const I=l[h],D=d[0],z=C.sub(y),B=I.sub(y),K=D.sub(y),Y=Bp(z,z),te=Bp(z,B),ce=Bp(B,B),pe=Bp(K,z),ve=Bp(K,B),Ne=Y*ce-te*te,Oe=(ce*pe-te*ve)/Ne,Je=(Y*ve-te*pe)/Ne,ht=y.z*(1-Oe-Je)+C.z*Oe+I.z*Je;if(isFinite(ht))return ht}return 1/0}{let h=1/0;for(const y of l)h=Math.min(h,y.z);return h}}const RH=fi([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:DH}=RH,OH=fi([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:AH}=OH,NH=vu.VectorTileFeature.types,LH=Math.cos(Math.PI/180*37.5),VI=Math.pow(2,14)/.5;class kw{constructor(l){this.zoom=l.zoom,this.overscaling=l.overscaling,this.layers=l.layers,this.layerIds=this.layers.map(h=>h.id),this.index=l.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(h=>{this.gradients[h.id]={}}),this.layoutVertexArray=new ar,this.layoutVertexArray2=new xr,this.indexArray=new go,this.programConfigurations=new Lc(l.layers,l.zoom),this.segments=new qn,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(l,h,y){this.hasPattern=Cw("line",this.layers,h);const C=this.layers[0].layout.get("line-sort-key"),I=!C.isConstant(),D=[];for(const{feature:z,id:B,index:K,sourceLayerIndex:Y}of l){const te=this.layers[0]._featureFilter.needGeometry,ce=zc(z,te);if(!this.layers[0]._featureFilter.filter(new $r(this.zoom),ce,y))continue;const pe=I?C.evaluate(ce,{},y):void 0,ve={id:B,properties:z.properties,type:z.type,sourceLayerIndex:Y,index:K,geometry:te?ce.geometry:Fc(z),patterns:{},sortKey:pe};D.push(ve)}I&&D.sort((z,B)=>z.sortKey-B.sortKey);for(const z of D){const{geometry:B,index:K,sourceLayerIndex:Y}=z;if(this.hasPattern){const te=Sw("line",this.layers,z,this.zoom,h);this.patternFeatures.push(te)}else this.addFeature(z,B,K,y,{});h.featureIndex.insert(l[K].feature,B,K,Y,this.index)}}update(l,h,y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(l,h,this.stateDependentLayers,y)}addFeatures(l,h,y){for(const C of this.patternFeatures)this.addFeature(C,C.geometry,C.index,h,y)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(l){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=l.createVertexBuffer(this.layoutVertexArray2,AH)),this.layoutVertexBuffer=l.createVertexBuffer(this.layoutVertexArray,DH),this.indexBuffer=l.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(l),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(l){if(l.properties&&Object.prototype.hasOwnProperty.call(l.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(l.properties,"mapbox_clip_end"))return{start:+l.properties.mapbox_clip_start,end:+l.properties.mapbox_clip_end}}addFeature(l,h,y,C,I){const D=this.layers[0].layout,z=D.get("line-join").evaluate(l,{}),B=D.get("line-cap"),K=D.get("line-miter-limit"),Y=D.get("line-round-limit");this.lineClips=this.lineFeatureClips(l);for(const te of h)this.addLine(te,l,z,B,K,Y);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,l,y,I,C)}addLine(l,h,y,C,I,D){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let Je=0;Je<l.length-1;Je++)this.totalDistance+=l[Je].dist(l[Je+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const z=NH[h.type]==="Polygon";let B=l.length;for(;B>=2&&l[B-1].equals(l[B-2]);)B--;let K=0;for(;K<B-1&&l[K].equals(l[K+1]);)K++;if(B<(z?3:2))return;y==="bevel"&&(I=1.05);const Y=this.overscaling<=16?122880/(512*this.overscaling):0,te=this.segments.prepareSegment(10*B,this.layoutVertexArray,this.indexArray);let ce,pe,ve,Ne,Oe;this.e1=this.e2=-1,z&&(ce=l[B-2],Oe=l[K].sub(ce)._unit()._perp());for(let Je=K;Je<B;Je++){if(ve=Je===B-1?z?l[K+1]:void 0:l[Je+1],ve&&l[Je].equals(ve))continue;Oe&&(Ne=Oe),ce&&(pe=ce),ce=l[Je],Oe=ve?ve.sub(ce)._unit()._perp():Ne,Ne=Ne||Oe;let ht=Ne.add(Oe);ht.x===0&&ht.y===0||ht._unit();const qe=Ne.x*Oe.x+Ne.y*Oe.y,lt=ht.x*Oe.x+ht.y*Oe.y,Dt=lt!==0?1/lt:1/0,Mt=2*Math.sqrt(2-2*lt),hn=lt<LH&&pe&&ve,vn=Ne.x*Oe.y-Ne.y*Oe.x>0;if(hn&&Je>K){const Qt=ce.dist(pe);if(Qt>2*Y){const un=ce.sub(ce.sub(pe)._mult(Y/Qt)._round());this.updateDistance(pe,un),this.addCurrentVertex(un,Ne,0,0,te),pe=un}}const ln=pe&&ve;let en=ln?y:z?"butt":C;if(ln&&en==="round"&&(Dt<D?en="miter":Dt<=2&&(en="fakeround")),en==="miter"&&Dt>I&&(en="bevel"),en==="bevel"&&(Dt>2&&(en="flipbevel"),Dt<I&&(en="miter")),pe&&this.updateDistance(pe,ce),en==="miter")ht._mult(Dt),this.addCurrentVertex(ce,ht,0,0,te);else if(en==="flipbevel"){if(Dt>100)ht=Oe.mult(-1);else{const Qt=Dt*Ne.add(Oe).mag()/Ne.sub(Oe).mag();ht._perp()._mult(Qt*(vn?-1:1))}this.addCurrentVertex(ce,ht,0,0,te),this.addCurrentVertex(ce,ht.mult(-1),0,0,te)}else if(en==="bevel"||en==="fakeround"){const Qt=-Math.sqrt(Dt*Dt-1),un=vn?Qt:0,nn=vn?0:Qt;if(pe&&this.addCurrentVertex(ce,Ne,un,nn,te),en==="fakeround"){const jt=Math.round(180*Mt/Math.PI/20);for(let kn=1;kn<jt;kn++){let bn=kn/jt;if(bn!==.5){const Or=bn-.5;bn+=bn*Or*(bn-1)*((1.0904+qe*(qe*(3.55645-1.43519*qe)-3.2452))*Or*Or+(.848013+qe*(.215638*qe-1.06021)))}const Kn=Oe.sub(Ne)._mult(bn)._add(Ne)._unit()._mult(vn?-1:1);this.addHalfVertex(ce,Kn.x,Kn.y,!1,vn,0,te)}}ve&&this.addCurrentVertex(ce,Oe,-un,-nn,te)}else if(en==="butt")this.addCurrentVertex(ce,ht,0,0,te);else if(en==="square"){const Qt=pe?1:-1;this.addCurrentVertex(ce,ht,Qt,Qt,te)}else en==="round"&&(pe&&(this.addCurrentVertex(ce,Ne,0,0,te),this.addCurrentVertex(ce,Ne,1,1,te,!0)),ve&&(this.addCurrentVertex(ce,Oe,-1,-1,te,!0),this.addCurrentVertex(ce,Oe,0,0,te)));if(hn&&Je<B-1){const Qt=ce.dist(ve);if(Qt>2*Y){const un=ce.add(ve.sub(ce)._mult(Y/Qt)._round());this.updateDistance(ce,un),this.addCurrentVertex(un,Oe,0,0,te),ce=un}}}}addCurrentVertex(l,h,y,C,I,D=!1){const z=h.y*C-h.x,B=-h.y-h.x*C;this.addHalfVertex(l,h.x+h.y*y,h.y-h.x*y,D,!1,y,I),this.addHalfVertex(l,z,B,D,!0,-C,I),this.distance>VI/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(l,h,y,C,I,D))}addHalfVertex({x:l,y:h},y,C,I,D,z,B){const K=.5*(this.lineClips?this.scaledDistance*(VI-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((l<<1)+(I?1:0),(h<<1)+(D?1:0),Math.round(63*y)+128,Math.round(63*C)+128,1+(z===0?0:z<0?-1:1)|(63&K)<<2,K>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const Y=B.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Y),B.primitiveLength++),D?this.e2=Y:this.e1=Y}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(l,h){this.distance+=l.dist(h),this.updateScaledDistance()}}gn("LineBucket",kw,{omit:["layers","patternFeatures"]});const FH=new $i({"line-cap":new xn(ze.layout_line["line-cap"]),"line-join":new Rn(ze.layout_line["line-join"]),"line-miter-limit":new xn(ze.layout_line["line-miter-limit"]),"line-round-limit":new xn(ze.layout_line["line-round-limit"]),"line-sort-key":new Rn(ze.layout_line["line-sort-key"])});var UI={paint:new $i({"line-opacity":new Rn(ze.paint_line["line-opacity"]),"line-color":new Rn(ze.paint_line["line-color"]),"line-translate":new xn(ze.paint_line["line-translate"]),"line-translate-anchor":new xn(ze.paint_line["line-translate-anchor"]),"line-width":new Rn(ze.paint_line["line-width"]),"line-gap-width":new Rn(ze.paint_line["line-gap-width"]),"line-offset":new Rn(ze.paint_line["line-offset"]),"line-blur":new Rn(ze.paint_line["line-blur"]),"line-dasharray":new Tp(ze.paint_line["line-dasharray"]),"line-pattern":new pu(ze.paint_line["line-pattern"]),"line-gradient":new Us(ze.paint_line["line-gradient"])}),layout:FH};const jI=new class extends Rn{possiblyEvaluate(d,l){return l=new $r(Math.floor(l.zoom),{now:l.now,fadeDuration:l.fadeDuration,zoomHistory:l.zoomHistory,transition:l.transition}),super.possiblyEvaluate(d,l)}evaluate(d,l,h,y){return l=_({},l,{zoom:Math.floor(l.zoom)}),super.evaluate(d,l,h,y)}}(UI.paint.properties["line-width"].specification);function HI(d,l){return l>0?l+2*d:d}jI.useIntegerZoom=!0;const zH=fi([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),$H=fi([{name:"a_projected_pos",components:3,type:"Float32"}],4);fi([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const BH=fi([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);fi([{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 KI=fi([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),VH=fi([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function UH(d,l,h){return d.sections.forEach(y=>{y.text=function(C,I,D){const z=I.layout.get("text-transform").evaluate(D,{});return z==="uppercase"?C=C.toLocaleUpperCase():z==="lowercase"&&(C=C.toLocaleLowerCase()),Wo.applyArabicShaping&&(C=Wo.applyArabicShaping(C)),C}(y.text,l,h)}),d}fi([{name:"triangle",components:3,type:"Uint16"}]),fi([{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"}]),fi([{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"}]),fi([{type:"Float32",name:"offsetX"}]),fi([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);const Vp={"!":"\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 Bi=24,Iw=Cr,WI=function(d,l,h,y,C){var I,D,z=8*C-y-1,B=(1<<z)-1,K=B>>1,Y=-7,te=h?C-1:0,ce=h?-1:1,pe=d[l+te];for(te+=ce,I=pe&(1<<-Y)-1,pe>>=-Y,Y+=z;Y>0;I=256*I+d[l+te],te+=ce,Y-=8);for(D=I&(1<<-Y)-1,I>>=-Y,Y+=y;Y>0;D=256*D+d[l+te],te+=ce,Y-=8);if(I===0)I=1-K;else{if(I===B)return D?NaN:1/0*(pe?-1:1);D+=Math.pow(2,y),I-=K}return(pe?-1:1)*D*Math.pow(2,I-y)},GI=function(d,l,h,y,C,I){var D,z,B,K=8*I-C-1,Y=(1<<K)-1,te=Y>>1,ce=C===23?Math.pow(2,-24)-Math.pow(2,-77):0,pe=y?0:I-1,ve=y?1:-1,Ne=l<0||l===0&&1/l<0?1:0;for(l=Math.abs(l),isNaN(l)||l===1/0?(z=isNaN(l)?1:0,D=Y):(D=Math.floor(Math.log(l)/Math.LN2),l*(B=Math.pow(2,-D))<1&&(D--,B*=2),(l+=D+te>=1?ce/B:ce*Math.pow(2,1-te))*B>=2&&(D++,B/=2),D+te>=Y?(z=0,D=Y):D+te>=1?(z=(l*B-1)*Math.pow(2,C),D+=te):(z=l*Math.pow(2,te-1)*Math.pow(2,C),D=0));C>=8;d[h+pe]=255&z,pe+=ve,z/=256,C-=8);for(D=D<<C|z,K+=C;K>0;d[h+pe]=255&D,pe+=ve,D/=256,K-=8);d[h+pe-ve]|=128*Ne};function Cr(d){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(d)?d:new Uint8Array(d||0),this.pos=0,this.type=0,this.length=this.buf.length}Cr.Varint=0,Cr.Fixed64=1,Cr.Bytes=2,Cr.Fixed32=5;var yu,Mw=4294967296,qI=1/Mw,ZI=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function Sl(d){return d.type===Cr.Bytes?d.readVarint()+d.pos:d.pos+1}function vf(d,l,h){return h?4294967296*l+(d>>>0):4294967296*(l>>>0)+(d>>>0)}function XI(d,l,h){var y=l<=16383?1:l<=2097151?2:l<=268435455?3:Math.floor(Math.log(l)/(7*Math.LN2));h.realloc(y);for(var C=h.pos-1;C>=d;C--)h.buf[C+y]=h.buf[C]}function jH(d,l){for(var h=0;h<d.length;h++)l.writeVarint(d[h])}function HH(d,l){for(var h=0;h<d.length;h++)l.writeSVarint(d[h])}function KH(d,l){for(var h=0;h<d.length;h++)l.writeFloat(d[h])}function WH(d,l){for(var h=0;h<d.length;h++)l.writeDouble(d[h])}function GH(d,l){for(var h=0;h<d.length;h++)l.writeBoolean(d[h])}function qH(d,l){for(var h=0;h<d.length;h++)l.writeFixed32(d[h])}function ZH(d,l){for(var h=0;h<d.length;h++)l.writeSFixed32(d[h])}function XH(d,l){for(var h=0;h<d.length;h++)l.writeFixed64(d[h])}function YH(d,l){for(var h=0;h<d.length;h++)l.writeSFixed64(d[h])}function Ey(d,l){return(d[l]|d[l+1]<<8|d[l+2]<<16)+16777216*d[l+3]}function yf(d,l,h){d[h]=l,d[h+1]=l>>>8,d[h+2]=l>>>16,d[h+3]=l>>>24}function YI(d,l){return(d[l]|d[l+1]<<8|d[l+2]<<16)+(d[l+3]<<24)}function QH(d,l,h){d===1&&h.readMessage(JH,l)}function JH(d,l,h){if(d===3){const{id:y,bitmap:C,width:I,height:D,left:z,top:B,advance:K}=h.readMessage(eK,{});l.push({id:y,bitmap:new Ap({width:I+6,height:D+6},C),metrics:{width:I,height:D,left:z,top:B,advance:K}})}}function eK(d,l,h){d===1?l.id=h.readVarint():d===2?l.bitmap=h.readBytes():d===3?l.width=h.readVarint():d===4?l.height=h.readVarint():d===5?l.left=h.readSVarint():d===6?l.top=h.readSVarint():d===7&&(l.advance=h.readVarint())}function QI(d){let l=0,h=0;for(const D of d)l+=D.w*D.h,h=Math.max(h,D.w);d.sort((D,z)=>z.h-D.h);const y=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(l/.95)),h),h:1/0}];let C=0,I=0;for(const D of d)for(let z=y.length-1;z>=0;z--){const B=y[z];if(!(D.w>B.w||D.h>B.h)){if(D.x=B.x,D.y=B.y,I=Math.max(I,D.y+D.h),C=Math.max(C,D.x+D.w),D.w===B.w&&D.h===B.h){const K=y.pop();z<y.length&&(y[z]=K)}else D.h===B.h?(B.x+=D.w,B.w-=D.w):D.w===B.w?(B.y+=D.h,B.h-=D.h):(y.push({x:B.x+D.w,y:B.y,w:B.w-D.w,h:D.h}),B.y+=D.h,B.h-=D.h);break}}return{w:C,h:I,fill:l/(C*I)||0}}Cr.prototype={destroy:function(){this.buf=null},readFields:function(d,l,h){for(h=h||this.length;this.pos<h;){var y=this.readVarint(),C=y>>3,I=this.pos;this.type=7&y,d(C,l,this),this.pos===I&&this.skip(y)}return l},readMessage:function(d,l){return this.readFields(d,l,this.readVarint()+this.pos)},readFixed32:function(){var d=Ey(this.buf,this.pos);return this.pos+=4,d},readSFixed32:function(){var d=YI(this.buf,this.pos);return this.pos+=4,d},readFixed64:function(){var d=Ey(this.buf,this.pos)+Ey(this.buf,this.pos+4)*Mw;return this.pos+=8,d},readSFixed64:function(){var d=Ey(this.buf,this.pos)+YI(this.buf,this.pos+4)*Mw;return this.pos+=8,d},readFloat:function(){var d=WI(this.buf,this.pos,!0,23,4);return this.pos+=4,d},readDouble:function(){var d=WI(this.buf,this.pos,!0,52,8);return this.pos+=8,d},readVarint:function(d){var l,h,y=this.buf;return l=127&(h=y[this.pos++]),h<128?l:(l|=(127&(h=y[this.pos++]))<<7,h<128?l:(l|=(127&(h=y[this.pos++]))<<14,h<128?l:(l|=(127&(h=y[this.pos++]))<<21,h<128?l:function(C,I,D){var z,B,K=D.buf;if(z=(112&(B=K[D.pos++]))>>4,B<128||(z|=(127&(B=K[D.pos++]))<<3,B<128)||(z|=(127&(B=K[D.pos++]))<<10,B<128)||(z|=(127&(B=K[D.pos++]))<<17,B<128)||(z|=(127&(B=K[D.pos++]))<<24,B<128)||(z|=(1&(B=K[D.pos++]))<<31,B<128))return vf(C,z,I);throw new Error("Expected varint not more than 10 bytes")}(l|=(15&(h=y[this.pos]))<<28,d,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var d=this.readVarint();return d%2==1?(d+1)/-2:d/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var d=this.readVarint()+this.pos,l=this.pos;return this.pos=d,d-l>=12&&ZI?function(h,y,C){return ZI.decode(h.subarray(y,C))}(this.buf,l,d):function(h,y,C){for(var I="",D=y;D<C;){var z,B,K,Y=h[D],te=null,ce=Y>239?4:Y>223?3:Y>191?2:1;if(D+ce>C)break;ce===1?Y<128&&(te=Y):ce===2?(192&(z=h[D+1]))==128&&(te=(31&Y)<<6|63&z)<=127&&(te=null):ce===3?(B=h[D+2],(192&(z=h[D+1]))==128&&(192&B)==128&&((te=(15&Y)<<12|(63&z)<<6|63&B)<=2047||te>=55296&&te<=57343)&&(te=null)):ce===4&&(B=h[D+2],K=h[D+3],(192&(z=h[D+1]))==128&&(192&B)==128&&(192&K)==128&&((te=(15&Y)<<18|(63&z)<<12|(63&B)<<6|63&K)<=65535||te>=1114112)&&(te=null)),te===null?(te=65533,ce=1):te>65535&&(te-=65536,I+=String.fromCharCode(te>>>10&1023|55296),te=56320|1023&te),I+=String.fromCharCode(te),D+=ce}return I}(this.buf,l,d)},readBytes:function(){var d=this.readVarint()+this.pos,l=this.buf.subarray(this.pos,d);return this.pos=d,l},readPackedVarint:function(d,l){if(this.type!==Cr.Bytes)return d.push(this.readVarint(l));var h=Sl(this);for(d=d||[];this.pos<h;)d.push(this.readVarint(l));return d},readPackedSVarint:function(d){if(this.type!==Cr.Bytes)return d.push(this.readSVarint());var l=Sl(this);for(d=d||[];this.pos<l;)d.push(this.readSVarint());return d},readPackedBoolean:function(d){if(this.type!==Cr.Bytes)return d.push(this.readBoolean());var l=Sl(this);for(d=d||[];this.pos<l;)d.push(this.readBoolean());return d},readPackedFloat:function(d){if(this.type!==Cr.Bytes)return d.push(this.readFloat());var l=Sl(this);for(d=d||[];this.pos<l;)d.push(this.readFloat());return d},readPackedDouble:function(d){if(this.type!==Cr.Bytes)return d.push(this.readDouble());var l=Sl(this);for(d=d||[];this.pos<l;)d.push(this.readDouble());return d},readPackedFixed32:function(d){if(this.type!==Cr.Bytes)return d.push(this.readFixed32());var l=Sl(this);for(d=d||[];this.pos<l;)d.push(this.readFixed32());return d},readPackedSFixed32:function(d){if(this.type!==Cr.Bytes)return d.push(this.readSFixed32());var l=Sl(this);for(d=d||[];this.pos<l;)d.push(this.readSFixed32());return d},readPackedFixed64:function(d){if(this.type!==Cr.Bytes)return d.push(this.readFixed64());var l=Sl(this);for(d=d||[];this.pos<l;)d.push(this.readFixed64());return d},readPackedSFixed64:function(d){if(this.type!==Cr.Bytes)return d.push(this.readSFixed64());var l=Sl(this);for(d=d||[];this.pos<l;)d.push(this.readSFixed64());return d},skip:function(d){var l=7&d;if(l===Cr.Varint)for(;this.buf[this.pos++]>127;);else if(l===Cr.Bytes)this.pos=this.readVarint()+this.pos;else if(l===Cr.Fixed32)this.pos+=4;else{if(l!==Cr.Fixed64)throw new Error("Unimplemented type: "+l);this.pos+=8}},writeTag:function(d,l){this.writeVarint(d<<3|l)},realloc:function(d){for(var l=this.length||16;l<this.pos+d;)l*=2;if(l!==this.length){var h=new Uint8Array(l);h.set(this.buf),this.buf=h,this.length=l}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(d){this.realloc(4),yf(this.buf,d,this.pos),this.pos+=4},writeSFixed32:function(d){this.realloc(4),yf(this.buf,d,this.pos),this.pos+=4},writeFixed64:function(d){this.realloc(8),yf(this.buf,-1&d,this.pos),yf(this.buf,Math.floor(d*qI),this.pos+4),this.pos+=8},writeSFixed64:function(d){this.realloc(8),yf(this.buf,-1&d,this.pos),yf(this.buf,Math.floor(d*qI),this.pos+4),this.pos+=8},writeVarint:function(d){(d=+d||0)>268435455||d<0?function(l,h){var y,C;if(l>=0?(y=l%4294967296|0,C=l/4294967296|0):(C=~(-l/4294967296),4294967295^(y=~(-l%4294967296))?y=y+1|0:(y=0,C=C+1|0)),l>=18446744073709552e3||l<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");h.realloc(10),function(I,D,z){z.buf[z.pos++]=127&I|128,I>>>=7,z.buf[z.pos++]=127&I|128,I>>>=7,z.buf[z.pos++]=127&I|128,I>>>=7,z.buf[z.pos++]=127&I|128,z.buf[z.pos]=127&(I>>>=7)}(y,0,h),function(I,D){var z=(7&I)<<4;D.buf[D.pos++]|=z|((I>>>=3)?128:0),I&&(D.buf[D.pos++]=127&I|((I>>>=7)?128:0),I&&(D.buf[D.pos++]=127&I|((I>>>=7)?128:0),I&&(D.buf[D.pos++]=127&I|((I>>>=7)?128:0),I&&(D.buf[D.pos++]=127&I|((I>>>=7)?128:0),I&&(D.buf[D.pos++]=127&I)))))}(C,h)}(d,this):(this.realloc(4),this.buf[this.pos++]=127&d|(d>127?128:0),d<=127||(this.buf[this.pos++]=127&(d>>>=7)|(d>127?128:0),d<=127||(this.buf[this.pos++]=127&(d>>>=7)|(d>127?128:0),d<=127||(this.buf[this.pos++]=d>>>7&127))))},writeSVarint:function(d){this.writeVarint(d<0?2*-d-1:2*d)},writeBoolean:function(d){this.writeVarint(Boolean(d))},writeString:function(d){d=String(d),this.realloc(4*d.length),this.pos++;var l=this.pos;this.pos=function(y,C,I){for(var D,z,B=0;B<C.length;B++){if((D=C.charCodeAt(B))>55295&&D<57344){if(!z){D>56319||B+1===C.length?(y[I++]=239,y[I++]=191,y[I++]=189):z=D;continue}if(D<56320){y[I++]=239,y[I++]=191,y[I++]=189,z=D;continue}D=z-55296<<10|D-56320|65536,z=null}else z&&(y[I++]=239,y[I++]=191,y[I++]=189,z=null);D<128?y[I++]=D:(D<2048?y[I++]=D>>6|192:(D<65536?y[I++]=D>>12|224:(y[I++]=D>>18|240,y[I++]=D>>12&63|128),y[I++]=D>>6&63|128),y[I++]=63&D|128)}return I}(this.buf,d,this.pos);var h=this.pos-l;h>=128&&XI(l,h,this),this.pos=l-1,this.writeVarint(h),this.pos+=h},writeFloat:function(d){this.realloc(4),GI(this.buf,d,this.pos,!0,23,4),this.pos+=4},writeDouble:function(d){this.realloc(8),GI(this.buf,d,this.pos,!0,52,8),this.pos+=8},writeBytes:function(d){var l=d.length;this.writeVarint(l),this.realloc(l);for(var h=0;h<l;h++)this.buf[this.pos++]=d[h]},writeRawMessage:function(d,l){this.pos++;var h=this.pos;d(l,this);var y=this.pos-h;y>=128&&XI(h,y,this),this.pos=h-1,this.writeVarint(y),this.pos+=y},writeMessage:function(d,l,h){this.writeTag(d,Cr.Bytes),this.writeRawMessage(l,h)},writePackedVarint:function(d,l){l.length&&this.writeMessage(d,jH,l)},writePackedSVarint:function(d,l){l.length&&this.writeMessage(d,HH,l)},writePackedBoolean:function(d,l){l.length&&this.writeMessage(d,GH,l)},writePackedFloat:function(d,l){l.length&&this.writeMessage(d,KH,l)},writePackedDouble:function(d,l){l.length&&this.writeMessage(d,WH,l)},writePackedFixed32:function(d,l){l.length&&this.writeMessage(d,qH,l)},writePackedSFixed32:function(d,l){l.length&&this.writeMessage(d,ZH,l)},writePackedFixed64:function(d,l){l.length&&this.writeMessage(d,XH,l)},writePackedSFixed64:function(d,l){l.length&&this.writeMessage(d,YH,l)},writeBytesField:function(d,l){this.writeTag(d,Cr.Bytes),this.writeBytes(l)},writeFixed32Field:function(d,l){this.writeTag(d,Cr.Fixed32),this.writeFixed32(l)},writeSFixed32Field:function(d,l){this.writeTag(d,Cr.Fixed32),this.writeSFixed32(l)},writeFixed64Field:function(d,l){this.writeTag(d,Cr.Fixed64),this.writeFixed64(l)},writeSFixed64Field:function(d,l){this.writeTag(d,Cr.Fixed64),this.writeSFixed64(l)},writeVarintField:function(d,l){this.writeTag(d,Cr.Varint),this.writeVarint(l)},writeSVarintField:function(d,l){this.writeTag(d,Cr.Varint),this.writeSVarint(l)},writeStringField:function(d,l){this.writeTag(d,Cr.Bytes),this.writeString(l)},writeFloatField:function(d,l){this.writeTag(d,Cr.Fixed32),this.writeFloat(l)},writeDoubleField:function(d,l){this.writeTag(d,Cr.Fixed64),this.writeDouble(l)},writeBooleanField:function(d,l){this.writeVarintField(d,Boolean(l))}};class Rw{constructor(l,{pixelRatio:h,version:y,stretchX:C,stretchY:I,content:D}){this.paddedRect=l,this.pixelRatio=h,this.stretchX=C,this.stretchY=I,this.content=D,this.version=y}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 JI{constructor(l,h){const y={},C={};this.haveRenderCallbacks=[];const I=[];this.addImages(l,y,I),this.addImages(h,C,I);const{w:D,h:z}=QI(I),B=new da({width:D||1,height:z||1});for(const K in l){const Y=l[K],te=y[K].paddedRect;da.copy(Y.data,B,{x:0,y:0},{x:te.x+1,y:te.y+1},Y.data)}for(const K in h){const Y=h[K],te=C[K].paddedRect,ce=te.x+1,pe=te.y+1,ve=Y.data.width,Ne=Y.data.height;da.copy(Y.data,B,{x:0,y:0},{x:ce,y:pe},Y.data),da.copy(Y.data,B,{x:0,y:Ne-1},{x:ce,y:pe-1},{width:ve,height:1}),da.copy(Y.data,B,{x:0,y:0},{x:ce,y:pe+Ne},{width:ve,height:1}),da.copy(Y.data,B,{x:ve-1,y:0},{x:ce-1,y:pe},{width:1,height:Ne}),da.copy(Y.data,B,{x:0,y:0},{x:ce+ve,y:pe},{width:1,height:Ne})}this.image=B,this.iconPositions=y,this.patternPositions=C}addImages(l,h,y){for(const C in l){const I=l[C],D={x:0,y:0,w:I.data.width+2,h:I.data.height+2};y.push(D),h[C]=new Rw(D,I),I.hasRenderCallback&&this.haveRenderCallbacks.push(C)}}patchUpdatedImages(l,h){l.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const y in l.updatedImages)this.patchUpdatedImage(this.iconPositions[y],l.getImage(y),h),this.patchUpdatedImage(this.patternPositions[y],l.getImage(y),h)}patchUpdatedImage(l,h,y){if(!l||!h||l.version===h.version)return;l.version=h.version;const[C,I]=l.tl;y.update(h.data,void 0,{x:C,y:I})}}gn("ImagePosition",Rw),gn("ImageAtlas",JI),o.WritingMode=void 0,(yu=o.WritingMode||(o.WritingMode={}))[yu.none=0]="none",yu[yu.horizontal=1]="horizontal",yu[yu.vertical=2]="vertical",yu[yu.horizontalOnly=3]="horizontalOnly";const Py=-17;class Up{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(l,h){const y=new Up;return y.scale=l||1,y.fontStack=h,y}static forImage(l){const h=new Up;return h.imageName=l,h}}class xf{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(l,h){const y=new xf;for(let C=0;C<l.sections.length;C++){const I=l.sections[C];I.image?y.addImageSection(I):y.addTextSection(I,h)}return y}length(){return this.text.length}getSection(l){return this.sections[this.sectionIndex[l]]}getSectionIndex(l){return this.sectionIndex[l]}getCharCode(l){return this.text.charCodeAt(l)}verticalizePunctuation(){this.text=function(l){let h="";for(let y=0;y<l.length;y++){const C=l.charCodeAt(y+1)||null,I=l.charCodeAt(y-1)||null;h+=C&&ay(C)&&!Vp[l[y+1]]||I&&ay(I)&&!Vp[l[y-1]]||!Vp[l[y]]?l[y]:Vp[l[y]]}return h}(this.text)}trim(){let l=0;for(let y=0;y<this.text.length&&ky[this.text.charCodeAt(y)];y++)l++;let h=this.text.length;for(let y=this.text.length-1;y>=0&&y>=l&&ky[this.text.charCodeAt(y)];y--)h--;this.text=this.text.substring(l,h),this.sectionIndex=this.sectionIndex.slice(l,h)}substring(l,h){const y=new xf;return y.text=this.text.substring(l,h),y.sectionIndex=this.sectionIndex.slice(l,h),y.sections=this.sections,y}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((l,h)=>Math.max(l,this.sections[h].scale),0)}addTextSection(l,h){this.text+=l.text,this.sections.push(Up.forText(l.scale,l.fontStack||h));const y=this.sections.length-1;for(let C=0;C<l.text.length;++C)this.sectionIndex.push(y)}addImageSection(l){const h=l.image?l.image.name:"";if(h.length===0)return void L("Can't add FormattedSection with an empty image.");const y=this.getNextImageSectionCharCode();y?(this.text+=String.fromCharCode(y),this.sections.push(Up.forImage(h)),this.sectionIndex.push(this.sections.length-1)):L("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Ty(d,l,h,y,C,I,D,z,B,K,Y,te,ce,pe,ve,Ne){const Oe=xf.fromFeature(d,C);let Je;te===o.WritingMode.vertical&&Oe.verticalizePunctuation();const{processBidirectionalText:ht,processStyledBidirectionalText:qe}=Wo;if(ht&&Oe.sections.length===1){Je=[];const Mt=ht(Oe.toString(),Dw(Oe,K,I,l,y,pe,ve));for(const hn of Mt){const vn=new xf;vn.text=hn,vn.sections=Oe.sections;for(let ln=0;ln<hn.length;ln++)vn.sectionIndex.push(0);Je.push(vn)}}else if(qe){Je=[];const Mt=qe(Oe.text,Oe.sectionIndex,Dw(Oe,K,I,l,y,pe,ve));for(const hn of Mt){const vn=new xf;vn.text=hn[0],vn.sectionIndex=hn[1],vn.sections=Oe.sections,Je.push(vn)}}else Je=function(Mt,hn){const vn=[],ln=Mt.text;let en=0;for(const Qt of hn)vn.push(Mt.substring(en,Qt)),en=Qt;return en<ln.length&&vn.push(Mt.substring(en,ln.length)),vn}(Oe,Dw(Oe,K,I,l,y,pe,ve));const lt=[],Dt={positionedLines:lt,text:Oe.toString(),top:Y[1],bottom:Y[1],left:Y[0],right:Y[0],writingMode:te,iconsInText:!1,verticalizable:!1};return function(Mt,hn,vn,ln,en,Qt,un,nn,jt,kn,bn,Kn){let Or=0,Vr=Py,xi=0,ha=0;const qi=nn==="right"?1:nn==="left"?0:.5;let hi=0;for(const pi of en){pi.trim();const Xi=pi.getMaxScale(),ao=(Xi-1)*Bi,xo={positionedGlyphs:[],lineOffset:0};Mt.positionedLines[hi]=xo;const No=xo.positionedGlyphs;let Lo=0;if(!pi.length()){Vr+=Qt,++hi;continue}for(let Mi=0;Mi<pi.length();Mi++){const Zn=pi.getSection(Mi),Zo=pi.getSectionIndex(Mi),Yi=pi.getCharCode(Mi);let so=0,Va=null,vs=null,ys=null,Pl=Bi;const Ua=!(jt===o.WritingMode.horizontal||!bn&&!_p(Yi)||bn&&(ky[Yi]||(Ii=Yi,sn.Arabic(Ii)||sn["Arabic Supplement"](Ii)||sn["Arabic Extended-A"](Ii)||sn["Arabic Presentation Forms-A"](Ii)||sn["Arabic Presentation Forms-B"](Ii))));if(Zn.imageName){const pa=ln[Zn.imageName];if(!pa)continue;ys=Zn.imageName,Mt.iconsInText=Mt.iconsInText||!0,vs=pa.paddedRect;const Fo=pa.displaySize;Zn.scale=Zn.scale*Bi/Kn,Va={width:Fo[0],height:Fo[1],left:1,top:-3,advance:Ua?Fo[1]:Fo[0]},so=ao+(Bi-Fo[1]*Zn.scale),Pl=Va.advance;const Tl=Ua?Fo[0]*Zn.scale-Bi*Xi:Fo[1]*Zn.scale-Bi*Xi;Tl>0&&Tl>Lo&&(Lo=Tl)}else{const pa=vn[Zn.fontStack],Fo=pa&&pa[Yi];if(Fo&&Fo.rect)vs=Fo.rect,Va=Fo.metrics;else{const Tl=hn[Zn.fontStack],Kp=Tl&&Tl[Yi];if(!Kp)continue;Va=Kp.metrics}so=(Xi-Zn.scale)*Bi}Ua?(Mt.verticalizable=!0,No.push({glyph:Yi,imageName:ys,x:Or,y:Vr+so,vertical:Ua,scale:Zn.scale,fontStack:Zn.fontStack,sectionIndex:Zo,metrics:Va,rect:vs}),Or+=Pl*Zn.scale+kn):(No.push({glyph:Yi,imageName:ys,x:Or,y:Vr+so,vertical:Ua,scale:Zn.scale,fontStack:Zn.fontStack,sectionIndex:Zo,metrics:Va,rect:vs}),Or+=Va.advance*Zn.scale+kn)}No.length!==0&&(xi=Math.max(Or-kn,xi),rK(No,0,No.length-1,qi,Lo)),Or=0;const Gr=Qt*Xi+Lo;xo.lineOffset=Math.max(Lo,ao),Vr+=Gr,ha=Math.max(Gr,ha),++hi}var Ii;const Zi=Vr-Py,{horizontalAlign:oo,verticalAlign:Ao}=Ow(un);(function(pi,Xi,ao,xo,No,Lo,Gr,Mi,Zn){const Zo=(Xi-ao)*No;let Yi=0;Yi=Lo!==Gr?-Mi*xo-Py:(-xo*Zn+.5)*Gr;for(const so of pi)for(const Va of so.positionedGlyphs)Va.x+=Zo,Va.y+=Yi})(Mt.positionedLines,qi,oo,Ao,xi,ha,Qt,Zi,en.length),Mt.top+=-Ao*Zi,Mt.bottom=Mt.top+Zi,Mt.left+=-oo*xi,Mt.right=Mt.left+xi}(Dt,l,h,y,Je,D,z,B,te,K,ce,Ne),!function(Mt){for(const hn of Mt)if(hn.positionedGlyphs.length!==0)return!1;return!0}(lt)&&Dt}const ky={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},tK={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 e3(d,l,h,y,C,I){if(l.imageName){const D=y[l.imageName];return D?D.displaySize[0]*l.scale*Bi/I+C:0}{const D=h[l.fontStack],z=D&&D[d];return z?z.metrics.advance*l.scale+C:0}}function t3(d,l,h,y){const C=Math.pow(d-l,2);return y?d<l?C/2:2*C:C+Math.abs(h)*h}function nK(d,l,h){let y=0;return d===10&&(y-=1e4),h&&(y+=150),d!==40&&d!==65288||(y+=50),l!==41&&l!==65289||(y+=50),y}function n3(d,l,h,y,C,I){let D=null,z=t3(l,h,C,I);for(const B of y){const K=t3(l-B.x,h,C,I)+B.badness;K<=z&&(D=B,z=K)}return{index:d,x:l,priorBreak:D,badness:z}}function r3(d){return d?r3(d.priorBreak).concat(d.index):[]}function Dw(d,l,h,y,C,I,D){if(I!=="point")return[];if(!d)return[];const z=[],B=function(ce,pe,ve,Ne,Oe,Je){let ht=0;for(let qe=0;qe<ce.length();qe++){const lt=ce.getSection(qe);ht+=e3(ce.getCharCode(qe),lt,Ne,Oe,pe,Je)}return ht/Math.max(1,Math.ceil(ht/ve))}(d,l,h,y,C,D),K=d.text.indexOf("\u200B")>=0;let Y=0;for(let ce=0;ce<d.length();ce++){const pe=d.getSection(ce),ve=d.getCharCode(ce);if(ky[ve]||(Y+=e3(ve,pe,y,C,l,D)),ce<d.length()-1){const Ne=!((te=ve)<11904||!(sn["Bopomofo Extended"](te)||sn.Bopomofo(te)||sn["CJK Compatibility Forms"](te)||sn["CJK Compatibility Ideographs"](te)||sn["CJK Compatibility"](te)||sn["CJK Radicals Supplement"](te)||sn["CJK Strokes"](te)||sn["CJK Symbols and Punctuation"](te)||sn["CJK Unified Ideographs Extension A"](te)||sn["CJK Unified Ideographs"](te)||sn["Enclosed CJK Letters and Months"](te)||sn["Halfwidth and Fullwidth Forms"](te)||sn.Hiragana(te)||sn["Ideographic Description Characters"](te)||sn["Kangxi Radicals"](te)||sn["Katakana Phonetic Extensions"](te)||sn.Katakana(te)||sn["Vertical Forms"](te)||sn["Yi Radicals"](te)||sn["Yi Syllables"](te)));(tK[ve]||Ne||pe.imageName)&&z.push(n3(ce+1,Y,B,z,nK(ve,d.getCharCode(ce+1),Ne&&K),!1))}}var te;return r3(n3(d.length(),Y,B,z,0,!0))}function Ow(d){let l=.5,h=.5;switch(d){case"right":case"top-right":case"bottom-right":l=1;break;case"left":case"top-left":case"bottom-left":l=0}switch(d){case"bottom":case"bottom-right":case"bottom-left":h=1;break;case"top":case"top-right":case"top-left":h=0}return{horizontalAlign:l,verticalAlign:h}}function rK(d,l,h,y,C){if(!y&&!C)return;const I=d[h],D=(d[h].x+I.metrics.advance*I.scale)*y;for(let z=l;z<=h;z++)d[z].x-=D,d[z].y+=C}function iK(d,l,h){const{horizontalAlign:y,verticalAlign:C}=Ow(h),I=l[0]-d.displaySize[0]*y,D=l[1]-d.displaySize[1]*C;return{image:d,top:D,bottom:D+d.displaySize[1],left:I,right:I+d.displaySize[0]}}function i3(d,l,h,y,C,I){const D=d.image;let z;if(D.content){const Oe=D.content,Je=D.pixelRatio||1;z=[Oe[0]/Je,Oe[1]/Je,D.displaySize[0]-Oe[2]/Je,D.displaySize[1]-Oe[3]/Je]}const B=l.left*I,K=l.right*I;let Y,te,ce,pe;h==="width"||h==="both"?(pe=C[0]+B-y[3],te=C[0]+K+y[1]):(pe=C[0]+(B+K-D.displaySize[0])/2,te=pe+D.displaySize[0]);const ve=l.top*I,Ne=l.bottom*I;return h==="height"||h==="both"?(Y=C[1]+ve-y[0],ce=C[1]+Ne+y[2]):(Y=C[1]+(ve+Ne-D.displaySize[1])/2,ce=Y+D.displaySize[1]),{image:D,top:Y,right:te,bottom:ce,left:pe,collisionPadding:z}}const El=128;function o3(d,l){const{expression:h}=l;if(h.kind==="constant")return{kind:"constant",layoutSize:h.evaluate(new $r(d+1))};if(h.kind==="source")return{kind:"source"};{const{zoomStops:y,interpolationType:C}=h;let I=0;for(;I<y.length&&y[I]<=d;)I++;I=Math.max(0,I-1);let D=I;for(;D<y.length&&y[D]<d+1;)D++;D=Math.min(y.length-1,D);const z=y[I],B=y[D];return h.kind==="composite"?{kind:"composite",minZoom:z,maxZoom:B,interpolationType:C}:{kind:"camera",minZoom:z,maxZoom:B,minSize:h.evaluate(new $r(z)),maxSize:h.evaluate(new $r(B)),interpolationType:C}}}class xu extends ie{constructor(l,h,y,C){super(l,h),this.angle=y,C!==void 0&&(this.segment=C)}clone(){return new xu(this.x,this.y,this.angle,this.segment)}}function a3(d,l,h,y,C){if(l.segment===void 0)return!0;let I=l,D=l.segment+1,z=0;for(;z>-h/2;){if(D--,D<0)return!1;z-=d[D].dist(I),I=d[D]}z+=d[D].dist(d[D+1]),D++;const B=[];let K=0;for(;z<h/2;){const Y=d[D],te=d[D+1];if(!te)return!1;let ce=d[D-1].angleTo(Y)-Y.angleTo(te);for(ce=Math.abs((ce+3*Math.PI)%(2*Math.PI)-Math.PI),B.push({distance:z,angleDelta:ce}),K+=ce;z-B[0].distance>y;)K-=B.shift().angleDelta;if(K>C)return!1;D++,z+=Y.dist(te)}return!0}function s3(d){let l=0;for(let h=0;h<d.length-1;h++)l+=d[h].dist(d[h+1]);return l}function l3(d,l,h){return d?.6*l*h:0}function u3(d,l){return Math.max(d?d.right-d.left:0,l?l.right-l.left:0)}function oK(d,l,h,y,C,I){const D=l3(h,C,I),z=u3(h,y)*I;let B=0;const K=s3(d)/2;for(let Y=0;Y<d.length-1;Y++){const te=d[Y],ce=d[Y+1],pe=te.dist(ce);if(B+pe>K){const ve=(K-B)/pe,Ne=wr(te.x,ce.x,ve),Oe=wr(te.y,ce.y,ve),Je=new xu(Ne,Oe,ce.angleTo(te),Y);return Je._round(),!D||a3(d,Je,z,D,l)?Je:void 0}B+=pe}}function aK(d,l,h,y,C,I,D,z,B){const K=l3(y,I,D),Y=u3(y,C),te=Y*D,ce=d[0].x===0||d[0].x===B||d[0].y===0||d[0].y===B;return l-te<l/4&&(l=te+l/4),c3(d,ce?l/2*z%l:(Y/2+2*I)*D*z%l,l,K,h,te,ce,!1,B)}function c3(d,l,h,y,C,I,D,z,B){const K=I/2,Y=s3(d);let te=0,ce=l-h,pe=[];for(let ve=0;ve<d.length-1;ve++){const Ne=d[ve],Oe=d[ve+1],Je=Ne.dist(Oe),ht=Oe.angleTo(Ne);for(;ce+h<te+Je;){ce+=h;const qe=(ce-te)/Je,lt=wr(Ne.x,Oe.x,qe),Dt=wr(Ne.y,Oe.y,qe);if(lt>=0&&lt<B&&Dt>=0&&Dt<B&&ce-K>=0&&ce+K<=Y){const Mt=new xu(lt,Dt,ht,ve);Mt._round(),y&&!a3(d,Mt,I,y,C)||pe.push(Mt)}}te+=Je}return z||pe.length||D||(pe=c3(d,te/2,h,y,C,I,D,!0,B)),pe}function d3(d,l,h,y,C){const I=[];for(let D=0;D<d.length;D++){const z=d[D];let B;for(let K=0;K<z.length-1;K++){let Y=z[K],te=z[K+1];Y.x<l&&te.x<l||(Y.x<l?Y=new ie(l,Y.y+(l-Y.x)/(te.x-Y.x)*(te.y-Y.y))._round():te.x<l&&(te=new ie(l,Y.y+(l-Y.x)/(te.x-Y.x)*(te.y-Y.y))._round()),Y.y<h&&te.y<h||(Y.y<h?Y=new ie(Y.x+(h-Y.y)/(te.y-Y.y)*(te.x-Y.x),h)._round():te.y<h&&(te=new ie(Y.x+(h-Y.y)/(te.y-Y.y)*(te.x-Y.x),h)._round()),Y.x>=y&&te.x>=y||(Y.x>=y?Y=new ie(y,Y.y+(y-Y.x)/(te.x-Y.x)*(te.y-Y.y))._round():te.x>=y&&(te=new ie(y,Y.y+(y-Y.x)/(te.x-Y.x)*(te.y-Y.y))._round()),Y.y>=C&&te.y>=C||(Y.y>=C?Y=new ie(Y.x+(C-Y.y)/(te.y-Y.y)*(te.x-Y.x),C)._round():te.y>=C&&(te=new ie(Y.x+(C-Y.y)/(te.y-Y.y)*(te.x-Y.x),C)._round()),B&&Y.equals(B[B.length-1])||(B=[Y],I.push(B)),B.push(te)))))}}return I}function f3(d,l,h,y){const C=[],I=d.image,D=I.pixelRatio,z=I.paddedRect.w-2,B=I.paddedRect.h-2,K=d.right-d.left,Y=d.bottom-d.top,te=I.stretchX||[[0,z]],ce=I.stretchY||[[0,B]],pe=(Qt,un)=>Qt+un[1]-un[0],ve=te.reduce(pe,0),Ne=ce.reduce(pe,0),Oe=z-ve,Je=B-Ne;let ht=0,qe=ve,lt=0,Dt=Ne,Mt=0,hn=Oe,vn=0,ln=Je;if(I.content&&y){const Qt=I.content;ht=Iy(te,0,Qt[0]),lt=Iy(ce,0,Qt[1]),qe=Iy(te,Qt[0],Qt[2]),Dt=Iy(ce,Qt[1],Qt[3]),Mt=Qt[0]-ht,vn=Qt[1]-lt,hn=Qt[2]-Qt[0]-qe,ln=Qt[3]-Qt[1]-Dt}const en=(Qt,un,nn,jt)=>{const kn=My(Qt.stretch-ht,qe,K,d.left),bn=Ry(Qt.fixed-Mt,hn,Qt.stretch,ve),Kn=My(un.stretch-lt,Dt,Y,d.top),Or=Ry(un.fixed-vn,ln,un.stretch,Ne),Vr=My(nn.stretch-ht,qe,K,d.left),xi=Ry(nn.fixed-Mt,hn,nn.stretch,ve),ha=My(jt.stretch-lt,Dt,Y,d.top),qi=Ry(jt.fixed-vn,ln,jt.stretch,Ne),hi=new ie(kn,Kn),Ii=new ie(Vr,Kn),Zi=new ie(Vr,ha),oo=new ie(kn,ha),Ao=new ie(bn/D,Or/D),pi=new ie(xi/D,qi/D),Xi=l*Math.PI/180;if(Xi){const No=Math.sin(Xi),Lo=Math.cos(Xi),Gr=[Lo,-No,No,Lo];hi._matMult(Gr),Ii._matMult(Gr),oo._matMult(Gr),Zi._matMult(Gr)}const ao=Qt.stretch+Qt.fixed,xo=un.stretch+un.fixed;return{tl:hi,tr:Ii,bl:oo,br:Zi,tex:{x:I.paddedRect.x+1+ao,y:I.paddedRect.y+1+xo,w:nn.stretch+nn.fixed-ao,h:jt.stretch+jt.fixed-xo},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Ao,pixelOffsetBR:pi,minFontScaleX:hn/D/K,minFontScaleY:ln/D/Y,isSDF:h}};if(y&&(I.stretchX||I.stretchY)){const Qt=h3(te,Oe,ve),un=h3(ce,Je,Ne);for(let nn=0;nn<Qt.length-1;nn++){const jt=Qt[nn],kn=Qt[nn+1];for(let bn=0;bn<un.length-1;bn++)C.push(en(jt,un[bn],kn,un[bn+1]))}}else C.push(en({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:z+1},{fixed:0,stretch:B+1}));return C}function Iy(d,l,h){let y=0;for(const C of d)y+=Math.max(l,Math.min(h,C[1]))-Math.max(l,Math.min(h,C[0]));return y}function h3(d,l,h){const y=[{fixed:-1,stretch:0}];for(const[C,I]of d){const D=y[y.length-1];y.push({fixed:C-D.stretch,stretch:D.stretch}),y.push({fixed:C-D.stretch,stretch:D.stretch+(I-C)})}return y.push({fixed:l+1,stretch:h}),y}function My(d,l,h,y){return d/l*h+y}function Ry(d,l,h,y){return d-l*h/y}gn("Anchor",xu);class Dy{constructor(l,h,y,C,I,D,z,B,K,Y){if(this.boxStartIndex=l.length,K){let te=D.top,ce=D.bottom;const pe=D.collisionPadding;pe&&(te-=pe[1],ce+=pe[3]);let ve=ce-te;ve>0&&(ve=Math.max(10,ve),this.circleDiameter=ve)}else{let te=D.top*z-B[0],ce=D.bottom*z+B[2],pe=D.left*z-B[3],ve=D.right*z+B[1];const Ne=D.collisionPadding;if(Ne&&(pe-=Ne[0]*z,te-=Ne[1]*z,ve+=Ne[2]*z,ce+=Ne[3]*z),Y){const Oe=new ie(pe,te),Je=new ie(ve,te),ht=new ie(pe,ce),qe=new ie(ve,ce),lt=Y*Math.PI/180;Oe._rotate(lt),Je._rotate(lt),ht._rotate(lt),qe._rotate(lt),pe=Math.min(Oe.x,Je.x,ht.x,qe.x),ve=Math.max(Oe.x,Je.x,ht.x,qe.x),te=Math.min(Oe.y,Je.y,ht.y,qe.y),ce=Math.max(Oe.y,Je.y,ht.y,qe.y)}l.emplaceBack(h.x,h.y,pe,te,ve,ce,y,C,I)}this.boxEndIndex=l.length}}class sK{constructor(l=[],h=lK){if(this.data=l,this.length=this.data.length,this.compare=h,this.length>0)for(let y=(this.length>>1)-1;y>=0;y--)this._down(y)}push(l){this.data.push(l),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const l=this.data[0],h=this.data.pop();return this.length--,this.length>0&&(this.data[0]=h,this._down(0)),l}peek(){return this.data[0]}_up(l){const{data:h,compare:y}=this,C=h[l];for(;l>0;){const I=l-1>>1,D=h[I];if(y(C,D)>=0)break;h[l]=D,l=I}h[l]=C}_down(l){const{data:h,compare:y}=this,C=this.length>>1,I=h[l];for(;l<C;){let D=1+(l<<1),z=h[D];const B=D+1;if(B<this.length&&y(h[B],z)<0&&(D=B,z=h[B]),y(z,I)>=0)break;h[l]=z,l=D}h[l]=I}}function lK(d,l){return d<l?-1:d>l?1:0}function uK(d,l=1,h=!1){let y=1/0,C=1/0,I=-1/0,D=-1/0;const z=d[0];for(let pe=0;pe<z.length;pe++){const ve=z[pe];(!pe||ve.x<y)&&(y=ve.x),(!pe||ve.y<C)&&(C=ve.y),(!pe||ve.x>I)&&(I=ve.x),(!pe||ve.y>D)&&(D=ve.y)}const B=Math.min(I-y,D-C);let K=B/2;const Y=new sK([],cK);if(B===0)return new ie(y,C);for(let pe=y;pe<I;pe+=B)for(let ve=C;ve<D;ve+=B)Y.push(new bf(pe+K,ve+K,K,d));let te=function(pe){let ve=0,Ne=0,Oe=0;const Je=pe[0];for(let ht=0,qe=Je.length,lt=qe-1;ht<qe;lt=ht++){const Dt=Je[ht],Mt=Je[lt],hn=Dt.x*Mt.y-Mt.x*Dt.y;Ne+=(Dt.x+Mt.x)*hn,Oe+=(Dt.y+Mt.y)*hn,ve+=3*hn}return new bf(Ne/ve,Oe/ve,0,pe)}(d),ce=Y.length;for(;Y.length;){const pe=Y.pop();(pe.d>te.d||!te.d)&&(te=pe,h&&console.log("found best %d after %d probes",Math.round(1e4*pe.d)/1e4,ce)),pe.max-te.d<=l||(K=pe.h/2,Y.push(new bf(pe.p.x-K,pe.p.y-K,K,d)),Y.push(new bf(pe.p.x+K,pe.p.y-K,K,d)),Y.push(new bf(pe.p.x-K,pe.p.y+K,K,d)),Y.push(new bf(pe.p.x+K,pe.p.y+K,K,d)),ce+=4)}return h&&(console.log(`num probes: ${ce}`),console.log(`best distance: ${te.d}`)),te.p}function cK(d,l){return l.max-d.max}function bf(d,l,h,y){this.p=new ie(d,l),this.h=h,this.d=function(C,I){let D=!1,z=1/0;for(let B=0;B<I.length;B++){const K=I[B];for(let Y=0,te=K.length,ce=te-1;Y<te;ce=Y++){const pe=K[Y],ve=K[ce];pe.y>C.y!=ve.y>C.y&&C.x<(ve.x-pe.x)*(C.y-pe.y)/(ve.y-pe.y)+pe.x&&(D=!D),z=Math.min(z,_I(C,pe,ve))}}return(D?1:-1)*Math.sqrt(z)}(this.p,y),this.max=this.d+this.h*Math.SQRT2}const Aw=Number.POSITIVE_INFINITY;function p3(d,l){return l[1]!==Aw?function(h,y,C){let I=0,D=0;switch(y=Math.abs(y),C=Math.abs(C),h){case"top-right":case"top-left":case"top":D=C-7;break;case"bottom-right":case"bottom-left":case"bottom":D=7-C}switch(h){case"top-right":case"bottom-right":case"right":I=-y;break;case"top-left":case"bottom-left":case"left":I=y}return[I,D]}(d,l[0],l[1]):function(h,y){let C=0,I=0;y<0&&(y=0);const D=y/Math.sqrt(2);switch(h){case"top-right":case"top-left":I=D-7;break;case"bottom-right":case"bottom-left":I=7-D;break;case"bottom":I=7-y;break;case"top":I=y-7}switch(h){case"top-right":case"bottom-right":C=-D;break;case"top-left":case"bottom-left":C=D;break;case"left":C=y;break;case"right":C=-y}return[C,I]}(d,l[0])}function Nw(d){switch(d){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function dK(d,l,h,y,C,I,D,z,B,K,Y){let te=I.textMaxSize.evaluate(l,{});te===void 0&&(te=D);const ce=d.layers[0].layout,pe=ce.get("icon-offset").evaluate(l,{},Y),ve=g3(h.horizontal),Ne=D/24,Oe=d.tilePixelRatio*Ne,Je=d.tilePixelRatio*te/24,ht=d.tilePixelRatio*z,qe=d.tilePixelRatio*ce.get("symbol-spacing"),lt=ce.get("text-padding")*d.tilePixelRatio,Dt=function(jt,kn,bn,Kn=1){const Or=jt.get("icon-padding").evaluate(kn,{},bn),Vr=Or&&Or.values;return[Vr[0]*Kn,Vr[1]*Kn,Vr[2]*Kn,Vr[3]*Kn]}(ce,l,Y,d.tilePixelRatio),Mt=ce.get("text-max-angle")/180*Math.PI,hn=ce.get("text-rotation-alignment")!=="viewport"&&ce.get("symbol-placement")!=="point",vn=ce.get("icon-rotation-alignment")==="map"&&ce.get("symbol-placement")!=="point",ln=ce.get("symbol-placement"),en=qe/2,Qt=ce.get("icon-text-fit");let un;y&&Qt!=="none"&&(d.allowVerticalPlacement&&h.vertical&&(un=i3(y,h.vertical,Qt,ce.get("icon-text-fit-padding"),pe,Ne)),ve&&(y=i3(y,ve,Qt,ce.get("icon-text-fit-padding"),pe,Ne)));const nn=(jt,kn)=>{kn.x<0||kn.x>=yi||kn.y<0||kn.y>=yi||function(bn,Kn,Or,Vr,xi,ha,qi,hi,Ii,Zi,oo,Ao,pi,Xi,ao,xo,No,Lo,Gr,Mi,Zn,Zo,Yi,so,Va){const vs=bn.addToLineVertexArray(Kn,Or);let ys,Pl,Ua,pa,Fo=0,Tl=0,Kp=0,D3=0,Kw=-1,Ww=-1;const kl={};let O3=ki.exports(""),Gw=0,qw=0;if(hi._unevaluatedLayout.getValue("text-radial-offset")===void 0?[Gw,qw]=hi.layout.get("text-offset").evaluate(Zn,{},so).map(zo=>zo*Bi):(Gw=hi.layout.get("text-radial-offset").evaluate(Zn,{},so)*Bi,qw=Aw),bn.allowVerticalPlacement&&Vr.vertical){const zo=hi.layout.get("text-rotate").evaluate(Zn,{},so)+90;Ua=new Dy(Ii,Kn,Zi,oo,Ao,Vr.vertical,pi,Xi,ao,zo),qi&&(pa=new Dy(Ii,Kn,Zi,oo,Ao,qi,No,Lo,ao,zo))}if(xi){const zo=hi.layout.get("icon-rotate").evaluate(Zn,{}),Gs=hi.layout.get("icon-text-fit")!=="none",Wp=f3(xi,zo,Yi,Gs),Gp=qi?f3(qi,zo,Yi,Gs):void 0;Pl=new Dy(Ii,Kn,Zi,oo,Ao,xi,No,Lo,!1,zo),Fo=4*Wp.length;const L3=bn.iconSizeData;let Vc=null;L3.kind==="source"?(Vc=[El*hi.layout.get("icon-size").evaluate(Zn,{})],Vc[0]>bu&&L(`${bn.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):L3.kind==="composite"&&(Vc=[El*Zo.compositeIconSizes[0].evaluate(Zn,{},so),El*Zo.compositeIconSizes[1].evaluate(Zn,{},so)],(Vc[0]>bu||Vc[1]>bu)&&L(`${bn.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),bn.addSymbols(bn.icon,Wp,Vc,Mi,Gr,Zn,o.WritingMode.none,Kn,vs.lineStartIndex,vs.lineLength,-1,so),Kw=bn.icon.placedSymbolArray.length-1,Gp&&(Tl=4*Gp.length,bn.addSymbols(bn.icon,Gp,Vc,Mi,Gr,Zn,o.WritingMode.vertical,Kn,vs.lineStartIndex,vs.lineLength,-1,so),Ww=bn.icon.placedSymbolArray.length-1)}const A3=Object.keys(Vr.horizontal);for(const zo of A3){const Gs=Vr.horizontal[zo];if(!ys){O3=ki.exports(Gs.text);const Gp=hi.layout.get("text-rotate").evaluate(Zn,{},so);ys=new Dy(Ii,Kn,Zi,oo,Ao,Gs,pi,Xi,ao,Gp)}const Wp=Gs.positionedLines.length===1;if(Kp+=m3(bn,Kn,Gs,ha,hi,ao,Zn,xo,vs,Vr.vertical?o.WritingMode.horizontal:o.WritingMode.horizontalOnly,Wp?A3:[zo],kl,Kw,Zo,so),Wp)break}Vr.vertical&&(D3+=m3(bn,Kn,Vr.vertical,ha,hi,ao,Zn,xo,vs,o.WritingMode.vertical,["vertical"],kl,Ww,Zo,so));const SK=ys?ys.boxStartIndex:bn.collisionBoxArray.length,EK=ys?ys.boxEndIndex:bn.collisionBoxArray.length,PK=Ua?Ua.boxStartIndex:bn.collisionBoxArray.length,TK=Ua?Ua.boxEndIndex:bn.collisionBoxArray.length,kK=Pl?Pl.boxStartIndex:bn.collisionBoxArray.length,IK=Pl?Pl.boxEndIndex:bn.collisionBoxArray.length,MK=pa?pa.boxStartIndex:bn.collisionBoxArray.length,RK=pa?pa.boxEndIndex:bn.collisionBoxArray.length;let xs=-1;const Fy=(zo,Gs)=>zo&&zo.circleDiameter?Math.max(zo.circleDiameter,Gs):Gs;xs=Fy(ys,xs),xs=Fy(Ua,xs),xs=Fy(Pl,xs),xs=Fy(pa,xs);const N3=xs>-1?1:0;N3&&(xs*=Va/Bi),bn.glyphOffsetArray.length>=_f.MAX_GLYPHS&&L("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Zn.sortKey!==void 0&&bn.addToSortKeyRanges(bn.symbolInstances.length,Zn.sortKey),bn.symbolInstances.emplaceBack(Kn.x,Kn.y,kl.right>=0?kl.right:-1,kl.center>=0?kl.center:-1,kl.left>=0?kl.left:-1,kl.vertical||-1,Kw,Ww,O3,SK,EK,PK,TK,kK,IK,MK,RK,Zi,Kp,D3,Fo,Tl,N3,0,pi,Gw,qw,xs)}(d,kn,jt,h,y,C,un,d.layers[0],d.collisionBoxArray,l.index,l.sourceLayerIndex,d.index,Oe,[lt,lt,lt,lt],hn,B,ht,Dt,vn,pe,l,I,K,Y,D)};if(ln==="line")for(const jt of d3(l.geometry,0,0,yi,yi)){const kn=aK(jt,qe,Mt,h.vertical||ve,y,24,Je,d.overscaling,yi);for(const bn of kn){const Kn=ve;Kn&&fK(d,Kn.text,en,bn)||nn(jt,bn)}}else if(ln==="line-center"){for(const jt of l.geometry)if(jt.length>1){const kn=oK(jt,Mt,h.vertical||ve,y,24,Je);kn&&nn(jt,kn)}}else if(l.type==="Polygon")for(const jt of ww(l.geometry,0)){const kn=uK(jt,16);nn(jt[0],new xu(kn.x,kn.y,0))}else if(l.type==="LineString")for(const jt of l.geometry)nn(jt,new xu(jt[0].x,jt[0].y,0));else if(l.type==="Point")for(const jt of l.geometry)for(const kn of jt)nn([kn],new xu(kn.x,kn.y,0))}const bu=32640;function m3(d,l,h,y,C,I,D,z,B,K,Y,te,ce,pe,ve){const Ne=function(ht,qe,lt,Dt,Mt,hn,vn,ln){const en=Dt.layout.get("text-rotate").evaluate(hn,{})*Math.PI/180,Qt=[];for(const un of qe.positionedLines)for(const nn of un.positionedGlyphs){if(!nn.rect)continue;const jt=nn.rect||{};let kn=4,bn=!0,Kn=1,Or=0;const Vr=(Mt||ln)&&nn.vertical,xi=nn.metrics.advance*nn.scale/2;if(ln&&qe.verticalizable){const Gr=(nn.scale-1)*Bi,Mi=(Bi-nn.metrics.width*nn.scale)/2;Or=un.lineOffset/2-(nn.imageName?-Mi:Gr)}if(nn.imageName){const Gr=vn[nn.imageName];bn=Gr.sdf,Kn=Gr.pixelRatio,kn=1/Kn}const ha=Mt?[nn.x+xi,nn.y]:[0,0];let qi=Mt?[0,0]:[nn.x+xi+lt[0],nn.y+lt[1]-Or],hi=[0,0];Vr&&(hi=qi,qi=[0,0]);const Ii=(nn.metrics.left-kn)*nn.scale-xi+qi[0],Zi=(-nn.metrics.top-kn)*nn.scale+qi[1],oo=Ii+jt.w*nn.scale/Kn,Ao=Zi+jt.h*nn.scale/Kn,pi=new ie(Ii,Zi),Xi=new ie(oo,Zi),ao=new ie(Ii,Ao),xo=new ie(oo,Ao);if(Vr){const Gr=new ie(-xi,xi-Py),Mi=-Math.PI/2,Zn=12-xi,Zo=new ie(22-Zn,-(nn.imageName?Zn:0)),Yi=new ie(...hi);pi._rotateAround(Mi,Gr)._add(Zo)._add(Yi),Xi._rotateAround(Mi,Gr)._add(Zo)._add(Yi),ao._rotateAround(Mi,Gr)._add(Zo)._add(Yi),xo._rotateAround(Mi,Gr)._add(Zo)._add(Yi)}if(en){const Gr=Math.sin(en),Mi=Math.cos(en),Zn=[Mi,-Gr,Gr,Mi];pi._matMult(Zn),Xi._matMult(Zn),ao._matMult(Zn),xo._matMult(Zn)}const No=new ie(0,0),Lo=new ie(0,0);Qt.push({tl:pi,tr:Xi,bl:ao,br:xo,tex:jt,writingMode:qe.writingMode,glyphOffset:ha,sectionIndex:nn.sectionIndex,isSDF:bn,pixelOffsetTL:No,pixelOffsetBR:Lo,minFontScaleX:0,minFontScaleY:0})}return Qt}(0,h,z,C,I,D,y,d.allowVerticalPlacement),Oe=d.textSizeData;let Je=null;Oe.kind==="source"?(Je=[El*C.layout.get("text-size").evaluate(D,{})],Je[0]>bu&&L(`${d.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):Oe.kind==="composite"&&(Je=[El*pe.compositeTextSizes[0].evaluate(D,{},ve),El*pe.compositeTextSizes[1].evaluate(D,{},ve)],(Je[0]>bu||Je[1]>bu)&&L(`${d.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),d.addSymbols(d.text,Ne,Je,z,I,D,K,l,B.lineStartIndex,B.lineLength,ce,ve);for(const ht of Y)te[ht]=d.text.placedSymbolArray.length-1;return 4*Ne.length}function g3(d){for(const l in d)return d[l];return null}function fK(d,l,h,y){const C=d.compareText;if(l in C){const I=C[l];for(let D=I.length-1;D>=0;D--)if(y.dist(I[D])<h)return!0}else C[l]=[];return C[l].push(y),!1}const hK=vu.VectorTileFeature.types,pK=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Oy(d,l,h,y,C,I,D,z,B,K,Y,te,ce){const pe=z?Math.min(bu,Math.round(z[0])):0,ve=z?Math.min(bu,Math.round(z[1])):0;d.emplaceBack(l,h,Math.round(32*y),Math.round(32*C),I,D,(pe<<1)+(B?1:0),ve,16*K,16*Y,256*te,256*ce)}function Lw(d,l,h){d.emplaceBack(l.x,l.y,h),d.emplaceBack(l.x,l.y,h),d.emplaceBack(l.x,l.y,h),d.emplaceBack(l.x,l.y,h)}function mK(d){for(const l of d.sections)if(ly(l.text))return!0;return!1}class Fw{constructor(l){this.layoutVertexArray=new $a,this.indexArray=new go,this.programConfigurations=l,this.segments=new qn,this.dynamicLayoutVertexArray=new ca,this.opacityVertexArray=new Ba,this.placedSymbolArray=new Ut}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(l,h,y,C){this.isEmpty()||(y&&(this.layoutVertexBuffer=l.createVertexBuffer(this.layoutVertexArray,zH.members),this.indexBuffer=l.createIndexBuffer(this.indexArray,h),this.dynamicLayoutVertexBuffer=l.createVertexBuffer(this.dynamicLayoutVertexArray,$H.members,!0),this.opacityVertexBuffer=l.createVertexBuffer(this.opacityVertexArray,pK,!0),this.opacityVertexBuffer.itemSize=1),(y||C)&&this.programConfigurations.upload(l))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}gn("SymbolBuffers",Fw);class zw{constructor(l,h,y){this.layoutVertexArray=new l,this.layoutAttributes=h,this.indexArray=new y,this.segments=new qn,this.collisionVertexArray=new Go}upload(l){this.layoutVertexBuffer=l.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=l.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=l.createVertexBuffer(this.collisionVertexArray,BH.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}gn("CollisionBuffers",zw);class _f{constructor(l){this.collisionBoxArray=l.collisionBoxArray,this.zoom=l.zoom,this.overscaling=l.overscaling,this.layers=l.layers,this.layerIds=this.layers.map(D=>D.id),this.index=l.index,this.pixelRatio=l.pixelRatio,this.sourceLayerIndex=l.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=gw([]),this.placementViewportMatrix=gw([]);const h=this.layers[0]._unevaluatedLayout._values;this.textSizeData=o3(this.zoom,h["text-size"]),this.iconSizeData=o3(this.zoom,h["icon-size"]);const y=this.layers[0].layout,C=y.get("symbol-sort-key"),I=y.get("symbol-z-order");this.canOverlap=Bw(y,"text-overlap","text-allow-overlap")!=="never"||Bw(y,"icon-overlap","icon-allow-overlap")!=="never"||y.get("text-ignore-placement")||y.get("icon-ignore-placement"),this.sortFeaturesByKey=I!=="viewport-y"&&!C.isConstant(),this.sortFeaturesByY=(I==="viewport-y"||I==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,y.get("symbol-placement")==="point"&&(this.writingModes=y.get("text-writing-mode").map(D=>o.WritingMode[D])),this.stateDependentLayerIds=this.layers.filter(D=>D.isStateDependent()).map(D=>D.id),this.sourceID=l.sourceID}createArrays(){this.text=new Fw(new Lc(this.layers,this.zoom,l=>/^text/.test(l))),this.icon=new Fw(new Lc(this.layers,this.zoom,l=>/^icon/.test(l))),this.glyphOffsetArray=new Jt,this.lineVertexArray=new fn,this.symbolInstances=new cn}calculateGlyphDependencies(l,h,y,C,I){for(let D=0;D<l.length;D++)if(h[l.charCodeAt(D)]=!0,(y||C)&&I){const z=Vp[l.charAt(D)];z&&(h[z.charCodeAt(0)]=!0)}}populate(l,h,y){const C=this.layers[0],I=C.layout,D=I.get("text-font"),z=I.get("text-field"),B=I.get("icon-image"),K=(z.value.kind!=="constant"||z.value.value instanceof Ce&&!z.value.value.isEmpty()||z.value.value.toString().length>0)&&(D.value.kind!=="constant"||D.value.value.length>0),Y=B.value.kind!=="constant"||!!B.value.value||Object.keys(B.parameters).length>0,te=I.get("symbol-sort-key");if(this.features=[],!K&&!Y)return;const ce=h.iconDependencies,pe=h.glyphDependencies,ve=h.availableImages,Ne=new $r(this.zoom);for(const{feature:Oe,id:Je,index:ht,sourceLayerIndex:qe}of l){const lt=C._featureFilter.needGeometry,Dt=zc(Oe,lt);if(!C._featureFilter.filter(Ne,Dt,y))continue;let Mt,hn;if(lt||(Dt.geometry=Fc(Oe)),K){const ln=C.getValueAndResolveTokens("text-field",Dt,y,ve),en=Ce.factory(ln);mK(en)&&(this.hasRTLText=!0),(!this.hasRTLText||Oc()==="unavailable"||this.hasRTLText&&Wo.isParsed())&&(Mt=UH(en,C,Dt))}if(Y){const ln=C.getValueAndResolveTokens("icon-image",Dt,y,ve);hn=ln instanceof Le?ln:Le.fromString(ln)}if(!Mt&&!hn)continue;const vn=this.sortFeaturesByKey?te.evaluate(Dt,{},y):void 0;if(this.features.push({id:Je,text:Mt,icon:hn,index:ht,sourceLayerIndex:qe,geometry:Dt.geometry,properties:Oe.properties,type:hK[Oe.type],sortKey:vn}),hn&&(ce[hn.name]=!0),Mt){const ln=D.evaluate(Dt,{},y).join(","),en=I.get("text-rotation-alignment")!=="viewport"&&I.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(o.WritingMode.vertical)>=0;for(const Qt of Mt.sections)if(Qt.image)ce[Qt.image.name]=!0;else{const un=uf(Mt.toString()),nn=Qt.fontStack||ln,jt=pe[nn]=pe[nn]||{};this.calculateGlyphDependencies(Qt.text,jt,en,this.allowVerticalPlacement,un)}}}I.get("symbol-placement")==="line"&&(this.features=function(Oe){const Je={},ht={},qe=[];let lt=0;function Dt(ln){qe.push(Oe[ln]),lt++}function Mt(ln,en,Qt){const un=ht[ln];return delete ht[ln],ht[en]=un,qe[un].geometry[0].pop(),qe[un].geometry[0]=qe[un].geometry[0].concat(Qt[0]),un}function hn(ln,en,Qt){const un=Je[en];return delete Je[en],Je[ln]=un,qe[un].geometry[0].shift(),qe[un].geometry[0]=Qt[0].concat(qe[un].geometry[0]),un}function vn(ln,en,Qt){const un=Qt?en[0][en[0].length-1]:en[0][0];return`${ln}:${un.x}:${un.y}`}for(let ln=0;ln<Oe.length;ln++){const en=Oe[ln],Qt=en.geometry,un=en.text?en.text.toString():null;if(!un){Dt(ln);continue}const nn=vn(un,Qt),jt=vn(un,Qt,!0);if(nn in ht&&jt in Je&&ht[nn]!==Je[jt]){const kn=hn(nn,jt,Qt),bn=Mt(nn,jt,qe[kn].geometry);delete Je[nn],delete ht[jt],ht[vn(un,qe[bn].geometry,!0)]=bn,qe[kn].geometry=null}else nn in ht?Mt(nn,jt,Qt):jt in Je?hn(nn,jt,Qt):(Dt(ln),Je[nn]=lt-1,ht[jt]=lt-1)}return qe.filter(ln=>ln.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((Oe,Je)=>Oe.sortKey-Je.sortKey)}update(l,h,y){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(l,h,this.layers,y),this.icon.programConfigurations.updatePaintArrays(l,h,this.layers,y))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(l){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(l),this.iconCollisionBox.upload(l)),this.text.upload(l,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(l,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(l,h){const y=this.lineVertexArray.length;if(l.segment!==void 0){let C=l.dist(h[l.segment+1]),I=l.dist(h[l.segment]);const D={};for(let z=l.segment+1;z<h.length;z++)D[z]={x:h[z].x,y:h[z].y,tileUnitDistanceFromAnchor:C},z<h.length-1&&(C+=h[z+1].dist(h[z]));for(let z=l.segment||0;z>=0;z--)D[z]={x:h[z].x,y:h[z].y,tileUnitDistanceFromAnchor:I},z>0&&(I+=h[z-1].dist(h[z]));for(let z=0;z<h.length;z++){const B=D[z];this.lineVertexArray.emplaceBack(B.x,B.y,B.tileUnitDistanceFromAnchor)}}return{lineStartIndex:y,lineLength:this.lineVertexArray.length-y}}addSymbols(l,h,y,C,I,D,z,B,K,Y,te,ce){const pe=l.indexArray,ve=l.layoutVertexArray,Ne=l.segments.prepareSegment(4*h.length,ve,pe,this.canOverlap?D.sortKey:void 0),Oe=this.glyphOffsetArray.length,Je=Ne.vertexLength,ht=this.allowVerticalPlacement&&z===o.WritingMode.vertical?Math.PI/2:0,qe=D.text&&D.text.sections;for(let lt=0;lt<h.length;lt++){const{tl:Dt,tr:Mt,bl:hn,br:vn,tex:ln,pixelOffsetTL:en,pixelOffsetBR:Qt,minFontScaleX:un,minFontScaleY:nn,glyphOffset:jt,isSDF:kn,sectionIndex:bn}=h[lt],Kn=Ne.vertexLength,Or=jt[1];Oy(ve,B.x,B.y,Dt.x,Or+Dt.y,ln.x,ln.y,y,kn,en.x,en.y,un,nn),Oy(ve,B.x,B.y,Mt.x,Or+Mt.y,ln.x+ln.w,ln.y,y,kn,Qt.x,en.y,un,nn),Oy(ve,B.x,B.y,hn.x,Or+hn.y,ln.x,ln.y+ln.h,y,kn,en.x,Qt.y,un,nn),Oy(ve,B.x,B.y,vn.x,Or+vn.y,ln.x+ln.w,ln.y+ln.h,y,kn,Qt.x,Qt.y,un,nn),Lw(l.dynamicLayoutVertexArray,B,ht),pe.emplaceBack(Kn,Kn+1,Kn+2),pe.emplaceBack(Kn+1,Kn+2,Kn+3),Ne.vertexLength+=4,Ne.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(jt[0]),lt!==h.length-1&&bn===h[lt+1].sectionIndex||l.programConfigurations.populatePaintArrays(ve.length,D,D.index,{},ce,qe&&qe[bn])}l.placedSymbolArray.emplaceBack(B.x,B.y,Oe,this.glyphOffsetArray.length-Oe,Je,K,Y,B.segment,y?y[0]:0,y?y[1]:0,C[0],C[1],z,0,!1,0,te)}_addCollisionDebugVertex(l,h,y,C,I,D){return h.emplaceBack(0,0),l.emplaceBack(y.x,y.y,C,I,Math.round(D.x),Math.round(D.y))}addCollisionDebugVertices(l,h,y,C,I,D,z){const B=I.segments.prepareSegment(4,I.layoutVertexArray,I.indexArray),K=B.vertexLength,Y=I.layoutVertexArray,te=I.collisionVertexArray,ce=z.anchorX,pe=z.anchorY;this._addCollisionDebugVertex(Y,te,D,ce,pe,new ie(l,h)),this._addCollisionDebugVertex(Y,te,D,ce,pe,new ie(y,h)),this._addCollisionDebugVertex(Y,te,D,ce,pe,new ie(y,C)),this._addCollisionDebugVertex(Y,te,D,ce,pe,new ie(l,C)),B.vertexLength+=4;const ve=I.indexArray;ve.emplaceBack(K,K+1),ve.emplaceBack(K+1,K+2),ve.emplaceBack(K+2,K+3),ve.emplaceBack(K+3,K),B.primitiveLength+=4}addDebugCollisionBoxes(l,h,y,C){for(let I=l;I<h;I++){const D=this.collisionBoxArray.get(I);this.addCollisionDebugVertices(D.x1,D.y1,D.x2,D.y2,C?this.textCollisionBox:this.iconCollisionBox,D.anchorPoint,y)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new zw(Ks,KI.members,ms),this.iconCollisionBox=new zw(Ks,KI.members,ms);for(let l=0;l<this.symbolInstances.length;l++){const h=this.symbolInstances.get(l);this.addDebugCollisionBoxes(h.textBoxStartIndex,h.textBoxEndIndex,h,!0),this.addDebugCollisionBoxes(h.verticalTextBoxStartIndex,h.verticalTextBoxEndIndex,h,!0),this.addDebugCollisionBoxes(h.iconBoxStartIndex,h.iconBoxEndIndex,h,!1),this.addDebugCollisionBoxes(h.verticalIconBoxStartIndex,h.verticalIconBoxEndIndex,h,!1)}}_deserializeCollisionBoxesForSymbol(l,h,y,C,I,D,z,B,K){const Y={};for(let te=h;te<y;te++){const ce=l.get(te);Y.textBox={x1:ce.x1,y1:ce.y1,x2:ce.x2,y2:ce.y2,anchorPointX:ce.anchorPointX,anchorPointY:ce.anchorPointY},Y.textFeatureIndex=ce.featureIndex;break}for(let te=C;te<I;te++){const ce=l.get(te);Y.verticalTextBox={x1:ce.x1,y1:ce.y1,x2:ce.x2,y2:ce.y2,anchorPointX:ce.anchorPointX,anchorPointY:ce.anchorPointY},Y.verticalTextFeatureIndex=ce.featureIndex;break}for(let te=D;te<z;te++){const ce=l.get(te);Y.iconBox={x1:ce.x1,y1:ce.y1,x2:ce.x2,y2:ce.y2,anchorPointX:ce.anchorPointX,anchorPointY:ce.anchorPointY},Y.iconFeatureIndex=ce.featureIndex;break}for(let te=B;te<K;te++){const ce=l.get(te);Y.verticalIconBox={x1:ce.x1,y1:ce.y1,x2:ce.x2,y2:ce.y2,anchorPointX:ce.anchorPointX,anchorPointY:ce.anchorPointY},Y.verticalIconFeatureIndex=ce.featureIndex;break}return Y}deserializeCollisionBoxes(l){this.collisionArrays=[];for(let h=0;h<this.symbolInstances.length;h++){const y=this.symbolInstances.get(h);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(l,y.textBoxStartIndex,y.textBoxEndIndex,y.verticalTextBoxStartIndex,y.verticalTextBoxEndIndex,y.iconBoxStartIndex,y.iconBoxEndIndex,y.verticalIconBoxStartIndex,y.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(l,h){const y=l.placedSymbolArray.get(h),C=y.vertexStartIndex+4*y.numGlyphs;for(let I=y.vertexStartIndex;I<C;I+=4)l.indexArray.emplaceBack(I,I+1,I+2),l.indexArray.emplaceBack(I+1,I+2,I+3)}getSortedSymbolIndexes(l){if(this.sortedAngle===l&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;const h=Math.sin(l),y=Math.cos(l),C=[],I=[],D=[];for(let z=0;z<this.symbolInstances.length;++z){D.push(z);const B=this.symbolInstances.get(z);C.push(0|Math.round(h*B.anchorX+y*B.anchorY)),I.push(B.featureIndex)}return D.sort((z,B)=>C[z]-C[B]||I[B]-I[z]),D}addToSortKeyRanges(l,h){const y=this.sortKeyRanges[this.sortKeyRanges.length-1];y&&y.sortKey===h?y.symbolInstanceEnd=l+1:this.sortKeyRanges.push({sortKey:h,symbolInstanceStart:l,symbolInstanceEnd:l+1})}sortFeatures(l){if(this.sortFeaturesByY&&this.sortedAngle!==l&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(l),this.sortedAngle=l,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const h of this.symbolInstanceIndexes){const y=this.symbolInstances.get(h);this.featureSortOrder.push(y.featureIndex),[y.rightJustifiedTextSymbolIndex,y.centerJustifiedTextSymbolIndex,y.leftJustifiedTextSymbolIndex].forEach((C,I,D)=>{C>=0&&D.indexOf(C)===I&&this.addIndicesForPlacedSymbol(this.text,C)}),y.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,y.verticalPlacedTextSymbolIndex),y.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,y.placedIconSymbolIndex),y.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,y.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}gn("SymbolBucket",_f,{omit:["layers","collisionBoxArray","features","compareText"]}),_f.MAX_GLYPHS=65535,_f.addDynamicAttributes=Lw;const gK=new $i({"symbol-placement":new xn(ze.layout_symbol["symbol-placement"]),"symbol-spacing":new xn(ze.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new xn(ze.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Rn(ze.layout_symbol["symbol-sort-key"]),"symbol-z-order":new xn(ze.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new xn(ze.layout_symbol["icon-allow-overlap"]),"icon-overlap":new xn(ze.layout_symbol["icon-overlap"]),"icon-ignore-placement":new xn(ze.layout_symbol["icon-ignore-placement"]),"icon-optional":new xn(ze.layout_symbol["icon-optional"]),"icon-rotation-alignment":new xn(ze.layout_symbol["icon-rotation-alignment"]),"icon-size":new Rn(ze.layout_symbol["icon-size"]),"icon-text-fit":new xn(ze.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new xn(ze.layout_symbol["icon-text-fit-padding"]),"icon-image":new Rn(ze.layout_symbol["icon-image"]),"icon-rotate":new Rn(ze.layout_symbol["icon-rotate"]),"icon-padding":new Rn(ze.layout_symbol["icon-padding"]),"icon-keep-upright":new xn(ze.layout_symbol["icon-keep-upright"]),"icon-offset":new Rn(ze.layout_symbol["icon-offset"]),"icon-anchor":new Rn(ze.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new xn(ze.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new xn(ze.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new xn(ze.layout_symbol["text-rotation-alignment"]),"text-field":new Rn(ze.layout_symbol["text-field"]),"text-font":new Rn(ze.layout_symbol["text-font"]),"text-size":new Rn(ze.layout_symbol["text-size"]),"text-max-width":new Rn(ze.layout_symbol["text-max-width"]),"text-line-height":new xn(ze.layout_symbol["text-line-height"]),"text-letter-spacing":new Rn(ze.layout_symbol["text-letter-spacing"]),"text-justify":new Rn(ze.layout_symbol["text-justify"]),"text-radial-offset":new Rn(ze.layout_symbol["text-radial-offset"]),"text-variable-anchor":new xn(ze.layout_symbol["text-variable-anchor"]),"text-anchor":new Rn(ze.layout_symbol["text-anchor"]),"text-max-angle":new xn(ze.layout_symbol["text-max-angle"]),"text-writing-mode":new xn(ze.layout_symbol["text-writing-mode"]),"text-rotate":new Rn(ze.layout_symbol["text-rotate"]),"text-padding":new xn(ze.layout_symbol["text-padding"]),"text-keep-upright":new xn(ze.layout_symbol["text-keep-upright"]),"text-transform":new Rn(ze.layout_symbol["text-transform"]),"text-offset":new Rn(ze.layout_symbol["text-offset"]),"text-allow-overlap":new xn(ze.layout_symbol["text-allow-overlap"]),"text-overlap":new xn(ze.layout_symbol["text-overlap"]),"text-ignore-placement":new xn(ze.layout_symbol["text-ignore-placement"]),"text-optional":new xn(ze.layout_symbol["text-optional"])});var $w={paint:new $i({"icon-opacity":new Rn(ze.paint_symbol["icon-opacity"]),"icon-color":new Rn(ze.paint_symbol["icon-color"]),"icon-halo-color":new Rn(ze.paint_symbol["icon-halo-color"]),"icon-halo-width":new Rn(ze.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Rn(ze.paint_symbol["icon-halo-blur"]),"icon-translate":new xn(ze.paint_symbol["icon-translate"]),"icon-translate-anchor":new xn(ze.paint_symbol["icon-translate-anchor"]),"text-opacity":new Rn(ze.paint_symbol["text-opacity"]),"text-color":new Rn(ze.paint_symbol["text-color"],{runtimeType:En,getOverride:d=>d.textColor,hasOverride:d=>!!d.textColor}),"text-halo-color":new Rn(ze.paint_symbol["text-halo-color"]),"text-halo-width":new Rn(ze.paint_symbol["text-halo-width"]),"text-halo-blur":new Rn(ze.paint_symbol["text-halo-blur"]),"text-translate":new xn(ze.paint_symbol["text-translate"]),"text-translate-anchor":new xn(ze.paint_symbol["text-translate-anchor"])}),layout:gK};class v3{constructor(l){if(l.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=l.property.overrides?l.property.overrides.runtimeType:pn,this.defaultValue=l}evaluate(l){if(l.formattedSection){const h=this.defaultValue.property.overrides;if(h&&h.hasOverride(l.formattedSection))return h.getOverride(l.formattedSection)}return l.feature&&l.featureState?this.defaultValue.evaluate(l.feature,l.featureState):this.defaultValue.property.specification.default}eachChild(l){this.defaultValue.isConstant()||l(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}gn("FormatSectionOverride",v3,{omit:["defaultValue"]});class Ay extends za{constructor(l){super(l,$w)}recalculate(l,h){if(super.recalculate(l,h),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 y=this.layout.get("text-writing-mode");if(y){const C=[];for(const I of y)C.indexOf(I)<0&&C.push(I);this.layout._values["text-writing-mode"]=C}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(l,h,y,C){const I=this.layout.get(l).evaluate(h,{},y,C),D=this._unevaluatedLayout._values[l];return D.isDataDriven()||bc(D.value)||!I?I:function(z,B){return B.replace(/{([^{}]+)}/g,(K,Y)=>Y in z?String(z[Y]):"")}(h.properties,I)}createBucket(l){return new _f(l)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const l of $w.paint.overridableProperties){if(!Ay.hasPaintOverride(this.layout,l))continue;const h=this.paint.get(l),y=new v3(h),C=new nf(y,h.property.specification);let I=null;I=h.value.kind==="constant"||h.value.kind==="source"?new wc("source",C):new mp("composite",C,h.value.zoomStops),this.paint._values[l]=new Fa(h.property,I,h.parameters)}}_handleOverridablePaintPropertyUpdate(l,h,y){return!(!this.layout||h.isDataDriven()||y.isDataDriven())&&Ay.hasPaintOverride(this.layout,l)}static hasPaintOverride(l,h){const y=l.get("text-field"),C=$w.paint.properties[h];let I=!1;const D=z=>{for(const B of z)if(C.overrides&&C.overrides.hasOverride(B))return void(I=!0)};if(y.value.kind==="constant"&&y.value.value instanceof Ce)D(y.value.value.sections);else if(y.value.kind==="source"){const z=K=>{I||(K instanceof Pt&&Ue(K.value)===_n?D(K.value.sections):K instanceof ef?D(K.sections):K.eachChild(z))},B=y.value;B._styleExpression&&z(B._styleExpression.expression)}return I}}function Bw(d,l,h){let y="never";const C=d.get(l);return C?y=C:d.get(h)&&(y="always"),y}var vK={paint:new $i({"background-color":new xn(ze.paint_background["background-color"]),"background-pattern":new Tp(ze.paint_background["background-pattern"]),"background-opacity":new xn(ze.paint_background["background-opacity"])})},yK={paint:new $i({"raster-opacity":new xn(ze.paint_raster["raster-opacity"]),"raster-hue-rotate":new xn(ze.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new xn(ze.paint_raster["raster-brightness-min"]),"raster-brightness-max":new xn(ze.paint_raster["raster-brightness-max"]),"raster-saturation":new xn(ze.paint_raster["raster-saturation"]),"raster-contrast":new xn(ze.paint_raster["raster-contrast"]),"raster-resampling":new xn(ze.paint_raster["raster-resampling"]),"raster-fade-duration":new xn(ze.paint_raster["raster-fade-duration"])})};class xK extends za{constructor(l){super(l,{}),this.onAdd=h=>{this.implementation.onAdd&&this.implementation.onAdd(h,h.painter.context.gl)},this.onRemove=h=>{this.implementation.onRemove&&this.implementation.onRemove(h,h.painter.context.gl)},this.implementation=l}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 bK={circle:class extends za{constructor(d){super(d,Yj)}createBucket(d){return new hw(d)}queryRadius(d){const l=d;return Dp("circle-radius",this,l)+Dp("circle-stroke-width",this,l)+vy(this.paint.get("circle-translate"))}queryIntersectsFeature(d,l,h,y,C,I,D,z){const B=yy(d,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),I.angle,D),K=this.paint.get("circle-radius").evaluate(l,h)+this.paint.get("circle-stroke-width").evaluate(l,h),Y=this.paint.get("circle-pitch-alignment")==="map",te=Y?B:function(pe,ve){return pe.map(Ne=>kI(Ne,ve))}(B,z),ce=Y?K*D:K;for(const pe of y)for(const ve of pe){const Ne=Y?ve:kI(ve,z);let Oe=ce;const Je=xy([],[ve.x,ve.y,0,1],z);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?Oe*=Je[3]/I.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(Oe*=I.cameraToCenterDistance/Je[3]),Wj(te,Ne,Oe))return!0}return!1}},heatmap:class extends za{constructor(d){super(d,Jj),this._updateColorRamp()}createBucket(d){return new II(d)}_handleSpecialPaintPropertyUpdate(d){d==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=RI({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 za{constructor(d){super(d,eH)}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}},fill:class extends za{constructor(d){super(d,gH)}recalculate(d,l){super.recalculate(d,l);const h=this.paint._values["fill-outline-color"];h.value.kind==="constant"&&h.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(d){return new Ew(d)}queryRadius(){return vy(this.paint.get("fill-translate"))}queryIntersectsFeature(d,l,h,y,C,I,D){return bI(yy(d,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),I.angle,D),y)}isTileClipped(){return!0}},"fill-extrusion":class extends za{constructor(d){super(d,MH)}createBucket(d){return new Tw(d)}queryRadius(){return vy(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(d,l,h,y,C,I,D,z){const B=yy(d,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),I.angle,D),K=this.paint.get("fill-extrusion-height").evaluate(l,h),Y=this.paint.get("fill-extrusion-base").evaluate(l,h),te=function(pe,ve,Ne,Oe){const Je=[];for(const ht of pe){const qe=[ht.x,ht.y,0,1];xy(qe,qe,ve),Je.push(new ie(qe[0]/qe[3],qe[1]/qe[3]))}return Je}(B,z),ce=function(pe,ve,Ne,Oe){const Je=[],ht=[],qe=Oe[8]*ve,lt=Oe[9]*ve,Dt=Oe[10]*ve,Mt=Oe[11]*ve,hn=Oe[8]*Ne,vn=Oe[9]*Ne,ln=Oe[10]*Ne,en=Oe[11]*Ne;for(const Qt of pe){const un=[],nn=[];for(const jt of Qt){const kn=jt.x,bn=jt.y,Kn=Oe[0]*kn+Oe[4]*bn+Oe[12],Or=Oe[1]*kn+Oe[5]*bn+Oe[13],Vr=Oe[2]*kn+Oe[6]*bn+Oe[14],xi=Oe[3]*kn+Oe[7]*bn+Oe[15],ha=Vr+Dt,qi=xi+Mt,hi=Kn+hn,Ii=Or+vn,Zi=Vr+ln,oo=xi+en,Ao=new ie((Kn+qe)/qi,(Or+lt)/qi);Ao.z=ha/qi,un.push(Ao);const pi=new ie(hi/oo,Ii/oo);pi.z=Zi/oo,nn.push(pi)}Je.push(un),ht.push(nn)}return[Je,ht]}(y,Y,K,z);return function(pe,ve,Ne){let Oe=1/0;bI(Ne,ve)&&(Oe=BI(Ne,ve[0]));for(let Je=0;Je<ve.length;Je++){const ht=ve[Je],qe=pe[Je];for(let lt=0;lt<ht.length-1;lt++){const Dt=ht[lt],Mt=[Dt,ht[lt+1],qe[lt+1],qe[lt],Dt];xI(Ne,Mt)&&(Oe=Math.min(Oe,BI(Ne,Mt)))}}return Oe!==1/0&&Oe}(ce[0],ce[1],te)}},line:class extends za{constructor(d){super(d,UI),this.gradientVersion=0}_handleSpecialPaintPropertyUpdate(d){d==="line-gradient"&&(this.stepInterpolant=this._transitionablePaint._values["line-gradient"].value.expression._styleExpression.expression instanceof ds,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER)}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(d,l){super.recalculate(d,l),this.paint._values["line-floorwidth"]=jI.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,d)}createBucket(d){return new kw(d)}queryRadius(d){const l=d,h=HI(Dp("line-width",this,l),Dp("line-gap-width",this,l)),y=Dp("line-offset",this,l);return h/2+Math.abs(y)+vy(this.paint.get("line-translate"))}queryIntersectsFeature(d,l,h,y,C,I,D){const z=yy(d,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),I.angle,D),B=D/2*HI(this.paint.get("line-width").evaluate(l,h),this.paint.get("line-gap-width").evaluate(l,h)),K=this.paint.get("line-offset").evaluate(l,h);return K&&(y=function(Y,te){const ce=[];for(let pe=0;pe<Y.length;pe++){const ve=Y[pe],Ne=[];for(let Oe=0;Oe<ve.length;Oe++){const Je=ve[Oe-1],ht=ve[Oe],qe=ve[Oe+1],lt=Oe===0?new ie(0,0):ht.sub(Je)._unit()._perp(),Dt=Oe===ve.length-1?new ie(0,0):qe.sub(ht)._unit()._perp(),Mt=lt._add(Dt)._unit(),hn=Mt.x*Dt.x+Mt.y*Dt.y;hn!==0&&Mt._mult(1/hn),Ne.push(Mt._mult(te)._add(ht))}ce.push(Ne)}return ce}(y,K*D)),function(Y,te,ce){for(let pe=0;pe<te.length;pe++){const ve=te[pe];if(Y.length>=3){for(let Ne=0;Ne<ve.length;Ne++)if(pf(Y,ve[Ne]))return!0}if(Gj(Y,ve,ce))return!0}return!1}(z,y,B)}isTileClipped(){return!0}},symbol:Ay,background:class extends za{constructor(d){super(d,vK)}},raster:class extends za{constructor(d){super(d,yK)}}};class _K{constructor(l){this._callback=l,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 y3=63710088e-1;class ni{constructor(l,h){if(isNaN(l)||isNaN(h))throw new Error(`Invalid LngLat object: (${l}, ${h})`);if(this.lng=+l,this.lat=+h,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new ni(b(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(l){const h=Math.PI/180,y=this.lat*h,C=l.lat*h,I=Math.sin(y)*Math.sin(C)+Math.cos(y)*Math.cos(C)*Math.cos((l.lng-this.lng)*h);return y3*Math.acos(Math.min(I,1))}toBounds(l=0){const h=360*l/40075017,y=h/Math.cos(Math.PI/180*this.lat);return new Bc(new ni(this.lng-y,this.lat-h),new ni(this.lng+y,this.lat+h))}static convert(l){if(l instanceof ni)return l;if(Array.isArray(l)&&(l.length===2||l.length===3))return new ni(Number(l[0]),Number(l[1]));if(!Array.isArray(l)&&typeof l=="object"&&l!==null)return new ni(Number("lng"in l?l.lng:l.lon),Number(l.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 Bc{constructor(l,h){l&&(h?this.setSouthWest(l).setNorthEast(h):l.length===4?this.setSouthWest([l[0],l[1]]).setNorthEast([l[2],l[3]]):this.setSouthWest(l[0]).setNorthEast(l[1]))}setNorthEast(l){return this._ne=l instanceof ni?new ni(l.lng,l.lat):ni.convert(l),this}setSouthWest(l){return this._sw=l instanceof ni?new ni(l.lng,l.lat):ni.convert(l),this}extend(l){const h=this._sw,y=this._ne;let C,I;if(l instanceof ni)C=l,I=l;else{if(!(l instanceof Bc))return Array.isArray(l)?l.length===4||l.every(Array.isArray)?this.extend(Bc.convert(l)):this.extend(ni.convert(l)):this;if(C=l._sw,I=l._ne,!C||!I)return this}return h||y?(h.lng=Math.min(C.lng,h.lng),h.lat=Math.min(C.lat,h.lat),y.lng=Math.max(I.lng,y.lng),y.lat=Math.max(I.lat,y.lat)):(this._sw=new ni(C.lng,C.lat),this._ne=new ni(I.lng,I.lat)),this}getCenter(){return new ni((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 ni(this.getWest(),this.getNorth())}getSouthEast(){return new ni(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(l){const{lng:h,lat:y}=ni.convert(l);let C=this._sw.lng<=h&&h<=this._ne.lng;return this._sw.lng>this._ne.lng&&(C=this._sw.lng>=h&&h>=this._ne.lng),this._sw.lat<=y&&y<=this._ne.lat&&C}static convert(l){return l instanceof Bc?l:l&&new Bc(l)}}const x3=2*Math.PI*y3;function b3(d){return x3*Math.cos(d*Math.PI/180)}function _3(d){return(180+d)/360}function w3(d){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+d*Math.PI/360)))/360}function C3(d,l){return d/b3(l)}function Vw(d){return 360/Math.PI*Math.atan(Math.exp((180-360*d)*Math.PI/180))-90}class Ny{constructor(l,h,y=0){this.x=+l,this.y=+h,this.z=+y}static fromLngLat(l,h=0){const y=ni.convert(l);return new Ny(_3(y.lng),w3(y.lat),C3(h,y.lat))}toLngLat(){return new ni(360*this.x-180,Vw(this.y))}toAltitude(){return this.z*b3(Vw(this.y))}meterInMercatorCoordinateUnits(){return 1/x3*(l=Vw(this.y),1/Math.cos(l*Math.PI/180));var l}}function S3(d,l,h){var y=2*Math.PI*6378137/256/Math.pow(2,h);return[d*y-2*Math.PI*6378137/2,l*y-2*Math.PI*6378137/2]}class Uw{constructor(l,h,y){if(l<0||l>25||y<0||y>=Math.pow(2,l)||h<0||h>=Math.pow(2,l))throw new Error(`x=${h}, y=${y}, z=${l} outside of bounds. 0<=x<${Math.pow(2,l)}, 0<=y<${Math.pow(2,l)} 0<=z<=25 `);this.z=l,this.x=h,this.y=y,this.key=jp(0,l,l,h,y)}equals(l){return this.z===l.z&&this.x===l.x&&this.y===l.y}url(l,h,y){const C=(D=this.y,z=this.z,B=S3(256*(I=this.x),256*(D=Math.pow(2,z)-D-1),z),K=S3(256*(I+1),256*(D+1),z),B[0]+","+B[1]+","+K[0]+","+K[1]);var I,D,z,B,K;const Y=function(te,ce,pe){let ve,Ne="";for(let Oe=te;Oe>0;Oe--)ve=1<<Oe-1,Ne+=(ce&ve?1:0)+(pe&ve?2:0);return Ne}(this.z,this.x,this.y);return l[(this.x+this.y)%l.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(y==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,h>1?"@2x":"").replace(/{quadkey}/g,Y).replace(/{bbox-epsg-3857}/g,C)}isChildOf(l){const h=this.z-l.z;return h>0&&l.x===this.x>>h&&l.y===this.y>>h}getTilePoint(l){const h=Math.pow(2,this.z);return new ie((l.x*h-this.x)*yi,(l.y*h-this.y)*yi)}toString(){return`${this.z}/${this.x}/${this.y}`}}class E3{constructor(l,h){this.wrap=l,this.canonical=h,this.key=jp(l,h.z,h.z,h.x,h.y)}}class fa{constructor(l,h,y,C,I){if(l<y)throw new Error(`overscaledZ should be >= z; overscaledZ = ${l}; z = ${y}`);this.overscaledZ=l,this.wrap=h,this.canonical=new Uw(y,+C,+I),this.key=jp(h,l,y,C,I)}clone(){return new fa(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(l){return this.overscaledZ===l.overscaledZ&&this.wrap===l.wrap&&this.canonical.equals(l.canonical)}scaledTo(l){if(l>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${l}; overscaledZ = ${this.overscaledZ}`);const h=this.canonical.z-l;return l>this.canonical.z?new fa(l,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new fa(l,this.wrap,l,this.canonical.x>>h,this.canonical.y>>h)}calculateScaledKey(l,h){if(l>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${l}; overscaledZ = ${this.overscaledZ}`);const y=this.canonical.z-l;return l>this.canonical.z?jp(this.wrap*+h,l,this.canonical.z,this.canonical.x,this.canonical.y):jp(this.wrap*+h,l,l,this.canonical.x>>y,this.canonical.y>>y)}isChildOf(l){if(l.wrap!==this.wrap)return!1;const h=this.canonical.z-l.canonical.z;return l.overscaledZ===0||l.overscaledZ<this.overscaledZ&&l.canonical.x===this.canonical.x>>h&&l.canonical.y===this.canonical.y>>h}children(l){if(this.overscaledZ>=l)return[new fa(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const h=this.canonical.z+1,y=2*this.canonical.x,C=2*this.canonical.y;return[new fa(h,this.wrap,h,y,C),new fa(h,this.wrap,h,y+1,C),new fa(h,this.wrap,h,y,C+1),new fa(h,this.wrap,h,y+1,C+1)]}isLessThan(l){return this.wrap<l.wrap||!(this.wrap>l.wrap)&&(this.overscaledZ<l.overscaledZ||!(this.overscaledZ>l.overscaledZ)&&(this.canonical.x<l.canonical.x||!(this.canonical.x>l.canonical.x)&&this.canonical.y<l.canonical.y))}wrapped(){return new fa(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(l){return new fa(this.overscaledZ,l,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new E3(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(l){return this.canonical.getTilePoint(new Ny(l.x-this.wrap,l.y))}}function jp(d,l,h,y,C){(d*=2)<0&&(d=-1*d-1);const I=1<<h;return(I*I*d+I*C+y).toString(36)+h.toString(36)+l.toString(36)}gn("CanonicalTileID",Uw),gn("OverscaledTileID",fa,{omit:["posMatrix"]});class P3{constructor(l,h,y){if(this.uid=l,h.height!==h.width)throw new RangeError("DEM tiles must be square");if(y&&y!=="mapbox"&&y!=="terrarium")return void L(`"${y}" is not a valid encoding type. Valid types include "mapbox" and "terrarium".`);this.stride=h.height;const C=this.dim=h.height-2;this.data=new Uint32Array(h.data.buffer),this.encoding=y||"mapbox";for(let I=0;I<C;I++)this.data[this._idx(-1,I)]=this.data[this._idx(0,I)],this.data[this._idx(C,I)]=this.data[this._idx(C-1,I)],this.data[this._idx(I,-1)]=this.data[this._idx(I,0)],this.data[this._idx(I,C)]=this.data[this._idx(I,C-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(C,-1)]=this.data[this._idx(C-1,0)],this.data[this._idx(-1,C)]=this.data[this._idx(0,C-1)],this.data[this._idx(C,C)]=this.data[this._idx(C-1,C-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let I=0;I<C;I++)for(let D=0;D<C;D++){const z=this.get(I,D);z>this.max&&(this.max=z),z<this.min&&(this.min=z)}}get(l,h){const y=new Uint8Array(this.data.buffer),C=4*this._idx(l,h);return(this.encoding==="terrarium"?this._unpackTerrarium:this._unpackMapbox)(y[C],y[C+1],y[C+2])}getUnpackVector(){return this.encoding==="terrarium"?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]}_idx(l,h){if(l<-1||l>=this.dim+1||h<-1||h>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(h+1)*this.stride+(l+1)}_unpackMapbox(l,h,y){return(256*l*256+256*h+y)/10-1e4}_unpackTerrarium(l,h,y){return 256*l+h+y/256-32768}getPixels(){return new da({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(l,h,y){if(this.dim!==l.dim)throw new Error("dem dimension mismatch");let C=h*this.dim,I=h*this.dim+this.dim,D=y*this.dim,z=y*this.dim+this.dim;switch(h){case-1:C=I-1;break;case 1:I=C+1}switch(y){case-1:D=z-1;break;case 1:z=D+1}const B=-h*this.dim,K=-y*this.dim;for(let Y=D;Y<z;Y++)for(let te=C;te<I;te++)this.data[this._idx(te,Y)]=l.data[this._idx(te+B,Y+K)]}}gn("DEMData",P3);class T3{constructor(l){this._stringToNumber={},this._numberToString=[];for(let h=0;h<l.length;h++){const y=l[h];this._stringToNumber[y]=h,this._numberToString[h]=y}}encode(l){return this._stringToNumber[l]}decode(l){if(l>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${l} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[l]}}class k3{constructor(l,h,y,C,I){this.type="Feature",this._vectorTileFeature=l,l._z=h,l._x=y,l._y=C,this.properties=l.properties,this.id=I}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(l){this._geometry=l}toJSON(){const l={geometry:this.geometry};for(const h in this)h!=="_geometry"&&h!=="_vectorTileFeature"&&(l[h]=this[h]);return l}}class I3{constructor(l,h){this.tileID=l,this.x=l.canonical.x,this.y=l.canonical.y,this.z=l.canonical.z,this.grid=new Dc(yi,16,0),this.grid3D=new Dc(yi,16,0),this.featureIndexArray=new Hn,this.promoteId=h}insert(l,h,y,C,I,D){const z=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(y,C,I);const B=D?this.grid3D:this.grid;for(let K=0;K<h.length;K++){const Y=h[K],te=[1/0,1/0,-1/0,-1/0];for(let ce=0;ce<Y.length;ce++){const pe=Y[ce];te[0]=Math.min(te[0],pe.x),te[1]=Math.min(te[1],pe.y),te[2]=Math.max(te[2],pe.x),te[3]=Math.max(te[3],pe.y)}te[0]<yi&&te[1]<yi&&te[2]>=0&&te[3]>=0&&B.insert(z,te[0],te[1],te[2],te[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new vu.VectorTile(new Iw(this.rawTileData)).layers,this.sourceLayerCoder=new T3(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(l,h,y,C){this.loadVTLayers();const I=l.params||{},D=yi/l.tileSize/l.scale,z=af(I.filter),B=l.queryGeometry,K=l.queryPadding*D,Y=R3(B),te=this.grid.query(Y.minX-K,Y.minY-K,Y.maxX+K,Y.maxY+K),ce=R3(l.cameraQueryGeometry),pe=this.grid3D.query(ce.minX-K,ce.minY-K,ce.maxX+K,ce.maxY+K,(Oe,Je,ht,qe)=>function(lt,Dt,Mt,hn,vn){for(const en of lt)if(Dt<=en.x&&Mt<=en.y&&hn>=en.x&&vn>=en.y)return!0;const ln=[new ie(Dt,Mt),new ie(Dt,vn),new ie(hn,vn),new ie(hn,Mt)];if(lt.length>2){for(const en of ln)if(pf(lt,en))return!0}for(let en=0;en<lt.length-1;en++)if(Zj(lt[en],lt[en+1],ln))return!0;return!1}(l.cameraQueryGeometry,Oe-K,Je-K,ht+K,qe+K));for(const Oe of pe)te.push(Oe);te.sort(wK);const ve={};let Ne;for(let Oe=0;Oe<te.length;Oe++){const Je=te[Oe];if(Je===Ne)continue;Ne=Je;const ht=this.featureIndexArray.get(Je);let qe=null;this.loadMatchingFeature(ve,ht.bucketIndex,ht.sourceLayerIndex,ht.featureIndex,z,I.layers,I.availableImages,h,y,C,(lt,Dt,Mt)=>(qe||(qe=Fc(lt)),Dt.queryIntersectsFeature(B,lt,Mt,qe,this.z,l.transform,D,l.pixelPosMatrix)))}return ve}loadMatchingFeature(l,h,y,C,I,D,z,B,K,Y,te){const ce=this.bucketLayerIDs[h];if(D&&!function(Oe,Je){for(let ht=0;ht<Oe.length;ht++)if(Je.indexOf(Oe[ht])>=0)return!0;return!1}(D,ce))return;const pe=this.sourceLayerCoder.decode(y),ve=this.vtLayers[pe].feature(C);if(I.needGeometry){const Oe=zc(ve,!0);if(!I.filter(new $r(this.tileID.overscaledZ),Oe,this.tileID.canonical))return}else if(!I.filter(new $r(this.tileID.overscaledZ),ve))return;const Ne=this.getId(ve,pe);for(let Oe=0;Oe<ce.length;Oe++){const Je=ce[Oe];if(D&&D.indexOf(Je)<0)continue;const ht=B[Je];if(!ht)continue;let qe={};Ne&&Y&&(qe=Y.getState(ht.sourceLayer||"_geojsonTileLayer",Ne));const lt=_({},K[Je]);lt.paint=M3(lt.paint,ht.paint,ve,qe,z),lt.layout=M3(lt.layout,ht.layout,ve,qe,z);const Dt=!te||te(ve,ht,qe);if(!Dt)continue;const Mt=new k3(ve,this.z,this.x,this.y,Ne);Mt.layer=lt;let hn=l[Je];hn===void 0&&(hn=l[Je]=[]),hn.push({featureIndex:C,feature:Mt,intersectionZ:Dt})}}lookupSymbolFeatures(l,h,y,C,I,D,z,B){const K={};this.loadVTLayers();const Y=af(I);for(const te of l)this.loadMatchingFeature(K,y,C,te,Y,D,z,B,h);return K}hasLayer(l){for(const h of this.bucketLayerIDs)for(const y of h)if(l===y)return!0;return!1}getId(l,h){let y=l.id;return this.promoteId&&(y=l.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[h]],typeof y=="boolean"&&(y=Number(y))),y}}function M3(d,l,h,y,C){return P(d,(I,D)=>{const z=l instanceof Nc?l.get(D):null;return z&&z.evaluate?z.evaluate(h,y,C):z})}function R3(d){let l=1/0,h=1/0,y=-1/0,C=-1/0;for(const I of d)l=Math.min(l,I.x),h=Math.min(h,I.y),y=Math.max(y,I.x),C=Math.max(C,I.y);return{minX:l,minY:h,maxX:y,maxY:C}}function wK(d,l){return l-d}var jw;gn("FeatureIndex",I3,{omit:["rawTileData","sourceLayerCoder"]}),o.PerformanceMarkers=void 0,(jw=o.PerformanceMarkers||(o.PerformanceMarkers={})).create="create",jw.load="load",jw.fullLoad="fullLoad";let Ly=null,Hp=[];const Hw=1e3/30,CK={mark(d){performance.mark(d)},frame(d){const l=d;Ly!=null&&Hp.push(l-Ly),Ly=l},clearMetrics(){Ly=null,Hp=[],performance.clearMeasures("loadTime"),performance.clearMeasures("fullLoadTime");for(const d in o.PerformanceMarkers)performance.clearMarks(o.PerformanceMarkers[d])},getPerformanceMetrics(){performance.measure("loadTime",o.PerformanceMarkers.create,o.PerformanceMarkers.load),performance.measure("fullLoadTime",o.PerformanceMarkers.create,o.PerformanceMarkers.fullLoad);const d=performance.getEntriesByName("loadTime")[0].duration,l=performance.getEntriesByName("fullLoadTime")[0].duration,h=Hp.length,y=1/(Hp.reduce((I,D)=>I+D,0)/h/1e3),C=Hp.filter(I=>I>Hw).reduce((I,D)=>I+(D-Hw)/Hw,0);return{loadTime:d,fullLoadTime:l,fps:y,percentDroppedFrames:C/(h+C)*100}}};o.AJAXError=Ze,o.ARRAY_TYPE=yo,o.Actor=class{constructor(d,l,h){this.target=d,this.parent=l,this.mapId=h,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},k(["receive","process"],this),this.invoker=new _K(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=U()?d:window}send(d,l,h,y,C=!1){const I=Math.round(1e18*Math.random()).toString(36).substring(0,10);h&&(this.callbacks[I]=h);const D=re(this.globalScope)?void 0:[];return this.target.postMessage({id:I,type:d,hasCallback:!!h,targetMapId:y,mustQueue:C,sourceMapId:this.mapId,data:yl(l,D)},D),{cancel:()=>{h&&delete this.callbacks[I],this.target.postMessage({id:I,type:"<cancel>",targetMapId:y,sourceMapId:this.mapId})}}}receive(d){const l=d.data,h=l.id;if(h&&(!l.targetMapId||this.mapId===l.targetMapId))if(l.type==="<cancel>"){delete this.tasks[h];const y=this.cancelCallbacks[h];delete this.cancelCallbacks[h],y&&y()}else U()||l.mustQueue?(this.tasks[h]=l,this.taskQueue.push(h),this.invoker.trigger()):this.processTask(h,l)}process(){if(!this.taskQueue.length)return;const d=this.taskQueue.shift(),l=this.tasks[d];delete this.tasks[d],this.taskQueue.length&&this.invoker.trigger(),l&&this.processTask(d,l)}processTask(d,l){if(l.type==="<response>"){const h=this.callbacks[d];delete this.callbacks[d],h&&(l.error?h(Bs(l.error)):h(null,Bs(l.data)))}else{let h=!1;const y=re(this.globalScope)?void 0:[],C=l.hasCallback?(z,B)=>{h=!0,delete this.cancelCallbacks[d],this.target.postMessage({id:d,type:"<response>",sourceMapId:this.mapId,error:z?yl(z):null,data:yl(B,y)},y)}:z=>{h=!0};let I=null;const D=Bs(l.data);if(this.parent[l.type])I=this.parent[l.type](l.sourceMapId,D,C);else if(this.parent.getWorkerSource){const z=l.type.split(".");I=this.parent.getWorkerSource(l.sourceMapId,z[0],D.source)[z[1]](D,C)}else C(new Error(`Could not find function ${l.type}`));!h&&I&&I.cancel&&(this.cancelCallbacks[d]=I.cancel)}}remove(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)}},o.AlphaImage=Ap,o.CanonicalTileID=Uw,o.CollisionBoxArray=wt,o.CollisionCircleLayoutArray=class extends ee{},o.Color=le,o.DEMData=P3,o.DataConstantProperty=xn,o.DictionaryCoder=T3,o.EXTENT=yi,o.ErrorEvent=Lt,o.EvaluationParameters=$r,o.Event=At,o.Evented=Ht,o.FeatureIndex=I3,o.FillBucket=Ew,o.FillExtrusionBucket=Tw,o.GeoJSONFeature=k3,o.ImageAtlas=JI,o.ImagePosition=Rw,o.LineBucket=kw,o.LineStripIndexArray=class extends De{},o.LngLat=ni,o.LngLatBounds=Bc,o.MercatorCoordinate=Ny,o.ONE_EM=Bi,o.OverscaledTileID=fa,o.PerformanceUtils=CK,o.PosArray=Tn,o.Properties=$i,o.QuadTriangleArray=class extends he{},o.RGBAImage=da,o.RasterBoundsArray=class extends w{},o.RequestPerformance=class{constructor(d){this._marks={start:[d.url,"start"].join("#"),end:[d.url,"end"].join("#"),measure:d.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let d=performance.getEntriesByName(this._marks.measure);return d.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),d=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),d}},o.ResourceType=Ot,o.SegmentVector=qn,o.SymbolBucket=_f,o.Transitionable=dy,o.TriangleIndexArray=go,o.Uniform1f=wl,o.Uniform1i=class extends _l{constructor(d,l){super(d,l),this.current=0}set(d){this.current!==d&&(this.current=d,this.gl.uniform1i(this.location,d))}},o.Uniform2f=class extends _l{constructor(d,l){super(d,l),this.current=[0,0]}set(d){d[0]===this.current[0]&&d[1]===this.current[1]||(this.current=d,this.gl.uniform2f(this.location,d[0],d[1]))}},o.Uniform3f=class extends _l{constructor(d,l){super(d,l),this.current=[0,0,0]}set(d){d[0]===this.current[0]&&d[1]===this.current[1]&&d[2]===this.current[2]||(this.current=d,this.gl.uniform3f(this.location,d[0],d[1],d[2]))}},o.Uniform4f=ff,o.UniformColor=mI,o.UniformMatrix4f=class extends _l{constructor(d,l){super(d,l),this.current=Hj}set(d){if(d[12]!==this.current[12]||d[0]!==this.current[0])return this.current=d,void this.gl.uniformMatrix4fv(this.location,!1,d);for(let l=1;l<16;l++)if(d[l]!==this.current[l]){this.current=d,this.gl.uniformMatrix4fv(this.location,!1,d);break}}},o.UnwrappedTileID=E3,o.ValidationError=Qe,o.ZoomHistory=xp,o.add=function(d,l,h){return d[0]=l[0]+h[0],d[1]=l[1]+h[1],d[2]=l[2]+h[2],d},o.addDynamicAttributes=Lw,o.asyncAll=function(d,l,h){if(!d.length)return h(null,[]);let y=d.length;const C=new Array(d.length);let I=null;d.forEach((D,z)=>{l(D,(B,K)=>{B&&(I=B),C[z]=K,--y==0&&h(I,C)})})},o.bezier=p,o.bindAll=k,o.cacheEntryPossiblyAdded=function(d){Me++,Me>Re&&(d.getActor().send("enforceCacheSizeLimit",be),Me=0)},o.clamp=v,o.clearTileCache=function(d){const l=caches.delete(me);d&&l.catch(d).then(()=>d())},o.clipLine=d3,o.clone=function(d){var l=new yo(16);return l[0]=d[0],l[1]=d[1],l[2]=d[2],l[3]=d[3],l[4]=d[4],l[5]=d[5],l[6]=d[6],l[7]=d[7],l[8]=d[8],l[9]=d[9],l[10]=d[10],l[11]=d[11],l[12]=d[12],l[13]=d[13],l[14]=d[14],l[15]=d[15],l},o.clone$1=O,o.clone$2=function(d){var l=new yo(3);return l[0]=d[0],l[1]=d[1],l[2]=d[2],l},o.collisionCircleLayout=VH,o.config=oe,o.copy=function(d,l){return d[0]=l[0],d[1]=l[1],d[2]=l[2],d[3]=l[3],d[4]=l[4],d[5]=l[5],d[6]=l[6],d[7]=l[7],d[8]=l[8],d[9]=l[9],d[10]=l[10],d[11]=l[11],d[12]=l[12],d[13]=l[13],d[14]=l[14],d[15]=l[15],d},o.create=function(){var d=new yo(16);return yo!=Float32Array&&(d[1]=0,d[2]=0,d[3]=0,d[4]=0,d[6]=0,d[7]=0,d[8]=0,d[9]=0,d[11]=0,d[12]=0,d[13]=0,d[14]=0),d[0]=1,d[5]=1,d[10]=1,d[15]=1,d},o.create$1=CI,o.createExpression=_c,o.createFilter=af,o.createLayout=fi,o.createStyleLayer=function(d){return d.type==="custom"?new xK(d):new bK[d.type](d)},o.cross=function(d,l,h){var y=l[0],C=l[1],I=l[2],D=h[0],z=h[1],B=h[2];return d[0]=C*B-I*z,d[1]=I*D-y*B,d[2]=y*z-C*D,d},o.dot=function(d,l){return d[0]*l[0]+d[1]*l[1]+d[2]*l[2]},o.dot$1=function(d,l){return d[0]*l[0]+d[1]*l[1]+d[2]*l[2]+d[3]*l[3]},o.ease=g,o.emitValidationErrors=lf,o.enforceCacheSizeLimit=function(d){Ee(),Te&&Te.then(l=>{l.keys().then(h=>{for(let y=0;y<h.length-d;y++)l.delete(h[y])})})},o.equals=function(d,l){var h=d[0],y=d[1],C=d[2],I=d[3],D=d[4],z=d[5],B=d[6],K=d[7],Y=d[8],te=d[9],ce=d[10],pe=d[11],ve=d[12],Ne=d[13],Oe=d[14],Je=d[15],ht=l[0],qe=l[1],lt=l[2],Dt=l[3],Mt=l[4],hn=l[5],vn=l[6],ln=l[7],en=l[8],Qt=l[9],un=l[10],nn=l[11],jt=l[12],kn=l[13],bn=l[14],Kn=l[15];return Math.abs(h-ht)<=vo*Math.max(1,Math.abs(h),Math.abs(ht))&&Math.abs(y-qe)<=vo*Math.max(1,Math.abs(y),Math.abs(qe))&&Math.abs(C-lt)<=vo*Math.max(1,Math.abs(C),Math.abs(lt))&&Math.abs(I-Dt)<=vo*Math.max(1,Math.abs(I),Math.abs(Dt))&&Math.abs(D-Mt)<=vo*Math.max(1,Math.abs(D),Math.abs(Mt))&&Math.abs(z-hn)<=vo*Math.max(1,Math.abs(z),Math.abs(hn))&&Math.abs(B-vn)<=vo*Math.max(1,Math.abs(B),Math.abs(vn))&&Math.abs(K-ln)<=vo*Math.max(1,Math.abs(K),Math.abs(ln))&&Math.abs(Y-en)<=vo*Math.max(1,Math.abs(Y),Math.abs(en))&&Math.abs(te-Qt)<=vo*Math.max(1,Math.abs(te),Math.abs(Qt))&&Math.abs(ce-un)<=vo*Math.max(1,Math.abs(ce),Math.abs(un))&&Math.abs(pe-nn)<=vo*Math.max(1,Math.abs(pe),Math.abs(nn))&&Math.abs(ve-jt)<=vo*Math.max(1,Math.abs(ve),Math.abs(jt))&&Math.abs(Ne-kn)<=vo*Math.max(1,Math.abs(Ne),Math.abs(kn))&&Math.abs(Oe-bn)<=vo*Math.max(1,Math.abs(Oe),Math.abs(bn))&&Math.abs(Je-Kn)<=vo*Math.max(1,Math.abs(Je),Math.abs(Kn))},o.evaluateSizeForFeature=function(d,{uSize:l,uSizeT:h},{lowerSize:y,upperSize:C}){return d.kind==="source"?y/El:d.kind==="composite"?wr(y/El,C/El,h):l},o.evaluateSizeForZoom=function(d,l){let h=0,y=0;if(d.kind==="constant")y=d.layoutSize;else if(d.kind!=="source"){const{interpolationType:C,minZoom:I,maxZoom:D}=d,z=C?v(Ro.interpolationFactor(C,l,I,D),0,1):0;d.kind==="camera"?y=wr(d.minSize,d.maxSize,z):h=z}return{uSizeT:h,uSize:y}},o.evaluateVariableOffset=p3,o.evented=Pp,o.exported=ge,o.exported$1=Ae,o.extend=_,o.filterObject=M,o.fromRotation=function(d,l){var h=Math.sin(l),y=Math.cos(l);return d[0]=y,d[1]=h,d[2]=0,d[3]=-h,d[4]=y,d[5]=0,d[6]=0,d[7]=0,d[8]=1,d},o.fromScaling=function(d,l){return d[0]=l[0],d[1]=0,d[2]=0,d[3]=0,d[4]=0,d[5]=l[1],d[6]=0,d[7]=0,d[8]=0,d[9]=0,d[10]=l[2],d[11]=0,d[12]=0,d[13]=0,d[14]=0,d[15]=1,d},o.getAnchorAlignment=Ow,o.getAnchorJustification=Nw,o.getArrayBuffer=yt,o.getImage=Ke,o.getJSON=function(d,l){return vt(_(d,{type:"json"}),l)},o.getOverlapMode=Bw,o.getRTLTextPluginStatus=Oc,o.getReferrer=St,o.getVideo=function(d,l){const h=window.document.createElement("video");h.muted=!0,h.onloadstart=function(){l(null,h)};for(let y=0;y<d.length;y++){const C=window.document.createElement("source");kt(d[y])||(h.crossOrigin="Anonymous"),C.src=d[y],h.appendChild(C)}return{cancel:()=>{}}},o.identity=gw,o.invert=function(d,l){var h=l[0],y=l[1],C=l[2],I=l[3],D=l[4],z=l[5],B=l[6],K=l[7],Y=l[8],te=l[9],ce=l[10],pe=l[11],ve=l[12],Ne=l[13],Oe=l[14],Je=l[15],ht=h*z-y*D,qe=h*B-C*D,lt=h*K-I*D,Dt=y*B-C*z,Mt=y*K-I*z,hn=C*K-I*B,vn=Y*Ne-te*ve,ln=Y*Oe-ce*ve,en=Y*Je-pe*ve,Qt=te*Oe-ce*Ne,un=te*Je-pe*Ne,nn=ce*Je-pe*Oe,jt=ht*nn-qe*un+lt*Qt+Dt*en-Mt*ln+hn*vn;return jt?(d[0]=(z*nn-B*un+K*Qt)*(jt=1/jt),d[1]=(C*un-y*nn-I*Qt)*jt,d[2]=(Ne*hn-Oe*Mt+Je*Dt)*jt,d[3]=(ce*Mt-te*hn-pe*Dt)*jt,d[4]=(B*en-D*nn-K*ln)*jt,d[5]=(h*nn-C*en+I*ln)*jt,d[6]=(Oe*lt-ve*hn-Je*qe)*jt,d[7]=(Y*hn-ce*lt+pe*qe)*jt,d[8]=(D*un-z*en+K*vn)*jt,d[9]=(y*en-h*un-I*vn)*jt,d[10]=(ve*Mt-Ne*lt+Je*ht)*jt,d[11]=(te*lt-Y*Mt-pe*ht)*jt,d[12]=(z*ln-D*Qt-B*vn)*jt,d[13]=(h*Qt-y*ln+C*vn)*jt,d[14]=(Ne*qe-ve*Dt-Oe*ht)*jt,d[15]=(Y*Dt-te*qe+ce*ht)*jt,d):null},o.isImageBitmap=ne,o.isSafari=re,o.isWorker=U,o.keysDifference=function(d,l){const h=[];for(const y in d)y in l||h.push(y);return h},o.lazyLoadRTLTextPlugin=function(){Wo.isLoading()||Wo.isLoaded()||Oc()!=="deferred"||cy()},o.makeRequest=vt,o.mapObject=P,o.mercatorXfromLng=_3,o.mercatorYfromLat=w3,o.mercatorZfromAltitude=C3,o.mul=Qj,o.mul$1=function(d,l,h){return d[0]=l[0]*h[0],d[1]=l[1]*h[1],d[2]=l[2]*h[2],d[3]=l[3]*h[3],d},o.multiply=SI,o.nextPowerOfTwo=function(d){return d<=1?1:Math.pow(2,Math.ceil(Math.log(d)/Math.LN2))},o.normalize=function(d,l){var h=l[0],y=l[1],C=l[2],I=h*h+y*y+C*C;return I>0&&(I=1/Math.sqrt(I)),d[0]=l[0]*I,d[1]=l[1]*I,d[2]=l[2]*I,d},o.number=wr,o.ortho=function(d,l,h,y,C,I,D){var z=1/(l-h),B=1/(y-C),K=1/(I-D);return d[0]=-2*z,d[1]=0,d[2]=0,d[3]=0,d[4]=0,d[5]=-2*B,d[6]=0,d[7]=0,d[8]=0,d[9]=0,d[10]=2*K,d[11]=0,d[12]=(l+h)*z,d[13]=(C+y)*B,d[14]=(D+I)*K,d[15]=1,d},o.parseCacheControl=G,o.parseGlyphPbf=function(d){return new Iw(d).readFields(QH,[])},o.pbf=Iw,o.performSymbolLayout=function(d){d.bucket.createArrays(),d.bucket.tilePixelRatio=yi/(512*d.bucket.overscaling),d.bucket.compareText={},d.bucket.iconsNeedLinear=!1;const l=d.bucket.layers[0].layout,h=d.bucket.layers[0]._unevaluatedLayout._values,y={layoutIconSize:h["icon-size"].possiblyEvaluate(new $r(d.bucket.zoom+1),d.canonical),layoutTextSize:h["text-size"].possiblyEvaluate(new $r(d.bucket.zoom+1),d.canonical),textMaxSize:h["text-size"].possiblyEvaluate(new $r(18))};if(d.bucket.textSizeData.kind==="composite"){const{minZoom:B,maxZoom:K}=d.bucket.textSizeData;y.compositeTextSizes=[h["text-size"].possiblyEvaluate(new $r(B),d.canonical),h["text-size"].possiblyEvaluate(new $r(K),d.canonical)]}if(d.bucket.iconSizeData.kind==="composite"){const{minZoom:B,maxZoom:K}=d.bucket.iconSizeData;y.compositeIconSizes=[h["icon-size"].possiblyEvaluate(new $r(B),d.canonical),h["icon-size"].possiblyEvaluate(new $r(K),d.canonical)]}const C=l.get("text-line-height")*Bi,I=l.get("text-rotation-alignment")!=="viewport"&&l.get("symbol-placement")!=="point",D=l.get("text-keep-upright"),z=l.get("text-size");for(const B of d.bucket.features){const K=l.get("text-font").evaluate(B,{},d.canonical).join(","),Y=z.evaluate(B,{},d.canonical),te=y.layoutTextSize.evaluate(B,{},d.canonical),ce=y.layoutIconSize.evaluate(B,{},d.canonical),pe={horizontal:{},vertical:void 0},ve=B.text;let Ne,Oe=[0,0];if(ve){const qe=ve.toString(),lt=l.get("text-letter-spacing").evaluate(B,{},d.canonical)*Bi,Dt=lw(qe)?lt:0,Mt=l.get("text-anchor").evaluate(B,{},d.canonical),hn=l.get("text-variable-anchor");if(!hn){const un=l.get("text-radial-offset").evaluate(B,{},d.canonical);Oe=un?p3(Mt,[un*Bi,Aw]):l.get("text-offset").evaluate(B,{},d.canonical).map(nn=>nn*Bi)}let vn=I?"center":l.get("text-justify").evaluate(B,{},d.canonical);const ln=l.get("symbol-placement"),en=ln==="point"?l.get("text-max-width").evaluate(B,{},d.canonical)*Bi:0,Qt=()=>{d.bucket.allowVerticalPlacement&&uf(qe)&&(pe.vertical=Ty(ve,d.glyphMap,d.glyphPositions,d.imagePositions,K,en,C,Mt,"left",Dt,Oe,o.WritingMode.vertical,!0,ln,te,Y))};if(!I&&hn){const un=vn==="auto"?hn.map(jt=>Nw(jt)):[vn];let nn=!1;for(let jt=0;jt<un.length;jt++){const kn=un[jt];if(!pe.horizontal[kn])if(nn)pe.horizontal[kn]=pe.horizontal[0];else{const bn=Ty(ve,d.glyphMap,d.glyphPositions,d.imagePositions,K,en,C,"center",kn,Dt,Oe,o.WritingMode.horizontal,!1,ln,te,Y);bn&&(pe.horizontal[kn]=bn,nn=bn.positionedLines.length===1)}}Qt()}else{vn==="auto"&&(vn=Nw(Mt));const un=Ty(ve,d.glyphMap,d.glyphPositions,d.imagePositions,K,en,C,Mt,vn,Dt,Oe,o.WritingMode.horizontal,!1,ln,te,Y);un&&(pe.horizontal[vn]=un),Qt(),uf(qe)&&I&&D&&(pe.vertical=Ty(ve,d.glyphMap,d.glyphPositions,d.imagePositions,K,en,C,Mt,vn,Dt,Oe,o.WritingMode.vertical,!1,ln,te,Y))}}let Je=!1;if(B.icon&&B.icon.name){const qe=d.imageMap[B.icon.name];qe&&(Ne=iK(d.imagePositions[B.icon.name],l.get("icon-offset").evaluate(B,{},d.canonical),l.get("icon-anchor").evaluate(B,{},d.canonical)),Je=!!qe.sdf,d.bucket.sdfIcons===void 0?d.bucket.sdfIcons=Je:d.bucket.sdfIcons!==Je&&L("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(qe.pixelRatio!==d.bucket.pixelRatio||l.get("icon-rotate").constantOr(1)!==0)&&(d.bucket.iconsNeedLinear=!0))}const ht=g3(pe.horizontal)||pe.vertical;d.bucket.iconsInText=!!ht&&ht.iconsInText,(ht||Ne)&&dK(d.bucket,B,pe,Ne,d.imageMap,y,te,ce,Oe,Je,d.canonical)}d.showCollisionBoxes&&d.bucket.generateCollisionDebugBuffers()},o.perspective=function(d,l,h,y,C){var I,D=1/Math.tan(l/2);return d[0]=D/h,d[1]=0,d[2]=0,d[3]=0,d[4]=0,d[5]=D,d[6]=0,d[7]=0,d[8]=0,d[9]=0,d[11]=-1,d[12]=0,d[13]=0,d[15]=0,C!=null&&C!==1/0?(d[10]=(C+y)*(I=1/(y-C)),d[14]=2*C*y*I):(d[10]=-1,d[14]=-2*y),d},o.pick=function(d,l){const h={};for(let y=0;y<l.length;y++){const C=l[y];C in d&&(h[C]=d[C])}return h},o.plugin=Wo,o.pointGeometry=ie,o.polygonIntersectsPolygon=xI,o.potpack=QI,o.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],o.register=gn,o.registerForPluginStateChange=function(d){return d({pluginStatus:mo,pluginURL:Vs}),Pp.on("pluginStateChange",d),d},o.renderColorRamp=RI,o.rotateX=function(d,l,h){var y=Math.sin(h),C=Math.cos(h),I=l[4],D=l[5],z=l[6],B=l[7],K=l[8],Y=l[9],te=l[10],ce=l[11];return l!==d&&(d[0]=l[0],d[1]=l[1],d[2]=l[2],d[3]=l[3],d[12]=l[12],d[13]=l[13],d[14]=l[14],d[15]=l[15]),d[4]=I*C+K*y,d[5]=D*C+Y*y,d[6]=z*C+te*y,d[7]=B*C+ce*y,d[8]=K*C-I*y,d[9]=Y*C-D*y,d[10]=te*C-z*y,d[11]=ce*C-B*y,d},o.rotateZ=function(d,l,h){var y=Math.sin(h),C=Math.cos(h),I=l[0],D=l[1],z=l[2],B=l[3],K=l[4],Y=l[5],te=l[6],ce=l[7];return l!==d&&(d[8]=l[8],d[9]=l[9],d[10]=l[10],d[11]=l[11],d[12]=l[12],d[13]=l[13],d[14]=l[14],d[15]=l[15]),d[0]=I*C+K*y,d[1]=D*C+Y*y,d[2]=z*C+te*y,d[3]=B*C+ce*y,d[4]=K*C-I*y,d[5]=Y*C-D*y,d[6]=te*C-z*y,d[7]=ce*C-B*y,d},o.scale=function(d,l,h){var y=h[0],C=h[1],I=h[2];return d[0]=l[0]*y,d[1]=l[1]*y,d[2]=l[2]*y,d[3]=l[3]*y,d[4]=l[4]*C,d[5]=l[5]*C,d[6]=l[6]*C,d[7]=l[7]*C,d[8]=l[8]*I,d[9]=l[9]*I,d[10]=l[10]*I,d[11]=l[11]*I,d[12]=l[12],d[13]=l[13],d[14]=l[14],d[15]=l[15],d},o.scale$1=function(d,l,h){return d[0]=l[0]*h,d[1]=l[1]*h,d[2]=l[2]*h,d},o.setCacheLimits=function(d,l){be=d,Re=l},o.setRTLTextPlugin=function(d,l,h=!1){if(mo===wp||mo===Cp||mo===Sp)throw new Error("setRTLTextPlugin cannot be called multiple times.");Vs=ge.resolveURL(d),mo=wp,Ep=l,hu(),h||cy()},o.spec=ze,o.sphericalToCartesian=function([d,l,h]){return l+=90,l*=Math.PI/180,h*=Math.PI/180,{x:d*Math.cos(l)*Math.sin(h),y:d*Math.sin(l)*Math.sin(h),z:d*Math.cos(h)}},o.sqrLen=function(d){var l=d[0],h=d[1];return l*l+h*h},o.sub=function(d,l,h){return d[0]=l[0]-h[0],d[1]=l[1]-h[1],d[2]=l[2]-h[2],d},o.toEvaluationFeature=zc,o.transformMat3=function(d,l,h){var y=l[0],C=l[1],I=l[2];return d[0]=y*h[0]+C*h[3]+I*h[6],d[1]=y*h[1]+C*h[4]+I*h[7],d[2]=y*h[2]+C*h[5]+I*h[8],d},o.transformMat4=xy,o.transformMat4$1=function(d,l,h){var y=l[0],C=l[1];return d[0]=h[0]*y+h[4]*C+h[12],d[1]=h[1]*y+h[5]*C+h[13],d},o.translate=function(d,l,h){var y,C,I,D,z,B,K,Y,te,ce,pe,ve,Ne=h[0],Oe=h[1],Je=h[2];return l===d?(d[12]=l[0]*Ne+l[4]*Oe+l[8]*Je+l[12],d[13]=l[1]*Ne+l[5]*Oe+l[9]*Je+l[13],d[14]=l[2]*Ne+l[6]*Oe+l[10]*Je+l[14],d[15]=l[3]*Ne+l[7]*Oe+l[11]*Je+l[15]):(C=l[1],I=l[2],D=l[3],z=l[4],B=l[5],K=l[6],Y=l[7],te=l[8],ce=l[9],pe=l[10],ve=l[11],d[0]=y=l[0],d[1]=C,d[2]=I,d[3]=D,d[4]=z,d[5]=B,d[6]=K,d[7]=Y,d[8]=te,d[9]=ce,d[10]=pe,d[11]=ve,d[12]=y*Ne+z*Oe+te*Je+l[12],d[13]=C*Ne+B*Oe+ce*Je+l[13],d[14]=I*Ne+K*Oe+pe*Je+l[14],d[15]=D*Ne+Y*Oe+ve*Je+l[15]),d},o.triggerPluginCompletionEvent=uy,o.unicodeBlockLookup=sn,o.uniqueId=function(){return T++},o.validateCustomStyleLayer=function(d){const l=[],h=d.id;return h===void 0&&l.push({message:`layers.${h}: missing required property "id"`}),d.render===void 0&&l.push({message:`layers.${h}: missing required method "render"`}),d.renderingMode&&d.renderingMode!=="2d"&&d.renderingMode!=="3d"&&l.push({message:`layers.${h}: property "renderingMode" must be either "2d" or "3d"`}),l},o.validateLight=yp,o.validateStyle=Rc,o.vectorTile=vu,o.warnOnce=L,o.wrap=b}),a(["./shared"],function(o){function c(ye){const W=typeof ye;if(W==="number"||W==="boolean"||W==="string"||ye==null)return JSON.stringify(ye);if(Array.isArray(ye)){let le="[";for(const xe of ye)le+=`${c(xe)},`;return`${le}]`}const X=Object.keys(ye).sort();let de="{";for(let le=0;le<X.length;le++)de+=`${JSON.stringify(X[le])}:${c(ye[X[le]])},`;return`${de}}`}function f(ye){let W="";for(const X of o.refProperties)W+=`/${c(ye[X])}`;return W}class p{constructor(W){this.keyCache={},W&&this.replace(W)}replace(W){this._layerConfigs={},this._layers={},this.update(W,[])}update(W,X){for(const le of W){this._layerConfigs[le.id]=le;const xe=this._layers[le.id]=o.createStyleLayer(le);xe._featureFilter=o.createFilter(xe.filter),this.keyCache[le.id]&&delete this.keyCache[le.id]}for(const le of X)delete this.keyCache[le],delete this._layerConfigs[le],delete this._layers[le];this.familiesBySource={};const de=function(le,xe){const Ie={};for(let Pe=0;Pe<le.length;Pe++){const Le=xe&&xe[le[Pe].id]||f(le[Pe]);xe&&(xe[le[Pe].id]=Le);let Xe=Ie[Le];Xe||(Xe=Ie[Le]=[]),Xe.push(le[Pe])}const Ce=[];for(const Pe in Ie)Ce.push(Ie[Pe]);return Ce}(Object.values(this._layerConfigs),this.keyCache);for(const le of de){const xe=le.map(Ye=>this._layers[Ye.id]),Ie=xe[0];if(Ie.visibility==="none")continue;const Ce=Ie.source||"";let Pe=this.familiesBySource[Ce];Pe||(Pe=this.familiesBySource[Ce]={});const Le=Ie.sourceLayer||"_geojsonTileLayer";let Xe=Pe[Le];Xe||(Xe=Pe[Le]=[]),Xe.push(xe)}}}class g{constructor(W){const X={},de=[];for(const Ce in W){const Pe=W[Ce],Le=X[Ce]={};for(const Xe in Pe){const Ye=Pe[+Xe];if(!Ye||Ye.bitmap.width===0||Ye.bitmap.height===0)continue;const Ue={x:0,y:0,w:Ye.bitmap.width+2,h:Ye.bitmap.height+2};de.push(Ue),Le[Xe]={rect:Ue,metrics:Ye.metrics}}}const{w:le,h:xe}=o.potpack(de),Ie=new o.AlphaImage({width:le||1,height:xe||1});for(const Ce in W){const Pe=W[Ce];for(const Le in Pe){const Xe=Pe[+Le];if(!Xe||Xe.bitmap.width===0||Xe.bitmap.height===0)continue;const Ye=X[Ce][Le].rect;o.AlphaImage.copy(Xe.bitmap,Ie,{x:0,y:0},{x:Ye.x+1,y:Ye.y+1},Xe.bitmap)}}this.image=Ie,this.positions=X}}o.register("GlyphAtlas",g);class v{constructor(W){this.tileID=new o.OverscaledTileID(W.tileID.overscaledZ,W.tileID.wrap,W.tileID.canonical.z,W.tileID.canonical.x,W.tileID.canonical.y),this.uid=W.uid,this.zoom=W.zoom,this.pixelRatio=W.pixelRatio,this.tileSize=W.tileSize,this.source=W.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=W.showCollisionBoxes,this.collectResourceTiming=!!W.collectResourceTiming,this.returnDependencies=!!W.returnDependencies,this.promoteId=W.promoteId}parse(W,X,de,le,xe){this.status="parsing",this.data=W,this.collisionBoxArray=new o.CollisionBoxArray;const Ie=new o.DictionaryCoder(Object.keys(W.layers).sort()),Ce=new o.FeatureIndex(this.tileID,this.promoteId);Ce.bucketLayerIDs=[];const Pe={},Le={featureIndex:Ce,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:de},Xe=X.familiesBySource[this.source];for(const dn in Xe){const Cn=W.layers[dn];if(!Cn)continue;Cn.version===1&&o.warnOnce(`Vector tile source "${this.source}" layer "${dn}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const jn=Ie.encode(dn),or=[];for(let Kr=0;Kr<Cn.length;Kr++){const dr=Cn.feature(Kr),Lr=Ce.getId(dr,dn);or.push({feature:dr,id:Lr,index:Kr,sourceLayerIndex:jn})}for(const Kr of Xe[dn]){const dr=Kr[0];dr.source!==this.source&&o.warnOnce(`layer.source = ${dr.source} does not equal this.source = ${this.source}`),dr.minzoom&&this.zoom<Math.floor(dr.minzoom)||dr.maxzoom&&this.zoom>=dr.maxzoom||dr.visibility!=="none"&&(b(Kr,this.zoom,de),(Pe[dr.id]=dr.createBucket({index:Ce.bucketLayerIDs.length,layers:Kr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:jn,sourceID:this.source})).populate(or,Le,this.tileID.canonical),Ce.bucketLayerIDs.push(Kr.map(Lr=>Lr.id)))}}let Ye,Ue,Bt,Pt;const nt=o.mapObject(Le.glyphDependencies,dn=>Object.keys(dn).map(Number));Object.keys(nt).length?le.send("getGlyphs",{uid:this.uid,stacks:nt},(dn,Cn)=>{Ye||(Ye=dn,Ue=Cn,wn.call(this))}):Ue={};const Ft=Object.keys(Le.iconDependencies);Ft.length?le.send("getImages",{icons:Ft,source:this.source,tileID:this.tileID,type:"icons"},(dn,Cn)=>{Ye||(Ye=dn,Bt=Cn,wn.call(this))}):Bt={};const Gt=Object.keys(Le.patternDependencies);function wn(){if(Ye)return xe(Ye);if(Ue&&Bt&&Pt){const dn=new g(Ue),Cn=new o.ImageAtlas(Bt,Pt);for(const jn in Pe){const or=Pe[jn];or instanceof o.SymbolBucket?(b(or.layers,this.zoom,de),o.performSymbolLayout({bucket:or,glyphMap:Ue,glyphPositions:dn.positions,imageMap:Bt,imagePositions:Cn.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):or.hasPattern&&(or instanceof o.LineBucket||or instanceof o.FillBucket||or instanceof o.FillExtrusionBucket)&&(b(or.layers,this.zoom,de),or.addFeatures(Le,this.tileID.canonical,Cn.patternPositions))}this.status="done",xe(null,{buckets:Object.values(Pe).filter(jn=>!jn.isEmpty()),featureIndex:Ce,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:dn.image,imageAtlas:Cn,glyphMap:this.returnDependencies?Ue:null,iconMap:this.returnDependencies?Bt:null,glyphPositions:this.returnDependencies?dn.positions:null})}}Gt.length?le.send("getImages",{icons:Gt,source:this.source,tileID:this.tileID,type:"patterns"},(dn,Cn)=>{Ye||(Ye=dn,Pt=Cn,wn.call(this))}):Pt={},wn.call(this)}}function b(ye,W,X){const de=new o.EvaluationParameters(W);for(const le of ye)le.recalculate(de,X)}function _(ye,W){const X=o.getArrayBuffer(ye.request,(de,le,xe,Ie)=>{de?W(de):le&&W(null,{vectorTile:new o.vectorTile.VectorTile(new o.pbf(le)),rawData:le,cacheControl:xe,expires:Ie})});return()=>{X.cancel(),W()}}class T{constructor(W,X,de,le){this.actor=W,this.layerIndex=X,this.availableImages=de,this.loadVectorData=le||_,this.loading={},this.loaded={}}loadTile(W,X){const de=W.uid;this.loading||(this.loading={});const le=!!(W&&W.request&&W.request.collectResourceTiming)&&new o.RequestPerformance(W.request),xe=this.loading[de]=new v(W);xe.abort=this.loadVectorData(W,(Ie,Ce)=>{if(delete this.loading[de],Ie||!Ce)return xe.status="done",this.loaded[de]=xe,X(Ie);const Pe=Ce.rawData,Le={};Ce.expires&&(Le.expires=Ce.expires),Ce.cacheControl&&(Le.cacheControl=Ce.cacheControl);const Xe={};if(le){const Ye=le.finish();Ye&&(Xe.resourceTiming=JSON.parse(JSON.stringify(Ye)))}xe.vectorTile=Ce.vectorTile,xe.parse(Ce.vectorTile,this.layerIndex,this.availableImages,this.actor,(Ye,Ue)=>{if(Ye||!Ue)return X(Ye);X(null,o.extend({rawTileData:Pe.slice(0)},Ue,Le,Xe))}),this.loaded=this.loaded||{},this.loaded[de]=xe})}reloadTile(W,X){const de=this.loaded,le=W.uid,xe=this;if(de&&de[le]){const Ie=de[le];Ie.showCollisionBoxes=W.showCollisionBoxes;const Ce=(Pe,Le)=>{const Xe=Ie.reloadCallback;Xe&&(delete Ie.reloadCallback,Ie.parse(Ie.vectorTile,xe.layerIndex,this.availableImages,xe.actor,Xe)),X(Pe,Le)};Ie.status==="parsing"?Ie.reloadCallback=Ce:Ie.status==="done"&&(Ie.vectorTile?Ie.parse(Ie.vectorTile,this.layerIndex,this.availableImages,this.actor,Ce):Ce())}}abortTile(W,X){const de=this.loading,le=W.uid;de&&de[le]&&de[le].abort&&(de[le].abort(),delete de[le]),X()}removeTile(W,X){const de=this.loaded,le=W.uid;de&&de[le]&&delete de[le],X()}}class k{constructor(){this.loaded={}}loadTile(W,X){const{uid:de,encoding:le,rawImageData:xe}=W,Ie=o.isImageBitmap(xe)?this.getImageData(xe):xe,Ce=new o.DEMData(de,Ie,le);this.loaded=this.loaded||{},this.loaded[de]=Ce,X(null,Ce)}getImageData(W){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(W.width,W.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=W.width,this.offscreenCanvas.height=W.height,this.offscreenCanvasContext.drawImage(W,0,0,W.width,W.height);const X=this.offscreenCanvasContext.getImageData(-1,-1,W.width+2,W.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new o.RGBAImage({width:X.width,height:X.height},X.data)}removeTile(W){const X=this.loaded,de=W.uid;X&&X[de]&&delete X[de]}}var P=function ye(W,X){var de,le=W&&W.type;if(le==="FeatureCollection")for(de=0;de<W.features.length;de++)ye(W.features[de],X);else if(le==="GeometryCollection")for(de=0;de<W.geometries.length;de++)ye(W.geometries[de],X);else if(le==="Feature")ye(W.geometry,X);else if(le==="Polygon")M(W.coordinates,X);else if(le==="MultiPolygon")for(de=0;de<W.coordinates.length;de++)M(W.coordinates[de],X);return W};function M(ye,W){if(ye.length!==0){O(ye[0],W);for(var X=1;X<ye.length;X++)O(ye[X],!W)}}function O(ye,W){for(var X=0,de=0,le=0,xe=ye.length,Ie=xe-1;le<xe;Ie=le++){var Ce=(ye[le][0]-ye[Ie][0])*(ye[Ie][1]+ye[le][1]),Pe=X+Ce;de+=Math.abs(X)>=Math.abs(Ce)?X-Pe+Ce:Ce-Pe+X,X=Pe}X+de>=0!=!!W&&ye.reverse()}const N=o.vectorTile.VectorTileFeature.prototype.toGeoJSON;class L{constructor(W){this._feature=W,this.extent=o.EXTENT,this.type=W.type,this.properties=W.tags,"id"in W&&!isNaN(W.id)&&(this.id=parseInt(W.id,10))}loadGeometry(){if(this._feature.type===1){const W=[];for(const X of this._feature.geometry)W.push([new o.pointGeometry(X[0],X[1])]);return W}{const W=[];for(const X of this._feature.geometry){const de=[];for(const le of X)de.push(new o.pointGeometry(le[0],le[1]));W.push(de)}return W}}toGeoJSON(W,X,de){return N.call(this,W,X,de)}}class ${constructor(W){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=o.EXTENT,this.length=W.length,this._features=W}feature(W){return new L(this._features[W])}}var j={exports:{}},U=o.pointGeometry,G=o.vectorTile.VectorTileFeature,Z=Q;function Q(ye,W){this.options=W||{},this.features=ye,this.length=ye.length}function J(ye,W){this.id=typeof ye.id=="number"?ye.id:void 0,this.type=ye.type,this.rawGeometry=ye.type===1?[ye.geometry]:ye.geometry,this.properties=ye.tags,this.extent=W||4096}Q.prototype.feature=function(ye){return new J(this.features[ye],this.options.extent)},J.prototype.loadGeometry=function(){var ye=this.rawGeometry;this.geometry=[];for(var W=0;W<ye.length;W++){for(var X=ye[W],de=[],le=0;le<X.length;le++)de.push(new U(X[le][0],X[le][1]));this.geometry.push(de)}return this.geometry},J.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var ye=this.geometry,W=1/0,X=-1/0,de=1/0,le=-1/0,xe=0;xe<ye.length;xe++)for(var Ie=ye[xe],Ce=0;Ce<Ie.length;Ce++){var Pe=Ie[Ce];W=Math.min(W,Pe.x),X=Math.max(X,Pe.x),de=Math.min(de,Pe.y),le=Math.max(le,Pe.y)}return[W,de,X,le]},J.prototype.toGeoJSON=G.prototype.toGeoJSON;var re=o.pbf,ne=Z;function ge(ye){var W=new re;return function(X,de){for(var le in X.layers)de.writeMessage(3,ie,X.layers[le])}(ye,W),W.finish()}function ie(ye,W){var X;W.writeVarintField(15,ye.version||1),W.writeStringField(1,ye.name||""),W.writeVarintField(5,ye.extent||4096);var de={keys:[],values:[],keycache:{},valuecache:{}};for(X=0;X<ye.length;X++)de.feature=ye.feature(X),W.writeMessage(2,ue,de);var le=de.keys;for(X=0;X<le.length;X++)W.writeStringField(3,le[X]);var xe=de.values;for(X=0;X<xe.length;X++)W.writeMessage(4,be,xe[X])}function ue(ye,W){var X=ye.feature;X.id!==void 0&&W.writeVarintField(1,X.id),W.writeMessage(2,oe,ye),W.writeVarintField(3,X.type),W.writeMessage(4,we,X)}function oe(ye,W){var X=ye.feature,de=ye.keys,le=ye.values,xe=ye.keycache,Ie=ye.valuecache;for(var Ce in X.properties){var Pe=X.properties[Ce],Le=xe[Ce];if(Pe!==null){Le===void 0&&(de.push(Ce),xe[Ce]=Le=de.length-1),W.writeVarint(Le);var Xe=typeof Pe;Xe!=="string"&&Xe!=="boolean"&&Xe!=="number"&&(Pe=JSON.stringify(Pe));var Ye=Xe+":"+Pe,Ue=Ie[Ye];Ue===void 0&&(le.push(Pe),Ie[Ye]=Ue=le.length-1),W.writeVarint(Ue)}}}function me(ye,W){return(W<<3)+(7&ye)}function Te(ye){return ye<<1^ye>>31}function we(ye,W){for(var X=ye.loadGeometry(),de=ye.type,le=0,xe=0,Ie=X.length,Ce=0;Ce<Ie;Ce++){var Pe=X[Ce],Le=1;de===1&&(Le=Pe.length),W.writeVarint(me(1,Le));for(var Xe=de===3?Pe.length-1:Pe.length,Ye=0;Ye<Xe;Ye++){Ye===1&&de!==1&&W.writeVarint(me(2,Xe-1));var Ue=Pe[Ye].x-le,Bt=Pe[Ye].y-xe;W.writeVarint(Te(Ue)),W.writeVarint(Te(Bt)),le+=Ue,xe+=Bt}de===3&&W.writeVarint(me(7,1))}}function be(ye,W){var X=typeof ye;X==="string"?W.writeStringField(1,ye):X==="boolean"?W.writeBooleanField(7,ye):X==="number"&&(ye%1!=0?W.writeDoubleField(3,ye):ye<0?W.writeSVarintField(6,ye):W.writeVarintField(5,ye))}function Re(ye,W,X,de,le,xe){if(le-de<=X)return;const Ie=de+le>>1;Ee(ye,W,Ie,de,le,xe%2),Re(ye,W,X,de,Ie-1,xe+1),Re(ye,W,X,Ie+1,le,xe+1)}function Ee(ye,W,X,de,le,xe){for(;le>de;){if(le-de>600){const Le=le-de+1,Xe=X-de+1,Ye=Math.log(Le),Ue=.5*Math.exp(2*Ye/3),Bt=.5*Math.sqrt(Ye*Ue*(Le-Ue)/Le)*(Xe-Le/2<0?-1:1);Ee(ye,W,X,Math.max(de,Math.floor(X-Xe*Ue/Le+Bt)),Math.min(le,Math.floor(X+(Le-Xe)*Ue/Le+Bt)),xe)}const Ie=W[2*X+xe];let Ce=de,Pe=le;for(Me(ye,W,de,X),W[2*le+xe]>Ie&&Me(ye,W,de,le);Ce<Pe;){for(Me(ye,W,Ce,Pe),Ce++,Pe--;W[2*Ce+xe]<Ie;)Ce++;for(;W[2*Pe+xe]>Ie;)Pe--}W[2*de+xe]===Ie?Me(ye,W,de,Pe):(Pe++,Me(ye,W,Pe,le)),Pe<=X&&(de=Pe+1),X<=Pe&&(le=Pe-1)}}function Me(ye,W,X,de){Ae(ye,X,de),Ae(W,2*X,2*de),Ae(W,2*X+1,2*de+1)}function Ae(ye,W,X){const de=ye[W];ye[W]=ye[X],ye[X]=de}function Fe(ye,W,X,de){const le=ye-X,xe=W-de;return le*le+xe*xe}j.exports=ge,j.exports.fromVectorTileJs=ge,j.exports.fromGeojsonVt=function(ye,W){W=W||{};var X={};for(var de in ye)X[de]=new ne(ye[de].features,W),X[de].name=de,X[de].version=W.version,X[de].extent=W.extent;return ge({layers:X})},j.exports.GeoJSONWrapper=ne;const We=ye=>ye[0],je=ye=>ye[1];class pt{constructor(W,X=We,de=je,le=64,xe=Float64Array){this.nodeSize=le,this.points=W;const Ie=W.length<65536?Uint16Array:Uint32Array,Ce=this.ids=new Ie(W.length),Pe=this.coords=new xe(2*W.length);for(let Le=0;Le<W.length;Le++)Ce[Le]=Le,Pe[2*Le]=X(W[Le]),Pe[2*Le+1]=de(W[Le]);Re(Ce,Pe,le,0,Ce.length-1,0)}range(W,X,de,le){return function(xe,Ie,Ce,Pe,Le,Xe,Ye){const Ue=[0,xe.length-1,0],Bt=[];let Pt,nt;for(;Ue.length;){const Ft=Ue.pop(),Gt=Ue.pop(),wn=Ue.pop();if(Gt-wn<=Ye){for(let jn=wn;jn<=Gt;jn++)Pt=Ie[2*jn],nt=Ie[2*jn+1],Pt>=Ce&&Pt<=Le&&nt>=Pe&&nt<=Xe&&Bt.push(xe[jn]);continue}const dn=Math.floor((wn+Gt)/2);Pt=Ie[2*dn],nt=Ie[2*dn+1],Pt>=Ce&&Pt<=Le&&nt>=Pe&&nt<=Xe&&Bt.push(xe[dn]);const Cn=(Ft+1)%2;(Ft===0?Ce<=Pt:Pe<=nt)&&(Ue.push(wn),Ue.push(dn-1),Ue.push(Cn)),(Ft===0?Le>=Pt:Xe>=nt)&&(Ue.push(dn+1),Ue.push(Gt),Ue.push(Cn))}return Bt}(this.ids,this.coords,W,X,de,le,this.nodeSize)}within(W,X,de){return function(le,xe,Ie,Ce,Pe,Le){const Xe=[0,le.length-1,0],Ye=[],Ue=Pe*Pe;for(;Xe.length;){const Bt=Xe.pop(),Pt=Xe.pop(),nt=Xe.pop();if(Pt-nt<=Le){for(let Cn=nt;Cn<=Pt;Cn++)Fe(xe[2*Cn],xe[2*Cn+1],Ie,Ce)<=Ue&&Ye.push(le[Cn]);continue}const Ft=Math.floor((nt+Pt)/2),Gt=xe[2*Ft],wn=xe[2*Ft+1];Fe(Gt,wn,Ie,Ce)<=Ue&&Ye.push(le[Ft]);const dn=(Bt+1)%2;(Bt===0?Ie-Pe<=Gt:Ce-Pe<=wn)&&(Xe.push(nt),Xe.push(Ft-1),Xe.push(dn)),(Bt===0?Ie+Pe>=Gt:Ce+Pe>=wn)&&(Xe.push(Ft+1),Xe.push(Pt),Xe.push(dn))}return Ye}(this.ids,this.coords,W,X,de,this.nodeSize)}}const gt={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:ye=>ye},Ot=Math.fround||(Ze=new Float32Array(1),ye=>(Ze[0]=+ye,Ze[0]));var Ze;class St{constructor(W){this.options=Ke(Object.create(gt),W),this.trees=new Array(this.options.maxZoom+1)}load(W){const{log:X,minZoom:de,maxZoom:le,nodeSize:xe}=this.options;X&&console.time("total time");const Ie=`prepare ${W.length} points`;X&&console.time(Ie),this.points=W;let Ce=[];for(let Pe=0;Pe<W.length;Pe++)W[Pe].geometry&&Ce.push(vt(W[Pe],Pe));this.trees[le+1]=new pt(Ce,ct,bt,xe,Float32Array),X&&console.timeEnd(Ie);for(let Pe=le;Pe>=de;Pe--){const Le=+Date.now();Ce=this._cluster(Ce,Pe),this.trees[Pe]=new pt(Ce,ct,bt,xe,Float32Array),X&&console.log("z%d: %d clusters in %dms",Pe,Ce.length,+Date.now()-Le)}return X&&console.timeEnd("total time"),this}getClusters(W,X){let de=((W[0]+180)%360+360)%360-180;const le=Math.max(-90,Math.min(90,W[1]));let xe=W[2]===180?180:((W[2]+180)%360+360)%360-180;const Ie=Math.max(-90,Math.min(90,W[3]));if(W[2]-W[0]>=360)de=-180,xe=180;else if(de>xe){const Xe=this.getClusters([de,le,180,Ie],X),Ye=this.getClusters([-180,le,xe,Ie],X);return Xe.concat(Ye)}const Ce=this.trees[this._limitZoom(X)],Pe=Ce.range(et(de),ut(Ie),et(xe),ut(le)),Le=[];for(const Xe of Pe){const Ye=Ce.points[Xe];Le.push(Ye.numPoints?yt(Ye):this.points[Ye.index])}return Le}getChildren(W){const X=this._getOriginId(W),de=this._getOriginZoom(W),le="No cluster with the specified id.",xe=this.trees[de];if(!xe)throw new Error(le);const Ie=xe.points[X];if(!Ie)throw new Error(le);const Ce=this.options.radius/(this.options.extent*Math.pow(2,de-1)),Pe=xe.within(Ie.x,Ie.y,Ce),Le=[];for(const Xe of Pe){const Ye=xe.points[Xe];Ye.parentId===W&&Le.push(Ye.numPoints?yt(Ye):this.points[Ye.index])}if(Le.length===0)throw new Error(le);return Le}getLeaves(W,X,de){const le=[];return this._appendLeaves(le,W,X=X||10,de=de||0,0),le}getTile(W,X,de){const le=this.trees[this._limitZoom(W)],xe=Math.pow(2,W),{extent:Ie,radius:Ce}=this.options,Pe=Ce/Ie,Le=(de-Pe)/xe,Xe=(de+1+Pe)/xe,Ye={features:[]};return this._addTileFeatures(le.range((X-Pe)/xe,Le,(X+1+Pe)/xe,Xe),le.points,X,de,xe,Ye),X===0&&this._addTileFeatures(le.range(1-Pe/xe,Le,1,Xe),le.points,xe,de,xe,Ye),X===xe-1&&this._addTileFeatures(le.range(0,Le,Pe/xe,Xe),le.points,-1,de,xe,Ye),Ye.features.length?Ye:null}getClusterExpansionZoom(W){let X=this._getOriginZoom(W)-1;for(;X<=this.options.maxZoom;){const de=this.getChildren(W);if(X++,de.length!==1)break;W=de[0].properties.cluster_id}return X}_appendLeaves(W,X,de,le,xe){const Ie=this.getChildren(X);for(const Ce of Ie){const Pe=Ce.properties;if(Pe&&Pe.cluster?xe+Pe.point_count<=le?xe+=Pe.point_count:xe=this._appendLeaves(W,Pe.cluster_id,de,le,xe):xe<le?xe++:W.push(Ce),W.length===de)break}return xe}_addTileFeatures(W,X,de,le,xe,Ie){for(const Ce of W){const Pe=X[Ce],Le=Pe.numPoints;let Xe,Ye,Ue;if(Le)Xe=kt(Pe),Ye=Pe.x,Ue=Pe.y;else{const nt=this.points[Pe.index];Xe=nt.properties,Ye=et(nt.geometry.coordinates[0]),Ue=ut(nt.geometry.coordinates[1])}const Bt={type:1,geometry:[[Math.round(this.options.extent*(Ye*xe-de)),Math.round(this.options.extent*(Ue*xe-le))]],tags:Xe};let Pt;Le?Pt=Pe.id:this.options.generateId?Pt=Pe.index:this.points[Pe.index].id&&(Pt=this.points[Pe.index].id),Pt!==void 0&&(Bt.id=Pt),Ie.features.push(Bt)}}_limitZoom(W){return Math.max(this.options.minZoom,Math.min(Math.floor(+W),this.options.maxZoom+1))}_cluster(W,X){const de=[],{radius:le,extent:xe,reduce:Ie,minPoints:Ce}=this.options,Pe=le/(xe*Math.pow(2,X));for(let Le=0;Le<W.length;Le++){const Xe=W[Le];if(Xe.zoom<=X)continue;Xe.zoom=X;const Ye=this.trees[X+1],Ue=Ye.within(Xe.x,Xe.y,Pe),Bt=Xe.numPoints||1;let Pt=Bt;for(const nt of Ue){const Ft=Ye.points[nt];Ft.zoom>X&&(Pt+=Ft.numPoints||1)}if(Pt>Bt&&Pt>=Ce){let nt=Xe.x*Bt,Ft=Xe.y*Bt,Gt=Ie&&Bt>1?this._map(Xe,!0):null;const wn=(Le<<5)+(X+1)+this.points.length;for(const dn of Ue){const Cn=Ye.points[dn];if(Cn.zoom<=X)continue;Cn.zoom=X;const jn=Cn.numPoints||1;nt+=Cn.x*jn,Ft+=Cn.y*jn,Cn.parentId=wn,Ie&&(Gt||(Gt=this._map(Xe,!0)),Ie(Gt,this._map(Cn)))}Xe.parentId=wn,de.push(ot(nt/Pt,Ft/Pt,wn,Pt,Gt))}else if(de.push(Xe),Pt>1)for(const nt of Ue){const Ft=Ye.points[nt];Ft.zoom<=X||(Ft.zoom=X,de.push(Ft))}}return de}_getOriginId(W){return W-this.points.length>>5}_getOriginZoom(W){return(W-this.points.length)%32}_map(W,X){if(W.numPoints)return X?Ke({},W.properties):W.properties;const de=this.points[W.index].properties,le=this.options.map(de);return X&&le===de?Ke({},le):le}}function ot(ye,W,X,de,le){return{x:Ot(ye),y:Ot(W),zoom:1/0,id:X,parentId:-1,numPoints:de,properties:le}}function vt(ye,W){const[X,de]=ye.geometry.coordinates;return{x:Ot(et(X)),y:Ot(ut(de)),zoom:1/0,index:W,parentId:-1}}function yt(ye){return{type:"Feature",id:ye.id,properties:kt(ye),geometry:{type:"Point",coordinates:[(W=ye.x,360*(W-.5)),at(ye.y)]}};var W}function kt(ye){const W=ye.numPoints,X=W>=1e4?`${Math.round(W/1e3)}k`:W>=1e3?Math.round(W/100)/10+"k":W;return Ke(Ke({},ye.properties),{cluster:!0,cluster_id:ye.id,point_count:W,point_count_abbreviated:X})}function et(ye){return ye/360+.5}function ut(ye){const W=Math.sin(ye*Math.PI/180),X=.5-.25*Math.log((1+W)/(1-W))/Math.PI;return X<0?0:X>1?1:X}function at(ye){const W=(180-360*ye)*Math.PI/180;return 360*Math.atan(Math.exp(W))/Math.PI-90}function Ke(ye,W){for(const X in W)ye[X]=W[X];return ye}function ct(ye){return ye.x}function bt(ye){return ye.y}function At(ye,W,X,de){for(var le,xe=de,Ie=X-W>>1,Ce=X-W,Pe=ye[W],Le=ye[W+1],Xe=ye[X],Ye=ye[X+1],Ue=W+3;Ue<X;Ue+=3){var Bt=Lt(ye[Ue],ye[Ue+1],Pe,Le,Xe,Ye);if(Bt>xe)le=Ue,xe=Bt;else if(Bt===xe){var Pt=Math.abs(Ue-Ie);Pt<Ce&&(le=Ue,Ce=Pt)}}xe>de&&(le-W>3&&At(ye,W,le,de),ye[le+2]=xe,X-le>3&&At(ye,le,X,de))}function Lt(ye,W,X,de,le,xe){var Ie=le-X,Ce=xe-de;if(Ie!==0||Ce!==0){var Pe=((ye-X)*Ie+(W-de)*Ce)/(Ie*Ie+Ce*Ce);Pe>1?(X=le,de=xe):Pe>0&&(X+=Ie*Pe,de+=Ce*Pe)}return(Ie=ye-X)*Ie+(Ce=W-de)*Ce}function Ht(ye,W,X,de){var le={id:ye===void 0?null:ye,type:W,geometry:X,tags:de,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(xe){var Ie=xe.geometry,Ce=xe.type;if(Ce==="Point"||Ce==="MultiPoint"||Ce==="LineString")ze(xe,Ie);else if(Ce==="Polygon"||Ce==="MultiLineString")for(var Pe=0;Pe<Ie.length;Pe++)ze(xe,Ie[Pe]);else if(Ce==="MultiPolygon")for(Pe=0;Pe<Ie.length;Pe++)for(var Le=0;Le<Ie[Pe].length;Le++)ze(xe,Ie[Pe][Le])}(le),le}function ze(ye,W){for(var X=0;X<W.length;X+=3)ye.minX=Math.min(ye.minX,W[X]),ye.minY=Math.min(ye.minY,W[X+1]),ye.maxX=Math.max(ye.maxX,W[X]),ye.maxY=Math.max(ye.maxY,W[X+1])}function Qe(ye,W,X,de){if(W.geometry){var le=W.geometry.coordinates,xe=W.geometry.type,Ie=Math.pow(X.tolerance/((1<<X.maxZoom)*X.extent),2),Ce=[],Pe=W.id;if(X.promoteId?Pe=W.properties[X.promoteId]:X.generateId&&(Pe=de||0),xe==="Point")Zt(le,Ce);else if(xe==="MultiPoint")for(var Le=0;Le<le.length;Le++)Zt(le[Le],Ce);else if(xe==="LineString")an(le,Ce,Ie,!1);else if(xe==="MultiLineString"){if(X.lineMetrics){for(Le=0;Le<le.length;Le++)an(le[Le],Ce=[],Ie,!1),ye.push(Ht(Pe,"LineString",Ce,W.properties));return}Kt(le,Ce,Ie,!1)}else if(xe==="Polygon")Kt(le,Ce,Ie,!0);else{if(xe!=="MultiPolygon"){if(xe==="GeometryCollection"){for(Le=0;Le<W.geometry.geometries.length;Le++)Qe(ye,{id:Pe,geometry:W.geometry.geometries[Le],properties:W.properties},X,de);return}throw new Error("Input data is not a valid GeoJSON object.")}for(Le=0;Le<le.length;Le++){var Xe=[];Kt(le[Le],Xe,Ie,!0),Ce.push(Xe)}}ye.push(Ht(Pe,xe,Ce,W.properties))}}function Zt(ye,W){W.push(Vt(ye[0])),W.push(It(ye[1])),W.push(0)}function an(ye,W,X,de){for(var le,xe,Ie=0,Ce=0;Ce<ye.length;Ce++){var Pe=Vt(ye[Ce][0]),Le=It(ye[Ce][1]);W.push(Pe),W.push(Le),W.push(0),Ce>0&&(Ie+=de?(le*Le-Pe*xe)/2:Math.sqrt(Math.pow(Pe-le,2)+Math.pow(Le-xe,2))),le=Pe,xe=Le}var Xe=W.length-3;W[2]=1,At(W,0,Xe,X),W[Xe+2]=1,W.size=Math.abs(Ie),W.start=0,W.end=W.size}function Kt(ye,W,X,de){for(var le=0;le<ye.length;le++){var xe=[];an(ye[le],xe,X,de),W.push(xe)}}function Vt(ye){return ye/360+.5}function It(ye){var W=Math.sin(ye*Math.PI/180),X=.5-.25*Math.log((1+W)/(1-W))/Math.PI;return X<0?0:X>1?1:X}function Xt(ye,W,X,de,le,xe,Ie,Ce){if(de/=W,xe>=(X/=W)&&Ie<de)return ye;if(Ie<X||xe>=de)return null;for(var Pe=[],Le=0;Le<ye.length;Le++){var Xe=ye[Le],Ye=Xe.geometry,Ue=Xe.type,Bt=le===0?Xe.minX:Xe.minY,Pt=le===0?Xe.maxX:Xe.maxY;if(Bt>=X&&Pt<de)Pe.push(Xe);else if(!(Pt<X||Bt>=de)){var nt=[];if(Ue==="Point"||Ue==="MultiPoint")pn(Ye,nt,X,de,le);else if(Ue==="LineString")tt(Ye,nt,X,de,le,!1,Ce.lineMetrics);else if(Ue==="MultiLineString")qt(Ye,nt,X,de,le,!1);else if(Ue==="Polygon")qt(Ye,nt,X,de,le,!0);else if(Ue==="MultiPolygon")for(var Ft=0;Ft<Ye.length;Ft++){var Gt=[];qt(Ye[Ft],Gt,X,de,le,!0),Gt.length&&nt.push(Gt)}if(nt.length){if(Ce.lineMetrics&&Ue==="LineString"){for(Ft=0;Ft<nt.length;Ft++)Pe.push(Ht(Xe.id,Ue,nt[Ft],Xe.tags));continue}Ue!=="LineString"&&Ue!=="MultiLineString"||(nt.length===1?(Ue="LineString",nt=nt[0]):Ue="MultiLineString"),Ue!=="Point"&&Ue!=="MultiPoint"||(Ue=nt.length===3?"Point":"MultiPoint"),Pe.push(Ht(Xe.id,Ue,nt,Xe.tags))}}}return Pe.length?Pe:null}function pn(ye,W,X,de,le){for(var xe=0;xe<ye.length;xe+=3){var Ie=ye[xe+le];Ie>=X&&Ie<=de&&(W.push(ye[xe]),W.push(ye[xe+1]),W.push(ye[xe+2]))}}function tt(ye,W,X,de,le,xe,Ie){for(var Ce,Pe,Le=Nt(ye),Xe=le===0?yn:Et,Ye=ye.start,Ue=0;Ue<ye.length-3;Ue+=3){var Bt=ye[Ue],Pt=ye[Ue+1],nt=ye[Ue+2],Ft=ye[Ue+3],Gt=ye[Ue+4],wn=le===0?Bt:Pt,dn=le===0?Ft:Gt,Cn=!1;Ie&&(Ce=Math.sqrt(Math.pow(Bt-Ft,2)+Math.pow(Pt-Gt,2))),wn<X?dn>X&&(Pe=Xe(Le,Bt,Pt,Ft,Gt,X),Ie&&(Le.start=Ye+Ce*Pe)):wn>de?dn<de&&(Pe=Xe(Le,Bt,Pt,Ft,Gt,de),Ie&&(Le.start=Ye+Ce*Pe)):En(Le,Bt,Pt,nt),dn<X&&wn>=X&&(Pe=Xe(Le,Bt,Pt,Ft,Gt,X),Cn=!0),dn>de&&wn<=de&&(Pe=Xe(Le,Bt,Pt,Ft,Gt,de),Cn=!0),!xe&&Cn&&(Ie&&(Le.end=Ye+Ce*Pe),W.push(Le),Le=Nt(ye)),Ie&&(Ye+=Ce)}var jn=ye.length-3;Bt=ye[jn],Pt=ye[jn+1],nt=ye[jn+2],(wn=le===0?Bt:Pt)>=X&&wn<=de&&En(Le,Bt,Pt,nt),jn=Le.length-3,xe&&jn>=3&&(Le[jn]!==Le[0]||Le[jn+1]!==Le[1])&&En(Le,Le[0],Le[1],Le[2]),Le.length&&W.push(Le)}function Nt(ye){var W=[];return W.size=ye.size,W.start=ye.start,W.end=ye.end,W}function qt(ye,W,X,de,le,xe){for(var Ie=0;Ie<ye.length;Ie++)tt(ye[Ie],W,X,de,le,xe,!1)}function En(ye,W,X,de){ye.push(W),ye.push(X),ye.push(de)}function yn(ye,W,X,de,le,xe){var Ie=(xe-W)/(de-W);return ye.push(xe),ye.push(X+(le-X)*Ie),ye.push(1),Ie}function Et(ye,W,X,de,le,xe){var Ie=(xe-X)/(le-X);return ye.push(W+(de-W)*Ie),ye.push(xe),ye.push(1),Ie}function Pn(ye,W){for(var X=[],de=0;de<ye.length;de++){var le,xe=ye[de],Ie=xe.type;if(Ie==="Point"||Ie==="MultiPoint"||Ie==="LineString")le=_n(xe.geometry,W);else if(Ie==="MultiLineString"||Ie==="Polygon"){le=[];for(var Ce=0;Ce<xe.geometry.length;Ce++)le.push(_n(xe.geometry[Ce],W))}else if(Ie==="MultiPolygon")for(le=[],Ce=0;Ce<xe.geometry.length;Ce++){for(var Pe=[],Le=0;Le<xe.geometry[Ce].length;Le++)Pe.push(_n(xe.geometry[Ce][Le],W));le.push(Pe)}X.push(Ht(xe.id,Ie,le,xe.tags))}return X}function _n(ye,W){var X=[];X.size=ye.size,ye.start!==void 0&&(X.start=ye.start,X.end=ye.end);for(var de=0;de<ye.length;de+=3)X.push(ye[de]+W,ye[de+1],ye[de+2]);return X}function tn(ye,W){if(ye.transformed)return ye;var X,de,le,xe=1<<ye.z,Ie=ye.x,Ce=ye.y;for(X=0;X<ye.features.length;X++){var Pe=ye.features[X],Le=Pe.geometry,Xe=Pe.type;if(Pe.geometry=[],Xe===1)for(de=0;de<Le.length;de+=2)Pe.geometry.push(zt(Le[de],Le[de+1],W,xe,Ie,Ce));else for(de=0;de<Le.length;de++){var Ye=[];for(le=0;le<Le[de].length;le+=2)Ye.push(zt(Le[de][le],Le[de][le+1],W,xe,Ie,Ce));Pe.geometry.push(Ye)}}return ye.transformed=!0,ye}function zt(ye,W,X,de,le,xe){return[Math.round(X*(ye*de-le)),Math.round(X*(W*de-xe))]}function dt(ye,W,X,de,le){for(var xe=W===le.maxZoom?0:le.tolerance/((1<<W)*le.extent),Ie={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:X,y:de,z:W,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},Ce=0;Ce<ye.length;Ce++){Ie.numFeatures++,mt(Ie,ye[Ce],xe,le);var Pe=ye[Ce].minX,Le=ye[Ce].minY,Xe=ye[Ce].maxX,Ye=ye[Ce].maxY;Pe<Ie.minX&&(Ie.minX=Pe),Le<Ie.minY&&(Ie.minY=Le),Xe>Ie.maxX&&(Ie.maxX=Xe),Ye>Ie.maxY&&(Ie.maxY=Ye)}return Ie}function mt(ye,W,X,de){var le=W.geometry,xe=W.type,Ie=[];if(xe==="Point"||xe==="MultiPoint")for(var Ce=0;Ce<le.length;Ce+=3)Ie.push(le[Ce]),Ie.push(le[Ce+1]),ye.numPoints++,ye.numSimplified++;else if(xe==="LineString")$t(Ie,le,ye,X,!1,!1);else if(xe==="MultiLineString"||xe==="Polygon")for(Ce=0;Ce<le.length;Ce++)$t(Ie,le[Ce],ye,X,xe==="Polygon",Ce===0);else if(xe==="MultiPolygon")for(var Pe=0;Pe<le.length;Pe++){var Le=le[Pe];for(Ce=0;Ce<Le.length;Ce++)$t(Ie,Le[Ce],ye,X,!0,Ce===0)}if(Ie.length){var Xe=W.tags||null;if(xe==="LineString"&&de.lineMetrics){for(var Ye in Xe={},W.tags)Xe[Ye]=W.tags[Ye];Xe.mapbox_clip_start=le.start/le.size,Xe.mapbox_clip_end=le.end/le.size}var Ue={geometry:Ie,type:xe==="Polygon"||xe==="MultiPolygon"?3:xe==="LineString"||xe==="MultiLineString"?2:1,tags:Xe};W.id!==null&&(Ue.id=W.id),ye.features.push(Ue)}}function $t(ye,W,X,de,le,xe){var Ie=de*de;if(de>0&&W.size<(le?Ie:de))X.numPoints+=W.length/3;else{for(var Ce=[],Pe=0;Pe<W.length;Pe+=3)(de===0||W[Pe+2]>Ie)&&(X.numSimplified++,Ce.push(W[Pe]),Ce.push(W[Pe+1])),X.numPoints++;le&&function(Le,Xe){for(var Ye=0,Ue=0,Bt=Le.length,Pt=Bt-2;Ue<Bt;Pt=Ue,Ue+=2)Ye+=(Le[Ue]-Le[Pt])*(Le[Ue+1]+Le[Pt+1]);if(Ye>0===Xe)for(Ue=0,Bt=Le.length;Ue<Bt/2;Ue+=2){var nt=Le[Ue],Ft=Le[Ue+1];Le[Ue]=Le[Bt-2-Ue],Le[Ue+1]=Le[Bt-1-Ue],Le[Bt-2-Ue]=nt,Le[Bt-1-Ue]=Ft}}(Ce,xe),ye.push(Ce)}}function Wt(ye,W){var X=(W=this.options=function(le,xe){for(var Ie in xe)le[Ie]=xe[Ie];return le}(Object.create(this.options),W)).debug;if(X&&console.time("preprocess data"),W.maxZoom<0||W.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(W.promoteId&&W.generateId)throw new Error("promoteId and generateId cannot be used together.");var de=function(le,xe){var Ie=[];if(le.type==="FeatureCollection")for(var Ce=0;Ce<le.features.length;Ce++)Qe(Ie,le.features[Ce],xe,Ce);else Qe(Ie,le.type==="Feature"?le:{geometry:le},xe);return Ie}(ye,W);this.tiles={},this.tileCoords=[],X&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",W.indexMaxZoom,W.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),de=function(le,xe){var Ie=xe.buffer/xe.extent,Ce=le,Pe=Xt(le,1,-1-Ie,Ie,0,-1,2,xe),Le=Xt(le,1,1-Ie,2+Ie,0,-1,2,xe);return(Pe||Le)&&(Ce=Xt(le,1,-Ie,1+Ie,0,-1,2,xe)||[],Pe&&(Ce=Pn(Pe,1).concat(Ce)),Le&&(Ce=Ce.concat(Pn(Le,-1)))),Ce}(de,W),de.length&&this.splitTile(de,0,0,0),X&&(de.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 mn(ye,W,X){return 32*((1<<ye)*X+W)+ye}function An(ye,W){const X=ye.tileID.canonical;if(!this._geoJSONIndex)return W(null,null);const de=this._geoJSONIndex.getTile(X.z,X.x,X.y);if(!de)return W(null,null);const le=new $(de.features);let xe=j.exports(le);xe.byteOffset===0&&xe.byteLength===xe.buffer.byteLength||(xe=new Uint8Array(xe)),W(null,{vectorTile:le,rawData:xe.buffer})}Wt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Wt.prototype.splitTile=function(ye,W,X,de,le,xe,Ie){for(var Ce=[ye,W,X,de],Pe=this.options,Le=Pe.debug;Ce.length;){de=Ce.pop(),X=Ce.pop(),W=Ce.pop(),ye=Ce.pop();var Xe=1<<W,Ye=mn(W,X,de),Ue=this.tiles[Ye];if(!Ue&&(Le>1&&console.time("creation"),Ue=this.tiles[Ye]=dt(ye,W,X,de,Pe),this.tileCoords.push({z:W,x:X,y:de}),Le)){Le>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",W,X,de,Ue.numFeatures,Ue.numPoints,Ue.numSimplified),console.timeEnd("creation"));var Bt="z"+W;this.stats[Bt]=(this.stats[Bt]||0)+1,this.total++}if(Ue.source=ye,le){if(W===Pe.maxZoom||W===le)continue;var Pt=1<<le-W;if(X!==Math.floor(xe/Pt)||de!==Math.floor(Ie/Pt))continue}else if(W===Pe.indexMaxZoom||Ue.numPoints<=Pe.indexMaxPoints)continue;if(Ue.source=null,ye.length!==0){Le>1&&console.time("clipping");var nt,Ft,Gt,wn,dn,Cn,jn=.5*Pe.buffer/Pe.extent,or=.5-jn,Kr=.5+jn,dr=1+jn;nt=Ft=Gt=wn=null,dn=Xt(ye,Xe,X-jn,X+Kr,0,Ue.minX,Ue.maxX,Pe),Cn=Xt(ye,Xe,X+or,X+dr,0,Ue.minX,Ue.maxX,Pe),ye=null,dn&&(nt=Xt(dn,Xe,de-jn,de+Kr,1,Ue.minY,Ue.maxY,Pe),Ft=Xt(dn,Xe,de+or,de+dr,1,Ue.minY,Ue.maxY,Pe),dn=null),Cn&&(Gt=Xt(Cn,Xe,de-jn,de+Kr,1,Ue.minY,Ue.maxY,Pe),wn=Xt(Cn,Xe,de+or,de+dr,1,Ue.minY,Ue.maxY,Pe),Cn=null),Le>1&&console.timeEnd("clipping"),Ce.push(nt||[],W+1,2*X,2*de),Ce.push(Ft||[],W+1,2*X,2*de+1),Ce.push(Gt||[],W+1,2*X+1,2*de),Ce.push(wn||[],W+1,2*X+1,2*de+1)}}},Wt.prototype.getTile=function(ye,W,X){var de=this.options,le=de.extent,xe=de.debug;if(ye<0||ye>24)return null;var Ie=1<<ye,Ce=mn(ye,W=(W%Ie+Ie)%Ie,X);if(this.tiles[Ce])return tn(this.tiles[Ce],le);xe>1&&console.log("drilling down to z%d-%d-%d",ye,W,X);for(var Pe,Le=ye,Xe=W,Ye=X;!Pe&&Le>0;)Le--,Xe=Math.floor(Xe/2),Ye=Math.floor(Ye/2),Pe=this.tiles[mn(Le,Xe,Ye)];return Pe&&Pe.source?(xe>1&&console.log("found parent tile z%d-%d-%d",Le,Xe,Ye),xe>1&&console.time("drilling down"),this.splitTile(Pe.source,Le,Xe,Ye,ye,W,X),xe>1&&console.timeEnd("drilling down"),this.tiles[Ce]?tn(this.tiles[Ce],le):null):null};class Qn extends T{constructor(W,X,de,le){super(W,X,de,An),le&&(this.loadGeoJSON=le)}loadData(W,X){var de;(de=this._pendingRequest)===null||de===void 0||de.cancel(),this._pendingCallback&&this._pendingCallback(null,{abandoned:!0});const le=!!(W&&W.request&&W.request.collectResourceTiming)&&new o.RequestPerformance(W.request);this._pendingCallback=X,this._pendingRequest=this.loadGeoJSON(W,(xe,Ie)=>{if(delete this._pendingCallback,delete this._pendingRequest,xe||!Ie)return X(xe);if(typeof Ie!="object")return X(new Error(`Input data given to '${W.source}' is not a valid GeoJSON object.`));{P(Ie,!0);try{if(W.filter){const Pe=o.createExpression(W.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Pe.result==="error")throw new Error(Pe.value.map(Xe=>`${Xe.key}: ${Xe.message}`).join(", "));Ie={type:"FeatureCollection",features:Ie.features.filter(Xe=>Pe.value.evaluate({zoom:0},Xe))}}this._geoJSONIndex=W.cluster?new St(function({superclusterOptions:Pe,clusterProperties:Le}){if(!Le||!Pe)return Pe;const Xe={},Ye={},Ue={accumulated:null,zoom:0},Bt={properties:null},Pt=Object.keys(Le);for(const nt of Pt){const[Ft,Gt]=Le[nt],wn=o.createExpression(Gt),dn=o.createExpression(typeof Ft=="string"?[Ft,["accumulated"],["get",nt]]:Ft);Xe[nt]=wn.value,Ye[nt]=dn.value}return Pe.map=nt=>{Bt.properties=nt;const Ft={};for(const Gt of Pt)Ft[Gt]=Xe[Gt].evaluate(Ue,Bt);return Ft},Pe.reduce=(nt,Ft)=>{Bt.properties=Ft;for(const Gt of Pt)Ue.accumulated=nt[Gt],nt[Gt]=Ye[Gt].evaluate(Ue,Bt)},Pe}(W)).load(Ie.features):function(Pe,Le){return new Wt(Pe,Le)}(Ie,W.geojsonVtOptions)}catch(Pe){return X(Pe)}this.loaded={};const Ce={};if(le){const Pe=le.finish();Pe&&(Ce.resourceTiming={},Ce.resourceTiming[W.source]=JSON.parse(JSON.stringify(Pe)))}X(null,Ce)}})}reloadTile(W,X){const de=this.loaded;return de&&de[W.uid]?super.reloadTile(W,X):this.loadTile(W,X)}loadGeoJSON(W,X){if(W.request)return o.getJSON(W.request,X);if(typeof W.data=="string")try{X(null,JSON.parse(W.data))}catch{X(new Error(`Input data given to '${W.source}' is not a valid GeoJSON object.`))}else X(new Error(`Input data given to '${W.source}' is not a valid GeoJSON object.`));return{cancel:()=>{}}}removeSource(W,X){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),X()}getClusterExpansionZoom(W,X){try{X(null,this._geoJSONIndex.getClusterExpansionZoom(W.clusterId))}catch(de){X(de)}}getClusterChildren(W,X){try{X(null,this._geoJSONIndex.getChildren(W.clusterId))}catch(de){X(de)}}getClusterLeaves(W,X){try{X(null,this._geoJSONIndex.getLeaves(W.clusterId,W.limit,W.offset))}catch(de){X(de)}}}class Jn{constructor(W){this.self=W,this.actor=new o.Actor(W,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:T,geojson:Qn},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=(X,de)=>{if(this.workerSourceTypes[X])throw new Error(`Worker source with name "${X}" already registered.`);this.workerSourceTypes[X]=de},this.self.registerRTLTextPlugin=X=>{if(o.plugin.isParsed())throw new Error("RTL text plugin already registered.");o.plugin.applyArabicShaping=X.applyArabicShaping,o.plugin.processBidirectionalText=X.processBidirectionalText,o.plugin.processStyledBidirectionalText=X.processStyledBidirectionalText}}setReferrer(W,X){this.referrer=X}setImages(W,X,de){this.availableImages[W]=X;for(const le in this.workerSources[W]){const xe=this.workerSources[W][le];for(const Ie in xe)xe[Ie].availableImages=X}de()}setLayers(W,X,de){this.getLayerIndex(W).replace(X),de()}updateLayers(W,X,de){this.getLayerIndex(W).update(X.layers,X.removedIds),de()}loadTile(W,X,de){this.getWorkerSource(W,X.type,X.source).loadTile(X,de)}loadDEMTile(W,X,de){this.getDEMWorkerSource(W,X.source).loadTile(X,de)}reloadTile(W,X,de){this.getWorkerSource(W,X.type,X.source).reloadTile(X,de)}abortTile(W,X,de){this.getWorkerSource(W,X.type,X.source).abortTile(X,de)}removeTile(W,X,de){this.getWorkerSource(W,X.type,X.source).removeTile(X,de)}removeDEMTile(W,X){this.getDEMWorkerSource(W,X.source).removeTile(X)}removeSource(W,X,de){if(!this.workerSources[W]||!this.workerSources[W][X.type]||!this.workerSources[W][X.type][X.source])return;const le=this.workerSources[W][X.type][X.source];delete this.workerSources[W][X.type][X.source],le.removeSource!==void 0?le.removeSource(X,de):de()}loadWorkerSource(W,X,de){try{this.self.importScripts(X.url),de()}catch(le){de(le.toString())}}syncRTLPluginState(W,X,de){try{o.plugin.setState(X);const le=o.plugin.getPluginURL();if(o.plugin.isLoaded()&&!o.plugin.isParsed()&&le!=null){this.self.importScripts(le);const xe=o.plugin.isParsed();de(xe?void 0:new Error(`RTL Text Plugin failed to import scripts from ${le}`),xe)}}catch(le){de(le.toString())}}getAvailableImages(W){let X=this.availableImages[W];return X||(X=[]),X}getLayerIndex(W){let X=this.layerIndexes[W];return X||(X=this.layerIndexes[W]=new p),X}getWorkerSource(W,X,de){if(this.workerSources[W]||(this.workerSources[W]={}),this.workerSources[W][X]||(this.workerSources[W][X]={}),!this.workerSources[W][X][de]){const le={send:(xe,Ie,Ce)=>{this.actor.send(xe,Ie,Ce,W)}};this.workerSources[W][X][de]=new this.workerSourceTypes[X](le,this.getLayerIndex(W),this.getAvailableImages(W))}return this.workerSources[W][X][de]}getDEMWorkerSource(W,X){return this.demWorkerSources[W]||(this.demWorkerSources[W]={}),this.demWorkerSources[W][X]||(this.demWorkerSources[W][X]=new k),this.demWorkerSources[W][X]}enforceCacheSizeLimit(W,X){o.enforceCacheSizeLimit(X)}}return o.isWorker()&&(self.worker=new Jn(self)),Jn}),a(["./shared"],function(o){var c=f;function f(w){return!function(u){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 x,S,R=new Blob([""],{type:"text/javascript"}),F=URL.createObjectURL(R);try{S=new Worker(F),x=!0}catch{x=!1}return S&&S.terminate(),URL.revokeObjectURL(F),x}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var x=document.createElement("canvas");x.width=x.height=1;var S=x.getContext("2d");if(!S)return!1;var R=S.getImageData(0,0,1,1);return R&&R.width===x.width}()?(p[m=u&&u.failIfMajorPerformanceCaveat]===void 0&&(p[m]=function(x){var S,R=function(F){var V=document.createElement("canvas"),H=Object.create(f.webGLContextAttributes);return H.failIfMajorPerformanceCaveat=F,V.getContext("webgl",H)||V.getContext("experimental-webgl",H)}(x);if(!R)return!1;try{S=R.createShader(R.VERTEX_SHADER)}catch{return!1}return!(!S||R.isContextLost())&&(R.shaderSource(S,"void main() {}"),R.compileShader(S),R.getShaderParameter(S,R.COMPILE_STATUS)===!0)}(m)),p[m]?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 m}(w)}var p={};function g(w,u){if(Array.isArray(w)){if(!Array.isArray(u)||w.length!==u.length)return!1;for(let m=0;m<w.length;m++)if(!g(w[m],u[m]))return!1;return!0}if(typeof w=="object"&&w!==null&&u!==null){if(typeof u!="object"||Object.keys(w).length!==Object.keys(u).length)return!1;for(const m in w)if(!g(w[m],u[m]))return!1;return!0}return w===u}f.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};class v{static testProp(u){if(!v.docStyle)return u[0];for(let m=0;m<u.length;m++)if(u[m]in v.docStyle)return u[m];return u[0]}static create(u,m,x){const S=window.document.createElement(u);return m!==void 0&&(S.className=m),x&&x.appendChild(S),S}static createNS(u,m){return window.document.createElementNS(u,m)}static disableDrag(){v.docStyle&&v.selectProp&&(v.userSelect=v.docStyle[v.selectProp],v.docStyle[v.selectProp]="none")}static enableDrag(){v.docStyle&&v.selectProp&&(v.docStyle[v.selectProp]=v.userSelect)}static setTransform(u,m){u.style[v.transformProp]=m}static addEventListener(u,m,x,S={}){u.addEventListener(m,x,"passive"in S?S:S.capture)}static removeEventListener(u,m,x,S={}){u.removeEventListener(m,x,"passive"in S?S:S.capture)}static suppressClickInternal(u){u.preventDefault(),u.stopPropagation(),window.removeEventListener("click",v.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",v.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",v.suppressClickInternal,!0)},0)}static mousePos(u,m){const x=u.getBoundingClientRect();return new o.pointGeometry(m.clientX-x.left-u.clientLeft,m.clientY-x.top-u.clientTop)}static touchPos(u,m){const x=u.getBoundingClientRect(),S=[];for(let R=0;R<m.length;R++)S.push(new o.pointGeometry(m[R].clientX-x.left-u.clientLeft,m[R].clientY-x.top-u.clientTop));return S}static mouseButton(u){return u.button}static remove(u){u.parentNode&&u.parentNode.removeChild(u)}}v.docStyle=typeof window<"u"&&window.document&&window.document.documentElement.style,v.selectProp=v.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),v.transformProp=v.testProp(["transform","WebkitTransform"]);class b{constructor(u){this._transformRequestFn=u}transformRequest(u,m){return this._transformRequestFn&&this._transformRequestFn(u,m)||{url:u}}normalizeSpriteURL(u,m,x){const S=function(R){const F=R.match(_);if(!F)throw new Error(`Unable to parse URL "${R}"`);return{protocol:F[1],authority:F[2],path:F[3]||"/",params:F[4]?F[4].split("&"):[]}}(u);return S.path+=`${m}${x}`,function(R){const F=R.params.length?`?${R.params.join("&")}`:"";return`${R.protocol}://${R.authority}${R.path}${F}`}(S)}setTransformRequest(u){this._transformRequestFn=u}}const _=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;class T{constructor(u,m,x,S){this.context=u,this.format=x,this.texture=u.gl.createTexture(),this.update(m,S)}update(u,m,x){const{width:S,height:R}=u,F=!(this.size&&this.size[0]===S&&this.size[1]===R||x),{context:V}=this,{gl:H}=V;if(this.useMipmap=Boolean(m&&m.useMipmap),H.bindTexture(H.TEXTURE_2D,this.texture),V.pixelStoreUnpackFlipY.set(!1),V.pixelStoreUnpack.set(1),V.pixelStoreUnpackPremultiplyAlpha.set(this.format===H.RGBA&&(!m||m.premultiply!==!1)),F)this.size=[S,R],u instanceof HTMLImageElement||u instanceof HTMLCanvasElement||u instanceof HTMLVideoElement||u instanceof ImageData||o.isImageBitmap(u)?H.texImage2D(H.TEXTURE_2D,0,this.format,this.format,H.UNSIGNED_BYTE,u):H.texImage2D(H.TEXTURE_2D,0,this.format,S,R,0,this.format,H.UNSIGNED_BYTE,u.data);else{const{x:q,y:ee}=x||{x:0,y:0};u instanceof HTMLImageElement||u instanceof HTMLCanvasElement||u instanceof HTMLVideoElement||u instanceof ImageData||o.isImageBitmap(u)?H.texSubImage2D(H.TEXTURE_2D,0,q,ee,H.RGBA,H.UNSIGNED_BYTE,u):H.texSubImage2D(H.TEXTURE_2D,0,q,ee,S,R,H.RGBA,H.UNSIGNED_BYTE,u.data)}this.useMipmap&&this.isSizePowerOfTwo()&&H.generateMipmap(H.TEXTURE_2D)}bind(u,m,x){const{context:S}=this,{gl:R}=S;R.bindTexture(R.TEXTURE_2D,this.texture),x!==R.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(x=R.LINEAR),u!==this.filter&&(R.texParameteri(R.TEXTURE_2D,R.TEXTURE_MAG_FILTER,u),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_MIN_FILTER,x||u),this.filter=u),m!==this.wrap&&(R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_S,m),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_T,m),this.wrap=m)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:u}=this.context;u.deleteTexture(this.texture),this.texture=null}}function k(w){const{userImage:u}=w;return!!(u&&u.render&&u.render())&&(w.data.replace(new Uint8Array(u.data.buffer)),!0)}class P 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(u){if(this.loaded!==u&&(this.loaded=u,u)){for(const{ids:m,callback:x}of this.requestors)this._notify(m,x);this.requestors=[]}}getImage(u){return this.images[u]}addImage(u,m){if(this.images[u])throw new Error(`Image id ${u} already exist, use updateImage instead`);this._validate(u,m)&&(this.images[u]=m)}_validate(u,m){let x=!0;return this._validateStretch(m.stretchX,m.data&&m.data.width)||(this.fire(new o.ErrorEvent(new Error(`Image "${u}" has invalid "stretchX" value`))),x=!1),this._validateStretch(m.stretchY,m.data&&m.data.height)||(this.fire(new o.ErrorEvent(new Error(`Image "${u}" has invalid "stretchY" value`))),x=!1),this._validateContent(m.content,m)||(this.fire(new o.ErrorEvent(new Error(`Image "${u}" has invalid "content" value`))),x=!1),x}_validateStretch(u,m){if(!u)return!0;let x=0;for(const S of u){if(S[0]<x||S[1]<S[0]||m<S[1])return!1;x=S[1]}return!0}_validateContent(u,m){return!(u&&(u.length!==4||u[0]<0||m.data.width<u[0]||u[1]<0||m.data.height<u[1]||u[2]<0||m.data.width<u[2]||u[3]<0||m.data.height<u[3]||u[2]<u[0]||u[3]<u[1]))}updateImage(u,m){const x=this.images[u];if(x.data.width!==m.data.width||x.data.height!==m.data.height)throw new Error(`size mismatch between old image (${x.data.width}x${x.data.height}) and new image (${m.data.width}x${m.data.height}).`);m.version=x.version+1,this.images[u]=m,this.updatedImages[u]=!0}removeImage(u){const m=this.images[u];delete this.images[u],delete this.patterns[u],m.userImage&&m.userImage.onRemove&&m.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(u,m){let x=!0;if(!this.isLoaded())for(const S of u)this.images[S]||(x=!1);this.isLoaded()||x?this._notify(u,m):this.requestors.push({ids:u,callback:m})}_notify(u,m){const x={};for(const S of u){this.images[S]||this.fire(new o.Event("styleimagemissing",{id:S}));const R=this.images[S];R?x[S]={data:R.data.clone(),pixelRatio:R.pixelRatio,sdf:R.sdf,version:R.version,stretchX:R.stretchX,stretchY:R.stretchY,content:R.content,hasRenderCallback:Boolean(R.userImage&&R.userImage.render)}:o.warnOnce(`Image "${S}" 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.`)}m(null,x)}getPixelSize(){const{width:u,height:m}=this.atlasImage;return{width:u,height:m}}getPattern(u){const m=this.patterns[u],x=this.getImage(u);if(!x)return null;if(m&&m.position.version===x.version)return m.position;if(m)m.position.version=x.version;else{const S={w:x.data.width+2,h:x.data.height+2,x:0,y:0},R=new o.ImagePosition(S,x);this.patterns[u]={bin:S,position:R}}return this._updatePatternAtlas(),this.patterns[u].position}bind(u){const m=u.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new T(u,this.atlasImage,m.RGBA),this.atlasTexture.bind(m.LINEAR,m.CLAMP_TO_EDGE)}_updatePatternAtlas(){const u=[];for(const R in this.patterns)u.push(this.patterns[R].bin);const{w:m,h:x}=o.potpack(u),S=this.atlasImage;S.resize({width:m||1,height:x||1});for(const R in this.patterns){const{bin:F}=this.patterns[R],V=F.x+1,H=F.y+1,q=this.images[R].data,ee=q.width,se=q.height;o.RGBAImage.copy(q,S,{x:0,y:0},{x:V,y:H},{width:ee,height:se}),o.RGBAImage.copy(q,S,{x:0,y:se-1},{x:V,y:H-1},{width:ee,height:1}),o.RGBAImage.copy(q,S,{x:0,y:0},{x:V,y:H+se},{width:ee,height:1}),o.RGBAImage.copy(q,S,{x:ee-1,y:0},{x:V-1,y:H},{width:1,height:se}),o.RGBAImage.copy(q,S,{x:0,y:0},{x:V+ee,y:H},{width:1,height:se})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(u){for(const m of u){if(this.callbackDispatchedThisFrame[m])continue;this.callbackDispatchedThisFrame[m]=!0;const x=this.images[m];x||o.warnOnce(`Image with ID: "${m}" was not found`),k(x)&&this.updateImage(m,x)}}}const M=1e20;function O(w,u,m,x,S,R,F,V,H){for(let q=u;q<u+x;q++)N(w,m*R+q,R,S,F,V,H);for(let q=m;q<m+S;q++)N(w,q*R+u,1,x,F,V,H)}function N(w,u,m,x,S,R,F){R[0]=0,F[0]=-M,F[1]=M,S[0]=w[u];for(let V=1,H=0,q=0;V<x;V++){S[V]=w[u+V*m];const ee=V*V;do{const se=R[H];q=(S[V]-S[se]+ee-se*se)/(V-se)/2}while(q<=F[H]&&--H>-1);H++,R[H]=V,F[H]=q,F[H+1]=M}for(let V=0,H=0;V<x;V++){for(;F[H+1]<V;)H++;const q=R[H],ee=V-q;w[u+V*m]=S[q]+ee*ee}}class L{constructor(u,m){this.requestManager=u,this.localIdeographFontFamily=m,this.entries={}}setURL(u){this.url=u}getGlyphs(u,m){const x=[];for(const S in u)for(const R of u[S])x.push({stack:S,id:R});o.asyncAll(x,({stack:S,id:R},F)=>{let V=this.entries[S];V||(V=this.entries[S]={glyphs:{},requests:{},ranges:{}});let H=V.glyphs[R];if(H!==void 0)return void F(null,{stack:S,id:R,glyph:H});if(H=this._tinySDF(V,S,R),H)return V.glyphs[R]=H,void F(null,{stack:S,id:R,glyph:H});const q=Math.floor(R/256);if(256*q>65535)return void F(new Error("glyphs > 65535 not supported"));if(V.ranges[q])return void F(null,{stack:S,id:R,glyph:H});let ee=V.requests[q];ee||(ee=V.requests[q]=[],L.loadGlyphRange(S,q,this.url,this.requestManager,(se,he)=>{if(he){for(const ke in he)this._doesCharSupportLocalGlyph(+ke)||(V.glyphs[+ke]=he[+ke]);V.ranges[q]=!0}for(const ke of ee)ke(se,he);delete V.requests[q]})),ee.push((se,he)=>{se?F(se):he&&F(null,{stack:S,id:R,glyph:he[R]||null})})},(S,R)=>{if(S)m(S);else if(R){const F={};for(const{stack:V,id:H,glyph:q}of R)(F[V]||(F[V]={}))[H]=q&&{id:q.id,bitmap:q.bitmap.clone(),metrics:q.metrics};m(null,F)}})}_doesCharSupportLocalGlyph(u){return!!this.localIdeographFontFamily&&(o.unicodeBlockLookup["CJK Unified Ideographs"](u)||o.unicodeBlockLookup["Hangul Syllables"](u)||o.unicodeBlockLookup.Hiragana(u)||o.unicodeBlockLookup.Katakana(u))}_tinySDF(u,m,x){const S=this.localIdeographFontFamily;if(!S||!this._doesCharSupportLocalGlyph(x))return;let R=u.tinySDF;if(!R){let V="400";/bold/i.test(m)?V="900":/medium/i.test(m)?V="500":/light/i.test(m)&&(V="200"),R=u.tinySDF=new L.TinySDF({fontSize:24,buffer:3,radius:8,cutoff:.25,fontFamily:S,fontWeight:V})}const F=R.draw(String.fromCharCode(x));return{id:x,bitmap:new o.AlphaImage({width:F.width||30,height:F.height||30},F.data),metrics:{width:F.glyphWidth||24,height:F.glyphHeight||24,left:F.glyphLeft||0,top:F.glyphTop-27||-8,advance:F.glyphAdvance||24}}}}L.loadGlyphRange=function(w,u,m,x,S){const R=256*u,F=R+255,V=x.transformRequest(m.replace("{fontstack}",w).replace("{range}",`${R}-${F}`),o.ResourceType.Glyphs);o.getArrayBuffer(V,(H,q)=>{if(H)S(H);else if(q){const ee={};for(const se of o.parseGlyphPbf(q))ee[se.id]=se;S(null,ee)}})},L.TinySDF=class{constructor({fontSize:w=24,buffer:u=3,radius:m=8,cutoff:x=.25,fontFamily:S="sans-serif",fontWeight:R="normal",fontStyle:F="normal"}={}){this.buffer=u,this.cutoff=x,this.radius=m;const V=this.size=w+4*u,H=this._createCanvas(V),q=this.ctx=H.getContext("2d",{willReadFrequently:!0});q.font=`${F} ${R} ${w}px ${S}`,q.textBaseline="alphabetic",q.textAlign="left",q.fillStyle="black",this.gridOuter=new Float64Array(V*V),this.gridInner=new Float64Array(V*V),this.f=new Float64Array(V),this.z=new Float64Array(V+1),this.v=new Uint16Array(V)}_createCanvas(w){const u=document.createElement("canvas");return u.width=u.height=w,u}draw(w){const{width:u,actualBoundingBoxAscent:m,actualBoundingBoxDescent:x,actualBoundingBoxLeft:S,actualBoundingBoxRight:R}=this.ctx.measureText(w),F=Math.ceil(m),V=Math.min(this.size-this.buffer,Math.ceil(R-S)),H=Math.min(this.size-this.buffer,F+Math.ceil(x)),q=V+2*this.buffer,ee=H+2*this.buffer,se=Math.max(q*ee,0),he=new Uint8ClampedArray(se),ke={data:he,width:q,height:ee,glyphWidth:V,glyphHeight:H,glyphTop:F,glyphLeft:0,glyphAdvance:u};if(V===0||H===0)return ke;const{ctx:_e,buffer:Se,gridInner:Ve,gridOuter:Ge}=this;_e.clearRect(Se,Se,V,H),_e.fillText(w,Se,Se+F);const rt=_e.getImageData(Se,Se,V,H);Ge.fill(M,0,se),Ve.fill(0,0,se);for(let De=0;De<H;De++)for(let ft=0;ft<V;ft++){const st=rt.data[4*(De*V+ft)+3]/255;if(st===0)continue;const wt=(De+Se)*q+ft+Se;if(st===1)Ge[wt]=0,Ve[wt]=M;else{const Ct=.5-st;Ge[wt]=Ct>0?Ct*Ct:0,Ve[wt]=Ct<0?Ct*Ct:0}}O(Ge,0,0,q,ee,q,this.f,this.v,this.z),O(Ve,Se,Se,V,H,q,this.f,this.v,this.z);for(let De=0;De<se;De++){const ft=Math.sqrt(Ge[De])-Math.sqrt(Ve[De]);he[De]=Math.round(255-255*(ft/this.radius+this.cutoff))}return ke}};const $=new o.Properties({anchor:new o.DataConstantProperty(o.spec.light.anchor),position:new class{constructor(){this.specification=o.spec.light.position}possiblyEvaluate(w,u){return o.sphericalToCartesian(w.expression.evaluate(u))}interpolate(w,u,m){return{x:o.number(w.x,u.x,m),y:o.number(w.y,u.y,m),z:o.number(w.z,u.z,m)}}},color:new o.DataConstantProperty(o.spec.light.color),intensity:new o.DataConstantProperty(o.spec.light.intensity)}),j="-transition";class U extends o.Evented{constructor(u){super(),this._transitionable=new o.Transitionable($),this.setLight(u),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(u,m={}){if(!this._validate(o.validateLight,u,m))for(const x in u){const S=u[x];x.endsWith(j)?this._transitionable.setTransition(x.slice(0,-j.length),S):this._transitionable.setValue(x,S)}}updateTransitions(u){this._transitioning=this._transitionable.transitioned(u,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(u){this.properties=this._transitioning.possiblyEvaluate(u)}_validate(u,m,x){return(!x||x.validate!==!1)&&o.emitValidationErrors(this,u.call(o.validateStyle,o.extend({value:m,style:{glyphs:!0,sprite:!0},styleSpec:o.spec})))}}class G{constructor(u,m){this.width=u,this.height=m,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(u,m){const x=u.join(",")+String(m);return this.dashEntry[x]||(this.dashEntry[x]=this.addDash(u,m)),this.dashEntry[x]}getDashRanges(u,m,x){const S=[];let R=u.length%2==1?-u[u.length-1]*x:0,F=u[0]*x,V=!0;S.push({left:R,right:F,isDash:V,zeroLength:u[0]===0});let H=u[0];for(let q=1;q<u.length;q++){V=!V;const ee=u[q];R=H*x,H+=ee,F=H*x,S.push({left:R,right:F,isDash:V,zeroLength:ee===0})}return S}addRoundDash(u,m,x){const S=m/2;for(let R=-x;R<=x;R++){const F=this.width*(this.nextRow+x+R);let V=0,H=u[V];for(let q=0;q<this.width;q++){q/H.right>1&&(H=u[++V]);const ee=Math.abs(q-H.left),se=Math.abs(q-H.right),he=Math.min(ee,se);let ke;const _e=R/x*(S+1);if(H.isDash){const Se=S-Math.abs(_e);ke=Math.sqrt(he*he+Se*Se)}else ke=S-Math.sqrt(he*he+_e*_e);this.data[F+q]=Math.max(0,Math.min(255,ke+128))}}}addRegularDash(u){for(let V=u.length-1;V>=0;--V){const H=u[V],q=u[V+1];H.zeroLength?u.splice(V,1):q&&q.isDash===H.isDash&&(q.left=H.left,u.splice(V,1))}const m=u[0],x=u[u.length-1];m.isDash===x.isDash&&(m.left=x.left-this.width,x.right=m.right+this.width);const S=this.width*this.nextRow;let R=0,F=u[R];for(let V=0;V<this.width;V++){V/F.right>1&&(F=u[++R]);const H=Math.abs(V-F.left),q=Math.abs(V-F.right),ee=Math.min(H,q);this.data[S+V]=Math.max(0,Math.min(255,(F.isDash?ee:-ee)+128))}}addDash(u,m){const x=m?7:0,S=2*x+1;if(this.nextRow+S>this.height)return o.warnOnce("LineAtlas out of space"),null;let R=0;for(let V=0;V<u.length;V++)R+=u[V];if(R!==0){const V=this.width/R,H=this.getDashRanges(u,this.width,V);m?this.addRoundDash(H,V,x):this.addRegularDash(H)}const F={y:(this.nextRow+x+.5)/this.height,height:2*x/this.height,width:R};return this.nextRow+=S,this.dirty=!0,F}bind(u){const m=u.gl;this.texture?(m.bindTexture(m.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,m.texSubImage2D(m.TEXTURE_2D,0,0,0,this.width,this.height,m.ALPHA,m.UNSIGNED_BYTE,this.data))):(this.texture=m.createTexture(),m.bindTexture(m.TEXTURE_2D,this.texture),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S,m.REPEAT),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,m.REPEAT),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.LINEAR),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.LINEAR),m.texImage2D(m.TEXTURE_2D,0,m.ALPHA,this.width,this.height,0,m.ALPHA,m.UNSIGNED_BYTE,this.data))}}class Z{constructor(u,m){this.workerPool=u,this.actors=[],this.currentActor=0,this.id=o.uniqueId();const x=this.workerPool.acquire(this.id);for(let S=0;S<x.length;S++){const R=new Z.Actor(x[S],m,this.id);R.name=`Worker ${S}`,this.actors.push(R)}if(!this.actors.length)throw new Error("No actors found")}broadcast(u,m,x){o.asyncAll(this.actors,(S,R)=>{S.send(u,m,R)},x=x||function(){})}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(){this.actors.forEach(u=>{u.remove()}),this.actors=[],this.workerPool.release(this.id)}}function Q(w,u,m){const x=function(S,R){if(S)return m(S);if(R){const F=o.pick(o.extend(R,w),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);R.vector_layers&&(F.vectorLayers=R.vector_layers,F.vectorLayerIds=F.vectorLayers.map(V=>V.id)),m(null,F)}};return w.url?o.getJSON(u.transformRequest(w.url,o.ResourceType.Source),x):o.exported.frame(()=>x(null,w))}Z.Actor=o.Actor;class J{constructor(u,m,x){this.bounds=o.LngLatBounds.convert(this.validateBounds(u)),this.minzoom=m||0,this.maxzoom=x||24}validateBounds(u){return Array.isArray(u)&&u.length===4?[Math.max(-180,u[0]),Math.max(-90,u[1]),Math.min(180,u[2]),Math.min(90,u[3])]:[-180,-90,180,90]}contains(u){const m=Math.pow(2,u.z),x=Math.floor(o.mercatorXfromLng(this.bounds.getWest())*m),S=Math.floor(o.mercatorYfromLat(this.bounds.getNorth())*m),R=Math.ceil(o.mercatorXfromLng(this.bounds.getEast())*m),F=Math.ceil(o.mercatorYfromLat(this.bounds.getSouth())*m);return u.x>=x&&u.x<R&&u.y>=S&&u.y<F}}class re extends o.Evented{constructor(u,m,x,S){if(super(),this.id=u,this.dispatcher=x,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(m,["url","scheme","tileSize","promoteId"])),this._options=o.extend({type:"vector"},m),this._collectResourceTiming=m.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(S)}load(){this._loaded=!1,this.fire(new o.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=Q(this._options,this.map._requestManager,(u,m)=>{this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),u?this.fire(new o.ErrorEvent(u)):m&&(o.extend(this,m),m.bounds&&(this.tileBounds=new J(m.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(u){return!this.tileBounds||this.tileBounds.contains(u.canonical)}onAdd(u){this.map=u,this.load()}setSourceProperty(u){this._tileJSONRequest&&this._tileJSONRequest.cancel(),u(),this.load()}setTiles(u){return this.setSourceProperty(()=>{this._options.tiles=u}),this}setUrl(u){return this.setSourceProperty(()=>{this.url=u,this._options.url=u}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}serialize(){return o.extend({},this._options)}loadTile(u,m){const x=u.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),S={request:this.map._requestManager.transformRequest(x,o.ResourceType.Tile),uid:u.uid,tileID:u.tileID,zoom:u.tileID.overscaledZ,tileSize:this.tileSize*u.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function R(F,V){return delete u.request,u.aborted?m(null):F&&F.status!==404?m(F):(V&&V.resourceTiming&&(u.resourceTiming=V.resourceTiming),this.map._refreshExpiredTiles&&V&&u.setExpiryData(V),u.loadVectorData(V,this.map.painter),o.cacheEntryPossiblyAdded(this.dispatcher),m(null),void(u.reloadCallback&&(this.loadTile(u,u.reloadCallback),u.reloadCallback=null)))}S.request.collectResourceTiming=this._collectResourceTiming,u.actor&&u.state!=="expired"?u.state==="loading"?u.reloadCallback=m:u.request=u.actor.send("reloadTile",S,R.bind(this)):(u.actor=this.dispatcher.getActor(),u.request=u.actor.send("loadTile",S,R.bind(this)))}abortTile(u){u.request&&(u.request.cancel(),delete u.request),u.actor&&u.actor.send("abortTile",{uid:u.uid,type:this.type,source:this.id},void 0)}unloadTile(u){u.unloadVectorData(),u.actor&&u.actor.send("removeTile",{uid:u.uid,type:this.type,source:this.id},void 0)}hasTransition(){return!1}}class ne extends o.Evented{constructor(u,m,x,S){super(),this.id=u,this.dispatcher=x,this.setEventedParent(S),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"},m),o.extend(this,o.pick(m,["url","scheme","tileSize"]))}load(){this._loaded=!1,this.fire(new o.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=Q(this._options,this.map._requestManager,(u,m)=>{this._tileJSONRequest=null,this._loaded=!0,u?this.fire(new o.ErrorEvent(u)):m&&(o.extend(this,m),m.bounds&&(this.tileBounds=new J(m.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(u){this.map=u,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}serialize(){return o.extend({},this._options)}hasTile(u){return!this.tileBounds||this.tileBounds.contains(u.canonical)}loadTile(u,m){const x=u.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);u.request=o.getImage(this.map._requestManager.transformRequest(x,o.ResourceType.Tile),(S,R,F)=>{if(delete u.request,u.aborted)u.state="unloaded",m(null);else if(S)u.state="errored",m(S);else if(R){this.map._refreshExpiredTiles&&u.setExpiryData(F);const V=this.map.painter.context,H=V.gl;u.texture=this.map.painter.getTileTexture(R.width),u.texture?u.texture.update(R,{useMipmap:!0}):(u.texture=new T(V,R,H.RGBA,{useMipmap:!0}),u.texture.bind(H.LINEAR,H.CLAMP_TO_EDGE,H.LINEAR_MIPMAP_NEAREST),V.extTextureFilterAnisotropic&&H.texParameterf(H.TEXTURE_2D,V.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,V.extTextureFilterAnisotropicMax)),u.state="loaded",o.cacheEntryPossiblyAdded(this.dispatcher),m(null)}})}abortTile(u,m){u.request&&(u.request.cancel(),delete u.request),m()}unloadTile(u,m){u.texture&&this.map.painter.saveTileTexture(u.texture),m()}hasTransition(){return!1}}let ge;class ie extends ne{constructor(u,m,x,S){super(u,m,x,S),this.type="raster-dem",this.maxzoom=22,this._options=o.extend({type:"raster-dem"},m),this.encoding=m.encoding||"mapbox"}serialize(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}}loadTile(u,m){const x=u.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);function S(R,F){R&&(u.state="errored",m(R)),F&&(u.dem=F,u.needsHillshadePrepare=!0,u.needsTerrainPrepare=!0,u.state="loaded",m(null))}u.request=o.getImage(this.map._requestManager.transformRequest(x,o.ResourceType.Tile),function(R,F){if(delete u.request,u.aborted)u.state="unloaded",m(null);else if(R)u.state="errored",m(R);else if(F){this.map._refreshExpiredTiles&&u.setExpiryData(F),delete F.cacheControl,delete F.expires;const V=o.isImageBitmap(F)&&(ge==null&&(ge=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),ge)?F:o.exported.getImageData(F,1),H={uid:u.uid,coord:u.tileID,source:this.id,rawImageData:V,encoding:this.encoding};u.actor&&u.state!=="expired"||(u.actor=this.dispatcher.getActor(),u.actor.send("loadDEMTile",H,S.bind(this)))}}.bind(this)),u.neighboringTiles=this._getNeighboringTiles(u.tileID)}_getNeighboringTiles(u){const m=u.canonical,x=Math.pow(2,m.z),S=(m.x-1+x)%x,R=m.x===0?u.wrap-1:u.wrap,F=(m.x+1+x)%x,V=m.x+1===x?u.wrap+1:u.wrap,H={};return H[new o.OverscaledTileID(u.overscaledZ,R,m.z,S,m.y).key]={backfilled:!1},H[new o.OverscaledTileID(u.overscaledZ,V,m.z,F,m.y).key]={backfilled:!1},m.y>0&&(H[new o.OverscaledTileID(u.overscaledZ,R,m.z,S,m.y-1).key]={backfilled:!1},H[new o.OverscaledTileID(u.overscaledZ,u.wrap,m.z,m.x,m.y-1).key]={backfilled:!1},H[new o.OverscaledTileID(u.overscaledZ,V,m.z,F,m.y-1).key]={backfilled:!1}),m.y+1<x&&(H[new o.OverscaledTileID(u.overscaledZ,R,m.z,S,m.y+1).key]={backfilled:!1},H[new o.OverscaledTileID(u.overscaledZ,u.wrap,m.z,m.x,m.y+1).key]={backfilled:!1},H[new o.OverscaledTileID(u.overscaledZ,V,m.z,F,m.y+1).key]={backfilled:!1}),H}unloadTile(u){u.demTexture&&this.map.painter.saveTileTexture(u.demTexture),u.fbo&&(u.fbo.destroy(),delete u.fbo),u.dem&&delete u.dem,delete u.neighboringTiles,u.state="unloaded",u.actor&&u.actor.send("removeDEMTile",{uid:u.uid,source:this.id})}}class ue extends o.Evented{constructor(u,m,x,S){super(),this.id=u,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=x.getActor(),this.setEventedParent(S),this._data=m.data,this._options=o.extend({},m),this._collectResourceTiming=m.collectResourceTiming,m.maxzoom!==void 0&&(this.maxzoom=m.maxzoom),m.type&&(this.type=m.type),m.attribution&&(this.attribution=m.attribution),this.promoteId=m.promoteId;const R=o.EXTENT/this.tileSize;this.workerOptions=o.extend({source:this.id,cluster:m.cluster||!1,geojsonVtOptions:{buffer:(m.buffer!==void 0?m.buffer:128)*R,tolerance:(m.tolerance!==void 0?m.tolerance:.375)*R,extent:o.EXTENT,maxZoom:this.maxzoom,lineMetrics:m.lineMetrics||!1,generateId:m.generateId||!1},superclusterOptions:{maxZoom:m.clusterMaxZoom!==void 0?m.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,m.clusterMinPoints||2),extent:o.EXTENT,radius:(m.clusterRadius||50)*R,log:!1,generateId:m.generateId||!1},clusterProperties:m.clusterProperties,filter:m.filter},m.workerOptions)}load(){this._updateWorkerData("metadata")}onAdd(u){this.map=u,this.load()}setData(u){return this._data=u,this._updateWorkerData("content"),this}getClusterExpansionZoom(u,m){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:u,source:this.id},m),this}getClusterChildren(u,m){return this.actor.send("geojson.getClusterChildren",{clusterId:u,source:this.id},m),this}getClusterLeaves(u,m,x,S){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:u,limit:m,offset:x},S),this}_updateWorkerData(u){const m=o.extend({},this.workerOptions),x=this._data;typeof x=="string"?(m.request=this.map._requestManager.transformRequest(o.exported.resolveURL(x),o.ResourceType.Source),m.request.collectResourceTiming=this._collectResourceTiming):m.data=JSON.stringify(x),this._pendingLoads++,this.fire(new o.Event("dataloading",{dataType:"source"})),this.actor.send(`${this.type}.loadData`,m,(S,R)=>{if(this._pendingLoads--,this._removed||R&&R.abandoned)return void this.fire(new o.Event("dataabort",{dataType:"source",sourceDataType:u}));let F=null;if(R&&R.resourceTiming&&R.resourceTiming[this.id]&&(F=R.resourceTiming[this.id].slice(0)),S)return void this.fire(new o.ErrorEvent(S));const V={dataType:"source",sourceDataType:u};this._collectResourceTiming&&F&&F.length>0&&o.extend(V,{resourceTiming:F}),this.fire(new o.Event("data",V))})}loaded(){return this._pendingLoads===0}loadTile(u,m){const x=u.actor?"reloadTile":"loadTile";u.actor=this.actor;const S={type:this.type,uid:u.uid,tileID:u.tileID,zoom:u.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};u.request=this.actor.send(x,S,(R,F)=>(delete u.request,u.unloadVectorData(),u.aborted?m(null):R?m(R):(u.loadVectorData(F,this.map.painter,x==="reloadTile"),m(null))))}abortTile(u){u.request&&(u.request.cancel(),delete u.request),u.aborted=!0}unloadTile(u){u.unloadVectorData(),this.actor.send("removeTile",{uid:u.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 me extends o.Evented{constructor(u,m,x,S){super(),this.id=u,this.dispatcher=x,this.coordinates=m.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(S),this.options=m}load(u,m){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),(x,S)=>{this._loaded=!0,x?this.fire(new o.ErrorEvent(x)):S&&(this.image=S,u&&(this.coordinates=u),m&&m(),this._finishLoading())})}loaded(){return this._loaded}updateImage(u){return this.image&&u.url?(this.options.url=u.url,this.load(u.coordinates,()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new o.Event("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(u){this.map=u,this.load()}setCoordinates(u){this.coordinates=u;const m=u.map(o.MercatorCoordinate.fromLngLat);this.tileID=function(S){let R=1/0,F=1/0,V=-1/0,H=-1/0;for(const he of S)R=Math.min(R,he.x),F=Math.min(F,he.y),V=Math.max(V,he.x),H=Math.max(H,he.y);const q=Math.max(V-R,H-F),ee=Math.max(0,Math.floor(-Math.log(q)/Math.LN2)),se=Math.pow(2,ee);return new o.CanonicalTileID(ee,Math.floor((R+V)/2*se),Math.floor((F+H)/2*se))}(m),this.minzoom=this.maxzoom=this.tileID.z;const x=m.map(S=>this.tileID.getTilePoint(S)._round());return this._boundsArray=new o.RasterBoundsArray,this._boundsArray.emplaceBack(x[0].x,x[0].y,0,0),this._boundsArray.emplaceBack(x[1].x,x[1].y,o.EXTENT,0),this._boundsArray.emplaceBack(x[3].x,x[3].y,0,o.EXTENT),this._boundsArray.emplaceBack(x[2].x,x[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 u=this.map.painter.context,m=u.gl;this.boundsBuffer||(this.boundsBuffer=u.createVertexBuffer(this._boundsArray,oe.members)),this.boundsSegments||(this.boundsSegments=o.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new T(u,this.image,m.RGBA),this.texture.bind(m.LINEAR,m.CLAMP_TO_EDGE));for(const x in this.tiles){const S=this.tiles[x];S.state!=="loaded"&&(S.state="loaded",S.texture=this.texture)}}loadTile(u,m){this.tileID&&this.tileID.equals(u.tileID.canonical)?(this.tiles[String(u.tileID.wrap)]=u,u.buckets={},m(null)):(u.state="errored",m(null))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class Te extends me{constructor(u,m,x,S){super(u,m,x,S),this.roundZoom=!0,this.type="video",this.options=m}load(){this._loaded=!1;const u=this.options;this.urls=[];for(const m of u.urls)this.urls.push(this.map._requestManager.transformRequest(m,o.ResourceType.Source).url);o.getVideo(this.urls,(m,x)=>{this._loaded=!0,m?this.fire(new o.ErrorEvent(m)):x&&(this.video=x,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(u){if(this.video){const m=this.video.seekable;u<m.start(0)||u>m.end(0)?this.fire(new o.ErrorEvent(new o.ValidationError(`sources.${this.id}`,null,`Playback for this video can be set only between the ${m.start(0)} and ${m.end(0)}-second mark.`))):this.video.currentTime=u}}getVideo(){return this.video}onAdd(u){this.map||(this.map=u,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 u=this.map.painter.context,m=u.gl;this.boundsBuffer||(this.boundsBuffer=u.createVertexBuffer(this._boundsArray,oe.members)),this.boundsSegments||(this.boundsSegments=o.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(m.LINEAR,m.CLAMP_TO_EDGE),m.texSubImage2D(m.TEXTURE_2D,0,0,0,m.RGBA,m.UNSIGNED_BYTE,this.video)):(this.texture=new T(u,this.video,m.RGBA),this.texture.bind(m.LINEAR,m.CLAMP_TO_EDGE));for(const x in this.tiles){const S=this.tiles[x];S.state!=="loaded"&&(S.state="loaded",S.texture=this.texture)}}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class we extends me{constructor(u,m,x,S){super(u,m,x,S),m.coordinates?Array.isArray(m.coordinates)&&m.coordinates.length===4&&!m.coordinates.some(R=>!Array.isArray(R)||R.length!==2||R.some(F=>typeof F!="number"))||this.fire(new o.ErrorEvent(new o.ValidationError(`sources.${u}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new o.ErrorEvent(new o.ValidationError(`sources.${u}`,null,'missing required property "coordinates"'))),m.animate&&typeof m.animate!="boolean"&&this.fire(new o.ErrorEvent(new o.ValidationError(`sources.${u}`,null,'optional "animate" property must be a boolean value'))),m.canvas?typeof m.canvas=="string"||m.canvas instanceof HTMLCanvasElement||this.fire(new o.ErrorEvent(new o.ValidationError(`sources.${u}`,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.${u}`,null,'missing required property "canvas"'))),this.options=m,this.animate=m.animate===void 0||m.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(u){this.map=u,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let u=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,u=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,u=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const m=this.map.painter.context,x=m.gl;this.boundsBuffer||(this.boundsBuffer=m.createVertexBuffer(this._boundsArray,oe.members)),this.boundsSegments||(this.boundsSegments=o.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(u||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new T(m,this.canvas,x.RGBA,{premultiply:!0});for(const S in this.tiles){const R=this.tiles[S];R.state!=="loaded"&&(R.state="loaded",R.texture=this.texture)}}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const u of[this.canvas.width,this.canvas.height])if(isNaN(u)||u<=0)return!0;return!1}}const be={vector:re,raster:ne,"raster-dem":ie,geojson:ue,video:Te,image:me,canvas:we};function Re(w,u){const m=o.create();return o.translate(m,m,[1,1,0]),o.scale(m,m,[.5*w.width,.5*w.height,1]),o.multiply(m,m,w.calculatePosMatrix(u.toUnwrapped()))}function Ee(w,u,m,x,S,R){const F=function(se,he,ke){if(se)for(const _e of se){const Se=he[_e];if(Se&&Se.source===ke&&Se.type==="fill-extrusion")return!0}else for(const _e in he){const Se=he[_e];if(Se.source===ke&&Se.type==="fill-extrusion")return!0}return!1}(S&&S.layers,u,w.id),V=R.maxPitchScaleFactor(),H=w.tilesIn(x,V,F);H.sort(Me);const q=[];for(const se of H)q.push({wrappedTileID:se.tileID.wrapped().key,queryResults:se.tile.queryRenderedFeatures(u,m,w._state,se.queryGeometry,se.cameraQueryGeometry,se.scale,S,R,V,Re(w.transform,se.tileID))});const ee=function(se){const he={},ke={};for(const _e of se){const Se=_e.queryResults,Ve=_e.wrappedTileID,Ge=ke[Ve]=ke[Ve]||{};for(const rt in Se){const De=Se[rt],ft=Ge[rt]=Ge[rt]||{},st=he[rt]=he[rt]||[];for(const wt of De)ft[wt.featureIndex]||(ft[wt.featureIndex]=!0,st.push(wt))}}return he}(q);for(const se in ee)ee[se].forEach(he=>{const ke=he.feature,_e=w.getFeatureState(ke.layer["source-layer"],ke.id);ke.source=ke.layer.source,ke.layer["source-layer"]&&(ke.sourceLayer=ke.layer["source-layer"]),ke.state=_e});return ee}function Me(w,u){const m=w.tileID,x=u.tileID;return m.overscaledZ-x.overscaledZ||m.canonical.y-x.canonical.y||m.wrap-x.wrap||m.canonical.x-x.canonical.x}class Ae{constructor(u,m){this.tileID=u,this.uid=o.uniqueId(),this.uses=0,this.tileSize=m,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(u){const m=u+this.timeAdded;m<o.exported.now()||this.fadeEndTime&&m<this.fadeEndTime||(this.fadeEndTime=m)}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(u){this.demTexture&&u.saveTileTexture(this.demTexture),this.textures.forEach(m=>u.saveTileTexture(m)),this.demTexture=null,this.textures=[],this.textureCoords={}}loadVectorData(u,m,x){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",u){u.featureIndex&&(this.latestFeatureIndex=u.featureIndex,u.rawTileData?(this.latestRawTileData=u.rawTileData,this.latestFeatureIndex.rawTileData=u.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=u.collisionBoxArray,this.buckets=function(S,R){const F={};if(!R)return F;for(const V of S){const H=V.layerIds.map(q=>R.getLayer(q)).filter(Boolean);if(H.length!==0){V.layers=H,V.stateDependentLayerIds&&(V.stateDependentLayers=V.stateDependentLayerIds.map(q=>H.filter(ee=>ee.id===q)[0]));for(const q of H)F[q.id]=V}}return F}(u.buckets,m.style),this.hasSymbolBuckets=!1;for(const S in this.buckets){const R=this.buckets[S];if(R instanceof o.SymbolBucket){if(this.hasSymbolBuckets=!0,!x)break;R.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const S in this.buckets){const R=this.buckets[S];if(R instanceof o.SymbolBucket&&R.hasRTLText){this.hasRTLText=!0,o.lazyLoadRTLTextPlugin();break}}this.queryPadding=0;for(const S in this.buckets){const R=this.buckets[S];this.queryPadding=Math.max(this.queryPadding,m.style.getLayer(S).queryRadius(R))}u.imageAtlas&&(this.imageAtlas=u.imageAtlas),u.glyphAtlasImage&&(this.glyphAtlasImage=u.glyphAtlasImage)}else this.collisionBoxArray=new o.CollisionBoxArray}unloadVectorData(){for(const u in this.buckets)this.buckets[u].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(u){return this.buckets[u.id]}upload(u){for(const x in this.buckets){const S=this.buckets[x];S.uploadPending()&&S.upload(u)}const m=u.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new T(u,this.imageAtlas.image,m.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new T(u,this.glyphAtlasImage,m.ALPHA),this.glyphAtlasImage=null)}prepare(u){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(u,this.imageAtlasTexture)}queryRenderedFeatures(u,m,x,S,R,F,V,H,q,ee){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:S,cameraQueryGeometry:R,scale:F,tileSize:this.tileSize,pixelPosMatrix:ee,transform:H,params:V,queryPadding:this.queryPadding*q},u,m,x):{}}querySourceFeatures(u,m){const x=this.latestFeatureIndex;if(!x||!x.rawTileData)return;const S=x.loadVTLayers(),R=m?m.sourceLayer:"",F=S._geojsonTileLayer||S[R];if(!F)return;const V=o.createFilter(m&&m.filter),{z:H,x:q,y:ee}=this.tileID.canonical,se={z:H,x:q,y:ee};for(let he=0;he<F.length;he++){const ke=F.feature(he);if(V.needGeometry){const Ve=o.toEvaluationFeature(ke,!0);if(!V.filter(new o.EvaluationParameters(this.tileID.overscaledZ),Ve,this.tileID.canonical))continue}else if(!V.filter(new o.EvaluationParameters(this.tileID.overscaledZ),ke))continue;const _e=x.getId(ke,R),Se=new o.GeoJSONFeature(ke,H,q,ee,_e);Se.tile=se,u.push(Se)}}hasData(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(u){const m=this.expirationTime;if(u.cacheControl){const x=o.parseCacheControl(u.cacheControl);x["max-age"]&&(this.expirationTime=Date.now()+1e3*x["max-age"])}else u.expires&&(this.expirationTime=new Date(u.expires).getTime());if(this.expirationTime){const x=Date.now();let S=!1;if(this.expirationTime>x)S=!1;else if(m)if(this.expirationTime<m)S=!0;else{const R=this.expirationTime-m;R?this.expirationTime=x+Math.max(R,3e4):S=!0}else S=!0;S?(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(u,m){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(u).length===0)return;const x=this.latestFeatureIndex.loadVTLayers();for(const S in this.buckets){if(!m.style.hasLayer(S))continue;const R=this.buckets[S],F=R.layers[0].sourceLayer||"_geojsonTileLayer",V=x[F],H=u[F];if(!V||!H||Object.keys(H).length===0)continue;R.update(H,V,this.imageAtlas&&this.imageAtlas.patternPositions||{});const q=m&&m.style&&m.style.getLayer(S);q&&(this.queryPadding=Math.max(this.queryPadding,q.queryRadius(R)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<o.exported.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(u){this.symbolFadeHoldUntil=o.exported.now()+u}setDependencies(u,m){const x={};for(const S of m)x[S]=!0;this.dependencies[u]=x}hasDependency(u,m){for(const x of u){const S=this.dependencies[x];if(S){for(const R of m)if(S[R])return!0}}return!1}}class Fe{constructor(u,m){this.max=u,this.onRemove=m,this.reset()}reset(){for(const u in this.data)for(const m of this.data[u])m.timeout&&clearTimeout(m.timeout),this.onRemove(m.value);return this.data={},this.order=[],this}add(u,m,x){const S=u.wrapped().key;this.data[S]===void 0&&(this.data[S]=[]);const R={value:m,timeout:void 0};if(x!==void 0&&(R.timeout=setTimeout(()=>{this.remove(u,R)},x)),this.data[S].push(R),this.order.push(S),this.order.length>this.max){const F=this._getAndRemoveByKey(this.order[0]);F&&this.onRemove(F)}return this}has(u){return u.wrapped().key in this.data}getAndRemove(u){return this.has(u)?this._getAndRemoveByKey(u.wrapped().key):null}_getAndRemoveByKey(u){const m=this.data[u].shift();return m.timeout&&clearTimeout(m.timeout),this.data[u].length===0&&delete this.data[u],this.order.splice(this.order.indexOf(u),1),m.value}getByKey(u){const m=this.data[u];return m?m[0].value:null}get(u){return this.has(u)?this.data[u.wrapped().key][0].value:null}remove(u,m){if(!this.has(u))return this;const x=u.wrapped().key,S=m===void 0?0:this.data[x].indexOf(m),R=this.data[x][S];return this.data[x].splice(S,1),R.timeout&&clearTimeout(R.timeout),this.data[x].length===0&&delete this.data[x],this.onRemove(R.value),this.order.splice(this.order.indexOf(x),1),this}setMaxSize(u){for(this.max=u;this.order.length>this.max;){const m=this._getAndRemoveByKey(this.order[0]);m&&this.onRemove(m)}return this}filter(u){const m=[];for(const x in this.data)for(const S of this.data[x])u(S.value)||m.push(S);for(const x of m)this.remove(x.value.tileID,x)}}class We{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(u,m,x){const S=String(m);if(this.stateChanges[u]=this.stateChanges[u]||{},this.stateChanges[u][S]=this.stateChanges[u][S]||{},o.extend(this.stateChanges[u][S],x),this.deletedStates[u]===null){this.deletedStates[u]={};for(const R in this.state[u])R!==S&&(this.deletedStates[u][R]=null)}else if(this.deletedStates[u]&&this.deletedStates[u][S]===null){this.deletedStates[u][S]={};for(const R in this.state[u][S])x[R]||(this.deletedStates[u][S][R]=null)}else for(const R in x)this.deletedStates[u]&&this.deletedStates[u][S]&&this.deletedStates[u][S][R]===null&&delete this.deletedStates[u][S][R]}removeFeatureState(u,m,x){if(this.deletedStates[u]===null)return;const S=String(m);if(this.deletedStates[u]=this.deletedStates[u]||{},x&&m!==void 0)this.deletedStates[u][S]!==null&&(this.deletedStates[u][S]=this.deletedStates[u][S]||{},this.deletedStates[u][S][x]=null);else if(m!==void 0)if(this.stateChanges[u]&&this.stateChanges[u][S])for(x in this.deletedStates[u][S]={},this.stateChanges[u][S])this.deletedStates[u][S][x]=null;else this.deletedStates[u][S]=null;else this.deletedStates[u]=null}getState(u,m){const x=String(m),S=o.extend({},(this.state[u]||{})[x],(this.stateChanges[u]||{})[x]);if(this.deletedStates[u]===null)return{};if(this.deletedStates[u]){const R=this.deletedStates[u][m];if(R===null)return{};for(const F in R)delete S[F]}return S}initializeTileState(u,m){u.setFeatureState(this.state,m)}coalesceChanges(u,m){const x={};for(const S in this.stateChanges){this.state[S]=this.state[S]||{};const R={};for(const F in this.stateChanges[S])this.state[S][F]||(this.state[S][F]={}),o.extend(this.state[S][F],this.stateChanges[S][F]),R[F]=this.state[S][F];x[S]=R}for(const S in this.deletedStates){this.state[S]=this.state[S]||{};const R={};if(this.deletedStates[S]===null)for(const F in this.state[S])R[F]={},this.state[S][F]={};else for(const F in this.deletedStates[S]){if(this.deletedStates[S][F]===null)this.state[S][F]={};else for(const V of Object.keys(this.deletedStates[S][F]))delete this.state[S][F][V];R[F]=this.state[S][F]}x[S]=x[S]||{},o.extend(x[S],R)}if(this.stateChanges={},this.deletedStates={},Object.keys(x).length!==0)for(const S in u)u[S].setFeatureState(x,m)}}class je extends o.Evented{constructor(u,m,x){super(),this.id=u,this.dispatcher=x,this.on("data",S=>{S.dataType==="source"&&S.sourceDataType==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&S.dataType==="source"&&S.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(S,R,F,V){const H=new be[R.type](S,R,F,V);if(H.id!==S)throw new Error(`Expected Source id to be ${S} instead of ${H.id}`);return o.bindAll(["load","abort","unload","serialize","prepare"],H),H}(u,m,x,this),this._tiles={},this._cache=new Fe(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new We}onAdd(u){this.map=u,this._maxTileCacheSize=u?u._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(u)}onRemove(u){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(u)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(const u in this._tiles){const m=this._tiles[u];if(m.state!=="loaded"&&m.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const u=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,u&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(u,m){return this._source.loadTile(u,m)}_unloadTile(u){if(this._source.unloadTile)return this._source.unloadTile(u,()=>{})}_abortTile(u){this._source.abortTile&&this._source.abortTile(u,()=>{}),this._source.fire(new o.Event("dataabort",{tile:u,coord:u.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(u){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const m in this._tiles){const x=this._tiles[m];x.upload(u),x.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(u=>u.tileID).sort(pt).map(u=>u.key)}getRenderableIds(u){const m=[];for(const x in this._tiles)this._isIdRenderable(x,u)&&m.push(this._tiles[x]);return u?m.sort((x,S)=>{const R=x.tileID,F=S.tileID,V=new o.pointGeometry(R.canonical.x,R.canonical.y)._rotate(this.transform.angle),H=new o.pointGeometry(F.canonical.x,F.canonical.y)._rotate(this.transform.angle);return R.overscaledZ-F.overscaledZ||H.y-V.y||H.x-V.x}).map(x=>x.tileID.key):m.map(x=>x.tileID).sort(pt).map(x=>x.key)}hasRenderableParent(u){const m=this.findLoadedParent(u,0);return!!m&&this._isIdRenderable(m.tileID.key)}_isIdRenderable(u,m){return this._tiles[u]&&this._tiles[u].hasData()&&!this._coveredTiles[u]&&(m||!this._tiles[u].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const u in this._tiles)this._tiles[u].state!=="errored"&&this._reloadTile(u,"reloading")}}_reloadTile(u,m){const x=this._tiles[u];x&&(x.state!=="loading"&&(x.state=m),this._loadTile(x,this._tileLoaded.bind(this,x,u,m)))}_tileLoaded(u,m,x,S){if(S)return u.state="errored",void(S.status!==404?this._source.fire(new o.ErrorEvent(S,{tile:u})):this.update(this.transform,this.terrain));u.timeAdded=o.exported.now(),x==="expired"&&(u.refreshedUponExpiration=!0),this._setTileReloadTimer(m,u),this.getSource().type==="raster-dem"&&u.dem&&this._backfillDEM(u),this._state.initializeTileState(u,this.map?this.map.painter:null),u.aborted||this._source.fire(new o.Event("data",{dataType:"source",tile:u,coord:u.tileID}))}_backfillDEM(u){const m=this.getRenderableIds();for(let S=0;S<m.length;S++){const R=m[S];if(u.neighboringTiles&&u.neighboringTiles[R]){const F=this.getTileByID(R);x(u,F),x(F,u)}}function x(S,R){S.needsHillshadePrepare=!0,S.needsTerrainPrepare=!0;let F=R.tileID.canonical.x-S.tileID.canonical.x;const V=R.tileID.canonical.y-S.tileID.canonical.y,H=Math.pow(2,S.tileID.canonical.z),q=R.tileID.key;F===0&&V===0||Math.abs(V)>1||(Math.abs(F)>1&&(Math.abs(F+H)===1?F+=H:Math.abs(F-H)===1&&(F-=H)),R.dem&&S.dem&&(S.dem.backfillBorder(R.dem,F,V),S.neighboringTiles&&S.neighboringTiles[q]&&(S.neighboringTiles[q].backfilled=!0)))}}getTile(u){return this.getTileByID(u.key)}getTileByID(u){return this._tiles[u]}_retainLoadedChildren(u,m,x,S){for(const R in this._tiles){let F=this._tiles[R];if(S[R]||!F.hasData()||F.tileID.overscaledZ<=m||F.tileID.overscaledZ>x)continue;let V=F.tileID;for(;F&&F.tileID.overscaledZ>m+1;){const q=F.tileID.scaledTo(F.tileID.overscaledZ-1);F=this._tiles[q.key],F&&F.hasData()&&(V=q)}let H=V;for(;H.overscaledZ>m;)if(H=H.scaledTo(H.overscaledZ-1),u[H.key]){S[V.key]=V;break}}}findLoadedParent(u,m){if(u.key in this._loadedParentTiles){const x=this._loadedParentTiles[u.key];return x&&x.tileID.overscaledZ>=m?x:null}for(let x=u.overscaledZ-1;x>=m;x--){const S=u.scaledTo(x),R=this._getLoadedTile(S);if(R)return R}}_getLoadedTile(u){const m=this._tiles[u.key];return m&&m.hasData()?m:this._cache.getByKey(u.wrapped().key)}updateCacheSize(u){const m=Math.ceil(u.width/this._source.tileSize)+1,x=Math.ceil(u.height/this._source.tileSize)+1,S=Math.floor(m*x*5),R=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,S):S;this._cache.setMaxSize(R)}handleWrapJump(u){const m=Math.round((u-(this._prevLng===void 0?u:this._prevLng))/360);if(this._prevLng=u,m){const x={};for(const S in this._tiles){const R=this._tiles[S];R.tileID=R.tileID.unwrapTo(R.tileID.wrap+m),x[R.tileID.key]=R}this._tiles=x;for(const S in this._timers)clearTimeout(this._timers[S]),delete this._timers[S];for(const S in this._tiles)this._setTileReloadTimer(S,this._tiles[S])}}update(u,m){if(this.transform=u,this.terrain=m,!this._sourceLoaded||this._paused)return;let x;this.updateCacheSize(u),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?x=u.getVisibleUnwrappedCoordinates(this._source.tileID).map(q=>new o.OverscaledTileID(q.canonical.z,q.wrap,q.canonical.z,q.canonical.x,q.canonical.y)):(x=u.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:m}),this._source.hasTile&&(x=x.filter(q=>this._source.hasTile(q)))):x=[];const S=u.coveringZoomLevel(this._source),R=Math.max(S-je.maxOverzooming,this._source.minzoom),F=Math.max(S+je.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const q={};for(const ee of x)if(ee.canonical.z>this._source.minzoom){const se=ee.scaledTo(ee.canonical.z-1);q[se.key]=se;const he=ee.scaledTo(Math.max(this._source.minzoom,Math.min(ee.canonical.z,5)));q[he.key]=he}x=x.concat(Object.values(q))}const V=this._updateRetainedTiles(x,S);if(gt(this._source.type)){const q={},ee={},se=Object.keys(V);for(const he of se){const ke=V[he],_e=this._tiles[he];if(!_e||_e.fadeEndTime&&_e.fadeEndTime<=o.exported.now())continue;const Se=this.findLoadedParent(ke,R);Se&&(this._addTile(Se.tileID),q[Se.tileID.key]=Se.tileID),ee[he]=ke}this._retainLoadedChildren(ee,S,F,V);for(const he in q)V[he]||(this._coveredTiles[he]=!0,V[he]=q[he]);if(m){const he={},ke={};for(const _e of x)this._tiles[_e.key].hasData()?he[_e.key]=_e:ke[_e.key]=_e;for(const _e in ke){const Se=ke[_e].children(this._source.maxzoom);this._tiles[Se[0].key]&&this._tiles[Se[1].key]&&this._tiles[Se[2].key]&&this._tiles[Se[3].key]&&(he[Se[0].key]=V[Se[0].key]=Se[0],he[Se[1].key]=V[Se[1].key]=Se[1],he[Se[2].key]=V[Se[2].key]=Se[2],he[Se[3].key]=V[Se[3].key]=Se[3],delete ke[_e])}for(const _e in ke){const Se=this.findLoadedParent(ke[_e],this._source.minzoom);if(Se){he[Se.tileID.key]=V[Se.tileID.key]=Se.tileID;for(const Ve in he)he[Ve].isChildOf(Se.tileID)&&delete he[Ve]}}for(const _e in this._tiles)he[_e]||(this._coveredTiles[_e]=!0)}}for(const q in V)this._tiles[q].clearFadeHold();const H=o.keysDifference(this._tiles,V);for(const q of H){const ee=this._tiles[q];ee.hasSymbolBuckets&&!ee.holdingForFade()?ee.setHoldDuration(this.map._fadeDuration):ee.hasSymbolBuckets&&!ee.symbolFadeFinished()||this._removeTile(q)}this._updateLoadedParentTileCache()}releaseSymbolFadeTiles(){for(const u in this._tiles)this._tiles[u].holdingForFade()&&this._removeTile(u)}_updateRetainedTiles(u,m){const x={},S={},R=Math.max(m-je.maxOverzooming,this._source.minzoom),F=Math.max(m+je.maxUnderzooming,this._source.minzoom),V={};for(const H of u){const q=this._addTile(H);x[H.key]=H,q.hasData()||m<this._source.maxzoom&&(V[H.key]=H)}this._retainLoadedChildren(V,m,F,x);for(const H of u){let q=this._tiles[H.key];if(q.hasData())continue;if(m+1>this._source.maxzoom){const se=H.children(this._source.maxzoom)[0],he=this.getTile(se);if(he&&he.hasData()){x[se.key]=se;continue}}else{const se=H.children(this._source.maxzoom);if(x[se[0].key]&&x[se[1].key]&&x[se[2].key]&&x[se[3].key])continue}let ee=q.wasRequested();for(let se=H.overscaledZ-1;se>=R;--se){const he=H.scaledTo(se);if(S[he.key]||(S[he.key]=!0,q=this.getTile(he),!q&&ee&&(q=this._addTile(he)),q&&(x[he.key]=he,ee=q.wasRequested(),q.hasData())))break}}return x}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const u in this._tiles){const m=[];let x,S=this._tiles[u].tileID;for(;S.overscaledZ>0;){if(S.key in this._loadedParentTiles){x=this._loadedParentTiles[S.key];break}m.push(S.key);const R=S.scaledTo(S.overscaledZ-1);if(x=this._getLoadedTile(R),x)break;S=R}for(const R of m)this._loadedParentTiles[R]=x}}_addTile(u){let m=this._tiles[u.key];if(m)return m;m=this._cache.getAndRemove(u),m&&(this._setTileReloadTimer(u.key,m),m.tileID=u,this._state.initializeTileState(m,this.map?this.map.painter:null),this._cacheTimers[u.key]&&(clearTimeout(this._cacheTimers[u.key]),delete this._cacheTimers[u.key],this._setTileReloadTimer(u.key,m)));const x=m;return m||(m=new Ae(u,this._source.tileSize*u.overscaleFactor()),this._loadTile(m,this._tileLoaded.bind(this,m,u.key,m.state))),m.uses++,this._tiles[u.key]=m,x||this._source.fire(new o.Event("dataloading",{tile:m,coord:m.tileID,dataType:"source"})),m}_setTileReloadTimer(u,m){u in this._timers&&(clearTimeout(this._timers[u]),delete this._timers[u]);const x=m.getExpiryTimeout();x&&(this._timers[u]=setTimeout(()=>{this._reloadTile(u,"expired"),delete this._timers[u]},x))}_removeTile(u){const m=this._tiles[u];m&&(m.uses--,delete this._tiles[u],this._timers[u]&&(clearTimeout(this._timers[u]),delete this._timers[u]),m.uses>0||(m.hasData()&&m.state!=="reloading"?this._cache.add(m.tileID,m,m.getExpiryTimeout()):(m.aborted=!0,this._abortTile(m),this._unloadTile(m))))}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const u in this._tiles)this._removeTile(u);this._cache.reset()}tilesIn(u,m,x){const S=[],R=this.transform;if(!R)return S;const F=x?R.getCameraQueryGeometry(u):u,V=u.map(_e=>R.pointCoordinate(_e,this.terrain)),H=F.map(_e=>R.pointCoordinate(_e,this.terrain)),q=this.getIds();let ee=1/0,se=1/0,he=-1/0,ke=-1/0;for(const _e of H)ee=Math.min(ee,_e.x),se=Math.min(se,_e.y),he=Math.max(he,_e.x),ke=Math.max(ke,_e.y);for(let _e=0;_e<q.length;_e++){const Se=this._tiles[q[_e]];if(Se.holdingForFade())continue;const Ve=Se.tileID,Ge=Math.pow(2,R.zoom-Se.tileID.overscaledZ),rt=m*Se.queryPadding*o.EXTENT/Se.tileSize/Ge,De=[Ve.getTilePoint(new o.MercatorCoordinate(ee,se)),Ve.getTilePoint(new o.MercatorCoordinate(he,ke))];if(De[0].x-rt<o.EXTENT&&De[0].y-rt<o.EXTENT&&De[1].x+rt>=0&&De[1].y+rt>=0){const ft=V.map(wt=>Ve.getTilePoint(wt)),st=H.map(wt=>Ve.getTilePoint(wt));S.push({tile:Se,tileID:Ve,queryGeometry:ft,cameraQueryGeometry:st,scale:Ge})}}return S}getVisibleCoordinates(u){const m=this.getRenderableIds(u).map(x=>this._tiles[x].tileID);for(const x of m)x.posMatrix=this.transform.calculatePosMatrix(x.toUnwrapped());return m}hasTransition(){if(this._source.hasTransition())return!0;if(gt(this._source.type))for(const u in this._tiles){const m=this._tiles[u];if(m.fadeEndTime!==void 0&&m.fadeEndTime>=o.exported.now())return!0}return!1}setFeatureState(u,m,x){this._state.updateState(u=u||"_geojsonTileLayer",m,x)}removeFeatureState(u,m,x){this._state.removeFeatureState(u=u||"_geojsonTileLayer",m,x)}getFeatureState(u,m){return this._state.getState(u=u||"_geojsonTileLayer",m)}setDependencies(u,m,x){const S=this._tiles[u];S&&S.setDependencies(m,x)}reloadTilesForDependencies(u,m){for(const x in this._tiles)this._tiles[x].hasDependency(u,m)&&this._reloadTile(x,"reloading");this._cache.filter(x=>!x.hasDependency(u,m))}}function pt(w,u){const m=Math.abs(2*w.wrap)-+(w.wrap<0),x=Math.abs(2*u.wrap)-+(u.wrap<0);return w.overscaledZ-u.overscaledZ||x-m||u.canonical.y-w.canonical.y||u.canonical.x-w.canonical.x}function gt(w){return w==="raster"||w==="image"||w==="video"}je.maxOverzooming=10,je.maxUnderzooming=3;const Ot="mapboxgl_preloaded_worker_pool";class Ze{constructor(){this.active={}}acquire(u){if(!this.workers)for(this.workers=[];this.workers.length<Ze.workerCount;)this.workers.push(new Worker(xl.workerUrl));return this.active[u]=!0,this.workers.slice()}release(u){delete this.active[u],this.numActive()===0&&(this.workers.forEach(m=>{m.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[Ot]}numActive(){return Object.keys(this.active).length}}const St=Math.floor(o.exported.hardwareConcurrency/2);let ot;function vt(){return ot||(ot=new Ze),ot}function yt(w,u){const m={};for(const x in w)x!=="ref"&&(m[x]=w[x]);return o.refProperties.forEach(x=>{x in u&&(m[x]=u[x])}),m}function kt(w){w=w.slice();const u=Object.create(null);for(let m=0;m<w.length;m++)u[w[m].id]=w[m];for(let m=0;m<w.length;m++)"ref"in w[m]&&(w[m]=yt(w[m],u[w[m].ref]));return w}Ze.workerCount=Math.max(Math.min(St,6),1);const et={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 ut(w,u,m){m.push({command:et.addSource,args:[w,u[w]]})}function at(w,u,m){u.push({command:et.removeSource,args:[w]}),m[w]=!0}function Ke(w,u,m,x){at(w,m,x),ut(w,u,m)}function ct(w,u,m){let x;for(x in w[m])if(Object.prototype.hasOwnProperty.call(w[m],x)&&x!=="data"&&!g(w[m][x],u[m][x]))return!1;for(x in u[m])if(Object.prototype.hasOwnProperty.call(u[m],x)&&x!=="data"&&!g(w[m][x],u[m][x]))return!1;return!0}function bt(w,u,m,x,S,R){let F;for(F in u=u||{},w=w||{})Object.prototype.hasOwnProperty.call(w,F)&&(g(w[F],u[F])||m.push({command:R,args:[x,F,u[F],S]}));for(F in u)Object.prototype.hasOwnProperty.call(u,F)&&!Object.prototype.hasOwnProperty.call(w,F)&&(g(w[F],u[F])||m.push({command:R,args:[x,F,u[F],S]}))}function At(w){return w.id}function Lt(w,u){return w[u.id]=u,w}class Ht{constructor(u,m){this.reset(u,m)}reset(u,m){this.points=u||[],this._distances=[0];for(let x=1;x<this.points.length;x++)this._distances[x]=this._distances[x-1]+this.points[x].dist(this.points[x-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(m||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(u){if(this.points.length===1)return this.points[0];u=o.clamp(u,0,1);let m=1,x=this._distances[m];const S=u*this.paddedLength+this.padding;for(;x<S&&m<this._distances.length;)x=this._distances[++m];const R=m-1,F=this._distances[R],V=x-F,H=V>0?(S-F)/V:0;return this.points[R].mult(1-H).add(this.points[m].mult(H))}}function ze(w,u){let m=!0;return w==="always"||w!=="never"&&u!=="never"||(m=!1),m}class Qe{constructor(u,m,x){const S=this.boxCells=[],R=this.circleCells=[];this.xCellCount=Math.ceil(u/x),this.yCellCount=Math.ceil(m/x);for(let F=0;F<this.xCellCount*this.yCellCount;F++)S.push([]),R.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=u,this.height=m,this.xScale=this.xCellCount/u,this.yScale=this.yCellCount/m,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(u,m,x,S,R){this._forEachCell(m,x,S,R,this._insertBoxCell,this.boxUid++),this.boxKeys.push(u),this.bboxes.push(m),this.bboxes.push(x),this.bboxes.push(S),this.bboxes.push(R)}insertCircle(u,m,x,S){this._forEachCell(m-S,x-S,m+S,x+S,this._insertCircleCell,this.circleUid++),this.circleKeys.push(u),this.circles.push(m),this.circles.push(x),this.circles.push(S)}_insertBoxCell(u,m,x,S,R,F){this.boxCells[R].push(F)}_insertCircleCell(u,m,x,S,R,F){this.circleCells[R].push(F)}_query(u,m,x,S,R,F,V){if(x<0||u>this.width||S<0||m>this.height)return[];const H=[];if(u<=0&&m<=0&&this.width<=x&&this.height<=S){if(R)return[{key:null,x1:u,y1:m,x2:x,y2:S}];for(let q=0;q<this.boxKeys.length;q++)H.push({key:this.boxKeys[q],x1:this.bboxes[4*q],y1:this.bboxes[4*q+1],x2:this.bboxes[4*q+2],y2:this.bboxes[4*q+3]});for(let q=0;q<this.circleKeys.length;q++){const ee=this.circles[3*q],se=this.circles[3*q+1],he=this.circles[3*q+2];H.push({key:this.circleKeys[q],x1:ee-he,y1:se-he,x2:ee+he,y2:se+he})}}else this._forEachCell(u,m,x,S,this._queryCell,H,{hitTest:R,overlapMode:F,seenUids:{box:{},circle:{}}},V);return H}query(u,m,x,S){return this._query(u,m,x,S,!1,null)}hitTest(u,m,x,S,R,F){return this._query(u,m,x,S,!0,R,F).length>0}hitTestCircle(u,m,x,S,R){const F=u-x,V=u+x,H=m-x,q=m+x;if(V<0||F>this.width||q<0||H>this.height)return!1;const ee=[];return this._forEachCell(F,H,V,q,this._queryCellCircle,ee,{hitTest:!0,overlapMode:S,circle:{x:u,y:m,radius:x},seenUids:{box:{},circle:{}}},R),ee.length>0}_queryCell(u,m,x,S,R,F,V,H){const{seenUids:q,hitTest:ee,overlapMode:se}=V,he=this.boxCells[R];if(he!==null){const _e=this.bboxes;for(const Se of he)if(!q.box[Se]){q.box[Se]=!0;const Ve=4*Se,Ge=this.boxKeys[Se];if(u<=_e[Ve+2]&&m<=_e[Ve+3]&&x>=_e[Ve+0]&&S>=_e[Ve+1]&&(!H||H(Ge))&&(!ee||!ze(se,Ge.overlapMode))&&(F.push({key:Ge,x1:_e[Ve],y1:_e[Ve+1],x2:_e[Ve+2],y2:_e[Ve+3]}),ee))return!0}}const ke=this.circleCells[R];if(ke!==null){const _e=this.circles;for(const Se of ke)if(!q.circle[Se]){q.circle[Se]=!0;const Ve=3*Se,Ge=this.circleKeys[Se];if(this._circleAndRectCollide(_e[Ve],_e[Ve+1],_e[Ve+2],u,m,x,S)&&(!H||H(Ge))&&(!ee||!ze(se,Ge.overlapMode))){const rt=_e[Ve],De=_e[Ve+1],ft=_e[Ve+2];if(F.push({key:Ge,x1:rt-ft,y1:De-ft,x2:rt+ft,y2:De+ft}),ee)return!0}}}return!1}_queryCellCircle(u,m,x,S,R,F,V,H){const{circle:q,seenUids:ee,overlapMode:se}=V,he=this.boxCells[R];if(he!==null){const _e=this.bboxes;for(const Se of he)if(!ee.box[Se]){ee.box[Se]=!0;const Ve=4*Se,Ge=this.boxKeys[Se];if(this._circleAndRectCollide(q.x,q.y,q.radius,_e[Ve+0],_e[Ve+1],_e[Ve+2],_e[Ve+3])&&(!H||H(Ge))&&!ze(se,Ge.overlapMode))return F.push(!0),!0}}const ke=this.circleCells[R];if(ke!==null){const _e=this.circles;for(const Se of ke)if(!ee.circle[Se]){ee.circle[Se]=!0;const Ve=3*Se,Ge=this.circleKeys[Se];if(this._circlesCollide(_e[Ve],_e[Ve+1],_e[Ve+2],q.x,q.y,q.radius)&&(!H||H(Ge))&&!ze(se,Ge.overlapMode))return F.push(!0),!0}}}_forEachCell(u,m,x,S,R,F,V,H){const q=this._convertToXCellCoord(u),ee=this._convertToYCellCoord(m),se=this._convertToXCellCoord(x),he=this._convertToYCellCoord(S);for(let ke=q;ke<=se;ke++)for(let _e=ee;_e<=he;_e++)if(R.call(this,u,m,x,S,this.xCellCount*_e+ke,F,V,H))return}_convertToXCellCoord(u){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(u*this.xScale)))}_convertToYCellCoord(u){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(u*this.yScale)))}_circlesCollide(u,m,x,S,R,F){const V=S-u,H=R-m,q=x+F;return q*q>V*V+H*H}_circleAndRectCollide(u,m,x,S,R,F,V){const H=(F-S)/2,q=Math.abs(u-(S+H));if(q>H+x)return!1;const ee=(V-R)/2,se=Math.abs(m-(R+ee));if(se>ee+x)return!1;if(q<=H||se<=ee)return!0;const he=q-H,ke=se-ee;return he*he+ke*ke<=x*x}}function Zt(w,u,m,x,S){const R=o.create();return u?(o.scale(R,R,[1/S,1/S,1]),m||o.rotateZ(R,R,x.angle)):o.multiply(R,x.labelPlaneMatrix,w),R}function an(w,u,m,x,S){if(u){const R=o.clone(w);return o.scale(R,R,[S,S,1]),m||o.rotateZ(R,R,-x.angle),R}return x.glCoordMatrix}function Kt(w,u,m){let x;m?(x=[w.x,w.y,m(w.x,w.y),1],o.transformMat4(x,x,u)):(x=[w.x,w.y,0,1],Pn(x,x,u));const S=x[3];return{point:new o.pointGeometry(x[0]/S,x[1]/S),signedDistanceFromCamera:S}}function Vt(w,u){return .5+w/u*.5}function It(w,u){const m=w[0]/w[3],x=w[1]/w[3];return m>=-u[0]&&m<=u[0]&&x>=-u[1]&&x<=u[1]}function Xt(w,u,m,x,S,R,F,V,H,q){const ee=x?w.textSizeData:w.iconSizeData,se=o.evaluateSizeForZoom(ee,m.transform.zoom),he=[256/m.width*2+1,256/m.height*2+1],ke=x?w.text.dynamicLayoutVertexArray:w.icon.dynamicLayoutVertexArray;ke.clear();const _e=w.lineVertexArray,Se=x?w.text.placedSymbolArray:w.icon.placedSymbolArray,Ve=m.transform.width/m.transform.height;let Ge=!1;for(let rt=0;rt<Se.length;rt++){const De=Se.get(rt);if(De.hidden||De.writingMode===o.WritingMode.vertical&&!Ge){Et(De.numGlyphs,ke);continue}let ft;if(Ge=!1,q?(ft=[De.anchorX,De.anchorY,q(De.anchorX,De.anchorY),1],o.transformMat4(ft,ft,u)):(ft=[De.anchorX,De.anchorY,0,1],Pn(ft,ft,u)),!It(ft,he)){Et(De.numGlyphs,ke);continue}const st=Vt(m.transform.cameraToCenterDistance,ft[3]),wt=o.evaluateSizeForFeature(ee,se,De),Ct=F?wt/st:wt*st,Ut=new o.pointGeometry(De.anchorX,De.anchorY),xt=Kt(Ut,S,q).point,cn={},Jt=Nt(De,Ct,!1,V,u,S,R,w.glyphOffsetArray,_e,ke,xt,Ut,cn,Ve,H,q);Ge=Jt.useVertical,(Jt.notEnoughRoom||Ge||Jt.needsFlipping&&Nt(De,Ct,!0,V,u,S,R,w.glyphOffsetArray,_e,ke,xt,Ut,cn,Ve,H,q).notEnoughRoom)&&Et(De.numGlyphs,ke)}x?w.text.dynamicLayoutVertexBuffer.updateData(ke):w.icon.dynamicLayoutVertexBuffer.updateData(ke)}function pn(w,u,m,x,S,R,F,V,H,q,ee,se,he){const ke=V.glyphStartIndex+V.numGlyphs,_e=V.lineStartIndex,Se=V.lineStartIndex+V.lineLength,Ve=u.getoffsetX(V.glyphStartIndex),Ge=u.getoffsetX(ke-1),rt=En(w*Ve,m,x,S,R,F,V.segment,_e,Se,H,q,ee,se,he);if(!rt)return null;const De=En(w*Ge,m,x,S,R,F,V.segment,_e,Se,H,q,ee,se,he);return De?{first:rt,last:De}:null}function tt(w,u,m,x){return w===o.WritingMode.horizontal&&Math.abs(m.y-u.y)>Math.abs(m.x-u.x)*x?{useVertical:!0}:(w===o.WritingMode.vertical?u.y<m.y:u.x>m.x)?{needsFlipping:!0}:null}function Nt(w,u,m,x,S,R,F,V,H,q,ee,se,he,ke,_e,Se){const Ve=u/24,Ge=w.lineOffsetX*Ve,rt=w.lineOffsetY*Ve;let De;if(w.numGlyphs>1){const ft=w.glyphStartIndex+w.numGlyphs,st=w.lineStartIndex,wt=w.lineStartIndex+w.lineLength,Ct=pn(Ve,V,Ge,rt,m,ee,se,w,H,R,he,_e,Se);if(!Ct)return{notEnoughRoom:!0};const Ut=Kt(Ct.first.point,F,Se).point,xt=Kt(Ct.last.point,F,Se).point;if(x&&!m){const cn=tt(w.writingMode,Ut,xt,ke);if(cn)return cn}De=[Ct.first];for(let cn=w.glyphStartIndex+1;cn<ft-1;cn++)De.push(En(Ve*V.getoffsetX(cn),Ge,rt,m,ee,se,w.segment,st,wt,H,R,he,_e,Se));De.push(Ct.last)}else{if(x&&!m){const st=Kt(se,S,Se).point,wt=w.lineStartIndex+w.segment+1,Ct=new o.pointGeometry(H.getx(wt),H.gety(wt)),Ut=Kt(Ct,S,Se),xt=Ut.signedDistanceFromCamera>0?Ut.point:qt(se,Ct,st,1,S,Se),cn=tt(w.writingMode,st,xt,ke);if(cn)return cn}const ft=En(Ve*V.getoffsetX(w.glyphStartIndex),Ge,rt,m,ee,se,w.segment,w.lineStartIndex,w.lineStartIndex+w.lineLength,H,R,he,_e,Se);if(!ft)return{notEnoughRoom:!0};De=[ft]}for(const ft of De)o.addDynamicAttributes(q,ft.point,ft.angle);return{}}function qt(w,u,m,x,S,R){const F=Kt(w.add(w.sub(u)._unit()),S,R).point,V=m.sub(F);return m.add(V._mult(x/V.mag()))}function En(w,u,m,x,S,R,F,V,H,q,ee,se,he,ke){const _e=x?w-u:w+u;let Se=_e>0?1:-1,Ve=0;x&&(Se*=-1,Ve=Math.PI),Se<0&&(Ve+=Math.PI);let Ge=Se>0?V+F:V+F+1,rt=S,De=S,ft=0,st=0;const wt=Math.abs(_e),Ct=[];for(;ft+st<=wt;){if(Ge+=Se,Ge<V||Ge>=H)return null;if(De=rt,Ct.push(rt),rt=se[Ge],rt===void 0){const fn=new o.pointGeometry(q.getx(Ge),q.gety(Ge)),$n=Kt(fn,ee,ke);if($n.signedDistanceFromCamera>0)rt=se[Ge]=$n.point;else{const Hn=Ge-Se;rt=qt(ft===0?R:new o.pointGeometry(q.getx(Hn),q.gety(Hn)),fn,De,wt-ft+1,ee,ke)}}ft+=st,st=De.dist(rt)}const Ut=(wt-ft)/st,xt=rt.sub(De),cn=xt.mult(Ut)._add(De);cn._add(xt._unit()._perp()._mult(m*Se));const Jt=Ve+Math.atan2(rt.y-De.y,rt.x-De.x);return Ct.push(cn),{point:cn,angle:he?Jt:0,path:Ct}}const yn=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Et(w,u){for(let m=0;m<w;m++){const x=u.length;u.resize(x+4),u.float32.set(yn,3*x)}}function Pn(w,u,m){const x=u[0],S=u[1];return w[0]=m[0]*x+m[4]*S+m[12],w[1]=m[1]*x+m[5]*S+m[13],w[3]=m[3]*x+m[7]*S+m[15],w}const _n=100;class tn{constructor(u,m=new Qe(u.width+200,u.height+200,25),x=new Qe(u.width+200,u.height+200,25)){this.transform=u,this.grid=m,this.ignoredGrid=x,this.pitchfactor=Math.cos(u._pitch)*u.cameraToCenterDistance,this.screenRightBoundary=u.width+_n,this.screenBottomBoundary=u.height+_n,this.gridRightBoundary=u.width+200,this.gridBottomBoundary=u.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(u,m,x,S,R,F){const V=this.projectAndGetPerspectiveRatio(S,u.anchorPointX,u.anchorPointY,F),H=x*V.perspectiveRatio,q=u.x1*H+V.point.x,ee=u.y1*H+V.point.y,se=u.x2*H+V.point.x,he=u.y2*H+V.point.y;return!this.isInsideGrid(q,ee,se,he)||m!=="always"&&this.grid.hitTest(q,ee,se,he,m,R)||V.perspectiveRatio<this.perspectiveRatioCutoff?{box:[],offscreen:!1}:{box:[q,ee,se,he],offscreen:this.isOffscreen(q,ee,se,he)}}placeCollisionCircles(u,m,x,S,R,F,V,H,q,ee,se,he,ke,_e){const Se=[],Ve=new o.pointGeometry(m.anchorX,m.anchorY),Ge=Kt(Ve,F,_e),rt=Vt(this.transform.cameraToCenterDistance,Ge.signedDistanceFromCamera),De=(ee?R/rt:R*rt)/o.ONE_EM,ft=Kt(Ve,V,_e).point,st=pn(De,S,m.lineOffsetX*De,m.lineOffsetY*De,!1,ft,Ve,m,x,V,{},!1,_e);let wt=!1,Ct=!1,Ut=!0;if(st){const xt=.5*he*rt+ke,cn=new o.pointGeometry(-100,-100),Jt=new o.pointGeometry(this.screenRightBoundary,this.screenBottomBoundary),fn=new Ht,$n=st.first,Hn=st.last;let Tn=[];for(let ir=$n.path.length-1;ir>=1;ir--)Tn.push($n.path[ir]);for(let ir=1;ir<Hn.path.length;ir++)Tn.push(Hn.path[ir]);const mr=2.5*xt;if(H){const ir=Tn.map(ar=>Kt(ar,H,_e));Tn=ir.some(ar=>ar.signedDistanceFromCamera<=0)?[]:ir.map(ar=>ar.point)}let gr=[];if(Tn.length>0){const ir=Tn[0].clone(),ar=Tn[0].clone();for(let xr=1;xr<Tn.length;xr++)ir.x=Math.min(ir.x,Tn[xr].x),ir.y=Math.min(ir.y,Tn[xr].y),ar.x=Math.max(ar.x,Tn[xr].x),ar.y=Math.max(ar.y,Tn[xr].y);gr=ir.x>=cn.x&&ar.x<=Jt.x&&ir.y>=cn.y&&ar.y<=Jt.y?[Tn]:ar.x<cn.x||ir.x>Jt.x||ar.y<cn.y||ir.y>Jt.y?[]:o.clipLine([Tn],cn.x,cn.y,Jt.x,Jt.y)}for(const ir of gr){fn.reset(ir,.25*xt);let ar=0;ar=fn.length<=.5*xt?1:Math.ceil(fn.paddedLength/mr)+1;for(let xr=0;xr<ar;xr++){const Pi=xr/Math.max(ar-1,1),$a=fn.lerp(Pi),ca=$a.x+_n,Ba=$a.y+_n;Se.push(ca,Ba,xt,0);const Ks=ca-xt,Go=Ba-xt,go=ca+xt,ms=Ba+xt;if(Ut=Ut&&this.isOffscreen(Ks,Go,go,ms),Ct=Ct||this.isInsideGrid(Ks,Go,go,ms),u!=="always"&&this.grid.hitTestCircle(ca,Ba,xt,u,se)&&(wt=!0,!q))return{circles:[],offscreen:!1,collisionDetected:wt}}}}return{circles:!q&&wt||!Ct||rt<this.perspectiveRatioCutoff?[]:Se,offscreen:Ut,collisionDetected:wt}}queryRenderedSymbols(u){if(u.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};const m=[];let x=1/0,S=1/0,R=-1/0,F=-1/0;for(const ee of u){const se=new o.pointGeometry(ee.x+_n,ee.y+_n);x=Math.min(x,se.x),S=Math.min(S,se.y),R=Math.max(R,se.x),F=Math.max(F,se.y),m.push(se)}const V=this.grid.query(x,S,R,F).concat(this.ignoredGrid.query(x,S,R,F)),H={},q={};for(const ee of V){const se=ee.key;if(H[se.bucketInstanceId]===void 0&&(H[se.bucketInstanceId]={}),H[se.bucketInstanceId][se.featureIndex])continue;const he=[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(m,he)&&(H[se.bucketInstanceId][se.featureIndex]=!0,q[se.bucketInstanceId]===void 0&&(q[se.bucketInstanceId]=[]),q[se.bucketInstanceId].push(se.featureIndex))}return q}insertCollisionBox(u,m,x,S,R,F){(x?this.ignoredGrid:this.grid).insert({bucketInstanceId:S,featureIndex:R,collisionGroupID:F,overlapMode:m},u[0],u[1],u[2],u[3])}insertCollisionCircles(u,m,x,S,R,F){const V=x?this.ignoredGrid:this.grid,H={bucketInstanceId:S,featureIndex:R,collisionGroupID:F,overlapMode:m};for(let q=0;q<u.length;q+=4)V.insertCircle(H,u[q],u[q+1],u[q+2])}projectAndGetPerspectiveRatio(u,m,x,S){let R;return S?(R=[m,x,S(m,x),1],o.transformMat4(R,R,u)):(R=[m,x,0,1],Pn(R,R,u)),{point:new o.pointGeometry((R[0]/R[3]+1)/2*this.transform.width+_n,(-R[1]/R[3]+1)/2*this.transform.height+_n),perspectiveRatio:.5+this.transform.cameraToCenterDistance/R[3]*.5}}isOffscreen(u,m,x,S){return x<_n||u>=this.screenRightBoundary||S<_n||m>this.screenBottomBoundary}isInsideGrid(u,m,x,S){return x>=0&&u<this.gridRightBoundary&&S>=0&&m<this.gridBottomBoundary}getViewportMatrix(){const u=o.identity([]);return o.translate(u,u,[-100,-100,0]),u}}function zt(w,u,m){return u*(o.EXTENT/(w.tileSize*Math.pow(2,m-w.tileID.overscaledZ)))}class dt{constructor(u,m,x,S){this.opacity=u?Math.max(0,Math.min(1,u.opacity+(u.placed?m:-m))):S&&x?1:0,this.placed=x}isHidden(){return this.opacity===0&&!this.placed}}class mt{constructor(u,m,x,S,R){this.text=new dt(u?u.text:null,m,x,R),this.icon=new dt(u?u.icon:null,m,S,R)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class $t{constructor(u,m,x){this.text=u,this.icon=m,this.skipFade=x}}class Wt{constructor(){this.invProjMatrix=o.create(),this.viewportMatrix=o.create(),this.circles=[]}}class mn{constructor(u,m,x,S,R){this.bucketInstanceId=u,this.featureIndex=m,this.sourceLayerIndex=x,this.bucketIndex=S,this.tileID=R}}class An{constructor(u){this.crossSourceCollisions=u,this.maxGroupID=0,this.collisionGroups={}}get(u){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[u]){const m=++this.maxGroupID;this.collisionGroups[u]={ID:m,predicate:x=>x.collisionGroupID===m}}return this.collisionGroups[u]}}function Qn(w,u,m,x,S){const{horizontalAlign:R,verticalAlign:F}=o.getAnchorAlignment(w),V=-(R-.5)*u,H=-(F-.5)*m,q=o.evaluateVariableOffset(w,x);return new o.pointGeometry(V+q[0]*S,H+q[1]*S)}function Jn(w,u,m,x,S,R){const{x1:F,x2:V,y1:H,y2:q,anchorPointX:ee,anchorPointY:se}=w,he=new o.pointGeometry(u,m);return x&&he._rotate(S?R:-R),{x1:F+he.x,y1:H+he.y,x2:V+he.x,y2:q+he.y,anchorPointX:ee,anchorPointY:se}}class ye{constructor(u,m,x,S,R){this.transform=u.clone(),this.terrain=m,this.collisionIndex=new tn(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=x,this.retainedQueryData={},this.collisionGroups=new An(S),this.collisionCircleArrays={},this.prevPlacement=R,R&&(R.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(u,m,x,S){const R=x.getBucket(m),F=x.latestFeatureIndex;if(!R||!F||m.id!==R.layerIds[0])return;const V=x.collisionBoxArray,H=R.layers[0].layout,q=Math.pow(2,this.transform.zoom-x.tileID.overscaledZ),ee=x.tileSize/o.EXTENT,se=this.transform.calculatePosMatrix(x.tileID.toUnwrapped()),he=H.get("text-pitch-alignment")==="map",ke=H.get("text-rotation-alignment")==="map",_e=zt(x,1,this.transform.zoom),Se=Zt(se,he,ke,this.transform,_e);let Ve=null;if(he){const rt=an(se,he,ke,this.transform,_e);Ve=o.multiply([],this.transform.labelPlaneMatrix,rt)}this.retainedQueryData[R.bucketInstanceId]=new mn(R.bucketInstanceId,F,R.sourceLayerIndex,R.index,x.tileID);const Ge={bucket:R,layout:H,posMatrix:se,textLabelPlaneMatrix:Se,labelToScreenMatrix:Ve,scale:q,textPixelRatio:ee,holdingForFade:x.holdingForFade(),collisionBoxArray:V,partiallyEvaluatedTextSize:o.evaluateSizeForZoom(R.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(R.sourceID)};if(S)for(const rt of R.sortKeyRanges){const{sortKey:De,symbolInstanceStart:ft,symbolInstanceEnd:st}=rt;u.push({sortKey:De,symbolInstanceStart:ft,symbolInstanceEnd:st,parameters:Ge})}else u.push({symbolInstanceStart:0,symbolInstanceEnd:R.symbolInstances.length,parameters:Ge})}attemptAnchorPlacement(u,m,x,S,R,F,V,H,q,ee,se,he,ke,_e,Se,Ve){const Ge=[he.textOffset0,he.textOffset1],rt=Qn(u,x,S,Ge,R),De=this.collisionIndex.placeCollisionBox(Jn(m,rt.x,rt.y,F,V,this.transform.angle),se,H,q,ee.predicate,Ve);if((!Se||this.collisionIndex.placeCollisionBox(Jn(Se,rt.x,rt.y,F,V,this.transform.angle),se,H,q,ee.predicate,Ve).box.length!==0)&&De.box.length>0){let ft;if(this.prevPlacement&&this.prevPlacement.variableOffsets[he.crossTileID]&&this.prevPlacement.placements[he.crossTileID]&&this.prevPlacement.placements[he.crossTileID].text&&(ft=this.prevPlacement.variableOffsets[he.crossTileID].anchor),he.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[he.crossTileID]={textOffset:Ge,width:x,height:S,anchor:u,textBoxScale:R,prevAnchor:ft},this.markUsedJustification(ke,u,he,_e),ke.allowVerticalPlacement&&(this.markUsedOrientation(ke,_e,he),this.placedOrientations[he.crossTileID]=_e),{shift:rt,placedGlyphBoxes:De}}}placeLayerBucketPart(u,m,x){const{bucket:S,layout:R,posMatrix:F,textLabelPlaneMatrix:V,labelToScreenMatrix:H,textPixelRatio:q,holdingForFade:ee,collisionBoxArray:se,partiallyEvaluatedTextSize:he,collisionGroup:ke}=u.parameters,_e=R.get("text-optional"),Se=R.get("icon-optional"),Ve=o.getOverlapMode(R,"text-overlap","text-allow-overlap"),Ge=Ve==="always",rt=o.getOverlapMode(R,"icon-overlap","icon-allow-overlap"),De=rt==="always",ft=R.get("text-rotation-alignment")==="map",st=R.get("text-pitch-alignment")==="map",wt=R.get("icon-text-fit")!=="none",Ct=R.get("symbol-z-order")==="viewport-y",Ut=Ge&&(De||!S.hasIconData()||Se),xt=De&&(Ge||!S.hasTextData()||_e);!S.collisionArrays&&se&&S.deserializeCollisionBoxes(se);const cn=(Jt,fn)=>{if(m[Jt.crossTileID])return;if(ee)return void(this.placements[Jt.crossTileID]=new $t(!1,!1,!1));let $n=!1,Hn=!1,Tn=!0,mr=null,gr={box:null,offscreen:null},ir={box:null,offscreen:null},ar=null,xr=null,Pi=null,$a=0,ca=0,Ba=0;fn.textFeatureIndex?$a=fn.textFeatureIndex:Jt.useRuntimeCollisionCircles&&($a=Jt.featureIndex),fn.verticalTextFeatureIndex&&(ca=fn.verticalTextFeatureIndex);const Ks=this.retainedQueryData[S.bucketInstanceId].tileID,Go=this.terrain?(vi,qn)=>this.terrain.getElevation(Ks,vi,qn):null;for(const vi of["textBox","verticalTextBox","iconBox","verticalIconBox"]){const qn=fn[vi];qn&&(qn.elevation=Go?Go(qn.anchorPointX,qn.anchorPointY):0)}const go=fn.textBox;if(go){const vi=pr=>{let Ti=o.WritingMode.horizontal;if(S.allowVerticalPlacement&&!pr&&this.prevPlacement){const ki=this.prevPlacement.placedOrientations[Jt.crossTileID];ki&&(this.placedOrientations[Jt.crossTileID]=ki,Ti=ki,this.markUsedOrientation(S,Ti,Jt))}return Ti},qn=(pr,Ti)=>{if(S.allowVerticalPlacement&&Jt.numVerticalGlyphVertices>0&&fn.verticalTextBox){for(const ki of S.writingModes)if(ki===o.WritingMode.vertical?(gr=Ti(),ir=gr):gr=pr(),gr&&gr.box&&gr.box.length)break}else gr=pr()};if(R.get("text-variable-anchor")){let pr=R.get("text-variable-anchor");if(this.prevPlacement&&this.prevPlacement.variableOffsets[Jt.crossTileID]){const Br=this.prevPlacement.variableOffsets[Jt.crossTileID];pr.indexOf(Br.anchor)>0&&(pr=pr.filter(qo=>qo!==Br.anchor),pr.unshift(Br.anchor))}const Ti=(Br,qo,bl)=>{const Ip=Br.x2-Br.x1,mu=Br.y2-Br.y1,my=Jt.textBoxScale,Mp=wt&&rt==="never"?qo:null;let Ws={box:[],offscreen:!1};const _l=Ve!=="never"?2*pr.length:pr.length;for(let wl=0;wl<_l;++wl){const ff=this.attemptAnchorPlacement(pr[wl%pr.length],Br,Ip,mu,my,ft,st,q,F,ke,wl>=pr.length?Ve:"never",Jt,S,bl,Mp,Go);if(ff&&(Ws=ff.placedGlyphBoxes,Ws&&Ws.box&&Ws.box.length)){$n=!0,mr=ff.shift;break}}return Ws};qn(()=>Ti(go,fn.iconBox,o.WritingMode.horizontal),()=>{const Br=fn.verticalTextBox;return S.allowVerticalPlacement&&!(gr&&gr.box&&gr.box.length)&&Jt.numVerticalGlyphVertices>0&&Br?Ti(Br,fn.verticalIconBox,o.WritingMode.vertical):{box:null,offscreen:null}}),gr&&($n=gr.box,Tn=gr.offscreen);const ki=vi(gr&&gr.box);if(!$n&&this.prevPlacement){const Br=this.prevPlacement.variableOffsets[Jt.crossTileID];Br&&(this.variableOffsets[Jt.crossTileID]=Br,this.markUsedJustification(S,Br.anchor,Jt,ki))}}else{const pr=(Ti,ki)=>{const Br=this.collisionIndex.placeCollisionBox(Ti,Ve,q,F,ke.predicate,Go);return Br&&Br.box&&Br.box.length&&(this.markUsedOrientation(S,ki,Jt),this.placedOrientations[Jt.crossTileID]=ki),Br};qn(()=>pr(go,o.WritingMode.horizontal),()=>{const Ti=fn.verticalTextBox;return S.allowVerticalPlacement&&Jt.numVerticalGlyphVertices>0&&Ti?pr(Ti,o.WritingMode.vertical):{box:null,offscreen:null}}),vi(gr&&gr.box&&gr.box.length)}}if(ar=gr,$n=ar&&ar.box&&ar.box.length>0,Tn=ar&&ar.offscreen,Jt.useRuntimeCollisionCircles){const vi=S.text.placedSymbolArray.get(Jt.centerJustifiedTextSymbolIndex),qn=o.evaluateSizeForFeature(S.textSizeData,he,vi),pr=R.get("text-padding");xr=this.collisionIndex.placeCollisionCircles(Ve,vi,S.lineVertexArray,S.glyphOffsetArray,qn,F,V,H,x,st,ke.predicate,Jt.collisionCircleDiameter,pr,Go),xr.circles.length&&xr.collisionDetected&&!x&&o.warnOnce("Collisions detected, but collision boxes are not shown"),$n=Ge||xr.circles.length>0&&!xr.collisionDetected,Tn=Tn&&xr.offscreen}if(fn.iconFeatureIndex&&(Ba=fn.iconFeatureIndex),fn.iconBox){const vi=qn=>{const pr=wt&&mr?Jn(qn,mr.x,mr.y,ft,st,this.transform.angle):qn;return this.collisionIndex.placeCollisionBox(pr,rt,q,F,ke.predicate,Go)};ir&&ir.box&&ir.box.length&&fn.verticalIconBox?(Pi=vi(fn.verticalIconBox),Hn=Pi.box.length>0):(Pi=vi(fn.iconBox),Hn=Pi.box.length>0),Tn=Tn&&Pi.offscreen}const ms=_e||Jt.numHorizontalGlyphVertices===0&&Jt.numVerticalGlyphVertices===0,df=Se||Jt.numIconVertices===0;if(ms||df?df?ms||(Hn=Hn&&$n):$n=Hn&&$n:Hn=$n=Hn&&$n,$n&&ar&&ar.box&&this.collisionIndex.insertCollisionBox(ar.box,Ve,R.get("text-ignore-placement"),S.bucketInstanceId,ir&&ir.box&&ca?ca:$a,ke.ID),Hn&&Pi&&this.collisionIndex.insertCollisionBox(Pi.box,rt,R.get("icon-ignore-placement"),S.bucketInstanceId,Ba,ke.ID),xr&&($n&&this.collisionIndex.insertCollisionCircles(xr.circles,Ve,R.get("text-ignore-placement"),S.bucketInstanceId,$a,ke.ID),x)){const vi=S.bucketInstanceId;let qn=this.collisionCircleArrays[vi];qn===void 0&&(qn=this.collisionCircleArrays[vi]=new Wt);for(let pr=0;pr<xr.circles.length;pr+=4)qn.circles.push(xr.circles[pr+0]),qn.circles.push(xr.circles[pr+1]),qn.circles.push(xr.circles[pr+2]),qn.circles.push(xr.collisionDetected?1:0)}if(Jt.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(S.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[Jt.crossTileID]=new $t($n||Ut,Hn||xt,Tn||S.justReloaded),m[Jt.crossTileID]=!0};if(Ct){if(u.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");const Jt=S.getSortedSymbolIndexes(this.transform.angle);for(let fn=Jt.length-1;fn>=0;--fn){const $n=Jt[fn];cn(S.symbolInstances.get($n),S.collisionArrays[$n])}}else for(let Jt=u.symbolInstanceStart;Jt<u.symbolInstanceEnd;Jt++)cn(S.symbolInstances.get(Jt),S.collisionArrays[Jt]);if(x&&S.bucketInstanceId in this.collisionCircleArrays){const Jt=this.collisionCircleArrays[S.bucketInstanceId];o.invert(Jt.invProjMatrix,F),Jt.viewportMatrix=this.collisionIndex.getViewportMatrix()}S.justReloaded=!1}markUsedJustification(u,m,x,S){let R;R=S===o.WritingMode.vertical?x.verticalPlacedTextSymbolIndex:{left:x.leftJustifiedTextSymbolIndex,center:x.centerJustifiedTextSymbolIndex,right:x.rightJustifiedTextSymbolIndex}[o.getAnchorJustification(m)];const F=[x.leftJustifiedTextSymbolIndex,x.centerJustifiedTextSymbolIndex,x.rightJustifiedTextSymbolIndex,x.verticalPlacedTextSymbolIndex];for(const V of F)V>=0&&(u.text.placedSymbolArray.get(V).crossTileID=R>=0&&V!==R?0:x.crossTileID)}markUsedOrientation(u,m,x){const S=m===o.WritingMode.horizontal||m===o.WritingMode.horizontalOnly?m:0,R=m===o.WritingMode.vertical?m:0,F=[x.leftJustifiedTextSymbolIndex,x.centerJustifiedTextSymbolIndex,x.rightJustifiedTextSymbolIndex];for(const V of F)u.text.placedSymbolArray.get(V).placedOrientation=S;x.verticalPlacedTextSymbolIndex&&(u.text.placedSymbolArray.get(x.verticalPlacedTextSymbolIndex).placedOrientation=R)}commit(u){this.commitTime=u,this.zoomAtLastRecencyCheck=this.transform.zoom;const m=this.prevPlacement;let x=!1;this.prevZoomAdjustment=m?m.zoomAdjustment(this.transform.zoom):0;const S=m?m.symbolFadeChange(u):1,R=m?m.opacities:{},F=m?m.variableOffsets:{},V=m?m.placedOrientations:{};for(const H in this.placements){const q=this.placements[H],ee=R[H];ee?(this.opacities[H]=new mt(ee,S,q.text,q.icon),x=x||q.text!==ee.text.placed||q.icon!==ee.icon.placed):(this.opacities[H]=new mt(null,S,q.text,q.icon,q.skipFade),x=x||q.text||q.icon)}for(const H in R){const q=R[H];if(!this.opacities[H]){const ee=new mt(q,S,!1,!1);ee.isHidden()||(this.opacities[H]=ee,x=x||q.text.placed||q.icon.placed)}}for(const H in F)this.variableOffsets[H]||!this.opacities[H]||this.opacities[H].isHidden()||(this.variableOffsets[H]=F[H]);for(const H in V)this.placedOrientations[H]||!this.opacities[H]||this.opacities[H].isHidden()||(this.placedOrientations[H]=V[H]);if(m&&m.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");x?this.lastPlacementChangeTime=u:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=m?m.lastPlacementChangeTime:u)}updateLayerOpacities(u,m){const x={};for(const S of m){const R=S.getBucket(u);R&&S.latestFeatureIndex&&u.id===R.layerIds[0]&&this.updateBucketOpacities(R,x,S.collisionBoxArray)}}updateBucketOpacities(u,m,x){u.hasTextData()&&u.text.opacityVertexArray.clear(),u.hasIconData()&&u.icon.opacityVertexArray.clear(),u.hasIconCollisionBoxData()&&u.iconCollisionBox.collisionVertexArray.clear(),u.hasTextCollisionBoxData()&&u.textCollisionBox.collisionVertexArray.clear();const S=u.layers[0].layout,R=new mt(null,0,!1,!1,!0),F=S.get("text-allow-overlap"),V=S.get("icon-allow-overlap"),H=S.get("text-variable-anchor"),q=S.get("text-rotation-alignment")==="map",ee=S.get("text-pitch-alignment")==="map",se=S.get("icon-text-fit")!=="none",he=new mt(null,0,F&&(V||!u.hasIconData()||S.get("icon-optional")),V&&(F||!u.hasTextData()||S.get("text-optional")),!0);!u.collisionArrays&&x&&(u.hasIconCollisionBoxData()||u.hasTextCollisionBoxData())&&u.deserializeCollisionBoxes(x);const ke=(_e,Se,Ve)=>{for(let Ge=0;Ge<Se/4;Ge++)_e.opacityVertexArray.emplaceBack(Ve)};for(let _e=0;_e<u.symbolInstances.length;_e++){const Se=u.symbolInstances.get(_e),{numHorizontalGlyphVertices:Ve,numVerticalGlyphVertices:Ge,crossTileID:rt}=Se;let De=this.opacities[rt];m[rt]?De=R:De||(De=he,this.opacities[rt]=De),m[rt]=!0;const ft=Se.numIconVertices>0,st=this.placedOrientations[Se.crossTileID],wt=st===o.WritingMode.vertical,Ct=st===o.WritingMode.horizontal||st===o.WritingMode.horizontalOnly;if(Ve>0||Ge>0){const Ut=Le(De.text);ke(u.text,Ve,wt?Xe:Ut),ke(u.text,Ge,Ct?Xe:Ut);const xt=De.text.isHidden();[Se.rightJustifiedTextSymbolIndex,Se.centerJustifiedTextSymbolIndex,Se.leftJustifiedTextSymbolIndex].forEach(fn=>{fn>=0&&(u.text.placedSymbolArray.get(fn).hidden=xt||wt?1:0)}),Se.verticalPlacedTextSymbolIndex>=0&&(u.text.placedSymbolArray.get(Se.verticalPlacedTextSymbolIndex).hidden=xt||Ct?1:0);const cn=this.variableOffsets[Se.crossTileID];cn&&this.markUsedJustification(u,cn.anchor,Se,st);const Jt=this.placedOrientations[Se.crossTileID];Jt&&(this.markUsedJustification(u,"left",Se,Jt),this.markUsedOrientation(u,Jt,Se))}if(ft){const Ut=Le(De.icon),xt=!(se&&Se.verticalPlacedIconSymbolIndex&&wt);Se.placedIconSymbolIndex>=0&&(ke(u.icon,Se.numIconVertices,xt?Ut:Xe),u.icon.placedSymbolArray.get(Se.placedIconSymbolIndex).hidden=De.icon.isHidden()),Se.verticalPlacedIconSymbolIndex>=0&&(ke(u.icon,Se.numVerticalIconVertices,xt?Xe:Ut),u.icon.placedSymbolArray.get(Se.verticalPlacedIconSymbolIndex).hidden=De.icon.isHidden())}if(u.hasIconCollisionBoxData()||u.hasTextCollisionBoxData()){const Ut=u.collisionArrays[_e];if(Ut){let xt=new o.pointGeometry(0,0);if(Ut.textBox||Ut.verticalTextBox){let Jt=!0;if(H){const fn=this.variableOffsets[rt];fn?(xt=Qn(fn.anchor,fn.width,fn.height,fn.textOffset,fn.textBoxScale),q&&xt._rotate(ee?this.transform.angle:-this.transform.angle)):Jt=!1}Ut.textBox&&W(u.textCollisionBox.collisionVertexArray,De.text.placed,!Jt||wt,xt.x,xt.y),Ut.verticalTextBox&&W(u.textCollisionBox.collisionVertexArray,De.text.placed,!Jt||Ct,xt.x,xt.y)}const cn=Boolean(!Ct&&Ut.verticalIconBox);Ut.iconBox&&W(u.iconCollisionBox.collisionVertexArray,De.icon.placed,cn,se?xt.x:0,se?xt.y:0),Ut.verticalIconBox&&W(u.iconCollisionBox.collisionVertexArray,De.icon.placed,!cn,se?xt.x:0,se?xt.y:0)}}}if(u.sortFeatures(this.transform.angle),this.retainedQueryData[u.bucketInstanceId]&&(this.retainedQueryData[u.bucketInstanceId].featureSortOrder=u.featureSortOrder),u.hasTextData()&&u.text.opacityVertexBuffer&&u.text.opacityVertexBuffer.updateData(u.text.opacityVertexArray),u.hasIconData()&&u.icon.opacityVertexBuffer&&u.icon.opacityVertexBuffer.updateData(u.icon.opacityVertexArray),u.hasIconCollisionBoxData()&&u.iconCollisionBox.collisionVertexBuffer&&u.iconCollisionBox.collisionVertexBuffer.updateData(u.iconCollisionBox.collisionVertexArray),u.hasTextCollisionBoxData()&&u.textCollisionBox.collisionVertexBuffer&&u.textCollisionBox.collisionVertexBuffer.updateData(u.textCollisionBox.collisionVertexArray),u.text.opacityVertexArray.length!==u.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${u.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${u.text.layoutVertexArray.length}) / 4`);if(u.icon.opacityVertexArray.length!==u.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${u.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${u.icon.layoutVertexArray.length}) / 4`);if(u.bucketInstanceId in this.collisionCircleArrays){const _e=this.collisionCircleArrays[u.bucketInstanceId];u.placementInvProjMatrix=_e.invProjMatrix,u.placementViewportMatrix=_e.viewportMatrix,u.collisionCircleArray=_e.circles,delete this.collisionCircleArrays[u.bucketInstanceId]}}symbolFadeChange(u){return this.fadeDuration===0?1:(u-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(u){return Math.max(0,(this.transform.zoom-u)/1.5)}hasTransitions(u){return this.stale||u-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(u,m){const x=this.zoomAtLastRecencyCheck===m?1-this.zoomAdjustment(m):1;return this.zoomAtLastRecencyCheck=m,this.commitTime+this.fadeDuration*x>u}setStale(){this.stale=!0}}function W(w,u,m,x,S){w.emplaceBack(u?1:0,m?1:0,x||0,S||0),w.emplaceBack(u?1:0,m?1:0,x||0,S||0),w.emplaceBack(u?1:0,m?1:0,x||0,S||0),w.emplaceBack(u?1:0,m?1:0,x||0,S||0)}const X=Math.pow(2,25),de=Math.pow(2,24),le=Math.pow(2,17),xe=Math.pow(2,16),Ie=Math.pow(2,9),Ce=Math.pow(2,8),Pe=Math.pow(2,1);function Le(w){if(w.opacity===0&&!w.placed)return 0;if(w.opacity===1&&w.placed)return 4294967295;const u=w.placed?1:0,m=Math.floor(127*w.opacity);return m*X+u*de+m*le+u*xe+m*Ie+u*Ce+m*Pe+u}const Xe=0;class Ye{constructor(u){this._sortAcrossTiles=u.layout.get("symbol-z-order")!=="viewport-y"&&!u.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(u,m,x,S,R){const F=this._bucketParts;for(;this._currentTileIndex<u.length;)if(m.getBucketParts(F,S,u[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,R())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,F.sort((V,H)=>V.sortKey-H.sortKey));this._currentPartIndex<F.length;)if(m.placeLayerBucketPart(F[this._currentPartIndex],this._seenCrossTileIDs,x),this._currentPartIndex++,R())return!0;return!1}}class Ue{constructor(u,m,x,S,R,F,V,H){this.placement=new ye(u,m,F,V,H),this._currentPlacementIndex=x.length-1,this._forceFullPlacement=S,this._showCollisionBoxes=R,this._done=!1}isDone(){return this._done}continuePlacement(u,m,x){const S=o.exported.now(),R=()=>{const F=o.exported.now()-S;return!this._forceFullPlacement&&F>2};for(;this._currentPlacementIndex>=0;){const F=m[u[this._currentPlacementIndex]],V=this.placement.collisionIndex.transform.zoom;if(F.type==="symbol"&&(!F.minzoom||F.minzoom<=V)&&(!F.maxzoom||F.maxzoom>V)){if(this._inProgressLayer||(this._inProgressLayer=new Ye(F)),this._inProgressLayer.continuePlacement(x[F.source],this.placement,this._showCollisionBoxes,F,R))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(u){return this.placement.commit(u),this.placement}}const Bt=512/o.EXTENT/2;class Pt{constructor(u,m,x){this.tileID=u,this.indexedSymbolInstances={},this.bucketInstanceId=x;for(let S=0;S<m.length;S++){const R=m.get(S),F=R.key;this.indexedSymbolInstances[F]||(this.indexedSymbolInstances[F]=[]),this.indexedSymbolInstances[F].push({crossTileID:R.crossTileID,coord:this.getScaledCoordinates(R,u)})}}getScaledCoordinates(u,m){const x=Bt/Math.pow(2,m.canonical.z-this.tileID.canonical.z);return{x:Math.floor((m.canonical.x*o.EXTENT+u.anchorX)*x),y:Math.floor((m.canonical.y*o.EXTENT+u.anchorY)*x)}}findMatches(u,m,x){const S=this.tileID.canonical.z<m.canonical.z?1:Math.pow(2,this.tileID.canonical.z-m.canonical.z);for(let R=0;R<u.length;R++){const F=u.get(R);if(F.crossTileID)continue;const V=this.indexedSymbolInstances[F.key];if(!V)continue;const H=this.getScaledCoordinates(F,m);for(const q of V)if(Math.abs(q.coord.x-H.x)<=S&&Math.abs(q.coord.y-H.y)<=S&&!x[q.crossTileID]){x[q.crossTileID]=!0,F.crossTileID=q.crossTileID;break}}}}class nt{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Ft{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(u){const m=Math.round((u-this.lng)/360);if(m!==0)for(const x in this.indexes){const S=this.indexes[x],R={};for(const F in S){const V=S[F];V.tileID=V.tileID.unwrapTo(V.tileID.wrap+m),R[V.tileID.key]=V}this.indexes[x]=R}this.lng=u}addBucket(u,m,x){if(this.indexes[u.overscaledZ]&&this.indexes[u.overscaledZ][u.key]){if(this.indexes[u.overscaledZ][u.key].bucketInstanceId===m.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(u.overscaledZ,this.indexes[u.overscaledZ][u.key])}for(let R=0;R<m.symbolInstances.length;R++)m.symbolInstances.get(R).crossTileID=0;this.usedCrossTileIDs[u.overscaledZ]||(this.usedCrossTileIDs[u.overscaledZ]={});const S=this.usedCrossTileIDs[u.overscaledZ];for(const R in this.indexes){const F=this.indexes[R];if(Number(R)>u.overscaledZ)for(const V in F){const H=F[V];H.tileID.isChildOf(u)&&H.findMatches(m.symbolInstances,u,S)}else{const V=F[u.scaledTo(Number(R)).key];V&&V.findMatches(m.symbolInstances,u,S)}}for(let R=0;R<m.symbolInstances.length;R++){const F=m.symbolInstances.get(R);F.crossTileID||(F.crossTileID=x.generate(),S[F.crossTileID]=!0)}return this.indexes[u.overscaledZ]===void 0&&(this.indexes[u.overscaledZ]={}),this.indexes[u.overscaledZ][u.key]=new Pt(u,m.symbolInstances,m.bucketInstanceId),!0}removeBucketCrossTileIDs(u,m){for(const x in m.indexedSymbolInstances)for(const S of m.indexedSymbolInstances[x])delete this.usedCrossTileIDs[u][S.crossTileID]}removeStaleBuckets(u){let m=!1;for(const x in this.indexes){const S=this.indexes[x];for(const R in S)u[S[R].bucketInstanceId]||(this.removeBucketCrossTileIDs(x,S[R]),delete S[R],m=!0)}return m}}class Gt{constructor(){this.layerIndexes={},this.crossTileIDs=new nt,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(u,m,x){let S=this.layerIndexes[u.id];S===void 0&&(S=this.layerIndexes[u.id]=new Ft);let R=!1;const F={};S.handleWrapJump(x);for(const V of m){const H=V.getBucket(u);H&&u.id===H.layerIds[0]&&(H.bucketInstanceId||(H.bucketInstanceId=++this.maxBucketInstanceId),S.addBucket(V.tileID,H,this.crossTileIDs)&&(R=!0),F[H.bucketInstanceId]=!0)}return S.removeStaleBuckets(F)&&(R=!0),R}pruneUnusedLayers(u){const m={};u.forEach(x=>{m[x]=!0});for(const x in this.layerIndexes)m[x]||delete this.layerIndexes[x]}}var wn=o.createLayout([{name:"a_pos",type:"Int16",components:2}]);class dn extends o.Evented{constructor(u){super(),this.sourceCache=u,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.renderHistory=[],this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,this.renderHistorySize=u._cache.max,u.usedForTerrain=!0,u.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null;for(const u in this._tiles){const m=this._tiles[u];m.textures.forEach(x=>x.destroy()),m.textures=[]}}update(u,m){this.sourceCache.update(u,m),this._renderableTilesKeys=[];for(const x of u.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:m}))this._renderableTilesKeys.push(x.key),this._tiles[x.key]||(x.posMatrix=new Float64Array(16),o.ortho(x.posMatrix,0,o.EXTENT,0,o.EXTENT,0,1),this._tiles[x.key]=new Ae(x,this.tileSize))}removeOutdated(u){const m={};this.renderHistory=this.renderHistory.filter((x,S)=>this.renderHistory.indexOf(x)===S).slice(0,this.renderHistorySize);for(const x of this._renderableTilesKeys)m[x]=!0;for(const x of this.renderHistory)m[x]=!0;for(const x in this._tiles)m[x]||(this._tiles[x].clearTextures(u),delete this._tiles[x])}getRenderableTiles(){return this._renderableTilesKeys.map(u=>this.getTileByID(u))}getTileByID(u){return this._tiles[u]}getTerrainCoords(u){const m={};for(const x of this._renderableTilesKeys){const S=this._tiles[x].tileID;if(S.canonical.equals(u.canonical)){const R=u.clone();R.posMatrix=new Float64Array(16),o.ortho(R.posMatrix,0,o.EXTENT,0,o.EXTENT,0,1),m[x]=R}else if(S.canonical.isChildOf(u.canonical)){const R=u.clone();R.posMatrix=new Float64Array(16);const F=S.canonical.z-u.canonical.z,V=S.canonical.x-(S.canonical.x>>F<<F),H=S.canonical.y-(S.canonical.y>>F<<F),q=o.EXTENT>>F;o.ortho(R.posMatrix,0,q,0,q,0,1),o.translate(R.posMatrix,R.posMatrix,[-V*q,-H*q,0]),m[x]=R}else if(u.canonical.isChildOf(S.canonical)){const R=u.clone();R.posMatrix=new Float64Array(16);const F=u.canonical.z-S.canonical.z,V=u.canonical.x-(u.canonical.x>>F<<F),H=u.canonical.y-(u.canonical.y>>F<<F),q=o.EXTENT>>F;o.ortho(R.posMatrix,0,o.EXTENT,0,o.EXTENT,0,1),o.translate(R.posMatrix,R.posMatrix,[V*q,H*q,0]),o.scale(R.posMatrix,R.posMatrix,[1/2**F,1/2**F,0]),m[x]=R}}return m}getSourceTile(u,m){const x=this.sourceCache._source;let S=u.overscaledZ-this.deltaZoom;if(S>x.maxzoom&&(S=x.maxzoom),S<x.minzoom)return null;this._sourceTileCache[u.key]||(this._sourceTileCache[u.key]=u.scaledTo(S).key);let R=this.sourceCache.getTileByID(this._sourceTileCache[u.key]);if((!R||!R.dem)&&m)for(;S>=x.minzoom&&(!R||!R.dem);)R=this.sourceCache.getTileByID(u.scaledTo(S--).key);return R}tilesAfterTime(u=Date.now()){return Object.values(this._tiles).filter(m=>m.timeLoaded>=u)}}class Cn{constructor(u,m,x){this.style=u,this.sourceCache=new dn(m),this.options=x,this.exaggeration=typeof x.exaggeration=="number"?x.exaggeration:1,this.elevationOffset=typeof x.elevationOffset=="number"?x.elevationOffset:450,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024,this.clearRerenderCache()}getDEMElevation(u,m,x,S=o.EXTENT){if(!(m>=0&&m<S&&x>=0&&x<S))return this.elevationOffset;let R=0;const F=this.getTerrainData(u);if(F.tile&&F.tile.dem){const V=o.transformMat4$1([],[m/S*o.EXTENT,x/S*o.EXTENT],F.u_terrain_matrix),H=[V[0]*F.tile.dem.dim,V[1]*F.tile.dem.dim],q=[Math.floor(H[0]),Math.floor(H[1])],ee=F.tile.dem.get(q[0],q[1]),se=F.tile.dem.get(q[0],q[1]+1),he=F.tile.dem.get(q[0]+1,q[1]),ke=F.tile.dem.get(q[0]+1,q[1]+1);R=o.number(o.number(ee,se,H[0]-q[0]),o.number(he,ke,H[0]-q[0]),H[1]-q[1])}return R}rememberForRerender(u,m){for(const x in this.sourceCache._tiles){const S=this.sourceCache._tiles[x];(S.tileID.equals(m)||S.tileID.isChildOf(m))&&(u===this.sourceCache.sourceCache.id&&(S.timeLoaded=Date.now()),this._rerender[u]=this._rerender[u]||{},this._rerender[u][S.tileID.key]=!0)}}needsRerender(u,m){return this._rerender[u]&&this._rerender[u][m.key]}clearRerenderCache(){this._rerender={}}getElevation(u,m,x,S=o.EXTENT){return(this.getDEMElevation(u,m,x,S)+this.elevationOffset)*this.exaggeration}getTerrainData(u){if(!this._emptyDemTexture){const S=this.style.map.painter.context,R=new o.RGBAImage({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new T(S,R,S.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new T(S,new o.RGBAImage({width:1,height:1}),S.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(S.gl.NEAREST,S.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=o.identity([])}const m=this.sourceCache.getSourceTile(u,!0);if(m&&m.dem&&(!m.demTexture||m.needsTerrainPrepare)){const S=this.style.map.painter.context;m.demTexture=this.style.map.painter.getTileTexture(m.dem.stride),m.demTexture?m.demTexture.update(m.dem.getPixels(),{premultiply:!1}):m.demTexture=new T(S,m.dem.getPixels(),S.gl.RGBA,{premultiply:!1}),m.demTexture.bind(S.gl.NEAREST,S.gl.CLAMP_TO_EDGE),m.needsTerrainPrepare=!1}const x=m&&m+m.tileID.key+u.key;if(x&&!this._demMatrixCache[x]){const S=this.sourceCache.sourceCache._source.maxzoom;let R=u.canonical.z-m.tileID.canonical.z;u.overscaledZ>u.canonical.z&&(u.canonical.z>=S?R=u.canonical.z-S:o.warnOnce("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const F=u.canonical.x-(u.canonical.x>>R<<R),V=u.canonical.y-(u.canonical.y>>R<<R),H=o.fromScaling(new Float64Array(16),[1/(o.EXTENT<<R),1/(o.EXTENT<<R),0]);o.translate(H,H,[F*o.EXTENT,V*o.EXTENT,0]),this._demMatrixCache[u.key]={matrix:H,coord:u}}return{u_depth:2,u_terrain:3,u_terrain_dim:m&&m.dem&&m.dem.dim||1,u_terrain_matrix:x?this._demMatrixCache[u.key].matrix:this._emptyDemMatrix,u_terrain_unpack:m&&m.dem&&m.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_offset:this.elevationOffset,u_terrain_exaggeration:this.exaggeration,texture:(m&&m.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:m}}getRTTFramebuffer(){const u=this.style.map.painter;if(!this._rttFramebuffer){const m=this.sourceCache.tileSize*this.qualityFactor;this._rttFramebuffer=u.context.createFramebuffer(m,m,!0),this._rttFramebuffer.depthAttachment.set(u.context.createRenderbuffer(u.context.gl.DEPTH_COMPONENT16,m,m))}return this._rttFramebuffer}getFramebuffer(u){const m=this.style.map.painter,x=m.width/devicePixelRatio,S=m.height/devicePixelRatio;return!this._fbo||this._fbo.width===x&&this._fbo.height===S||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new T(m.context,{width:x,height:S,data:null},m.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(m.context.gl.NEAREST,m.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new T(m.context,{width:x,height:S,data:null},m.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(m.context.gl.NEAREST,m.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=m.context.createFramebuffer(x,S,!0),this._fbo.depthAttachment.set(m.context.createRenderbuffer(m.context.gl.DEPTH_COMPONENT16,x,S))),this._fbo.colorAttachment.set(u==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const u=this.style.map.painter.context;if(this._coordsTexture)return this._coordsTexture;const m=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let R=0,F=0;R<this._coordsTextureSize;R++)for(let V=0;V<this._coordsTextureSize;V++,F+=4)m[F+0]=255&V,m[F+1]=255&R,m[F+2]=V>>8<<4|R>>8,m[F+3]=0;const x=new o.RGBAImage({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(m.buffer)),S=new T(u,x,u.gl.RGBA,{premultiply:!1});return S.bind(u.gl.NEAREST,u.gl.CLAMP_TO_EDGE),this._coordsTexture=S,S}pointCoordinate(u){const m=new Uint8Array(4),x=this.style.map.painter,S=x.context,R=S.gl;S.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),R.readPixels(u.x,x.height/devicePixelRatio-u.y-1,1,1,R.RGBA,R.UNSIGNED_BYTE,m),S.bindFramebuffer.set(null);const F=m[0]+(m[2]>>4<<8),V=m[1]+((15&m[2])<<8),H=this.coordsIndex[255-m[3]],q=H&&this.sourceCache.getTileByID(H);if(!q)return null;const ee=this._coordsTextureSize,se=(1<<q.tileID.canonical.z)*ee;return new o.MercatorCoordinate((q.tileID.canonical.x*ee+F)/se,(q.tileID.canonical.y*ee+V)/se,this.getElevation(q.tileID,F,V,ee))}getTerrainMesh(){if(this._mesh)return this._mesh;const u=this.style.map.painter.context,m=new o.PosArray,x=new o.TriangleIndexArray,S=this.meshSize,R=o.EXTENT/S,F=S*S;for(let V=0;V<=S;V++)for(let H=0;H<=S;H++)m.emplaceBack(H*R,V*R);for(let V=0;V<F;V+=S+1)for(let H=0;H<S;H++)x.emplaceBack(H+V,S+H+V+1,S+H+V+2),x.emplaceBack(H+V,S+H+V+2,H+V+1);return this._mesh={indexBuffer:u.createIndexBuffer(x),vertexBuffer:u.createVertexBuffer(m,wn.members),segments:o.SegmentVector.simpleSegment(0,0,m.length,x.length)},this._mesh}getMinMaxElevation(u){const m=this.getTerrainData(u).tile,x={minElevation:null,maxElevation:null};return m&&m.dem&&(x.minElevation=(m.dem.min+this.elevationOffset)*this.exaggeration,x.maxElevation=(m.dem.max+this.elevationOffset)*this.exaggeration),x}}const jn=(w,u)=>o.emitValidationErrors(w,u&&u.filter(m=>m.identifier!=="source.canvas")),or=o.pick(et,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),Kr=o.pick(et,["setCenter","setZoom","setBearing","setPitch"]),dr=function(){const w={},u=o.spec.$version;for(const m in o.spec.$root){const x=o.spec.$root[m];if(x.required){let S=null;S=m==="version"?u:x.type==="array"?[]:{},S!=null&&(w[m]=S)}}return w}();class Lr extends o.Evented{constructor(u,m={}){super(),this.map=u,this.dispatcher=new Z(vt(),this),this.imageManager=new P,this.imageManager.setEventedParent(this),this.glyphManager=new L(u._requestManager,m.localIdeographFontFamily),this.lineAtlas=new G(256,512),this.crossTileSymbolIndex=new Gt,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 x=this;this._rtlTextPluginCallback=Lr.registerForPluginStateChange(S=>{x.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:S.pluginStatus,pluginURL:S.pluginURL},(R,F)=>{if(o.triggerPluginCompletionEvent(R),F&&F.every(V=>V))for(const V in x.sourceCaches)x.sourceCaches[V].reload()})}),this.on("data",S=>{if(S.dataType!=="source"||S.sourceDataType!=="metadata")return;const R=this.sourceCaches[S.sourceId];if(!R)return;const F=R.getSource();if(F&&F.vectorLayerIds)for(const V in this._layers){const H=this._layers[V];H.source===F.id&&this._validateLayer(H)}})}loadURL(u,m={}){this.fire(new o.Event("dataloading",{dataType:"style"}));const x=typeof m.validate!="boolean"||m.validate,S=this.map._requestManager.transformRequest(u,o.ResourceType.Style);this._request=o.getJSON(S,(R,F)=>{this._request=null,R?this.fire(new o.ErrorEvent(R)):F&&this._load(F,x)})}loadJSON(u,m={}){this.fire(new o.Event("dataloading",{dataType:"style"})),this._request=o.exported.frame(()=>{this._request=null,this._load(u,m.validate!==!1)})}loadEmpty(){this.fire(new o.Event("dataloading",{dataType:"style"})),this._load(dr,!1)}_load(u,m){if(m&&jn(this,o.validateStyle(u)))return;this._loaded=!0,this.stylesheet=u;for(const S in u.sources)this.addSource(S,u.sources[S],{validate:!1});u.sprite?this._loadSprite(u.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(u.glyphs);const x=kt(this.stylesheet.layers);this._order=x.map(S=>S.id),this._layers={},this._serializedLayers={};for(let S of x)S=o.createStyleLayer(S),S.setEventedParent(this,{layer:{id:S.id}}),this._layers[S.id]=S,this._serializedLayers[S.id]=S.serialize();this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new U(this.stylesheet.light),this.setTerrain(this.stylesheet.terrain),this.fire(new o.Event("data",{dataType:"style"})),this.fire(new o.Event("style.load"))}_loadSprite(u){this._spriteRequest=function(m,x,S,R){let F,V,H;const q=S>1?"@2x":"";let ee=o.getJSON(x.transformRequest(x.normalizeSpriteURL(m,q,".json"),o.ResourceType.SpriteJSON),(ke,_e)=>{ee=null,H||(H=ke,F=_e,he())}),se=o.getImage(x.transformRequest(x.normalizeSpriteURL(m,q,".png"),o.ResourceType.SpriteImage),(ke,_e)=>{se=null,H||(H=ke,V=_e,he())});function he(){if(H)R(H);else if(F&&V){const ke=o.exported.getImageData(V),_e={};for(const Se in F){const{width:Ve,height:Ge,x:rt,y:De,sdf:ft,pixelRatio:st,stretchX:wt,stretchY:Ct,content:Ut}=F[Se],xt=new o.RGBAImage({width:Ve,height:Ge});o.RGBAImage.copy(ke,xt,{x:rt,y:De},{x:0,y:0},{width:Ve,height:Ge}),_e[Se]={data:xt,pixelRatio:st,sdf:ft,stretchX:wt,stretchY:Ct,content:Ut}}R(null,_e)}}return{cancel(){ee&&(ee.cancel(),ee=null),se&&(se.cancel(),se=null)}}}(u,this.map._requestManager,this.map.getPixelRatio(),(m,x)=>{if(this._spriteRequest=null,m)this.fire(new o.ErrorEvent(m));else if(x)for(const S in x)this.imageManager.addImage(S,x[S]);this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new o.Event("data",{dataType:"style"}))})}_validateLayer(u){const m=this.sourceCaches[u.source];if(!m)return;const x=u.sourceLayer;if(!x)return;const S=m.getSource();(S.type==="geojson"||S.vectorLayerIds&&S.vectorLayerIds.indexOf(x)===-1)&&this.fire(new o.ErrorEvent(new Error(`Source layer "${x}" does not exist on source "${S.id}" as specified by style layer "${u.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const u in this.sourceCaches)if(!this.sourceCaches[u].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeLayers(u){const m=[];for(const x of u){const S=this._layers[x];S.type!=="custom"&&m.push(S.serialize())}return m}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;for(const u in this.sourceCaches)if(this.sourceCaches[u].hasTransition())return!0;for(const u in this._layers)if(this._layers[u].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(u){if(!this._loaded)return;const m=this._changed;if(this._changed){const S=Object.keys(this._updatedLayers),R=Object.keys(this._removedLayers);(S.length||R.length)&&this._updateWorkerLayers(S,R);for(const F in this._updatedSources){const V=this._updatedSources[F];if(V==="reload")this._reloadSource(F);else{if(V!=="clear")throw new Error(`Invalid action ${V}`);this._clearSource(F)}}this._updateTilesForChangedImages();for(const F in this._updatedPaintProps)this._layers[F].updateTransitions(u);this.light.updateTransitions(u),this._resetUpdates()}const x={};for(const S in this.sourceCaches){const R=this.sourceCaches[S];x[S]=R.used,R.used=!1}for(const S of this._order){const R=this._layers[S];R.recalculate(u,this._availableImages),!R.isHidden(u.zoom)&&R.source&&(this.sourceCaches[R.source].used=!0)}for(const S in x){const R=this.sourceCaches[S];x[S]!==R.used&&R.fire(new o.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:S}))}this.light.recalculate(u),this.z=u.zoom,m&&this.fire(new o.Event("data",{dataType:"style"}))}_updateTilesForChangedImages(){const u=Object.keys(this._changedImages);if(u.length){for(const m in this.sourceCaches)this.sourceCaches[m].reloadTilesForDependencies(["icons","patterns"],u);this._changedImages={}}}_updateWorkerLayers(u,m){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(u),removedIds:m})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}}setTerrain(u){if(this._checkLoaded(),this._terrainDataCallback&&this.off("data",this._terrainDataCallback),this._terrainfreezeElevationCallback&&this.map.off("freezeElevation",this._terrainfreezeElevationCallback),u){const m=this.sourceCaches[u.source];if(!m)throw new Error(`cannot load terrain, because there exists no source with ID: ${u.source}`);this.terrain=new Cn(this,m,u),this.map.transform.updateElevation(this.terrain),this._terrainfreezeElevationCallback=x=>{x.freeze?this.map.transform.freezeElevation=!0:(this.map.transform.freezeElevation=!1,this.map.transform.recalculateZoom(this.terrain))},this._terrainDataCallback=x=>{x.tile&&(x.sourceId===u.source?(this.map.transform.updateElevation(this.terrain),this.terrain.rememberForRerender(x.sourceId,x.tile.tileID)):x.source.type==="geojson"&&this.terrain.rememberForRerender(x.sourceId,x.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:u}))}setState(u){if(this._checkLoaded(),jn(this,o.validateStyle(u)))return!1;(u=o.clone$1(u)).layers=kt(u.layers);const m=function(S,R){if(!S)return[{command:et.setStyle,args:[R]}];let F=[];try{if(!g(S.version,R.version))return[{command:et.setStyle,args:[R]}];g(S.center,R.center)||F.push({command:et.setCenter,args:[R.center]}),g(S.zoom,R.zoom)||F.push({command:et.setZoom,args:[R.zoom]}),g(S.bearing,R.bearing)||F.push({command:et.setBearing,args:[R.bearing]}),g(S.pitch,R.pitch)||F.push({command:et.setPitch,args:[R.pitch]}),g(S.sprite,R.sprite)||F.push({command:et.setSprite,args:[R.sprite]}),g(S.glyphs,R.glyphs)||F.push({command:et.setGlyphs,args:[R.glyphs]}),g(S.transition,R.transition)||F.push({command:et.setTransition,args:[R.transition]}),g(S.light,R.light)||F.push({command:et.setLight,args:[R.light]});const V={},H=[];(function(ee,se,he,ke){let _e;for(_e in se=se||{},ee=ee||{})Object.prototype.hasOwnProperty.call(ee,_e)&&(Object.prototype.hasOwnProperty.call(se,_e)||at(_e,he,ke));for(_e in se)Object.prototype.hasOwnProperty.call(se,_e)&&(Object.prototype.hasOwnProperty.call(ee,_e)?g(ee[_e],se[_e])||(ee[_e].type==="geojson"&&se[_e].type==="geojson"&&ct(ee,se,_e)?he.push({command:et.setGeoJSONSourceData,args:[_e,se[_e].data]}):Ke(_e,se,he,ke)):ut(_e,se,he))})(S.sources,R.sources,H,V);const q=[];S.layers&&S.layers.forEach(ee=>{V[ee.source]?F.push({command:et.removeLayer,args:[ee.id]}):q.push(ee)}),F=F.concat(H),function(ee,se,he){se=se||[];const ke=(ee=ee||[]).map(At),_e=se.map(At),Se=ee.reduce(Lt,{}),Ve=se.reduce(Lt,{}),Ge=ke.slice(),rt=Object.create(null);let De,ft,st,wt,Ct,Ut,xt;for(De=0,ft=0;De<ke.length;De++)st=ke[De],Object.prototype.hasOwnProperty.call(Ve,st)?ft++:(he.push({command:et.removeLayer,args:[st]}),Ge.splice(Ge.indexOf(st,ft),1));for(De=0,ft=0;De<_e.length;De++)st=_e[_e.length-1-De],Ge[Ge.length-1-De]!==st&&(Object.prototype.hasOwnProperty.call(Se,st)?(he.push({command:et.removeLayer,args:[st]}),Ge.splice(Ge.lastIndexOf(st,Ge.length-ft),1)):ft++,Ut=Ge[Ge.length-De],he.push({command:et.addLayer,args:[Ve[st],Ut]}),Ge.splice(Ge.length-De,0,st),rt[st]=!0);for(De=0;De<_e.length;De++)if(st=_e[De],wt=Se[st],Ct=Ve[st],!rt[st]&&!g(wt,Ct))if(g(wt.source,Ct.source)&&g(wt["source-layer"],Ct["source-layer"])&&g(wt.type,Ct.type)){for(xt in bt(wt.layout,Ct.layout,he,st,null,et.setLayoutProperty),bt(wt.paint,Ct.paint,he,st,null,et.setPaintProperty),g(wt.filter,Ct.filter)||he.push({command:et.setFilter,args:[st,Ct.filter]}),g(wt.minzoom,Ct.minzoom)&&g(wt.maxzoom,Ct.maxzoom)||he.push({command:et.setLayerZoomRange,args:[st,Ct.minzoom,Ct.maxzoom]}),wt)Object.prototype.hasOwnProperty.call(wt,xt)&&xt!=="layout"&&xt!=="paint"&&xt!=="filter"&&xt!=="metadata"&&xt!=="minzoom"&&xt!=="maxzoom"&&(xt.indexOf("paint.")===0?bt(wt[xt],Ct[xt],he,st,xt.slice(6),et.setPaintProperty):g(wt[xt],Ct[xt])||he.push({command:et.setLayerProperty,args:[st,xt,Ct[xt]]}));for(xt in Ct)Object.prototype.hasOwnProperty.call(Ct,xt)&&!Object.prototype.hasOwnProperty.call(wt,xt)&&xt!=="layout"&&xt!=="paint"&&xt!=="filter"&&xt!=="metadata"&&xt!=="minzoom"&&xt!=="maxzoom"&&(xt.indexOf("paint.")===0?bt(wt[xt],Ct[xt],he,st,xt.slice(6),et.setPaintProperty):g(wt[xt],Ct[xt])||he.push({command:et.setLayerProperty,args:[st,xt,Ct[xt]]}))}else he.push({command:et.removeLayer,args:[st]}),Ut=Ge[Ge.lastIndexOf(st)+1],he.push({command:et.addLayer,args:[Ct,Ut]})}(q,R.layers,F)}catch(V){console.warn("Unable to compute style diff:",V),F=[{command:et.setStyle,args:[R]}]}return F}(this.serialize(),u).filter(S=>!(S.command in Kr));if(m.length===0)return!1;const x=m.filter(S=>!(S.command in or));if(x.length>0)throw new Error(`Unimplemented: ${x.map(S=>S.command).join(", ")}.`);return m.forEach(S=>{S.command!=="setTransition"&&this[S.command].apply(this,S.args)}),this.stylesheet=u,!0}addImage(u,m){if(this.getImage(u))return this.fire(new o.ErrorEvent(new Error(`An image named "${u}" already exists.`)));this.imageManager.addImage(u,m),this._afterImageUpdated(u)}updateImage(u,m){this.imageManager.updateImage(u,m)}getImage(u){return this.imageManager.getImage(u)}removeImage(u){if(!this.getImage(u))return this.fire(new o.ErrorEvent(new Error(`An image named "${u}" does not exist.`)));this.imageManager.removeImage(u),this._afterImageUpdated(u)}_afterImageUpdated(u){this._availableImages=this.imageManager.listImages(),this._changedImages[u]=!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(u,m,x={}){if(this._checkLoaded(),this.sourceCaches[u]!==void 0)throw new Error(`Source "${u}" already exists.`);if(!m.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(m).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(m.type)>=0&&this._validate(o.validateStyle.source,`sources.${u}`,m,null,x))return;this.map&&this.map._collectResourceTiming&&(m.collectResourceTiming=!0);const S=this.sourceCaches[u]=new je(u,m,this.dispatcher);S.style=this,S.setEventedParent(this,()=>({isSourceLoaded:this.loaded(),source:S.serialize(),sourceId:u})),S.onAdd(this.map),this._changed=!0}removeSource(u){if(this._checkLoaded(),this.sourceCaches[u]===void 0)throw new Error("There is no source with this ID");for(const x in this._layers)if(this._layers[x].source===u)return this.fire(new o.ErrorEvent(new Error(`Source "${u}" cannot be removed while layer "${x}" is using it.`)));const m=this.sourceCaches[u];delete this.sourceCaches[u],delete this._updatedSources[u],m.fire(new o.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:u})),m.setEventedParent(null),m.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(u,m){if(this._checkLoaded(),this.sourceCaches[u]===void 0)throw new Error(`There is no source with this ID=${u}`);const x=this.sourceCaches[u].getSource();if(x.type!=="geojson")throw new Error(`geojsonSource.type is ${x.type}, which is !== 'geojson`);x.setData(m),this._changed=!0}getSource(u){return this.sourceCaches[u]&&this.sourceCaches[u].getSource()}addLayer(u,m,x={}){this._checkLoaded();const S=u.id;if(this.getLayer(S))return void this.fire(new o.ErrorEvent(new Error(`Layer "${S}" already exists on this map.`)));let R;if(u.type==="custom"){if(jn(this,o.validateCustomStyleLayer(u)))return;R=o.createStyleLayer(u)}else{if(typeof u.source=="object"&&(this.addSource(S,u.source),u=o.clone$1(u),u=o.extend(u,{source:S})),this._validate(o.validateStyle.layer,`layers.${S}`,u,{arrayIndex:-1},x))return;R=o.createStyleLayer(u),this._validateLayer(R),R.setEventedParent(this,{layer:{id:S}}),this._serializedLayers[R.id]=R.serialize()}const F=m?this._order.indexOf(m):this._order.length;if(m&&F===-1)this.fire(new o.ErrorEvent(new Error(`Cannot add layer "${S}" before non-existing layer "${m}".`)));else{if(this._order.splice(F,0,S),this._layerOrderChanged=!0,this._layers[S]=R,this._removedLayers[S]&&R.source&&R.type!=="custom"){const V=this._removedLayers[S];delete this._removedLayers[S],V.type!==R.type?this._updatedSources[R.source]="clear":(this._updatedSources[R.source]="reload",this.sourceCaches[R.source].pause())}this._updateLayer(R),R.onAdd&&R.onAdd(this.map)}}moveLayer(u,m){if(this._checkLoaded(),this._changed=!0,!this._layers[u])return void this.fire(new o.ErrorEvent(new Error(`The layer '${u}' does not exist in the map's style and cannot be moved.`)));if(u===m)return;const x=this._order.indexOf(u);this._order.splice(x,1);const S=m?this._order.indexOf(m):this._order.length;m&&S===-1?this.fire(new o.ErrorEvent(new Error(`Cannot move layer "${u}" before non-existing layer "${m}".`))):(this._order.splice(S,0,u),this._layerOrderChanged=!0)}removeLayer(u){this._checkLoaded();const m=this._layers[u];if(!m)return void this.fire(new o.ErrorEvent(new Error(`Cannot remove non-existing layer "${u}".`)));m.setEventedParent(null);const x=this._order.indexOf(u);this._order.splice(x,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[u]=m,delete this._layers[u],delete this._serializedLayers[u],delete this._updatedLayers[u],delete this._updatedPaintProps[u],m.onRemove&&m.onRemove(this.map)}getLayer(u){return this._layers[u]}hasLayer(u){return u in this._layers}setLayerZoomRange(u,m,x){this._checkLoaded();const S=this.getLayer(u);S?S.minzoom===m&&S.maxzoom===x||(m!=null&&(S.minzoom=m),x!=null&&(S.maxzoom=x),this._updateLayer(S)):this.fire(new o.ErrorEvent(new Error(`Cannot set the zoom range of non-existing layer "${u}".`)))}setFilter(u,m,x={}){this._checkLoaded();const S=this.getLayer(u);if(S){if(!g(S.filter,m))return m==null?(S.filter=void 0,void this._updateLayer(S)):void(this._validate(o.validateStyle.filter,`layers.${S.id}.filter`,m,null,x)||(S.filter=o.clone$1(m),this._updateLayer(S)))}else this.fire(new o.ErrorEvent(new Error(`Cannot filter non-existing layer "${u}".`)))}getFilter(u){return o.clone$1(this.getLayer(u).filter)}setLayoutProperty(u,m,x,S={}){this._checkLoaded();const R=this.getLayer(u);R?g(R.getLayoutProperty(m),x)||(R.setLayoutProperty(m,x,S),this._updateLayer(R)):this.fire(new o.ErrorEvent(new Error(`Cannot style non-existing layer "${u}".`)))}getLayoutProperty(u,m){const x=this.getLayer(u);if(x)return x.getLayoutProperty(m);this.fire(new o.ErrorEvent(new Error(`Cannot get style of non-existing layer "${u}".`)))}setPaintProperty(u,m,x,S={}){this._checkLoaded();const R=this.getLayer(u);R?g(R.getPaintProperty(m),x)||(R.setPaintProperty(m,x,S)&&this._updateLayer(R),this._changed=!0,this._updatedPaintProps[u]=!0):this.fire(new o.ErrorEvent(new Error(`Cannot style non-existing layer "${u}".`)))}getPaintProperty(u,m){return this.getLayer(u).getPaintProperty(m)}setFeatureState(u,m){this._checkLoaded();const x=u.source,S=u.sourceLayer,R=this.sourceCaches[x];if(R===void 0)return void this.fire(new o.ErrorEvent(new Error(`The source '${x}' does not exist in the map's style.`)));const F=R.getSource().type;F==="geojson"&&S?this.fire(new o.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):F!=="vector"||S?(u.id===void 0&&this.fire(new o.ErrorEvent(new Error("The feature id parameter must be provided."))),R.setFeatureState(S,u.id,m)):this.fire(new o.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(u,m){this._checkLoaded();const x=u.source,S=this.sourceCaches[x];if(S===void 0)return void this.fire(new o.ErrorEvent(new Error(`The source '${x}' does not exist in the map's style.`)));const R=S.getSource().type,F=R==="vector"?u.sourceLayer:void 0;R!=="vector"||F?m&&typeof u.id!="string"&&typeof u.id!="number"?this.fire(new o.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):S.removeFeatureState(F,u.id,m):this.fire(new o.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(u){this._checkLoaded();const m=u.source,x=u.sourceLayer,S=this.sourceCaches[m];if(S!==void 0)return S.getSource().type!=="vector"||x?(u.id===void 0&&this.fire(new o.ErrorEvent(new Error("The feature id parameter must be provided."))),S.getFeatureState(x,u.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 '${m}' 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,u=>u.serialize()),layers:this._serializeLayers(this._order)},u=>u!==void 0)}_updateLayer(u){this._updatedLayers[u.id]=!0,u.source&&!this._updatedSources[u.source]&&this.sourceCaches[u.source].getSource().type!=="raster"&&(this._updatedSources[u.source]="reload",this.sourceCaches[u.source].pause()),this._changed=!0}_flattenAndSortRenderedFeatures(u){const m=F=>this._layers[F].type==="fill-extrusion",x={},S=[];for(let F=this._order.length-1;F>=0;F--){const V=this._order[F];if(m(V)){x[V]=F;for(const H of u){const q=H[V];if(q)for(const ee of q)S.push(ee)}}}S.sort((F,V)=>V.intersectionZ-F.intersectionZ);const R=[];for(let F=this._order.length-1;F>=0;F--){const V=this._order[F];if(m(V))for(let H=S.length-1;H>=0;H--){const q=S[H].feature;if(x[q.layer.id]<F)break;R.push(q),S.pop()}else for(const H of u){const q=H[V];if(q)for(const ee of q)R.push(ee.feature)}}return R}queryRenderedFeatures(u,m,x){m&&m.filter&&this._validate(o.validateStyle.filter,"queryRenderedFeatures.filter",m.filter,null,m);const S={};if(m&&m.layers){if(!Array.isArray(m.layers))return this.fire(new o.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(const F of m.layers){const V=this._layers[F];if(!V)return this.fire(new o.ErrorEvent(new Error(`The layer '${F}' does not exist in the map's style and cannot be queried for features.`))),[];S[V.source]=!0}}const R=[];m.availableImages=this._availableImages;for(const F in this.sourceCaches)m.layers&&!S[F]||R.push(Ee(this.sourceCaches[F],this._layers,this._serializedLayers,u,m,x));return this.placement&&R.push(function(F,V,H,q,ee,se,he){const ke={},_e=se.queryRenderedSymbols(q),Se=[];for(const Ve of Object.keys(_e).map(Number))Se.push(he[Ve]);Se.sort(Me);for(const Ve of Se){const Ge=Ve.featureIndex.lookupSymbolFeatures(_e[Ve.bucketInstanceId],V,Ve.bucketIndex,Ve.sourceLayerIndex,ee.filter,ee.layers,ee.availableImages,F);for(const rt in Ge){const De=ke[rt]=ke[rt]||[],ft=Ge[rt];ft.sort((st,wt)=>{const Ct=Ve.featureSortOrder;if(Ct){const Ut=Ct.indexOf(st.featureIndex);return Ct.indexOf(wt.featureIndex)-Ut}return wt.featureIndex-st.featureIndex});for(const st of ft)De.push(st)}}for(const Ve in ke)ke[Ve].forEach(Ge=>{const rt=Ge.feature,De=H[F[Ve].source].getFeatureState(rt.layer["source-layer"],rt.id);rt.source=rt.layer.source,rt.layer["source-layer"]&&(rt.sourceLayer=rt.layer["source-layer"]),rt.state=De});return ke}(this._layers,this._serializedLayers,this.sourceCaches,u,m,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(R)}querySourceFeatures(u,m){m&&m.filter&&this._validate(o.validateStyle.filter,"querySourceFeatures.filter",m.filter,null,m);const x=this.sourceCaches[u];return x?function(S,R){const F=S.getRenderableIds().map(q=>S.getTileByID(q)),V=[],H={};for(let q=0;q<F.length;q++){const ee=F[q],se=ee.tileID.canonical.key;H[se]||(H[se]=!0,ee.querySourceFeatures(V,R))}return V}(x,m):[]}addSourceType(u,m,x){return Lr.getSourceType(u)?x(new Error(`A source type called "${u}" already exists.`)):(Lr.setSourceType(u,m),m.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:u,url:m.workerSourceURL},x):x(null,null))}getLight(){return this.light.getLight()}setLight(u,m={}){this._checkLoaded();const x=this.light.getLight();let S=!1;for(const F in u)if(!g(u[F],x[F])){S=!0;break}if(!S)return;const R={now:o.exported.now(),transition:o.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(u,m),this.light.updateTransitions(R)}_validate(u,m,x,S,R={}){return(!R||R.validate!==!1)&&jn(this,u.call(o.validateStyle,o.extend({key:m,style:this.serialize(),value:x,styleSpec:o.spec},S)))}_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 u in this._layers)this._layers[u].setEventedParent(null);for(const u in this.sourceCaches){const m=this.sourceCaches[u];m.setEventedParent(null),m.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()}_clearSource(u){this.sourceCaches[u].clearTiles()}_reloadSource(u){this.sourceCaches[u].resume(),this.sourceCaches[u].reload()}_updateSources(u){for(const m in this.sourceCaches)this.sourceCaches[m].update(u,this.terrain)}_generateCollisionBoxes(){for(const u in this.sourceCaches)this._reloadSource(u)}_updatePlacement(u,m,x,S,R=!1){let F=!1,V=!1;const H={};for(const q of this._order){const ee=this._layers[q];if(ee.type!=="symbol")continue;if(!H[ee.source]){const he=this.sourceCaches[ee.source];H[ee.source]=he.getRenderableIds(!0).map(ke=>he.getTileByID(ke)).sort((ke,_e)=>_e.tileID.overscaledZ-ke.tileID.overscaledZ||(ke.tileID.isLessThan(_e.tileID)?-1:1))}const se=this.crossTileSymbolIndex.addLayer(ee,H[ee.source],u.center.lng);F=F||se}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((R=R||this._layerOrderChanged||x===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(o.exported.now(),u.zoom))&&(this.pauseablePlacement=new Ue(u,this.terrain,this._order,R,m,x,S,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,H),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(o.exported.now()),V=!0),F&&this.pauseablePlacement.placement.setStale()),V||F)for(const q of this._order){const ee=this._layers[q];ee.type==="symbol"&&this.placement.updateLayerOpacities(ee,H[ee.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(o.exported.now())}_releaseSymbolFadeTiles(){for(const u in this.sourceCaches)this.sourceCaches[u].releaseSymbolFadeTiles()}getImages(u,m,x){this.imageManager.getImages(m.icons,x),this._updateTilesForChangedImages();const S=this.sourceCaches[m.source];S&&S.setDependencies(m.tileID.key,m.type,m.icons)}getGlyphs(u,m,x){this.glyphManager.getGlyphs(m.stacks,x)}getResource(u,m,x){return o.makeRequest(m,x)}}Lr.getSourceType=function(w){return be[w]},Lr.setSourceType=function(w,u){be[w]=u},Lr.registerForPluginStateChange=o.registerForPluginStateChange;var Dn="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 Mn={prelude:Nn(`#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:Nn(`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:Nn(`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:Nn(`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:Nn("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:Nn(`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:Nn(`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:Nn("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:Nn("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:Nn("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:Nn(`#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:Nn(`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:Nn(`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:Nn(`#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:Nn(`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:Nn(`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:Nn(`#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:Nn(`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:Nn(`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:Nn(`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:Nn(`#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:Nn(`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:Nn(`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:Nn(`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:Nn(`#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:Nn(`#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:Nn("uniform sampler2D u_texture;varying vec2 v_texture_pos;void main() {gl_FragColor=texture2D(u_texture,v_texture_pos);}",Dn),terrainDepth:Nn("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);}",Dn),terrainCoords:Nn("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);}",Dn)};function Nn(w,u){const m=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,x=u.match(/attribute ([\w]+) ([\w]+)/g),S=w.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),R=u.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),F=R?R.concat(S):S,V={};return{fragmentSource:w=w.replace(m,(H,q,ee,se,he)=>(V[he]=!0,q==="define"?`
#ifndef HAS_UNIFORM_u_${he}
varying ${ee} ${se} ${he};
#else
uniform ${ee} ${se} u_${he};
#endif
`:`
#ifdef HAS_UNIFORM_u_${he}
${ee} ${se} ${he} = u_${he};
#endif
`)),vertexSource:u=u.replace(m,(H,q,ee,se,he)=>{const ke=se==="float"?"vec2":"vec4",_e=he.match(/color/)?"color":ke;return V[he]?q==="define"?`
#ifndef HAS_UNIFORM_u_${he}
uniform lowp float u_${he}_t;
attribute ${ee} ${ke} a_${he};
varying ${ee} ${se} ${he};
#else
uniform ${ee} ${se} u_${he};
#endif
`:_e==="vec4"?`
#ifndef HAS_UNIFORM_u_${he}
${he} = a_${he};
#else
${ee} ${se} ${he} = u_${he};
#endif
`:`
#ifndef HAS_UNIFORM_u_${he}
${he} = unpack_mix_${_e}(a_${he}, u_${he}_t);
#else
${ee} ${se} ${he} = u_${he};
#endif
`:q==="define"?`
#ifndef HAS_UNIFORM_u_${he}
uniform lowp float u_${he}_t;
attribute ${ee} ${ke} a_${he};
#else
uniform ${ee} ${se} u_${he};
#endif
`:_e==="vec4"?`
#ifndef HAS_UNIFORM_u_${he}
${ee} ${se} ${he} = a_${he};
#else
${ee} ${se} ${he} = u_${he};
#endif
`:`
#ifndef HAS_UNIFORM_u_${he}
${ee} ${se} ${he} = unpack_mix_${_e}(a_${he}, u_${he}_t);
#else
${ee} ${se} ${he} = u_${he};
#endif
`}),staticAttributes:x,staticUniforms:F}}class ei{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(u,m,x,S,R,F,V,H,q){this.context=u;let ee=this.boundPaintVertexBuffers.length!==S.length;for(let se=0;!ee&&se<S.length;se++)this.boundPaintVertexBuffers[se]!==S[se]&&(ee=!0);u.extVertexArrayObject&&this.vao&&this.boundProgram===m&&this.boundLayoutVertexBuffer===x&&!ee&&this.boundIndexBuffer===R&&this.boundVertexOffset===F&&this.boundDynamicVertexBuffer===V&&this.boundDynamicVertexBuffer2===H&&this.boundDynamicVertexBuffer3===q?(u.bindVertexArrayOES.set(this.vao),V&&V.bind(),R&&R.dynamicDraw&&R.bind(),H&&H.bind(),q&&q.bind()):this.freshBind(m,x,S,R,F,V,H,q)}freshBind(u,m,x,S,R,F,V,H){let q;const ee=u.numAttributes,se=this.context,he=se.gl;if(se.extVertexArrayObject)this.vao&&this.destroy(),this.vao=se.extVertexArrayObject.createVertexArrayOES(),se.bindVertexArrayOES.set(this.vao),q=0,this.boundProgram=u,this.boundLayoutVertexBuffer=m,this.boundPaintVertexBuffers=x,this.boundIndexBuffer=S,this.boundVertexOffset=R,this.boundDynamicVertexBuffer=F,this.boundDynamicVertexBuffer2=V,this.boundDynamicVertexBuffer3=H;else{q=se.currentNumAttributes||0;for(let ke=ee;ke<q;ke++)he.disableVertexAttribArray(ke)}m.enableAttributes(he,u);for(const ke of x)ke.enableAttributes(he,u);F&&F.enableAttributes(he,u),V&&V.enableAttributes(he,u),H&&H.enableAttributes(he,u),m.bind(),m.setVertexAttribPointers(he,u,R);for(const ke of x)ke.bind(),ke.setVertexAttribPointers(he,u,R);F&&(F.bind(),F.setVertexAttribPointers(he,u,R)),S&&S.bind(),V&&(V.bind(),V.setVertexAttribPointers(he,u,R)),H&&(H.bind(),H.setVertexAttribPointers(he,u,R)),se.currentNumAttributes=ee}destroy(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)}}function _r(w){const u=[];for(let m=0;m<w.length;m++){if(w[m]===null)continue;const x=w[m].split(" ");u.push(x.pop())}return u}class Wn{constructor(u,m,x,S,R,F,V){const H=u.gl;this.program=H.createProgram();const q=_r(x.staticAttributes),ee=S?S.getBinderAttributes():[],se=q.concat(ee),he=Mn.prelude.staticUniforms?_r(Mn.prelude.staticUniforms):[],ke=x.staticUniforms?_r(x.staticUniforms):[],_e=S?S.getBinderUniforms():[],Se=he.concat(ke).concat(_e),Ve=[];for(const Ct of Se)Ve.indexOf(Ct)<0&&Ve.push(Ct);const Ge=S?S.defines():[];F&&Ge.push("#define OVERDRAW_INSPECTOR;"),V&&Ge.push("#define TERRAIN3D;");const rt=Ge.concat(Mn.prelude.fragmentSource,x.fragmentSource).join(`
`),De=Ge.concat(Mn.prelude.vertexSource,x.vertexSource).join(`
`),ft=H.createShader(H.FRAGMENT_SHADER);if(H.isContextLost())return void(this.failedToCreate=!0);H.shaderSource(ft,rt),H.compileShader(ft),H.attachShader(this.program,ft);const st=H.createShader(H.VERTEX_SHADER);if(H.isContextLost())return void(this.failedToCreate=!0);H.shaderSource(st,De),H.compileShader(st),H.attachShader(this.program,st),this.attributes={};const wt={};this.numAttributes=se.length;for(let Ct=0;Ct<this.numAttributes;Ct++)se[Ct]&&(H.bindAttribLocation(this.program,Ct,se[Ct]),this.attributes[se[Ct]]=Ct);H.linkProgram(this.program),H.deleteShader(st),H.deleteShader(ft);for(let Ct=0;Ct<Ve.length;Ct++){const Ut=Ve[Ct];if(Ut&&!wt[Ut]){const xt=H.getUniformLocation(this.program,Ut);xt&&(wt[Ut]=xt)}}this.fixedUniforms=R(u,wt),this.terrainUniforms=((Ct,Ut)=>({u_depth:new o.Uniform1i(Ct,Ut.u_depth),u_terrain:new o.Uniform1i(Ct,Ut.u_terrain),u_terrain_dim:new o.Uniform1f(Ct,Ut.u_terrain_dim),u_terrain_matrix:new o.UniformMatrix4f(Ct,Ut.u_terrain_matrix),u_terrain_unpack:new o.Uniform4f(Ct,Ut.u_terrain_unpack),u_terrain_offset:new o.Uniform1f(Ct,Ut.u_terrain_offset),u_terrain_exaggeration:new o.Uniform1f(Ct,Ut.u_terrain_exaggeration)}))(u,wt),this.binderUniforms=S?S.getUniforms(u,wt):[]}draw(u,m,x,S,R,F,V,H,q,ee,se,he,ke,_e,Se,Ve,Ge,rt){const De=u.gl;if(this.failedToCreate)return;if(u.program.set(this.program),u.setDepthMode(x),u.setStencilMode(S),u.setColorMode(R),u.setCullFace(F),H){u.activeTexture.set(De.TEXTURE2),De.bindTexture(De.TEXTURE_2D,H.depthTexture),u.activeTexture.set(De.TEXTURE3),De.bindTexture(De.TEXTURE_2D,H.texture);for(const st in this.terrainUniforms)this.terrainUniforms[st].set(H[st])}for(const st in this.fixedUniforms)this.fixedUniforms[st].set(V[st]);Se&&Se.setUniforms(u,this.binderUniforms,ke,{zoom:_e});let ft=0;switch(m){case De.LINES:ft=2;break;case De.TRIANGLES:ft=3;break;case De.LINE_STRIP:ft=1}for(const st of he.get()){const wt=st.vaos||(st.vaos={});(wt[q]||(wt[q]=new ei)).bind(u,this,ee,Se?Se.getPaintVertexBuffers():[],se,st.vertexOffset,Ve,Ge,rt),De.drawElements(m,st.primitiveLength*ft,De.UNSIGNED_SHORT,st.primitiveOffset*ft*2)}}}function Bn(w,u,m){const x=1/zt(m,1,u.transform.tileZoom),S=Math.pow(2,m.tileID.overscaledZ),R=m.tileSize*Math.pow(2,u.transform.tileZoom)/S,F=R*(m.tileID.canonical.x+m.tileID.wrap*S),V=R*m.tileID.canonical.y;return{u_image:0,u_texsize:m.imageAtlasTexture.size,u_scale:[x,w.fromScale,w.toScale],u_fade:w.t,u_pixel_coord_upper:[F>>16,V>>16],u_pixel_coord_lower:[65535&F,65535&V]}}const rr=(w,u,m,x)=>{const S=u.style.light,R=S.properties.get("position"),F=[R.x,R.y,R.z],V=o.create$1();S.properties.get("anchor")==="viewport"&&o.fromRotation(V,-u.transform.angle),o.transformMat3(F,F,V);const H=S.properties.get("color");return{u_matrix:w,u_lightpos:F,u_lightintensity:S.properties.get("intensity"),u_lightcolor:[H.r,H.g,H.b],u_vertical_gradient:+m,u_opacity:x}},Sr=(w,u,m,x,S,R,F)=>o.extend(rr(w,u,m,x),Bn(R,u,F),{u_height_factor:-Math.pow(2,S.overscaledZ)/F.tileSize/8}),Pr=w=>({u_matrix:w}),Wr=(w,u,m,x)=>o.extend(Pr(w),Bn(m,u,x)),Mo=(w,u)=>({u_matrix:w,u_world:u}),ou=(w,u,m,x,S)=>o.extend(Wr(w,u,m,x),{u_world:S}),qd=(w,u,m,x)=>{const S=w.transform;let R,F;if(x.paint.get("circle-pitch-alignment")==="map"){const V=zt(m,1,S.zoom);R=!0,F=[V,V]}else R=!1,F=S.pixelsToGLUnits;return{u_camera_to_center_distance:S.cameraToCenterDistance,u_scale_with_map:+(x.paint.get("circle-pitch-scale")==="map"),u_matrix:w.translatePosMatrix(u.posMatrix,m,x.paint.get("circle-translate"),x.paint.get("circle-translate-anchor")),u_pitch_with_map:+R,u_device_pixel_ratio:w.pixelRatio,u_extrude_scale:F}},cs=(w,u,m)=>{const x=zt(m,1,u.zoom),S=Math.pow(2,u.zoom-m.tileID.overscaledZ),R=m.tileID.overscaleFactor();return{u_matrix:w,u_camera_to_center_distance:u.cameraToCenterDistance,u_pixels_to_tile_units:x,u_extrude_scale:[u.pixelsToGLUnits[0]/(x*S),u.pixelsToGLUnits[1]/(x*S)],u_overscale_factor:R}},Vn=(w,u,m=1)=>({u_matrix:w,u_color:u,u_overlay:0,u_overlay_scale:m}),er=w=>({u_matrix:w}),Fr=(w,u,m,x)=>({u_matrix:w,u_extrude_scale:zt(u,1,m),u_intensity:x});function zi(w,u){const m=Math.pow(2,u.canonical.z),x=u.canonical.y;return[new o.MercatorCoordinate(0,x/m).toLngLat().lat,new o.MercatorCoordinate(0,(x+1)/m).toLngLat().lat]}const zs=(w,u,m,x)=>{const S=w.transform;return{u_matrix:fs(w,u,m,x),u_ratio:1/zt(u,1,S.zoom),u_device_pixel_ratio:w.pixelRatio,u_units_to_pixels:[1/S.pixelsToGLUnits[0],1/S.pixelsToGLUnits[1]]}},Ko=(w,u,m,x,S)=>o.extend(zs(w,u,m,S),{u_image:0,u_image_height:x}),ml=(w,u,m,x,S)=>{const R=w.transform,F=wr(u,R);return{u_matrix:fs(w,u,m,S),u_texsize:u.imageAtlasTexture.size,u_ratio:1/zt(u,1,R.zoom),u_device_pixel_ratio:w.pixelRatio,u_image:0,u_scale:[F,x.fromScale,x.toScale],u_fade:x.t,u_units_to_pixels:[1/R.pixelsToGLUnits[0],1/R.pixelsToGLUnits[1]]}},ds=(w,u,m,x,S,R)=>{const F=w.lineAtlas,V=wr(u,w.transform),H=m.layout.get("line-cap")==="round",q=F.getDash(x.from,H),ee=F.getDash(x.to,H),se=q.width*S.fromScale,he=ee.width*S.toScale;return o.extend(zs(w,u,m,R),{u_patternscale_a:[V/se,-q.height/2],u_patternscale_b:[V/he,-ee.height/2],u_sdfgamma:F.width/(256*Math.min(se,he)*w.pixelRatio)/2,u_image:0,u_tex_y_a:q.y,u_tex_y_b:ee.y,u_mix:S.t})};function wr(w,u){return 1/zt(w,1,u.tileZoom)}function fs(w,u,m,x){return w.translatePosMatrix(x?x.posMatrix:u.tileID.posMatrix,u,m.paint.get("line-translate"),m.paint.get("line-translate-anchor"))}const Lv=(w,u,m,x,S)=>{return{u_matrix:w,u_tl_parent:u,u_scale_parent:m,u_buffer_scale:1,u_fade_t:x.mix,u_opacity:x.opacity*S.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:S.paint.get("raster-brightness-min"),u_brightness_high:S.paint.get("raster-brightness-max"),u_saturation_factor:(F=S.paint.get("raster-saturation"),F>0?1-1/(1.001-F):-F),u_contrast_factor:(R=S.paint.get("raster-contrast"),R>0?1/(1-R):1+R),u_spin_weights:Fv(S.paint.get("raster-hue-rotate"))};var R,F};function Fv(w){w*=Math.PI/180;const u=Math.sin(w),m=Math.cos(w);return[(2*m+1)/3,(-Math.sqrt(3)*u-m+1)/3,(Math.sqrt(3)*u-m+1)/3]}const np=(w,u,m,x,S,R,F,V,H,q)=>{const ee=S.transform;return{u_is_size_zoom_constant:+(w==="constant"||w==="source"),u_is_size_feature_constant:+(w==="constant"||w==="camera"),u_size_t:u?u.uSizeT:0,u_size:u?u.uSize:0,u_camera_to_center_distance:ee.cameraToCenterDistance,u_pitch:ee.pitch/360*2*Math.PI,u_rotate_symbol:+m,u_aspect_ratio:ee.width/ee.height,u_fade_change:S.options.fadeDuration?S.symbolFadeChange:1,u_matrix:R,u_label_plane_matrix:F,u_coord_matrix:V,u_is_text:+H,u_pitch_with_map:+x,u_texsize:q,u_texture:0}},Zd=(w,u,m,x,S,R,F,V,H,q,ee)=>{const se=S.transform;return o.extend(np(w,u,m,x,S,R,F,V,H,q),{u_gamma_scale:x?Math.cos(se._pitch)*se.cameraToCenterDistance:1,u_device_pixel_ratio:S.pixelRatio,u_is_halo:+ee})},zv=(w,u,m,x,S,R,F,V,H,q)=>o.extend(Zd(w,u,m,x,S,R,F,V,!0,H,!0),{u_texsize_icon:q,u_texture_icon:1}),W1=(w,u,m)=>({u_matrix:w,u_opacity:u,u_color:m}),G1=(w,u,m,x,S,R)=>o.extend(function(F,V,H,q){const ee=H.imageManager.getPattern(F.from.toString()),se=H.imageManager.getPattern(F.to.toString()),{width:he,height:ke}=H.imageManager.getPixelSize(),_e=Math.pow(2,q.tileID.overscaledZ),Se=q.tileSize*Math.pow(2,H.transform.tileZoom)/_e,Ve=Se*(q.tileID.canonical.x+q.tileID.wrap*_e),Ge=Se*q.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:ee.tl,u_pattern_br_a:ee.br,u_pattern_tl_b:se.tl,u_pattern_br_b:se.br,u_texsize:[he,ke],u_mix:V.t,u_pattern_size_a:ee.displaySize,u_pattern_size_b:se.displaySize,u_scale_a:V.fromScale,u_scale_b:V.toScale,u_tile_units_to_pixels:1/zt(q,1,H.transform.tileZoom),u_pixel_coord_upper:[Ve>>16,Ge>>16],u_pixel_coord_lower:[65535&Ve,65535&Ge]}}(x,R,m,S),{u_matrix:w,u_opacity:u}),rp={fillExtrusion:(w,u)=>({u_matrix:new o.UniformMatrix4f(w,u.u_matrix),u_lightpos:new o.Uniform3f(w,u.u_lightpos),u_lightintensity:new o.Uniform1f(w,u.u_lightintensity),u_lightcolor:new o.Uniform3f(w,u.u_lightcolor),u_vertical_gradient:new o.Uniform1f(w,u.u_vertical_gradient),u_opacity:new o.Uniform1f(w,u.u_opacity)}),fillExtrusionPattern:(w,u)=>({u_matrix:new o.UniformMatrix4f(w,u.u_matrix),u_lightpos:new o.Uniform3f(w,u.u_lightpos),u_lightintensity:new o.Uniform1f(w,u.u_lightintensity),u_lightcolor:new o.Uniform3f(w,u.u_lightcolor),u_vertical_gradient:new o.Uniform1f(w,u.u_vertical_gradient),u_height_factor:new o.Uniform1f(w,u.u_height_factor),u_image:new o.Uniform1i(w,u.u_image),u_texsize:new o.Uniform2f(w,u.u_texsize),u_pixel_coord_upper:new o.Uniform2f(w,u.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(w,u.u_pixel_coord_lower),u_scale:new o.Uniform3f(w,u.u_scale),u_fade:new o.Uniform1f(w,u.u_fade),u_opacity:new o.Uniform1f(w,u.u_opacity)}),fill:(w,u)=>({u_matrix:new o.UniformMatrix4f(w,u.u_matrix)}),fillPattern:(w,u)=>({u_matrix:new o.UniformMatrix4f(w,u.u_matrix),u_image:new o.Uniform1i(w,u.u_image),u_texsize:new o.Uniform2f(w,u.u_texsize),u_pixel_coord_upper:new o.Uniform2f(w,u.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(w,u.u_pixel_coord_lower),u_scale:new o.Uniform3f(w,u.u_scale),u_fade:new o.Uniform1f(w,u.u_fade)}),fillOutline:(w,u)=>({u_matrix:new o.UniformMatrix4f(w,u.u_matrix),u_world:new o.Uniform2f(w,u.u_world)}),fillOutlinePattern:(w,u)=>({u_matrix:new o.UniformMatrix4f(w,u.u_matrix),u_world:new o.Uniform2f(w,u.u_world),u_image:new o.Uniform1i(w,u.u_image),u_texsize:new o.Uniform2f(w,u.u_texsize),u_pixel_coord_upper:new o.Uniform2f(w,u.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(w,u.u_pixel_coord_lower),u_scale:new o.Uniform3f(w,u.u_scale),u_fade:new o.Uniform1f(w,u.u_fade)}),circle:(w,u)=>({u_camera_to_center_distance:new o.Uniform1f(w,u.u_camera_to_center_distance),u_scale_with_map:new o.Uniform1i(w,u.u_scale_with_map),u_pitch_with_map:new o.Uniform1i(w,u.u_pitch_with_map),u_extrude_scale:new o.Uniform2f(w,u.u_extrude_scale),u_device_pixel_ratio:new o.Uniform1f(w,u.u_device_pixel_ratio),u_matrix:new o.UniformMatrix4f(w,u.u_matrix)}),collisionBox:(w,u)=>({u_matrix:new o.UniformMatrix4f(w,u.u_matrix),u_camera_to_center_distance:new o.Uniform1f(w,u.u_camera_to_center_distance),u_pixels_to_tile_units:new o.Uniform1f(w,u.u_pixels_to_tile_units),u_extrude_scale:new o.Uniform2f(w,u.u_extrude_scale),u_overscale_factor:new o.Uniform1f(w,u.u_overscale_factor)}),collisionCircle:(w,u)=>({u_matrix:new o.UniformMatrix4f(w,u.u_matrix),u_inv_matrix:new o.UniformMatrix4f(w,u.u_inv_matrix),u_camera_to_center_distance:new o.Uniform1f(w,u.u_camera_to_center_distance),u_viewport_size:new o.Uniform2f(w,u.u_viewport_size)}),debug:(w,u)=>({u_color:new o.UniformColor(w,u.u_color),u_matrix:new o.UniformMatrix4f(w,u.u_matrix),u_overlay:new o.Uniform1i(w,u.u_overlay),u_overlay_scale:new o.Uniform1f(w,u.u_overlay_scale)}),clippingMask:(w,u)=>({u_matrix:new o.UniformMatrix4f(w,u.u_matrix)}),heatmap:(w,u)=>({u_extrude_scale:new o.Uniform1f(w,u.u_extrude_scale),u_intensity:new o.Uniform1f(w,u.u_intensity),u_matrix:new o.UniformMatrix4f(w,u.u_matrix)}),heatmapTexture:(w,u)=>({u_matrix:new o.UniformMatrix4f(w,u.u_matrix),u_world:new o.Uniform2f(w,u.u_world),u_image:new o.Uniform1i(w,u.u_image),u_color_ramp:new o.Uniform1i(w,u.u_color_ramp),u_opacity:new o.Uniform1f(w,u.u_opacity)}),hillshade:(w,u)=>({u_matrix:new o.UniformMatrix4f(w,u.u_matrix),u_image:new o.Uniform1i(w,u.u_image),u_latrange:new o.Uniform2f(w,u.u_latrange),u_light:new o.Uniform2f(w,u.u_light),u_shadow:new o.UniformColor(w,u.u_shadow),u_highlight:new o.UniformColor(w,u.u_highlight),u_accent:new o.UniformColor(w,u.u_accent)}),hillshadePrepare:(w,u)=>({u_matrix:new o.UniformMatrix4f(w,u.u_matrix),u_image:new o.Uniform1i(w,u.u_image),u_dimension:new o.Uniform2f(w,u.u_dimension),u_zoom:new o.Uniform1f(w,u.u_zoom),u_unpack:new o.Uniform4f(w,u.u_unpack)}),line:(w,u)=>({u_matrix:new o.UniformMatrix4f(w,u.u_matrix),u_ratio:new o.Uniform1f(w,u.u_ratio),u_device_pixel_ratio:new o.Uniform1f(w,u.u_device_pixel_ratio),u_units_to_pixels:new o.Uniform2f(w,u.u_units_to_pixels)}),lineGradient:(w,u)=>({u_matrix:new o.UniformMatrix4f(w,u.u_matrix),u_ratio:new o.Uniform1f(w,u.u_ratio),u_device_pixel_ratio:new o.Uniform1f(w,u.u_device_pixel_ratio),u_units_to_pixels:new o.Uniform2f(w,u.u_units_to_pixels),u_image:new o.Uniform1i(w,u.u_image),u_image_height:new o.Uniform1f(w,u.u_image_height)}),linePattern:(w,u)=>({u_matrix:new o.UniformMatrix4f(w,u.u_matrix),u_texsize:new o.Uniform2f(w,u.u_texsize),u_ratio:new o.Uniform1f(w,u.u_ratio),u_device_pixel_ratio:new o.Uniform1f(w,u.u_device_pixel_ratio),u_image:new o.Uniform1i(w,u.u_image),u_units_to_pixels:new o.Uniform2f(w,u.u_units_to_pixels),u_scale:new o.Uniform3f(w,u.u_scale),u_fade:new o.Uniform1f(w,u.u_fade)}),lineSDF:(w,u)=>({u_matrix:new o.UniformMatrix4f(w,u.u_matrix),u_ratio:new o.Uniform1f(w,u.u_ratio),u_device_pixel_ratio:new o.Uniform1f(w,u.u_device_pixel_ratio),u_units_to_pixels:new o.Uniform2f(w,u.u_units_to_pixels),u_patternscale_a:new o.Uniform2f(w,u.u_patternscale_a),u_patternscale_b:new o.Uniform2f(w,u.u_patternscale_b),u_sdfgamma:new o.Uniform1f(w,u.u_sdfgamma),u_image:new o.Uniform1i(w,u.u_image),u_tex_y_a:new o.Uniform1f(w,u.u_tex_y_a),u_tex_y_b:new o.Uniform1f(w,u.u_tex_y_b),u_mix:new o.Uniform1f(w,u.u_mix)}),raster:(w,u)=>({u_matrix:new o.UniformMatrix4f(w,u.u_matrix),u_tl_parent:new o.Uniform2f(w,u.u_tl_parent),u_scale_parent:new o.Uniform1f(w,u.u_scale_parent),u_buffer_scale:new o.Uniform1f(w,u.u_buffer_scale),u_fade_t:new o.Uniform1f(w,u.u_fade_t),u_opacity:new o.Uniform1f(w,u.u_opacity),u_image0:new o.Uniform1i(w,u.u_image0),u_image1:new o.Uniform1i(w,u.u_image1),u_brightness_low:new o.Uniform1f(w,u.u_brightness_low),u_brightness_high:new o.Uniform1f(w,u.u_brightness_high),u_saturation_factor:new o.Uniform1f(w,u.u_saturation_factor),u_contrast_factor:new o.Uniform1f(w,u.u_contrast_factor),u_spin_weights:new o.Uniform3f(w,u.u_spin_weights)}),symbolIcon:(w,u)=>({u_is_size_zoom_constant:new o.Uniform1i(w,u.u_is_size_zoom_constant),u_is_size_feature_constant:new o.Uniform1i(w,u.u_is_size_feature_constant),u_size_t:new o.Uniform1f(w,u.u_size_t),u_size:new o.Uniform1f(w,u.u_size),u_camera_to_center_distance:new o.Uniform1f(w,u.u_camera_to_center_distance),u_pitch:new o.Uniform1f(w,u.u_pitch),u_rotate_symbol:new o.Uniform1i(w,u.u_rotate_symbol),u_aspect_ratio:new o.Uniform1f(w,u.u_aspect_ratio),u_fade_change:new o.Uniform1f(w,u.u_fade_change),u_matrix:new o.UniformMatrix4f(w,u.u_matrix),u_label_plane_matrix:new o.UniformMatrix4f(w,u.u_label_plane_matrix),u_coord_matrix:new o.UniformMatrix4f(w,u.u_coord_matrix),u_is_text:new o.Uniform1i(w,u.u_is_text),u_pitch_with_map:new o.Uniform1i(w,u.u_pitch_with_map),u_texsize:new o.Uniform2f(w,u.u_texsize),u_texture:new o.Uniform1i(w,u.u_texture)}),symbolSDF:(w,u)=>({u_is_size_zoom_constant:new o.Uniform1i(w,u.u_is_size_zoom_constant),u_is_size_feature_constant:new o.Uniform1i(w,u.u_is_size_feature_constant),u_size_t:new o.Uniform1f(w,u.u_size_t),u_size:new o.Uniform1f(w,u.u_size),u_camera_to_center_distance:new o.Uniform1f(w,u.u_camera_to_center_distance),u_pitch:new o.Uniform1f(w,u.u_pitch),u_rotate_symbol:new o.Uniform1i(w,u.u_rotate_symbol),u_aspect_ratio:new o.Uniform1f(w,u.u_aspect_ratio),u_fade_change:new o.Uniform1f(w,u.u_fade_change),u_matrix:new o.UniformMatrix4f(w,u.u_matrix),u_label_plane_matrix:new o.UniformMatrix4f(w,u.u_label_plane_matrix),u_coord_matrix:new o.UniformMatrix4f(w,u.u_coord_matrix),u_is_text:new o.Uniform1i(w,u.u_is_text),u_pitch_with_map:new o.Uniform1i(w,u.u_pitch_with_map),u_texsize:new o.Uniform2f(w,u.u_texsize),u_texture:new o.Uniform1i(w,u.u_texture),u_gamma_scale:new o.Uniform1f(w,u.u_gamma_scale),u_device_pixel_ratio:new o.Uniform1f(w,u.u_device_pixel_ratio),u_is_halo:new o.Uniform1i(w,u.u_is_halo)}),symbolTextAndIcon:(w,u)=>({u_is_size_zoom_constant:new o.Uniform1i(w,u.u_is_size_zoom_constant),u_is_size_feature_constant:new o.Uniform1i(w,u.u_is_size_feature_constant),u_size_t:new o.Uniform1f(w,u.u_size_t),u_size:new o.Uniform1f(w,u.u_size),u_camera_to_center_distance:new o.Uniform1f(w,u.u_camera_to_center_distance),u_pitch:new o.Uniform1f(w,u.u_pitch),u_rotate_symbol:new o.Uniform1i(w,u.u_rotate_symbol),u_aspect_ratio:new o.Uniform1f(w,u.u_aspect_ratio),u_fade_change:new o.Uniform1f(w,u.u_fade_change),u_matrix:new o.UniformMatrix4f(w,u.u_matrix),u_label_plane_matrix:new o.UniformMatrix4f(w,u.u_label_plane_matrix),u_coord_matrix:new o.UniformMatrix4f(w,u.u_coord_matrix),u_is_text:new o.Uniform1i(w,u.u_is_text),u_pitch_with_map:new o.Uniform1i(w,u.u_pitch_with_map),u_texsize:new o.Uniform2f(w,u.u_texsize),u_texsize_icon:new o.Uniform2f(w,u.u_texsize_icon),u_texture:new o.Uniform1i(w,u.u_texture),u_texture_icon:new o.Uniform1i(w,u.u_texture_icon),u_gamma_scale:new o.Uniform1f(w,u.u_gamma_scale),u_device_pixel_ratio:new o.Uniform1f(w,u.u_device_pixel_ratio),u_is_halo:new o.Uniform1i(w,u.u_is_halo)}),background:(w,u)=>({u_matrix:new o.UniformMatrix4f(w,u.u_matrix),u_opacity:new o.Uniform1f(w,u.u_opacity),u_color:new o.UniformColor(w,u.u_color)}),backgroundPattern:(w,u)=>({u_matrix:new o.UniformMatrix4f(w,u.u_matrix),u_opacity:new o.Uniform1f(w,u.u_opacity),u_image:new o.Uniform1i(w,u.u_image),u_pattern_tl_a:new o.Uniform2f(w,u.u_pattern_tl_a),u_pattern_br_a:new o.Uniform2f(w,u.u_pattern_br_a),u_pattern_tl_b:new o.Uniform2f(w,u.u_pattern_tl_b),u_pattern_br_b:new o.Uniform2f(w,u.u_pattern_br_b),u_texsize:new o.Uniform2f(w,u.u_texsize),u_mix:new o.Uniform1f(w,u.u_mix),u_pattern_size_a:new o.Uniform2f(w,u.u_pattern_size_a),u_pattern_size_b:new o.Uniform2f(w,u.u_pattern_size_b),u_scale_a:new o.Uniform1f(w,u.u_scale_a),u_scale_b:new o.Uniform1f(w,u.u_scale_b),u_pixel_coord_upper:new o.Uniform2f(w,u.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(w,u.u_pixel_coord_lower),u_tile_units_to_pixels:new o.Uniform1f(w,u.u_tile_units_to_pixels)}),terrain:(w,u)=>({u_matrix:new o.UniformMatrix4f(w,u.u_matrix),u_texture:new o.Uniform1i(w,u.u_texture)}),terrainDepth:(w,u)=>({u_matrix:new o.UniformMatrix4f(w,u.u_matrix)}),terrainCoords:(w,u)=>({u_matrix:new o.UniformMatrix4f(w,u.u_matrix),u_texture:new o.Uniform1i(w,u.u_texture),u_terrain_coords_id:new o.Uniform1f(w,u.u_terrain_coords_id)})};class ip{constructor(u,m,x){this.context=u;const S=u.gl;this.buffer=S.createBuffer(),this.dynamicDraw=Boolean(x),this.context.unbindVAO(),u.bindElementBuffer.set(this.buffer),S.bufferData(S.ELEMENT_ARRAY_BUFFER,m.arrayBuffer,this.dynamicDraw?S.DYNAMIC_DRAW:S.STATIC_DRAW),this.dynamicDraw||delete m.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(u){const m=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),m.bufferSubData(m.ELEMENT_ARRAY_BUFFER,0,u.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const op={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class ap{constructor(u,m,x,S){this.length=m.length,this.attributes=x,this.itemSize=m.bytesPerElement,this.dynamicDraw=S,this.context=u;const R=u.gl;this.buffer=R.createBuffer(),u.bindVertexBuffer.set(this.buffer),R.bufferData(R.ARRAY_BUFFER,m.arrayBuffer,this.dynamicDraw?R.DYNAMIC_DRAW:R.STATIC_DRAW),this.dynamicDraw||delete m.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(u){if(u.length!==this.length)throw new Error(`Length of new data is ${u.length}, which doesn't match current length of ${this.length}`);const m=this.context.gl;this.bind(),m.bufferSubData(m.ARRAY_BUFFER,0,u.arrayBuffer)}enableAttributes(u,m){for(let x=0;x<this.attributes.length;x++){const S=m.attributes[this.attributes[x].name];S!==void 0&&u.enableVertexAttribArray(S)}}setVertexAttribPointers(u,m,x){for(let S=0;S<this.attributes.length;S++){const R=this.attributes[S],F=m.attributes[R.name];F!==void 0&&u.vertexAttribPointer(F,R.components,u[op[R.type]],!1,this.itemSize,R.offset+this.itemSize*(x||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class fr{constructor(u){this.gl=u.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(u){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class $v extends fr{getDefault(){return o.Color.transparent}set(u){const m=this.current;(u.r!==m.r||u.g!==m.g||u.b!==m.b||u.a!==m.a||this.dirty)&&(this.gl.clearColor(u.r,u.g,u.b,u.a),this.current=u,this.dirty=!1)}}class q1 extends fr{getDefault(){return 1}set(u){(u!==this.current||this.dirty)&&(this.gl.clearDepth(u),this.current=u,this.dirty=!1)}}class vc extends fr{getDefault(){return 0}set(u){(u!==this.current||this.dirty)&&(this.gl.clearStencil(u),this.current=u,this.dirty=!1)}}class yc extends fr{getDefault(){return[!0,!0,!0,!0]}set(u){const m=this.current;(u[0]!==m[0]||u[1]!==m[1]||u[2]!==m[2]||u[3]!==m[3]||this.dirty)&&(this.gl.colorMask(u[0],u[1],u[2],u[3]),this.current=u,this.dirty=!1)}}class Bv extends fr{getDefault(){return!0}set(u){(u!==this.current||this.dirty)&&(this.gl.depthMask(u),this.current=u,this.dirty=!1)}}class Ro extends fr{getDefault(){return 255}set(u){(u!==this.current||this.dirty)&&(this.gl.stencilMask(u),this.current=u,this.dirty=!1)}}class sp extends fr{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(u){const m=this.current;(u.func!==m.func||u.ref!==m.ref||u.mask!==m.mask||this.dirty)&&(this.gl.stencilFunc(u.func,u.ref,u.mask),this.current=u,this.dirty=!1)}}class Xd extends fr{getDefault(){const u=this.gl;return[u.KEEP,u.KEEP,u.KEEP]}set(u){const m=this.current;(u[0]!==m[0]||u[1]!==m[1]||u[2]!==m[2]||this.dirty)&&(this.gl.stencilOp(u[0],u[1],u[2]),this.current=u,this.dirty=!1)}}class Yd extends fr{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const m=this.gl;u?m.enable(m.STENCIL_TEST):m.disable(m.STENCIL_TEST),this.current=u,this.dirty=!1}}class lp extends fr{getDefault(){return[0,1]}set(u){const m=this.current;(u[0]!==m[0]||u[1]!==m[1]||this.dirty)&&(this.gl.depthRange(u[0],u[1]),this.current=u,this.dirty=!1)}}class up extends fr{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const m=this.gl;u?m.enable(m.DEPTH_TEST):m.disable(m.DEPTH_TEST),this.current=u,this.dirty=!1}}class Qd extends fr{getDefault(){return this.gl.LESS}set(u){(u!==this.current||this.dirty)&&(this.gl.depthFunc(u),this.current=u,this.dirty=!1)}}class cp extends fr{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const m=this.gl;u?m.enable(m.BLEND):m.disable(m.BLEND),this.current=u,this.dirty=!1}}class dp extends fr{getDefault(){const u=this.gl;return[u.ONE,u.ZERO]}set(u){const m=this.current;(u[0]!==m[0]||u[1]!==m[1]||this.dirty)&&(this.gl.blendFunc(u[0],u[1]),this.current=u,this.dirty=!1)}}class Jd extends fr{getDefault(){return o.Color.transparent}set(u){const m=this.current;(u.r!==m.r||u.g!==m.g||u.b!==m.b||u.a!==m.a||this.dirty)&&(this.gl.blendColor(u.r,u.g,u.b,u.a),this.current=u,this.dirty=!1)}}class Vv extends fr{getDefault(){return this.gl.FUNC_ADD}set(u){(u!==this.current||this.dirty)&&(this.gl.blendEquation(u),this.current=u,this.dirty=!1)}}class Uv extends fr{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const m=this.gl;u?m.enable(m.CULL_FACE):m.disable(m.CULL_FACE),this.current=u,this.dirty=!1}}class au extends fr{getDefault(){return this.gl.BACK}set(u){(u!==this.current||this.dirty)&&(this.gl.cullFace(u),this.current=u,this.dirty=!1)}}class Z1 extends fr{getDefault(){return this.gl.CCW}set(u){(u!==this.current||this.dirty)&&(this.gl.frontFace(u),this.current=u,this.dirty=!1)}}class X1 extends fr{getDefault(){return null}set(u){(u!==this.current||this.dirty)&&(this.gl.useProgram(u),this.current=u,this.dirty=!1)}}class Y1 extends fr{getDefault(){return this.gl.TEXTURE0}set(u){(u!==this.current||this.dirty)&&(this.gl.activeTexture(u),this.current=u,this.dirty=!1)}}class Q1 extends fr{getDefault(){const u=this.gl;return[0,0,u.drawingBufferWidth,u.drawingBufferHeight]}set(u){const m=this.current;(u[0]!==m[0]||u[1]!==m[1]||u[2]!==m[2]||u[3]!==m[3]||this.dirty)&&(this.gl.viewport(u[0],u[1],u[2],u[3]),this.current=u,this.dirty=!1)}}class J1 extends fr{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const m=this.gl;m.bindFramebuffer(m.FRAMEBUFFER,u),this.current=u,this.dirty=!1}}class ew extends fr{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const m=this.gl;m.bindRenderbuffer(m.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class fp extends fr{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const m=this.gl;m.bindTexture(m.TEXTURE_2D,u),this.current=u,this.dirty=!1}}class ef extends fr{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const m=this.gl;m.bindBuffer(m.ARRAY_BUFFER,u),this.current=u,this.dirty=!1}}class hp extends fr{getDefault(){return null}set(u){const m=this.gl;m.bindBuffer(m.ELEMENT_ARRAY_BUFFER,u),this.current=u,this.dirty=!1}}class pp extends fr{constructor(u){super(u),this.vao=u.extVertexArrayObject}getDefault(){return null}set(u){this.vao&&(u!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(u),this.current=u,this.dirty=!1)}}class su extends fr{getDefault(){return 4}set(u){if(u===this.current&&!this.dirty)return;const m=this.gl;m.pixelStorei(m.UNPACK_ALIGNMENT,u),this.current=u,this.dirty=!1}}class jv extends fr{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const m=this.gl;m.pixelStorei(m.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),this.current=u,this.dirty=!1}}class Hv extends fr{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const m=this.gl;m.pixelStorei(m.UNPACK_FLIP_Y_WEBGL,u),this.current=u,this.dirty=!1}}class tf extends fr{constructor(u,m){super(u),this.context=u,this.parent=m}getDefault(){return null}}class gl extends tf{setDirty(){this.dirty=!0}set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const m=this.gl;m.framebufferTexture2D(m.FRAMEBUFFER,m.COLOR_ATTACHMENT0,m.TEXTURE_2D,u,0),this.current=u,this.dirty=!1}}class Kv extends tf{set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const m=this.gl;m.framebufferRenderbuffer(m.FRAMEBUFFER,m.DEPTH_ATTACHMENT,m.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class lu{constructor(u,m,x,S){this.context=u,this.width=m,this.height=x;const R=u.gl,F=this.framebuffer=R.createFramebuffer();if(this.colorAttachment=new gl(u,F),S&&(this.depthAttachment=new Kv(u,F)),R.checkFramebufferStatus(R.FRAMEBUFFER)!==R.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const u=this.context.gl,m=this.colorAttachment.get();if(m&&u.deleteTexture(m),this.depthAttachment){const x=this.depthAttachment.get();x&&u.deleteRenderbuffer(x)}u.deleteFramebuffer(this.framebuffer)}}class Dr{constructor(u,m,x){this.blendFunction=u,this.blendColor=m,this.mask=x}}Dr.Replace=[1,0],Dr.disabled=new Dr(Dr.Replace,o.Color.transparent,[!1,!1,!1,!1]),Dr.unblended=new Dr(Dr.Replace,o.Color.transparent,[!0,!0,!0,!0]),Dr.alphaBlended=new Dr([1,771],o.Color.transparent,[!0,!0,!0,!0]);class Wv{constructor(u){this.gl=u,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new $v(this),this.clearDepth=new q1(this),this.clearStencil=new vc(this),this.colorMask=new yc(this),this.depthMask=new Bv(this),this.stencilMask=new Ro(this),this.stencilFunc=new sp(this),this.stencilOp=new Xd(this),this.stencilTest=new Yd(this),this.depthRange=new lp(this),this.depthTest=new up(this),this.depthFunc=new Qd(this),this.blend=new cp(this),this.blendFunc=new dp(this),this.blendColor=new Jd(this),this.blendEquation=new Vv(this),this.cullFace=new Uv(this),this.cullFaceSide=new au(this),this.frontFace=new Z1(this),this.program=new X1(this),this.activeTexture=new Y1(this),this.viewport=new Q1(this),this.bindFramebuffer=new J1(this),this.bindRenderbuffer=new ew(this),this.bindTexture=new fp(this),this.bindVertexBuffer=new ef(this),this.bindElementBuffer=new hp(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new pp(this),this.pixelStoreUnpack=new su(this),this.pixelStoreUnpackPremultiplyAlpha=new jv(this),this.pixelStoreUnpackFlipY=new Hv(this),this.extTextureFilterAnisotropic=u.getExtension("EXT_texture_filter_anisotropic")||u.getExtension("MOZ_EXT_texture_filter_anisotropic")||u.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=u.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=u.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(u.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=u.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=u.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=u.getParameter(u.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(u,m){return new ip(this,u,m)}createVertexBuffer(u,m,x){return new ap(this,u,m,x)}createRenderbuffer(u,m,x){const S=this.gl,R=S.createRenderbuffer();return this.bindRenderbuffer.set(R),S.renderbufferStorage(S.RENDERBUFFER,u,m,x),this.bindRenderbuffer.set(null),R}createFramebuffer(u,m,x){return new lu(this,u,m,x)}clear({color:u,depth:m}){const x=this.gl;let S=0;u&&(S|=x.COLOR_BUFFER_BIT,this.clearColor.set(u),this.colorMask.set([!0,!0,!0,!0])),m!==void 0&&(S|=x.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(m),this.depthMask.set(!0)),x.clear(S)}setCullFace(u){u.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(u.mode),this.frontFace.set(u.frontFace))}setDepthMode(u){u.func!==this.gl.ALWAYS||u.mask?(this.depthTest.set(!0),this.depthFunc.set(u.func),this.depthMask.set(u.mask),this.depthRange.set(u.range)):this.depthTest.set(!1)}setStencilMode(u){u.test.func!==this.gl.ALWAYS||u.mask?(this.stencilTest.set(!0),this.stencilMask.set(u.mask),this.stencilOp.set([u.fail,u.depthFail,u.pass]),this.stencilFunc.set({func:u.test.func,ref:u.ref,mask:u.test.mask})):this.stencilTest.set(!1)}setColorMode(u){g(u.blendFunction,Dr.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(u.blendFunction),this.blendColor.set(u.blendColor)),this.colorMask.set(u.mask)}unbindVAO(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)}}class tr{constructor(u,m,x){this.func=u,this.mask=m,this.range=x}}tr.ReadOnly=!1,tr.ReadWrite=!0,tr.disabled=new tr(519,tr.ReadOnly,[0,1]);const hr=7680;class Tr{constructor(u,m,x,S,R,F){this.test=u,this.ref=m,this.mask=x,this.fail=S,this.depthFail=R,this.pass=F}}Tr.disabled=new Tr({func:519,mask:0},0,0,hr,hr,hr);class zr{constructor(u,m,x){this.enable=u,this.mode=m,this.frontFace=x}}let xc;function uu(w,u,m,x,S,R,F){const V=w.context,H=V.gl,q=w.useProgram("collisionBox"),ee=[];let se=0,he=0;for(let De=0;De<x.length;De++){const ft=x[De],st=u.getTile(ft),wt=st.getBucket(m);if(!wt)continue;let Ct=ft.posMatrix;S[0]===0&&S[1]===0||(Ct=w.translatePosMatrix(ft.posMatrix,st,S,R));const Ut=F?wt.textCollisionBox:wt.iconCollisionBox,xt=wt.collisionCircleArray;if(xt.length>0){const cn=o.create(),Jt=Ct;o.mul(cn,wt.placementInvProjMatrix,w.transform.glCoordMatrix),o.mul(cn,cn,wt.placementViewportMatrix),ee.push({circleArray:xt,circleOffset:he,transform:Jt,invTransform:cn,coord:ft}),se+=xt.length/4,he=se}Ut&&q.draw(V,H.LINES,tr.disabled,Tr.disabled,w.colorModeForRenderPass(),zr.disabled,cs(Ct,w.transform,st),w.style.terrain&&w.style.terrain.getTerrainData(ft),m.id,Ut.layoutVertexBuffer,Ut.indexBuffer,Ut.segments,null,w.transform.zoom,null,null,Ut.collisionVertexBuffer)}if(!F||!ee.length)return;const ke=w.useProgram("collisionCircle"),_e=new o.CollisionCircleLayoutArray;_e.resize(4*se),_e._trim();let Se=0;for(const De of ee)for(let ft=0;ft<De.circleArray.length/4;ft++){const st=4*ft,wt=De.circleArray[st+0],Ct=De.circleArray[st+1],Ut=De.circleArray[st+2],xt=De.circleArray[st+3];_e.emplace(Se++,wt,Ct,Ut,xt,0),_e.emplace(Se++,wt,Ct,Ut,xt,1),_e.emplace(Se++,wt,Ct,Ut,xt,2),_e.emplace(Se++,wt,Ct,Ut,xt,3)}(!xc||xc.length<2*se)&&(xc=function(De){const ft=2*De,st=new o.QuadTriangleArray;st.resize(ft),st._trim();for(let wt=0;wt<ft;wt++){const Ct=6*wt;st.uint16[Ct+0]=4*wt+0,st.uint16[Ct+1]=4*wt+1,st.uint16[Ct+2]=4*wt+2,st.uint16[Ct+3]=4*wt+2,st.uint16[Ct+4]=4*wt+3,st.uint16[Ct+5]=4*wt+0}return st}(se));const Ve=V.createIndexBuffer(xc,!0),Ge=V.createVertexBuffer(_e,o.collisionCircleLayout.members,!0);for(const De of ee){const ft={u_matrix:De.transform,u_inv_matrix:De.invTransform,u_camera_to_center_distance:(rt=w.transform).cameraToCenterDistance,u_viewport_size:[rt.width,rt.height]};ke.draw(V,H.TRIANGLES,tr.disabled,Tr.disabled,w.colorModeForRenderPass(),zr.disabled,ft,w.style.terrain&&w.style.terrain.getTerrainData(De.coord),m.id,Ge,Ve,o.SegmentVector.simpleSegment(0,2*De.circleOffset,De.circleArray.length,De.circleArray.length/2),null,w.transform.zoom,null,null,null)}var rt;Ge.destroy(),Ve.destroy()}zr.disabled=new zr(!1,1029,2305),zr.backCCW=new zr(!0,1029,2305);const tw=o.identity(new Float32Array(16));function nw(w,u,m,x,S,R){const{horizontalAlign:F,verticalAlign:V}=o.getAnchorAlignment(w),H=-(F-.5)*u,q=-(V-.5)*m,ee=o.evaluateVariableOffset(w,x);return new o.pointGeometry((H/S+ee[0])*R,(q/S+ee[1])*R)}function Gv(w,u,m,x,S,R,F,V,H,q,ee){const se=w.text.placedSymbolArray,he=w.text.dynamicLayoutVertexArray,ke=w.icon.dynamicLayoutVertexArray,_e={};he.clear();for(let Se=0;Se<se.length;Se++){const Ve=se.get(Se),Ge=w.allowVerticalPlacement&&!Ve.placedOrientation,rt=Ve.hidden||!Ve.crossTileID||Ge?null:x[Ve.crossTileID];if(rt){const De=new o.pointGeometry(Ve.anchorX,Ve.anchorY),ft=Kt(De,m?F:R,ee),st=Vt(S.cameraToCenterDistance,ft.signedDistanceFromCamera);let wt=o.evaluateSizeForFeature(w.textSizeData,H,Ve)*st/o.ONE_EM;m&&(wt*=w.tilePixelRatio/V);const{width:Ct,height:Ut,anchor:xt,textOffset:cn,textBoxScale:Jt}=rt,fn=nw(xt,Ct,Ut,cn,Jt,wt),$n=m?Kt(De.add(fn),R,ee).point:ft.point.add(u?fn.rotate(-S.angle):fn),Hn=w.allowVerticalPlacement&&Ve.placedOrientation===o.WritingMode.vertical?Math.PI/2:0;for(let Tn=0;Tn<Ve.numGlyphs;Tn++)o.addDynamicAttributes(he,$n,Hn);q&&Ve.associatedIconIndex>=0&&(_e[Ve.associatedIconIndex]={shiftedAnchor:$n,angle:Hn})}else Et(Ve.numGlyphs,he)}if(q){ke.clear();const Se=w.icon.placedSymbolArray;for(let Ve=0;Ve<Se.length;Ve++){const Ge=Se.get(Ve);if(Ge.hidden)Et(Ge.numGlyphs,ke);else{const rt=_e[Ve];if(rt)for(let De=0;De<Ge.numGlyphs;De++)o.addDynamicAttributes(ke,rt.shiftedAnchor,rt.angle);else Et(Ge.numGlyphs,ke)}}w.icon.dynamicLayoutVertexBuffer.updateData(ke)}w.text.dynamicLayoutVertexBuffer.updateData(he)}function rw(w,u,m){return m.iconsInText&&u?"symbolTextAndIcon":w?"symbolSDF":"symbolIcon"}function nf(w,u,m,x,S,R,F,V,H,q,ee,se){const he=w.context,ke=he.gl,_e=w.transform,Se=V==="map",Ve=H==="map",Ge=V!=="viewport"&&m.layout.get("symbol-placement")!=="point",rt=Se&&!Ve&&!Ge,De=!m.layout.get("symbol-sort-key").isConstant();let ft=!1;const st=w.depthModeForSublayer(0,tr.ReadOnly),wt=m.layout.get("text-variable-anchor"),Ct=[];for(const Ut of x){const xt=u.getTile(Ut),cn=xt.getBucket(m);if(!cn)continue;const Jt=S?cn.text:cn.icon;if(!Jt||!Jt.segments.get().length)continue;const fn=Jt.programConfigurations.get(m.id),$n=S||cn.sdfIcons,Hn=S?cn.textSizeData:cn.iconSizeData,Tn=Ve||_e.pitch!==0,mr=w.useProgram(rw($n,S,cn),fn),gr=o.evaluateSizeForZoom(Hn,_e.zoom),ir=w.style.terrain&&w.style.terrain.getTerrainData(Ut);let ar,xr,Pi,$a,ca=[0,0],Ba=null;if(S){if(xr=xt.glyphAtlasTexture,Pi=ke.LINEAR,ar=xt.glyphAtlasTexture.size,cn.iconsInText){ca=xt.imageAtlasTexture.size,Ba=xt.imageAtlasTexture;const qo=Hn.kind==="composite"||Hn.kind==="camera";$a=Tn||w.options.rotating||w.options.zooming||qo?ke.LINEAR:ke.NEAREST}}else{const qo=m.layout.get("icon-size").constantOr(0)!==1||cn.iconsNeedLinear;xr=xt.imageAtlasTexture,Pi=$n||w.options.rotating||w.options.zooming||qo||Tn?ke.LINEAR:ke.NEAREST,ar=xt.imageAtlasTexture.size}const Ks=zt(xt,1,w.transform.zoom),Go=Zt(Ut.posMatrix,Ve,Se,w.transform,Ks),go=an(Ut.posMatrix,Ve,Se,w.transform,Ks),ms=wt&&cn.hasTextData(),df=m.layout.get("icon-text-fit")!=="none"&&ms&&cn.hasIconData();if(Ge){const qo=w.style.terrain?(Ip,mu)=>w.style.terrain.getElevation(Ut,Ip,mu):null,bl=m.layout.get("text-rotation-alignment")==="map";Xt(cn,Ut.posMatrix,w,S,Go,go,Ve,q,bl,qo)}const vi=w.translatePosMatrix(Ut.posMatrix,xt,R,F),qn=Ge||S&&wt||df?tw:Go,pr=w.translatePosMatrix(go,xt,R,F,!0),Ti=$n&&m.paint.get(S?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let ki;ki=$n?cn.iconsInText?zv(Hn.kind,gr,rt,Ve,w,vi,qn,pr,ar,ca):Zd(Hn.kind,gr,rt,Ve,w,vi,qn,pr,S,ar,!0):np(Hn.kind,gr,rt,Ve,w,vi,qn,pr,S,ar);const Br={program:mr,buffers:Jt,uniformValues:ki,atlasTexture:xr,atlasTextureIcon:Ba,atlasInterpolation:Pi,atlasInterpolationIcon:$a,isSDF:$n,hasHalo:Ti};if(De&&cn.canOverlap){ft=!0;const qo=Jt.segments.get();for(const bl of qo)Ct.push({segments:new o.SegmentVector([bl]),sortKey:bl.sortKey,state:Br,terrainData:ir})}else Ct.push({segments:Jt.segments,sortKey:0,state:Br,terrainData:ir})}ft&&Ct.sort((Ut,xt)=>Ut.sortKey-xt.sortKey);for(const Ut of Ct){const xt=Ut.state;if(he.activeTexture.set(ke.TEXTURE0),xt.atlasTexture.bind(xt.atlasInterpolation,ke.CLAMP_TO_EDGE),xt.atlasTextureIcon&&(he.activeTexture.set(ke.TEXTURE1),xt.atlasTextureIcon&&xt.atlasTextureIcon.bind(xt.atlasInterpolationIcon,ke.CLAMP_TO_EDGE)),xt.isSDF){const cn=xt.uniformValues;xt.hasHalo&&(cn.u_is_halo=1,bc(xt.buffers,Ut.segments,m,w,xt.program,st,ee,se,cn,Ut.terrainData)),cn.u_is_halo=0}bc(xt.buffers,Ut.segments,m,w,xt.program,st,ee,se,xt.uniformValues,Ut.terrainData)}}function bc(w,u,m,x,S,R,F,V,H,q){const ee=x.context;S.draw(ee,ee.gl.TRIANGLES,R,F,V,zr.disabled,H,q,m.id,w.layoutVertexBuffer,w.indexBuffer,u,m.paint,x.transform.zoom,w.programConfigurations.get(m.id),w.dynamicLayoutVertexBuffer,w.opacityVertexBuffer)}function _c(w,u,m,x,S,R,F){const V=w.context.gl,H=m.paint.get("fill-pattern"),q=H&&H.constantOr(1),ee=m.getCrossfadeParameters();let se,he,ke,_e,Se;F?(he=q&&!m.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",se=V.LINES):(he=q?"fillPattern":"fill",se=V.TRIANGLES);for(const Ve of x){const Ge=u.getTile(Ve);if(q&&!Ge.patternsLoaded())continue;const rt=Ge.getBucket(m);if(!rt)continue;const De=rt.programConfigurations.get(m.id),ft=w.useProgram(he,De),st=w.style.terrain&&w.style.terrain.getTerrainData(Ve);q&&(w.context.activeTexture.set(V.TEXTURE0),Ge.imageAtlasTexture.bind(V.LINEAR,V.CLAMP_TO_EDGE),De.updatePaintBuffers(ee));const wt=H.constantOr(null);if(wt&&Ge.imageAtlas){const xt=Ge.imageAtlas,cn=xt.patternPositions[wt.to.toString()],Jt=xt.patternPositions[wt.from.toString()];cn&&Jt&&De.setConstantPatternPositions(cn,Jt)}const Ct=st?Ve:null,Ut=w.translatePosMatrix(Ct?Ct.posMatrix:Ve.posMatrix,Ge,m.paint.get("fill-translate"),m.paint.get("fill-translate-anchor"));if(F){_e=rt.indexBuffer2,Se=rt.segments2;const xt=[V.drawingBufferWidth,V.drawingBufferHeight];ke=he==="fillOutlinePattern"&&q?ou(Ut,w,ee,Ge,xt):Mo(Ut,xt)}else _e=rt.indexBuffer,Se=rt.segments,ke=q?Wr(Ut,w,ee,Ge):Pr(Ut);ft.draw(w.context,se,S,w.stencilModeForClipping(Ve),R,zr.disabled,ke,st,m.id,rt.layoutVertexBuffer,_e,Se,m.paint,w.transform.zoom,De)}}function wc(w,u,m,x,S,R,F){const V=w.context,H=V.gl,q=m.paint.get("fill-extrusion-pattern"),ee=q.constantOr(1),se=m.getCrossfadeParameters(),he=m.paint.get("fill-extrusion-opacity");for(const ke of x){const _e=u.getTile(ke),Se=_e.getBucket(m);if(!Se)continue;const Ve=w.style.terrain&&w.style.terrain.getTerrainData(ke),Ge=Se.programConfigurations.get(m.id),rt=w.useProgram(ee?"fillExtrusionPattern":"fillExtrusion",Ge);ee&&(w.context.activeTexture.set(H.TEXTURE0),_e.imageAtlasTexture.bind(H.LINEAR,H.CLAMP_TO_EDGE),Ge.updatePaintBuffers(se));const De=q.constantOr(null);if(De&&_e.imageAtlas){const Ct=_e.imageAtlas,Ut=Ct.patternPositions[De.to.toString()],xt=Ct.patternPositions[De.from.toString()];Ut&&xt&&Ge.setConstantPatternPositions(Ut,xt)}const ft=w.translatePosMatrix(ke.posMatrix,_e,m.paint.get("fill-extrusion-translate"),m.paint.get("fill-extrusion-translate-anchor")),st=m.paint.get("fill-extrusion-vertical-gradient"),wt=ee?Sr(ft,w,st,he,ke,se,_e):rr(ft,w,st,he);rt.draw(V,V.gl.TRIANGLES,S,R,F,zr.backCCW,wt,Ve,m.id,Se.layoutVertexBuffer,Se.indexBuffer,Se.segments,m.paint,w.transform.zoom,Ge,w.style.terrain&&Se.centroidVertexBuffer)}}function mp(w,u,m,x,S,R,F){const V=w.context,H=V.gl,q=m.fbo;if(!q)return;const ee=w.useProgram("hillshade"),se=w.style.terrain&&w.style.terrain.getTerrainData(u);V.activeTexture.set(H.TEXTURE0),H.bindTexture(H.TEXTURE_2D,q.colorAttachment.get()),ee.draw(V,H.TRIANGLES,S,R,F,zr.disabled,((he,ke,_e,Se)=>{const Ve=_e.paint.get("hillshade-shadow-color"),Ge=_e.paint.get("hillshade-highlight-color"),rt=_e.paint.get("hillshade-accent-color");let De=_e.paint.get("hillshade-illumination-direction")*(Math.PI/180);_e.paint.get("hillshade-illumination-anchor")==="viewport"&&(De-=he.transform.angle);const ft=!he.options.moving;return{u_matrix:Se?Se.posMatrix:he.transform.calculatePosMatrix(ke.tileID.toUnwrapped(),ft),u_image:0,u_latrange:zi(0,ke.tileID),u_light:[_e.paint.get("hillshade-exaggeration"),De],u_shadow:Ve,u_highlight:Ge,u_accent:rt}})(w,m,x,se?u:null),se,x.id,w.rasterBoundsBuffer,w.quadTriangleIndexBuffer,w.rasterBoundsSegments)}function qv(w,u,m,x,S,R){const F=w.context,V=F.gl,H=u.dem;if(H&&H.data){const q=H.dim,ee=H.stride,se=H.getPixels();if(F.activeTexture.set(V.TEXTURE1),F.pixelStoreUnpackPremultiplyAlpha.set(!1),u.demTexture=u.demTexture||w.getTileTexture(ee),u.demTexture){const ke=u.demTexture;ke.update(se,{premultiply:!1}),ke.bind(V.NEAREST,V.CLAMP_TO_EDGE)}else u.demTexture=new T(F,se,V.RGBA,{premultiply:!1}),u.demTexture.bind(V.NEAREST,V.CLAMP_TO_EDGE);F.activeTexture.set(V.TEXTURE0);let he=u.fbo;if(!he){const ke=new T(F,{width:q,height:q,data:null},V.RGBA);ke.bind(V.LINEAR,V.CLAMP_TO_EDGE),he=u.fbo=F.createFramebuffer(q,q,!0),he.colorAttachment.set(ke.texture)}F.bindFramebuffer.set(he.framebuffer),F.viewport.set([0,0,q,q]),w.useProgram("hillshadePrepare").draw(F,V.TRIANGLES,x,S,R,zr.disabled,((ke,_e)=>{const Se=_e.stride,Ve=o.create();return o.ortho(Ve,0,o.EXTENT,-o.EXTENT,0,0,1),o.translate(Ve,Ve,[0,-o.EXTENT,0]),{u_matrix:Ve,u_image:1,u_dimension:[Se,Se],u_zoom:ke.overscaledZ,u_unpack:_e.getUnpackVector()}})(u.tileID,H),null,m.id,w.rasterBoundsBuffer,w.quadTriangleIndexBuffer,w.rasterBoundsSegments),u.needsHillshadePrepare=!1}}function rf(w,u,m,x,S,R){const F=x.paint.get("raster-fade-duration");if(!R&&F>0){const V=o.exported.now(),H=(V-w.timeAdded)/F,q=u?(V-u.timeAdded)/F:-1,ee=m.getSource(),se=S.coveringZoomLevel({tileSize:ee.tileSize,roundZoom:ee.roundZoom}),he=!u||Math.abs(u.tileID.overscaledZ-se)>Math.abs(w.tileID.overscaledZ-se),ke=he&&w.refreshedUponExpiration?1:o.clamp(he?H:1-q,0,1);return w.refreshedUponExpiration&&H>=1&&(w.refreshedUponExpiration=!1),u?{opacity:1,mix:1-ke}:{opacity:ke,mix:0}}return{opacity:1,mix:0}}const of=new o.Color(1,0,0,1),ua=new o.Color(0,1,0,1),Zv=new o.Color(0,0,1,1),gp=new o.Color(1,0,1,1),Xv=new o.Color(0,1,1,1);function vl(w,u,m,x){cu(w,0,u+m/2,w.transform.width,m,x)}function Cc(w,u,m,x){cu(w,u-m/2,0,m,w.transform.height,x)}function cu(w,u,m,x,S,R){const F=w.context,V=F.gl;V.enable(V.SCISSOR_TEST),V.scissor(u*w.pixelRatio,m*w.pixelRatio,x*w.pixelRatio,S*w.pixelRatio),F.clear({color:R}),V.disable(V.SCISSOR_TEST)}function iw(w,u,m){const x=w.context,S=x.gl,R=m.posMatrix,F=w.useProgram("debug"),V=tr.disabled,H=Tr.disabled,q=w.colorModeForRenderPass(),ee="$debug",se=w.style.terrain&&w.style.terrain.getTerrainData(m);x.activeTexture.set(S.TEXTURE0),w.emptyTexture.bind(S.LINEAR,S.CLAMP_TO_EDGE);const he=u.getTileByID(m.key).latestRawTileData,ke=Math.floor((he&&he.byteLength||0)/1024),_e=u.getTile(m).tileSize,Se=512/Math.min(_e,512)*(m.overscaledZ/w.transform.zoom)*.5;let Ve=m.canonical.toString();m.overscaledZ!==m.canonical.z&&(Ve+=` => ${m.overscaledZ}`),function(Ge,rt){Ge.initDebugOverlayCanvas();const De=Ge.debugOverlayCanvas,ft=Ge.context.gl,st=Ge.debugOverlayCanvas.getContext("2d");st.clearRect(0,0,De.width,De.height),st.shadowColor="white",st.shadowBlur=2,st.lineWidth=1.5,st.strokeStyle="white",st.textBaseline="top",st.font="bold 36px Open Sans, sans-serif",st.fillText(rt,5,5),st.strokeText(rt,5,5),Ge.debugOverlayTexture.update(De),Ge.debugOverlayTexture.bind(ft.LINEAR,ft.CLAMP_TO_EDGE)}(w,`${Ve} ${ke}kB`),F.draw(x,S.TRIANGLES,V,H,Dr.alphaBlended,zr.disabled,Vn(R,o.Color.transparent,Se),null,ee,w.debugBuffer,w.quadTriangleIndexBuffer,w.debugSegments),F.draw(x,S.LINE_STRIP,V,H,q,zr.disabled,Vn(R,o.Color.red),se,ee,w.debugBuffer,w.tileBorderIndexBuffer,w.debugSegments)}function af(w,u,m){const x=w.context,S=x.gl,R=w.colorModeForRenderPass(),F=new tr(S.LEQUAL,tr.ReadWrite,w.depthRangeFor3D),V=w.useProgram("terrain"),H=u.getTerrainMesh(),q=u.getTerrainData(m.tileID);x.bindFramebuffer.set(null),x.viewport.set([0,0,w.width,w.height]),x.activeTexture.set(S.TEXTURE0),S.bindTexture(S.TEXTURE_2D,u.getRTTFramebuffer().colorAttachment.get());const ee=w.transform.calculatePosMatrix(m.tileID.toUnwrapped());V.draw(x,S.TRIANGLES,F,Tr.disabled,R,zr.backCCW,{u_matrix:ee,u_texture:0},q,"terrain",H.vertexBuffer,H.indexBuffer,H.segments)}function Yv(w,u,m,x){const S=w.context,R=m.tileSize*u.qualityFactor;m.textures[x]||(m.textures[x]=w.getTileTexture(R)||new T(S,{width:R,height:R,data:null},S.gl.RGBA),m.textures[x].bind(S.gl.LINEAR,S.gl.CLAMP_TO_EDGE),x===0&&u.sourceCache.renderHistory.unshift(m.tileID.key));const F=u.getRTTFramebuffer();F.colorAttachment.set(m.textures[x].texture),S.bindFramebuffer.set(F.framebuffer),S.viewport.set([0,0,R,R])}class Qv{constructor(u){this._coordsDescendingInv={},this._coordsDescendingInvStr={},this.painter=u,this._renderToTexture={background:!0,fill:!0,line:!0,raster:!0},this._coordsDescendingInv={},this._coordsDescendingInvStr={},this._stacks=[],this._prevType=null,this._rerender={},this._renderableTiles=u.style.terrain.sourceCache.getRenderableTiles(),this._init()}_init(){const u=this.painter.style,m=u.terrain;for(const x in u.sourceCaches){this._coordsDescendingInv[x]={};const S=u.sourceCaches[x].getVisibleCoordinates();for(const R of S){const F=m.sourceCache.getTerrainCoords(R);for(const V in F)this._coordsDescendingInv[x][V]||(this._coordsDescendingInv[x][V]=[]),this._coordsDescendingInv[x][V].push(F[V])}}for(const x of u._order){const S=u._layers[x],R=S.source;if(this._renderToTexture[S.type]&&!this._coordsDescendingInvStr[R]){this._coordsDescendingInvStr[R]={};for(const F in this._coordsDescendingInv[R])this._coordsDescendingInvStr[R][F]=this._coordsDescendingInv[R][F].map(V=>V.key).sort().join()}}return this._renderableTiles.forEach(x=>{for(const S in this._coordsDescendingInvStr){const R=this._coordsDescendingInvStr[S][x.tileID.key];R&&R!==x.textureCoords[S]&&x.clearTextures(this.painter),m.needsRerender(S,x.tileID)&&x.clearTextures(this.painter)}this._rerender[x.tileID.key]=!x.textures.length}),m.clearRerenderCache(),m.sourceCache.removeOutdated(this.painter),this}renderLayer(u){const m=u.type,x=this.painter,S=x.style._order,R=x.currentLayer,F=R+1===S.length;if(this._renderToTexture[m]&&(this._prevType&&this._renderToTexture[this._prevType]||this._stacks.push([]),this._prevType=m,this._stacks[this._stacks.length-1].push(S[R]),!F))return!0;if(this._renderToTexture[this._prevType]||m==="hillshade"||this._renderToTexture[m]&&F){this._prevType=m;const V=this._stacks.length-1,H=this._stacks[V]||[];for(const q of this._renderableTiles){if(Yv(x,x.style.terrain,q,V),this._rerender[q.tileID.key]){x.context.clear({color:o.Color.transparent});for(let ee=0;ee<H.length;ee++){const se=x.style._layers[H[ee]],he=se.source?this._coordsDescendingInv[se.source][q.tileID.key]:[q.tileID];x._renderTileClippingMasks(se,he),x.renderLayer(x,x.style.sourceCaches[se.source],se,he),se.source&&(q.textureCoords[se.source]=this._coordsDescendingInvStr[se.source][q.tileID.key])}}af(x,x.style.terrain,q)}if(m==="hillshade"){this._stacks.push([S[R]]);for(const q of this._renderableTiles){const ee=this._coordsDescendingInv[u.source][q.tileID.key];Yv(x,x.style.terrain,q,this._stacks.length-1),x.context.clear({color:o.Color.transparent}),x._renderTileClippingMasks(u,ee),x.renderLayer(x,x.style.sourceCaches[u.source],u,ee),af(x,x.style.terrain,q)}return!0}return this._renderToTexture[m]}return!1}}const Sc={symbol:function(w,u,m,x,S){if(w.renderPass!=="translucent")return;const R=Tr.disabled,F=w.colorModeForRenderPass();m.layout.get("text-variable-anchor")&&function(V,H,q,ee,se,he,ke){const _e=H.transform,Se=se==="map",Ve=he==="map";for(const Ge of V){const rt=ee.getTile(Ge),De=rt.getBucket(q);if(!De||!De.text||!De.text.segments.get().length)continue;const ft=o.evaluateSizeForZoom(De.textSizeData,_e.zoom),st=zt(rt,1,H.transform.zoom),wt=Zt(Ge.posMatrix,Ve,Se,H.transform,st),Ct=q.layout.get("icon-text-fit")!=="none"&&De.hasIconData();if(ft){const Ut=Math.pow(2,_e.zoom-rt.tileID.overscaledZ);Gv(De,Se,Ve,ke,_e,wt,Ge.posMatrix,Ut,ft,Ct,H.style.terrain?(xt,cn)=>H.style.terrain.getElevation(Ge,xt,cn):null)}}}(x,w,m,u,m.layout.get("text-rotation-alignment"),m.layout.get("text-pitch-alignment"),S),m.paint.get("icon-opacity").constantOr(1)!==0&&nf(w,u,m,x,!1,m.paint.get("icon-translate"),m.paint.get("icon-translate-anchor"),m.layout.get("icon-rotation-alignment"),m.layout.get("icon-pitch-alignment"),m.layout.get("icon-keep-upright"),R,F),m.paint.get("text-opacity").constantOr(1)!==0&&nf(w,u,m,x,!0,m.paint.get("text-translate"),m.paint.get("text-translate-anchor"),m.layout.get("text-rotation-alignment"),m.layout.get("text-pitch-alignment"),m.layout.get("text-keep-upright"),R,F),u.map.showCollisionBoxes&&(uu(w,u,m,x,m.paint.get("text-translate"),m.paint.get("text-translate-anchor"),!0),uu(w,u,m,x,m.paint.get("icon-translate"),m.paint.get("icon-translate-anchor"),!1))},circle:function(w,u,m,x){if(w.renderPass!=="translucent")return;const S=m.paint.get("circle-opacity"),R=m.paint.get("circle-stroke-width"),F=m.paint.get("circle-stroke-opacity"),V=!m.layout.get("circle-sort-key").isConstant();if(S.constantOr(1)===0&&(R.constantOr(1)===0||F.constantOr(1)===0))return;const H=w.context,q=H.gl,ee=w.depthModeForSublayer(0,tr.ReadOnly),se=Tr.disabled,he=w.colorModeForRenderPass(),ke=[];for(let _e=0;_e<x.length;_e++){const Se=x[_e],Ve=u.getTile(Se),Ge=Ve.getBucket(m);if(!Ge)continue;const rt=Ge.programConfigurations.get(m.id),De=w.useProgram("circle",rt),ft=Ge.layoutVertexBuffer,st=Ge.indexBuffer,wt=w.style.terrain&&w.style.terrain.getTerrainData(Se),Ct={programConfiguration:rt,program:De,layoutVertexBuffer:ft,indexBuffer:st,uniformValues:qd(w,Se,Ve,m),terrainData:wt};if(V){const Ut=Ge.segments.get();for(const xt of Ut)ke.push({segments:new o.SegmentVector([xt]),sortKey:xt.sortKey,state:Ct})}else ke.push({segments:Ge.segments,sortKey:0,state:Ct})}V&&ke.sort((_e,Se)=>_e.sortKey-Se.sortKey);for(const _e of ke){const{programConfiguration:Se,program:Ve,layoutVertexBuffer:Ge,indexBuffer:rt,uniformValues:De,terrainData:ft}=_e.state;Ve.draw(H,q.TRIANGLES,ee,se,he,zr.disabled,De,ft,m.id,Ge,rt,_e.segments,m.paint,w.transform.zoom,Se)}},heatmap:function(w,u,m,x){if(m.paint.get("heatmap-opacity")!==0)if(w.renderPass==="offscreen"){const S=w.context,R=S.gl,F=Tr.disabled,V=new Dr([R.ONE,R.ONE],o.Color.transparent,[!0,!0,!0,!0]);(function(H,q,ee){const se=H.gl;H.activeTexture.set(se.TEXTURE1),H.viewport.set([0,0,q.width/4,q.height/4]);let he=ee.heatmapFbo;if(he)se.bindTexture(se.TEXTURE_2D,he.colorAttachment.get()),H.bindFramebuffer.set(he.framebuffer);else{const ke=se.createTexture();se.bindTexture(se.TEXTURE_2D,ke),se.texParameteri(se.TEXTURE_2D,se.TEXTURE_WRAP_S,se.CLAMP_TO_EDGE),se.texParameteri(se.TEXTURE_2D,se.TEXTURE_WRAP_T,se.CLAMP_TO_EDGE),se.texParameteri(se.TEXTURE_2D,se.TEXTURE_MIN_FILTER,se.LINEAR),se.texParameteri(se.TEXTURE_2D,se.TEXTURE_MAG_FILTER,se.LINEAR),he=ee.heatmapFbo=H.createFramebuffer(q.width/4,q.height/4,!1),function(_e,Se,Ve,Ge){const rt=_e.gl;rt.texImage2D(rt.TEXTURE_2D,0,rt.RGBA,Se.width/4,Se.height/4,0,rt.RGBA,_e.extRenderToTextureHalfFloat?_e.extTextureHalfFloat.HALF_FLOAT_OES:rt.UNSIGNED_BYTE,null),Ge.colorAttachment.set(Ve)}(H,q,ke,he)}})(S,w,m),S.clear({color:o.Color.transparent});for(let H=0;H<x.length;H++){const q=x[H];if(u.hasRenderableParent(q))continue;const ee=u.getTile(q),se=ee.getBucket(m);if(!se)continue;const he=se.programConfigurations.get(m.id),ke=w.useProgram("heatmap",he),{zoom:_e}=w.transform;ke.draw(S,R.TRIANGLES,tr.disabled,F,V,zr.disabled,Fr(q.posMatrix,ee,_e,m.paint.get("heatmap-intensity")),null,m.id,se.layoutVertexBuffer,se.indexBuffer,se.segments,m.paint,w.transform.zoom,he)}S.viewport.set([0,0,w.width,w.height])}else w.renderPass==="translucent"&&(w.context.setColorMode(w.colorModeForRenderPass()),function(S,R){const F=S.context,V=F.gl,H=R.heatmapFbo;if(!H)return;F.activeTexture.set(V.TEXTURE0),V.bindTexture(V.TEXTURE_2D,H.colorAttachment.get()),F.activeTexture.set(V.TEXTURE1);let q=R.colorRampTexture;q||(q=R.colorRampTexture=new T(F,R.colorRamp,V.RGBA)),q.bind(V.LINEAR,V.CLAMP_TO_EDGE),S.useProgram("heatmapTexture").draw(F,V.TRIANGLES,tr.disabled,Tr.disabled,S.colorModeForRenderPass(),zr.disabled,((ee,se,he,ke)=>{const _e=o.create();o.ortho(_e,0,ee.width,ee.height,0,0,1);const Se=ee.context.gl;return{u_matrix:_e,u_world:[Se.drawingBufferWidth,Se.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:se.paint.get("heatmap-opacity")}})(S,R),null,R.id,S.viewportBuffer,S.quadTriangleIndexBuffer,S.viewportSegments,R.paint,S.transform.zoom)}(w,m))},line:function(w,u,m,x){if(w.renderPass!=="translucent")return;const S=m.paint.get("line-opacity"),R=m.paint.get("line-width");if(S.constantOr(1)===0||R.constantOr(1)===0)return;const F=w.depthModeForSublayer(0,tr.ReadOnly),V=w.colorModeForRenderPass(),H=m.paint.get("line-dasharray"),q=m.paint.get("line-pattern"),ee=q.constantOr(1),se=m.paint.get("line-gradient"),he=m.getCrossfadeParameters(),ke=ee?"linePattern":H?"lineSDF":se?"lineGradient":"line",_e=w.context,Se=_e.gl;let Ve=!0;for(const Ge of x){const rt=u.getTile(Ge);if(ee&&!rt.patternsLoaded())continue;const De=rt.getBucket(m);if(!De)continue;const ft=De.programConfigurations.get(m.id),st=w.context.program.get(),wt=w.useProgram(ke,ft),Ct=Ve||wt.program!==st,Ut=w.style.terrain&&w.style.terrain.getTerrainData(Ge),xt=q.constantOr(null);if(xt&&rt.imageAtlas){const fn=rt.imageAtlas,$n=fn.patternPositions[xt.to.toString()],Hn=fn.patternPositions[xt.from.toString()];$n&&Hn&&ft.setConstantPatternPositions($n,Hn)}const cn=Ut?Ge:null,Jt=ee?ml(w,rt,m,he,cn):H?ds(w,rt,m,H,he,cn):se?Ko(w,rt,m,De.lineClipsArray.length,cn):zs(w,rt,m,cn);if(ee)_e.activeTexture.set(Se.TEXTURE0),rt.imageAtlasTexture.bind(Se.LINEAR,Se.CLAMP_TO_EDGE),ft.updatePaintBuffers(he);else if(H&&(Ct||w.lineAtlas.dirty))_e.activeTexture.set(Se.TEXTURE0),w.lineAtlas.bind(_e);else if(se){const fn=De.gradients[m.id];let $n=fn.texture;if(m.gradientVersion!==fn.version){let Hn=256;if(m.stepInterpolant){const Tn=u.getSource().maxzoom,mr=Ge.canonical.z===Tn?Math.ceil(1<<w.transform.maxZoom-Ge.canonical.z):1;Hn=o.clamp(o.nextPowerOfTwo(De.maxLineLength/o.EXTENT*1024*mr),256,_e.maxTextureSize)}fn.gradient=o.renderColorRamp({expression:m.gradientExpression(),evaluationKey:"lineProgress",resolution:Hn,image:fn.gradient||void 0,clips:De.lineClipsArray}),fn.texture?fn.texture.update(fn.gradient):fn.texture=new T(_e,fn.gradient,Se.RGBA),fn.version=m.gradientVersion,$n=fn.texture}_e.activeTexture.set(Se.TEXTURE0),$n.bind(m.stepInterpolant?Se.NEAREST:Se.LINEAR,Se.CLAMP_TO_EDGE)}wt.draw(_e,Se.TRIANGLES,F,w.stencilModeForClipping(Ge),V,zr.disabled,Jt,Ut,m.id,De.layoutVertexBuffer,De.indexBuffer,De.segments,m.paint,w.transform.zoom,ft,De.layoutVertexBuffer2),Ve=!1}},fill:function(w,u,m,x){const S=m.paint.get("fill-color"),R=m.paint.get("fill-opacity");if(R.constantOr(1)===0)return;const F=w.colorModeForRenderPass(),V=m.paint.get("fill-pattern"),H=w.opaquePassEnabledForLayer()&&!V.constantOr(1)&&S.constantOr(o.Color.transparent).a===1&&R.constantOr(0)===1?"opaque":"translucent";if(w.renderPass===H){const q=w.depthModeForSublayer(1,w.renderPass==="opaque"?tr.ReadWrite:tr.ReadOnly);_c(w,u,m,x,q,F,!1)}if(w.renderPass==="translucent"&&m.paint.get("fill-antialias")){const q=w.depthModeForSublayer(m.getPaintProperty("fill-outline-color")?2:0,tr.ReadOnly);_c(w,u,m,x,q,F,!0)}},"fill-extrusion":function(w,u,m,x){const S=m.paint.get("fill-extrusion-opacity");if(S!==0&&w.renderPass==="translucent"){const R=new tr(w.context.gl.LEQUAL,tr.ReadWrite,w.depthRangeFor3D);if(S!==1||m.paint.get("fill-extrusion-pattern").constantOr(1))wc(w,u,m,x,R,Tr.disabled,Dr.disabled),wc(w,u,m,x,R,w.stencilModeFor3D(),w.colorModeForRenderPass());else{const F=w.colorModeForRenderPass();wc(w,u,m,x,R,Tr.disabled,F)}}},hillshade:function(w,u,m,x){if(w.renderPass!=="offscreen"&&w.renderPass!=="translucent")return;const S=w.context,R=w.depthModeForSublayer(0,tr.ReadOnly),F=w.colorModeForRenderPass(),[V,H]=w.renderPass==="translucent"?w.stencilConfigForOverlap(x):[{},x];for(const q of H){const ee=u.getTile(q);ee.needsHillshadePrepare!==void 0&&ee.needsHillshadePrepare&&w.renderPass==="offscreen"?qv(w,ee,m,R,Tr.disabled,F):w.renderPass==="translucent"&&mp(w,q,ee,m,R,V[q.overscaledZ],F)}S.viewport.set([0,0,w.width,w.height])},raster:function(w,u,m,x){if(w.renderPass!=="translucent"||m.paint.get("raster-opacity")===0||!x.length)return;const S=w.context,R=S.gl,F=u.getSource(),V=w.useProgram("raster"),H=w.colorModeForRenderPass(),[q,ee]=F instanceof me?[{},x]:w.stencilConfigForOverlap(x),se=ee[ee.length-1].overscaledZ,he=!w.options.moving;for(const ke of ee){const _e=w.depthModeForSublayer(ke.overscaledZ-se,m.paint.get("raster-opacity")===1?tr.ReadWrite:tr.ReadOnly,R.LESS),Se=u.getTile(ke);Se.registerFadeDuration(m.paint.get("raster-fade-duration"));const Ve=u.findLoadedParent(ke,0),Ge=rf(Se,Ve,u,m,w.transform,w.style.terrain);let rt,De;const ft=m.paint.get("raster-resampling")==="nearest"?R.NEAREST:R.LINEAR;S.activeTexture.set(R.TEXTURE0),Se.texture.bind(ft,R.CLAMP_TO_EDGE,R.LINEAR_MIPMAP_NEAREST),S.activeTexture.set(R.TEXTURE1),Ve?(Ve.texture.bind(ft,R.CLAMP_TO_EDGE,R.LINEAR_MIPMAP_NEAREST),rt=Math.pow(2,Ve.tileID.overscaledZ-Se.tileID.overscaledZ),De=[Se.tileID.canonical.x*rt%1,Se.tileID.canonical.y*rt%1]):Se.texture.bind(ft,R.CLAMP_TO_EDGE,R.LINEAR_MIPMAP_NEAREST);const st=w.style.terrain&&w.style.terrain.getTerrainData(ke),wt=st?ke:null,Ct=wt?wt.posMatrix:w.transform.calculatePosMatrix(ke.toUnwrapped(),he),Ut=Lv(Ct,De||[0,0],rt||1,Ge,m);F instanceof me?V.draw(S,R.TRIANGLES,_e,Tr.disabled,H,zr.disabled,Ut,st,m.id,F.boundsBuffer,w.quadTriangleIndexBuffer,F.boundsSegments):V.draw(S,R.TRIANGLES,_e,q[ke.overscaledZ],H,zr.disabled,Ut,st,m.id,w.rasterBoundsBuffer,w.quadTriangleIndexBuffer,w.rasterBoundsSegments)}},background:function(w,u,m,x){const S=m.paint.get("background-color"),R=m.paint.get("background-opacity");if(R===0)return;const F=w.context,V=F.gl,H=w.transform,q=H.tileSize,ee=m.paint.get("background-pattern");if(w.isPatternMissing(ee))return;const se=!ee&&S.a===1&&R===1&&w.opaquePassEnabledForLayer()?"opaque":"translucent";if(w.renderPass!==se)return;const he=Tr.disabled,ke=w.depthModeForSublayer(0,se==="opaque"?tr.ReadWrite:tr.ReadOnly),_e=w.colorModeForRenderPass(),Se=w.useProgram(ee?"backgroundPattern":"background"),Ve=x||H.coveringTiles({tileSize:q,terrain:w.style.terrain});ee&&(F.activeTexture.set(V.TEXTURE0),w.imageManager.bind(w.context));const Ge=m.getCrossfadeParameters();for(const rt of Ve){const De=x?rt.posMatrix:w.transform.calculatePosMatrix(rt.toUnwrapped()),ft=ee?G1(De,R,w,ee,{tileID:rt,tileSize:q},Ge):W1(De,R,S),st=w.style.terrain&&w.style.terrain.getTerrainData(rt);Se.draw(F,V.TRIANGLES,ke,he,_e,zr.disabled,ft,st,m.id,w.tileExtentBuffer,w.quadTriangleIndexBuffer,w.tileExtentSegments)}},debug:function(w,u,m){for(let x=0;x<m.length;x++)iw(w,u,m[x])},custom:function(w,u,m){const x=w.context,S=m.implementation;if(w.renderPass==="offscreen"){const R=S.prerender;R&&(w.setCustomLayerDefaults(),x.setColorMode(w.colorModeForRenderPass()),R.call(S,x.gl,w.transform.customLayerMatrix()),x.setDirty(),w.setBaseState())}else if(w.renderPass==="translucent"){w.setCustomLayerDefaults(),x.setColorMode(w.colorModeForRenderPass()),x.setStencilMode(Tr.disabled);const R=S.renderingMode==="3d"?new tr(w.context.gl.LEQUAL,tr.ReadWrite,w.depthRangeFor3D):w.depthModeForSublayer(0,tr.ReadOnly);x.setDepthMode(R),S.render(x.gl,w.transform.customLayerMatrix()),x.setDirty(),w.setBaseState(),x.bindFramebuffer.set(null)}}};class vp{constructor(u,m){this.context=new Wv(u),this.transform=m,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 Gt,this.gpuTimers={}}resize(u,m,x){if(this.width=u*x,this.height=m*x,this.pixelRatio=x,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const S of this.style._order)this.style._layers[S].resize()}setup(){const u=this.context,m=new o.PosArray;m.emplaceBack(0,0),m.emplaceBack(o.EXTENT,0),m.emplaceBack(0,o.EXTENT),m.emplaceBack(o.EXTENT,o.EXTENT),this.tileExtentBuffer=u.createVertexBuffer(m,wn.members),this.tileExtentSegments=o.SegmentVector.simpleSegment(0,0,4,2);const x=new o.PosArray;x.emplaceBack(0,0),x.emplaceBack(o.EXTENT,0),x.emplaceBack(0,o.EXTENT),x.emplaceBack(o.EXTENT,o.EXTENT),this.debugBuffer=u.createVertexBuffer(x,wn.members),this.debugSegments=o.SegmentVector.simpleSegment(0,0,4,5);const S=new o.RasterBoundsArray;S.emplaceBack(0,0,0,0),S.emplaceBack(o.EXTENT,0,o.EXTENT,0),S.emplaceBack(0,o.EXTENT,0,o.EXTENT),S.emplaceBack(o.EXTENT,o.EXTENT,o.EXTENT,o.EXTENT),this.rasterBoundsBuffer=u.createVertexBuffer(S,oe.members),this.rasterBoundsSegments=o.SegmentVector.simpleSegment(0,0,4,2);const R=new o.PosArray;R.emplaceBack(0,0),R.emplaceBack(1,0),R.emplaceBack(0,1),R.emplaceBack(1,1),this.viewportBuffer=u.createVertexBuffer(R,wn.members),this.viewportSegments=o.SegmentVector.simpleSegment(0,0,4,2);const F=new o.LineStripIndexArray;F.emplaceBack(0),F.emplaceBack(1),F.emplaceBack(3),F.emplaceBack(2),F.emplaceBack(0),this.tileBorderIndexBuffer=u.createIndexBuffer(F);const V=new o.TriangleIndexArray;V.emplaceBack(0,1,2),V.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=u.createIndexBuffer(V),this.emptyTexture=new T(u,{width:1,height:1,data:new Uint8Array([0,0,0,0])},u.gl.RGBA);const H=this.context.gl;this.stencilClearMode=new Tr({func:H.ALWAYS,mask:0},0,255,H.ZERO,H.ZERO,H.ZERO)}clearStencil(){const u=this.context,m=u.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const x=o.create();o.ortho(x,0,this.width,this.height,0,0,1),o.scale(x,x,[m.drawingBufferWidth,m.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(u,m.TRIANGLES,tr.disabled,this.stencilClearMode,Dr.disabled,zr.disabled,er(x),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(u,m){if(this.currentStencilSource===u.source||!u.isTileClipped()||!m||!m.length)return;this.currentStencilSource=u.source;const x=this.context,S=x.gl;this.nextStencilID+m.length>256&&this.clearStencil(),x.setColorMode(Dr.disabled),x.setDepthMode(tr.disabled);const R=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const F of m){const V=this._tileClippingMaskIDs[F.key]=this.nextStencilID++,H=this.style.terrain&&this.style.terrain.getTerrainData(F);R.draw(x,S.TRIANGLES,tr.disabled,new Tr({func:S.ALWAYS,mask:0},V,255,S.KEEP,S.KEEP,S.REPLACE),Dr.disabled,zr.disabled,er(F.posMatrix),H,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const u=this.nextStencilID++,m=this.context.gl;return new Tr({func:m.NOTEQUAL,mask:255},u,255,m.KEEP,m.KEEP,m.REPLACE)}stencilModeForClipping(u){const m=this.context.gl;return new Tr({func:m.EQUAL,mask:255},this._tileClippingMaskIDs[u.key],0,m.KEEP,m.KEEP,m.REPLACE)}stencilConfigForOverlap(u){const m=this.context.gl,x=u.sort((F,V)=>V.overscaledZ-F.overscaledZ),S=x[x.length-1].overscaledZ,R=x[0].overscaledZ-S+1;if(R>1){this.currentStencilSource=void 0,this.nextStencilID+R>256&&this.clearStencil();const F={};for(let V=0;V<R;V++)F[V+S]=new Tr({func:m.GEQUAL,mask:255},V+this.nextStencilID,255,m.KEEP,m.KEEP,m.REPLACE);return this.nextStencilID+=R,[F,x]}return[{[S]:Tr.disabled},x]}colorModeForRenderPass(){const u=this.context.gl;return this._showOverdrawInspector?new Dr([u.CONSTANT_COLOR,u.ONE],new o.Color(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Dr.unblended:Dr.alphaBlended}depthModeForSublayer(u,m,x){if(!this.opaquePassEnabledForLayer())return tr.disabled;const S=1-((1+this.currentLayer)*this.numSublayers+u)*this.depthEpsilon;return new tr(x||this.context.gl.LEQUAL,m,[S,S])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(u,m){this.style=u,this.options=m,this.lineAtlas=u.lineAtlas,this.imageManager=u.imageManager,this.glyphManager=u.glyphManager,this.symbolFadeChange=u.placement.symbolFadeChange(o.exported.now()),this.imageManager.beginFrame();const x=this.style._order,S=this.style.sourceCaches,R=this.style.terrain&&new Qv(this);for(const q in S){const ee=S[q];ee.used&&ee.prepare(this.context)}const F={},V={},H={};for(const q in S){const ee=S[q];F[q]=ee.getVisibleCoordinates(),V[q]=F[q].slice().reverse(),H[q]=ee.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let q=0;q<x.length;q++)if(this.style._layers[x[q]].is3D()){this.opaquePassCutoff=q;break}if(R){this.opaquePassCutoff=0;const q=this.style.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime);(this.terrainFacilitator.dirty||!o.equals(this.terrainFacilitator.matrix,this.transform.projMatrix)||q.length)&&(o.copy(this.terrainFacilitator.matrix,this.transform.projMatrix),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(ee,se){const he=ee.context,ke=he.gl,_e=Dr.unblended,Se=new tr(ke.LEQUAL,tr.ReadWrite,[0,1]),Ve=se.getTerrainMesh(),Ge=se.sourceCache.getRenderableTiles(),rt=ee.useProgram("terrainDepth");he.bindFramebuffer.set(se.getFramebuffer("depth").framebuffer),he.viewport.set([0,0,ee.width/devicePixelRatio,ee.height/devicePixelRatio]),he.clear({color:o.Color.transparent,depth:1});for(const De of Ge){const ft=se.getTerrainData(De.tileID),st=ee.transform.calculatePosMatrix(De.tileID.toUnwrapped());rt.draw(he,ke.TRIANGLES,Se,Tr.disabled,_e,zr.backCCW,{u_matrix:st},ft,"terrain",Ve.vertexBuffer,Ve.indexBuffer,Ve.segments)}he.bindFramebuffer.set(null),he.viewport.set([0,0,ee.width,ee.height])}(this,this.style.terrain),function(ee,se){const he=ee.context,ke=he.gl,_e=Dr.unblended,Se=new tr(ke.LEQUAL,tr.ReadWrite,[0,1]),Ve=se.getTerrainMesh(),Ge=se.getCoordsTexture(),rt=se.sourceCache.getRenderableTiles(),De=ee.useProgram("terrainCoords");he.bindFramebuffer.set(se.getFramebuffer("coords").framebuffer),he.viewport.set([0,0,ee.width/devicePixelRatio,ee.height/devicePixelRatio]),he.clear({color:o.Color.transparent,depth:1}),se.coordsIndex=[];for(const ft of rt){const st=se.getTerrainData(ft.tileID);he.activeTexture.set(ke.TEXTURE0),ke.bindTexture(ke.TEXTURE_2D,Ge.texture);const wt=ee.transform.calculatePosMatrix(ft.tileID.toUnwrapped());De.draw(he,ke.TRIANGLES,Se,Tr.disabled,_e,zr.backCCW,{u_matrix:wt,u_terrain_coords_id:(255-se.coordsIndex.length)/255,u_texture:0},st,"terrain",Ve.vertexBuffer,Ve.indexBuffer,Ve.segments),se.coordsIndex.push(ft.tileID.key)}he.bindFramebuffer.set(null),he.viewport.set([0,0,ee.width,ee.height])}(this,this.style.terrain))}this.renderPass="offscreen";for(const q of x){const ee=this.style._layers[q];if(!ee.hasOffscreenPass()||ee.isHidden(this.transform.zoom))continue;const se=V[ee.source];(ee.type==="custom"||se.length)&&this.renderLayer(this,S[ee.source],ee,se)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:m.showOverdrawInspector?o.Color.black:o.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=m.showOverdrawInspector,this.depthRangeFor3D=[0,1-(u._order.length+2)*this.numSublayers*this.depthEpsilon],!R)for(this.renderPass="opaque",this.currentLayer=x.length-1;this.currentLayer>=0;this.currentLayer--){const q=this.style._layers[x[this.currentLayer]],ee=S[q.source],se=F[q.source];this._renderTileClippingMasks(q,se),this.renderLayer(this,ee,q,se)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<x.length;this.currentLayer++){const q=this.style._layers[x[this.currentLayer]],ee=S[q.source];if(R&&R.renderLayer(q))continue;const se=(q.type==="symbol"?H:V)[q.source];this._renderTileClippingMasks(q,F[q.source]),this.renderLayer(this,ee,q,se)}if(this.options.showTileBoundaries){let q,ee;Object.values(this.style._layers).forEach(se=>{se.source&&!se.isHidden(this.transform.zoom)&&(se.source!==(ee&&ee.id)&&(ee=this.style.sourceCaches[se.source]),(!q||q.getSource().maxzoom<ee.getSource().maxzoom)&&(q=ee))}),q&&Sc.debug(this,q,q.getVisibleCoordinates())}this.options.showPadding&&function(q){const ee=q.transform.padding;vl(q,q.transform.height-(ee.top||0),3,of),vl(q,ee.bottom||0,3,ua),Cc(q,ee.left||0,3,Zv),Cc(q,q.transform.width-(ee.right||0),3,gp);const se=q.transform.centerPoint;(function(he,ke,_e,Se){cu(he,ke-1,_e-10,2,20,Se),cu(he,ke-10,_e-1,20,2,Se)})(q,se.x,q.transform.height-se.y,Xv)}(this),this.context.setDefault()}renderLayer(u,m,x,S){x.isHidden(this.transform.zoom)||(x.type==="background"||x.type==="custom"||(S||[]).length)&&(this.id=x.id,this.gpuTimingStart(x),Sc[x.type](u,m,x,S,this.style.placement.variableOffsets),this.gpuTimingEnd())}gpuTimingStart(u){if(!this.options.gpuTiming)return;const m=this.context.extTimerQuery;let x=this.gpuTimers[u.id];x||(x=this.gpuTimers[u.id]={calls:0,cpuTime:0,query:m.createQueryEXT()}),x.calls++,m.beginQueryEXT(m.TIME_ELAPSED_EXT,x.query)}gpuTimingEnd(){if(!this.options.gpuTiming)return;const u=this.context.extTimerQuery;u.endQueryEXT(u.TIME_ELAPSED_EXT)}collectGpuTimers(){const u=this.gpuTimers;return this.gpuTimers={},u}queryGpuTimers(u){const m={};for(const x in u){const S=u[x],R=this.context.extTimerQuery,F=R.getQueryObjectEXT(S.query,R.QUERY_RESULT_EXT)/1e6;R.deleteQueryEXT(S.query),m[x]=F}return m}translatePosMatrix(u,m,x,S,R){if(!x[0]&&!x[1])return u;const F=R?S==="map"?this.transform.angle:0:S==="viewport"?-this.transform.angle:0;if(F){const q=Math.sin(F),ee=Math.cos(F);x=[x[0]*ee-x[1]*q,x[0]*q+x[1]*ee]}const V=[R?x[0]:zt(m,x[0],this.transform.zoom),R?x[1]:zt(m,x[1],this.transform.zoom),0],H=new Float32Array(16);return o.translate(H,u,V),H}saveTileTexture(u){const m=this._tileTextures[u.size[0]];m?m.push(u):this._tileTextures[u.size[0]]=[u]}getTileTexture(u){const m=this._tileTextures[u];return m&&m.length>0?m.pop():null}isPatternMissing(u){if(!u)return!1;if(!u.from||!u.to)return!0;const m=this.imageManager.getPattern(u.from.toString()),x=this.imageManager.getPattern(u.to.toString());return!m||!x}useProgram(u,m){this.cache=this.cache||{};const x=u+(m?m.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.terrain?"/terrain":"");return this.cache[x]||(this.cache[x]=new Wn(this.context,u,Mn[u],m,rp[u],this._showOverdrawInspector,this.style.terrain)),this.cache[x]}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 u=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(u.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}}class sf{constructor(u,m){this.points=u,this.planes=m}static fromInvProjectionMatrix(u,m,x){const S=Math.pow(2,x),R=[[-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(V=>{const H=1/(V=o.transformMat4([],V,u))[3]/m*S;return o.mul$1(V,V,[H,H,1/V[3],H])}),F=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(V=>{const H=o.sub([],R[V[0]],R[V[1]]),q=o.sub([],R[V[2]],R[V[1]]),ee=o.normalize([],o.cross([],H,q)),se=-o.dot(ee,R[V[1]]);return ee.concat(se)});return new sf(R,F)}}class Ec{constructor(u,m){this.min=u,this.max=m,this.center=o.scale$1([],o.add([],this.min,this.max),.5)}quadrant(u){const m=[u%2==0,u<2],x=o.clone$2(this.min),S=o.clone$2(this.max);for(let R=0;R<m.length;R++)x[R]=m[R]?this.min[R]:this.center[R],S[R]=m[R]?this.center[R]:this.max[R];return S[2]=this.max[2],new Ec(x,S)}distanceX(u){return Math.max(Math.min(this.max[0],u[0]),this.min[0])-u[0]}distanceY(u){return Math.max(Math.min(this.max[1],u[1]),this.min[1])-u[1]}intersects(u){const m=[[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 x=!0;for(let S=0;S<u.planes.length;S++){const R=u.planes[S];let F=0;for(let V=0;V<m.length;V++)o.dot$1(R,m[V])>=0&&F++;if(F===0)return 0;F!==m.length&&(x=!1)}if(x)return 2;for(let S=0;S<3;S++){let R=Number.MAX_VALUE,F=-Number.MAX_VALUE;for(let V=0;V<u.points.length;V++){const H=u.points[V][S]-this.min[S];R=Math.min(R,H),F=Math.max(F,H)}if(F<0||R>this.max[S]-this.min[S])return 0}return 1}}class du{constructor(u=0,m=0,x=0,S=0){if(isNaN(u)||u<0||isNaN(m)||m<0||isNaN(x)||x<0||isNaN(S)||S<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=u,this.bottom=m,this.left=x,this.right=S}interpolate(u,m,x){return m.top!=null&&u.top!=null&&(this.top=o.number(u.top,m.top,x)),m.bottom!=null&&u.bottom!=null&&(this.bottom=o.number(u.bottom,m.bottom,x)),m.left!=null&&u.left!=null&&(this.left=o.number(u.left,m.left,x)),m.right!=null&&u.right!=null&&(this.right=o.number(u.right,m.right,x)),this}getCenter(u,m){const x=o.clamp((this.left+u-this.right)/2,0,u),S=o.clamp((this.top+m-this.bottom)/2,0,m);return new o.pointGeometry(x,S)}equals(u){return this.top===u.top&&this.bottom===u.bottom&&this.left===u.left&&this.right===u.right}clone(){return new du(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}class Pc{constructor(u,m,x,S,R){this.tileSize=512,this.maxValidLatitude=85.051129,this.freezeElevation=!1,this._renderWorldCopies=R===void 0||!!R,this._minZoom=u||0,this._maxZoom=m||22,this._minPitch=x==null?0:x,this._maxPitch=S==null?60:S,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 du,this._posMatrixCache={},this._alignedPosMatrixCache={}}clone(){const u=new Pc(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return u.tileSize=this.tileSize,u.latRange=this.latRange,u.width=this.width,u.height=this.height,u._center=this._center,u._elevation=this._elevation,u.zoom=this.zoom,u.angle=this.angle,u._fov=this._fov,u._pitch=this._pitch,u._unmodified=this._unmodified,u._edgeInsets=this._edgeInsets.clone(),u._calcMatrices(),u}get minZoom(){return this._minZoom}set minZoom(u){this._minZoom!==u&&(this._minZoom=u,this.zoom=Math.max(this.zoom,u))}get maxZoom(){return this._maxZoom}set maxZoom(u){this._maxZoom!==u&&(this._maxZoom=u,this.zoom=Math.min(this.zoom,u))}get minPitch(){return this._minPitch}set minPitch(u){this._minPitch!==u&&(this._minPitch=u,this.pitch=Math.max(this.pitch,u))}get maxPitch(){return this._maxPitch}set maxPitch(u){this._maxPitch!==u&&(this._maxPitch=u,this.pitch=Math.min(this.pitch,u))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(u){u===void 0?u=!0:u===null&&(u=!1),this._renderWorldCopies=u}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(u){const m=-o.wrap(u,-180,180)*Math.PI/180;var x;this.angle!==m&&(this._unmodified=!1,this.angle=m,this._calcMatrices(),this.rotationMatrix=(x=new o.ARRAY_TYPE(4),o.ARRAY_TYPE!=Float32Array&&(x[1]=0,x[2]=0),x[0]=1,x[3]=1,x),function(S,R,F){var V=R[0],H=R[1],q=R[2],ee=R[3],se=Math.sin(F),he=Math.cos(F);S[0]=V*he+q*se,S[1]=H*he+ee*se,S[2]=V*-se+q*he,S[3]=H*-se+ee*he}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(u){const m=o.clamp(u,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==m&&(this._unmodified=!1,this._pitch=m,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(u){u=Math.max(.01,Math.min(60,u)),this._fov!==u&&(this._unmodified=!1,this._fov=u/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(u){const m=Math.min(Math.max(u,this.minZoom),this.maxZoom);this._zoom!==m&&(this._unmodified=!1,this._zoom=m,this.scale=this.zoomScale(m),this.tileZoom=Math.floor(m),this.zoomFraction=m-this.tileZoom,this._constrain(),this._calcMatrices())}get center(){return this._center}set center(u){u.lat===this._center.lat&&u.lng===this._center.lng||(this._unmodified=!1,this._center=u,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(u){u!==this._elevation&&(this._elevation=u,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(u){this._edgeInsets.equals(u)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,u,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(u){return this._edgeInsets.equals(u)}interpolatePadding(u,m,x){this._unmodified=!1,this._edgeInsets.interpolate(u,m,x),this._constrain(),this._calcMatrices()}coveringZoomLevel(u){const m=(u.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/u.tileSize));return Math.max(0,m)}getVisibleUnwrappedCoordinates(u){const m=[new o.UnwrappedTileID(0,u)];if(this._renderWorldCopies){const x=this.pointCoordinate(new o.pointGeometry(0,0)),S=this.pointCoordinate(new o.pointGeometry(this.width,0)),R=this.pointCoordinate(new o.pointGeometry(this.width,this.height)),F=this.pointCoordinate(new o.pointGeometry(0,this.height)),V=Math.floor(Math.min(x.x,S.x,R.x,F.x)),H=Math.floor(Math.max(x.x,S.x,R.x,F.x)),q=1;for(let ee=V-q;ee<=H+q;ee++)ee!==0&&m.push(new o.UnwrappedTileID(ee,u))}return m}coveringTiles(u){var m,x;let S=this.coveringZoomLevel(u);const R=S;if(u.minzoom!==void 0&&S<u.minzoom)return[];u.maxzoom!==void 0&&S>u.maxzoom&&(S=u.maxzoom);const F=this.pointCoordinate(this.getCameraPoint()),V=o.MercatorCoordinate.fromLngLat(this.center),H=Math.pow(2,S),q=[H*F.x,H*F.y,0],ee=[H*V.x,H*V.y,0],se=sf.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,S);let he=u.minzoom||0;!u.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(he=S);const ke=u.terrain?2/Math.min(this.tileSize,u.tileSize)*this.tileSize:3,_e=De=>({aabb:new Ec([De*H,0,0],[(De+1)*H,H,0]),zoom:0,x:0,y:0,wrap:De,fullyVisible:!1}),Se=[],Ve=[],Ge=S,rt=u.reparseOverscaled?R:S;if(this._renderWorldCopies)for(let De=1;De<=3;De++)Se.push(_e(-De)),Se.push(_e(De));for(Se.push(_e(0));Se.length>0;){const De=Se.pop(),ft=De.x,st=De.y;let wt=De.fullyVisible;if(!wt){const fn=De.aabb.intersects(se);if(fn===0)continue;wt=fn===2}const Ct=u.terrain?q:ee,Ut=De.aabb.distanceX(Ct),xt=De.aabb.distanceY(Ct),cn=Math.max(Math.abs(Ut),Math.abs(xt)),Jt=ke+(1<<Ge-De.zoom)-2;if(De.zoom===Ge||cn>Jt&&De.zoom>=he){const fn=Ge-De.zoom,$n=q[0]-.5-(ft<<fn),Hn=q[1]-.5-(st<<fn);Ve.push({tileID:new o.OverscaledTileID(De.zoom===Ge?rt:De.zoom,De.wrap,De.zoom,ft,st),distanceSq:o.sqrLen([ee[0]-.5-ft,ee[1]-.5-st]),tileDistanceToCamera:Math.sqrt($n*$n+Hn*Hn)})}else for(let fn=0;fn<4;fn++){const $n=(ft<<1)+fn%2,Hn=(st<<1)+(fn>>1),Tn=De.zoom+1;let mr=De.aabb.quadrant(fn);if(u.terrain){const gr=new o.OverscaledTileID(Tn,De.wrap,Tn,$n,Hn),ir=u.terrain.getMinMaxElevation(gr),ar=(m=ir.minElevation)!==null&&m!==void 0?m:this.elevation,xr=(x=ir.maxElevation)!==null&&x!==void 0?x:this.elevation;mr=new Ec([mr.min[0],mr.min[1],ar],[mr.max[0],mr.max[1],xr])}Se.push({aabb:mr,zoom:Tn,x:$n,y:Hn,wrap:De.wrap,fullyVisible:wt})}}return Ve.sort((De,ft)=>De.distanceSq-ft.distanceSq).map(De=>De.tileID)}resize(u,m){this.width=u,this.height=m,this.pixelsToGLUnits=[2/u,-2/m],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(u){return Math.pow(2,u)}scaleZoom(u){return Math.log(u)/Math.LN2}project(u){const m=o.clamp(u.lat,-this.maxValidLatitude,this.maxValidLatitude);return new o.pointGeometry(o.mercatorXfromLng(u.lng)*this.worldSize,o.mercatorYfromLat(m)*this.worldSize)}unproject(u){return new o.MercatorCoordinate(u.x/this.worldSize,u.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}updateElevation(u){this.freezeElevation||(this.elevation=u?this.getElevation(this._center,u):0)}getElevation(u,m){const x=o.MercatorCoordinate.fromLngLat(u),S=(1<<this.tileZoom)*o.EXTENT,R=x.x*S,F=x.y*S,V=Math.floor(R/o.EXTENT),H=Math.floor(F/o.EXTENT),q=new o.OverscaledTileID(this.tileZoom,0,this.tileZoom,V,H);return m.getElevation(q,R%o.EXTENT,F%o.EXTENT,o.EXTENT)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(u){const m=this.pointLocation(this.centerPoint,u),x=this.getElevation(m,u);if(!(this.elevation-x))return;const S=this.getCameraPosition(),R=o.MercatorCoordinate.fromLngLat(S.lngLat,S.altitude),F=o.MercatorCoordinate.fromLngLat(m,x),V=R.x-F.x,H=R.y-F.y,q=R.z-F.z,ee=Math.sqrt(V*V+H*H+q*q),se=this.scaleZoom(this.cameraToCenterDistance/ee/this.tileSize);this._elevation=x,this._center=m,this.zoom=se}setLocationAtPoint(u,m){const x=this.pointCoordinate(m),S=this.pointCoordinate(this.centerPoint),R=this.locationCoordinate(u),F=new o.MercatorCoordinate(R.x-(x.x-S.x),R.y-(x.y-S.y));this.center=this.coordinateLocation(F),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(u,m){return m?this.coordinatePoint(this.locationCoordinate(u),this.getElevation(u,m),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(u))}pointLocation(u,m){return this.coordinateLocation(this.pointCoordinate(u,m))}locationCoordinate(u){return o.MercatorCoordinate.fromLngLat(u)}coordinateLocation(u){return u&&u.toLngLat()}pointCoordinate(u,m){if(m){const he=m.pointCoordinate(u);if(he!=null)return he}const x=[u.x,u.y,0,1],S=[u.x,u.y,1,1];o.transformMat4(x,x,this.pixelMatrixInverse),o.transformMat4(S,S,this.pixelMatrixInverse);const R=x[3],F=S[3],V=x[1]/R,H=S[1]/F,q=x[2]/R,ee=S[2]/F,se=q===ee?0:(0-q)/(ee-q);return new o.MercatorCoordinate(o.number(x[0]/R,S[0]/F,se)/this.worldSize,o.number(V,H,se)/this.worldSize)}coordinatePoint(u,m=0,x=this.pixelMatrix){const S=[u.x*this.worldSize,u.y*this.worldSize,m,1];return o.transformMat4(S,S,x),new o.pointGeometry(S[0]/S[3],S[1]/S[3])}getBounds(){const u=Math.max(0,this.height/2-this.getHorizon());return new o.LngLatBounds().extend(this.pointLocation(new o.pointGeometry(0,u))).extend(this.pointLocation(new o.pointGeometry(this.width,u))).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(u){u?(this.lngRange=[u.getWest(),u.getEast()],this.latRange=[u.getSouth(),u.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])}calculatePosMatrix(u,m=!1){const x=u.key,S=m?this._alignedPosMatrixCache:this._posMatrixCache;if(S[x])return S[x];const R=u.canonical,F=this.worldSize/this.zoomScale(R.z),V=R.x+Math.pow(2,R.z)*u.wrap,H=o.identity(new Float64Array(16));return o.translate(H,H,[V*F,R.y*F,0]),o.scale(H,H,[F/o.EXTENT,F/o.EXTENT,1]),o.multiply(H,m?this.alignedProjMatrix:this.projMatrix,H),S[x]=new Float32Array(H),S[x]}customLayerMatrix(){return this.mercatorMatrix.slice()}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let u,m,x,S,R=-90,F=90,V=-180,H=180;const q=this.size,ee=this._unmodified;if(this.latRange){const ke=this.latRange;R=o.mercatorYfromLat(ke[1])*this.worldSize,F=o.mercatorYfromLat(ke[0])*this.worldSize,u=F-R<q.y?q.y/(F-R):0}if(this.lngRange){const ke=this.lngRange;V=o.wrap(o.mercatorXfromLng(ke[0])*this.worldSize,0,this.worldSize),H=o.wrap(o.mercatorXfromLng(ke[1])*this.worldSize,0,this.worldSize),H<V&&(H+=this.worldSize),m=H-V<q.x?q.x/(H-V):0}const se=this.point,he=Math.max(m||0,u||0);if(he)return this.center=this.unproject(new o.pointGeometry(m?(H+V)/2:se.x,u?(F+R)/2:se.y)),this.zoom+=this.scaleZoom(he),this._unmodified=ee,void(this._constraining=!1);if(this.latRange){const ke=se.y,_e=q.y/2;ke-_e<R&&(S=R+_e),ke+_e>F&&(S=F-_e)}if(this.lngRange){const ke=(V+H)/2,_e=o.wrap(se.x,ke-this.worldSize/2,ke+this.worldSize/2),Se=q.x/2;_e-Se<V&&(x=V+Se),_e+Se>H&&(x=H-Se)}x===void 0&&S===void 0||(this.center=this.unproject(new o.pointGeometry(x!==void 0?x:se.x,S!==void 0?S:se.y)).wrap()),this._unmodified=ee,this._constraining=!1}_calcMatrices(){if(!this.height)return;const u=this.centerOffset,m=this.point.x,x=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=o.mercatorZfromAltitude(1,this.center.lat)*this.worldSize;let S=o.identity(new Float64Array(16));o.scale(S,S,[this.width/2,-this.height/2,1]),o.translate(S,S,[1,-1,0]),this.labelPlaneMatrix=S,S=o.identity(new Float64Array(16)),o.scale(S,S,[1,-1,1]),o.translate(S,S,[-1,-1,0]),o.scale(S,S,[2/this.width,2/this.height,1]),this.glCoordMatrix=S,this.cameraToSeaLevelDistance=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch);const R=Math.PI/2+this._pitch,F=this._fov*(.5+u.y/this.height),V=Math.sin(F)*this.cameraToSeaLevelDistance/Math.sin(o.clamp(Math.PI-R-F,.01,Math.PI-.01)),H=this.getHorizon(),q=2*Math.atan(H/this.cameraToCenterDistance)*(.5+u.y/(2*H)),ee=Math.sin(q)*this.cameraToSeaLevelDistance/Math.sin(o.clamp(Math.PI-R-q,.01,Math.PI-.01)),se=Math.cos(Math.PI/2-this._pitch)*V+this.cameraToSeaLevelDistance,he=Math.cos(Math.PI/2-this._pitch)*ee+this.cameraToSeaLevelDistance,ke=1.01*Math.min(se,he),_e=this.height/50;S=new Float64Array(16),o.perspective(S,this._fov,this.width/this.height,_e,ke),S[8]=2*-u.x/this.width,S[9]=2*u.y/this.height,o.scale(S,S,[1,-1,1]),o.translate(S,S,[0,0,-this.cameraToCenterDistance]),o.rotateX(S,S,this._pitch),o.rotateZ(S,S,this.angle),o.translate(S,S,[-m,-x,0]),this.mercatorMatrix=o.scale([],S,[this.worldSize,this.worldSize,this.worldSize]),o.scale(S,S,[1,1,this._pixelPerMeter]),this.pixelMatrix=o.multiply(new Float64Array(16),this.labelPlaneMatrix,S),o.translate(S,S,[0,0,-this.elevation]),this.projMatrix=S,this.invProjMatrix=o.invert([],S),this.pixelMatrix3D=o.multiply(new Float64Array(16),this.labelPlaneMatrix,S);const Se=this.width%2/2,Ve=this.height%2/2,Ge=Math.cos(this.angle),rt=Math.sin(this.angle),De=m-Math.round(m)+Ge*Se+rt*Ve,ft=x-Math.round(x)+Ge*Ve+rt*Se,st=new Float64Array(S);if(o.translate(st,st,[De>.5?De-1:De,ft>.5?ft-1:ft,0]),this.alignedProjMatrix=st,S=o.invert(new Float64Array(16),this.pixelMatrix),!S)throw new Error("failed to invert matrix");this.pixelMatrixInverse=S,this._posMatrixCache={},this._alignedPosMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const u=this.pointCoordinate(new o.pointGeometry(0,0)),m=[u.x*this.worldSize,u.y*this.worldSize,0,1];return o.transformMat4(m,m,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const u=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new o.pointGeometry(0,u))}getCameraQueryGeometry(u){const m=this.getCameraPoint();if(u.length===1)return[u[0],m];{let x=m.x,S=m.y,R=m.x,F=m.y;for(const V of u)x=Math.min(x,V.x),S=Math.min(S,V.y),R=Math.max(R,V.x),F=Math.max(F,V.y);return[new o.pointGeometry(x,S),new o.pointGeometry(R,S),new o.pointGeometry(R,F),new o.pointGeometry(x,F),new o.pointGeometry(x,S)]}}}class Jv{constructor(u){this._hashName=u&&encodeURIComponent(u),o.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=function(m,x){let S=!1,R=null;const F=()=>{R=null,S&&(m(),R=setTimeout(F,300),S=!1)};return()=>(S=!0,R||F(),R)}(this._updateHashUnthrottled.bind(this))}addTo(u){return this._map=u,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(u){const m=this._map.getCenter(),x=Math.round(100*this._map.getZoom())/100,S=Math.ceil((x*Math.LN2+Math.log(512/360/.5))/Math.LN10),R=Math.pow(10,S),F=Math.round(m.lng*R)/R,V=Math.round(m.lat*R)/R,H=this._map.getBearing(),q=this._map.getPitch();let ee="";if(ee+=u?`/${F}/${V}/${x}`:`${x}/${V}/${F}`,(H||q)&&(ee+="/"+Math.round(10*H)/10),q&&(ee+=`/${Math.round(q)}`),this._hashName){const se=this._hashName;let he=!1;const ke=window.location.hash.slice(1).split("&").map(_e=>{const Se=_e.split("=")[0];return Se===se?(he=!0,`${Se}=${ee}`):_e}).filter(_e=>_e);return he||ke.push(`${se}=${ee}`),`#${ke.join("&")}`}return`#${ee}`}_getCurrentHash(){const u=window.location.hash.replace("#","");if(this._hashName){let m;return u.split("&").map(x=>x.split("=")).forEach(x=>{x[0]===this._hashName&&(m=x)}),(m&&m[1]||"").split("/")}return u.split("/")}_onHashChange(){const u=this._getCurrentHash();if(u.length>=3&&!u.some(m=>isNaN(m))){const m=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(u[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+u[2],+u[1]],zoom:+u[0],bearing:m,pitch:+(u[4]||0)}),!0}return!1}_updateHashUnthrottled(){const u=window.location.href.replace(/(#.+)?$/,this.getHashString());try{window.history.replaceState(window.history.state,null,u)}catch{}}}const Tc={linearity:.3,easing:o.bezier(0,0,.3,1)},ey=o.extend({deceleration:2500,maxSpeed:1400},Tc),ty=o.extend({deceleration:20,maxSpeed:1400},Tc),ny=o.extend({deceleration:1e3,maxSpeed:360},Tc),fu=o.extend({deceleration:1e3,maxSpeed:90},Tc);class ry{constructor(u){this._map=u,this.clear()}clear(){this._inertiaBuffer=[]}record(u){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:o.exported.now(),settings:u})}_drainInertiaBuffer(){const u=this._inertiaBuffer,m=o.exported.now();for(;u.length>0&&m-u[0].time>160;)u.shift()}_onMoveEnd(u){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const m={zoom:0,bearing:0,pitch:0,pan:new o.pointGeometry(0,0),pinchAround:void 0,around:void 0};for(const{settings:R}of this._inertiaBuffer)m.zoom+=R.zoomDelta||0,m.bearing+=R.bearingDelta||0,m.pitch+=R.pitchDelta||0,R.panDelta&&m.pan._add(R.panDelta),R.around&&(m.around=R.around),R.pinchAround&&(m.pinchAround=R.pinchAround);const x=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,S={};if(m.pan.mag()){const R=Ic(m.pan.mag(),x,o.extend({},ey,u||{}));S.offset=m.pan.mult(R.amount/m.pan.mag()),S.center=this._map.transform.center,kc(S,R)}if(m.zoom){const R=Ic(m.zoom,x,ty);S.zoom=this._map.transform.zoom+R.amount,kc(S,R)}if(m.bearing){const R=Ic(m.bearing,x,ny);S.bearing=this._map.transform.bearing+o.clamp(R.amount,-179,179),kc(S,R)}if(m.pitch){const R=Ic(m.pitch,x,fu);S.pitch=this._map.transform.pitch+R.amount,kc(S,R)}if(S.zoom||S.bearing){const R=m.pinchAround===void 0?m.around:m.pinchAround;S.around=R?this._map.unproject(R):this._map.getCenter()}return this.clear(),o.extend(S,{noMoveStart:!0})}}function kc(w,u){(!w.duration||w.duration<u.duration)&&(w.duration=u.duration,w.easing=u.easing)}function Ic(w,u,m){const{maxSpeed:x,linearity:S,deceleration:R}=m,F=o.clamp(w*S/(u/1e3),-x,x),V=Math.abs(F)/(R*S);return{easing:m.easing,duration:1e3*V,amount:F*(V/2)}}class Do extends o.Event{constructor(u,m,x,S={}){const R=v.mousePos(m.getCanvasContainer(),x),F=m.unproject(R);super(u,o.extend({point:R,lngLat:F,originalEvent:x},S)),this._defaultPrevented=!1,this.target=m}preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}}class Mc extends o.Event{constructor(u,m,x){const S=u==="touchend"?x.changedTouches:x.touches,R=v.touchPos(m.getCanvasContainer(),S),F=R.map(H=>m.unproject(H)),V=R.reduce((H,q,ee,se)=>H.add(q.div(se.length)),new o.pointGeometry(0,0));super(u,{points:R,point:V,lngLats:F,lngLat:m.unproject(V),originalEvent:x}),this._defaultPrevented=!1}preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}}class Oo extends o.Event{constructor(u,m,x){super(u,{originalEvent:x}),this._defaultPrevented=!1}preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}}class ow{constructor(u,m){this._map=u,this._clickTolerance=m.clickTolerance}reset(){delete this._mousedownPos}wheel(u){return this._firePreventable(new Oo(u.type,this._map,u))}mousedown(u,m){return this._mousedownPos=m,this._firePreventable(new Do(u.type,this._map,u))}mouseup(u){this._map.fire(new Do(u.type,this._map,u))}click(u,m){this._mousedownPos&&this._mousedownPos.dist(m)>=this._clickTolerance||this._map.fire(new Do(u.type,this._map,u))}dblclick(u){return this._firePreventable(new Do(u.type,this._map,u))}mouseover(u){this._map.fire(new Do(u.type,this._map,u))}mouseout(u){this._map.fire(new Do(u.type,this._map,u))}touchstart(u){return this._firePreventable(new Mc(u.type,this._map,u))}touchmove(u){this._map.fire(new Mc(u.type,this._map,u))}touchend(u){this._map.fire(new Mc(u.type,this._map,u))}touchcancel(u){this._map.fire(new Mc(u.type,this._map,u))}_firePreventable(u){if(this._map.fire(u),u.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class $s{constructor(u){this._map=u}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(u){this._map.fire(new Do(u.type,this._map,u))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Do("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(u){this._delayContextMenu?this._contextMenuEvent=u:this._ignoreContextMenu||this._map.fire(new Do(u.type,this._map,u)),this._map.listens("contextmenu")&&u.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class iy{constructor(u,m){this._map=u,this._el=u.getCanvasContainer(),this._container=u.getContainer(),this._clickTolerance=m.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(u,m){this.isEnabled()&&u.shiftKey&&u.button===0&&(v.disableDrag(),this._startPos=this._lastPos=m,this._active=!0)}mousemoveWindow(u,m){if(!this._active)return;const x=m;if(this._lastPos.equals(x)||!this._box&&x.dist(this._startPos)<this._clickTolerance)return;const S=this._startPos;this._lastPos=x,this._box||(this._box=v.create("div","maplibregl-boxzoom mapboxgl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair","mapboxgl-crosshair"),this._fireEvent("boxzoomstart",u));const R=Math.min(S.x,x.x),F=Math.max(S.x,x.x),V=Math.min(S.y,x.y),H=Math.max(S.y,x.y);v.setTransform(this._box,`translate(${R}px,${V}px)`),this._box.style.width=F-R+"px",this._box.style.height=H-V+"px"}mouseupWindow(u,m){if(!this._active||u.button!==0)return;const x=this._startPos,S=m;if(this.reset(),v.suppressClick(),x.x!==S.x||x.y!==S.y)return this._map.fire(new o.Event("boxzoomend",{originalEvent:u})),{cameraAnimation:R=>R.fitScreenCoordinates(x,S,this._map.getBearing(),{linear:!0})};this._fireEvent("boxzoomcancel",u)}keydown(u){this._active&&u.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",u))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair","mapboxgl-crosshair"),this._box&&(v.remove(this._box),this._box=null),v.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(u,m){return this._map.fire(new o.Event(u,{originalEvent:m}))}}function hs(w,u){if(w.length!==u.length)throw new Error(`The number of touches and points are not equal - touches ${w.length}, points ${u.length}`);const m={};for(let x=0;x<w.length;x++)m[w[x].identifier]=u[x];return m}class Rc{constructor(u){this.reset(),this.numTouches=u.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(u,m,x){(this.centroid||x.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=u.timeStamp),x.length===this.numTouches&&(this.centroid=function(S){const R=new o.pointGeometry(0,0);for(const F of S)R._add(F);return R.div(S.length)}(m),this.touches=hs(x,m)))}touchmove(u,m,x){if(this.aborted||!this.centroid)return;const S=hs(x,m);for(const R in this.touches){const F=this.touches[R],V=S[R];(!V||V.dist(F)>30)&&(this.aborted=!0)}}touchend(u,m,x){if((!this.centroid||u.timeStamp-this.startTime>500)&&(this.aborted=!0),x.length===0){const S=!this.aborted&&this.centroid;if(this.reset(),S)return S}}}class yp{constructor(u){this.singleTap=new Rc(u),this.numTaps=u.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(u,m,x){this.singleTap.touchstart(u,m,x)}touchmove(u,m,x){this.singleTap.touchmove(u,m,x)}touchend(u,m,x){const S=this.singleTap.touchend(u,m,x);if(S){const R=u.timeStamp-this.lastTime<500,F=!this.lastTap||this.lastTap.dist(S)<30;if(R&&F||this.reset(),this.count++,this.lastTime=u.timeStamp,this.lastTap=S,this.count===this.numTaps)return this.reset(),S}}}class aw{constructor(){this._zoomIn=new yp({numTouches:1,numTaps:2}),this._zoomOut=new yp({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(u,m,x){this._zoomIn.touchstart(u,m,x),this._zoomOut.touchstart(u,m,x)}touchmove(u,m,x){this._zoomIn.touchmove(u,m,x),this._zoomOut.touchmove(u,m,x)}touchend(u,m,x){const S=this._zoomIn.touchend(u,m,x),R=this._zoomOut.touchend(u,m,x);return S?(this._active=!0,u.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:F=>F.easeTo({duration:300,zoom:F.getZoom()+1,around:F.unproject(S)},{originalEvent:u})}):R?(this._active=!0,u.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:F=>F.easeTo({duration:300,zoom:F.getZoom()-1,around:F.unproject(R)},{originalEvent:u})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}const sw={0:1,2:2};class lf{constructor(u){this.reset(),this._clickTolerance=u.clickTolerance||1}reset(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton}_correctButton(u,m){return!1}_move(u,m){return{}}mousedown(u,m){if(this._lastPoint)return;const x=v.mouseButton(u);this._correctButton(u,x)&&(this._lastPoint=m,this._eventButton=x)}mousemoveWindow(u,m){const x=this._lastPoint;if(x){if(u.preventDefault(),function(S,R){const F=sw[R];return S.buttons===void 0||(S.buttons&F)!==F}(u,this._eventButton))this.reset();else if(this._moved||!(m.dist(x)<this._clickTolerance))return this._moved=!0,this._lastPoint=m,this._move(x,m)}}mouseupWindow(u){this._lastPoint&&v.mouseButton(u)===this._eventButton&&(this._moved&&v.suppressClick(),this.reset())}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Dc extends lf{mousedown(u,m){super.mousedown(u,m),this._lastPoint&&(this._active=!0)}_correctButton(u,m){return m===0&&!u.ctrlKey}_move(u,m){return{around:m,panDelta:m.sub(u)}}}class ps extends lf{_correctButton(u,m){return m===0&&u.ctrlKey||m===2}_move(u,m){const x=.8*(m.x-u.x);if(x)return this._active=!0,{bearingDelta:x}}contextmenu(u){u.preventDefault()}}class gn extends lf{_correctButton(u,m){return m===0&&u.ctrlKey||m===2}_move(u,m){const x=-.5*(m.y-u.y);if(x)return this._active=!0,{pitchDelta:x}}contextmenu(u){u.preventDefault()}}class oy{constructor(u,m){this._minTouches=u.cooperativeGestures?2:1,this._clickTolerance=u.clickTolerance||1,this._map=m,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new o.pointGeometry(0,0),setTimeout(()=>{this._cancelCooperativeMessage=!1},200)}touchstart(u,m,x){return this._calculateTransform(u,m,x)}touchmove(u,m,x){if(this._map._cooperativeGestures&&(this._minTouches===2&&x.length<2&&!this._cancelCooperativeMessage?this._map._onCooperativeGesture(u,!1,x.length):this._cancelCooperativeMessage||(this._cancelCooperativeMessage=!0)),this._active&&!(x.length<this._minTouches))return u.preventDefault(),this._calculateTransform(u,m,x)}touchend(u,m,x){this._calculateTransform(u,m,x),this._active&&x.length<this._minTouches&&this.reset()}touchcancel(){this.reset()}_calculateTransform(u,m,x){x.length>0&&(this._active=!0);const S=hs(x,m),R=new o.pointGeometry(0,0),F=new o.pointGeometry(0,0);let V=0;for(const q in S){const ee=S[q],se=this._touches[q];se&&(R._add(ee),F._add(ee.sub(se)),V++,S[q]=ee)}if(this._touches=S,V<this._minTouches||!F.mag())return;const H=F.div(V);return this._sum._add(H),this._sum.mag()<this._clickTolerance?void 0:{around:R.div(V),panDelta:H}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class yl{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}_start(u){}_move(u,m,x){return{}}touchstart(u,m,x){this._firstTwoTouches||x.length<2||(this._firstTwoTouches=[x[0].identifier,x[1].identifier],this._start([m[0],m[1]]))}touchmove(u,m,x){if(!this._firstTwoTouches)return;u.preventDefault();const[S,R]=this._firstTwoTouches,F=Bs(x,m,S),V=Bs(x,m,R);if(!F||!V)return;const H=this._aroundCenter?null:F.add(V).div(2);return this._move([F,V],H,u)}touchend(u,m,x){if(!this._firstTwoTouches)return;const[S,R]=this._firstTwoTouches,F=Bs(x,m,S),V=Bs(x,m,R);F&&V||(this._active&&v.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(u){this._enabled=!0,this._aroundCenter=!!u&&u.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}function Bs(w,u,m){for(let x=0;x<w.length;x++)if(w[x].identifier===m)return u[x]}function xp(w,u){return Math.log(w/u)/Math.LN2}class sn extends yl{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(u){this._startDistance=this._distance=u[0].dist(u[1])}_move(u,m){const x=this._distance;if(this._distance=u[0].dist(u[1]),this._active||!(Math.abs(xp(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:xp(this._distance,x),pinchAround:m}}}function uf(w,u){return 180*w.angleWith(u)/Math.PI}class lw extends yl{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(u){this._startVector=this._vector=u[0].sub(u[1]),this._minDiameter=u[0].dist(u[1])}_move(u,m){const x=this._vector;if(this._vector=u[0].sub(u[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:uf(this._vector,x),pinchAround:m}}_isBelowThreshold(u){this._minDiameter=Math.min(this._minDiameter,u.mag());const m=25/(Math.PI*this._minDiameter)*360,x=uf(u,this._startVector);return Math.abs(x)<m}}function bp(w){return Math.abs(w.y)>Math.abs(w.x)}class _p extends yl{constructor(u){super(),this._map=u}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(u,m,x){super.touchstart(u,m,x),this._currentTouchCount=x.length}_start(u){this._lastPoints=u,bp(u[0].sub(u[1]))&&(this._valid=!1)}_move(u,m,x){if(this._map._cooperativeGestures&&this._currentTouchCount<3)return;const S=u[0].sub(this._lastPoints[0]),R=u[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(S,R,x.timeStamp),this._valid?(this._lastPoints=u,this._active=!0,{pitchDelta:(S.y+R.y)/2*-.5}):void 0}gestureBeginsVertically(u,m,x){if(this._valid!==void 0)return this._valid;const S=u.mag()>=2,R=m.mag()>=2;if(!S&&!R)return;if(!S||!R)return this._firstMove===void 0&&(this._firstMove=x),x-this._firstMove<100&&void 0;const F=u.y>0==m.y>0;return bp(u)&&bp(m)&&F}}const ay={panStep:100,bearingStep:15,pitchStep:10};class sy{constructor(){const u=ay;this._panStep=u.panStep,this._bearingStep=u.bearingStep,this._pitchStep=u.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(u){if(u.altKey||u.ctrlKey||u.metaKey)return;let m=0,x=0,S=0,R=0,F=0;switch(u.keyCode){case 61:case 107:case 171:case 187:m=1;break;case 189:case 109:case 173:m=-1;break;case 37:u.shiftKey?x=-1:(u.preventDefault(),R=-1);break;case 39:u.shiftKey?x=1:(u.preventDefault(),R=1);break;case 38:u.shiftKey?S=1:(u.preventDefault(),F=-1);break;case 40:u.shiftKey?S=-1:(u.preventDefault(),F=1);break;default:return}return this._rotationDisabled&&(x=0,S=0),{cameraAnimation:V=>{const H=V.getZoom();V.easeTo({duration:300,easeId:"keyboardHandler",easing:uw,zoom:m?Math.round(H)+m*(u.shiftKey?2:1):H,bearing:V.getBearing()+x*this._bearingStep,pitch:V.getPitch()+S*this._pitchStep,offset:[-R*this._panStep,-F*this._panStep],center:V.getCenter()},{originalEvent:u})}}}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 uw(w){return w*(2-w)}const ly=4.000244140625;class wp{constructor(u,m){this._map=u,this._el=u.getCanvasContainer(),this._handler=m,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222,o.bindAll(["_onTimeout"],this)}setZoomRate(u){this._defaultZoomRate=u}setWheelZoomRate(u){this._wheelZoomRate=u}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(u){this.isEnabled()||(this._enabled=!0,this._aroundCenter=u&&u.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}wheel(u){if(!this.isEnabled())return;if(this._map._cooperativeGestures){if(!this._map._metaPress)return;u.preventDefault()}let m=u.deltaMode===WheelEvent.DOM_DELTA_LINE?40*u.deltaY:u.deltaY;const x=o.exported.now(),S=x-(this._lastWheelEventTime||0);this._lastWheelEventTime=x,m!==0&&m%ly==0?this._type="wheel":m!==0&&Math.abs(m)<4?this._type="trackpad":S>400?(this._type=null,this._lastValue=m,this._timeout=setTimeout(this._onTimeout,40,u)):this._type||(this._type=Math.abs(S*m)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,m+=this._lastValue)),u.shiftKey&&m&&(m/=4),this._type&&(this._lastWheelEvent=u,this._delta-=m,this._active||this._start(u)),u.preventDefault()}_onTimeout(u){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(u)}_start(u){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 m=v.mousePos(this._el,u);this._around=o.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(m)),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 u=this._map.transform;if(this._delta!==0){const V=this._type==="wheel"&&Math.abs(this._delta)>ly?this._wheelZoomRate:this._defaultZoomRate;let H=2/(1+Math.exp(-Math.abs(this._delta*V)));this._delta<0&&H!==0&&(H=1/H);const q=typeof this._targetZoom=="number"?u.zoomScale(this._targetZoom):u.scale;this._targetZoom=Math.min(u.maxZoom,Math.max(u.minZoom,u.scaleZoom(q*H))),this._type==="wheel"&&(this._startZoom=u.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const m=typeof this._targetZoom=="number"?this._targetZoom:u.zoom,x=this._startZoom,S=this._easing;let R,F=!1;if(this._type==="wheel"&&x&&S){const V=Math.min((o.exported.now()-this._lastWheelEventTime)/200,1),H=S(V);R=o.number(x,m,H),V<1?this._frameId||(this._frameId=!0):F=!0}else R=m,F=!0;return this._active=!0,F&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._handler._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!F,zoomDelta:R-u.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(u){let m=o.ease;if(this._prevEase){const x=this._prevEase,S=(o.exported.now()-x.start)/x.duration,R=x.easing(S+.01)-x.easing(S),F=.27/Math.sqrt(R*R+1e-4)*.01,V=Math.sqrt(.0729-F*F);m=o.bezier(F,V,.25,1)}return this._prevEase={start:o.exported.now(),duration:u,easing:m},m}reset(){this._active=!1}}class Cp{constructor(u,m){this._clickZoom=u,this._tapZoom=m}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 Sp{constructor(){this.reset()}reset(){this._active=!1}dblclick(u,m){return u.preventDefault(),{cameraAnimation:x=>{x.easeTo({duration:300,zoom:x.getZoom()+(u.shiftKey?-1:1),around:x.unproject(m)},{originalEvent:u})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ep{constructor(){this._tap=new yp({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()}touchstart(u,m,x){this._swipePoint||(this._tapTime&&u.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?x.length>0&&(this._swipePoint=m[0],this._swipeTouch=x[0].identifier):this._tap.touchstart(u,m,x))}touchmove(u,m,x){if(this._tapTime){if(this._swipePoint){if(x[0].identifier!==this._swipeTouch)return;const S=m[0],R=S.y-this._swipePoint.y;return this._swipePoint=S,u.preventDefault(),this._active=!0,{zoomDelta:R/128}}}else this._tap.touchmove(u,m,x)}touchend(u,m,x){this._tapTime?this._swipePoint&&x.length===0&&this.reset():this._tap.touchend(u,m,x)&&(this._tapTime=u.timeStamp)}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class mo{constructor(u,m,x){this._el=u,this._mousePan=m,this._touchPan=x}enable(u){this._inertiaOptions=u||{},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 Vs{constructor(u,m,x){this._pitchWithRotate=u.pitchWithRotate,this._mouseRotate=m,this._mousePitch=x}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 uy{constructor(u,m,x,S){this._el=u,this._touchZoom=m,this._touchRotate=x,this._tapDragZoom=S,this._rotationDisabled=!1,this._enabled=!0}enable(u){this._touchZoom.enable(u),this._rotationDisabled||this._touchRotate.enable(u),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 hu=w=>w.zoom||w.drag||w.pitch||w.rotate;class Pp extends o.Event{}function Oc(w){return w.panDelta&&w.panDelta.mag()||w.zoomDelta||w.bearingDelta||w.pitchDelta}class cy{constructor(u,m){this._map=u,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new ry(u),this._bearingSnap=m.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(m),o.bindAll(["handleEvent","handleWindowEvent"],this);const x=this._el;this._listeners=[[x,"touchstart",{passive:!0}],[x,"touchmove",{passive:!1}],[x,"touchend",void 0],[x,"touchcancel",void 0],[x,"mousedown",void 0],[x,"mousemove",void 0],[x,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[x,"mouseover",void 0],[x,"mouseout",void 0],[x,"dblclick",void 0],[x,"click",void 0],[x,"keydown",{capture:!1}],[x,"keyup",void 0],[x,"wheel",{passive:!1}],[x,"contextmenu",void 0],[window,"blur",void 0]];for(const[S,R,F]of this._listeners)v.addEventListener(S,R,S===document?this.handleWindowEvent:this.handleEvent,F)}destroy(){for(const[u,m,x]of this._listeners)v.removeEventListener(u,m,u===document?this.handleWindowEvent:this.handleEvent,x)}_addDefaultHandlers(u){const m=this._map,x=m.getCanvasContainer();this._add("mapEvent",new ow(m,u));const S=m.boxZoom=new iy(m,u);this._add("boxZoom",S);const R=new aw,F=new Sp;m.doubleClickZoom=new Cp(F,R),this._add("tapZoom",R),this._add("clickZoom",F);const V=new Ep;this._add("tapDragZoom",V);const H=m.touchPitch=new _p(m);this._add("touchPitch",H);const q=new ps(u),ee=new gn(u);m.dragRotate=new Vs(u,q,ee),this._add("mouseRotate",q,["mousePitch"]),this._add("mousePitch",ee,["mouseRotate"]);const se=new Dc(u),he=new oy(u,m);m.dragPan=new mo(x,se,he),this._add("mousePan",se),this._add("touchPan",he,["touchZoom","touchRotate"]);const ke=new lw,_e=new sn;m.touchZoomRotate=new uy(x,_e,ke,V),this._add("touchRotate",ke,["touchPan","touchZoom"]),this._add("touchZoom",_e,["touchPan","touchRotate"]);const Se=m.scrollZoom=new wp(m,this);this._add("scrollZoom",Se,["mousePan"]);const Ve=m.keyboard=new sy;this._add("keyboard",Ve),this._add("blockableMapEvent",new $s(m));for(const Ge of["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"])u.interactive&&u[Ge]&&m[Ge].enable(u[Ge])}_add(u,m,x){this._handlers.push({handlerName:u,handler:m,allowed:x}),this._handlersById[u]=m}stop(u){if(!this._updatingCamera){for(const{handler:m}of this._handlers)m.reset();this._inertia.clear(),this._fireEvents({},{},u),this._changes=[]}}isActive(){for(const{handler:u}of this._handlers)if(u.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return Boolean(hu(this._eventsInProgress))||this.isZooming()}_blockedByActive(u,m,x){for(const S in u)if(S!==x&&(!m||m.indexOf(S)<0))return!0;return!1}handleWindowEvent(u){this.handleEvent(u,`${u.type}Window`)}_getMapTouches(u){const m=[];for(const x of u)this._el.contains(x.target)&&m.push(x);return m}handleEvent(u,m){if(u.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const x=u.type==="renderFrame"?void 0:u,S={needsRenderFrame:!1},R={},F={},V=u.touches,H=V?this._getMapTouches(V):void 0,q=H?v.touchPos(this._el,H):v.mousePos(this._el,u);for(const{handlerName:he,handler:ke,allowed:_e}of this._handlers){if(!ke.isEnabled())continue;let Se;this._blockedByActive(F,_e,he)?ke.reset():ke[m||u.type]&&(Se=ke[m||u.type](u,q,H),this.mergeHandlerResult(S,R,Se,he,x),Se&&Se.needsRenderFrame&&this._triggerRenderFrame()),(Se||ke.isActive())&&(F[he]=ke)}const ee={};for(const he in this._previousActiveHandlers)F[he]||(ee[he]=x);this._previousActiveHandlers=F,(Object.keys(ee).length||Oc(S))&&(this._changes.push([S,R,ee]),this._triggerRenderFrame()),(Object.keys(F).length||Oc(S))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:se}=S;se&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],se(this._map))}mergeHandlerResult(u,m,x,S,R){if(!x)return;o.extend(u,x);const F={handlerName:S,originalEvent:x.originalEvent||R};x.zoomDelta!==void 0&&(m.zoom=F),x.panDelta!==void 0&&(m.drag=F),x.pitchDelta!==void 0&&(m.pitch=F),x.bearingDelta!==void 0&&(m.rotate=F)}_applyChanges(){const u={},m={},x={};for(const[S,R,F]of this._changes)S.panDelta&&(u.panDelta=(u.panDelta||new o.pointGeometry(0,0))._add(S.panDelta)),S.zoomDelta&&(u.zoomDelta=(u.zoomDelta||0)+S.zoomDelta),S.bearingDelta&&(u.bearingDelta=(u.bearingDelta||0)+S.bearingDelta),S.pitchDelta&&(u.pitchDelta=(u.pitchDelta||0)+S.pitchDelta),S.around!==void 0&&(u.around=S.around),S.pinchAround!==void 0&&(u.pinchAround=S.pinchAround),S.noInertia&&(u.noInertia=S.noInertia),o.extend(m,R),o.extend(x,F);this._updateMapTransform(u,m,x),this._changes=[]}_updateMapTransform(u,m,x){const S=this._map,R=S.transform,F=S.style&&S.style.terrain;if(!(Oc(u)||F&&this._drag))return this._fireEvents(m,x,!0);let{panDelta:V,zoomDelta:H,bearingDelta:q,pitchDelta:ee,around:se,pinchAround:he}=u;he!==void 0&&(se=he),S._stop(!0),se=se||S.transform.centerPoint;const ke=R.pointLocation(V?se.sub(V):se);q&&(R.bearing+=q),ee&&(R.pitch+=ee),H&&(R.zoom+=H),F?m.drag&&!this._drag?(this._drag={center:R.centerPoint,lngLat:R.pointLocation(se),point:se,handlerName:m.drag.handlerName},S.fire(new o.Event("freezeElevation",{freeze:!0}))):this._drag&&x[this._drag.handlerName]?(S.fire(new o.Event("freezeElevation",{freeze:!1})),this._drag=null):m.drag&&this._drag&&(R.center=R.pointLocation(R.centerPoint.sub(V))):R.setLocationAtPoint(ke,se),this._map._update(),u.noInertia||this._inertia.record(u),this._fireEvents(m,x,!0)}_fireEvents(u,m,x){const S=hu(this._eventsInProgress),R=hu(u),F={};for(const ee in u){const{originalEvent:se}=u[ee];this._eventsInProgress[ee]||(F[`${ee}start`]=se),this._eventsInProgress[ee]=u[ee]}!S&&R&&this._fireEvent("movestart",R.originalEvent);for(const ee in F)this._fireEvent(ee,F[ee]);R&&this._fireEvent("move",R.originalEvent);for(const ee in u){const{originalEvent:se}=u[ee];this._fireEvent(ee,se)}const V={};let H;for(const ee in this._eventsInProgress){const{handlerName:se,originalEvent:he}=this._eventsInProgress[ee];this._handlersById[se].isActive()||(delete this._eventsInProgress[ee],H=m[se]||he,V[`${ee}end`]=H)}for(const ee in V)this._fireEvent(ee,V[ee]);const q=hu(this._eventsInProgress);if(x&&(S||R)&&!q){this._updatingCamera=!0;const ee=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),se=he=>he!==0&&-this._bearingSnap<he&&he<this._bearingSnap;ee?(se(ee.bearing||this._map.getBearing())&&(ee.bearing=0),this._map.easeTo(ee,{originalEvent:H})):(this._map.fire(new o.Event("moveend",{originalEvent:H})),se(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}}_fireEvent(u,m){this._map.fire(new o.Event(u,m?{originalEvent:m}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(u=>{delete this._frameId,this.handleEvent(new Pp("renderFrame",{timeStamp:u})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}const Wo={extend:(w,...u)=>o.extend(w,...u),run(w){w()},logToElement(w,u=!1,m="log"){const x=window.document.getElementById(m);x&&(u&&(x.innerHTML=""),x.innerHTML+=`<br>${w}`)}};class $r extends o.Evented{constructor(u,m){super(),this._moving=!1,this._zooming=!1,this.transform=u,this._bearingSnap=m.bearingSnap,o.bindAll(["_renderFrameCallback"],this)}getCenter(){return new o.LngLat(this.transform.center.lng,this.transform.center.lat)}setCenter(u,m){return this.jumpTo({center:u},m)}panBy(u,m,x){return u=o.pointGeometry.convert(u).mult(-1),this.panTo(this.transform.center,o.extend({offset:u},m),x)}panTo(u,m,x){return this.easeTo(o.extend({center:u},m),x)}getZoom(){return this.transform.zoom}setZoom(u,m){return this.jumpTo({zoom:u},m),this}zoomTo(u,m,x){return this.easeTo(o.extend({zoom:u},m),x)}zoomIn(u,m){return this.zoomTo(this.getZoom()+1,u,m),this}zoomOut(u,m){return this.zoomTo(this.getZoom()-1,u,m),this}getBearing(){return this.transform.bearing}setBearing(u,m){return this.jumpTo({bearing:u},m),this}getPadding(){return this.transform.padding}setPadding(u,m){return this.jumpTo({padding:u},m),this}rotateTo(u,m,x){return this.easeTo(o.extend({bearing:u},m),x)}resetNorth(u,m){return this.rotateTo(0,o.extend({duration:1e3},u),m),this}resetNorthPitch(u,m){return this.easeTo(o.extend({bearing:0,pitch:0,duration:1e3},u),m),this}snapToNorth(u,m){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(u,m):this}getPitch(){return this.transform.pitch}setPitch(u,m){return this.jumpTo({pitch:u},m),this}cameraForBounds(u,m){u=o.LngLatBounds.convert(u);const x=m&&m.bearing||0;return this._cameraForBoxAndBearing(u.getNorthWest(),u.getSouthEast(),x,m)}_cameraForBoxAndBearing(u,m,x,S){const R={top:0,bottom:0,right:0,left:0};if(typeof(S=o.extend({padding:R,offset:[0,0],maxZoom:this.transform.maxZoom},S)).padding=="number"){const st=S.padding;S.padding={top:st,bottom:st,right:st,left:st}}S.padding=o.extend(R,S.padding);const F=this.transform,V=F.padding,H=F.project(o.LngLat.convert(u)),q=F.project(o.LngLat.convert(m)),ee=H.rotate(-x*Math.PI/180),se=q.rotate(-x*Math.PI/180),he=new o.pointGeometry(Math.max(ee.x,se.x),Math.max(ee.y,se.y)),ke=new o.pointGeometry(Math.min(ee.x,se.x),Math.min(ee.y,se.y)),_e=he.sub(ke),Se=(F.width-(V.left+V.right+S.padding.left+S.padding.right))/_e.x,Ve=(F.height-(V.top+V.bottom+S.padding.top+S.padding.bottom))/_e.y;if(Ve<0||Se<0)return void o.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const Ge=Math.min(F.scaleZoom(F.scale*Math.min(Se,Ve)),S.maxZoom),rt=o.pointGeometry.convert(S.offset),De=new o.pointGeometry((S.padding.left-S.padding.right)/2,(S.padding.top-S.padding.bottom)/2).rotate(x*Math.PI/180),ft=rt.add(De).mult(F.scale/F.zoomScale(Ge));return{center:F.unproject(H.add(q).div(2).sub(ft)),zoom:Ge,bearing:x}}fitBounds(u,m,x){return this._fitInternal(this.cameraForBounds(u,m),m,x)}fitScreenCoordinates(u,m,x,S,R){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(o.pointGeometry.convert(u)),this.transform.pointLocation(o.pointGeometry.convert(m)),x,S),S,R)}_fitInternal(u,m,x){return u?(delete(m=o.extend(u,m)).padding,m.linear?this.easeTo(m,x):this.flyTo(m,x)):this}jumpTo(u,m){this.stop();const x=this.transform;let S=!1,R=!1,F=!1;return"zoom"in u&&x.zoom!==+u.zoom&&(S=!0,x.zoom=+u.zoom),u.center!==void 0&&(x.center=o.LngLat.convert(u.center)),"bearing"in u&&x.bearing!==+u.bearing&&(R=!0,x.bearing=+u.bearing),"pitch"in u&&x.pitch!==+u.pitch&&(F=!0,x.pitch=+u.pitch),u.padding==null||x.isPaddingEqual(u.padding)||(x.padding=u.padding),this.fire(new o.Event("movestart",m)).fire(new o.Event("move",m)),S&&this.fire(new o.Event("zoomstart",m)).fire(new o.Event("zoom",m)).fire(new o.Event("zoomend",m)),R&&this.fire(new o.Event("rotatestart",m)).fire(new o.Event("rotate",m)).fire(new o.Event("rotateend",m)),F&&this.fire(new o.Event("pitchstart",m)).fire(new o.Event("pitch",m)).fire(new o.Event("pitchend",m)),this.fire(new o.Event("moveend",m))}calculateCameraOptionsFromTo(u,m,x,S=0){const R=o.MercatorCoordinate.fromLngLat(u,m),F=o.MercatorCoordinate.fromLngLat(x,S),V=F.x-R.x,H=F.y-R.y,q=F.z-R.z,ee=Math.hypot(V,H,q);if(ee===0)throw new Error("Can't calculate camera options with same From and To");const se=Math.hypot(V,H),he=this.transform.scaleZoom(this.transform.cameraToCenterDistance/ee/this.transform.tileSize),ke=180*Math.atan2(V,-H)/Math.PI;let _e=180*Math.acos(se/ee)/Math.PI;return _e=q<0?90-_e:90+_e,{center:F.toLngLat(),zoom:he,pitch:_e,bearing:ke}}easeTo(u,m){this._stop(!1,u.easeId),((u=o.extend({offset:[0,0],duration:500,easing:o.ease},u)).animate===!1||!u.essential&&o.exported.prefersReducedMotion)&&(u.duration=0);const x=this.transform,S=this.getZoom(),R=this.getBearing(),F=this.getPitch(),V=this.getPadding(),H="zoom"in u?+u.zoom:S,q="bearing"in u?this._normalizeBearing(u.bearing,R):R,ee="pitch"in u?+u.pitch:F,se="padding"in u?u.padding:x.padding,he=o.pointGeometry.convert(u.offset);let ke=x.centerPoint.add(he);const _e=x.pointLocation(ke),Se=o.LngLat.convert(u.center||_e);this._normalizeCenter(Se);const Ve=x.project(_e),Ge=x.project(Se).sub(Ve),rt=x.zoomScale(H-S);let De,ft;u.around&&(De=o.LngLat.convert(u.around),ft=x.locationPoint(De));const st={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||H!==S,this._rotating=this._rotating||R!==q,this._pitching=this._pitching||ee!==F,this._padding=!x.isPaddingEqual(se),this._easeId=u.easeId,this._prepareEase(m,u.noMoveStart,st),this._ease(wt=>{if(this._zooming&&(x.zoom=o.number(S,H,wt)),this._rotating&&(x.bearing=o.number(R,q,wt)),this._pitching&&(x.pitch=o.number(F,ee,wt)),this._padding&&(x.interpolatePadding(V,se,wt),ke=x.centerPoint.add(he)),De)x.setLocationAtPoint(De,ft);else{const Ct=x.zoomScale(x.zoom-S),Ut=H>S?Math.min(2,rt):Math.max(.5,rt),xt=Math.pow(Ut,1-wt),cn=x.unproject(Ve.add(Ge.mult(wt*xt)).mult(Ct));x.setLocationAtPoint(x.renderWorldCopies?cn.wrap():cn,ke)}this._fireMoveEvents(m)},wt=>{this._afterEase(m,wt)},u),this}_prepareEase(u,m,x={}){this._moving=!0,this.fire(new o.Event("freezeElevation",{freeze:!0})),m||x.moving||this.fire(new o.Event("movestart",u)),this._zooming&&!x.zooming&&this.fire(new o.Event("zoomstart",u)),this._rotating&&!x.rotating&&this.fire(new o.Event("rotatestart",u)),this._pitching&&!x.pitching&&this.fire(new o.Event("pitchstart",u))}_fireMoveEvents(u){this.fire(new o.Event("move",u)),this._zooming&&this.fire(new o.Event("zoom",u)),this._rotating&&this.fire(new o.Event("rotate",u)),this._pitching&&this.fire(new o.Event("pitch",u))}_afterEase(u,m){if(this._easeId&&m&&this._easeId===m)return;delete this._easeId,this.fire(new o.Event("freezeElevation",{freeze:!1}));const x=this._zooming,S=this._rotating,R=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,x&&this.fire(new o.Event("zoomend",u)),S&&this.fire(new o.Event("rotateend",u)),R&&this.fire(new o.Event("pitchend",u)),this.fire(new o.Event("moveend",u))}flyTo(u,m){if(!u.essential&&o.exported.prefersReducedMotion){const Tn=o.pick(u,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Tn,m)}this.stop(),u=o.extend({offset:[0,0],speed:1.2,curve:1.42,easing:o.ease},u);const x=this.transform,S=this.getZoom(),R=this.getBearing(),F=this.getPitch(),V=this.getPadding(),H="zoom"in u?o.clamp(+u.zoom,x.minZoom,x.maxZoom):S,q="bearing"in u?this._normalizeBearing(u.bearing,R):R,ee="pitch"in u?+u.pitch:F,se="padding"in u?u.padding:x.padding,he=x.zoomScale(H-S),ke=o.pointGeometry.convert(u.offset);let _e=x.centerPoint.add(ke);const Se=x.pointLocation(_e),Ve=o.LngLat.convert(u.center||Se);this._normalizeCenter(Ve);const Ge=x.project(Se),rt=x.project(Ve).sub(Ge);let De=u.curve;const ft=Math.max(x.width,x.height),st=ft/he,wt=rt.mag();if("minZoom"in u){const Tn=o.clamp(Math.min(u.minZoom,S,H),x.minZoom,x.maxZoom),mr=ft/x.zoomScale(Tn-S);De=Math.sqrt(mr/wt*2)}const Ct=De*De;function Ut(Tn){const mr=(st*st-ft*ft+(Tn?-1:1)*Ct*Ct*wt*wt)/(2*(Tn?st:ft)*Ct*wt);return Math.log(Math.sqrt(mr*mr+1)-mr)}function xt(Tn){return(Math.exp(Tn)-Math.exp(-Tn))/2}function cn(Tn){return(Math.exp(Tn)+Math.exp(-Tn))/2}const Jt=Ut(0);let fn=function(Tn){return cn(Jt)/cn(Jt+De*Tn)},$n=function(Tn){return ft*((cn(Jt)*(xt(mr=Jt+De*Tn)/cn(mr))-xt(Jt))/Ct)/wt;var mr},Hn=(Ut(1)-Jt)/De;if(Math.abs(wt)<1e-6||!isFinite(Hn)){if(Math.abs(ft-st)<1e-6)return this.easeTo(u,m);const Tn=st<ft?-1:1;Hn=Math.abs(Math.log(st/ft))/De,$n=function(){return 0},fn=function(mr){return Math.exp(Tn*De*mr)}}return u.duration="duration"in u?+u.duration:1e3*Hn/("screenSpeed"in u?+u.screenSpeed/De:+u.speed),u.maxDuration&&u.duration>u.maxDuration&&(u.duration=0),this._zooming=!0,this._rotating=R!==q,this._pitching=ee!==F,this._padding=!x.isPaddingEqual(se),this._prepareEase(m,!1),this._ease(Tn=>{const mr=Tn*Hn,gr=1/fn(mr);x.zoom=Tn===1?H:S+x.scaleZoom(gr),this._rotating&&(x.bearing=o.number(R,q,Tn)),this._pitching&&(x.pitch=o.number(F,ee,Tn)),this._padding&&(x.interpolatePadding(V,se,Tn),_e=x.centerPoint.add(ke));const ir=Tn===1?Ve:x.unproject(Ge.add(rt.mult($n(mr))).mult(gr));x.setLocationAtPoint(x.renderWorldCopies?ir.wrap():ir,_e),this._fireMoveEvents(m)},()=>this._afterEase(m),u),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(u,m){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const x=this._onEaseEnd;delete this._onEaseEnd,x.call(this,m)}if(!u){const x=this.handlers;x&&x.stop(!1)}return this}_ease(u,m,x){x.animate===!1||x.duration===0?(u(1),m()):(this._easeStart=o.exported.now(),this._easeOptions=x,this._onEaseFrame=u,this._onEaseEnd=m,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_renderFrameCallback(){const u=Math.min((o.exported.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(u)),u<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()}_normalizeBearing(u,m){u=o.wrap(u,-180,180);const x=Math.abs(u-m);return Math.abs(u-360-m)<x&&(u-=360),Math.abs(u+360-m)<x&&(u+=360),u}_normalizeCenter(u){const m=this.transform;if(!m.renderWorldCopies||m.lngRange)return;const x=u.lng-m.center.lng;u.lng+=x>180?-360:x<-180?360:0}}class Ac{constructor(u={}){this.options=u,o.bindAll(["_toggleAttribution","_updateData","_updateCompact","_updateCompactMinimize"],this)}getDefaultPosition(){return"bottom-right"}onAdd(u){return this._map=u,this._compact=this.options&&this.options.compact,this._container=v.create("details","maplibregl-ctrl maplibregl-ctrl-attrib mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=v.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=v.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(){v.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(u,m){const x=this._map._getUIString(`AttributionControl.${m}`);u.title=x,u.setAttribute("aria-label",x)}_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(u){!u||u.sourceDataType!=="metadata"&&u.sourceDataType!=="visibility"&&u.dataType!=="style"&&u.type!=="terrain"||this._updateAttributions()}_updateAttributions(){if(!this._map.style)return;let u=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?u=u.concat(this.options.customAttribution.map(S=>typeof S!="string"?"":S)):typeof this.options.customAttribution=="string"&&u.push(this.options.customAttribution)),this._map.style.stylesheet){const S=this._map.style.stylesheet;this.styleOwner=S.owner,this.styleId=S.id}const m=this._map.style.sourceCaches;for(const S in m){const R=m[S];if(R.used||R.usedForTerrain){const F=R.getSource();F.attribution&&u.indexOf(F.attribution)<0&&u.push(F.attribution)}}u=u.filter(S=>String(S).trim()),u.sort((S,R)=>S.length-R.length),u=u.filter((S,R)=>{for(let F=R+1;F<u.length;F++)if(u[F].indexOf(S)>=0)return!1;return!0});const x=u.join(" | ");x!==this._attribHTML&&(this._attribHTML=x,u.length?(this._innerContainer.innerHTML=x,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 cf{constructor(u={}){this.options=u,o.bindAll(["_updateCompact"],this)}getDefaultPosition(){return"bottom-left"}onAdd(u){this._map=u,this._compact=this.options&&this.options.compact,this._container=v.create("div","maplibregl-ctrl mapboxgl-ctrl");const m=v.create("a","maplibregl-ctrl-logo mapboxgl-ctrl-logo");return m.target="_blank",m.rel="noopener nofollow",m.href="https://maplibre.org/",m.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),m.setAttribute("rel","noopener nofollow"),this._container.appendChild(m),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){v.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}_updateCompact(){const u=this._container.children;if(u.length){const m=u[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&m.classList.add("maplibregl-compact","mapboxgl-compact"):m.classList.remove("maplibregl-compact","mapboxgl-compact")}}}class dy{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(u){const m=++this._id;return this._queue.push({callback:u,id:m,cancelled:!1}),m}remove(u){const m=this._currentlyRunning,x=m?this._queue.concat(m):this._queue;for(const S of x)if(S.id===u)return void(S.cancelled=!0)}run(u=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const m=this._currentlyRunning=this._queue;this._queue=[];for(const x of m)if(!x.cancelled&&(x.callback(u),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}const fy={"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"},hy={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},cw={showCompass:!0,showZoom:!0,visualizePitch:!1};class Fa{constructor(u,m,x=!1){this._clickTolerance=10,this.element=m,this.mouseRotate=new ps({clickTolerance:u.dragRotate._mouseRotate._clickTolerance}),this.map=u,x&&(this.mousePitch=new gn({clickTolerance:u.dragRotate._mousePitch._clickTolerance})),o.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),v.addEventListener(m,"mousedown",this.mousedown),v.addEventListener(m,"touchstart",this.touchstart,{passive:!1}),v.addEventListener(m,"touchmove",this.touchmove),v.addEventListener(m,"touchend",this.touchend),v.addEventListener(m,"touchcancel",this.reset)}down(u,m){this.mouseRotate.mousedown(u,m),this.mousePitch&&this.mousePitch.mousedown(u,m),v.disableDrag()}move(u,m){const x=this.map,S=this.mouseRotate.mousemoveWindow(u,m);if(S&&S.bearingDelta&&x.setBearing(x.getBearing()+S.bearingDelta),this.mousePitch){const R=this.mousePitch.mousemoveWindow(u,m);R&&R.pitchDelta&&x.setPitch(x.getPitch()+R.pitchDelta)}}off(){const u=this.element;v.removeEventListener(u,"mousedown",this.mousedown),v.removeEventListener(u,"touchstart",this.touchstart,{passive:!1}),v.removeEventListener(u,"touchmove",this.touchmove),v.removeEventListener(u,"touchend",this.touchend),v.removeEventListener(u,"touchcancel",this.reset),this.offTemp()}offTemp(){v.enableDrag(),v.removeEventListener(window,"mousemove",this.mousemove),v.removeEventListener(window,"mouseup",this.mouseup)}mousedown(u){this.down(o.extend({},u,{ctrlKey:!0,preventDefault:()=>u.preventDefault()}),v.mousePos(this.element,u)),v.addEventListener(window,"mousemove",this.mousemove),v.addEventListener(window,"mouseup",this.mouseup)}mousemove(u){this.move(u,v.mousePos(this.element,u))}mouseup(u){this.mouseRotate.mouseupWindow(u),this.mousePitch&&this.mousePitch.mouseupWindow(u),this.offTemp()}touchstart(u){u.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=v.touchPos(this.element,u.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:()=>u.preventDefault()},this._startPos))}touchmove(u){u.targetTouches.length!==1?this.reset():(this._lastPos=v.touchPos(this.element,u.targetTouches)[0],this.move({preventDefault:()=>u.preventDefault()},this._lastPos))}touchend(u){u.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 Nc(w,u,m){if(w=new o.LngLat(w.lng,w.lat),u){const x=new o.LngLat(w.lng-360,w.lat),S=new o.LngLat(w.lng+360,w.lat),R=m.locationPoint(w).distSqr(u);m.locationPoint(x).distSqr(u)<R?w=x:m.locationPoint(S).distSqr(u)<R&&(w=S)}for(;Math.abs(w.lng-m.center.lng)>180;){const x=m.locationPoint(w);if(x.x>=0&&x.y>=0&&x.x<=m.width&&x.y<=m.height)break;w.lng>m.center.lng?w.lng-=360:w.lng+=360}return w}const xn={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 Rn(w,u,m){const x=w.classList;for(const S in xn)x.remove(`maplibregl-${m}-anchor-${S}`,`mapboxgl-${m}-anchor-${S}`);x.add(`maplibregl-${m}-anchor-${u}`,`mapboxgl-${m}-anchor-${u}`)}class pu extends o.Evented{constructor(u,m){if(super(),(u instanceof HTMLElement||m)&&(u=o.extend({element:u},m)),o.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=u&&u.anchor||"center",this._color=u&&u.color||"#3FB1CE",this._scale=u&&u.scale||1,this._draggable=u&&u.draggable||!1,this._clickTolerance=u&&u.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=u&&u.rotation||0,this._rotationAlignment=u&&u.rotationAlignment||"auto",this._pitchAlignment=u&&u.pitchAlignment&&u.pitchAlignment!=="auto"?u.pitchAlignment:this._rotationAlignment,u&&u.element)this._element=u.element,this._offset=o.pointGeometry.convert(u&&u.offset||[0,0]);else{this._defaultMarker=!0,this._element=v.create("div"),this._element.setAttribute("aria-label","Map marker");const x=v.createNS("http://www.w3.org/2000/svg","svg"),S=41,R=27;x.setAttributeNS(null,"display","block"),x.setAttributeNS(null,"height",`${S}px`),x.setAttributeNS(null,"width",`${R}px`),x.setAttributeNS(null,"viewBox",`0 0 ${R} ${S}`);const F=v.createNS("http://www.w3.org/2000/svg","g");F.setAttributeNS(null,"stroke","none"),F.setAttributeNS(null,"stroke-width","1"),F.setAttributeNS(null,"fill","none"),F.setAttributeNS(null,"fill-rule","evenodd");const V=v.createNS("http://www.w3.org/2000/svg","g");V.setAttributeNS(null,"fill-rule","nonzero");const H=v.createNS("http://www.w3.org/2000/svg","g");H.setAttributeNS(null,"transform","translate(3.0, 29.0)"),H.setAttributeNS(null,"fill","#000000");const q=[{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 rt of q){const De=v.createNS("http://www.w3.org/2000/svg","ellipse");De.setAttributeNS(null,"opacity","0.04"),De.setAttributeNS(null,"cx","10.5"),De.setAttributeNS(null,"cy","5.80029008"),De.setAttributeNS(null,"rx",rt.rx),De.setAttributeNS(null,"ry",rt.ry),H.appendChild(De)}const ee=v.createNS("http://www.w3.org/2000/svg","g");ee.setAttributeNS(null,"fill",this._color);const se=v.createNS("http://www.w3.org/2000/svg","path");se.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(se);const he=v.createNS("http://www.w3.org/2000/svg","g");he.setAttributeNS(null,"opacity","0.25"),he.setAttributeNS(null,"fill","#000000");const ke=v.createNS("http://www.w3.org/2000/svg","path");ke.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"),he.appendChild(ke);const _e=v.createNS("http://www.w3.org/2000/svg","g");_e.setAttributeNS(null,"transform","translate(6.0, 7.0)"),_e.setAttributeNS(null,"fill","#FFFFFF");const Se=v.createNS("http://www.w3.org/2000/svg","g");Se.setAttributeNS(null,"transform","translate(8.0, 8.0)");const Ve=v.createNS("http://www.w3.org/2000/svg","circle");Ve.setAttributeNS(null,"fill","#000000"),Ve.setAttributeNS(null,"opacity","0.25"),Ve.setAttributeNS(null,"cx","5.5"),Ve.setAttributeNS(null,"cy","5.5"),Ve.setAttributeNS(null,"r","5.4999962");const Ge=v.createNS("http://www.w3.org/2000/svg","circle");Ge.setAttributeNS(null,"fill","#FFFFFF"),Ge.setAttributeNS(null,"cx","5.5"),Ge.setAttributeNS(null,"cy","5.5"),Ge.setAttributeNS(null,"r","5.4999962"),Se.appendChild(Ve),Se.appendChild(Ge),V.appendChild(H),V.appendChild(ee),V.appendChild(he),V.appendChild(_e),V.appendChild(Se),x.appendChild(V),x.setAttributeNS(null,"height",S*this._scale+"px"),x.setAttributeNS(null,"width",R*this._scale+"px"),this._element.appendChild(x),this._offset=o.pointGeometry.convert(u&&u.offset||[0,-14])}this._element.classList.add("maplibregl-marker","mapboxgl-marker"),this._element.addEventListener("dragstart",x=>{x.preventDefault()}),this._element.addEventListener("mousedown",x=>{x.preventDefault()}),Rn(this._element,this._anchor,"marker"),this._popup=null}addTo(u){return this.remove(),this._map=u,u.getCanvasContainer().appendChild(this._element),u.on("move",this._update),u.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),v.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(u){return this._lngLat=o.LngLat.convert(u),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(u){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),u){if(!("offset"in u.options)){const S=Math.sqrt(Math.pow(13.5,2)/2);u.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[S,-1*(38.1-13.5+S)],"bottom-right":[-S,-1*(38.1-13.5+S)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=u,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(u){const m=u.code,x=u.charCode||u.keyCode;m!=="Space"&&m!=="Enter"&&x!==32&&x!==13||this.togglePopup()}_onMapClick(u){const m=u.originalEvent.target,x=this._element;this._popup&&(m===x||x.contains(m))&&this.togglePopup()}getPopup(){return this._popup}togglePopup(){const u=this._popup;return u?(u.isOpen()?u.remove():u.addTo(this._map),this):this}_update(u){if(!this._map)return;this._map.transform.renderWorldCopies&&(this._lngLat=Nc(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);let m="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?m=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(m=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let x="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?x="rotateX(0deg)":this._pitchAlignment==="map"&&(x=`rotateX(${this._map.getPitch()}deg)`),u&&u.type!=="moveend"||(this._pos=this._pos.round()),v.setTransform(this._element,`${xn[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${x} ${m}`),this._map.style&&this._map.style.terrain&&!this._opacityTimeout&&(this._opacityTimeout=setTimeout(()=>{const S=this._map.unproject(this._pos),R=40075016686e-3*Math.abs(Math.cos(this._lngLat.lat*Math.PI/180))/Math.pow(2,this._map.transform.tileZoom+8);this._element.style.opacity=S.distanceTo(this._lngLat)>20*R?"0.2":"1.0",this._opacityTimeout=null},100))}getOffset(){return this._offset}setOffset(u){return this._offset=o.pointGeometry.convert(u),this._update(),this}_onMove(u){if(!this._isDragging){const m=this._clickTolerance||this._map._clickTolerance;this._isDragging=u.point.dist(this._pointerdownPos)>=m}this._isDragging&&(this._pos=u.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(u){this._element.contains(u.originalEvent.target)&&(u.preventDefault(),this._positionDelta=u.point.sub(this._pos).add(this._offset),this._pointerdownPos=u.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(u){return this._draggable=!!u,this._map&&(u?(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(u){return this._rotation=u||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(u){return this._rotationAlignment=u||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(u){return this._pitchAlignment=u&&u!=="auto"?u:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}}const Tp={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Us,$i=0,js=!1;const za={maxWidth:100,unit:"metric"};function py(w,u,m){const x=m&&m.maxWidth||100,S=w._container.clientHeight/2,R=w.unproject([0,S]),F=w.unproject([x,S]),V=R.distanceTo(F);if(m&&m.unit==="imperial"){const H=3.2808*V;H>5280?Hs(u,x,H/5280,w._getUIString("ScaleControl.Miles")):Hs(u,x,H,w._getUIString("ScaleControl.Feet"))}else m&&m.unit==="nautical"?Hs(u,x,V/1852,w._getUIString("ScaleControl.NauticalMiles")):V>=1e3?Hs(u,x,V/1e3,w._getUIString("ScaleControl.Kilometers")):Hs(u,x,V,w._getUIString("ScaleControl.Meters"))}function Hs(w,u,m,x){const S=function(R){const F=Math.pow(10,`${Math.floor(R)}`.length-1);let V=R/F;return V=V>=10?10:V>=5?5:V>=3?3:V>=2?2:V>=1?1:function(H){const q=Math.pow(10,Math.ceil(-Math.log(H)/Math.LN10));return Math.round(H*q)/q}(V),F*V}(m);w.style.width=u*(S/m)+"px",w.innerHTML=`${S}&nbsp;${x}`}const ti={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},fi=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function kp(w){if(w){if(typeof w=="number"){const u=Math.round(Math.sqrt(.5*Math.pow(w,2)));return{center:new o.pointGeometry(0,0),top:new o.pointGeometry(0,w),"top-left":new o.pointGeometry(u,u),"top-right":new o.pointGeometry(-u,u),bottom:new o.pointGeometry(0,-w),"bottom-left":new o.pointGeometry(u,-u),"bottom-right":new o.pointGeometry(-u,-u),left:new o.pointGeometry(w,0),right:new o.pointGeometry(-w,0)}}if(w instanceof o.pointGeometry||Array.isArray(w)){const u=o.pointGeometry.convert(w);return{center:u,top:u,"top-left":u,"top-right":u,bottom:u,"bottom-left":u,"bottom-right":u,left:u,right:u}}return{center:o.pointGeometry.convert(w.center||[0,0]),top:o.pointGeometry.convert(w.top||[0,0]),"top-left":o.pointGeometry.convert(w["top-left"]||[0,0]),"top-right":o.pointGeometry.convert(w["top-right"]||[0,0]),bottom:o.pointGeometry.convert(w.bottom||[0,0]),"bottom-left":o.pointGeometry.convert(w["bottom-left"]||[0,0]),"bottom-right":o.pointGeometry.convert(w["bottom-right"]||[0,0]),left:o.pointGeometry.convert(w.left||[0,0]),right:o.pointGeometry.convert(w.right||[0,0])}}return kp(new o.pointGeometry(0,0))}const xl={supported:c,setRTLTextPlugin:o.setRTLTextPlugin,getRTLTextPluginStatus:o.getRTLTextPluginStatus,Map:class extends $r{constructor(w){var u;if(o.PerformanceUtils.mark(o.PerformanceMarkers.create),(w=o.extend({},hy,w)).minZoom!=null&&w.maxZoom!=null&&w.minZoom>w.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(w.minPitch!=null&&w.maxPitch!=null&&w.minPitch>w.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(w.minPitch!=null&&w.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(w.maxPitch!=null&&w.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new Pc(w.minZoom,w.maxZoom,w.minPitch,w.maxPitch,w.renderWorldCopies),{bearingSnap:w.bearingSnap}),this._interactive=w.interactive,this._cooperativeGestures=w.cooperativeGestures,this._maxTileCacheSize=w.maxTileCacheSize,this._failIfMajorPerformanceCaveat=w.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=w.preserveDrawingBuffer,this._antialias=w.antialias,this._trackResize=w.trackResize,this._bearingSnap=w.bearingSnap,this._refreshExpiredTiles=w.refreshExpiredTiles,this._fadeDuration=w.fadeDuration,this._crossSourceCollisions=w.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=w.collectResourceTiming,this._renderTaskQueue=new dy,this._controls=[],this._mapId=o.uniqueId(),this._locale=o.extend({},fy,w.locale),this._clickTolerance=w.clickTolerance,this._pixelRatio=(u=w.pixelRatio)!==null&&u!==void 0?u:devicePixelRatio,this._requestManager=new b(w.transformRequest),typeof w.container=="string"){if(this._container=document.getElementById(w.container),!this._container)throw new Error(`Container '${w.container}' not found.`)}else{if(!(w.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=w.container}if(w.maxBounds&&this.setMaxBounds(w.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 cy(this,w),this._cooperativeGestures&&this._setupCooperativeGestures(),this._hash=w.hash&&new Jv(typeof w.hash=="string"&&w.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:w.center,zoom:w.zoom,bearing:w.bearing,pitch:w.pitch}),w.bounds&&(this.resize(),this.fitBounds(w.bounds,o.extend({},w.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=w.localIdeographFontFamily,w.style&&this.setStyle(w.style,{localIdeographFontFamily:w.localIdeographFontFamily}),w.attributionControl&&this.addControl(new Ac({customAttribution:w.customAttribution})),w.maplibreLogo&&this.addControl(new cf,w.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",m=>{this._update(m.dataType==="style"),this.fire(new o.Event(`${m.dataType}data`,m))}),this.on("dataloading",m=>{this.fire(new o.Event(`${m.dataType}dataloading`,m))}),this.on("dataabort",m=>{this.fire(new o.Event("sourcedataabort",m))})}_getMapId(){return this._mapId}addControl(w,u){if(u===void 0&&(u=w.getDefaultPosition?w.getDefaultPosition():"top-right"),!w||!w.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 m=w.onAdd(this);this._controls.push(w);const x=this._controlPositions[u];return u.indexOf("bottom")!==-1?x.insertBefore(m,x.firstChild):x.appendChild(m),this}removeControl(w){if(!w||!w.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 u=this._controls.indexOf(w);return u>-1&&this._controls.splice(u,1),w.onRemove(this),this}hasControl(w){return this._controls.indexOf(w)>-1}calculateCameraOptionsFromTo(w,u,m,x){return x==null&&this.style.terrain&&(x=this.transform.getElevation(m,this.style.terrain)),super.calculateCameraOptionsFromTo(w,u,m,x)}resize(w){const u=this._containerDimensions(),m=u[0],x=u[1];this._resizeCanvas(m,x,this.getPixelRatio()),this.transform.resize(m,x),this.painter.resize(m,x,this.getPixelRatio());const S=!this._moving;return S&&(this.stop(),this.fire(new o.Event("movestart",w)).fire(new o.Event("move",w))),this.fire(new o.Event("resize",w)),S&&this.fire(new o.Event("moveend",w)),this}getPixelRatio(){return this._pixelRatio}setPixelRatio(w){const[u,m]=this._containerDimensions();this._pixelRatio=w,this._resizeCanvas(u,m,w),this.painter.resize(u,m,w)}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(w){return this.transform.setMaxBounds(o.LngLatBounds.convert(w)),this._update()}setMinZoom(w){if((w=w==null?-2:w)>=-2&&w<=this.transform.maxZoom)return this.transform.minZoom=w,this._update(),this.getZoom()<w&&this.setZoom(w),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(w){if((w=w==null?22:w)>=this.transform.minZoom)return this.transform.maxZoom=w,this._update(),this.getZoom()>w&&this.setZoom(w),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(w){if((w=w==null?0:w)<0)throw new Error("minPitch must be greater than or equal to 0");if(w>=0&&w<=this.transform.maxPitch)return this.transform.minPitch=w,this._update(),this.getPitch()<w&&this.setPitch(w),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(w){if((w=w==null?60:w)>85)throw new Error("maxPitch must be less than or equal to 85");if(w>=this.transform.minPitch)return this.transform.maxPitch=w,this._update(),this.getPitch()>w&&this.setPitch(w),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(w){return this.transform.renderWorldCopies=w,this._update()}project(w){return this.transform.locationPoint(o.LngLat.convert(w),this.style&&this.style.terrain)}unproject(w){return this.transform.pointLocation(o.pointGeometry.convert(w),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(w,u,m){if(w==="mouseenter"||w==="mouseover"){let x=!1;return{layer:u,listener:m,delegates:{mousemove:R=>{const F=this.getLayer(u)?this.queryRenderedFeatures(R.point,{layers:[u]}):[];F.length?x||(x=!0,m.call(this,new Do(w,this,R.originalEvent,{features:F}))):x=!1},mouseout:()=>{x=!1}}}}if(w==="mouseleave"||w==="mouseout"){let x=!1;return{layer:u,listener:m,delegates:{mousemove:F=>{(this.getLayer(u)?this.queryRenderedFeatures(F.point,{layers:[u]}):[]).length?x=!0:x&&(x=!1,m.call(this,new Do(w,this,F.originalEvent)))},mouseout:F=>{x&&(x=!1,m.call(this,new Do(w,this,F.originalEvent)))}}}}{const x=S=>{const R=this.getLayer(u)?this.queryRenderedFeatures(S.point,{layers:[u]}):[];R.length&&(S.features=R,m.call(this,S),delete S.features)};return{layer:u,listener:m,delegates:{[w]:x}}}}on(w,u,m){if(m===void 0)return super.on(w,u);const x=this._createDelegatedListener(w,u,m);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[w]=this._delegatedListeners[w]||[],this._delegatedListeners[w].push(x);for(const S in x.delegates)this.on(S,x.delegates[S]);return this}once(w,u,m){if(m===void 0)return super.once(w,u);const x=this._createDelegatedListener(w,u,m);for(const S in x.delegates)this.once(S,x.delegates[S]);return this}off(w,u,m){return m===void 0?super.off(w,u):(this._delegatedListeners&&this._delegatedListeners[w]&&(x=>{const S=this._delegatedListeners[w];for(let R=0;R<S.length;R++){const F=S[R];if(F.layer===u&&F.listener===m){for(const V in F.delegates)this.off(V,F.delegates[V]);return S.splice(R,1),this}}})(),this)}queryRenderedFeatures(w,u){if(!this.style)return[];let m;if(u!==void 0||w===void 0||w instanceof o.pointGeometry||Array.isArray(w)||(u=w,w=void 0),u=u||{},(w=w||[[0,0],[this.transform.width,this.transform.height]])instanceof o.pointGeometry||typeof w[0]=="number")m=[o.pointGeometry.convert(w)];else{const x=o.pointGeometry.convert(w[0]),S=o.pointGeometry.convert(w[1]);m=[x,new o.pointGeometry(S.x,x.y),S,new o.pointGeometry(x.x,S.y),x]}return this.style.queryRenderedFeatures(m,u,this.transform)}querySourceFeatures(w,u){return this.style.querySourceFeatures(w,u)}setStyle(w,u){return(u=o.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},u)).diff!==!1&&u.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&w?(this._diffStyle(w,u),this):(this._localIdeographFontFamily=u.localIdeographFontFamily,this._updateStyle(w,u))}setTransformRequest(w){return this._requestManager.setTransformRequest(w),this}_getUIString(w){const u=this._locale[w];if(u==null)throw new Error(`Missing UI string '${w}'`);return u}_updateStyle(w,u){return this.style&&(this.style.setEventedParent(null),this.style._remove()),w?(this.style=new Lr(this,u||{}),this.style.setEventedParent(this,{style:this.style}),typeof w=="string"?this.style.loadURL(w):this.style.loadJSON(w),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Lr(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(w,u){if(typeof w=="string"){const m=this._requestManager.transformRequest(w,o.ResourceType.Style);o.getJSON(m,(x,S)=>{x?this.fire(new o.ErrorEvent(x)):S&&this._updateDiff(S,u)})}else typeof w=="object"&&this._updateDiff(w,u)}_updateDiff(w,u){try{this.style.setState(w)&&this._update(!0)}catch(m){o.warnOnce(`Unable to perform style diff: ${m.message||m.error||m}. Rebuilding the style from scratch.`),this._updateStyle(w,u)}}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(w,u){return this._lazyInitEmptyStyle(),this.style.addSource(w,u),this._update(!0)}isSourceLoaded(w){const u=this.style&&this.style.sourceCaches[w];if(u!==void 0)return u.loaded();this.fire(new o.ErrorEvent(new Error(`There is no source with ID '${w}'`)))}setTerrain(w){return this.style.setTerrain(w),this}getTerrain(){return this.style.terrain&&this.style.terrain.options}areTilesLoaded(){const w=this.style&&this.style.sourceCaches;for(const u in w){const m=w[u]._tiles;for(const x in m){const S=m[x];if(S.state!=="loaded"&&S.state!=="errored")return!1}}return!0}addSourceType(w,u,m){return this._lazyInitEmptyStyle(),this.style.addSourceType(w,u,m)}removeSource(w){return this.style.removeSource(w),this._update(!0)}getSource(w){return this.style.getSource(w)}addImage(w,u,{pixelRatio:m=1,sdf:x=!1,stretchX:S,stretchY:R,content:F}={}){if(this._lazyInitEmptyStyle(),u instanceof HTMLImageElement||o.isImageBitmap(u)){const{width:V,height:H,data:q}=o.exported.getImageData(u);this.style.addImage(w,{data:new o.RGBAImage({width:V,height:H},q),pixelRatio:m,stretchX:S,stretchY:R,content:F,sdf:x,version:0})}else{if(u.width===void 0||u.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:V,height:H,data:q}=u,ee=u;this.style.addImage(w,{data:new o.RGBAImage({width:V,height:H},new Uint8Array(q)),pixelRatio:m,stretchX:S,stretchY:R,content:F,sdf:x,version:0,userImage:ee}),ee.onAdd&&ee.onAdd(this,w)}}}updateImage(w,u){const m=this.style.getImage(w);if(!m)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 x=u instanceof HTMLImageElement||o.isImageBitmap(u)?o.exported.getImageData(u):u,{width:S,height:R,data:F}=x;if(S===void 0||R===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(S!==m.data.width||R!==m.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 V=!(u instanceof HTMLImageElement||o.isImageBitmap(u));m.data.replace(F,V),this.style.updateImage(w,m)}hasImage(w){return w?!!this.style.getImage(w):(this.fire(new o.ErrorEvent(new Error("Missing required image id"))),!1)}removeImage(w){this.style.removeImage(w)}loadImage(w,u){o.getImage(this._requestManager.transformRequest(w,o.ResourceType.Image),u)}listImages(){return this.style.listImages()}addLayer(w,u){return this._lazyInitEmptyStyle(),this.style.addLayer(w,u),this._update(!0)}moveLayer(w,u){return this.style.moveLayer(w,u),this._update(!0)}removeLayer(w){return this.style.removeLayer(w),this._update(!0)}getLayer(w){return this.style.getLayer(w)}setLayerZoomRange(w,u,m){return this.style.setLayerZoomRange(w,u,m),this._update(!0)}setFilter(w,u,m={}){return this.style.setFilter(w,u,m),this._update(!0)}getFilter(w){return this.style.getFilter(w)}setPaintProperty(w,u,m,x={}){return this.style.setPaintProperty(w,u,m,x),this._update(!0)}getPaintProperty(w,u){return this.style.getPaintProperty(w,u)}setLayoutProperty(w,u,m,x={}){return this.style.setLayoutProperty(w,u,m,x),this._update(!0)}getLayoutProperty(w,u){return this.style.getLayoutProperty(w,u)}setLight(w,u={}){return this._lazyInitEmptyStyle(),this.style.setLight(w,u),this._update(!0)}getLight(){return this.style.getLight()}setFeatureState(w,u){return this.style.setFeatureState(w,u),this._update()}removeFeatureState(w,u){return this.style.removeFeatureState(w,u),this._update()}getFeatureState(w){return this.style.getFeatureState(w)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let w=0,u=0;return this._container&&(w=this._container.clientWidth||400,u=this._container.clientHeight||300),[w,u]}_setupContainer(){const w=this._container;w.classList.add("maplibregl-map","mapboxgl-map");const u=this._canvasContainer=v.create("div","maplibregl-canvas-container mapboxgl-canvas-container",w);this._interactive&&u.classList.add("maplibregl-interactive","mapboxgl-interactive"),this._canvas=v.create("canvas","maplibregl-canvas mapboxgl-canvas",u),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 m=this._containerDimensions();this._resizeCanvas(m[0],m[1],this.getPixelRatio());const x=this._controlContainer=v.create("div","maplibregl-control-container mapboxgl-control-container",w),S=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(R=>{S[R]=v.create("div",`maplibregl-ctrl-${R} mapboxgl-ctrl-${R}`,x)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_setupCooperativeGestures(){const w=this._container;this._metaPress=!1,this._cooperativeGesturesScreen=v.create("div","maplibregl-cooperative-gesture-screen",w);let u="Control",m=typeof this._cooperativeGestures!="boolean"&&this._cooperativeGestures.windowsHelpText?this._cooperativeGestures.windowsHelpText:"Use Ctrl + scroll to zoom the map";navigator.platform.indexOf("Mac")===0&&(m=typeof this._cooperativeGestures!="boolean"&&this._cooperativeGestures.macHelpText?this._cooperativeGestures.macHelpText:"Use \u2318 + scroll to zoom the map",u="Meta"),this._cooperativeGesturesScreen.innerHTML=`
<div class="maplibregl-desktop-message">${m}</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",x=>{x.key===u&&(this._metaPress=!0)}),document.addEventListener("keyup",x=>{x.key===u&&(this._metaPress=!1)}),this._canvasContainer.addEventListener("wheel",x=>{this._onCooperativeGesture(x,this._metaPress,1)},!1),this._canvasContainer.classList.remove("mapboxgl-touch-drag-pan","maplibregl-touch-drag-pan")}_resizeCanvas(w,u,m){this._canvas.width=m*w,this._canvas.height=m*u,this._canvas.style.width=`${w}px`,this._canvas.style.height=`${u}px`}_setupPainter(){const w=o.extend({},c.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),u=this._canvas.getContext("webgl",w)||this._canvas.getContext("experimental-webgl",w);u?(this.painter=new vp(u,this.transform),o.exported$1.testSupport(u)):this.fire(new o.ErrorEvent(new Error("Failed to initialize WebGL")))}_contextLost(w){w.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new o.Event("webglcontextlost",{originalEvent:w}))}_contextRestored(w){this._setupPainter(),this.resize(),this._update(),this.fire(new o.Event("webglcontextrestored",{originalEvent:w}))}_onMapScroll(w){if(w.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}_onCooperativeGesture(w,u,m){return!u&&m<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(w){return this.style?(this._styleDirty=this._styleDirty||w,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(w){return this._update(),this._renderTaskQueue.add(w)}_cancelRenderFrame(w){this._renderTaskQueue.remove(w)}_render(w){let u,m=0;const x=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(u=x.createQueryEXT(),x.beginQueryEXT(x.TIME_ELAPSED_EXT,u),m=o.exported.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(w),this._removed)return;let S=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const F=this.transform.zoom,V=o.exported.now();this.style.zoomHistory.update(F,V);const H=new o.EvaluationParameters(F,{now:V,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),q=H.crossFadingFactor();q===1&&q===this._crossFadingFactor||(S=!0,this._crossFadingFactor=q),this.style.update(H)}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()||S)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){const F=o.exported.now()-m;x.endQueryEXT(x.TIME_ELAPSED_EXT,u),setTimeout(()=>{const V=x.getQueryObjectEXT(u,x.QUERY_RESULT_EXT)/1e6;x.deleteQueryEXT(u),this.fire(new o.Event("gpu-timing-frame",{cpuTime:F,gpuTime:V}))},50)}if(this.listens("gpu-timing-layer")){const F=this.painter.collectGpuTimers();setTimeout(()=>{const V=this.painter.queryGpuTimers(F);this.fire(new o.Event("gpu-timing-layer",{layerTimes:V}))},50)}const R=this._sourcesDirty||this._styleDirty||this._placementDirty;return R||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new o.Event("idle")),!this._loaded||this._fullyLoaded||R||(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 u of this._controls)u.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 w=this.painter.context.gl.getExtension("WEBGL_lose_context");w&&w.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),v.remove(this._canvasContainer),v.remove(this._controlContainer),this._cooperativeGestures&&v.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(w=>{o.PerformanceUtils.frame(w),this._frame=null,this._render(w)}))}_onWindowOnline(){this._update()}_onWindowResize(w){this._trackResize&&this.resize({originalEvent:w})._update()}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(w){this._showTileBoundaries!==w&&(this._showTileBoundaries=w,this._update())}get showPadding(){return!!this._showPadding}set showPadding(w){this._showPadding!==w&&(this._showPadding=w,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(w){this._showCollisionBoxes!==w&&(this._showCollisionBoxes=w,w?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(w){this._showOverdrawInspector!==w&&(this._showOverdrawInspector=w,this._update())}get repaint(){return!!this._repaint}set repaint(w){this._repaint!==w&&(this._repaint=w,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(w){this._vertices=w,this._update()}_setCacheLimits(w,u){o.setCacheLimits(w,u)}get version(){return"2.4.0"}},NavigationControl:class{constructor(w){this.options=o.extend({},cw,w),this._container=v.create("div","maplibregl-ctrl maplibregl-ctrl-group mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",u=>u.preventDefault()),this.options.showZoom&&(o.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in mapboxgl-ctrl-zoom-in",u=>this._map.zoomIn({},{originalEvent:u})),v.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",u=>this._map.zoomOut({},{originalEvent:u})),v.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",u=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:u}):this._map.resetNorth({},{originalEvent:u})}),this._compassIcon=v.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){const w=this._map.getZoom(),u=w===this._map.getMaxZoom(),m=w===this._map.getMinZoom();this._zoomInButton.disabled=u,this._zoomOutButton.disabled=m,this._zoomInButton.setAttribute("aria-disabled",u.toString()),this._zoomOutButton.setAttribute("aria-disabled",m.toString())}_rotateCompassArrow(){const w=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=w}onAdd(w){return this._map=w,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 Fa(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){v.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(w,u){const m=v.create("button",w,this._container);return m.type="button",m.addEventListener("click",u),m}_setButtonTitle(w,u){const m=this._map._getUIString(`NavigationControl.${u}`);w.title=m,w.setAttribute("aria-label",m)}},GeolocateControl:class extends o.Evented{constructor(w){super(),this.options=o.extend({},Tp,w),o.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}onAdd(w){var u;return this._map=w,this._container=v.create("div","maplibregl-ctrl maplibregl-ctrl-group mapboxgl-ctrl mapboxgl-ctrl-group"),u=this._setupUI,Us!==void 0?u(Us):window.navigator.permissions!==void 0?window.navigator.permissions.query({name:"geolocation"}).then(m=>{Us=m.state!=="denied",u(Us)}):(Us=!!window.navigator.geolocation,u(Us)),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(),v.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,$i=0,js=!1}_isOutOfMapMaxBounds(w){const u=this._map.getMaxBounds(),m=w.coords;return u&&(m.longitude<u.getWest()||m.longitude>u.getEast()||m.latitude<u.getSouth()||m.latitude>u.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(w){if(this._map){if(this._isOutOfMapMaxBounds(w))return this._setErrorState(),this.fire(new o.Event("outofmaxbounds",w)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=w,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(w),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(w),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale","mapboxgl-user-location-dot-stale"),this.fire(new o.Event("geolocate",w)),this._finish()}}_updateCamera(w){const u=new o.LngLat(w.coords.longitude,w.coords.latitude),m=w.coords.accuracy,x=this._map.getBearing(),S=o.extend({bearing:x},this.options.fitBoundsOptions);this._map.fitBounds(u.toBounds(m),S,{geolocateSource:!0})}_updateMarker(w){if(w){const u=new o.LngLat(w.coords.longitude,w.coords.latitude);this._accuracyCircleMarker.setLngLat(u).addTo(this._map),this._userLocationDotMarker.setLngLat(u).addTo(this._map),this._accuracy=w.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){const w=this._map._container.clientHeight/2,u=this._map.unproject([0,w]),m=this._map.unproject([1,w]),x=u.distanceTo(m),S=Math.ceil(2*this._accuracy/x);this._circleElement.style.width=`${S}px`,this._circleElement.style.height=`${S}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_onError(w){if(this._map){if(this.options.trackUserLocation)if(w.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 u=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=u,this._geolocateButton.setAttribute("aria-label",u),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(w.code===3&&js)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",w)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(w){if(this._container.addEventListener("contextmenu",u=>u.preventDefault()),this._geolocateButton=v.create("button","maplibregl-ctrl-geolocate mapboxgl-ctrl-geolocate",this._container),v.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",w===!1){o.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");const u=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=u,this._geolocateButton.setAttribute("aria-label",u)}else{const u=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=u,this._geolocateButton.setAttribute("aria-label",u)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=v.create("div","maplibregl-user-location-dot mapboxgl-user-location-dot"),this._userLocationDotMarker=new pu(this._dotElement),this._circleElement=v.create("div","maplibregl-user-location-accuracy-circle mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new pu({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",u=>{u.geolocateSource||this._watchState!=="ACTIVE_LOCK"||u.originalEvent&&u.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":$i--,js=!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 w;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),$i++,$i>1?(w={maximumAge:6e5,timeout:0},js=!0):(w=this.options.positionOptions,js=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,w)}}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:Ac,LogoControl:cf,ScaleControl:class{constructor(w){this.options=o.extend({},za,w),o.bindAll(["_onMove","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_onMove(){py(this._map,this._container,this.options)}onAdd(w){return this._map=w,this._container=v.create("div","maplibregl-ctrl maplibregl-ctrl-scale mapboxgl-ctrl mapboxgl-ctrl-scale",w.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){v.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}setUnit(w){this.options.unit=w,py(this._map,this._container,this.options)}},FullscreenControl:class{constructor(w){this._fullscreen=!1,w&&w.container&&(w.container instanceof HTMLElement?this._container=w.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(w){return this._map=w,this._container||(this._container=this._map.getContainer()),this._controlContainer=v.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(){v.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 w=this._fullscreenButton=v.create("button","maplibregl-ctrl-fullscreen mapboxgl-ctrl-fullscreen",this._controlContainer);v.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",w).setAttribute("aria-hidden","true"),w.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){const w=this._getTitle();this._fullscreenButton.setAttribute("aria-label",w),this._fullscreenButton.title=w}_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(w){this.options=w,o.bindAll(["_toggleTerrain","_updateTerrainIcon"],this)}onAdd(w){return this._map=w,this._container=v.create("div","maplibregl-ctrl maplibregl-ctrl-group mapboxgl-ctrl mapboxgl-ctrl-group"),this._terrainButton=v.create("button","maplibregl-ctrl-terrain mapboxgl-ctrl-terrain",this._container),v.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(){v.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(w){super(),this.options=o.extend(Object.create(ti),w),o.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}addTo(w){return this._map&&this.remove(),this._map=w,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&&v.remove(this._content),this._container&&(v.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(w){return this._lngLat=o.LngLat.convert(w),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(w){return this.setDOMContent(document.createTextNode(w))}setHTML(w){const u=document.createDocumentFragment(),m=document.createElement("body");let x;for(m.innerHTML=w;x=m.firstChild,x;)u.appendChild(x);return this.setDOMContent(u)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(w){return this.options.maxWidth=w,this._update(),this}setDOMContent(w){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=v.create("div","maplibregl-popup-content mapboxgl-popup-content",this._container);return this._content.appendChild(w),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(w){this._container&&this._container.classList.add(w)}removeClassName(w){this._container&&this._container.classList.remove(w)}setOffset(w){return this.options.offset=w,this._update(),this}toggleClassName(w){if(this._container)return this._container.classList.toggle(w)}_createCloseButton(){this.options.closeButton&&(this._closeButton=v.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(w){this._update(w.point)}_onMouseMove(w){this._update(w.point)}_onDrag(w){this._update(w.point)}_update(w){if(!this._map||!this._lngLat&&!this._trackPointer||!this._content||(this._container||(this._container=v.create("div","maplibregl-popup mapboxgl-popup",this._map.getContainer()),this._tip=v.create("div","maplibregl-popup-tip mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(R=>this._container.classList.add(R)),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=Nc(this._lngLat,this._pos,this._map.transform)),this._trackPointer&&!w))return;const u=this._pos=this._trackPointer&&w?w:this._map.project(this._lngLat);let m=this.options.anchor;const x=kp(this.options.offset);if(!m){const R=this._container.offsetWidth,F=this._container.offsetHeight;let V;V=u.y+x.bottom.y<F?["top"]:u.y>this._map.transform.height-F?["bottom"]:[],u.x<R/2?V.push("left"):u.x>this._map.transform.width-R/2&&V.push("right"),m=V.length===0?"bottom":V.join("-")}const S=u.add(x[m]).round();v.setTransform(this._container,`${xn[m]} translate(${S.x}px,${S.y}px)`),Rn(this._container,m,"popup")}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const w=this._container.querySelector(fi);w&&w.focus()}_onClose(){this.remove()}},Marker:pu,Style:Lr,LngLat:o.LngLat,LngLatBounds:o.LngLatBounds,Point:o.pointGeometry,MercatorCoordinate:o.MercatorCoordinate,Evented:o.Evented,AJAXError:o.AJAXError,config:o.config,CanvasSource:we,GeoJSONSource:ue,ImageSource:me,RasterDEMTileSource:ie,RasterTileSource:ne,VectorTileSource:re,VideoSource:Te,prewarm:function(){vt().acquire(Ot)},clearPrewarmedResources:function(){const w=ot;w&&(w.isPreloaded()&&w.numActive()===1?(w.release(Ot),ot=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 Ze.workerCount},set workerCount(w){Ze.workerCount=w},get maxParallelImageRequests(){return o.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(w){o.config.MAX_PARALLEL_IMAGE_REQUESTS=w},clearStorage(w){o.clearTileCache(w)},workerUrl:"",addProtocol(w,u){o.config.REGISTERED_PROTOCOLS[w]=u},removeProtocol(w){delete o.config.REGISTERED_PROTOCOLS[w]}};return Wo.extend(xl,{isSafari:o.isSafari,getPerformanceMetrics:o.PerformanceUtils.getPerformanceMetrics}),xl});var s=i;return s})})(q5);const hZ=q5.exports,pZ="modulepreload",mZ=function(e){return"/"+e},nR={},gZ=function(t,n,r){if(!n||n.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(n.map(a=>{if(a=mZ(a),a in nR)return;nR[a]=!0;const s=a.endsWith(".css"),o=s?'[rel="stylesheet"]':"";if(!!r)for(let p=i.length-1;p>=0;p--){const g=i[p];if(g.href===a&&(!s||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${o}`))return;const f=document.createElement("link");if(f.rel=s?"stylesheet":pZ,s||(f.as="script",f.crossOrigin=""),f.href=a,document.head.appendChild(f),s)return new Promise((p,g)=>{f.addEventListener("load",p),f.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>t())},jP=E.exports.createContext(null),vZ=e=>{const[t,n]=E.exports.useState({}),r=E.exports.useCallback((a,s="default")=>{n(o=>{if(s==="current")throw new Error("'current' cannot be used as map id");if(o[s])throw new Error(`Multiple maps with the same id: ${s}`);return{...o,[s]:a}})},[]),i=E.exports.useCallback((a="default")=>{n(s=>{if(s[a]){const o={...s};return delete o[a],o}return s})},[]);return A(jP.Provider,{value:{maps:t,onMapMount:r,onMapUnmount:i},children:e.children})};function X5(){var e;const t=(e=E.exports.useContext(jP))===null||e===void 0?void 0:e.maps,n=E.exports.useContext($d);return E.exports.useMemo(()=>({...t,current:n==null?void 0:n.map}),[t,n])}function yZ(e){const t=e.clone();return t.pixelsToGLUnits=e.pixelsToGLUnits,t}function rR(e){return{longitude:e.center.lng,latitude:e.center.lat,zoom:e.zoom,pitch:e.pitch,bearing:e.bearing,padding:e.padding}}function iR(e,t){const n=t.viewState||t;let r=!1;if("longitude"in n&&"latitude"in n){const i=e.center;e.center=new i.constructor(n.longitude,n.latitude),r=r||i!==e.center}if("zoom"in n){const i=e.zoom;e.zoom=n.zoom,r=r||i!==e.zoom}if("bearing"in n){const i=e.bearing;e.bearing=n.bearing,r=r||i!==e.bearing}if("pitch"in n){const i=e.pitch;e.pitch=n.pitch,r=r||i!==e.pitch}return n.padding&&!e.isPaddingEqual(n.padding)&&(r=!0,e.padding=n.padding),r}const xZ=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function oR(e){if(!e)return null;if(typeof e=="string"||("toJS"in e&&(e=e.toJS()),!e.layers))return e;const t={};for(const r of e.layers)t[r.id]=r;const n=e.layers.map(r=>{const i=t[r.ref];let a=null;if("interactive"in r&&(a={...r},delete a.interactive),i){a=a||{...r},delete a.ref;for(const s of xZ)s in i&&(a[s]=i[s])}return a||r});return{...e,layers:n}}function bZ(e,t){const n=Array.isArray(e)?e[0]:e?e.x:0,r=Array.isArray(e)?e[1]:e?e.y:0,i=Array.isArray(t)?t[0]:t?t.x:0,a=Array.isArray(t)?t[1]:t?t.y:0;return n===i&&r===a}function Qa(e,t){if(e===t)return!0;if(!e||!t)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Qa(e[n],t[n]))return!1;return!0}else if(Array.isArray(t))return!1;if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n)if(!t.hasOwnProperty(i)||!Qa(e[i],t[i]))return!1;return!0}return!1}const aR={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"},CC={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"},sR={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"},_Z=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],wZ=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class mh{constructor(t,n,r){this._map=null,this._internalUpdate=!1,this._inRender=!1,this._hoveredFeatures=null,this._deferredEvents={move:!1,zoom:!1,pitch:!1,rotate:!1},this._onEvent=i=>{const a=this.props[sR[i.type]];a&&a(i)},this._onPointerEvent=i=>{(i.type==="mousemove"||i.type==="mouseout")&&this._updateHover(i);const a=this.props[aR[i.type]];if(a){if(this.props.interactiveLayerIds&&i.type!=="mouseover"&&i.type!=="mouseout"){const s=this._hoveredFeatures||this._map.queryRenderedFeatures(i.point,{layers:this.props.interactiveLayerIds});i.features=s}a(i),delete i.features}},this._onCameraEvent=i=>{if(!this._internalUpdate){const a=this.props[CC[i.type]];a&&a(i)}i.type in this._deferredEvents&&(this._deferredEvents[i.type]=!1)},this._MapClass=t,this.props=n,this._initialize(r)}get map(){return this._map}get transform(){return this._renderTransform}setProps(t){const n=this.props;this.props=t;const r=this._updateSettings(t,n);r&&this._createShadowTransform(this._map);const i=this._updateSize(t),a=this._updateViewState(t,!0);this._updateStyle(t,n),this._updateStyleComponents(t,n),this._updateHandlers(t,n),(r||i||a&&!this._map.isMoving())&&this.redraw()}static reuse(t,n){const r=mh.savedMaps.pop();if(!r)return null;const i=r.map,a=i.getContainer();for(n.className=a.className;a.childNodes.length>0;)n.appendChild(a.childNodes[0]);i._container=n,r.setProps({...t,styleDiffing:!1}),i.resize();const{initialViewState:s}=t;return s&&(s.bounds?i.fitBounds(s.bounds,{...s.fitBoundsOptions,duration:0}):r._updateViewState(s,!1)),i.isStyleLoaded()?i.fire("load"):i.once("styledata",()=>i.fire("load")),r}_initialize(t){const{props:n}=this,r={...n,...n.initialViewState,accessToken:n.mapboxAccessToken||CZ()||null,container:t,style:oR(n.mapStyle)},i=r.initialViewState||r.viewState||r;if(Object.assign(r,{center:[i.longitude||0,i.latitude||0],zoom:i.zoom||0,pitch:i.pitch||0,bearing:i.bearing||0}),n.gl){const f=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=f,n.gl)}const a=new this._MapClass(r);i.padding&&a.setPadding(i.padding),n.cursor&&(a.getCanvas().style.cursor=n.cursor),this._createShadowTransform(a);const s=a._render;a._render=f=>{this._inRender=!0,s.call(a,f),this._inRender=!1};const o=a._renderTaskQueue.run;a._renderTaskQueue.run=f=>{o.call(a._renderTaskQueue,f),this._onBeforeRepaint()},a.on("render",()=>this._onAfterRepaint());const c=a.fire;a.fire=this._fireEvent.bind(this,c),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 f in aR)a.on(f,this._onPointerEvent);for(const f in CC)a.on(f,this._onCameraEvent);for(const f in sR)a.on(f,this._onEvent);this._map=a}recycle(){const n=this.map.getContainer().querySelector("[mapboxgl-children]");n==null||n.remove(),mh.savedMaps.push(this)}destroy(){this._map.remove()}redraw(){const t=this._map;!this._inRender&&t.style&&(t._frame&&(t._frame.cancel(),t._frame=null),t._render())}_createShadowTransform(t){const n=yZ(t.transform);t.painter.transform=n,this._renderTransform=n}_updateSize(t){const{viewState:n}=t;if(n){const r=this._map;if(n.width!==r.transform.width||n.height!==r.transform.height)return r.resize(),!0}return!1}_updateViewState(t,n){if(this._internalUpdate)return!1;const r=this._map,i=this._renderTransform,{zoom:a,pitch:s,bearing:o}=i,c=r.isMoving();c&&(i.cameraElevationReference="sea");const f=iR(i,{...rR(r.transform),...t});if(c&&(i.cameraElevationReference="ground"),f&&n){const p=this._deferredEvents;p.move=!0,p.zoom||(p.zoom=a!==i.zoom),p.rotate||(p.rotate=o!==i.bearing),p.pitch||(p.pitch=s!==i.pitch)}return c||iR(r.transform,t),f}_updateSettings(t,n){const r=this._map;let i=!1;for(const a of _Z)a in t&&!Qa(t[a],n[a])&&(i=!0,r[`set${a[0].toUpperCase()}${a.slice(1)}`](t[a]));return i}_updateStyle(t,n){if(t.cursor!==n.cursor&&(this._map.getCanvas().style.cursor=t.cursor),t.mapStyle!==n.mapStyle){const r={diff:t.styleDiffing};return"localIdeographFontFamily"in t&&(r.localIdeographFontFamily=t.localIdeographFontFamily),this._map.setStyle(oR(t.mapStyle),r),!0}return!1}_updateStyleComponents(t,n){const r=this._map;let i=!1;return r.style.loaded()&&("light"in t&&!Qa(t.light,n.light)&&(i=!0,r.setLight(t.light)),"fog"in t&&!Qa(t.fog,n.fog)&&(i=!0,r.setFog(t.fog)),"terrain"in t&&!Qa(t.terrain,n.terrain)&&(!t.terrain||r.getSource(t.terrain.source))&&(i=!0,r.setTerrain(t.terrain))),i}_updateHandlers(t,n){const r=this._map;let i=!1;for(const a of wZ){const s=t[a];Qa(s,n[a])||(i=!0,s?r[a].enable(s):r[a].disable())}return i}_updateHover(t){var n;const{props:r}=this;if(r.interactiveLayerIds&&(r.onMouseMove||r.onMouseEnter||r.onMouseLeave)){const a=t.type,s=((n=this._hoveredFeatures)===null||n===void 0?void 0:n.length)>0;let o;if(a==="mousemove")try{o=this._map.queryRenderedFeatures(t.point,{layers:r.interactiveLayerIds})}catch{o=[]}else o=[];const c=o.length>0;!c&&s&&(t.type="mouseleave",this._onPointerEvent(t)),this._hoveredFeatures=o,c&&!s&&(t.type="mouseenter",this._onPointerEvent(t)),t.type=a}else this._hoveredFeatures=null}_fireEvent(t,n,r){const i=this._map,a=i.transform,s=typeof n=="string"?n:n.type;return s==="move"&&this._updateViewState(this.props,!1),s in CC&&(typeof n=="object"&&(n.viewState=rR(a)),this._map.isMoving())?(i.transform=this._renderTransform,t.call(i,n,r),i.transform=a,i):(t.call(i,n,r),i)}_onBeforeRepaint(){const t=this._map;this._internalUpdate=!0;for(const r in this._deferredEvents)this._deferredEvents[r]&&t.fire(r);this._internalUpdate=!1;const n=this._map.transform;this._map.transform=this._renderTransform,this._onAfterRepaint=()=>{this._map.transform=n}}}mh.savedMaps=[];function CZ(){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 SZ=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"];function EZ(e,t){if(!e)return null;const n=e.map,r={getMap:()=>n,getCenter:()=>e.transform.center,getZoom:()=>e.transform.zoom,getBearing:()=>e.transform.bearing,getPitch:()=>e.transform.pitch,getPadding:()=>e.transform.padding,getBounds:()=>e.transform.getBounds(),project:i=>e.transform.locationPoint(t.LngLat.convert(i)),unproject:i=>e.transform.pointLocation(t.Point.convert(i)),queryTerrainElevation:(i,a)=>{const s=n.transform;n.transform=e.transform;const o=n.queryTerrainElevation(i,a);return n.transform=s,o}};for(const i of PZ(n))!(i in r)&&!SZ.includes(i)&&(r[i]=n[i].bind(n));return r}function PZ(e){const t=new Set;let n=e;for(;n;){for(const r of Object.getOwnPropertyNames(n))r[0]!=="_"&&typeof e[r]=="function"&&r!=="fire"&&r!=="setEventedParent"&&t.add(r);n=Object.getPrototypeOf(n)}return Array.from(t)}const TZ=typeof document<"u"?E.exports.useLayoutEffect:E.exports.useEffect,kZ=["baseApiUrl","maxParallelImageRequests","workerClass","workerCount","workerUrl"];function IZ(e,t){for(const n of kZ)n in t&&(e[n]=t[n]);t.RTLTextPlugin&&e.getRTLTextPluginStatus&&e.getRTLTextPluginStatus()==="unavailable"&&e.setRTLTextPlugin(t.RTLTextPlugin,n=>{n&&console.error(n)},!1)}const $d=E.exports.createContext(null),MZ={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"},HP=E.exports.forwardRef((e,t)=>{const n=E.exports.useContext(jP),[r,i]=E.exports.useState(null),a=E.exports.useRef(),{current:s}=E.exports.useRef({mapLib:null,map:null});E.exports.useEffect(()=>{const c=e.mapLib;let f=!0,p;return Promise.resolve(c||gZ(()=>import("./index.764e1a39.js").then(g=>g.i),[])).then(g=>{if(!!f){if(g.Map||(g=g.default),!g||!g.Map)throw new Error("Invalid mapLib");if(g.supported(e))IZ(g,e),e.reuseMaps&&(p=mh.reuse(e,a.current)),p||(p=new mh(g.Map,e,a.current)),s.map=EZ(p,g),s.mapLib=g,i(p),n==null||n.onMapMount(s.map,e.id);else throw new Error("Map is not supported by this browser")}}).catch(g=>{e.onError({type:"error",target:null,originalEvent:null,error:g})}),()=>{f=!1,p&&(n==null||n.onMapUnmount(e.id),e.reuseMaps?p.recycle():p.destroy())}},[]),TZ(()=>{r&&r.setProps(e)}),E.exports.useImperativeHandle(t,()=>s.map,[r]);const o=E.exports.useMemo(()=>({position:"relative",width:"100%",height:"100%",...e.style}),[e.style]);return A("div",{id:e.id,ref:a,style:o,children:r&&A($d.Provider,{value:s,children:A("div",{"mapboxgl-children":"",children:e.children})})})});HP.displayName="Map";HP.defaultProps=MZ;const RZ=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function Bd(e,t){if(!e||!t)return;const n=e.style;for(const r in t){const i=t[r];Number.isFinite(i)&&!RZ.test(r)?n[r]=`${i}px`:n[r]=i}}const DZ={draggable:!1,popup:null,rotation:0,rotationAlignment:"auto",pitchAlignment:"auto"};function Y5(e){const{map:t,mapLib:n}=E.exports.useContext($d),r=E.exports.useRef({props:e});r.current.props=e;const i=E.exports.useMemo(()=>{let a=!1;E.exports.Children.forEach(e.children,c=>{c&&(a=!0)});const s={...e,element:a?document.createElement("div"):null},o=new n.Marker(s).setLngLat([e.longitude,e.latitude]);return o.getElement().addEventListener("click",c=>{var f,p;(p=(f=r.current.props).onClick)===null||p===void 0||p.call(f,{type:"click",target:o,originalEvent:c})}),o.on("dragstart",c=>{var f,p;const g=c;g.lngLat=i.getLngLat(),(p=(f=r.current.props).onDragStart)===null||p===void 0||p.call(f,g)}),o.on("drag",c=>{var f,p;const g=c;g.lngLat=i.getLngLat(),(p=(f=r.current.props).onDrag)===null||p===void 0||p.call(f,g)}),o.on("dragend",c=>{var f,p;const g=c;g.lngLat=i.getLngLat(),(p=(f=r.current.props).onDragEnd)===null||p===void 0||p.call(f,g)}),o},[]);return E.exports.useEffect(()=>(i.addTo(t.getMap()),()=>{i.remove()}),[]),E.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&&!bZ(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),cl.exports.createPortal(e.children,i.getElement())}Y5.defaultProps=DZ;E.exports.memo(Y5);function lR(e){return new Set(e?e.trim().split(/\s+/):[])}function OZ(e){const{map:t,mapLib:n}=E.exports.useContext($d),r=E.exports.useMemo(()=>document.createElement("div"),[]),i=E.exports.useRef({props:e});i.current.props=e;const a=E.exports.useMemo(()=>{const s={...e},o=new n.Popup(s).setLngLat([e.longitude,e.latitude]);return o.once("open",c=>{var f,p;(p=(f=i.current.props).onOpen)===null||p===void 0||p.call(f,c)}),o},[]);if(E.exports.useEffect(()=>{const s=o=>{var c,f;(f=(c=i.current.props).onClose)===null||f===void 0||f.call(c,o)};return a.on("close",s),a.setDOMContent(r).addTo(t.getMap()),()=>{a.off("close",s),a.isOpen()&&a.remove()}},[]),E.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&&!Qa(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 s=lR(a.options.className),o=lR(e.className);for(const c of s)o.has(c)||a.removeClassName(c);for(const c of o)s.has(c)||a.addClassName(c);a.options.className=e.className}return cl.exports.createPortal(e.children,r)}const AZ=E.exports.memo(OZ);function Xg(e,t,n,r){const i=E.exports.useContext($d),a=E.exports.useMemo(()=>e(i),[]);return E.exports.useEffect(()=>{const s=r||n||t,o=typeof t=="function"&&typeof n=="function"?t:null,c=typeof n=="function"?n:typeof t=="function"?t:null,{map:f}=i;return f.hasControl(a)||(f.addControl(a,s==null?void 0:s.position),o&&o(i)),()=>{c&&c(i),f.hasControl(a)&&f.removeControl(a)}},[]),a}function NZ(e){const t=Xg(({mapLib:n})=>new n.AttributionControl(e),{position:e.position});return E.exports.useEffect(()=>{Bd(t._container,e.style)},[e.style]),null}E.exports.memo(NZ);function LZ(e){const t=Xg(({mapLib:n})=>new n.FullscreenControl({container:e.containerId&&document.getElementById(e.containerId)}),{position:e.position});return E.exports.useEffect(()=>{Bd(t._controlContainer,e.style)},[e.style]),null}E.exports.memo(LZ);const Q5=E.exports.forwardRef((e,t)=>{const n=E.exports.useRef({props:e}),r=Xg(({mapLib:i})=>{const a=new i.GeolocateControl(e),s=a._setupUI;return a._setupUI=o=>{a._container.hasChildNodes()||s(o)},a.on("geolocate",o=>{var c,f;(f=(c=n.current.props).onGeolocate)===null||f===void 0||f.call(c,o)}),a.on("error",o=>{var c,f;(f=(c=n.current.props).onError)===null||f===void 0||f.call(c,o)}),a.on("outofmaxbounds",o=>{var c,f;(f=(c=n.current.props).onOutOfMaxBounds)===null||f===void 0||f.call(c,o)}),a.on("trackuserlocationstart",o=>{var c,f;(f=(c=n.current.props).onTrackUserLocationStart)===null||f===void 0||f.call(c,o)}),a.on("trackuserlocationend",o=>{var c,f;(f=(c=n.current.props).onTrackUserLocationEnd)===null||f===void 0||f.call(c,o)}),a},{position:e.position});return n.current.props=e,E.exports.useImperativeHandle(t,()=>({trigger:()=>r.trigger()}),[]),E.exports.useEffect(()=>{Bd(r._container,e.style)},[e.style]),null});Q5.displayName="GeolocateControl";E.exports.memo(Q5);function FZ(e){const t=Xg(({mapLib:n})=>new n.NavigationControl(e),{position:e.position});return E.exports.useEffect(()=>{Bd(t._container,e.style)},[e.style]),null}E.exports.memo(FZ);const zZ={unit:"metric",maxWidth:100};function J5(e){const t=Xg(({mapLib:n})=>new n.ScaleControl(e),{position:e.position});return(t.options.unit!==e.unit||t.options.maxWidth!==e.maxWidth)&&(t.options.maxWidth=e.maxWidth,t.setUnit(e.unit)),E.exports.useEffect(()=>{Bd(t._container,e.style)},[e.style]),null}J5.defaultProps=zZ;E.exports.memo(J5);function nb(e,t){if(!e)throw new Error(t)}let $Z=0;function BZ(e,t,n){if(e.style&&e.style._loaded){const r={...n};return delete r.id,delete r.children,e.addSource(t,r),e.getSource(t)}return null}function VZ(e,t,n){nb(t.id===n.id,"source id changed"),nb(t.type===n.type,"source type changed");let r="",i=0;for(const s in t)s!=="children"&&s!=="id"&&!Qa(n[s],t[s])&&(r=s,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&&r==="coordinates")e.setCoordinates(t.coordinates);else if(a==="vector"&&"setUrl"in e)switch(r){case"url":e.setUrl(t.url);break;case"tiles":e.setTiles(t.tiles);break}else console.warn(`Unable to update <Source> prop: ${r}`)}function rb(e){const t=E.exports.useContext($d).map.getMap(),n=E.exports.useRef(e),[,r]=E.exports.useState(0),i=E.exports.useMemo(()=>e.id||`jsx-source-${$Z++}`,[]);E.exports.useEffect(()=>{if(t){const s=()=>setTimeout(()=>r(o=>o+1),0);return t.on("styledata",s),s(),()=>{var o;if(t.off("styledata",s),t.style&&t.style._loaded&&t.getSource(i)){const c=(o=t.getStyle())===null||o===void 0?void 0:o.layers;if(c)for(const f of c)f.source===i&&t.removeLayer(f.id);t.removeSource(i)}}}},[t]);let a=t&&t.style&&t.getSource(i);return a?VZ(a,e,n.current):a=BZ(t,i,e),n.current=e,a&&E.exports.Children.map(e.children,s=>s&&E.exports.cloneElement(s,{source:i}))||null}function UZ(e,t,n,r){if(nb(n.id===r.id,"layer id changed"),nb(n.type===r.type,"layer type changed"),n.type==="custom"||r.type==="custom")return;const{layout:i={},paint:a={},filter:s,minzoom:o,maxzoom:c,beforeId:f}=n;if(f!==r.beforeId&&e.moveLayer(t,f),i!==r.layout){const p=r.layout||{};for(const g in i)Qa(i[g],p[g])||e.setLayoutProperty(t,g,i[g]);for(const g in p)i.hasOwnProperty(g)||e.setLayoutProperty(t,g,void 0)}if(a!==r.paint){const p=r.paint||{};for(const g in a)Qa(a[g],p[g])||e.setPaintProperty(t,g,a[g]);for(const g in p)a.hasOwnProperty(g)||e.setPaintProperty(t,g,void 0)}Qa(s,r.filter)||e.setFilter(t,s),(o!==r.minzoom||c!==r.maxzoom)&&e.setLayerZoomRange(t,o,c)}function jZ(e,t,n){if(e.style&&e.style._loaded&&(!("source"in n)||e.getSource(n.source))){const r={...n,id:t};delete r.beforeId,e.addLayer(r,n.beforeId)}}let HZ=0;function gh(e){const t=E.exports.useContext($d).map.getMap(),n=E.exports.useRef(e),[,r]=E.exports.useState(0),i=E.exports.useMemo(()=>e.id||`jsx-layer-${HZ++}`,[]);if(E.exports.useEffect(()=>{if(t){const s=()=>r(o=>o+1);return t.on("styledata",s),s(),()=>{t.off("styledata",s),t.style&&t.style._loaded&&t.getLayer(i)&&t.removeLayer(i)}}},[t]),t&&t.style&&t.getLayer(i))try{UZ(t,i,e,n.current)}catch(s){console.warn(s)}else jZ(t,i,e);return n.current=e,null}function KZ(){for(var e=0,t,n,r="";e<arguments.length;)(t=arguments[e++])&&(n=e6(t))&&(r&&(r+=" "),r+=n);return r}function e6(e){if(typeof e=="string")return e;for(var t,n="",r=0;r<e.length;r++)e[r]&&(t=e6(e[r]))&&(n&&(n+=" "),n+=t);return n}var KP="-";function WZ(e){var t=qZ(e);function n(i){var a=i.split(KP);return a[0]===""&&a.length!==1&&a.shift(),t6(a,t)||GZ(i)}function r(i){return e.conflictingClassGroups[i]||[]}return{getClassGroupId:n,getConflictingClassGroupIds:r}}function t6(e,t){var s;if(e.length===0)return t.classGroupId;var n=e[0],r=t.nextPart.get(n),i=r?t6(e.slice(1),r):void 0;if(i)return i;if(t.validators.length!==0){var a=e.join(KP);return(s=t.validators.find(function(o){var c=o.validator;return c(a)}))==null?void 0:s.classGroupId}}var uR=/^\[(.+)\]$/;function GZ(e){if(uR.test(e)){var t=uR.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function qZ(e){var t=e.theme,n=e.prefix,r={nextPart:new Map,validators:[]},i=XZ(Object.entries(e.classGroups),n);return i.forEach(function(a){var s=a[0],o=a[1];J2(o,r,s,t)}),r}function J2(e,t,n,r){e.forEach(function(i){if(typeof i=="string"){var a=i===""?t:cR(t,i);a.classGroupId=n;return}if(typeof i=="function"){if(ZZ(i)){J2(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(function(s){var o=s[0],c=s[1];J2(c,cR(t,o),n,r)})})}function cR(e,t){var n=e;return t.split(KP).forEach(function(r){n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function ZZ(e){return e.isThemeGetter}function XZ(e,t){return t?e.map(function(n){var r=n[0],i=n[1],a=i.map(function(s){return typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(function(o){var c=o[0],f=o[1];return[t+c,f]})):s});return[r,a]}):e}function YZ(e){if(e<1)return{get:function(){},set:function(){}};var t=0,n=new Map,r=new Map;function i(a,s){n.set(a,s),t++,t>e&&(t=0,r=n,n=new Map)}return{get:function(s){var o=n.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set:function(s,o){n.has(s)?n.set(s,o):i(s,o)}}}var n6="!";function QZ(e){var t=e.separator||":";return function(r){for(var i=0,a=[],s=0,o=0;o<r.length;o++){var c=r[o];i===0&&c===t[0]&&(t.length===1||r.slice(o,o+t.length)===t)&&(a.push(r.slice(s,o)),s=o+t.length),c==="["?i++:c==="]"&&i--}var f=a.length===0?r:r.substring(s),p=f.startsWith(n6),g=p?f.substring(1):f;return{modifiers:a,hasImportantModifier:p,baseClassName:g}}}function JZ(e){if(e.length<=1)return e;var t=[],n=[];return e.forEach(function(r){var i=r[0]==="[";i?(t.push.apply(t,n.sort().concat([r])),n=[]):n.push(r)}),t.push.apply(t,n.sort()),t}function eX(e){return{cache:YZ(e.cacheSize),splitModifiers:QZ(e),...WZ(e)}}var tX=/\s+/;function nX(e,t){var n=t.splitModifiers,r=t.getClassGroupId,i=t.getConflictingClassGroupIds,a=new Set;return e.trim().split(tX).map(function(s){var o=n(s),c=o.modifiers,f=o.hasImportantModifier,p=o.baseClassName,g=r(p);if(!g)return{isTailwindClass:!1,originalClassName:s};var v=JZ(c).join(":"),b=f?v+n6:v;return{isTailwindClass:!0,modifierId:b,classGroupId:g,originalClassName:s}}).reverse().filter(function(s){if(!s.isTailwindClass)return!0;var o=s.modifierId,c=s.classGroupId,f=o+c;return a.has(f)?!1:(a.add(f),i(c).forEach(function(p){return a.add(o+p)}),!0)}).reverse().map(function(s){return s.originalClassName}).join(" ")}function rX(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i,a,s=o;function o(f){var p=t[0],g=t.slice(1),v=g.reduce(function(b,_){return _(b)},p());return r=eX(v),i=r.cache.get,a=r.cache.set,s=c,c(f)}function c(f){var p=i(f);if(p)return p;var g=nX(f,r);return a(f,g),g}return function(){return s(KZ.apply(null,arguments))}}function ri(e){var t=function(r){return r[e]||[]};return t.isThemeGetter=!0,t}var r6=/^\[(?:([a-z-]+):)?(.+)\]$/i,iX=/^\d+\/\d+$/,oX=new Set(["px","full","screen"]),aX=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,sX=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh)/,lX=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function _s(e){return jm(e)||oX.has(e)||iX.test(e)||Yc(e)}function Yc(e){return Vd(e,"length",hX)}function uX(e){return Vd(e,"size",i6)}function cX(e){return Vd(e,"position",i6)}function dX(e){return Vd(e,"url",pX)}function SC(e){return Vd(e,"number",jm)}function jm(e){return!Number.isNaN(Number(e))}function nm(e){return dR(e)||Vd(e,"number",dR)}function Ri(e){return r6.test(e)}function rm(){return!0}function wu(e){return aX.test(e)}function fX(e){return Vd(e,"",mX)}function Vd(e,t,n){var r=r6.exec(e);return r?r[1]?r[1]===t:n(r[2]):!1}function hX(e){return sX.test(e)}function i6(){return!1}function pX(e){return e.startsWith("url(")}function dR(e){return Number.isInteger(Number(e))}function mX(e){return lX.test(e)}function gX(){var e=ri("colors"),t=ri("spacing"),n=ri("blur"),r=ri("brightness"),i=ri("borderColor"),a=ri("borderRadius"),s=ri("borderSpacing"),o=ri("borderWidth"),c=ri("contrast"),f=ri("grayscale"),p=ri("hueRotate"),g=ri("invert"),v=ri("gap"),b=ri("gradientColorStops"),_=ri("inset"),T=ri("margin"),k=ri("opacity"),P=ri("padding"),M=ri("saturate"),O=ri("scale"),N=ri("sepia"),L=ri("skew"),$=ri("space"),j=ri("translate"),U=function(){return["auto","contain","none"]},G=function(){return["auto","hidden","clip","visible","scroll"]},Z=function(){return["auto",t]},Q=function(){return["",_s]},J=function(){return["auto",jm,Ri]},re=function(){return["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]},ne=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"]},ie=function(){return["start","end","center","between","around","evenly"]},ue=function(){return["","0",Ri]},oe=function(){return["auto","avoid","all","avoid-page","page","left","right","column"]},me=function(){return[jm,SC]},Te=function(){return[jm,Ri]};return{cacheSize:500,theme:{colors:[rm],spacing:[_s],blur:["none","",wu,Yc],brightness:me(),borderColor:[e],borderRadius:["none","","full",wu,Yc],borderSpacing:[t],borderWidth:Q(),contrast:me(),grayscale:ue(),hueRotate:Te(),invert:ue(),gap:[t],gradientColorStops:[e],inset:Z(),margin:Z(),opacity:me(),padding:[t],saturate:me(),scale:me(),sepia:ue(),skew:Te(),space:[t],translate:[t]},classGroups:{aspect:[{aspect:["auto","square","video",Ri]}],container:["container"],columns:[{columns:[wu]}],"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(re(),[Ri])}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[_]}],"inset-x":[{"inset-x":[_]}],"inset-y":[{"inset-y":[_]}],top:[{top:[_]}],right:[{right:[_]}],bottom:[{bottom:[_]}],left:[{left:[_]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",nm]}],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",Ri]}],grow:[{grow:ue()}],shrink:[{shrink:ue()}],order:[{order:["first","last","none",nm]}],"grid-cols":[{"grid-cols":[rm]}],"col-start-end":[{col:["auto",{span:[nm]},Ri]}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":[rm]}],"row-start-end":[{row:["auto",{span:[nm]},Ri]}],"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",Ri]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ri]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:ie()}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:[].concat(ie(),["baseline"])}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(ie(),["baseline","stretch"])}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[P]}],px:[{px:[P]}],py:[{py:[P]}],pt:[{pt:[P]}],pr:[{pr:[P]}],pb:[{pb:[P]}],pl:[{pl:[P]}],m:[{m:[T]}],mx:[{mx:[T]}],my:[{my:[T]}],mt:[{mt:[T]}],mr:[{mr:[T]}],mb:[{mb:[T]}],ml:[{ml:[T]}],"space-x":[{"space-x":[$]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[$]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",t]}],"min-w":[{"min-w":["min","max","fit",_s]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[wu]},wu,Yc]}],h:[{h:[t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",_s]}],"max-h":[{"max-h":[t,"min","max","fit"]}],"font-size":[{text:["base",wu,Yc]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",SC]}],"font-family":[{font:[rm]}],"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",Yc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",_s]}],"list-style-type":[{list:["none","disc","decimal",Ri]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[k]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(ne(),["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",_s]}],"underline-offset":[{"underline-offset":["auto",_s]}],"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",Yc]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap"]}],break:[{break:["normal","words","all","keep"]}],content:[{content:["none",Ri]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[k]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(re(),[cX])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",uX]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},dX]}],"bg-color":[{bg:[e]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],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":[k]}],"border-style":[{border:[].concat(ne(),["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":[k]}],"divide-style":[{divide:ne()}],"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(ne())}],"outline-offset":[{"outline-offset":[_s]}],"outline-w":[{outline:[_s]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[k]}],"ring-offset-w":[{"ring-offset":[_s]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",wu,fX]}],"shadow-color":[{shadow:[rm]}],opacity:[{opacity:[k]}],"mix-blend":[{"mix-blend":ge()}],"bg-blend":[{"bg-blend":ge()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",wu,Ri]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[g]}],saturate:[{saturate:[M]}],sepia:[{sepia:[N]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[k]}],"backdrop-saturate":[{"backdrop-saturate":[M]}],"backdrop-sepia":[{"backdrop-sepia":[N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ri]}],duration:[{duration:Te()}],ease:[{ease:["linear","in","out","in-out",Ri]}],delay:[{delay:Te()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ri]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[O]}],"scale-x":[{"scale-x":[O]}],"scale-y":[{"scale-y":[O]}],rotate:[{rotate:[nm,Ri]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[L]}],"skew-y":[{"skew-y":[L]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ri]}],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",Ri]}],"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",Ri]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[_s,SC]}],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 kd=rX(gX);function Be(){return Be=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Be.apply(null,arguments)}function on(e){return on=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},on(e)}function vX(e,t){if(on(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(on(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function o6(e){var t=vX(e,"string");return on(t)=="symbol"?t:t+""}function ae(e,t,n){return(t=o6(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ur(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o6(r.key),r)}}function jr(e,t,n){return t&&fR(e.prototype,t),n&&fR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ib(e,t){return ib=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},ib(e,t)}function ai(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&&ib(e,t)}function ob(e){return ob=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ob(e)}function a6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(a6=function(){return!!e})()}function zn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yX(e,t){if(t&&(on(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zn(e)}function si(e){var t=a6();return function(){var n,r=ob(e);if(t){var i=ob(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return yX(this,n)}}var s6={exports:{}};/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var a=arguments[i];if(!!a){var s=typeof a;if(s==="string"||s==="number")r.push(a);else if(Array.isArray(a)){if(a.length){var o=n.apply(null,a);o&&r.push(o)}}else if(s==="object"){if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]")){r.push(a.toString());continue}for(var c in a)t.call(a,c)&&a[c]&&r.push(c)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(s6);const He=s6.exports;var T_={exports:{}},Rr={};/** @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 io=typeof Symbol=="function"&&Symbol.for,WP=io?Symbol.for("react.element"):60103,GP=io?Symbol.for("react.portal"):60106,k_=io?Symbol.for("react.fragment"):60107,I_=io?Symbol.for("react.strict_mode"):60108,M_=io?Symbol.for("react.profiler"):60114,R_=io?Symbol.for("react.provider"):60109,D_=io?Symbol.for("react.context"):60110,qP=io?Symbol.for("react.async_mode"):60111,O_=io?Symbol.for("react.concurrent_mode"):60111,A_=io?Symbol.for("react.forward_ref"):60112,N_=io?Symbol.for("react.suspense"):60113,xX=io?Symbol.for("react.suspense_list"):60120,L_=io?Symbol.for("react.memo"):60115,F_=io?Symbol.for("react.lazy"):60116,bX=io?Symbol.for("react.block"):60121,_X=io?Symbol.for("react.fundamental"):60117,wX=io?Symbol.for("react.responder"):60118,CX=io?Symbol.for("react.scope"):60119;function Na(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case WP:switch(e=e.type,e){case qP:case O_:case k_:case M_:case I_:case N_:return e;default:switch(e=e&&e.$$typeof,e){case D_:case A_:case F_:case L_:case R_:return e;default:return t}}case GP:return t}}}function l6(e){return Na(e)===O_}Rr.AsyncMode=qP;Rr.ConcurrentMode=O_;Rr.ContextConsumer=D_;Rr.ContextProvider=R_;Rr.Element=WP;Rr.ForwardRef=A_;Rr.Fragment=k_;Rr.Lazy=F_;Rr.Memo=L_;Rr.Portal=GP;Rr.Profiler=M_;Rr.StrictMode=I_;Rr.Suspense=N_;Rr.isAsyncMode=function(e){return l6(e)||Na(e)===qP};Rr.isConcurrentMode=l6;Rr.isContextConsumer=function(e){return Na(e)===D_};Rr.isContextProvider=function(e){return Na(e)===R_};Rr.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===WP};Rr.isForwardRef=function(e){return Na(e)===A_};Rr.isFragment=function(e){return Na(e)===k_};Rr.isLazy=function(e){return Na(e)===F_};Rr.isMemo=function(e){return Na(e)===L_};Rr.isPortal=function(e){return Na(e)===GP};Rr.isProfiler=function(e){return Na(e)===M_};Rr.isStrictMode=function(e){return Na(e)===I_};Rr.isSuspense=function(e){return Na(e)===N_};Rr.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===k_||e===O_||e===M_||e===I_||e===N_||e===xX||typeof e=="object"&&e!==null&&(e.$$typeof===F_||e.$$typeof===L_||e.$$typeof===R_||e.$$typeof===D_||e.$$typeof===A_||e.$$typeof===_X||e.$$typeof===wX||e.$$typeof===CX||e.$$typeof===bX)};Rr.typeOf=Na;(function(e){e.exports=Rr})(T_);function To(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[];return Un.Children.forEach(e,function(r){r==null&&!t.keepEmpty||(Array.isArray(r)?n=n.concat(To(r)):T_.exports.isFragment(r)&&r.props?n=n.concat(To(r.props.children,t)):n.push(r))}),n}var hR={};function SX(e,t){}function EX(e,t,n){!t&&!hR[n]&&(e(!1,n),hR[n]=!0)}function Nr(e,t){EX(SX,e,t)}function pR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pR(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yg(e,t,n){var r=E.exports.useRef({});return(!("value"in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}function ab(e,t){typeof e=="function"?e(t):on(e)==="object"&&e&&"current"in e&&(e.current=t)}function La(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter(function(i){return i});return r.length<=1?r[0]:function(i){t.forEach(function(a){ab(a,i)})}}function u6(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Yg(function(){return La.apply(void 0,t)},t,function(r,i){return r.length===i.length&&r.every(function(a,s){return a===i[s]})})}function Lh(e){var t,n,r=T_.exports.isMemo(e)?e.type.type:e.type;return!(typeof r=="function"&&!((t=r.prototype)!==null&&t!==void 0&&t.render)||typeof e=="function"&&!((n=e.prototype)!==null&&n!==void 0&&n.render))}function _g(e){return e instanceof HTMLElement?e:e instanceof Un.Component?oc.findDOMNode(e):null}var c6=function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(i,a){return i[0]===n?(r=a,!0):!1}),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var r=e(this.__entries__,n),i=this.__entries__[r];return i&&i[1]},t.prototype.set=function(n,r){var i=e(this.__entries__,n);~i?this.__entries__[i][1]=r:this.__entries__.push([n,r])},t.prototype.delete=function(n){var r=this.__entries__,i=e(r,n);~i&&r.splice(i,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var i=0,a=this.__entries__;i<a.length;i++){var s=a[i];n.call(r,s[1],s[0])}},t}()}(),e4=typeof window<"u"&&typeof document<"u"&&window.document===document,sb=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")()}(),PX=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(sb):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),TX=2;function kX(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&o()}function s(){PX(a)}function o(){var c=Date.now();if(n){if(c-i<TX)return;r=!0}else n=!0,r=!1,setTimeout(s,t);i=c}return o}var IX=20,MX=["top","right","bottom","left","width","height","size","weight"],RX=typeof MutationObserver<"u",DX=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=kX(this.refresh.bind(this),IX)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var n=this.observers_,r=n.indexOf(t);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return t.forEach(function(n){return n.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!e4||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),RX?(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(){!e4||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,r=n===void 0?"":n,i=MX.some(function(a){return!!~r.indexOf(a)});i&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),d6=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},vh=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||sb},f6=z_(0,0,0,0);function lb(e){return parseFloat(e)||0}function mR(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,i){var a=e["border-"+i+"-width"];return r+lb(a)},0)}function OX(e){for(var t=["top","right","bottom","left"],n={},r=0,i=t;r<i.length;r++){var a=i[r],s=e["padding-"+a];n[a]=lb(s)}return n}function AX(e){var t=e.getBBox();return z_(0,0,t.width,t.height)}function NX(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return f6;var r=vh(e).getComputedStyle(e),i=OX(r),a=i.left+i.right,s=i.top+i.bottom,o=lb(r.width),c=lb(r.height);if(r.boxSizing==="border-box"&&(Math.round(o+a)!==t&&(o-=mR(r,"left","right")+a),Math.round(c+s)!==n&&(c-=mR(r,"top","bottom")+s)),!FX(e)){var f=Math.round(o+a)-t,p=Math.round(c+s)-n;Math.abs(f)!==1&&(o-=f),Math.abs(p)!==1&&(c-=p)}return z_(i.left,i.top,o,c)}var LX=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof vh(e).SVGGraphicsElement}:function(e){return e instanceof vh(e).SVGElement&&typeof e.getBBox=="function"}}();function FX(e){return e===vh(e).document.documentElement}function zX(e){return e4?LX(e)?AX(e):NX(e):f6}function $X(e){var t=e.x,n=e.y,r=e.width,i=e.height,a=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,s=Object.create(a.prototype);return d6(s,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),s}function z_(e,t,n,r){return{x:e,y:t,width:n,height:r}}var BX=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=z_(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=zX(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}(),VX=function(){function e(t,n){var r=$X(n);d6(this,{target:t,contentRect:r})}return e}(),UX=function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new c6,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof vh(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new BX(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 vh(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;!n.has(t)||(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(!!this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new VX(r.target,r.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),h6=typeof WeakMap<"u"?new WeakMap:new c6,p6=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=DX.getInstance(),r=new UX(t,n,this);h6.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){p6.prototype[e]=function(){var t;return(t=h6.get(this))[e].apply(t,arguments)}});var m6=function(){return typeof sb.ResizeObserver<"u"?sb.ResizeObserver:p6}(),Nu=new Map;function jX(e){e.forEach(function(t){var n,r=t.target;(n=Nu.get(r))===null||n===void 0||n.forEach(function(i){return i(r)})})}var g6=new m6(jX);function HX(e,t){Nu.has(e)||(Nu.set(e,new Set),g6.observe(e)),Nu.get(e).add(t)}function KX(e,t){Nu.has(e)&&(Nu.get(e).delete(t),Nu.get(e).size||(g6.unobserve(e),Nu.delete(e)))}var WX=function(e){ai(n,e);var t=si(n);function n(){return Ur(this,n),t.apply(this,arguments)}return jr(n,[{key:"render",value:function(){return this.props.children}}]),n}(E.exports.Component),t4=E.exports.createContext(null);function GX(e){var t=e.children,n=e.onBatchResize,r=E.exports.useRef(0),i=E.exports.useRef([]),a=E.exports.useContext(t4),s=E.exports.useCallback(function(o,c,f){r.current+=1;var p=r.current;i.current.push({size:o,element:c,data:f}),Promise.resolve().then(function(){p===r.current&&(n==null||n(i.current),i.current=[])}),a==null||a(o,c,f)},[n,a]);return A(t4.Provider,{value:s,children:t})}function qX(e,t){var n=e.children,r=e.disabled,i=E.exports.useRef(null),a=E.exports.useRef(null),s=E.exports.useContext(t4),o=typeof n=="function",c=o?n(i):n,f=E.exports.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),p=!o&&E.exports.isValidElement(c)&&Lh(c),g=p?c.ref:null,v=E.exports.useMemo(function(){return La(g,i)},[g,i]),b=function(){return _g(i.current)||_g(a.current)};E.exports.useImperativeHandle(t,function(){return b()});var _=E.exports.useRef(e);_.current=e;var T=E.exports.useCallback(function(k){var P=_.current,M=P.onResize,O=P.data,N=k.getBoundingClientRect(),L=N.width,$=N.height,j=k.offsetWidth,U=k.offsetHeight,G=Math.floor(L),Z=Math.floor($);if(f.current.width!==G||f.current.height!==Z||f.current.offsetWidth!==j||f.current.offsetHeight!==U){var Q={width:G,height:Z,offsetWidth:j,offsetHeight:U};f.current=Q;var J=j===Math.round(L)?L:j,re=U===Math.round($)?$:U,ne=fe(fe({},Q),{},{offsetWidth:J,offsetHeight:re});s==null||s(ne,k,O),M&&Promise.resolve().then(function(){M(ne,k)})}},[]);return E.exports.useEffect(function(){var k=b();return k&&!r&&HX(k,T),function(){return KX(k,T)}},[i.current,r]),A(WX,{ref:a,children:p?E.exports.cloneElement(c,{ref:v}):c})}var ZX=E.exports.forwardRef(qX),XX="rc-observer-key";function YX(e,t){var n=e.children,r=typeof n=="function"?[n]:To(n);return r.map(function(i,a){var s=(i==null?void 0:i.key)||"".concat(XX,"-").concat(a);return E.exports.createElement(ZX,{...e,key:s,ref:a===0?t:void 0},i)})}var tu=E.exports.forwardRef(YX);tu.Collection=GX;function Wi(e,t){var n=fe({},e);return Array.isArray(t)&&t.forEach(function(r){delete n[r]}),n}var QX=E.exports.createContext({});const ZP=QX;function wg(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function In(e,t){if(e==null)return{};var n,r,i=wg(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function n4(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function JX(e){if(Array.isArray(e))return n4(e)}function v6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function XP(e,t){if(e){if(typeof e=="string")return n4(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?n4(e,t):void 0}}function eY(){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 Rt(e){return JX(e)||v6(e)||XP(e)||eY()}var cd="RC_FORM_INTERNAL_HOOKS",Ar=function(){Nr(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},yh=E.exports.createContext({getFieldValue:Ar,getFieldsValue:Ar,getFieldError:Ar,getFieldWarning:Ar,getFieldsError:Ar,isFieldsTouched:Ar,isFieldTouched:Ar,isFieldValidating:Ar,isFieldsValidating:Ar,resetFields:Ar,setFields:Ar,setFieldValue:Ar,setFieldsValue:Ar,validateFields:Ar,submit:Ar,getInternalHooks:function(){return Ar(),{dispatch:Ar,initEntityValue:Ar,registerField:Ar,useSubscribe:Ar,setInitialValues:Ar,destroyForm:Ar,setCallbacks:Ar,registerWatch:Ar,getFields:Ar,setValidateMessages:Ar,setPreserve:Ar,getInitialValue:Ar}}});function r4(e){return e==null?[]:Array.isArray(e)?e:[e]}function y6(e,t){this.v=e,this.k=t}function Co(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}Co=function(s,o,c,f){function p(g,v){Co(s,g,function(b){return this._invoke(g,v,b)})}o?i?i(s,o,{value:c,enumerable:!f,configurable:!f,writable:!f}):s[o]=c:(p("next",0),p("throw",1),p("return",2))},Co(e,t,n,r)}function YP(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function a(b,_,T,k){var P=_&&_.prototype instanceof o?_:o,M=Object.create(P.prototype);return Co(M,"_invoke",function(O,N,L){var $,j,U,G=0,Z=L||[],Q=!1,J={p:0,n:0,v:e,a:re,f:re.bind(e,4),d:function(ge,ie){return $=ge,j=0,U=e,J.n=ie,s}};function re(ne,ge){for(j=ne,U=ge,t=0;!Q&&G&&!ie&&t<Z.length;t++){var ie,ue=Z[t],oe=J.p,me=ue[2];ne>3?(ie=me===ge)&&(U=ue[(j=ue[4])?5:(j=3,3)],ue[4]=ue[5]=e):ue[0]<=oe&&((ie=ne<2&&oe<ue[1])?(j=0,J.v=ge,J.n=ue[1]):oe<me&&(ie=ne<3||ue[0]>ge||ge>me)&&(ue[4]=ne,ue[5]=ge,J.n=me,j=0))}if(ie||ne>1)return s;throw Q=!0,ge}return function(ne,ge,ie){if(G>1)throw TypeError("Generator is already running");for(Q&&ge===1&&re(ge,ie),j=ge,U=ie;(t=j<2?e:U)||!Q;){$||(j?j<3?(j>1&&(J.n=-1),re(j,U)):J.n=U:J.v=U);try{if(G=2,$){if(j||(ne="next"),t=$[ne]){if(!(t=t.call($,U)))throw TypeError("iterator result is not an object");if(!t.done)return t;U=t.value,j<2&&(j=0)}else j===1&&(t=$.return)&&t.call($),j<2&&(U=TypeError("The iterator does not provide a '"+ne+"' method"),j=1);$=e}else if((t=(Q=J.n<0)?U:O.call(N,J))!==s)break}catch(ue){$=e,j=1,U=ue}finally{G=1}}return{value:t,done:Q}}}(b,T,k),!0),M}var s={};function o(){}function c(){}function f(){}t=Object.getPrototypeOf;var p=[][r]?t(t([][r]())):(Co(t={},r,function(){return this}),t),g=f.prototype=o.prototype=Object.create(p);function v(b){return Object.setPrototypeOf?Object.setPrototypeOf(b,f):(b.__proto__=f,Co(b,i,"GeneratorFunction")),b.prototype=Object.create(g),b}return c.prototype=f,Co(g,"constructor",f),Co(f,"constructor",c),c.displayName="GeneratorFunction",Co(f,i,"GeneratorFunction"),Co(g),Co(g,i,"Generator"),Co(g,r,function(){return this}),Co(g,"toString",function(){return"[object Generator]"}),(YP=function(){return{w:a,m:v}})()}function ub(e,t){function n(i,a,s,o){try{var c=e[i](a),f=c.value;return f instanceof y6?t.resolve(f.v).then(function(p){n("next",p,s,o)},function(p){n("throw",p,s,o)}):t.resolve(f).then(function(p){c.value=p,s(c)},function(p){return n("throw",p,s,o)})}catch(p){o(p)}}var r;this.next||(Co(ub.prototype),Co(ub.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),Co(this,"_invoke",function(i,a,s){function o(){return new t(function(c,f){n(i,s,c,f)})}return r=r?r.then(o,o):o()},!0)}function x6(e,t,n,r,i){return new ub(YP().w(e,t,n,r),i||Promise)}function tY(e,t,n,r,i){var a=x6(e,t,n,r,i);return a.next().then(function(s){return s.done?s.value:a.next()})}function nY(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function i(){for(;n.length;)if((r=n.pop())in t)return i.value=r,i.done=!1,i;return i.done=!0,i}}function gR(e){if(e!=null){var t=e[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(on(e)+" is not iterable")}function Li(){var e=YP(),t=e.m(Li),n=(Object.getPrototypeOf?Object.getPrototypeOf(t):t.__proto__).constructor;function r(s){var o=typeof s=="function"&&s.constructor;return!!o&&(o===n||(o.displayName||o.name)==="GeneratorFunction")}var i={throw:1,return:2,break:3,continue:3};function a(s){var o,c;return function(f){o||(o={stop:function(){return c(f.a,2)},catch:function(){return f.v},abrupt:function(g,v){return c(f.a,i[g],v)},delegateYield:function(g,v,b){return o.resultName=v,c(f.d,gR(g),b)},finish:function(g){return c(f.f,g)}},c=function(g,v,b){f.p=o.prev,f.n=o.next;try{return g(v,b)}finally{o.next=f.n}}),o.resultName&&(o[o.resultName]=f.v,o.resultName=void 0),o.sent=f.v,o.next=f.n;try{return s.call(this,o)}finally{f.p=o.prev,f.n=o.next}}}return(Li=function(){return{wrap:function(c,f,p,g){return e.w(a(c),f,p,g&&g.reverse())},isGeneratorFunction:r,mark:e.m,awrap:function(c,f){return new y6(c,f)},AsyncIterator:ub,async:function(c,f,p,g,v){return(r(f)?x6:tY)(a(c),f,p,g,v)},keys:nY,values:gR}})()}function vR(e,t,n,r,i,a,s){try{var o=e[a](s),c=o.value}catch(f){return void n(f)}o.done?t(c):Promise.resolve(c).then(r,i)}function dc(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function s(c){vR(a,r,i,s,o,"next",c)}function o(c){vR(a,r,i,s,o,"throw",c)}s(void 0)})}}function dd(){return dd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dd.apply(this,arguments)}function rY(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Cg(e,t)}function i4(e){return i4=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},i4(e)}function Cg(e,t){return Cg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Cg(e,t)}function iY(){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 ox(e,t,n){return iY()?ox=Reflect.construct.bind():ox=function(i,a,s){var o=[null];o.push.apply(o,a);var c=Function.bind.apply(i,o),f=new c;return s&&Cg(f,s.prototype),f},ox.apply(null,arguments)}function oY(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function o4(e){var t=typeof Map=="function"?new Map:void 0;return o4=function(r){if(r===null||!oY(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,i)}function i(){return ox(r,arguments,i4(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Cg(i,r)},o4(e)}var aY=/%[sdj%]/g,sY=function(){};typeof process<"u"&&process.env;function a4(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var r=n.field;t[r]=t[r]||[],t[r].push(n)}),t}function _a(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=0,a=n.length;if(typeof e=="function")return e.apply(null,n);if(typeof e=="string"){var s=e.replace(aY,function(o){if(o==="%%")return"%";if(i>=a)return o;switch(o){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}break;default:return o}});return s}return e}function lY(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function Ki(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||lY(t)&&typeof e=="string"&&!e)}function uY(e,t,n){var r=[],i=0,a=e.length;function s(o){r.push.apply(r,o||[]),i++,i===a&&n(r)}e.forEach(function(o){t(o,s)})}function yR(e,t,n){var r=0,i=e.length;function a(s){if(s&&s.length){n(s);return}var o=r;r=r+1,o<i?t(e[o],a):n([])}a([])}function cY(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n]||[])}),t}var xR=function(e){rY(t,e);function t(n,r){var i;return i=e.call(this,"Async Validation Error")||this,i.errors=n,i.fields=r,i}return t}(o4(Error));function dY(e,t,n,r,i){if(t.first){var a=new Promise(function(v,b){var _=function(P){return r(P),P.length?b(new xR(P,a4(P))):v(i)},T=cY(e);yR(T,n,_)});return a.catch(function(v){return v}),a}var s=t.firstFields===!0?Object.keys(e):t.firstFields||[],o=Object.keys(e),c=o.length,f=0,p=[],g=new Promise(function(v,b){var _=function(k){if(p.push.apply(p,k),f++,f===c)return r(p),p.length?b(new xR(p,a4(p))):v(i)};o.length||(r(p),v(i)),o.forEach(function(T){var k=e[T];s.indexOf(T)!==-1?yR(k,n,_):uY(k,n,_)})});return g.catch(function(v){return v}),g}function fY(e){return!!(e&&e.message!==void 0)}function hY(e,t){for(var n=e,r=0;r<t.length;r++){if(n==null)return n;n=n[t[r]]}return n}function bR(e,t){return function(n){var r;return e.fullFields?r=hY(t,e.fullFields):r=t[n.field||e.fullField],fY(n)?(n.field=n.field||e.fullField,n.fieldValue=r,n):{message:typeof n=="function"?n():n,fieldValue:r,field:n.field||e.fullField}}}function _R(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];typeof r=="object"&&typeof e[n]=="object"?e[n]=dd({},e[n],r):e[n]=r}}return e}var b6=function(t,n,r,i,a,s){t.required&&(!r.hasOwnProperty(t.field)||Ki(n,s||t.type))&&i.push(_a(a.messages.required,t.fullField))},pY=function(t,n,r,i,a){(/^\s+$/.test(n)||n==="")&&i.push(_a(a.messages.whitespace,t.fullField))},t0,mY=function(){if(t0)return t0;var e="[a-fA-F\\d:]",t=function(N){return N&&N.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",i=(`
(?:
(?:`+r+":){7}(?:"+r+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
(?:`+r+":){6}(?:"+n+"|:"+r+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
(?:`+r+":){5}(?::"+n+"|(?::"+r+`){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
(?:`+r+":){4}(?:(?::"+r+"){0,1}:"+n+"|(?::"+r+`){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
(?:`+r+":){3}(?:(?::"+r+"){0,2}:"+n+"|(?::"+r+`){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
(?:`+r+":){2}(?:(?::"+r+"){0,3}:"+n+"|(?::"+r+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
(?:`+r+":){1}(?:(?::"+r+"){0,4}:"+n+"|(?::"+r+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
(?::(?:(?::`+r+"){0,5}:"+n+"|(?::"+r+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),a=new RegExp("(?:^"+n+"$)|(?:^"+i+"$)"),s=new RegExp("^"+n+"$"),o=new RegExp("^"+i+"$"),c=function(N){return N&&N.exact?a:new RegExp("(?:"+t(N)+n+t(N)+")|(?:"+t(N)+i+t(N)+")","g")};c.v4=function(O){return O&&O.exact?s:new RegExp(""+t(O)+n+t(O),"g")},c.v6=function(O){return O&&O.exact?o:new RegExp(""+t(O)+i+t(O),"g")};var f="(?:(?:[a-z]+:)?//)",p="(?:\\S+(?::\\S*)?@)?",g=c.v4().source,v=c.v6().source,b="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",_="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",T="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",k="(?::\\d{2,5})?",P='(?:[/?#][^\\s"]*)?',M="(?:"+f+"|www\\.)"+p+"(?:localhost|"+g+"|"+v+"|"+b+_+T+")"+k+P;return t0=new RegExp("(?:^"+M+"$)","i"),t0},wR={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},Em={integer:function(t){return Em.number(t)&&parseInt(t,10)===t},float:function(t){return Em.number(t)&&!Em.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"&&!Em.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(wR.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(mY())},hex:function(t){return typeof t=="string"&&!!t.match(wR.hex)}},gY=function(t,n,r,i,a){if(t.required&&n===void 0){b6(t,n,r,i,a);return}var s=["integer","float","array","regexp","object","method","email","number","date","url","hex"],o=t.type;s.indexOf(o)>-1?Em[o](n)||i.push(_a(a.messages.types[o],t.fullField,t.type)):o&&typeof n!==t.type&&i.push(_a(a.messages.types[o],t.fullField,t.type))},vY=function(t,n,r,i,a){var s=typeof t.len=="number",o=typeof t.min=="number",c=typeof t.max=="number",f=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,p=n,g=null,v=typeof n=="number",b=typeof n=="string",_=Array.isArray(n);if(v?g="number":b?g="string":_&&(g="array"),!g)return!1;_&&(p=n.length),b&&(p=n.replace(f,"_").length),s?p!==t.len&&i.push(_a(a.messages[g].len,t.fullField,t.len)):o&&!c&&p<t.min?i.push(_a(a.messages[g].min,t.fullField,t.min)):c&&!o&&p>t.max?i.push(_a(a.messages[g].max,t.fullField,t.max)):o&&c&&(p<t.min||p>t.max)&&i.push(_a(a.messages[g].range,t.fullField,t.min,t.max))},Cf="enum",yY=function(t,n,r,i,a){t[Cf]=Array.isArray(t[Cf])?t[Cf]:[],t[Cf].indexOf(n)===-1&&i.push(_a(a.messages[Cf],t.fullField,t[Cf].join(", ")))},xY=function(t,n,r,i,a){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||i.push(_a(a.messages.pattern.mismatch,t.fullField,n,t.pattern));else if(typeof t.pattern=="string"){var s=new RegExp(t.pattern);s.test(n)||i.push(_a(a.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},lr={required:b6,whitespace:pY,type:gY,range:vY,enum:yY,pattern:xY},bY=function(t,n,r,i,a){var s=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Ki(n,"string")&&!t.required)return r();lr.required(t,n,i,s,a,"string"),Ki(n,"string")||(lr.type(t,n,i,s,a),lr.range(t,n,i,s,a),lr.pattern(t,n,i,s,a),t.whitespace===!0&&lr.whitespace(t,n,i,s,a))}r(s)},_Y=function(t,n,r,i,a){var s=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Ki(n)&&!t.required)return r();lr.required(t,n,i,s,a),n!==void 0&&lr.type(t,n,i,s,a)}r(s)},wY=function(t,n,r,i,a){var s=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(n===""&&(n=void 0),Ki(n)&&!t.required)return r();lr.required(t,n,i,s,a),n!==void 0&&(lr.type(t,n,i,s,a),lr.range(t,n,i,s,a))}r(s)},CY=function(t,n,r,i,a){var s=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Ki(n)&&!t.required)return r();lr.required(t,n,i,s,a),n!==void 0&&lr.type(t,n,i,s,a)}r(s)},SY=function(t,n,r,i,a){var s=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Ki(n)&&!t.required)return r();lr.required(t,n,i,s,a),Ki(n)||lr.type(t,n,i,s,a)}r(s)},EY=function(t,n,r,i,a){var s=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Ki(n)&&!t.required)return r();lr.required(t,n,i,s,a),n!==void 0&&(lr.type(t,n,i,s,a),lr.range(t,n,i,s,a))}r(s)},PY=function(t,n,r,i,a){var s=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Ki(n)&&!t.required)return r();lr.required(t,n,i,s,a),n!==void 0&&(lr.type(t,n,i,s,a),lr.range(t,n,i,s,a))}r(s)},TY=function(t,n,r,i,a){var s=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(n==null&&!t.required)return r();lr.required(t,n,i,s,a,"array"),n!=null&&(lr.type(t,n,i,s,a),lr.range(t,n,i,s,a))}r(s)},kY=function(t,n,r,i,a){var s=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Ki(n)&&!t.required)return r();lr.required(t,n,i,s,a),n!==void 0&&lr.type(t,n,i,s,a)}r(s)},IY="enum",MY=function(t,n,r,i,a){var s=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Ki(n)&&!t.required)return r();lr.required(t,n,i,s,a),n!==void 0&&lr[IY](t,n,i,s,a)}r(s)},RY=function(t,n,r,i,a){var s=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Ki(n,"string")&&!t.required)return r();lr.required(t,n,i,s,a),Ki(n,"string")||lr.pattern(t,n,i,s,a)}r(s)},DY=function(t,n,r,i,a){var s=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Ki(n,"date")&&!t.required)return r();if(lr.required(t,n,i,s,a),!Ki(n,"date")){var c;n instanceof Date?c=n:c=new Date(n),lr.type(t,c,i,s,a),c&&lr.range(t,c.getTime(),i,s,a)}}r(s)},OY=function(t,n,r,i,a){var s=[],o=Array.isArray(n)?"array":typeof n;lr.required(t,n,i,s,a,o),r(s)},EC=function(t,n,r,i,a){var s=t.type,o=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(Ki(n,s)&&!t.required)return r();lr.required(t,n,i,o,a,s),Ki(n,s)||lr.type(t,n,i,o,a)}r(o)},AY=function(t,n,r,i,a){var s=[],o=t.required||!t.required&&i.hasOwnProperty(t.field);if(o){if(Ki(n)&&!t.required)return r();lr.required(t,n,i,s,a)}r(s)},Hm={string:bY,method:_Y,number:wY,boolean:CY,regexp:SY,integer:EY,float:PY,array:TY,object:kY,enum:MY,pattern:RY,date:DY,url:EC,hex:EC,email:EC,required:OY,any:AY};function s4(){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 l4=s4(),Qg=function(){function e(n){this.rules=null,this._messages=l4,this.define(n)}var t=e.prototype;return t.define=function(r){var i=this;if(!r)throw new Error("Cannot configure a schema with no rules");if(typeof r!="object"||Array.isArray(r))throw new Error("Rules must be an object");this.rules={},Object.keys(r).forEach(function(a){var s=r[a];i.rules[a]=Array.isArray(s)?s:[s]})},t.messages=function(r){return r&&(this._messages=_R(s4(),r)),this._messages},t.validate=function(r,i,a){var s=this;i===void 0&&(i={}),a===void 0&&(a=function(){});var o=r,c=i,f=a;if(typeof c=="function"&&(f=c,c={}),!this.rules||Object.keys(this.rules).length===0)return f&&f(null,o),Promise.resolve(o);function p(T){var k=[],P={};function M(N){if(Array.isArray(N)){var L;k=(L=k).concat.apply(L,N)}else k.push(N)}for(var O=0;O<T.length;O++)M(T[O]);k.length?(P=a4(k),f(k,P)):f(null,o)}if(c.messages){var g=this.messages();g===l4&&(g=s4()),_R(g,c.messages),c.messages=g}else c.messages=this.messages();var v={},b=c.keys||Object.keys(this.rules);b.forEach(function(T){var k=s.rules[T],P=o[T];k.forEach(function(M){var O=M;typeof O.transform=="function"&&(o===r&&(o=dd({},o)),P=o[T]=O.transform(P)),typeof O=="function"?O={validator:O}:O=dd({},O),O.validator=s.getValidationMethod(O),O.validator&&(O.field=T,O.fullField=O.fullField||T,O.type=s.getType(O),v[T]=v[T]||[],v[T].push({rule:O,value:P,source:o,field:T}))})});var _={};return dY(v,c,function(T,k){var P=T.rule,M=(P.type==="object"||P.type==="array")&&(typeof P.fields=="object"||typeof P.defaultField=="object");M=M&&(P.required||!P.required&&T.value),P.field=T.field;function O($,j){return dd({},j,{fullField:P.fullField+"."+$,fullFields:P.fullFields?[].concat(P.fullFields,[$]):[$]})}function N($){$===void 0&&($=[]);var j=Array.isArray($)?$:[$];!c.suppressWarning&&j.length&&e.warning("async-validator:",j),j.length&&P.message!==void 0&&(j=[].concat(P.message));var U=j.map(bR(P,o));if(c.first&&U.length)return _[P.field]=1,k(U);if(!M)k(U);else{if(P.required&&!T.value)return P.message!==void 0?U=[].concat(P.message).map(bR(P,o)):c.error&&(U=[c.error(P,_a(c.messages.required,P.field))]),k(U);var G={};P.defaultField&&Object.keys(T.value).map(function(J){G[J]=P.defaultField}),G=dd({},G,T.rule.fields);var Z={};Object.keys(G).forEach(function(J){var re=G[J],ne=Array.isArray(re)?re:[re];Z[J]=ne.map(O.bind(null,J))});var Q=new e(Z);Q.messages(c.messages),T.rule.options&&(T.rule.options.messages=c.messages,T.rule.options.error=c.error),Q.validate(T.value,T.rule.options||c,function(J){var re=[];U&&U.length&&re.push.apply(re,U),J&&J.length&&re.push.apply(re,J),k(re.length?re:null)})}}var L;if(P.asyncValidator)L=P.asyncValidator(P,T.value,N,T.source,c);else if(P.validator){try{L=P.validator(P,T.value,N,T.source,c)}catch($){console.error==null||console.error($),c.suppressValidatorError||setTimeout(function(){throw $},0),N($.message)}L===!0?N():L===!1?N(typeof P.message=="function"?P.message(P.fullField||P.field):P.message||(P.fullField||P.field)+" fails"):L instanceof Array?N(L):L instanceof Error&&N(L.message)}L&&L.then&&L.then(function(){return N()},function($){return N($)})},function(T){p(T)},o)},t.getType=function(r){if(r.type===void 0&&r.pattern instanceof RegExp&&(r.type="pattern"),typeof r.validator!="function"&&r.type&&!Hm.hasOwnProperty(r.type))throw new Error(_a("Unknown rule type %s",r.type));return r.type||"string"},t.getValidationMethod=function(r){if(typeof r.validator=="function")return r.validator;var i=Object.keys(r),a=i.indexOf("message");return a!==-1&&i.splice(a,1),i.length===1&&i[0]==="required"?Hm.required:Hm[this.getType(r)]||void 0},e}();Qg.register=function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");Hm[t]=n};Qg.warning=sY;Qg.messages=l4;Qg.validators=Hm;var ma="'${name}' is not a valid ${type}",_6={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:ma,method:ma,array:ma,object:ma,number:ma,date:ma,boolean:ma,integer:ma,float:ma,regexp:ma,email:ma,url:ma,hex:ma},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 w6(e,t){for(var n=e,r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}function C6(e){if(Array.isArray(e))return e}function S6(){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 QP(e){return C6(e)||v6(e)||XP(e)||S6()}function E6(e,t,n,r){if(!t.length)return n;var i=QP(t),a=i[0],s=i.slice(1),o;return!e&&typeof a=="number"?o=[]:Array.isArray(e)?o=Rt(e):o=fe({},e),r&&n===void 0&&s.length===1?delete o[a][s[0]]:o[a]=E6(o[a],s,n,r),o}function NY(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&r&&n===void 0&&!w6(e,t.slice(0,-1))?e:E6(e,t,n,r)}function $_(e){return Array.isArray(e)?FY(e):on(e)==="object"&&e!==null?LY(e):e}function LY(e){if(Object.getPrototypeOf(e)===Object.prototype){var t={};for(var n in e)t[n]=$_(e[n]);return t}return e}function FY(e){return e.map(function(t){return $_(t)})}function bi(e){return r4(e)}function Lu(e,t){var n=w6(e,t);return n}function Eu(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=NY(e,t,n,r);return i}function CR(e,t){var n={};return t.forEach(function(r){var i=Lu(e,r);n=Eu(n,r,i)}),n}function Km(e,t){return e&&e.some(function(n){return T6(n,t)})}function SR(e){return on(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function P6(e,t){var n=Array.isArray(e)?Rt(e):fe({},e);return t&&Object.keys(t).forEach(function(r){var i=n[r],a=t[r],s=SR(i)&&SR(a);n[r]=s?P6(i,a||{}):$_(a)}),n}function ax(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce(function(i,a){return P6(i,a)},e)}function T6(e,t){return!e||!t||e.length!==t.length?!1:e.every(function(n,r){return t[r]===n})}function zY(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||on(e)!=="object"||on(t)!=="object")return!1;var n=Object.keys(e),r=Object.keys(t),i=new Set([].concat(n,r));return Rt(i).every(function(a){var s=e[a],o=t[a];return typeof s=="function"&&typeof o=="function"?!0:s===o})}function $Y(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&on(t.target)==="object"&&e in t.target?t.target[e]:t}function ER(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var i=e[t],a=t-n;return a>0?[].concat(Rt(e.slice(0,n)),[i],Rt(e.slice(n,t)),Rt(e.slice(t+1,r))):a<0?[].concat(Rt(e.slice(0,t)),Rt(e.slice(t+1,n+1)),[i],Rt(e.slice(n+1,r))):e}var BY=Qg;function VY(e,t){return e.replace(/\$\{\w+\}/g,function(n){var r=n.slice(2,-1);return t[r]})}var PR="CODE_LOGIC_ERROR";function u4(e,t,n,r,i){return c4.apply(this,arguments)}function c4(){return c4=dc(Li().mark(function e(t,n,r,i,a){var s,o,c,f,p,g,v,b,_;return Li().wrap(function(k){for(;;)switch(k.prev=k.next){case 0:return s=fe({},r),delete s.ruleIndex,s.validator&&(o=s.validator,s.validator=function(){try{return o.apply(void 0,arguments)}catch(P){return console.error(P),Promise.reject(PR)}}),c=null,s&&s.type==="array"&&s.defaultField&&(c=s.defaultField,delete s.defaultField),f=new BY(ae({},t,[s])),p=ax({},_6,i.validateMessages),f.messages(p),g=[],k.prev=9,k.next=12,Promise.resolve(f.validate(ae({},t,n),fe({},i)));case 12:k.next=17;break;case 14:k.prev=14,k.t0=k.catch(9),k.t0.errors&&(g=k.t0.errors.map(function(P,M){var O=P.message,N=O===PR?p.default:O;return E.exports.isValidElement(N)?E.exports.cloneElement(N,{key:"error_".concat(M)}):N}));case 17:if(!(!g.length&&c)){k.next=22;break}return k.next=20,Promise.all(n.map(function(P,M){return u4("".concat(t,".").concat(M),P,c,i,a)}));case 20:return v=k.sent,k.abrupt("return",v.reduce(function(P,M){return[].concat(Rt(P),Rt(M))},[]));case 22:return b=fe(fe({},r),{},{name:t,enum:(r.enum||[]).join(", ")},a),_=g.map(function(P){return typeof P=="string"?VY(P,b):P}),k.abrupt("return",_);case 25:case"end":return k.stop()}},e,null,[[9,14]])})),c4.apply(this,arguments)}function UY(e,t,n,r,i,a){var s=e.join("."),o=n.map(function(p,g){var v=p.validator,b=fe(fe({},p),{},{ruleIndex:g});return v&&(b.validator=function(_,T,k){var P=!1,M=function(){for(var L=arguments.length,$=new Array(L),j=0;j<L;j++)$[j]=arguments[j];Promise.resolve().then(function(){Nr(!P,"Your validator function has already return a promise. `callback` will be ignored."),P||k.apply(void 0,$)})},O=v(_,T,M);P=O&&typeof O.then=="function"&&typeof O.catch=="function",Nr(P,"`callback` is deprecated. Please return a promise instead."),P&&O.then(function(){k()}).catch(function(N){k(N||" ")})}),b}).sort(function(p,g){var v=p.warningOnly,b=p.ruleIndex,_=g.warningOnly,T=g.ruleIndex;return!!v==!!_?b-T:v?1:-1}),c;if(i===!0)c=new Promise(function(){var p=dc(Li().mark(function g(v,b){var _,T,k;return Li().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:_=0;case 1:if(!(_<o.length)){M.next=12;break}return T=o[_],M.next=5,u4(s,t,T,r,a);case 5:if(k=M.sent,!k.length){M.next=9;break}return b([{errors:k,rule:T}]),M.abrupt("return");case 9:_+=1,M.next=1;break;case 12:v([]);case 13:case"end":return M.stop()}},g)}));return function(g,v){return p.apply(this,arguments)}}());else{var f=o.map(function(p){return u4(s,t,p,r,a).then(function(g){return{errors:g,rule:p}})});c=(i?HY(f):jY(f)).then(function(p){return Promise.reject(p)})}return c.catch(function(p){return p}),c}function jY(e){return d4.apply(this,arguments)}function d4(){return d4=dc(Li().mark(function e(t){return Li().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.all(t).then(function(i){var a,s=(a=[]).concat.apply(a,Rt(i));return s}));case 1:case"end":return r.stop()}},e)})),d4.apply(this,arguments)}function HY(e){return f4.apply(this,arguments)}function f4(){return f4=dc(Li().mark(function e(t){var n;return Li().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return n=0,i.abrupt("return",new Promise(function(a){t.forEach(function(s){s.then(function(o){o.errors.length&&a([o]),n+=1,n===t.length&&a([])})})}));case 2:case"end":return i.stop()}},e)})),f4.apply(this,arguments)}var KY=["name"],ja=[];function TR(e,t,n,r,i,a){return typeof e=="function"?e(t,n,"source"in a?{source:a.source}:{}):r!==i}var JP=function(e){ai(n,e);var t=si(n);function n(r){var i;if(Ur(this,n),i=t.call(this,r),i.state={resetCount:0},i.cancelRegisterFunc=null,i.mounted=!1,i.touched=!1,i.dirty=!1,i.validatePromise=null,i.prevValidating=void 0,i.errors=ja,i.warnings=ja,i.cancelRegister=function(){var c=i.props,f=c.preserve,p=c.isListField,g=c.name;i.cancelRegisterFunc&&i.cancelRegisterFunc(p,f,bi(g)),i.cancelRegisterFunc=null},i.getNamePath=function(){var c=i.props,f=c.name,p=c.fieldContext,g=p.prefixName,v=g===void 0?[]:g;return f!==void 0?[].concat(Rt(v),Rt(f)):[]},i.getRules=function(){var c=i.props,f=c.rules,p=f===void 0?[]:f,g=c.fieldContext;return p.map(function(v){return typeof v=="function"?v(g):v})},i.refresh=function(){!i.mounted||i.setState(function(c){var f=c.resetCount;return{resetCount:f+1}})},i.triggerMetaEvent=function(c){var f=i.props.onMetaChange;f==null||f(fe(fe({},i.getMeta()),{},{destroy:c}))},i.onStoreChange=function(c,f,p){var g=i.props,v=g.shouldUpdate,b=g.dependencies,_=b===void 0?[]:b,T=g.onReset,k=p.store,P=i.getNamePath(),M=i.getValue(c),O=i.getValue(k),N=f&&Km(f,P);switch(p.type==="valueUpdate"&&p.source==="external"&&M!==O&&(i.touched=!0,i.dirty=!0,i.validatePromise=null,i.errors=ja,i.warnings=ja,i.triggerMetaEvent()),p.type){case"reset":if(!f||N){i.touched=!1,i.dirty=!1,i.validatePromise=null,i.errors=ja,i.warnings=ja,i.triggerMetaEvent(),T==null||T(),i.refresh();return}break;case"remove":{if(v){i.reRender();return}break}case"setField":{if(N){var L=p.data;"touched"in L&&(i.touched=L.touched),"validating"in L&&!("originRCField"in L)&&(i.validatePromise=L.validating?Promise.resolve([]):null),"errors"in L&&(i.errors=L.errors||ja),"warnings"in L&&(i.warnings=L.warnings||ja),i.dirty=!0,i.triggerMetaEvent(),i.reRender();return}if(v&&!P.length&&TR(v,c,k,M,O,p)){i.reRender();return}break}case"dependenciesUpdate":{var $=_.map(bi);if($.some(function(j){return Km(p.relatedFields,j)})){i.reRender();return}break}default:if(N||(!_.length||P.length||v)&&TR(v,c,k,M,O,p)){i.reRender();return}break}v===!0&&i.reRender()},i.validateRules=function(c){var f=i.getNamePath(),p=i.getValue(),g=Promise.resolve().then(function(){if(!i.mounted)return[];var v=i.props,b=v.validateFirst,_=b===void 0?!1:b,T=v.messageVariables,k=c||{},P=k.triggerName,M=i.getRules();P&&(M=M.filter(function(N){return N}).filter(function(N){var L=N.validateTrigger;if(!L)return!0;var $=r4(L);return $.includes(P)}));var O=UY(f,p,M,c,_,T);return O.catch(function(N){return N}).then(function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ja;if(i.validatePromise===g){var L;i.validatePromise=null;var $=[],j=[];(L=N.forEach)===null||L===void 0||L.call(N,function(U){var G=U.rule.warningOnly,Z=U.errors,Q=Z===void 0?ja:Z;G?j.push.apply(j,Rt(Q)):$.push.apply($,Rt(Q))}),i.errors=$,i.warnings=j,i.triggerMetaEvent(),i.reRender()}}),O});return i.validatePromise=g,i.dirty=!0,i.errors=ja,i.warnings=ja,i.triggerMetaEvent(),i.reRender(),g},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 c=i.props.fieldContext,f=c.getInternalHooks(cd),p=f.getInitialValue;return p(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 c={touched:i.isFieldTouched(),validating:i.prevValidating,errors:i.errors,warnings:i.warnings,name:i.getNamePath()};return c},i.getOnlyChild=function(c){if(typeof c=="function"){var f=i.getMeta();return fe(fe({},i.getOnlyChild(c(i.getControlled(),f,i.props.fieldContext))),{},{isFunction:!0})}var p=To(c);return p.length!==1||!E.exports.isValidElement(p[0])?{child:p,isFunction:!1}:{child:p[0],isFunction:!1}},i.getValue=function(c){var f=i.props.fieldContext.getFieldsValue,p=i.getNamePath();return Lu(c||f(!0),p)},i.getControlled=function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=i.props,p=f.trigger,g=f.validateTrigger,v=f.getValueFromEvent,b=f.normalize,_=f.valuePropName,T=f.getValueProps,k=f.fieldContext,P=g!==void 0?g:k.validateTrigger,M=i.getNamePath(),O=k.getInternalHooks,N=k.getFieldsValue,L=O(cd),$=L.dispatch,j=i.getValue(),U=T||function(J){return ae({},_,J)},G=c[p],Z=fe(fe({},c),U(j));Z[p]=function(){i.touched=!0,i.dirty=!0,i.triggerMetaEvent();for(var J,re=arguments.length,ne=new Array(re),ge=0;ge<re;ge++)ne[ge]=arguments[ge];v?J=v.apply(void 0,ne):J=$Y.apply(void 0,[_].concat(ne)),b&&(J=b(J,j,N(!0))),$({type:"updateValue",namePath:M,value:J}),G&&G.apply(void 0,ne)};var Q=r4(P||[]);return Q.forEach(function(J){var re=Z[J];Z[J]=function(){re&&re.apply(void 0,arguments);var ne=i.props.rules;ne&&ne.length&&$({type:"validateField",namePath:M,triggerName:J})}}),Z},r.fieldContext){var a=r.fieldContext.getInternalHooks,s=a(cd),o=s.initEntityValue;o(zn(i))}return i}return jr(n,[{key:"componentDidMount",value:function(){var i=this.props,a=i.shouldUpdate,s=i.fieldContext;if(this.mounted=!0,s){var o=s.getInternalHooks,c=o(cd),f=c.registerField;this.cancelRegisterFunc=f(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),s=a.child,o=a.isFunction,c;return o?c=s:E.exports.isValidElement(s)?c=E.exports.cloneElement(s,this.getControlled(s.props)):(Nr(!s,"`children` of Field is not validate ReactElement."),c=s),A(nr,{children:c})}}]),n}(E.exports.Component);JP.contextType=yh;JP.defaultProps={trigger:"onChange",valuePropName:"value"};function k6(e){var t=e.name,n=In(e,KY),r=E.exports.useContext(yh),i=t!==void 0?bi(t):void 0,a="keep";return n.isListField||(a="_".concat((i||[]).join("_"))),A(JP,{name:i,...n,fieldContext:r},a)}var WY=E.exports.createContext(null),GY=function(t){var n=t.name,r=t.initialValue,i=t.children,a=t.rules,s=t.validateTrigger,o=E.exports.useContext(yh),c=E.exports.useRef({keys:[],id:0}),f=c.current,p=E.exports.useMemo(function(){var _=bi(o.prefixName)||[];return[].concat(Rt(_),Rt(bi(n)))},[o.prefixName,n]),g=E.exports.useMemo(function(){return fe(fe({},o),{},{prefixName:p})},[o,p]),v=E.exports.useMemo(function(){return{getKey:function(T){var k=p.length,P=T[k];return[f.keys[P],T.slice(k+1)]}}},[p]);if(typeof i!="function")return Nr(!1,"Form.List only accepts function as children."),null;var b=function(T,k,P){var M=P.source;return M==="internal"?!1:T!==k};return A(WY.Provider,{value:v,children:A(yh.Provider,{value:g,children:A(k6,{name:[],shouldUpdate:b,rules:a,validateTrigger:s,initialValue:r,isList:!0,children:function(_,T){var k=_.value,P=k===void 0?[]:k,M=_.onChange,O=o.getFieldValue,N=function(){var U=O(p||[]);return U||[]},L={add:function(U,G){var Z=N();G>=0&&G<=Z.length?(f.keys=[].concat(Rt(f.keys.slice(0,G)),[f.id],Rt(f.keys.slice(G))),M([].concat(Rt(Z.slice(0,G)),[U],Rt(Z.slice(G))))):(f.keys=[].concat(Rt(f.keys),[f.id]),M([].concat(Rt(Z),[U]))),f.id+=1},remove:function(U){var G=N(),Z=new Set(Array.isArray(U)?U:[U]);Z.size<=0||(f.keys=f.keys.filter(function(Q,J){return!Z.has(J)}),M(G.filter(function(Q,J){return!Z.has(J)})))},move:function(U,G){if(U!==G){var Z=N();U<0||U>=Z.length||G<0||G>=Z.length||(f.keys=ER(f.keys,U,G),M(ER(Z,U,G)))}}},$=P||[];return Array.isArray($)||($=[]),i($.map(function(j,U){var G=f.keys[U];return G===void 0&&(f.keys[U]=f.id,G=f.keys[U],f.id+=1),{name:U,key:G,isListField:!0}}),L,T)}})})})};function qY(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,s,o=[],c=!0,f=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(p){f=!0,i=p}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(f)throw i}}return o}}function $e(e,t){return C6(e)||qY(e,t)||XP(e,t)||S6()}function ZY(e){var t=!1,n=e.length,r=[];return e.length?new Promise(function(i,a){e.forEach(function(s,o){s.catch(function(c){return t=!0,c}).then(function(c){n-=1,r[o]=c,!(n>0)&&(t&&a(r),i(r))})})}):Promise.resolve([])}var I6="__@field_split__";function PC(e){return e.map(function(t){return"".concat(on(t),":").concat(t)}).join(I6)}var Sf=function(){function e(){Ur(this,e),this.kvs=new Map}return jr(e,[{key:"set",value:function(n,r){this.kvs.set(PC(n),r)}},{key:"get",value:function(n){return this.kvs.get(PC(n))}},{key:"update",value:function(n,r){var i=this.get(n),a=r(i);a?this.set(n,a):this.delete(n)}},{key:"delete",value:function(n){this.kvs.delete(PC(n))}},{key:"map",value:function(n){return Rt(this.kvs.entries()).map(function(r){var i=$e(r,2),a=i[0],s=i[1],o=a.split(I6);return n({key:o.map(function(c){var f=c.match(/^([^:]*):(.*)$/),p=$e(f,3),g=p[1],v=p[2];return g==="number"?Number(v):v}),value:s})})}},{key:"toJSON",value:function(){var n={};return this.map(function(r){var i=r.key,a=r.value;return n[i.join(".")]=a,null}),n}}]),e}(),XY=["name","errors"],YY=jr(function e(t){var n=this;Ur(this,e),this.formHooked=!1,this.forceRootUpdate=void 0,this.subscribable=!0,this.store={},this.fieldEntities=[],this.initialValues={},this.callbacks={},this.validateMessages=null,this.preserve=null,this.lastValidatePromise=null,this.getForm=function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}},this.getInternalHooks=function(r){return r===cd?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):(Nr(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)},this.useSubscribe=function(r){n.subscribable=r},this.prevWithoutPreserves=null,this.setInitialValues=function(r,i){if(n.initialValues=r||{},i){var a,s=ax({},r,n.store);(a=n.prevWithoutPreserves)===null||a===void 0||a.map(function(o){var c=o.key;s=Eu(s,c,Lu(r,c))}),n.prevWithoutPreserves=null,n.updateStore(s)}},this.destroyForm=function(){var r=new Sf;n.getFieldEntities(!0).forEach(function(i){n.isMergedPreserve(i.isPreserve())||r.set(i.getNamePath(),!0)}),n.prevWithoutPreserves=r},this.getInitialValue=function(r){var i=Lu(n.initialValues,r);return r.length?$_(i):i},this.setCallbacks=function(r){n.callbacks=r},this.setValidateMessages=function(r){n.validateMessages=r},this.setPreserve=function(r){n.preserve=r},this.watchList=[],this.registerWatch=function(r){return n.watchList.push(r),function(){n.watchList=n.watchList.filter(function(i){return i!==r})}},this.notifyWatch=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(n.watchList.length){var i=n.getFieldsValue();n.watchList.forEach(function(a){a(i,r)})}},this.timeoutId=null,this.warningUnhooked=function(){},this.updateStore=function(r){n.store=r},this.getFieldEntities=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return r?n.fieldEntities.filter(function(i){return i.getNamePath().length}):n.fieldEntities},this.getFieldsMap=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=new Sf;return n.getFieldEntities(r).forEach(function(a){var s=a.getNamePath();i.set(s,a)}),i},this.getFieldEntitiesForNamePathList=function(r){if(!r)return n.getFieldEntities(!0);var i=n.getFieldsMap(!0);return r.map(function(a){var s=bi(a);return i.get(s)||{INVALIDATE_NAME_PATH:bi(a)}})},this.getFieldsValue=function(r,i){if(n.warningUnhooked(),r===!0&&!i)return n.store;var a=n.getFieldEntitiesForNamePathList(Array.isArray(r)?r:null),s=[];return a.forEach(function(o){var c,f="INVALIDATE_NAME_PATH"in o?o.INVALIDATE_NAME_PATH:o.getNamePath();if(!(!r&&((c=o.isListField)===null||c===void 0?void 0:c.call(o))))if(!i)s.push(f);else{var p="getMeta"in o?o.getMeta():null;i(p)&&s.push(f)}}),CR(n.store,s.map(bi))},this.getFieldValue=function(r){n.warningUnhooked();var i=bi(r);return Lu(n.store,i)},this.getFieldsError=function(r){n.warningUnhooked();var i=n.getFieldEntitiesForNamePathList(r);return i.map(function(a,s){return a&&!("INVALIDATE_NAME_PATH"in a)?{name:a.getNamePath(),errors:a.getErrors(),warnings:a.getWarnings()}:{name:bi(r[s]),errors:[],warnings:[]}})},this.getFieldError=function(r){n.warningUnhooked();var i=bi(r),a=n.getFieldsError([i])[0];return a.errors},this.getFieldWarning=function(r){n.warningUnhooked();var i=bi(r),a=n.getFieldsError([i])[0];return a.warnings},this.isFieldsTouched=function(){n.warningUnhooked();for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var s=i[0],o=i[1],c,f=!1;i.length===0?c=null:i.length===1?Array.isArray(s)?(c=s.map(bi),f=!1):(c=null,f=s):(c=s.map(bi),f=o);var p=n.getFieldEntities(!0),g=function(k){return k.isFieldTouched()};if(!c)return f?p.every(g):p.some(g);var v=new Sf;c.forEach(function(T){v.set(T,[])}),p.forEach(function(T){var k=T.getNamePath();c.forEach(function(P){P.every(function(M,O){return k[O]===M})&&v.update(P,function(M){return[].concat(Rt(M),[T])})})});var b=function(k){return k.some(g)},_=v.map(function(T){var k=T.value;return k});return f?_.every(b):_.some(b)},this.isFieldTouched=function(r){return n.warningUnhooked(),n.isFieldsTouched([r])},this.isFieldsValidating=function(r){n.warningUnhooked();var i=n.getFieldEntities();if(!r)return i.some(function(s){return s.isFieldValidating()});var a=r.map(bi);return i.some(function(s){var o=s.getNamePath();return Km(a,o)&&s.isFieldValidating()})},this.isFieldValidating=function(r){return n.warningUnhooked(),n.isFieldsValidating([r])},this.resetWithFieldInitialValue=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=new Sf,a=n.getFieldEntities(!0);a.forEach(function(c){var f=c.props.initialValue,p=c.getNamePath();if(f!==void 0){var g=i.get(p)||new Set;g.add({entity:c,value:f}),i.set(p,g)}});var s=function(f){f.forEach(function(p){var g=p.props.initialValue;if(g!==void 0){var v=p.getNamePath(),b=n.getInitialValue(v);if(b!==void 0)Nr(!1,"Form already set 'initialValues' with path '".concat(v.join("."),"'. Field can not overwrite it."));else{var _=i.get(v);if(_&&_.size>1)Nr(!1,"Multiple Field with path '".concat(v.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(_){var T=n.getFieldValue(v);(!r.skipExist||T===void 0)&&n.updateStore(Eu(n.store,v,Rt(_)[0].value))}}}})},o;r.entities?o=r.entities:r.namePathList?(o=[],r.namePathList.forEach(function(c){var f=i.get(c);if(f){var p;(p=o).push.apply(p,Rt(Rt(f).map(function(g){return g.entity})))}})):o=a,s(o)},this.resetFields=function(r){n.warningUnhooked();var i=n.store;if(!r){n.updateStore(ax({},n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(i,null,{type:"reset"}),n.notifyWatch();return}var a=r.map(bi);a.forEach(function(s){var o=n.getInitialValue(s);n.updateStore(Eu(n.store,s,o))}),n.resetWithFieldInitialValue({namePathList:a}),n.notifyObservers(i,a,{type:"reset"}),n.notifyWatch(a)},this.setFields=function(r){n.warningUnhooked();var i=n.store,a=[];r.forEach(function(s){var o=s.name;s.errors;var c=In(s,XY),f=bi(o);a.push(f),"value"in c&&n.updateStore(Eu(n.store,f,c.value)),n.notifyObservers(i,[f],{type:"setField",data:s})}),n.notifyWatch(a)},this.getFields=function(){var r=n.getFieldEntities(!0),i=r.map(function(a){var s=a.getNamePath(),o=a.getMeta(),c=fe(fe({},o),{},{name:s,value:n.getFieldValue(s)});return Object.defineProperty(c,"originRCField",{value:!0}),c});return i},this.initEntityValue=function(r){var i=r.props.initialValue;if(i!==void 0){var a=r.getNamePath(),s=Lu(n.store,a);s===void 0&&n.updateStore(Eu(n.store,a,i))}},this.isMergedPreserve=function(r){var i=r!==void 0?r:n.preserve;return i!=null?i:!0},this.registerField=function(r){n.fieldEntities.push(r);var i=r.getNamePath();if(n.notifyWatch([i]),r.props.initialValue!==void 0){var a=n.store;n.resetWithFieldInitialValue({entities:[r],skipExist:!0}),n.notifyObservers(a,[r.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(s,o){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter(function(g){return g!==r}),!n.isMergedPreserve(o)&&(!s||c.length>1)){var f=s?void 0:n.getInitialValue(i);if(i.length&&n.getFieldValue(i)!==f&&n.fieldEntities.every(function(g){return!T6(g.getNamePath(),i)})){var p=n.store;n.updateStore(Eu(p,i,f,!0)),n.notifyObservers(p,[i],{type:"remove"}),n.triggerDependenciesUpdate(p,i)}}n.notifyWatch([i])}},this.dispatch=function(r){switch(r.type){case"updateValue":{var i=r.namePath,a=r.value;n.updateValue(i,a);break}case"validateField":{var s=r.namePath,o=r.triggerName;n.validateFields([s],{triggerName:o});break}}},this.notifyObservers=function(r,i,a){if(n.subscribable){var s=fe(fe({},a),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach(function(o){var c=o.onStoreChange;c(r,i,s)})}else n.forceRootUpdate()},this.triggerDependenciesUpdate=function(r,i){var a=n.getDependencyChildrenFields(i);return a.length&&n.validateFields(a),n.notifyObservers(r,a,{type:"dependenciesUpdate",relatedFields:[i].concat(Rt(a))}),a},this.updateValue=function(r,i){var a=bi(r),s=n.store;n.updateStore(Eu(n.store,a,i)),n.notifyObservers(s,[a],{type:"valueUpdate",source:"internal"}),n.notifyWatch([a]);var o=n.triggerDependenciesUpdate(s,a),c=n.callbacks.onValuesChange;if(c){var f=CR(n.store,[a]);c(f,n.getFieldsValue())}n.triggerOnFieldsChange([a].concat(Rt(o)))},this.setFieldsValue=function(r){n.warningUnhooked();var i=n.store;if(r){var a=ax(n.store,r);n.updateStore(a)}n.notifyObservers(i,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()},this.setFieldValue=function(r,i){n.setFields([{name:r,value:i}])},this.getDependencyChildrenFields=function(r){var i=new Set,a=[],s=new Sf;n.getFieldEntities().forEach(function(c){var f=c.props.dependencies;(f||[]).forEach(function(p){var g=bi(p);s.update(g,function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return v.add(c),v})})});var o=function c(f){var p=s.get(f)||new Set;p.forEach(function(g){if(!i.has(g)){i.add(g);var v=g.getNamePath();g.isFieldDirty()&&v.length&&(a.push(v),c(v))}})};return o(r),a},this.triggerOnFieldsChange=function(r,i){var a=n.callbacks.onFieldsChange;if(a){var s=n.getFields();if(i){var o=new Sf;i.forEach(function(f){var p=f.name,g=f.errors;o.set(p,g)}),s.forEach(function(f){f.errors=o.get(f.name)||f.errors})}var c=s.filter(function(f){var p=f.name;return Km(r,p)});a(c,s)}},this.validateFields=function(r,i){n.warningUnhooked();var a=!!r,s=a?r.map(bi):[],o=[];n.getFieldEntities(!0).forEach(function(p){if(a||s.push(p.getNamePath()),(i==null?void 0:i.recursive)&&a){var g=p.getNamePath();g.every(function(_,T){return r[T]===_||r[T]===void 0})&&s.push(g)}if(!(!p.props.rules||!p.props.rules.length)){var v=p.getNamePath();if(!a||Km(s,v)){var b=p.validateRules(fe({validateMessages:fe(fe({},_6),n.validateMessages)},i));o.push(b.then(function(){return{name:v,errors:[],warnings:[]}}).catch(function(_){var T,k=[],P=[];return(T=_.forEach)===null||T===void 0||T.call(_,function(M){var O=M.rule.warningOnly,N=M.errors;O?P.push.apply(P,Rt(N)):k.push.apply(k,Rt(N))}),k.length?Promise.reject({name:v,errors:k,warnings:P}):{name:v,errors:k,warnings:P}}))}}});var c=ZY(o);n.lastValidatePromise=c,c.catch(function(p){return p}).then(function(p){var g=p.map(function(v){var b=v.name;return b});n.notifyObservers(n.store,g,{type:"validateFinish"}),n.triggerOnFieldsChange(g,p)});var f=c.then(function(){return n.lastValidatePromise===c?Promise.resolve(n.getFieldsValue(s)):Promise.reject([])}).catch(function(p){var g=p.filter(function(v){return v&&v.errors.length});return Promise.reject({values:n.getFieldsValue(s),errorFields:g,outOfDate:n.lastValidatePromise!==c})});return f.catch(function(p){return p}),f},this.submit=function(){n.warningUnhooked(),n.validateFields().then(function(r){var i=n.callbacks.onFinish;if(i)try{i(r)}catch(a){console.error(a)}}).catch(function(r){var i=n.callbacks.onFinishFailed;i&&i(r)})},this.forceRootUpdate=t});function M6(e){var t=E.exports.useRef(),n=E.exports.useState({}),r=$e(n,2),i=r[1];if(!t.current)if(e)t.current=e;else{var a=function(){i({})},s=new YY(a);t.current=s.getForm()}return[t.current]}var h4=E.exports.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),R6=function(t){var n=t.validateMessages,r=t.onFormChange,i=t.onFormFinish,a=t.children,s=E.exports.useContext(h4),o=E.exports.useRef({});return A(h4.Provider,{value:fe(fe({},s),{},{validateMessages:fe(fe({},s.validateMessages),n),triggerFormChange:function(f,p){r&&r(f,{changedFields:p,forms:o.current}),s.triggerFormChange(f,p)},triggerFormFinish:function(f,p){i&&i(f,{values:p,forms:o.current}),s.triggerFormFinish(f,p)},registerForm:function(f,p){f&&(o.current=fe(fe({},o.current),{},ae({},f,p))),s.registerForm(f,p)},unregisterForm:function(f){var p=fe({},o.current);delete p[f],o.current=p,s.unregisterForm(f)}}),children:a})},QY=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed"],JY=function(t,n){var r=t.name,i=t.initialValues,a=t.fields,s=t.form,o=t.preserve,c=t.children,f=t.component,p=f===void 0?"form":f,g=t.validateMessages,v=t.validateTrigger,b=v===void 0?"onChange":v,_=t.onValuesChange,T=t.onFieldsChange,k=t.onFinish,P=t.onFinishFailed,M=In(t,QY),O=E.exports.useContext(h4),N=M6(s),L=$e(N,1),$=L[0],j=$.getInternalHooks(cd),U=j.useSubscribe,G=j.setInitialValues,Z=j.setCallbacks,Q=j.setValidateMessages,J=j.setPreserve,re=j.destroyForm;E.exports.useImperativeHandle(n,function(){return $}),E.exports.useEffect(function(){return O.registerForm(r,$),function(){O.unregisterForm(r)}},[O,$,r]),Q(fe(fe({},O.validateMessages),g)),Z({onValuesChange:_,onFieldsChange:function(be){if(O.triggerFormChange(r,be),T){for(var Re=arguments.length,Ee=new Array(Re>1?Re-1:0),Me=1;Me<Re;Me++)Ee[Me-1]=arguments[Me];T.apply(void 0,[be].concat(Ee))}},onFinish:function(be){O.triggerFormFinish(r,be),k&&k(be)},onFinishFailed:P}),J(o);var ne=E.exports.useRef(null);G(i,!ne.current),ne.current||(ne.current=!0),E.exports.useEffect(function(){return re},[]);var ge,ie=typeof c=="function";if(ie){var ue=$.getFieldsValue(!0);ge=c(ue,$)}else ge=c;U(!ie);var oe=E.exports.useRef();E.exports.useEffect(function(){zY(oe.current||[],a||[])||$.setFields(a||[]),oe.current=a},[a,$]);var me=E.exports.useMemo(function(){return fe(fe({},$),{},{validateTrigger:b})},[$,b]),Te=A(yh.Provider,{value:me,children:ge});return p===!1?Te:A(p,{...M,onSubmit:function(be){be.preventDefault(),be.stopPropagation(),$.submit()},onReset:function(be){var Re;be.preventDefault(),$.resetFields(),(Re=M.onReset)===null||Re===void 0||Re.call(M,be)},children:Te})};function kR(e){try{return JSON.stringify(e)}catch{return Math.random()}}function eQ(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],i=r===void 0?[]:r,a=t[1],s=E.exports.useState(),o=$e(s,2),c=o[0],f=o[1],p=E.exports.useMemo(function(){return kR(c)},[c]),g=E.exports.useRef(p);g.current=p;var v=E.exports.useContext(yh),b=a||v,_=b&&b._init,T=bi(i),k=E.exports.useRef(T);return k.current=T,E.exports.useEffect(function(){if(!!_){var P=b.getFieldsValue,M=b.getInternalHooks,O=M(cd),N=O.registerWatch,L=N(function(j){var U=Lu(j,k.current),G=kR(U);g.current!==G&&(g.current=G,f(U))}),$=Lu(P(),k.current);return f($),L}},[_]),c}var tQ=E.exports.forwardRef(JY),Jg=tQ;Jg.FormProvider=R6;Jg.Field=k6;Jg.List=GY;Jg.useForm=M6;Jg.useWatch=eQ;const D6={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 nQ={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"},rQ={placeholder:"Select time",rangePlaceholder:["Start time","End time"]};const O6=rQ;var iQ={lang:Be({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"]},nQ),timePickerLocale:Be({},O6)};const IR=iQ;var ga="${label} is not a valid ${type}",oQ={locale:"en",Pagination:D6,DatePicker:IR,TimePicker:O6,Calendar:IR,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:ga,method:ga,array:ga,object:ga,number:ga,date:ga,boolean:ga,integer:ga,float:ga,regexp:ga,email:ga,url:ga,hex:ga},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 Os=oQ;var sx=Be({},Os.Modal);function MR(e){e?sx=Be(Be({},sx),e):sx=Be({},Os.Modal)}function A6(){return sx}var aQ=E.exports.createContext(void 0);const eT=aQ;var sQ="internalMark",lQ=function(t){var n=t.locale,r=n===void 0?{}:n,i=t.children;t._ANT_MARK__,E.exports.useEffect(function(){return MR(r&&r.Modal),function(){MR()}},[r]);var a=E.exports.useMemo(function(){return Be(Be({},r),{exist:!0})},[r]);return A(eT.Provider,{value:a,children:i})};const uQ=lQ;var cQ=function(t){var n=t.componentName,r=n===void 0?"global":n,i=t.defaultLocale,a=t.children,s=E.exports.useContext(eT),o=E.exports.useMemo(function(){var f,p=i||Os[r],g=(f=s==null?void 0:s[r])!==null&&f!==void 0?f:{};return Be(Be({},p instanceof Function?p():p),g||{})},[r,i,s]),c=E.exports.useMemo(function(){var f=s&&s.locale;return s&&s.exist&&!f?Os.locale:f},[s]);return a(o,c,s)};const Fh=cQ;var dQ=function(t,n){var r=E.exports.useContext(eT),i=E.exports.useMemo(function(){var a,s=n||Os[t],o=(a=r==null?void 0:r[t])!==null&&a!==void 0?a:{};return Be(Be({},typeof s=="function"?s():s),o||{})},[t,n,r]);return[i]},fQ={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 hQ=fQ;function ho(e,t){pQ(e)&&(e="100%");var n=mQ(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function n0(e){return Math.min(1,Math.max(0,e))}function pQ(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function mQ(e){return typeof e=="string"&&e.indexOf("%")!==-1}function N6(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function r0(e){return e<=1?"".concat(Number(e)*100,"%"):e}function fd(e){return e.length===1?"0"+e:String(e)}function gQ(e,t,n){return{r:ho(e,255)*255,g:ho(t,255)*255,b:ho(n,255)*255}}function RR(e,t,n){e=ho(e,255),t=ho(t,255),n=ho(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),a=0,s=0,o=(r+i)/2;if(r===i)s=0,a=0;else{var c=r-i;switch(s=o>.5?c/(2-r-i):c/(r+i),r){case e:a=(t-n)/c+(t<n?6:0);break;case t:a=(n-e)/c+2;break;case n:a=(e-t)/c+4;break}a/=6}return{h:a,s,l:o}}function TC(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function vQ(e,t,n){var r,i,a;if(e=ho(e,360),t=ho(t,100),n=ho(n,100),t===0)i=n,a=n,r=n;else{var s=n<.5?n*(1+t):n+t-n*t,o=2*n-s;r=TC(o,s,e+1/3),i=TC(o,s,e),a=TC(o,s,e-1/3)}return{r:r*255,g:i*255,b:a*255}}function cb(e,t,n){e=ho(e,255),t=ho(t,255),n=ho(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),a=0,s=r,o=r-i,c=r===0?0:o/r;if(r===i)a=0;else{switch(r){case e:a=(t-n)/o+(t<n?6:0);break;case t:a=(n-e)/o+2;break;case n:a=(e-t)/o+4;break}a/=6}return{h:a,s:c,v:s}}function yQ(e,t,n){e=ho(e,360)*6,t=ho(t,100),n=ho(n,100);var r=Math.floor(e),i=e-r,a=n*(1-t),s=n*(1-i*t),o=n*(1-(1-i)*t),c=r%6,f=[n,s,a,a,o,n][c],p=[o,n,n,s,a,a][c],g=[a,a,o,n,n,s][c];return{r:f*255,g:p*255,b:g*255}}function db(e,t,n,r){var i=[fd(Math.round(e).toString(16)),fd(Math.round(t).toString(16)),fd(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function xQ(e,t,n,r,i){var a=[fd(Math.round(e).toString(16)),fd(Math.round(t).toString(16)),fd(Math.round(n).toString(16)),fd(bQ(r))];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 bQ(e){return Math.round(parseFloat(e)*255).toString(16)}function DR(e){return va(e)/255}function va(e){return parseInt(e,16)}function _Q(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var p4={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 Ts(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,a=null,s=!1,o=!1;return typeof e=="string"&&(e=SQ(e)),typeof e=="object"&&(Il(e.r)&&Il(e.g)&&Il(e.b)?(t=gQ(e.r,e.g,e.b),s=!0,o=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Il(e.h)&&Il(e.s)&&Il(e.v)?(r=r0(e.s),i=r0(e.v),t=yQ(e.h,r,i),s=!0,o="hsv"):Il(e.h)&&Il(e.s)&&Il(e.l)&&(r=r0(e.s),a=r0(e.l),t=vQ(e.h,r,a),s=!0,o="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=N6(n),{ok:s,format:e.format||o,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var wQ="[-\\+]?\\d+%?",CQ="[-\\+]?\\d*\\.\\d+%?",Fu="(?:".concat(CQ,")|(?:").concat(wQ,")"),kC="[\\s|\\(]+(".concat(Fu,")[,|\\s]+(").concat(Fu,")[,|\\s]+(").concat(Fu,")\\s*\\)?"),IC="[\\s|\\(]+(".concat(Fu,")[,|\\s]+(").concat(Fu,")[,|\\s]+(").concat(Fu,")[,|\\s]+(").concat(Fu,")\\s*\\)?"),ws={CSS_UNIT:new RegExp(Fu),rgb:new RegExp("rgb"+kC),rgba:new RegExp("rgba"+IC),hsl:new RegExp("hsl"+kC),hsla:new RegExp("hsla"+IC),hsv:new RegExp("hsv"+kC),hsva:new RegExp("hsva"+IC),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 SQ(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(p4[e])e=p4[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=ws.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=ws.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ws.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=ws.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ws.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=ws.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ws.hex8.exec(e),n?{r:va(n[1]),g:va(n[2]),b:va(n[3]),a:DR(n[4]),format:t?"name":"hex8"}:(n=ws.hex6.exec(e),n?{r:va(n[1]),g:va(n[2]),b:va(n[3]),format:t?"name":"hex"}:(n=ws.hex4.exec(e),n?{r:va(n[1]+n[1]),g:va(n[2]+n[2]),b:va(n[3]+n[3]),a:DR(n[4]+n[4]),format:t?"name":"hex8"}:(n=ws.hex3.exec(e),n?{r:va(n[1]+n[1]),g:va(n[2]+n[2]),b:va(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function Il(e){return Boolean(ws.CSS_UNIT.exec(String(e)))}var MC=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=_Q(t)),this.originalInput=t;var i=Ts(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,a=t.r/255,s=t.g/255,o=t.b/255;return a<=.03928?n=a/12.92:n=Math.pow((a+.055)/1.055,2.4),s<=.03928?r=s/12.92:r=Math.pow((s+.055)/1.055,2.4),o<=.03928?i=o/12.92:i=Math.pow((o+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=N6(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=cb(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=cb(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=RR(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=RR(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),db(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),xQ(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(ho(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(ho(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+db(this.r,this.g,this.b,!1),n=0,r=Object.entries(p4);n<r.length;n++){var i=r[n],a=i[0],s=i[1];if(t===s)return a}return!1},e.prototype.toString=function(t){var n=Boolean(t);t=t!=null?t:this.format;var r=!1,i=this.a<1&&this.a>=0,a=!n&&i&&(t.startsWith("hex")||t==="name");return a?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=n0(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=n0(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=n0(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=n0(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),a=n/100,s={r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a};return new e(s)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,a=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(new e(r));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 n=this.toHsv(),r=n.h,i=n.s,a=n.v,s=[],o=1/t;t--;)s.push(new e({h:r,s:i,v:a})),a=(a+o)%1;return s},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb(),i=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/i,g:(n.g*n.a+r.g*r.a*(1-n.a))/i,b:(n.b*n.a+r.b*r.a*(1-n.a))/i,a:i})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],a=360/t,s=1;s<t;s++)i.push(new e({h:(r+s*a)%360,s:n.s,l:n.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}(),i0=2,OR=.16,EQ=.05,PQ=.05,TQ=.15,L6=5,F6=4,kQ=[{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 AR(e){var t=e.r,n=e.g,r=e.b,i=cb(t,n,r);return{h:i.h*360,s:i.s,v:i.v}}function o0(e){var t=e.r,n=e.g,r=e.b;return"#".concat(db(t,n,r,!1))}function IQ(e,t,n){var r=n/100,i={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return i}function NR(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-i0*t:Math.round(e.h)+i0*t:r=n?Math.round(e.h)+i0*t:Math.round(e.h)-i0*t,r<0?r+=360:r>=360&&(r-=360),r}function LR(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-OR*t:t===F6?r=e.s+OR:r=e.s+EQ*t,r>1&&(r=1),n&&t===L6&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function FR(e,t,n){var r;return n?r=e.v+PQ*t:r=e.v-TQ*t,r>1&&(r=1),Number(r.toFixed(2))}function Sg(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=Ts(e),i=L6;i>0;i-=1){var a=AR(r),s=o0(Ts({h:NR(a,i,!0),s:LR(a,i,!0),v:FR(a,i,!0)}));n.push(s)}n.push(o0(r));for(var o=1;o<=F6;o+=1){var c=AR(r),f=o0(Ts({h:NR(c,o),s:LR(c,o),v:FR(c,o)}));n.push(f)}return t.theme==="dark"?kQ.map(function(p){var g=p.index,v=p.opacity,b=o0(IQ(Ts(t.backgroundColor||"#141414"),Ts(n[g]),v*100));return b}):n}var nh={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"},RC={},DC={};Object.keys(nh).forEach(function(e){RC[e]=Sg(nh[e]),RC[e].primary=RC[e][5],DC[e]=Sg(nh[e],{theme:"dark",backgroundColor:"#141414"}),DC[e].primary=DC[e][5]});function ko(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function xd(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}var zR="data-rc-order",MQ="rc-util-key",m4=new Map;function z6(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):MQ}function B_(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function RQ(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function $6(e){return Array.from((m4.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function B6(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!ko())return null;var n=t.csp,r=t.prepend,i=document.createElement("style");i.setAttribute(zR,RQ(r)),n!=null&&n.nonce&&(i.nonce=n==null?void 0:n.nonce),i.innerHTML=e;var a=B_(t),s=a.firstChild;if(r){if(r==="queue"){var o=$6(a).filter(function(c){return["prepend","prependQueue"].includes(c.getAttribute(zR))});if(o.length)return a.insertBefore(i,o[o.length-1].nextSibling),i}a.insertBefore(i,s)}else a.appendChild(i);return i}function V6(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=B_(t);return $6(n).find(function(r){return r.getAttribute(z6(t))===e})}function $R(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=V6(e,t);if(n){var r=B_(t);r.removeChild(n)}}function DQ(e,t){var n=m4.get(e);if(!n||!xd(document,n)){var r=B6("",t),i=r.parentNode;m4.set(e,i),e.removeChild(r)}}function ev(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=B_(n);DQ(r,n);var i=V6(t,n);if(i){var a,s;if((a=n.csp)!==null&&a!==void 0&&a.nonce&&i.nonce!==((s=n.csp)===null||s===void 0?void 0:s.nonce)){var o;i.nonce=(o=n.csp)===null||o===void 0?void 0:o.nonce}return i.innerHTML!==e&&(i.innerHTML=e),i}var c=B6(e,n);return c.setAttribute(z6(n),t),c}function OQ(e,t){Nr(e,"[@ant-design/icons] ".concat(t))}function BR(e){return on(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(on(e.icon)==="object"||typeof e.icon=="function")}function VR(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:t[n]=r}return t},{})}function g4(e,t,n){return n?Un.createElement(e.tag,fe(fe({key:t},VR(e.attrs)),n),(e.children||[]).map(function(r,i){return g4(r,"".concat(t,"-").concat(e.tag,"-").concat(i))})):Un.createElement(e.tag,fe({key:t},VR(e.attrs)),(e.children||[]).map(function(r,i){return g4(r,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function U6(e){return Sg(e)[0]}function j6(e){return e?Array.isArray(e)?e:[e]:[]}var AQ=`
.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);
}
}
`,NQ=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:AQ,n=E.exports.useContext(ZP),r=n.csp;E.exports.useEffect(function(){ev(t,"@ant-design-icons",{prepend:!0,csp:r})},[])},LQ=["icon","className","onClick","style","primaryColor","secondaryColor"],Wm={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function FQ(e){var t=e.primaryColor,n=e.secondaryColor;Wm.primaryColor=t,Wm.secondaryColor=n||U6(t),Wm.calculated=!!n}function zQ(){return fe({},Wm)}var V_=function(t){var n=t.icon,r=t.className,i=t.onClick,a=t.style,s=t.primaryColor,o=t.secondaryColor,c=In(t,LQ),f=Wm;if(s&&(f={primaryColor:s,secondaryColor:o||U6(s)}),NQ(),OQ(BR(n),"icon should be icon definiton, but got ".concat(n)),!BR(n))return null;var p=n;return p&&typeof p.icon=="function"&&(p=fe(fe({},p),{},{icon:p.icon(f.primaryColor,f.secondaryColor)})),g4(p.icon,"svg-".concat(p.name),fe({className:r,onClick:i,style:a,"data-icon":p.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},c))};V_.displayName="IconReact";V_.getTwoToneColors=zQ;V_.setTwoToneColors=FQ;const tT=V_;function H6(e){var t=j6(e),n=$e(t,2),r=n[0],i=n[1];return tT.setTwoToneColors({primaryColor:r,secondaryColor:i})}function $Q(){var e=tT.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var BQ=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];H6("#1890ff");var U_=E.exports.forwardRef(function(e,t){var n,r=e.className,i=e.icon,a=e.spin,s=e.rotate,o=e.tabIndex,c=e.onClick,f=e.twoToneColor,p=In(e,BQ),g=E.exports.useContext(ZP),v=g.prefixCls,b=v===void 0?"anticon":v,_=g.rootClassName,T=He(_,b,(n={},ae(n,"".concat(b,"-").concat(i.name),!!i.name),ae(n,"".concat(b,"-spin"),!!a||i.name==="loading"),n),r),k=o;k===void 0&&c&&(k=-1);var P=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,M=j6(f),O=$e(M,2),N=O[0],L=O[1];return A("span",{...fe(fe({role:"img","aria-label":i.name},p),{},{ref:t,tabIndex:k,onClick:c,className:T}),children:A(tT,{icon:i,primaryColor:N,secondaryColor:L,style:P})})});U_.displayName="AntdIcon";U_.getTwoToneColor=$Q;U_.setTwoToneColor=H6;const Yn=U_;var K6=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:hQ})})};K6.displayName="CheckCircleFilled";const nT=E.exports.forwardRef(K6);var VQ={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 UQ=VQ;var W6=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:UQ})})};W6.displayName="CloseCircleFilled";const zh=E.exports.forwardRef(W6);var jQ={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 HQ=jQ;var G6=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:HQ})})};G6.displayName="ExclamationCircleFilled";const q6=E.exports.forwardRef(G6);var KQ={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 WQ=KQ;var Z6=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:WQ})})};Z6.displayName="InfoCircleFilled";const X6=E.exports.forwardRef(Z6);var GQ={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 Y6=GQ;var Q6=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:Y6})})};Q6.displayName="LoadingOutlined";const Id=E.exports.forwardRef(Q6);var tv=fe({},YG),qQ=tv.version,ZQ=tv.render,XQ=tv.unmountComponentAtNode,j_;try{var YQ=Number((qQ||"").split(".")[0]);YQ>=18&&(j_=tv.createRoot)}catch{}function UR(e){var t=tv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&on(t)==="object"&&(t.usingClientEntryPoint=e)}var fb="__rc_react_root__";function QQ(e,t){UR(!0);var n=t[fb]||j_(t);UR(!1),n.render(e),t[fb]=n}function JQ(e,t){ZQ(e,t)}function J6(e,t){if(j_){QQ(e,t);return}JQ(e,t)}function eJ(e){return v4.apply(this,arguments)}function v4(){return v4=dc(Li().mark(function e(t){return Li().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.resolve().then(function(){var i;(i=t[fb])===null||i===void 0||i.unmount(),delete t[fb]}));case 1:case"end":return r.stop()}},e)})),v4.apply(this,arguments)}function tJ(e){XQ(e)}function e$(e){return y4.apply(this,arguments)}function y4(){return y4=dc(Li().mark(function e(t){return Li().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(j_===void 0){r.next=2;break}return r.abrupt("return",eJ(t));case 2:tJ(t);case 3:case"end":return r.stop()}},e)})),y4.apply(this,arguments)}function jR(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}function nJ(e,t){var n={animationend:jR("Animation","AnimationEnd"),transitionend:jR("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}var rJ=nJ(ko(),typeof window<"u"?window:{}),t$={};if(ko()){var iJ=document.createElement("div");t$=iJ.style}var a0={};function n$(e){if(a0[e])return a0[e];var t=rJ[e];if(t)for(var n=Object.keys(t),r=n.length,i=0;i<r;i+=1){var a=n[i];if(Object.prototype.hasOwnProperty.call(t,a)&&a in t$)return a0[e]=t[a],a0[e]}return""}var r$=n$("animationend"),i$=n$("transitionend"),o$=!!(r$&&i$),HR=r$||"animationend",KR=i$||"transitionend";function WR(e,t){if(!e)return null;if(on(e)==="object"){var n=t.replace(/-\w/g,function(r){return r[1].toUpperCase()});return e[n]}return"".concat(e,"-").concat(t)}var Rf="none",s0="appear",l0="enter",u0="leave",GR="none",Fl="prepare",Kf="start",Wf="active",rT="end";function Wl(e){var t=E.exports.useRef(!1),n=E.exports.useState(e),r=$e(n,2),i=r[0],a=r[1];E.exports.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]);function s(o,c){c&&t.current||a(o)}return[i,s]}var a$=function(t){return+setTimeout(t,16)},s$=function(t){return clearTimeout(t)};typeof window<"u"&&"requestAnimationFrame"in window&&(a$=function(t){return window.requestAnimationFrame(t)},s$=function(t){return window.cancelAnimationFrame(t)});var qR=0,iT=new Map;function l$(e){iT.delete(e)}var ur=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;qR+=1;var r=qR;function i(a){if(a===0)l$(r),t();else{var s=a$(function(){i(a-1)});iT.set(r,s)}}return i(n),r};ur.cancel=function(e){var t=iT.get(e);return l$(t),s$(t)};const oJ=function(){var e=E.exports.useRef(null);function t(){ur.cancel(e.current)}function n(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var a=ur(function(){i<=1?r({isCanceled:function(){return a!==e.current}}):n(r,i-1)});e.current=a}return E.exports.useEffect(function(){return function(){t()}},[]),[n,t]};var u$=ko()?E.exports.useLayoutEffect:E.exports.useEffect,ZR=[Fl,Kf,Wf,rT],c$=!1,aJ=!0;function d$(e){return e===Wf||e===rT}const sJ=function(e,t){var n=Wl(GR),r=$e(n,2),i=r[0],a=r[1],s=oJ(),o=$e(s,2),c=o[0],f=o[1];function p(){a(Fl,!0)}return u$(function(){if(i!==GR&&i!==rT){var g=ZR.indexOf(i),v=ZR[g+1],b=t(i);b===c$?a(v,!0):c(function(_){function T(){_.isCanceled()||a(v,!0)}b===!0?T():Promise.resolve(b).then(T)})}},[e,i]),E.exports.useEffect(function(){return function(){f()}},[]),[p,i]},lJ=function(e){var t=E.exports.useRef(),n=E.exports.useRef(e);n.current=e;var r=E.exports.useCallback(function(s){n.current(s)},[]);function i(s){s&&(s.removeEventListener(KR,r),s.removeEventListener(HR,r))}function a(s){t.current&&t.current!==s&&i(t.current),s&&s!==t.current&&(s.addEventListener(KR,r),s.addEventListener(HR,r),t.current=s)}return E.exports.useEffect(function(){return function(){i(t.current)}},[]),[a,i]};function uJ(e,t,n,r){var i=r.motionEnter,a=i===void 0?!0:i,s=r.motionAppear,o=s===void 0?!0:s,c=r.motionLeave,f=c===void 0?!0:c,p=r.motionDeadline,g=r.motionLeaveImmediately,v=r.onAppearPrepare,b=r.onEnterPrepare,_=r.onLeavePrepare,T=r.onAppearStart,k=r.onEnterStart,P=r.onLeaveStart,M=r.onAppearActive,O=r.onEnterActive,N=r.onLeaveActive,L=r.onAppearEnd,$=r.onEnterEnd,j=r.onLeaveEnd,U=r.onVisibleChanged,G=Wl(),Z=$e(G,2),Q=Z[0],J=Z[1],re=Wl(Rf),ne=$e(re,2),ge=ne[0],ie=ne[1],ue=Wl(null),oe=$e(ue,2),me=oe[0],Te=oe[1],we=E.exports.useRef(!1),be=E.exports.useRef(null);function Re(){return n()}var Ee=E.exports.useRef(!1);function Me(yt){var kt=Re();if(!(yt&&!yt.deadline&&yt.target!==kt)){var et=Ee.current,ut;ge===s0&&et?ut=L==null?void 0:L(kt,yt):ge===l0&&et?ut=$==null?void 0:$(kt,yt):ge===u0&&et&&(ut=j==null?void 0:j(kt,yt)),ge!==Rf&&et&&ut!==!1&&(ie(Rf,!0),Te(null,!0))}}var Ae=lJ(Me),Fe=$e(Ae,1),We=Fe[0],je=E.exports.useMemo(function(){var yt,kt,et;switch(ge){case s0:return yt={},ae(yt,Fl,v),ae(yt,Kf,T),ae(yt,Wf,M),yt;case l0:return kt={},ae(kt,Fl,b),ae(kt,Kf,k),ae(kt,Wf,O),kt;case u0:return et={},ae(et,Fl,_),ae(et,Kf,P),ae(et,Wf,N),et;default:return{}}},[ge]),pt=sJ(ge,function(yt){if(yt===Fl){var kt=je[Fl];return kt?kt(Re()):c$}if(Ze in je){var et;Te(((et=je[Ze])===null||et===void 0?void 0:et.call(je,Re(),null))||null)}return Ze===Wf&&(We(Re()),p>0&&(clearTimeout(be.current),be.current=setTimeout(function(){Me({deadline:!0})},p))),aJ}),gt=$e(pt,2),Ot=gt[0],Ze=gt[1],St=d$(Ze);Ee.current=St,u$(function(){J(t);var yt=we.current;if(we.current=!0,!!e){var kt;!yt&&t&&o&&(kt=s0),yt&&t&&a&&(kt=l0),(yt&&!t&&f||!yt&&g&&!t&&f)&&(kt=u0),kt&&(ie(kt),Ot())}},[t]),E.exports.useEffect(function(){(ge===s0&&!o||ge===l0&&!a||ge===u0&&!f)&&ie(Rf)},[o,a,f]),E.exports.useEffect(function(){return function(){we.current=!1,clearTimeout(be.current)}},[]);var ot=E.exports.useRef(!1);E.exports.useEffect(function(){Q&&(ot.current=!0),Q!==void 0&&ge===Rf&&((ot.current||Q)&&(U==null||U(Q)),ot.current=!0)},[Q,ge]);var vt=me;return je[Fl]&&Ze===Kf&&(vt=fe({transition:"none"},vt)),[ge,Ze,vt,Q!=null?Q:t]}var cJ=function(e){ai(n,e);var t=si(n);function n(){return Ur(this,n),t.apply(this,arguments)}return jr(n,[{key:"render",value:function(){return this.props.children}}]),n}(E.exports.Component);function dJ(e){var t=e;on(e)==="object"&&(t=e.transitionSupport);function n(i){return!!(i.motionName&&t)}var r=E.exports.forwardRef(function(i,a){var s=i.visible,o=s===void 0?!0:s,c=i.removeOnLeave,f=c===void 0?!0:c,p=i.forceRender,g=i.children,v=i.motionName,b=i.leavedClassName,_=i.eventProps,T=n(i),k=E.exports.useRef(),P=E.exports.useRef();function M(){try{return k.current instanceof HTMLElement?k.current:_g(P.current)}catch{return null}}var O=uJ(T,o,M,i),N=$e(O,4),L=N[0],$=N[1],j=N[2],U=N[3],G=E.exports.useRef(U);U&&(G.current=!0);var Z=E.exports.useCallback(function(ue){k.current=ue,ab(a,ue)},[a]),Q,J=fe(fe({},_),{},{visible:o});if(!g)Q=null;else if(L===Rf||!n(i))U?Q=g(fe({},J),Z):!f&&G.current&&b?Q=g(fe(fe({},J),{},{className:b}),Z):p||!f&&!b?Q=g(fe(fe({},J),{},{style:{display:"none"}}),Z):Q=null;else{var re,ne;$===Fl?ne="prepare":d$($)?ne="active":$===Kf&&(ne="start"),Q=g(fe(fe({},J),{},{className:He(WR(v,L),(re={},ae(re,WR(v,"".concat(L,"-").concat(ne)),ne),ae(re,v,typeof v=="string"),re)),style:j}),Z)}if(E.exports.isValidElement(Q)&&Lh(Q)){var ge=Q,ie=ge.ref;ie||(Q=E.exports.cloneElement(Q,{ref:Z}))}return A(cJ,{ref:P,children:Q})});return r.displayName="CSSMotion",r}const sa=dJ(o$);var x4="add",b4="keep",_4="remove",OC="removed";function fJ(e){var t;return e&&on(e)==="object"&&"key"in e?t=e:t={key:e},fe(fe({},t),{},{key:String(t.key)})}function w4(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(fJ)}function hJ(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,i=t.length,a=w4(e),s=w4(t);a.forEach(function(f){for(var p=!1,g=r;g<i;g+=1){var v=s[g];if(v.key===f.key){r<g&&(n=n.concat(s.slice(r,g).map(function(b){return fe(fe({},b),{},{status:x4})})),r=g),n.push(fe(fe({},v),{},{status:b4})),r+=1,p=!0;break}}p||n.push(fe(fe({},f),{},{status:_4}))}),r<i&&(n=n.concat(s.slice(r).map(function(f){return fe(fe({},f),{},{status:x4})})));var o={};n.forEach(function(f){var p=f.key;o[p]=(o[p]||0)+1});var c=Object.keys(o).filter(function(f){return o[f]>1});return c.forEach(function(f){n=n.filter(function(p){var g=p.key,v=p.status;return g!==f||v!==_4}),n.forEach(function(p){p.key===f&&(p.status=b4)})}),n}var pJ=["component","children","onVisibleChanged","onAllRemoved"],mJ=["status"],gJ=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function vJ(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:sa,n=function(r){ai(a,r);var i=si(a);function a(){var s;Ur(this,a);for(var o=arguments.length,c=new Array(o),f=0;f<o;f++)c[f]=arguments[f];return s=i.call.apply(i,[this].concat(c)),ae(zn(s),"state",{keyEntities:[]}),ae(zn(s),"removeKey",function(p){var g=s.state.keyEntities,v=g.map(function(b){return b.key!==p?b:fe(fe({},b),{},{status:OC})});return s.setState({keyEntities:v}),v.filter(function(b){var _=b.status;return _!==OC}).length}),s}return jr(a,[{key:"render",value:function(){var o=this,c=this.state.keyEntities,f=this.props,p=f.component,g=f.children,v=f.onVisibleChanged,b=f.onAllRemoved,_=In(f,pJ),T=p||E.exports.Fragment,k={};return gJ.forEach(function(P){k[P]=_[P],delete _[P]}),delete _.keys,A(T,{..._,children:c.map(function(P){var M=P.status,O=In(P,mJ),N=M===x4||M===b4;return E.exports.createElement(t,{...k,key:O.key,visible:N,eventProps:O,onVisibleChanged:function($){if(v==null||v($,{key:O.key}),!$){var j=o.removeKey(O.key);j===0&&b&&b()}}},g)})})}}],[{key:"getDerivedStateFromProps",value:function(o,c){var f=o.keys,p=c.keyEntities,g=w4(f),v=hJ(p,g);return{keyEntities:v.filter(function(b){var _=p.find(function(T){var k=T.key;return b.key===k});return!(_&&_.status===OC&&b.status===_4)})}}}]),a}(E.exports.Component);return ae(n,"defaultProps",{component:"div"}),n}const f$=vJ(o$);var oT=function(e){ai(n,e);var t=si(n);function n(){var r;Ur(this,n);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),r.closeTimer=null,r.close=function(o){o&&o.stopPropagation(),r.clearCloseTimer();var c=r.props,f=c.onClose,p=c.noticeKey;f&&f(p)},r.startCloseTimer=function(){r.props.duration&&(r.closeTimer=window.setTimeout(function(){r.close()},r.props.duration*1e3))},r.clearCloseTimer=function(){r.closeTimer&&(clearTimeout(r.closeTimer),r.closeTimer=null)},r}return jr(n,[{key:"componentDidMount",value:function(){this.startCloseTimer()}},{key:"componentDidUpdate",value:function(i){(this.props.duration!==i.duration||this.props.updateMark!==i.updateMark||this.props.visible!==i.visible&&this.props.visible)&&this.restartCloseTimer()}},{key:"componentWillUnmount",value:function(){this.clearCloseTimer()}},{key:"restartCloseTimer",value:function(){this.clearCloseTimer(),this.startCloseTimer()}},{key:"render",value:function(){var i=this,a=this.props,s=a.prefixCls,o=a.className,c=a.closable,f=a.closeIcon,p=a.style,g=a.onClick,v=a.children,b=a.holder,_="".concat(s,"-notice"),T=Object.keys(this.props).reduce(function(P,M){return(M.substr(0,5)==="data-"||M.substr(0,5)==="aria-"||M==="role")&&(P[M]=i.props[M]),P},{}),k=it("div",{className:He(_,o,ae({},"".concat(_,"-closable"),c)),style:p,onMouseEnter:this.clearCloseTimer,onMouseLeave:this.startCloseTimer,onClick:g,...T,children:[A("div",{className:"".concat(_,"-content"),children:v}),c?A("a",{tabIndex:0,onClick:this.close,className:"".concat(_,"-close"),children:f||A("span",{className:"".concat(_,"-close-x")})}):null]});return b?oc.createPortal(k,b):k}}]),n}(E.exports.Component);oT.defaultProps={onClose:function(){},duration:1.5};function aT(e){var t=E.exports.useRef({}),n=E.exports.useState([]),r=$e(n,2),i=r[0],a=r[1];function s(o){var c=!0;e.add(o,function(f,p){var g=p.key;if(f&&(!t.current[g]||c)){var v=A(oT,{...p,holder:f});t.current[g]=v,a(function(b){var _=b.findIndex(function(k){return k.key===p.key});if(_===-1)return[].concat(Rt(b),[v]);var T=Rt(b);return T[_]=v,T})}c=!1})}return[s,A(nr,{children:i})]}var yJ=["getContainer"],XR=0,xJ=Date.now();function YR(){var e=XR;return XR+=1,"rcNotification_".concat(xJ,"_").concat(e)}var xh=function(e){ai(n,e);var t=si(n);function n(){var r;Ur(this,n);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),r.state={notices:[]},r.hookRefs=new Map,r.add=function(o,c){var f,p=(f=o.key)!==null&&f!==void 0?f:YR(),g=fe(fe({},o),{},{key:p}),v=r.props.maxCount;r.setState(function(b){var _=b.notices,T=_.map(function(P){return P.notice.key}).indexOf(p),k=_.concat();return T!==-1?k.splice(T,1,{notice:g,holderCallback:c}):(v&&_.length>=v&&(g.key=k[0].notice.key,g.updateMark=YR(),g.userPassKey=p,k.shift()),k.push({notice:g,holderCallback:c})),{notices:k}})},r.remove=function(o){r.setState(function(c){var f=c.notices;return{notices:f.filter(function(p){var g=p.notice,v=g.key,b=g.userPassKey,_=b!=null?b:v;return _!==o})}})},r.noticePropsMap={},r}return jr(n,[{key:"getTransitionName",value:function(){var i=this.props,a=i.prefixCls,s=i.animation,o=this.props.transitionName;return!o&&s&&(o="".concat(a,"-").concat(s)),o}},{key:"render",value:function(){var i=this,a=this.state.notices,s=this.props,o=s.prefixCls,c=s.className,f=s.closeIcon,p=s.style,g=[];return a.forEach(function(v,b){var _=v.notice,T=v.holderCallback,k=b===a.length-1?_.updateMark:void 0,P=_.key,M=_.userPassKey,O=fe(fe(fe({prefixCls:o,closeIcon:f},_),_.props),{},{key:P,noticeKey:M||P,updateMark:k,onClose:function(L){var $;i.remove(L),($=_.onClose)===null||$===void 0||$.call(_)},onClick:_.onClick,children:_.content});g.push(P),i.noticePropsMap[P]={props:O,holderCallback:T}}),A("div",{className:He(o,c),style:p,children:A(f$,{keys:g,motionName:this.getTransitionName(),onVisibleChanged:function(b,_){var T=_.key;b||delete i.noticePropsMap[T]},children:function(v){var b=v.key,_=v.className,T=v.style,k=v.visible,P=i.noticePropsMap[b],M=P.props,O=P.holderCallback;return O?A("div",{className:He(_,"".concat(o,"-hook-holder")),style:fe({},T),ref:function(L){typeof b>"u"||(L?(i.hookRefs.set(b,L),O(L,M)):i.hookRefs.delete(b))}},b):A(oT,{...M,className:He(_,M==null?void 0:M.className),style:fe(fe({},T),M==null?void 0:M.style),visible:k})}})})}}]),n}(E.exports.Component);xh.newInstance=void 0;xh.defaultProps={prefixCls:"rc-notification",animation:"fade",style:{top:65,left:"50%"}};xh.newInstance=function(t,n){var r=t||{},i=r.getContainer,a=In(r,yJ),s=document.createElement("div");if(i){var o=i();o.appendChild(s)}else document.body.appendChild(s);var c=!1;function f(p){c||(c=!0,n({notice:function(v){p.add(v)},removeNotice:function(v){p.remove(v)},component:p,destroy:function(){e$(s),s.parentNode&&s.parentNode.removeChild(s)},useNotification:function(){return aT(p)}}))}J6(A(xh,{...a,ref:f}),s)};function bJ(e,t){var n=function(){var i,a,s=null,o={add:function(T,k){s==null||s.component.add(T,k)}},c=aT(o),f=$e(c,2),p=f[0],g=f[1];function v(_){var T=_.prefixCls,k=i("message",T),P=i(),M=_.key||b$(),O=new Promise(function(L){var $=function(){return typeof _.onClose=="function"&&_.onClose(),L(!0)};e(Be(Be({},_),{prefixCls:k,rootPrefixCls:P,getPopupContainer:a}),function(j){var U=j.prefixCls,G=j.instance;s=G,p(t(Be(Be({},_),{key:M,onClose:$}),U))})}),N=function(){s&&s.removeNotice(M)};return N.then=function(L,$){return O.then(L,$)},N.promise=O,N}var b=E.exports.useRef({});return b.current.open=v,C$.forEach(function(_){return E$(b.current,_)}),[b.current,A(Ud,{children:function(_){return i=_.getPrefixCls,a=_.getPopupContainer,g}},"holder")]};return n}var Vo,h$=3,p$,_J=1,m$="",C4="move-up",g$=!1,v$,y$,x$=!1;function b$(){return _J++}function wJ(e){e.top!==void 0&&(p$=e.top,Vo=null),e.duration!==void 0&&(h$=e.duration),e.prefixCls!==void 0&&(m$=e.prefixCls),e.getContainer!==void 0&&(v$=e.getContainer,Vo=null),e.transitionName!==void 0&&(C4=e.transitionName,Vo=null,g$=!0),e.maxCount!==void 0&&(y$=e.maxCount,Vo=null),e.rtl!==void 0&&(x$=e.rtl)}function _$(e,t){var n=e.prefixCls,r=e.getPopupContainer,i=cT(),a=i.getPrefixCls,s=i.getRootPrefixCls,o=i.getIconPrefixCls,c=a("message",n||m$),f=s(e.rootPrefixCls,c),p=o();if(Vo){t({prefixCls:c,rootPrefixCls:f,iconPrefixCls:p,instance:Vo});return}var g={prefixCls:c,transitionName:g$?C4:"".concat(f,"-").concat(C4),style:{top:p$},getContainer:v$||r,maxCount:y$};xh.newInstance(g,function(v){if(Vo){t({prefixCls:c,rootPrefixCls:f,iconPrefixCls:p,instance:Vo});return}Vo=v,t({prefixCls:c,rootPrefixCls:f,iconPrefixCls:p,instance:v})})}var w$={info:X6,success:nT,error:zh,warning:q6,loading:Id},C$=Object.keys(w$);function S$(e,t,n){var r,i=e.duration!==void 0?e.duration:h$,a=w$[e.type],s=He("".concat(t,"-custom-content"),(r={},ae(r,"".concat(t,"-").concat(e.type),e.type),ae(r,"".concat(t,"-rtl"),x$===!0),r));return{key:e.key,duration:i,style:e.style||{},className:e.className,content:A(Bh,{iconPrefixCls:n,children:it("div",{className:s,children:[e.icon||a&&A(a,{}),A("span",{children:e.content})]})}),onClose:e.onClose,onClick:e.onClick}}function CJ(e){var t=e.key||b$(),n=new Promise(function(i){var a=function(){return typeof e.onClose=="function"&&e.onClose(),i(!0)};_$(e,function(s){var o=s.prefixCls,c=s.iconPrefixCls,f=s.instance;f.notice(S$(Be(Be({},e),{key:t,onClose:a}),o,c))})}),r=function(){var a;Vo&&(Vo.removeNotice(t),(a=e.onClose)===null||a===void 0||a.call(e))};return r.then=function(i,a){return n.then(i,a)},r.promise=n,r}function SJ(e){return Object.prototype.toString.call(e)==="[object Object]"&&!!e.content}var Eg={open:CJ,config:wJ,destroy:function(t){if(Vo)if(t){var n=Vo,r=n.removeNotice;r(t)}else{var i=Vo,a=i.destroy;a(),Vo=null}}};function E$(e,t){e[t]=function(n,r,i){return SJ(n)?e.open(Be(Be({},n),{type:t})):(typeof r=="function"&&(i=r,r=void 0),e.open({content:n,duration:r,type:t,onClose:i}))}}C$.forEach(function(e){return E$(Eg,e)});Eg.warn=Eg.warning;Eg.useMessage=bJ(_$,S$);const EJ=Eg;var PJ={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 TJ=PJ;var P$=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:TJ})})};P$.displayName="CheckCircleOutlined";const sT=E.exports.forwardRef(P$);var kJ={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 IJ=kJ;var T$=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:IJ})})};T$.displayName="CloseCircleOutlined";const lT=E.exports.forwardRef(T$);var MJ={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 RJ=MJ;var k$=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:RJ})})};k$.displayName="CloseOutlined";const $h=E.exports.forwardRef(k$);var DJ={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 OJ=DJ;var I$=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:OJ})})};I$.displayName="ExclamationCircleOutlined";const H_=E.exports.forwardRef(I$);var AJ={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 NJ=AJ;var M$=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:NJ})})};M$.displayName="InfoCircleOutlined";const uT=E.exports.forwardRef(M$);function LJ(e,t){var n=function(){var i,a=null,s={add:function(_,T){a==null||a.component.add(_,T)}},o=aT(s),c=$e(o,2),f=c[0],p=c[1];function g(b){var _=b.prefixCls,T=i("notification",_);e(Be(Be({},b),{prefixCls:T}),function(k){var P=k.prefixCls,M=k.instance;a=M,f(t(b,P))})}var v=E.exports.useRef({});return v.current.open=g,["success","info","warning","error"].forEach(function(b){v.current[b]=function(_){return v.current.open(Be(Be({},_),{type:b}))}}),[v.current,A(Ud,{children:function(b){return i=b.getPrefixCls,p}},"holder")]};return n}globalThis&&globalThis.__awaiter;var od={},R$=4.5,D$=24,O$=24,A$="",S4="topRight",N$,L$,F$=!1,z$;function FJ(e){var t=e.duration,n=e.placement,r=e.bottom,i=e.top,a=e.getContainer,s=e.closeIcon,o=e.prefixCls;o!==void 0&&(A$=o),t!==void 0&&(R$=t),n!==void 0?S4=n:e.rtl&&(S4="topLeft"),r!==void 0&&(O$=r),i!==void 0&&(D$=i),a!==void 0&&(N$=a),s!==void 0&&(L$=s),e.rtl!==void 0&&(F$=e.rtl),e.maxCount!==void 0&&(z$=e.maxCount)}function zJ(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:D$,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:O$,r;switch(e){case"top":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:t,bottom:"auto"};break;case"topLeft":r={left:0,top:t,bottom:"auto"};break;case"topRight":r={right:0,top:t,bottom:"auto"};break;case"bottom":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:n};break;case"bottomLeft":r={left:0,top:"auto",bottom:n};break;default:r={right:0,top:"auto",bottom:n};break}return r}function $$(e,t){var n=e.placement,r=n===void 0?S4:n,i=e.top,a=e.bottom,s=e.getContainer,o=s===void 0?N$:s,c=e.prefixCls,f=cT(),p=f.getPrefixCls,g=f.getIconPrefixCls,v=p("notification",c||A$),b=g(),_="".concat(v,"-").concat(r),T=od[_];if(T){Promise.resolve(T).then(function(P){t({prefixCls:"".concat(v,"-notice"),iconPrefixCls:b,instance:P})});return}var k=He("".concat(v,"-").concat(r),ae({},"".concat(v,"-rtl"),F$===!0));od[_]=new Promise(function(P){xh.newInstance({prefixCls:v,className:k,style:zJ(r,i,a),getContainer:o,maxCount:z$},function(M){P(M),t({prefixCls:"".concat(v,"-notice"),iconPrefixCls:b,instance:M})})})}var $J={success:sT,info:uT,error:lT,warning:H_};function B$(e,t,n){var r=e.duration,i=e.icon,a=e.type,s=e.description,o=e.message,c=e.btn,f=e.onClose,p=e.onClick,g=e.key,v=e.style,b=e.className,_=e.closeIcon,T=_===void 0?L$:_,k=e.props,P=r===void 0?R$:r,M=null;i?M=A("span",{className:"".concat(t,"-icon"),children:e.icon}):a&&(M=E.exports.createElement($J[a]||null,{className:"".concat(t,"-icon ").concat(t,"-icon-").concat(a)}));var O=A("span",{className:"".concat(t,"-close-x"),children:T||A($h,{className:"".concat(t,"-close-icon")})}),N=!s&&M?A("span",{className:"".concat(t,"-message-single-line-auto-margin")}):null;return{content:A(Bh,{iconPrefixCls:n,children:it("div",{className:M?"".concat(t,"-with-icon"):"",role:"alert",children:[M,it("div",{className:"".concat(t,"-message"),children:[N,o]}),A("div",{className:"".concat(t,"-description"),children:s}),c?A("span",{className:"".concat(t,"-btn"),children:c}):null]})}),duration:P,closable:!0,closeIcon:O,onClose:f,onClick:p,key:g,style:v||{},className:He(b,ae({},"".concat(t,"-").concat(a),!!a)),props:k}}function BJ(e){$$(e,function(t){var n=t.prefixCls,r=t.iconPrefixCls,i=t.instance;i.notice(B$(e,n,r))})}var bh={open:BJ,close:function(t){Object.keys(od).forEach(function(n){return Promise.resolve(od[n]).then(function(r){r.removeNotice(t)})})},config:FJ,destroy:function(){Object.keys(od).forEach(function(t){Promise.resolve(od[t]).then(function(n){n.destroy()}),delete od[t]})}};["success","info","warning","error"].forEach(function(e){bh[e]=function(t){return bh.open(Be(Be({},t),{type:e}))}});bh.warn=bh.warning;bh.useNotification=LJ($$,B$);const VJ=bh;var UJ=function(t,n){return n||(t?"ant-".concat(t):"ant")},Fn=E.exports.createContext({getPrefixCls:UJ}),Ud=Fn.Consumer,jJ="-ant-".concat(Date.now(),"-").concat(Math.random());function HJ(e,t){var n={},r=function(p,g){var v=p.clone();return v=(g==null?void 0:g(v))||v,v.toRgbString()},i=function(p,g){var v=new MC(p),b=Sg(v.toRgbString());n["".concat(g,"-color")]=r(v),n["".concat(g,"-color-disabled")]=b[1],n["".concat(g,"-color-hover")]=b[4],n["".concat(g,"-color-active")]=b[6],n["".concat(g,"-color-outline")]=v.clone().setAlpha(.2).toRgbString(),n["".concat(g,"-color-deprecated-bg")]=b[0],n["".concat(g,"-color-deprecated-border")]=b[2]};if(t.primaryColor){i(t.primaryColor,"primary");var a=new MC(t.primaryColor),s=Sg(a.toRgbString());s.forEach(function(f,p){n["primary-".concat(p+1)]=f}),n["primary-color-deprecated-l-35"]=r(a,function(f){return f.lighten(35)}),n["primary-color-deprecated-l-20"]=r(a,function(f){return f.lighten(20)}),n["primary-color-deprecated-t-20"]=r(a,function(f){return f.tint(20)}),n["primary-color-deprecated-t-50"]=r(a,function(f){return f.tint(50)}),n["primary-color-deprecated-f-12"]=r(a,function(f){return f.setAlpha(f.getAlpha()*.12)});var o=new MC(s[0]);n["primary-color-active-deprecated-f-30"]=r(o,function(f){return f.setAlpha(f.getAlpha()*.3)}),n["primary-color-active-deprecated-d-02"]=r(o,function(f){return f.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 c=Object.keys(n).map(function(f){return"--".concat(e,"-").concat(f,": ").concat(n[f],";")});return`
:root {
`.concat(c.join(`
`),`
}
`).trim()}function KJ(e,t){var n=HJ(e,t);ko()&&ev(n,"".concat(jJ,"-dynamic-theme"))}var E4=E.exports.createContext(!1),WJ=function(t){var n=t.children,r=t.disabled,i=E.exports.useContext(E4);return A(E4.Provider,{value:r!=null?r:i,children:n})};const fc=E4;var P4=E.exports.createContext(void 0),GJ=function(t){var n=t.children,r=t.size;return A(P4.Consumer,{children:function(i){return A(P4.Provider,{value:r||i,children:n})}})};const nu=P4;var qJ=["getTargetContainer","getPopupContainer","renderEmpty","pageHeader","input","pagination","form"],ZJ="ant",XJ="anticon",hb,V$;function lx(){return hb||ZJ}function YJ(){return V$||XJ}var QJ=function(t){var n=t.prefixCls,r=t.iconPrefixCls,i=t.theme;n!==void 0&&(hb=n),r!==void 0&&(V$=r),i&&KJ(lx(),i)},cT=function(){return{getPrefixCls:function(n,r){return r||(n?"".concat(lx(),"-").concat(n):lx())},getIconPrefixCls:YJ,getRootPrefixCls:function(n,r){return n||hb||(r&&r.includes("-")?r.replace(/^(.*)-[^-]*$/,"$1"):lx())}}},JJ=function(t){var n,r,i=t.children,a=t.csp,s=t.autoInsertSpaceInButton,o=t.form,c=t.locale,f=t.componentSize,p=t.direction,g=t.space,v=t.virtual,b=t.dropdownMatchSelectWidth,_=t.legacyLocale,T=t.parentContext,k=t.iconPrefixCls,P=t.componentDisabled,M=E.exports.useCallback(function(U,G){var Z=t.prefixCls;if(G)return G;var Q=Z||T.getPrefixCls("");return U?"".concat(Q,"-").concat(U):Q},[T.getPrefixCls,t.prefixCls]),O=Be(Be({},T),{csp:a,autoInsertSpaceInButton:s,locale:c||_,direction:p,space:g,virtual:v,dropdownMatchSelectWidth:b,getPrefixCls:M});qJ.forEach(function(U){var G=t[U];G&&(O[U]=G)});var N=Yg(function(){return O},O,function(U,G){var Z=Object.keys(U),Q=Object.keys(G);return Z.length!==Q.length||Z.some(function(J){return U[J]!==G[J]})}),L=E.exports.useMemo(function(){return{prefixCls:k,csp:a}},[k,a]),$=i,j={};return c&&(j=((n=c.Form)===null||n===void 0?void 0:n.defaultValidateMessages)||((r=Os.Form)===null||r===void 0?void 0:r.defaultValidateMessages)||{}),o&&o.validateMessages&&(j=Be(Be({},j),o.validateMessages)),Object.keys(j).length>0&&($=A(R6,{validateMessages:j,children:i})),c&&($=A(uQ,{locale:c,_ANT_MARK__:sQ,children:$})),(k||a)&&($=A(ZP.Provider,{value:L,children:$})),f&&($=A(GJ,{size:f,children:$})),P!==void 0&&($=A(WJ,{disabled:P,children:$})),A(Fn.Provider,{value:N,children:$})},Bh=function(t){return E.exports.useEffect(function(){t.direction&&(EJ.config({rtl:t.direction==="rtl"}),VJ.config({rtl:t.direction==="rtl"}))},[t.direction]),A(Fh,{children:function(n,r,i){return A(Ud,{children:function(a){return A(JJ,{parentContext:a,legacyLocale:i,...t})}})}})};Bh.ConfigContext=Fn;Bh.SizeContext=nu;Bh.config=QJ;function Jo(e,t,n,r){var i=oc.unstable_batchedUpdates?function(s){oc.unstable_batchedUpdates(n,s)}:n;return e.addEventListener&&e.addEventListener(t,i,r),{remove:function(){e.removeEventListener&&e.removeEventListener(t,i,r)}}}function U$(e){return Object.keys(e).reduce(function(t,n){return(n.startsWith("data-")||n.startsWith("aria-")||n==="role")&&!n.startsWith("data-__")&&(t[n]=e[n]),t},{})}var Ia=E.exports.isValidElement;function j$(e){return e&&Ia(e)&&e.type===E.exports.Fragment}function H$(e,t,n){return Ia(e)?E.exports.cloneElement(e,typeof n=="function"?n(e.props||{}):n):t}function Ei(e,t){return H$(e,e,t)}var eee=function(e){ai(n,e);var t=si(n);function n(){var r;return Ur(this,n),r=t.apply(this,arguments),r.state={error:void 0,info:{componentStack:""}},r}return jr(n,[{key:"componentDidCatch",value:function(i,a){this.setState({error:i,info:a})}},{key:"render",value:function(){var i=this.props,a=i.message,s=i.description,o=i.children,c=this.state,f=c.error,p=c.info,g=p&&p.componentStack?p.componentStack:null,v=typeof a>"u"?(f||"").toString():a,b=typeof s>"u"?g:s;return f?A(W$,{type:"error",message:v,description:A("pre",{children:b})}):o}}]),n}(E.exports.Component);const tee=eee;var nee=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},ree={success:nT,info:X6,error:zh,warning:q6},iee={success:sT,info:uT,error:lT,warning:H_},oee=function(t){var n=t.description,r=t.icon,i=t.prefixCls,a=t.type,s=(n?iee:ree)[a]||null;return r?H$(r,A("span",{className:"".concat(i,"-icon"),children:r}),function(){return{className:He("".concat(i,"-icon"),ae({},r.props.className,r.props.className))}}):E.exports.createElement(s,{className:"".concat(i,"-icon")})},aee=function(t){var n=t.isClosable,r=t.closeText,i=t.prefixCls,a=t.closeIcon,s=t.handleClose;return n?A("button",{type:"button",onClick:s,className:"".concat(i,"-close-icon"),tabIndex:0,children:r?A("span",{className:"".concat(i,"-close-text"),children:r}):a}):null},K$=function(t){var n,r=t.description,i=t.prefixCls,a=t.message,s=t.banner,o=t.className,c=o===void 0?"":o,f=t.style,p=t.onMouseEnter,g=t.onMouseLeave,v=t.onClick,b=t.afterClose,_=t.showIcon,T=t.closable,k=t.closeText,P=t.closeIcon,M=P===void 0?A($h,{}):P,O=t.action,N=nee(t,["description","prefixCls","message","banner","className","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action"]),L=E.exports.useState(!1),$=$e(L,2),j=$[0],U=$[1],G=E.exports.useRef(),Z=E.exports.useContext(Fn),Q=Z.getPrefixCls,J=Z.direction,re=Q("alert",i),ne=function(be){var Re;U(!0),(Re=N.onClose)===null||Re===void 0||Re.call(N,be)},ge=function(){var be=N.type;return be!==void 0?be:s?"warning":"info"},ie=k?!0:T,ue=ge(),oe=s&&_===void 0?!0:_,me=He(re,"".concat(re,"-").concat(ue),(n={},ae(n,"".concat(re,"-with-description"),!!r),ae(n,"".concat(re,"-no-icon"),!oe),ae(n,"".concat(re,"-banner"),!!s),ae(n,"".concat(re,"-rtl"),J==="rtl"),n),c),Te=U$(N);return A(sa,{visible:!j,motionName:"".concat(re,"-motion"),motionAppear:!1,motionEnter:!1,onLeaveStart:function(be){return{maxHeight:be.offsetHeight}},onLeaveEnd:b,children:function(we){var be=we.className,Re=we.style;return it("div",{ref:G,"data-show":!j,className:He(me,be),style:Be(Be({},f),Re),onMouseEnter:p,onMouseLeave:g,onClick:v,role:"alert",...Te,children:[oe?A(oee,{description:r,icon:N.icon,prefixCls:re,type:ue}):null,it("div",{className:"".concat(re,"-content"),children:[a?A("div",{className:"".concat(re,"-message"),children:a}):null,r?A("div",{className:"".concat(re,"-description"),children:r}):null]}),O?A("div",{className:"".concat(re,"-action"),children:O}):null,A(aee,{isClosable:!!ie,closeText:k,prefixCls:re,closeIcon:M,handleClose:ne})]})}})};K$.ErrorBoundary=tee;const W$=K$;function T4(e){return e!=null&&e===e.window}function see(e,t){var n,r;if(typeof window>"u")return 0;var i=t?"scrollTop":"scrollLeft",a=0;return T4(e)?a=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?a=e.documentElement[i]:(e instanceof HTMLElement||e)&&(a=e[i]),e&&!T4(e)&&typeof a!="number"&&(a=(r=((n=e.ownerDocument)!==null&&n!==void 0?n:e).documentElement)===null||r===void 0?void 0:r[i]),a}function lee(e,t,n,r){var i=n-t;return e/=r/2,e<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t}function uee(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.getContainer,r=n===void 0?function(){return window}:n,i=t.callback,a=t.duration,s=a===void 0?450:a,o=r(),c=see(o,!0),f=Date.now(),p=function g(){var v=Date.now(),b=v-f,_=lee(b>s?s:b,c,e,s);T4(o)?o.scrollTo(window.pageXOffset,_):o instanceof Document||o.constructor.name==="HTMLDocument"?o.documentElement.scrollTop=_:o.scrollTop=_,b<s?ur(g):typeof i=="function"&&i()};ur(p)}function Pg(e){var t=E.exports.useRef();t.current=e;var n=E.exports.useCallback(function(){for(var r,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return(r=t.current)===null||r===void 0?void 0:r.call.apply(r,[t].concat(a))},[]);return n}var Ci=ko()?E.exports.useLayoutEffect:E.exports.useEffect,QR=function(t,n){var r=E.exports.useRef(!0);Ci(function(){if(!r.current)return t()},n),Ci(function(){return r.current=!1,function(){r.current=!0}},[])};function AC(e){return e!==void 0}function Si(e,t){var n=t||{},r=n.defaultValue,i=n.value,a=n.onChange,s=n.postState,o=Wl(function(){return AC(i)?i:AC(r)?typeof r=="function"?r():r:typeof e=="function"?e():e}),c=$e(o,2),f=c[0],p=c[1],g=i!==void 0?i:f,v=s?s(g):g,b=Pg(a),_=Wl([g]),T=$e(_,2),k=T[0],P=T[1];QR(function(){var O=k[0];f!==O&&b(f,O)},[k]),QR(function(){AC(i)||p(i)},[i]);var M=Pg(function(O,N){p(O,N),P([g],N)});return[v,M]}const G$=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 Tt={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(t){var n=t.keyCode;if(t.altKey&&!t.ctrlKey||t.metaKey||n>=Tt.F1&&n<=Tt.F12)return!1;switch(n){case Tt.ALT:case Tt.CAPS_LOCK:case Tt.CONTEXT_MENU:case Tt.CTRL:case Tt.DOWN:case Tt.END:case Tt.ESC:case Tt.HOME:case Tt.INSERT:case Tt.LEFT:case Tt.MAC_FF_META:case Tt.META:case Tt.NUMLOCK:case Tt.NUM_CENTER:case Tt.PAGE_DOWN:case Tt.PAGE_UP:case Tt.PAUSE:case Tt.PRINT_SCREEN:case Tt.RIGHT:case Tt.SHIFT:case Tt.UP:case Tt.WIN_KEY:case Tt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(t){if(t>=Tt.ZERO&&t<=Tt.NINE||t>=Tt.NUM_ZERO&&t<=Tt.NUM_MULTIPLY||t>=Tt.A&&t<=Tt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&t===0)return!0;switch(t){case Tt.SPACE:case Tt.QUESTION_MARK:case Tt.NUM_PLUS:case Tt.NUM_MINUS:case Tt.NUM_PERIOD:case Tt.NUM_DIVISION:case Tt.SEMICOLON:case Tt.DASH:case Tt.EQUALS:case Tt.COMMA:case Tt.PERIOD:case Tt.SLASH:case Tt.APOSTROPHE:case Tt.SINGLE_QUOTE:case Tt.OPEN_SQUARE_BRACKET:case Tt.BACKSLASH:case Tt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},q$=E.exports.createContext(null);function Z$(){return E.exports.useContext(q$)}function cee(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,t=E.exports.useState(!1),n=$e(t,2),r=n[0],i=n[1],a=E.exports.useRef(null),s=function(){window.clearTimeout(a.current)};E.exports.useEffect(function(){return s},[]);var o=function(f,p){s(),a.current=window.setTimeout(function(){i(f),p&&p()},e)};return[r,o,s]}function X$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=E.exports.useRef(null),n=E.exports.useRef(null);E.exports.useEffect(function(){return function(){window.clearTimeout(n.current)}},[]);function r(i){(i||t.current===null)&&(t.current=i),window.clearTimeout(n.current),n.current=window.setTimeout(function(){t.current=null},e)}return[function(){return t.current},r]}function dee(e,t,n,r){var i=E.exports.useRef(null);i.current={open:t,triggerOpen:n,customizedTrigger:r},E.exports.useEffect(function(){function a(s){var o;if(!((o=i.current)!==null&&o!==void 0&&o.customizedTrigger)){var c=s.target;c.shadowRoot&&s.composed&&(c=s.composedPath()[0]||c),i.current.open&&e().filter(function(f){return f}).every(function(f){return!f.contains(c)&&f!==c})&&i.current.triggerOpen(!1)}}return window.addEventListener("mousedown",a),function(){return window.removeEventListener("mousedown",a)}},[])}var fee=`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`,hee=`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`,pee="".concat(fee," ").concat(hee).split(/[\s\n]+/),mee="aria-",gee="data-";function JR(e,t){return e.indexOf(t)===0}function Ql(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;t===!1?n={aria:!0,data:!0,attr:!0}:t===!0?n={aria:!0}:n=fe({},t);var r={};return Object.keys(e).forEach(function(i){(n.aria&&(i==="role"||JR(i,mee))||n.data&&JR(i,gee)||n.attr&&pee.includes(i))&&(r[i]=e[i])}),r}var vee=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Ef=void 0;function yee(e,t){var n=e.prefixCls,r=e.invalidate,i=e.item,a=e.renderItem,s=e.responsive,o=e.responsiveDisabled,c=e.registerSize,f=e.itemKey,p=e.className,g=e.style,v=e.children,b=e.display,_=e.order,T=e.component,k=T===void 0?"div":T,P=In(e,vee),M=s&&!b;function O(U){c(f,U)}E.exports.useEffect(function(){return function(){O(null)}},[]);var N=a&&i!==Ef?a(i):v,L;r||(L={opacity:M?0:1,height:M?0:Ef,overflowY:M?"hidden":Ef,order:s?_:Ef,pointerEvents:M?"none":Ef,position:M?"absolute":Ef});var $={};M&&($["aria-hidden"]=!0);var j=A(k,{className:He(!r&&n,p),style:fe(fe({},L),g),...$,...P,ref:t,children:N});return s&&(j=A(tu,{onResize:function(G){var Z=G.offsetWidth;O(Z)},disabled:o,children:j})),j}var Gm=E.exports.forwardRef(yee);Gm.displayName="Item";function xee(){var e=Wl({}),t=$e(e,2),n=t[1],r=E.exports.useRef([]),i=0,a=0;function s(o){var c=i;i+=1,r.current.length<c+1&&(r.current[c]=o);var f=r.current[c];function p(g){r.current[c]=typeof g=="function"?g(r.current[c]):g,ur.cancel(a),a=ur(function(){n({},!0)})}return[f,p]}return s}var bee=["component"],_ee=["className"],wee=["className"],Cee=function(t,n){var r=E.exports.useContext(pb);if(!r){var i=t.component,a=i===void 0?"div":i,s=In(t,bee);return A(a,{...s,ref:n})}var o=r.className,c=In(r,_ee),f=t.className,p=In(t,wee);return A(pb.Provider,{value:null,children:A(Gm,{ref:n,className:He(o,f),...c,...p})})},Y$=E.exports.forwardRef(Cee);Y$.displayName="RawItem";var See=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],pb=E.exports.createContext(null),Q$="responsive",J$="invalidate";function Eee(e){return"+ ".concat(e.length," ...")}function Pee(e,t){var n=e.prefixCls,r=n===void 0?"rc-overflow":n,i=e.data,a=i===void 0?[]:i,s=e.renderItem,o=e.renderRawItem,c=e.itemKey,f=e.itemWidth,p=f===void 0?10:f,g=e.ssr,v=e.style,b=e.className,_=e.maxCount,T=e.renderRest,k=e.renderRawRest,P=e.suffix,M=e.component,O=M===void 0?"div":M,N=e.itemComponent,L=e.onVisibleChange,$=In(e,See),j=xee(),U=g==="full",G=j(null),Z=$e(G,2),Q=Z[0],J=Z[1],re=Q||0,ne=j(new Map),ge=$e(ne,2),ie=ge[0],ue=ge[1],oe=j(0),me=$e(oe,2),Te=me[0],we=me[1],be=j(0),Re=$e(be,2),Ee=Re[0],Me=Re[1],Ae=j(0),Fe=$e(Ae,2),We=Fe[0],je=Fe[1],pt=E.exports.useState(null),gt=$e(pt,2),Ot=gt[0],Ze=gt[1],St=E.exports.useState(null),ot=$e(St,2),vt=ot[0],yt=ot[1],kt=E.exports.useMemo(function(){return vt===null&&U?Number.MAX_SAFE_INTEGER:vt||0},[vt,Q]),et=E.exports.useState(!1),ut=$e(et,2),at=ut[0],Ke=ut[1],ct="".concat(r,"-item"),bt=Math.max(Te,Ee),At=_===Q$,Lt=a.length&&At,Ht=_===J$,ze=Lt||typeof _=="number"&&a.length>_,Qe=E.exports.useMemo(function(){var dt=a;return Lt?Q===null&&U?dt=a:dt=a.slice(0,Math.min(a.length,re/p)):typeof _=="number"&&(dt=a.slice(0,_)),dt},[a,p,Q,_,Lt]),Zt=E.exports.useMemo(function(){return Lt?a.slice(kt+1):a.slice(Qe.length)},[a,Qe,Lt,kt]),an=E.exports.useCallback(function(dt,mt){var $t;return typeof c=="function"?c(dt):($t=c&&(dt==null?void 0:dt[c]))!==null&&$t!==void 0?$t:mt},[c]),Kt=E.exports.useCallback(s||function(dt){return dt},[s]);function Vt(dt,mt,$t){vt===dt&&(mt===void 0||mt===Ot)||(yt(dt),$t||(Ke(dt<a.length-1),L==null||L(dt)),mt!==void 0&&Ze(mt))}function It(dt,mt){J(mt.clientWidth)}function Xt(dt,mt){ue(function($t){var Wt=new Map($t);return mt===null?Wt.delete(dt):Wt.set(dt,mt),Wt})}function pn(dt,mt){Me(mt),we(Ee)}function tt(dt,mt){je(mt)}function Nt(dt){return ie.get(an(Qe[dt],dt))}Ci(function(){if(re&&bt&&Qe){var dt=We,mt=Qe.length,$t=mt-1;if(!mt){Vt(0,null);return}for(var Wt=0;Wt<mt;Wt+=1){var mn=Nt(Wt);if(U&&(mn=mn||0),mn===void 0){Vt(Wt-1,void 0,!0);break}if(dt+=mn,$t===0&&dt<=re||Wt===$t-1&&dt+Nt($t)<=re){Vt($t,null);break}else if(dt+bt>re){Vt(Wt-1,dt-mn-We+Ee);break}}P&&Nt(0)+We>re&&Ze(null)}},[re,ie,Ee,We,an,Qe]);var qt=at&&!!Zt.length,En={};Ot!==null&&Lt&&(En={position:"absolute",left:Ot,top:0});var yn={prefixCls:ct,responsive:Lt,component:N,invalidate:Ht},Et=o?function(dt,mt){var $t=an(dt,mt);return A(pb.Provider,{value:fe(fe({},yn),{},{order:mt,item:dt,itemKey:$t,registerSize:Xt,display:mt<=kt}),children:o(dt,mt)},$t)}:function(dt,mt){var $t=an(dt,mt);return E.exports.createElement(Gm,{...yn,order:mt,key:$t,item:dt,renderItem:Kt,itemKey:$t,registerSize:Xt,display:mt<=kt})},Pn,_n={order:qt?kt:Number.MAX_SAFE_INTEGER,className:"".concat(ct,"-rest"),registerSize:pn,display:qt};if(k)k&&(Pn=A(pb.Provider,{value:fe(fe({},yn),_n),children:k(Zt)}));else{var tn=T||Eee;Pn=A(Gm,{...yn,..._n,children:typeof tn=="function"?tn(Zt):tn})}var zt=it(O,{className:He(!Ht&&r,b),style:v,ref:t,...$,children:[Qe.map(Et),ze?Pn:null,P&&A(Gm,{...yn,responsive:At,responsiveDisabled:!Lt,order:kt,className:"".concat(ct,"-suffix"),registerSize:tt,display:!0,style:En,children:P})]});return At&&(zt=A(tu,{onResize:It,disabled:!Lt,children:zt})),zt}var al=E.exports.forwardRef(Pee);al.displayName="Overflow";al.Item=Y$;al.RESPONSIVE=Q$;al.INVALIDATE=J$;var mb=function(t){var n=t.className,r=t.customizeIcon,i=t.customizeIconProps,a=t.onMouseDown,s=t.onClick,o=t.children,c;return typeof r=="function"?c=r(i):c=r,A("span",{className:n,onMouseDown:function(p){p.preventDefault(),a&&a(p)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:s,"aria-hidden":!0,children:c!==void 0?c:A("span",{className:He(n.split(/\s+/).map(function(f){return"".concat(f,"-icon")})),children:o})})},Tee=function(t,n){var r,i,a=t.prefixCls,s=t.id,o=t.inputElement,c=t.disabled,f=t.tabIndex,p=t.autoFocus,g=t.autoComplete,v=t.editable,b=t.activeDescendantId,_=t.value,T=t.maxLength,k=t.onKeyDown,P=t.onMouseDown,M=t.onChange,O=t.onPaste,N=t.onCompositionStart,L=t.onCompositionEnd,$=t.open,j=t.attrs,U=o||A("input",{}),G=U,Z=G.ref,Q=G.props,J=Q.onKeyDown,re=Q.onChange,ne=Q.onMouseDown,ge=Q.onCompositionStart,ie=Q.onCompositionEnd,ue=Q.style;return"maxLength"in U.props,U=E.exports.cloneElement(U,fe(fe(fe({type:"search"},Q),{},{id:s,ref:La(n,Z),disabled:c,tabIndex:f,autoComplete:g||"off",autoFocus:p,className:He("".concat(a,"-selection-search-input"),(r=U)===null||r===void 0||(i=r.props)===null||i===void 0?void 0:i.className),role:"combobox","aria-expanded":$,"aria-haspopup":"listbox","aria-owns":"".concat(s,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(s,"_list"),"aria-activedescendant":b},j),{},{value:v?_:"",maxLength:T,readOnly:!v,unselectable:v?null:"on",style:fe(fe({},ue),{},{opacity:v?null:0}),onKeyDown:function(me){k(me),J&&J(me)},onMouseDown:function(me){P(me),ne&&ne(me)},onChange:function(me){M(me),re&&re(me)},onCompositionStart:function(me){N(me),ge&&ge(me)},onCompositionEnd:function(me){L(me),ie&&ie(me)},onPaste:O})),U},dT=E.exports.forwardRef(Tee);dT.displayName="Input";function eB(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}var kee=typeof window<"u"&&window.document&&window.document.documentElement,Iee=kee;function Mee(e){return e!=null}function eD(e){return["string","number"].includes(on(e))}function tB(e){var t=void 0;return e&&(eD(e.title)?t=e.title.toString():eD(e.label)&&(t=e.label.toString())),t}function Ree(e,t){Iee?E.exports.useLayoutEffect(e,t):E.exports.useEffect(e,t)}function Dee(e){var t;return(t=e.key)!==null&&t!==void 0?t:e.value}var tD=function(t){t.preventDefault(),t.stopPropagation()},Oee=function(t){var n=t.id,r=t.prefixCls,i=t.values,a=t.open,s=t.searchValue,o=t.autoClearSearchValue,c=t.inputRef,f=t.placeholder,p=t.disabled,g=t.mode,v=t.showSearch,b=t.autoFocus,_=t.autoComplete,T=t.activeDescendantId,k=t.tabIndex,P=t.removeIcon,M=t.maxTagCount,O=t.maxTagTextLength,N=t.maxTagPlaceholder,L=N===void 0?function(Ze){return"+ ".concat(Ze.length," ...")}:N,$=t.tagRender,j=t.onToggleOpen,U=t.onRemove,G=t.onInputChange,Z=t.onInputPaste,Q=t.onInputKeyDown,J=t.onInputMouseDown,re=t.onInputCompositionStart,ne=t.onInputCompositionEnd,ge=E.exports.useRef(null),ie=E.exports.useState(0),ue=$e(ie,2),oe=ue[0],me=ue[1],Te=E.exports.useState(!1),we=$e(Te,2),be=we[0],Re=we[1],Ee="".concat(r,"-selection"),Me=a||g==="multiple"&&o===!1||g==="tags"?s:"",Ae=g==="tags"||g==="multiple"&&o===!1||v&&(a||be);Ree(function(){me(ge.current.scrollWidth)},[Me]);function Fe(Ze,St,ot,vt,yt){return it("span",{className:He("".concat(Ee,"-item"),ae({},"".concat(Ee,"-item-disabled"),ot)),title:tB(Ze),children:[A("span",{className:"".concat(Ee,"-item-content"),children:St}),vt&&A(mb,{className:"".concat(Ee,"-item-remove"),onMouseDown:tD,onClick:yt,customizeIcon:P,children:"\xD7"})]})}function We(Ze,St,ot,vt,yt){var kt=function(ut){tD(ut),j(!a)};return A("span",{onMouseDown:kt,children:$({label:St,value:Ze,disabled:ot,closable:vt,onClose:yt})})}function je(Ze){var St=Ze.disabled,ot=Ze.label,vt=Ze.value,yt=!p&&!St,kt=ot;if(typeof O=="number"&&(typeof ot=="string"||typeof ot=="number")){var et=String(kt);et.length>O&&(kt="".concat(et.slice(0,O),"..."))}var ut=function(Ke){Ke&&Ke.stopPropagation(),U(Ze)};return typeof $=="function"?We(vt,kt,St,yt,ut):Fe(Ze,kt,St,yt,ut)}function pt(Ze){var St=typeof L=="function"?L(Ze):L;return Fe({title:St},St,!1)}var gt=it("div",{className:"".concat(Ee,"-search"),style:{width:oe},onFocus:function(){Re(!0)},onBlur:function(){Re(!1)},children:[A(dT,{ref:c,open:a,prefixCls:r,id:n,inputElement:null,disabled:p,autoFocus:b,autoComplete:_,editable:Ae,activeDescendantId:T,value:Me,onKeyDown:Q,onMouseDown:J,onChange:G,onPaste:Z,onCompositionStart:re,onCompositionEnd:ne,tabIndex:k,attrs:Ql(t,!0)}),it("span",{ref:ge,className:"".concat(Ee,"-search-mirror"),"aria-hidden":!0,children:[Me,"\xA0"]})]}),Ot=A(al,{prefixCls:"".concat(Ee,"-overflow"),data:i,renderItem:je,renderRest:pt,suffix:gt,itemKey:Dee,maxCount:M});return it(nr,{children:[Ot,!i.length&&!Me&&A("span",{className:"".concat(Ee,"-placeholder"),children:f})]})},Aee=function(t){var n=t.inputElement,r=t.prefixCls,i=t.id,a=t.inputRef,s=t.disabled,o=t.autoFocus,c=t.autoComplete,f=t.activeDescendantId,p=t.mode,g=t.open,v=t.values,b=t.placeholder,_=t.tabIndex,T=t.showSearch,k=t.searchValue,P=t.activeValue,M=t.maxLength,O=t.onInputKeyDown,N=t.onInputMouseDown,L=t.onInputChange,$=t.onInputPaste,j=t.onInputCompositionStart,U=t.onInputCompositionEnd,G=E.exports.useState(!1),Z=$e(G,2),Q=Z[0],J=Z[1],re=p==="combobox",ne=re||T,ge=v[0],ie=k||"";re&&P&&!Q&&(ie=P),E.exports.useEffect(function(){re&&J(!1)},[re,P]);var ue=p!=="combobox"&&!g&&!T?!1:!!ie,oe=tB(ge),me=function(){if(ge)return null;var we=ue?{visibility:"hidden"}:void 0;return A("span",{className:"".concat(r,"-selection-placeholder"),style:we,children:b})};return it(nr,{children:[A("span",{className:"".concat(r,"-selection-search"),children:A(dT,{ref:a,prefixCls:r,id:i,open:g,inputElement:n,disabled:s,autoFocus:o,autoComplete:c,editable:ne,activeDescendantId:f,value:ie,onKeyDown:O,onMouseDown:N,onChange:function(we){J(!0),L(we)},onPaste:$,onCompositionStart:j,onCompositionEnd:U,tabIndex:_,attrs:Ql(t,!0),maxLength:re?M:void 0})}),!re&&ge&&!ue&&A("span",{className:"".concat(r,"-selection-item"),title:oe,children:ge.label}),me()]})};function Nee(e){return![Tt.ESC,Tt.SHIFT,Tt.BACKSPACE,Tt.TAB,Tt.WIN_KEY,Tt.ALT,Tt.META,Tt.WIN_KEY_RIGHT,Tt.CTRL,Tt.SEMICOLON,Tt.EQUALS,Tt.CAPS_LOCK,Tt.CONTEXT_MENU,Tt.F1,Tt.F2,Tt.F3,Tt.F4,Tt.F5,Tt.F6,Tt.F7,Tt.F8,Tt.F9,Tt.F10,Tt.F11,Tt.F12].includes(e)}var Lee=function(t,n){var r=E.exports.useRef(null),i=E.exports.useRef(!1),a=t.prefixCls,s=t.open,o=t.mode,c=t.showSearch,f=t.tokenWithEnter,p=t.autoClearSearchValue,g=t.onSearch,v=t.onSearchSubmit,b=t.onToggleOpen,_=t.onInputKeyDown,T=t.domRef;E.exports.useImperativeHandle(n,function(){return{focus:function(){r.current.focus()},blur:function(){r.current.blur()}}});var k=X$(0),P=$e(k,2),M=P[0],O=P[1],N=function(ue){var oe=ue.which;(oe===Tt.UP||oe===Tt.DOWN)&&ue.preventDefault(),_&&_(ue),oe===Tt.ENTER&&o==="tags"&&!i.current&&!s&&(v==null||v(ue.target.value)),Nee(oe)&&b(!0)},L=function(){O(!0)},$=E.exports.useRef(null),j=function(ue){g(ue,!0,i.current)!==!1&&b(!0)},U=function(){i.current=!0},G=function(ue){i.current=!1,o!=="combobox"&&j(ue.target.value)},Z=function(ue){var oe=ue.target.value;if(f&&$.current&&/[\r\n]/.test($.current)){var me=$.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");oe=oe.replace(me,$.current)}$.current=null,j(oe)},Q=function(ue){var oe=ue.clipboardData,me=oe.getData("text");$.current=me},J=function(ue){var oe=ue.target;if(oe!==r.current){var me=document.body.style.msTouchAction!==void 0;me?setTimeout(function(){r.current.focus()}):r.current.focus()}},re=function(ue){var oe=M();ue.target!==r.current&&!oe&&o!=="combobox"&&ue.preventDefault(),(o!=="combobox"&&(!c||!oe)||!s)&&(s&&p!==!1&&g("",!0,!1),b())},ne={inputRef:r,onInputKeyDown:N,onInputMouseDown:L,onInputChange:Z,onInputPaste:Q,onInputCompositionStart:U,onInputCompositionEnd:G},ge=o==="multiple"||o==="tags"?A(Oee,{...t,...ne}):A(Aee,{...t,...ne});return A("div",{ref:T,className:"".concat(a,"-selector"),onClick:J,onMouseDown:re,children:ge})},nB=E.exports.forwardRef(Lee);nB.displayName="Selector";var Fee=E.exports.forwardRef(function(e,t){var n=e.didUpdate,r=e.getContainer,i=e.children,a=E.exports.useRef(),s=E.exports.useRef();E.exports.useImperativeHandle(t,function(){return{}});var o=E.exports.useRef(!1);return!o.current&&ko()&&(s.current=r(),a.current=s.current.parentNode,o.current=!0),E.exports.useEffect(function(){n==null||n(e)}),E.exports.useEffect(function(){return s.current.parentNode===null&&a.current!==null&&a.current.appendChild(s.current),function(){var c,f;(c=s.current)===null||c===void 0||(f=c.parentNode)===null||f===void 0||f.removeChild(s.current)}},[]),s.current?oc.createPortal(i,s.current):null});function zee(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function $ee(e,t,n){var r=e[t]||{};return fe(fe({},r),n)}function Bee(e,t,n,r){for(var i=n.points,a=Object.keys(e),s=0;s<a.length;s+=1){var o=a[s];if(zee(e[o].points,i,r))return"".concat(t,"-placement-").concat(o)}return""}function rB(e){var t=e.prefixCls,n=e.motion,r=e.animation,i=e.transitionName;return n||(r?{motionName:"".concat(t,"-").concat(r)}:i?{motionName:i}:null)}function Vee(e){var t=e.prefixCls,n=e.visible,r=e.zIndex,i=e.mask,a=e.maskMotion,s=e.maskAnimation,o=e.maskTransitionName;if(!i)return null;var c={};return(a||o||s)&&(c=fe({motionAppear:!0},rB({motion:a,prefixCls:t,transitionName:o,animation:s}))),A(sa,{...c,visible:n,removeOnLeave:!0,children:function(f){var p=f.className;return A("div",{style:{zIndex:r},className:He("".concat(t,"-mask"),p)})}})}function nD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nD(Object(n),!0).forEach(function(r){Uee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function k4(e){return k4=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},k4(e)}function Uee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var im,jee={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-",O:"-o-"};function gb(){if(im!==void 0)return im;im="";var e=document.createElement("p").style,t="Transform";for(var n in jee)n+t in e&&(im=n);return im}function iB(){return gb()?"".concat(gb(),"TransitionProperty"):"transitionProperty"}function K_(){return gb()?"".concat(gb(),"Transform"):"transform"}function iD(e,t){var n=iB();n&&(e.style[n]=t,n!=="transitionProperty"&&(e.style.transitionProperty=t))}function NC(e,t){var n=K_();n&&(e.style[n]=t,n!=="transform"&&(e.style.transform=t))}function Hee(e){return e.style.transitionProperty||e.style[iB()]}function Kee(e){var t=window.getComputedStyle(e,null),n=t.getPropertyValue("transform")||t.getPropertyValue(K_());if(n&&n!=="none"){var r=n.replace(/[^0-9\-.,]/g,"").split(",");return{x:parseFloat(r[12]||r[4],0),y:parseFloat(r[13]||r[5],0)}}return{x:0,y:0}}var Wee=/matrix\((.*)\)/,Gee=/matrix3d\((.*)\)/;function qee(e,t){var n=window.getComputedStyle(e,null),r=n.getPropertyValue("transform")||n.getPropertyValue(K_());if(r&&r!=="none"){var i,a=r.match(Wee);if(a)a=a[1],i=a.split(",").map(function(o){return parseFloat(o,10)}),i[4]=t.x,i[5]=t.y,NC(e,"matrix(".concat(i.join(","),")"));else{var s=r.match(Gee)[1];i=s.split(",").map(function(o){return parseFloat(o,10)}),i[12]=t.x,i[13]=t.y,NC(e,"matrix3d(".concat(i.join(","),")"))}}else NC(e,"translateX(".concat(t.x,"px) translateY(").concat(t.y,"px) translateZ(0)"))}var Zee=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,nv;function oD(e){var t=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=t}function rh(e,t,n){var r=n;if(k4(t)==="object"){for(var i in t)t.hasOwnProperty(i)&&rh(e,i,t[i]);return}if(typeof r<"u"){typeof r=="number"&&(r="".concat(r,"px")),e.style[t]=r;return}return nv(e,t)}function Xee(e){var t,n,r,i=e.ownerDocument,a=i.body,s=i&&i.documentElement;return t=e.getBoundingClientRect(),n=Math.floor(t.left),r=Math.floor(t.top),n-=s.clientLeft||a.clientLeft||0,r-=s.clientTop||a.clientTop||0,{left:n,top:r}}function oB(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if(typeof n!="number"){var i=e.document;n=i.documentElement[r],typeof n!="number"&&(n=i.body[r])}return n}function aB(e){return oB(e)}function sB(e){return oB(e,!0)}function Tg(e){var t=Xee(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=aB(r),t.top+=sB(r),t}function fT(e){return e!=null&&e==e.window}function lB(e){return fT(e)?e.document:e.nodeType===9?e:e.ownerDocument}function Yee(e,t,n){var r=n,i="",a=lB(e);return r=r||a.defaultView.getComputedStyle(e,null),r&&(i=r.getPropertyValue(t)||r[t]),i}var Qee=new RegExp("^(".concat(Zee,")(?!px)[a-z%]+$"),"i"),Jee=/^(top|right|bottom|left)$/,LC="currentStyle",FC="runtimeStyle",Uc="left",ete="px";function tte(e,t){var n=e[LC]&&e[LC][t];if(Qee.test(n)&&!Jee.test(t)){var r=e.style,i=r[Uc],a=e[FC][Uc];e[FC][Uc]=e[LC][Uc],r[Uc]=t==="fontSize"?"1em":n||0,n=r.pixelLeft+ete,r[Uc]=i,e[FC][Uc]=a}return n===""?"auto":n}typeof window<"u"&&(nv=window.getComputedStyle?Yee:tte);function c0(e,t){return e==="left"?t.useCssRight?"right":e:t.useCssBottom?"bottom":e}function aD(e){if(e==="left")return"right";if(e==="right")return"left";if(e==="top")return"bottom";if(e==="bottom")return"top"}function sD(e,t,n){rh(e,"position")==="static"&&(e.style.position="relative");var r=-999,i=-999,a=c0("left",n),s=c0("top",n),o=aD(a),c=aD(s);a!=="left"&&(r=999),s!=="top"&&(i=999);var f="",p=Tg(e);("left"in t||"top"in t)&&(f=Hee(e)||"",iD(e,"none")),"left"in t&&(e.style[o]="",e.style[a]="".concat(r,"px")),"top"in t&&(e.style[c]="",e.style[s]="".concat(i,"px")),oD(e);var g=Tg(e),v={};for(var b in t)if(t.hasOwnProperty(b)){var _=c0(b,n),T=b==="left"?r:i,k=p[b]-g[b];_===b?v[_]=T+k:v[_]=T-k}rh(e,v),oD(e),("left"in t||"top"in t)&&iD(e,f);var P={};for(var M in t)if(t.hasOwnProperty(M)){var O=c0(M,n),N=t[M]-p[M];M===O?P[O]=v[O]+N:P[O]=v[O]-N}rh(e,P)}function nte(e,t){var n=Tg(e),r=Kee(e),i={x:r.x,y:r.y};"left"in t&&(i.x=r.x+t.left-n.left),"top"in t&&(i.y=r.y+t.top-n.top),qee(e,i)}function rte(e,t,n){if(n.ignoreShake){var r=Tg(e),i=r.left.toFixed(0),a=r.top.toFixed(0),s=t.left.toFixed(0),o=t.top.toFixed(0);if(i===s&&a===o)return}n.useCssRight||n.useCssBottom?sD(e,t,n):n.useCssTransform&&K_()in document.body.style?nte(e,t):sD(e,t,n)}function hT(e,t){for(var n=0;n<e.length;n++)t(e[n])}function uB(e){return nv(e,"boxSizing")==="border-box"}var ite=["margin","border","padding"],I4=-1,ote=2,M4=1,ate=0;function ste(e,t,n){var r={},i=e.style,a;for(a in t)t.hasOwnProperty(a)&&(r[a]=i[a],i[a]=t[a]);n.call(e);for(a in t)t.hasOwnProperty(a)&&(i[a]=r[a])}function Pm(e,t,n){var r=0,i,a,s;for(a=0;a<t.length;a++)if(i=t[a],i)for(s=0;s<n.length;s++){var o=void 0;i==="border"?o="".concat(i).concat(n[s],"Width"):o=i+n[s],r+=parseFloat(nv(e,o))||0}return r}var rl={getParent:function(t){var n=t;do n.nodeType===11&&n.host?n=n.host:n=n.parentNode;while(n&&n.nodeType!==1&&n.nodeType!==9);return n}};hT(["Width","Height"],function(e){rl["doc".concat(e)]=function(t){var n=t.document;return Math.max(n.documentElement["scroll".concat(e)],n.body["scroll".concat(e)],rl["viewport".concat(e)](n))},rl["viewport".concat(e)]=function(t){var n="client".concat(e),r=t.document,i=r.body,a=r.documentElement,s=a[n];return r.compatMode==="CSS1Compat"&&s||i&&i[n]||s}});function lD(e,t,n){var r=n;if(fT(e))return t==="width"?rl.viewportWidth(e):rl.viewportHeight(e);if(e.nodeType===9)return t==="width"?rl.docWidth(e):rl.docHeight(e);var i=t==="width"?["Left","Right"]:["Top","Bottom"],a=Math.floor(t==="width"?e.getBoundingClientRect().width:e.getBoundingClientRect().height),s=uB(e),o=0;(a==null||a<=0)&&(a=void 0,o=nv(e,t),(o==null||Number(o)<0)&&(o=e.style[t]||0),o=Math.floor(parseFloat(o))||0),r===void 0&&(r=s?M4:I4);var c=a!==void 0||s,f=a||o;return r===I4?c?f-Pm(e,["border","padding"],i):o:c?r===M4?f:f+(r===ote?-Pm(e,["border"],i):Pm(e,["margin"],i)):o+Pm(e,ite.slice(r),i)}var lte={position:"absolute",visibility:"hidden",display:"block"};function uD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=t[0];return i.offsetWidth!==0?r=lD.apply(void 0,t):ste(i,lte,function(){r=lD.apply(void 0,t)}),r}hT(["width","height"],function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);rl["outer".concat(t)]=function(r,i){return r&&uD(r,e,i?ate:M4)};var n=e==="width"?["Left","Right"]:["Top","Bottom"];rl[e]=function(r,i){var a=i;if(a!==void 0){if(r){var s=uB(r);return s&&(a+=Pm(r,["padding","border"],n)),rh(r,e,a)}return}return r&&uD(r,e,I4)}});function cB(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var Gn={getWindow:function(t){if(t&&t.document&&t.setTimeout)return t;var n=t.ownerDocument||t;return n.defaultView||n.parentWindow},getDocument:lB,offset:function(t,n,r){if(typeof n<"u")rte(t,n,r||{});else return Tg(t)},isWindow:fT,each:hT,css:rh,clone:function(t){var n,r={};for(n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);var i=t.overflow;if(i)for(n in t)t.hasOwnProperty(n)&&(r.overflow[n]=t.overflow[n]);return r},mix:cB,getWindowScrollLeft:function(t){return aB(t)},getWindowScrollTop:function(t){return sB(t)},merge:function(){for(var t={},n=0;n<arguments.length;n++)Gn.mix(t,n<0||arguments.length<=n?void 0:arguments[n]);return t},viewportWidth:0,viewportHeight:0};cB(Gn,rl);var zC=Gn.getParent;function R4(e){if(Gn.isWindow(e)||e.nodeType===9)return null;var t=Gn.getDocument(e),n=t.body,r,i=Gn.css(e,"position"),a=i==="fixed"||i==="absolute";if(!a)return e.nodeName.toLowerCase()==="html"?null:zC(e);for(r=zC(e);r&&r!==n&&r.nodeType!==9;r=zC(r))if(i=Gn.css(r,"position"),i!=="static")return r;return null}var cD=Gn.getParent;function ute(e){if(Gn.isWindow(e)||e.nodeType===9)return!1;var t=Gn.getDocument(e),n=t.body,r=null;for(r=cD(e);r&&r!==n&&r!==t;r=cD(r)){var i=Gn.css(r,"position");if(i==="fixed")return!0}return!1}function pT(e,t){for(var n={left:0,right:1/0,top:0,bottom:1/0},r=R4(e),i=Gn.getDocument(e),a=i.defaultView||i.parentWindow,s=i.body,o=i.documentElement;r;){if((navigator.userAgent.indexOf("MSIE")===-1||r.clientWidth!==0)&&r!==s&&r!==o&&Gn.css(r,"overflow")!=="visible"){var c=Gn.offset(r);c.left+=r.clientLeft,c.top+=r.clientTop,n.top=Math.max(n.top,c.top),n.right=Math.min(n.right,c.left+r.clientWidth),n.bottom=Math.min(n.bottom,c.top+r.clientHeight),n.left=Math.max(n.left,c.left)}else if(r===s||r===o)break;r=R4(r)}var f=null;if(!Gn.isWindow(e)&&e.nodeType!==9){f=e.style.position;var p=Gn.css(e,"position");p==="absolute"&&(e.style.position="fixed")}var g=Gn.getWindowScrollLeft(a),v=Gn.getWindowScrollTop(a),b=Gn.viewportWidth(a),_=Gn.viewportHeight(a),T=o.scrollWidth,k=o.scrollHeight,P=window.getComputedStyle(s);if(P.overflowX==="hidden"&&(T=a.innerWidth),P.overflowY==="hidden"&&(k=a.innerHeight),e.style&&(e.style.position=f),t||ute(e))n.left=Math.max(n.left,g),n.top=Math.max(n.top,v),n.right=Math.min(n.right,g+b),n.bottom=Math.min(n.bottom,v+_);else{var M=Math.max(T,g+b);n.right=Math.min(n.right,M);var O=Math.max(k,v+_);n.bottom=Math.min(n.bottom,O)}return n.top>=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function cte(e,t,n,r){var i=Gn.clone(e),a={width:t.width,height:t.height};return r.adjustX&&i.left<n.left&&(i.left=n.left),r.resizeWidth&&i.left>=n.left&&i.left+a.width>n.right&&(a.width-=i.left+a.width-n.right),r.adjustX&&i.left+a.width>n.right&&(i.left=Math.max(n.right-a.width,n.left)),r.adjustY&&i.top<n.top&&(i.top=n.top),r.resizeHeight&&i.top>=n.top&&i.top+a.height>n.bottom&&(a.height-=i.top+a.height-n.bottom),r.adjustY&&i.top+a.height>n.bottom&&(i.top=Math.max(n.bottom-a.height,n.top)),Gn.mix(i,a)}function mT(e){var t,n,r;if(!Gn.isWindow(e)&&e.nodeType!==9)t=Gn.offset(e),n=Gn.outerWidth(e),r=Gn.outerHeight(e);else{var i=Gn.getWindow(e);t={left:Gn.getWindowScrollLeft(i),top:Gn.getWindowScrollTop(i)},n=Gn.viewportWidth(i),r=Gn.viewportHeight(i)}return t.width=n,t.height=r,t}function dD(e,t){var n=t.charAt(0),r=t.charAt(1),i=e.width,a=e.height,s=e.left,o=e.top;return n==="c"?o+=a/2:n==="b"&&(o+=a),r==="c"?s+=i/2:r==="r"&&(s+=i),{left:s,top:o}}function d0(e,t,n,r,i){var a=dD(t,n[1]),s=dD(e,n[0]),o=[s.left-a.left,s.top-a.top];return{left:Math.round(e.left-o[0]+r[0]-i[0]),top:Math.round(e.top-o[1]+r[1]-i[1])}}function fD(e,t,n){return e.left<n.left||e.left+t.width>n.right}function hD(e,t,n){return e.top<n.top||e.top+t.height>n.bottom}function dte(e,t,n){return e.left>n.right||e.left+t.width<n.left}function fte(e,t,n){return e.top>n.bottom||e.top+t.height<n.top}function f0(e,t,n){var r=[];return Gn.each(e,function(i){r.push(i.replace(t,function(a){return n[a]}))}),r}function h0(e,t){return e[t]=-e[t],e}function pD(e,t){var n;return/%$/.test(e)?n=parseInt(e.substring(0,e.length-1),10)/100*t:n=parseInt(e,10),n||0}function mD(e,t){e[0]=pD(e[0],t.width),e[1]=pD(e[1],t.height)}function dB(e,t,n,r){var i=n.points,a=n.offset||[0,0],s=n.targetOffset||[0,0],o=n.overflow,c=n.source||e;a=[].concat(a),s=[].concat(s),o=o||{};var f={},p=0,g=!!(o&&o.alwaysByViewport),v=pT(c,g),b=mT(c);mD(a,b),mD(s,t);var _=d0(b,t,i,a,s),T=Gn.merge(b,_);if(v&&(o.adjustX||o.adjustY)&&r){if(o.adjustX&&fD(_,b,v)){var k=f0(i,/[lr]/gi,{l:"r",r:"l"}),P=h0(a,0),M=h0(s,0),O=d0(b,t,k,P,M);dte(O,b,v)||(p=1,i=k,a=P,s=M)}if(o.adjustY&&hD(_,b,v)){var N=f0(i,/[tb]/gi,{t:"b",b:"t"}),L=h0(a,1),$=h0(s,1),j=d0(b,t,N,L,$);fte(j,b,v)||(p=1,i=N,a=L,s=$)}p&&(_=d0(b,t,i,a,s),Gn.mix(T,_));var U=fD(_,b,v),G=hD(_,b,v);if(U||G){var Z=i;U&&(Z=f0(i,/[lr]/gi,{l:"r",r:"l"})),G&&(Z=f0(i,/[tb]/gi,{t:"b",b:"t"})),i=Z,a=n.offset||[0,0],s=n.targetOffset||[0,0]}f.adjustX=o.adjustX&&U,f.adjustY=o.adjustY&&G,(f.adjustX||f.adjustY)&&(T=cte(_,b,v,f))}return T.width!==b.width&&Gn.css(c,"width",Gn.width(c)+T.width-b.width),T.height!==b.height&&Gn.css(c,"height",Gn.height(c)+T.height-b.height),Gn.offset(c,{left:T.left,top:T.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:i,offset:a,targetOffset:s,overflow:f}}function hte(e,t){var n=pT(e,t),r=mT(e);return!n||r.left+r.width<=n.left||r.top+r.height<=n.top||r.left>=n.right||r.top>=n.bottom}function gT(e,t,n){var r=n.target||t,i=mT(r),a=!hte(r,n.overflow&&n.overflow.alwaysByViewport);return dB(e,i,n,a)}gT.__getOffsetParent=R4;gT.__getVisibleRectForElement=pT;function pte(e,t,n){var r,i,a=Gn.getDocument(e),s=a.defaultView||a.parentWindow,o=Gn.getWindowScrollLeft(s),c=Gn.getWindowScrollTop(s),f=Gn.viewportWidth(s),p=Gn.viewportHeight(s);"pageX"in t?r=t.pageX:r=o+t.clientX,"pageY"in t?i=t.pageY:i=c+t.clientY;var g={left:r,top:i,width:0,height:0},v=r>=0&&r<=o+f&&i>=0&&i<=c+p,b=[n.points[0],"cc"];return dB(e,g,rD(rD({},n),{},{points:b}),v)}function vT(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=new Set;function i(a,s){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,c=r.has(a);if(Nr(!c,"Warning: There may be circular references"),c)return!1;if(a===s)return!0;if(n&&o>1)return!1;r.add(a);var f=o+1;if(Array.isArray(a)){if(!Array.isArray(s)||a.length!==s.length)return!1;for(var p=0;p<a.length;p++)if(!i(a[p],s[p],f))return!1;return!0}if(a&&s&&on(a)==="object"&&on(s)==="object"){var g=Object.keys(a);return g.length!==Object.keys(s).length?!1:g.every(function(v){return i(a[v],s[v],f)})}return!1}return i(e,t)}const yT=function(e){if(!e)return!1;if(e instanceof HTMLElement&&e.offsetParent)return!0;if(e instanceof SVGGraphicsElement&&e.getBBox){var t=e.getBBox(),n=t.width,r=t.height;if(n||r)return!0}if(e instanceof HTMLElement&&e.getBoundingClientRect){var i=e.getBoundingClientRect(),a=i.width,s=i.height;if(a||s)return!0}return!1},mte=function(e,t){var n=Un.useRef(!1),r=Un.useRef(null);function i(){window.clearTimeout(r.current)}function a(s){if(i(),!n.current||s===!0){if(e(s)===!1)return;n.current=!0,r.current=window.setTimeout(function(){n.current=!1},t)}else r.current=window.setTimeout(function(){n.current=!1,a()},t)}return[a,function(){n.current=!1,i()}]};function gte(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 vte(e,t){e!==document.activeElement&&xd(t,e)&&typeof e.focus=="function"&&e.focus()}function gD(e,t){var n=null,r=null;function i(s){var o=$e(s,1),c=o[0].target;if(!!document.documentElement.contains(c)){var f=c.getBoundingClientRect(),p=f.width,g=f.height,v=Math.floor(p),b=Math.floor(g);(n!==v||r!==b)&&Promise.resolve().then(function(){t({width:v,height:b})}),n=v,r=b}}var a=new m6(i);return e&&a.observe(e),function(){a.disconnect()}}function vD(e){return typeof e!="function"?null:e()}function yD(e){return on(e)!=="object"||!e?null:e}var yte=function(t,n){var r=t.children,i=t.disabled,a=t.target,s=t.align,o=t.onAlign,c=t.monitorWindowResize,f=t.monitorBufferTime,p=f===void 0?0:f,g=Un.useRef({}),v=Un.useRef(),b=Un.Children.only(r),_=Un.useRef({});_.current.disabled=i,_.current.target=a,_.current.align=s,_.current.onAlign=o;var T=mte(function(){var Q=_.current,J=Q.disabled,re=Q.target,ne=Q.align,ge=Q.onAlign,ie=v.current;if(!J&&re&&ie){var ue,oe=vD(re),me=yD(re);g.current.element=oe,g.current.point=me,g.current.align=ne;var Te=document,we=Te.activeElement;return oe&&yT(oe)?ue=gT(ie,oe,ne):me&&(ue=pte(ie,me,ne)),vte(we,ie),ge&&ue&&ge(ie,ue),!0}return!1},p),k=$e(T,2),P=k[0],M=k[1],O=Un.useState(),N=$e(O,2),L=N[0],$=N[1],j=Un.useState(),U=$e(j,2),G=U[0],Z=U[1];return Ci(function(){$(vD(a)),Z(yD(a))}),Un.useEffect(function(){(g.current.element!==L||!gte(g.current.point,G)||!vT(g.current.align,s))&&P()}),Un.useEffect(function(){var Q=gD(v.current,P);return Q},[v.current]),Un.useEffect(function(){var Q=gD(L,P);return Q},[L]),Un.useEffect(function(){i?M():P()},[i]),Un.useEffect(function(){if(c){var Q=Jo(window,"resize",P);return Q.remove}},[c]),Un.useEffect(function(){return function(){M()}},[]),Un.useImperativeHandle(n,function(){return{forceAlign:function(){return P(!0)}}}),Un.isValidElement(b)&&(b=Un.cloneElement(b,{ref:La(b.ref,v)})),b},fB=Un.forwardRef(yte);fB.displayName="Align";var xD=["measure","alignPre","align",null,"motion"];const xte=function(e,t){var n=Wl(null),r=$e(n,2),i=r[0],a=r[1],s=E.exports.useRef();function o(p){a(p,!0)}function c(){ur.cancel(s.current)}function f(p){c(),s.current=ur(function(){o(function(g){switch(i){case"align":return"motion";case"motion":return"stable"}return g}),p==null||p()})}return E.exports.useEffect(function(){o("measure")},[e]),E.exports.useEffect(function(){switch(i){case"measure":t();break}i&&(s.current=ur(dc(Li().mark(function p(){var g,v;return Li().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:g=xD.indexOf(i),v=xD[g+1],v&&g!==-1&&o(v);case 3:case"end":return _.stop()}},p)}))))},[i]),E.exports.useEffect(function(){return function(){c()}},[]),[i,f]},bte=function(e){var t=E.exports.useState({width:0,height:0}),n=$e(t,2),r=n[0],i=n[1];function a(o){var c=o.offsetWidth,f=o.offsetHeight,p=o.getBoundingClientRect(),g=p.width,v=p.height;Math.abs(c-g)<1&&Math.abs(f-v)<1&&(c=g,f=v),i({width:c,height:f})}var s=E.exports.useMemo(function(){var o={};if(e){var c=r.width,f=r.height;e.indexOf("height")!==-1&&f?o.height=f:e.indexOf("minHeight")!==-1&&f&&(o.minHeight=f),e.indexOf("width")!==-1&&c?o.width=c:e.indexOf("minWidth")!==-1&&c&&(o.minWidth=c)}return o},[e,r]);return[s,a]};var hB=E.exports.forwardRef(function(e,t){var n=e.visible,r=e.prefixCls,i=e.className,a=e.style,s=e.children,o=e.zIndex,c=e.stretch,f=e.destroyPopupOnHide,p=e.forceRender,g=e.align,v=e.point,b=e.getRootDomNode,_=e.getClassNameFromAlign,T=e.onAlign,k=e.onMouseEnter,P=e.onMouseLeave,M=e.onMouseDown,O=e.onTouchStart,N=e.onClick,L=E.exports.useRef(),$=E.exports.useRef(),j=E.exports.useState(),U=$e(j,2),G=U[0],Z=U[1],Q=bte(c),J=$e(Q,2),re=J[0],ne=J[1];function ge(){c&&ne(b())}var ie=xte(n,ge),ue=$e(ie,2),oe=ue[0],me=ue[1],Te=E.exports.useState(0),we=$e(Te,2),be=we[0],Re=we[1],Ee=E.exports.useRef();Ci(function(){oe==="alignPre"&&Re(0)},[oe]);function Me(){return v||b}function Ae(){var Ze;(Ze=L.current)===null||Ze===void 0||Ze.forceAlign()}function Fe(Ze,St){var ot=_(St);G!==ot&&Z(ot),Re(function(vt){return vt+1}),oe==="align"&&(T==null||T(Ze,St))}Ci(function(){oe==="align"&&(be<3?Ae():me(function(){var Ze;(Ze=Ee.current)===null||Ze===void 0||Ze.call(Ee)}))},[be]);var We=fe({},rB(e));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(Ze){var St=We[Ze];We[Ze]=function(ot,vt){return me(),St==null?void 0:St(ot,vt)}});function je(){return new Promise(function(Ze){Ee.current=Ze})}E.exports.useEffect(function(){!We.motionName&&oe==="motion"&&me()},[We.motionName,oe]),E.exports.useImperativeHandle(t,function(){return{forceAlign:Ae,getElement:function(){return $.current}}});var pt=fe(fe({},re),{},{zIndex:o,opacity:oe==="motion"||oe==="stable"||!n?void 0:0,pointerEvents:!n&&oe!=="stable"?"none":void 0},a),gt=!0;g!=null&&g.points&&(oe==="align"||oe==="stable")&&(gt=!1);var Ot=s;return E.exports.Children.count(s)>1&&(Ot=A("div",{className:"".concat(r,"-content"),children:s})),A(sa,{visible:n,ref:$,leavedClassName:"".concat(r,"-hidden"),...We,onAppearPrepare:je,onEnterPrepare:je,removeOnLeave:f,forceRender:p,children:function(Ze,St){var ot=Ze.className,vt=Ze.style,yt=He(r,i,G,ot);return A(fB,{target:Me(),ref:L,monitorWindowResize:!0,disabled:gt,align:g,onAlign:Fe,children:A("div",{ref:St,className:yt,onMouseEnter:k,onMouseLeave:P,onMouseDownCapture:M,onTouchStartCapture:O,onClick:N,style:fe(fe({},vt),pt),children:Ot})},"popup")}})});hB.displayName="PopupInner";var pB=E.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.visible,i=e.zIndex,a=e.children,s=e.mobile;s=s===void 0?{}:s;var o=s.popupClassName,c=s.popupStyle,f=s.popupMotion,p=f===void 0?{}:f,g=s.popupRender,v=e.onClick,b=E.exports.useRef();E.exports.useImperativeHandle(t,function(){return{forceAlign:function(){},getElement:function(){return b.current}}});var _=fe({zIndex:i},c),T=a;return E.exports.Children.count(a)>1&&(T=A("div",{className:"".concat(n,"-content"),children:a})),g&&(T=g(T)),A(sa,{visible:r,ref:b,removeOnLeave:!0,...p,children:function(k,P){var M=k.className,O=k.style,N=He(n,o,M);return A("div",{ref:P,className:N,onClick:v,style:fe(fe({},O),_),children:T})}})});pB.displayName="MobilePopupInner";var _te=["visible","mobile"],mB=E.exports.forwardRef(function(e,t){var n=e.visible,r=e.mobile,i=In(e,_te),a=E.exports.useState(n),s=$e(a,2),o=s[0],c=s[1],f=E.exports.useState(!1),p=$e(f,2),g=p[0],v=p[1],b=fe(fe({},i),{},{visible:o});E.exports.useEffect(function(){c(n),n&&r&&v(G$())},[n,r]);var _=g?A(pB,{...b,mobile:r,ref:t}):A(hB,{...b,ref:t});return it("div",{children:[A(Vee,{...b}),_]})});mB.displayName="Popup";var bD=E.exports.createContext(null);function $C(){}function wte(){return""}function Cte(e){return e?e.ownerDocument:window.document}var Ste=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function Ete(e){var t=function(n){ai(i,n);var r=si(i);function i(a){var s;Ur(this,i),s=r.call(this,a),ae(zn(s),"popupRef",E.exports.createRef()),ae(zn(s),"triggerRef",E.exports.createRef()),ae(zn(s),"portalContainer",void 0),ae(zn(s),"attachId",void 0),ae(zn(s),"clickOutsideHandler",void 0),ae(zn(s),"touchOutsideHandler",void 0),ae(zn(s),"contextMenuOutsideHandler1",void 0),ae(zn(s),"contextMenuOutsideHandler2",void 0),ae(zn(s),"mouseDownTimeout",void 0),ae(zn(s),"focusTime",void 0),ae(zn(s),"preClickTime",void 0),ae(zn(s),"preTouchTime",void 0),ae(zn(s),"delayTimer",void 0),ae(zn(s),"hasPopupMouseDown",void 0),ae(zn(s),"onMouseEnter",function(c){var f=s.props.mouseEnterDelay;s.fireEvents("onMouseEnter",c),s.delaySetPopupVisible(!0,f,f?null:c)}),ae(zn(s),"onMouseMove",function(c){s.fireEvents("onMouseMove",c),s.setPoint(c)}),ae(zn(s),"onMouseLeave",function(c){s.fireEvents("onMouseLeave",c),s.delaySetPopupVisible(!1,s.props.mouseLeaveDelay)}),ae(zn(s),"onPopupMouseEnter",function(){s.clearDelayTimer()}),ae(zn(s),"onPopupMouseLeave",function(c){var f;c.relatedTarget&&!c.relatedTarget.setTimeout&&xd((f=s.popupRef.current)===null||f===void 0?void 0:f.getElement(),c.relatedTarget)||s.delaySetPopupVisible(!1,s.props.mouseLeaveDelay)}),ae(zn(s),"onFocus",function(c){s.fireEvents("onFocus",c),s.clearDelayTimer(),s.isFocusToShow()&&(s.focusTime=Date.now(),s.delaySetPopupVisible(!0,s.props.focusDelay))}),ae(zn(s),"onMouseDown",function(c){s.fireEvents("onMouseDown",c),s.preClickTime=Date.now()}),ae(zn(s),"onTouchStart",function(c){s.fireEvents("onTouchStart",c),s.preTouchTime=Date.now()}),ae(zn(s),"onBlur",function(c){s.fireEvents("onBlur",c),s.clearDelayTimer(),s.isBlurToHide()&&s.delaySetPopupVisible(!1,s.props.blurDelay)}),ae(zn(s),"onContextMenu",function(c){c.preventDefault(),s.fireEvents("onContextMenu",c),s.setPopupVisible(!0,c)}),ae(zn(s),"onContextMenuClose",function(){s.isContextMenuToShow()&&s.close()}),ae(zn(s),"onClick",function(c){if(s.fireEvents("onClick",c),s.focusTime){var f;if(s.preClickTime&&s.preTouchTime?f=Math.min(s.preClickTime,s.preTouchTime):s.preClickTime?f=s.preClickTime:s.preTouchTime&&(f=s.preTouchTime),Math.abs(f-s.focusTime)<20)return;s.focusTime=0}s.preClickTime=0,s.preTouchTime=0,s.isClickToShow()&&(s.isClickToHide()||s.isBlurToHide())&&c&&c.preventDefault&&c.preventDefault();var p=!s.state.popupVisible;(s.isClickToHide()&&!p||p&&s.isClickToShow())&&s.setPopupVisible(!s.state.popupVisible,c)}),ae(zn(s),"onPopupMouseDown",function(){if(s.hasPopupMouseDown=!0,clearTimeout(s.mouseDownTimeout),s.mouseDownTimeout=window.setTimeout(function(){s.hasPopupMouseDown=!1},0),s.context){var c;(c=s.context).onPopupMouseDown.apply(c,arguments)}}),ae(zn(s),"onDocumentClick",function(c){if(!(s.props.mask&&!s.props.maskClosable)){var f=c.target,p=s.getRootDomNode(),g=s.getPopupDomNode();(!xd(p,f)||s.isContextMenuOnly())&&!xd(g,f)&&!s.hasPopupMouseDown&&s.close()}}),ae(zn(s),"getRootDomNode",function(){var c=s.props.getTriggerDOMNode;if(c)return c(s.triggerRef.current);try{var f=_g(s.triggerRef.current);if(f)return f}catch{}return oc.findDOMNode(zn(s))}),ae(zn(s),"getPopupClassNameFromAlign",function(c){var f=[],p=s.props,g=p.popupPlacement,v=p.builtinPlacements,b=p.prefixCls,_=p.alignPoint,T=p.getPopupClassNameFromAlign;return g&&v&&f.push(Bee(v,b,c,_)),T&&f.push(T(c)),f.join(" ")}),ae(zn(s),"getComponent",function(){var c=s.props,f=c.prefixCls,p=c.destroyPopupOnHide,g=c.popupClassName,v=c.onPopupAlign,b=c.popupMotion,_=c.popupAnimation,T=c.popupTransitionName,k=c.popupStyle,P=c.mask,M=c.maskAnimation,O=c.maskTransitionName,N=c.maskMotion,L=c.zIndex,$=c.popup,j=c.stretch,U=c.alignPoint,G=c.mobile,Z=c.forceRender,Q=c.onPopupClick,J=s.state,re=J.popupVisible,ne=J.point,ge=s.getPopupAlign(),ie={};return s.isMouseEnterToShow()&&(ie.onMouseEnter=s.onPopupMouseEnter),s.isMouseLeaveToHide()&&(ie.onMouseLeave=s.onPopupMouseLeave),ie.onMouseDown=s.onPopupMouseDown,ie.onTouchStart=s.onPopupMouseDown,A(mB,{prefixCls:f,destroyPopupOnHide:p,visible:re,point:U&&ne,className:g,align:ge,onAlign:v,animation:_,getClassNameFromAlign:s.getPopupClassNameFromAlign,...ie,stretch:j,getRootDomNode:s.getRootDomNode,style:k,mask:P,zIndex:L,transitionName:T,maskAnimation:M,maskTransitionName:O,maskMotion:N,ref:s.popupRef,motion:b,mobile:G,forceRender:Z,onClick:Q,children:typeof $=="function"?$():$})}),ae(zn(s),"attachParent",function(c){ur.cancel(s.attachId);var f=s.props,p=f.getPopupContainer,g=f.getDocument,v=s.getRootDomNode(),b;p?(v||p.length===0)&&(b=p(v)):b=g(s.getRootDomNode()).body,b?b.appendChild(c):s.attachId=ur(function(){s.attachParent(c)})}),ae(zn(s),"getContainer",function(){if(!s.portalContainer){var c=s.props.getDocument,f=c(s.getRootDomNode()).createElement("div");f.style.position="absolute",f.style.top="0",f.style.left="0",f.style.width="100%",s.portalContainer=f}return s.attachParent(s.portalContainer),s.portalContainer}),ae(zn(s),"setPoint",function(c){var f=s.props.alignPoint;!f||!c||s.setState({point:{pageX:c.pageX,pageY:c.pageY}})}),ae(zn(s),"handlePortalUpdate",function(){s.state.prevPopupVisible!==s.state.popupVisible&&s.props.afterPopupVisibleChange(s.state.popupVisible)}),ae(zn(s),"triggerContextValue",{onPopupMouseDown:s.onPopupMouseDown});var o;return"popupVisible"in a?o=!!a.popupVisible:o=!!a.defaultPopupVisible,s.state={prevPopupVisible:o,popupVisible:o},Ste.forEach(function(c){s["fire".concat(c)]=function(f){s.fireEvents(c,f)}}),s}return jr(i,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var s=this.props,o=this.state;if(o.popupVisible){var c;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(c=s.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Jo(c,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(c=c||s.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Jo(c,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(c=c||s.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Jo(c,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Jo(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),ur.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var s;return((s=this.popupRef.current)===null||s===void 0?void 0:s.getElement())||null}},{key:"getPopupAlign",value:function(){var s=this.props,o=s.popupPlacement,c=s.popupAlign,f=s.builtinPlacements;return o&&f?$ee(f,o,c):c}},{key:"setPopupVisible",value:function(s,o){var c=this.props.alignPoint,f=this.state.popupVisible;this.clearDelayTimer(),f!==s&&("popupVisible"in this.props||this.setState({popupVisible:s,prevPopupVisible:f}),this.props.onPopupVisibleChange(s)),c&&o&&s&&this.setPoint(o)}},{key:"delaySetPopupVisible",value:function(s,o,c){var f=this,p=o*1e3;if(this.clearDelayTimer(),p){var g=c?{pageX:c.pageX,pageY:c.pageY}:null;this.delayTimer=window.setTimeout(function(){f.setPopupVisible(s,g),f.clearDelayTimer()},p)}else this.setPopupVisible(s,c)}},{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(s){var o=this.props.children.props,c=this.props;return o[s]&&c[s]?this["fire".concat(s)]:o[s]||c[s]}},{key:"isClickToShow",value:function(){var s=this.props,o=s.action,c=s.showAction;return o.indexOf("click")!==-1||c.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var s=this.props.action;return s==="contextMenu"||s.length===1&&s[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var s=this.props,o=s.action,c=s.showAction;return o.indexOf("contextMenu")!==-1||c.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var s=this.props,o=s.action,c=s.hideAction;return o.indexOf("click")!==-1||c.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var s=this.props,o=s.action,c=s.showAction;return o.indexOf("hover")!==-1||c.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var s=this.props,o=s.action,c=s.hideAction;return o.indexOf("hover")!==-1||c.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var s=this.props,o=s.action,c=s.showAction;return o.indexOf("focus")!==-1||c.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var s=this.props,o=s.action,c=s.hideAction;return o.indexOf("focus")!==-1||c.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var s;(s=this.popupRef.current)===null||s===void 0||s.forceAlign()}}},{key:"fireEvents",value:function(s,o){var c=this.props.children.props[s];c&&c(o);var f=this.props[s];f&&f(o)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var s=this.state.popupVisible,o=this.props,c=o.children,f=o.forceRender,p=o.alignPoint,g=o.className,v=o.autoDestroy,b=E.exports.Children.only(c),_={key:"trigger"};this.isContextMenuToShow()?_.onContextMenu=this.onContextMenu:_.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(_.onClick=this.onClick,_.onMouseDown=this.onMouseDown,_.onTouchStart=this.onTouchStart):(_.onClick=this.createTwoChains("onClick"),_.onMouseDown=this.createTwoChains("onMouseDown"),_.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(_.onMouseEnter=this.onMouseEnter,p&&(_.onMouseMove=this.onMouseMove)):_.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?_.onMouseLeave=this.onMouseLeave:_.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(_.onFocus=this.onFocus,_.onBlur=this.onBlur):(_.onFocus=this.createTwoChains("onFocus"),_.onBlur=this.createTwoChains("onBlur"));var T=He(b&&b.props&&b.props.className,g);T&&(_.className=T);var k=fe({},_);Lh(b)&&(k.ref=La(this.triggerRef,b.ref));var P=E.exports.cloneElement(b,k),M;return(s||this.popupRef.current||f)&&(M=A(e,{getContainer:this.getContainer,didUpdate:this.handlePortalUpdate,children:this.getComponent()},"portal")),!s&&v&&(M=null),it(bD.Provider,{value:this.triggerContextValue,children:[P,M]})}}],[{key:"getDerivedStateFromProps",value:function(s,o){var c=s.popupVisible,f={};return c!==void 0&&o.popupVisible!==c&&(f.popupVisible=c,f.prevPopupVisible=o.popupVisible),f}}]),i}(E.exports.Component);return ae(t,"contextType",bD),ae(t,"defaultProps",{prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:wte,getDocument:Cte,onPopupVisibleChange:$C,afterPopupVisibleChange:$C,onPopupAlign:$C,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 W_=Ete(Fee);var Pte=["prefixCls","disabled","visible","children","popupElement","containerWidth","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Tte=function(t){var n=t===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:n,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:n,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:n,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:n,adjustY:1}}}},kte=function(t,n){var r=t.prefixCls;t.disabled;var i=t.visible,a=t.children,s=t.popupElement,o=t.containerWidth,c=t.animation,f=t.transitionName,p=t.dropdownStyle,g=t.dropdownClassName,v=t.direction,b=v===void 0?"ltr":v,_=t.placement,T=t.dropdownMatchSelectWidth,k=t.dropdownRender,P=t.dropdownAlign,M=t.getPopupContainer,O=t.empty,N=t.getTriggerDOMNode,L=t.onPopupVisibleChange,$=t.onPopupMouseEnter,j=In(t,Pte),U="".concat(r,"-dropdown"),G=s;k&&(G=k(s));var Z=E.exports.useMemo(function(){return Tte(T)},[T]),Q=c?"".concat(U,"-").concat(c):f,J=E.exports.useRef(null);E.exports.useImperativeHandle(n,function(){return{getPopupElement:function(){return J.current}}});var re=fe({minWidth:o},p);return typeof T=="number"?re.width=T:T&&(re.width=o),A(W_,{...j,showAction:L?["click"]:[],hideAction:L?["click"]:[],popupPlacement:_||(b==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Z,prefixCls:U,popupTransitionName:Q,popup:A("div",{ref:J,onMouseEnter:$,children:G}),popupAlign:P,popupVisible:i,getPopupContainer:M,popupClassName:He(g,ae({},"".concat(U,"-empty"),O)),popupStyle:re,getTriggerDOMNode:N,onPopupVisibleChange:L,children:a})},gB=E.exports.forwardRef(kte);gB.displayName="SelectTrigger";function _D(e,t){var n=e.key,r;return"value"in e&&(r=e.value),n!=null?n:r!==void 0?r:"rc-index-key-".concat(t)}function vB(e,t){var n=e||{},r=n.label,i=n.value,a=n.options;return{label:r||(t?"children":"label"),value:i||"value",options:a||"options"}}function Ite(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.fieldNames,r=t.childrenAsData,i=[],a=vB(n,!1),s=a.label,o=a.value,c=a.options;function f(p,g){p.forEach(function(v){var b=v[s];if(g||!(c in v)){var _=v[o];i.push({key:_D(v,i.length),groupOption:g,data:v,label:b,value:_})}else{var T=b;T===void 0&&r&&(T=v.label),i.push({key:_D(v,i.length),group:!0,data:v,label:T}),f(v[c],!0)}})}return f(e,!1),i}function D4(e){var t=fe({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Nr(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}function Mte(e,t){if(!t||!t.length)return null;var n=!1;function r(a,s){var o=QP(s),c=o[0],f=o.slice(1);if(!c)return[a];var p=a.split(c);return n=n||p.length>1,p.reduce(function(g,v){return[].concat(Rt(g),Rt(r(v,f)))},[]).filter(function(g){return g})}var i=r(e,t);return n?i:null}var Rte=["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"],Dte=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function O4(e){return e==="tags"||e==="multiple"}var yB=E.exports.forwardRef(function(e,t){var n,r,i=e.id,a=e.prefixCls,s=e.className,o=e.showSearch,c=e.tagRender,f=e.direction,p=e.omitDomProps,g=e.displayValues,v=e.onDisplayValuesChange,b=e.emptyOptions,_=e.notFoundContent,T=_===void 0?"Not Found":_,k=e.onClear,P=e.mode,M=e.disabled,O=e.loading,N=e.getInputElement,L=e.getRawInputElement,$=e.open,j=e.defaultOpen,U=e.onDropdownVisibleChange,G=e.activeValue,Z=e.onActiveValueChange,Q=e.activeDescendantId,J=e.searchValue,re=e.autoClearSearchValue,ne=e.onSearch,ge=e.onSearchSplit,ie=e.tokenSeparators,ue=e.allowClear,oe=e.showArrow,me=e.inputIcon,Te=e.clearIcon,we=e.OptionList,be=e.animation,Re=e.transitionName,Ee=e.dropdownStyle,Me=e.dropdownClassName,Ae=e.dropdownMatchSelectWidth,Fe=e.dropdownRender,We=e.dropdownAlign,je=e.placement,pt=e.getPopupContainer,gt=e.showAction,Ot=gt===void 0?[]:gt,Ze=e.onFocus,St=e.onBlur,ot=e.onKeyUp,vt=e.onKeyDown,yt=e.onMouseDown,kt=In(e,Rte),et=O4(P),ut=(o!==void 0?o:et)||P==="combobox",at=fe({},kt);Dte.forEach(function(Dn){delete at[Dn]}),p==null||p.forEach(function(Dn){delete at[Dn]});var Ke=E.exports.useState(!1),ct=$e(Ke,2),bt=ct[0],At=ct[1];E.exports.useEffect(function(){At(G$())},[]);var Lt=E.exports.useRef(null),Ht=E.exports.useRef(null),ze=E.exports.useRef(null),Qe=E.exports.useRef(null),Zt=E.exports.useRef(null),an=cee(),Kt=$e(an,3),Vt=Kt[0],It=Kt[1],Xt=Kt[2];E.exports.useImperativeHandle(t,function(){var Dn,Mn;return{focus:(Dn=Qe.current)===null||Dn===void 0?void 0:Dn.focus,blur:(Mn=Qe.current)===null||Mn===void 0?void 0:Mn.blur,scrollTo:function(ei){var _r;return(_r=Zt.current)===null||_r===void 0?void 0:_r.scrollTo(ei)}}});var pn=E.exports.useMemo(function(){var Dn;if(P!=="combobox")return J;var Mn=(Dn=g[0])===null||Dn===void 0?void 0:Dn.value;return typeof Mn=="string"||typeof Mn=="number"?String(Mn):""},[J,P,g]),tt=P==="combobox"&&typeof N=="function"&&N()||null,Nt=typeof L=="function"&&L(),qt=u6(Ht,Nt==null||(n=Nt.props)===null||n===void 0?void 0:n.ref),En=Si(void 0,{defaultValue:j,value:$}),yn=$e(En,2),Et=yn[0],Pn=yn[1],_n=Et,tn=!T&&b;(M||tn&&_n&&P==="combobox")&&(_n=!1);var zt=tn?!1:_n,dt=E.exports.useCallback(function(Dn){var Mn=Dn!==void 0?Dn:!_n;M||(Pn(Mn),_n!==Mn&&(U==null||U(Mn)))},[M,_n,Pn,U]),mt=E.exports.useMemo(function(){return(ie||[]).some(function(Dn){return[`
`,`\r
`].includes(Dn)})},[ie]),$t=function(Mn,Nn,ei){var _r=!0,Wn=Mn;Z==null||Z(null);var Bn=ei?null:Mte(Mn,ie);return P!=="combobox"&&Bn&&(Wn="",ge==null||ge(Bn),dt(!1),_r=!1),ne&&pn!==Wn&&ne(Wn,{source:Nn?"typing":"effect"}),_r},Wt=function(Mn){!Mn||!Mn.trim()||ne(Mn,{source:"submit"})};E.exports.useEffect(function(){!_n&&!et&&P!=="combobox"&&$t("",!1,!1)},[_n]),E.exports.useEffect(function(){Et&&M&&Pn(!1),M&&It(!1)},[M]);var mn=X$(),An=$e(mn,2),Qn=An[0],Jn=An[1],ye=function(Mn){var Nn=Qn(),ei=Mn.which;if(ei===Tt.ENTER&&(P!=="combobox"&&Mn.preventDefault(),_n||dt(!0)),Jn(!!pn),ei===Tt.BACKSPACE&&!Nn&&et&&!pn&&g.length){for(var _r=Rt(g),Wn=null,Bn=_r.length-1;Bn>=0;Bn-=1){var rr=_r[Bn];if(!rr.disabled){_r.splice(Bn,1),Wn=rr;break}}Wn&&v(_r,{type:"remove",values:[Wn]})}for(var Sr=arguments.length,Pr=new Array(Sr>1?Sr-1:0),Wr=1;Wr<Sr;Wr++)Pr[Wr-1]=arguments[Wr];if(_n&&Zt.current){var Mo;(Mo=Zt.current).onKeyDown.apply(Mo,[Mn].concat(Pr))}vt==null||vt.apply(void 0,[Mn].concat(Pr))},W=function(Mn){for(var Nn=arguments.length,ei=new Array(Nn>1?Nn-1:0),_r=1;_r<Nn;_r++)ei[_r-1]=arguments[_r];if(_n&&Zt.current){var Wn;(Wn=Zt.current).onKeyUp.apply(Wn,[Mn].concat(ei))}ot==null||ot.apply(void 0,[Mn].concat(ei))},X=function(Mn){var Nn=g.filter(function(ei){return ei!==Mn});v(Nn,{type:"remove",values:[Mn]})},de=E.exports.useRef(!1),le=function(){It(!0),M||(Ze&&!de.current&&Ze.apply(void 0,arguments),Ot.includes("focus")&&dt(!0)),de.current=!0},xe=function(){It(!1,function(){de.current=!1,dt(!1)}),!M&&(pn&&(P==="tags"?ne(pn,{source:"submit"}):P==="multiple"&&ne("",{source:"blur"})),St&&St.apply(void 0,arguments))},Ie=[];E.exports.useEffect(function(){return function(){Ie.forEach(function(Dn){return clearTimeout(Dn)}),Ie.splice(0,Ie.length)}},[]);var Ce=function(Mn){var Nn,ei=Mn.target,_r=(Nn=ze.current)===null||Nn===void 0?void 0:Nn.getPopupElement();if(_r&&_r.contains(ei)){var Wn=setTimeout(function(){var Pr=Ie.indexOf(Wn);if(Pr!==-1&&Ie.splice(Pr,1),Xt(),!bt&&!_r.contains(document.activeElement)){var Wr;(Wr=Qe.current)===null||Wr===void 0||Wr.focus()}});Ie.push(Wn)}for(var Bn=arguments.length,rr=new Array(Bn>1?Bn-1:0),Sr=1;Sr<Bn;Sr++)rr[Sr-1]=arguments[Sr];yt==null||yt.apply(void 0,[Mn].concat(rr))},Pe=E.exports.useState(null),Le=$e(Pe,2),Xe=Le[0],Ye=Le[1],Ue=E.exports.useState({}),Bt=$e(Ue,2),Pt=Bt[1];function nt(){Pt({})}Ci(function(){if(zt){var Dn,Mn=Math.ceil((Dn=Lt.current)===null||Dn===void 0?void 0:Dn.offsetWidth);Xe!==Mn&&!Number.isNaN(Mn)&&Ye(Mn)}},[zt]);var Ft;Nt&&(Ft=function(Mn){dt(Mn)}),dee(function(){var Dn;return[Lt.current,(Dn=ze.current)===null||Dn===void 0?void 0:Dn.getPopupElement()]},zt,dt,!!Nt);var Gt=E.exports.useMemo(function(){return fe(fe({},e),{},{notFoundContent:T,open:_n,triggerOpen:zt,id:i,showSearch:ut,multiple:et,toggleOpen:dt})},[e,T,zt,_n,i,ut,et,dt]),wn=oe!==void 0?oe:O||!et&&P!=="combobox",dn;wn&&(dn=A(mb,{className:He("".concat(a,"-arrow"),ae({},"".concat(a,"-arrow-loading"),O)),customizeIcon:me,customizeIconProps:{loading:O,searchValue:pn,open:_n,focused:Vt,showSearch:ut}}));var Cn,jn=function(){var Mn;k==null||k(),(Mn=Qe.current)===null||Mn===void 0||Mn.focus(),v([],{type:"clear",values:g}),$t("",!1,!1)};!M&&ue&&(g.length||pn)&&!(P==="combobox"&&pn==="")&&(Cn=A(mb,{className:"".concat(a,"-clear"),onMouseDown:jn,customizeIcon:Te,children:"\xD7"}));var or=A(we,{ref:Zt}),Kr=He(a,s,(r={},ae(r,"".concat(a,"-focused"),Vt),ae(r,"".concat(a,"-multiple"),et),ae(r,"".concat(a,"-single"),!et),ae(r,"".concat(a,"-allow-clear"),ue),ae(r,"".concat(a,"-show-arrow"),wn),ae(r,"".concat(a,"-disabled"),M),ae(r,"".concat(a,"-loading"),O),ae(r,"".concat(a,"-open"),_n),ae(r,"".concat(a,"-customize-input"),tt),ae(r,"".concat(a,"-show-search"),ut),r)),dr=A(gB,{ref:ze,disabled:M,prefixCls:a,visible:zt,popupElement:or,containerWidth:Xe,animation:be,transitionName:Re,dropdownStyle:Ee,dropdownClassName:Me,direction:f,dropdownMatchSelectWidth:Ae,dropdownRender:Fe,dropdownAlign:We,placement:je,getPopupContainer:pt,empty:b,getTriggerDOMNode:function(){return Ht.current},onPopupVisibleChange:Ft,onPopupMouseEnter:nt,children:Nt?E.exports.cloneElement(Nt,{ref:qt}):A(nB,{...e,domRef:Ht,prefixCls:a,inputElement:tt,ref:Qe,id:i,showSearch:ut,autoClearSearchValue:re,mode:P,activeDescendantId:Q,tagRender:c,values:g,open:_n,onToggleOpen:dt,activeValue:G,searchValue:pn,onSearch:$t,onSearchSubmit:Wt,onRemove:X,tokenWithEnter:mt})}),Lr;return Nt?Lr=dr:Lr=it("div",{className:Kr,...at,ref:Lt,onMouseDown:Ce,onKeyDown:ye,onKeyUp:W,onFocus:le,onBlur:xe,children:[Vt&&!_n&&A("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite",children:"".concat(g.map(function(Dn){var Mn=Dn.label,Nn=Dn.value;return["number","string"].includes(on(Mn))?Mn:Nn}).join(", "))}),dr,dn,Cn]}),A(q$.Provider,{value:Gt,children:Lr})});const Ote=function(e,t){var n=E.exports.useRef({values:new Map,options:new Map}),r=E.exports.useMemo(function(){var a=n.current,s=a.values,o=a.options,c=e.map(function(g){if(g.label===void 0){var v;return fe(fe({},g),{},{label:(v=s.get(g.value))===null||v===void 0?void 0:v.label})}return g}),f=new Map,p=new Map;return c.forEach(function(g){f.set(g.value,g),p.set(g.value,t.get(g.value)||o.get(g.value))}),n.current.values=f,n.current.options=p,c},[e,t]),i=E.exports.useCallback(function(a){return t.get(a)||n.current.options.get(a)},[t]);return[r,i]};function BC(e,t){return eB(e).join("").toUpperCase().includes(t)}const Ate=function(e,t,n,r,i){return E.exports.useMemo(function(){if(!n||r===!1)return e;var a=t.options,s=t.label,o=t.value,c=[],f=typeof r=="function",p=n.toUpperCase(),g=f?r:function(b,_){return i?BC(_[i],p):_[a]?BC(_[s!=="children"?s:"label"],p):BC(_[o],p)},v=f?function(b){return D4(b)}:function(b){return b};return e.forEach(function(b){if(b[a]){var _=g(n,v(b));if(_)c.push(b);else{var T=b[a].filter(function(k){return g(n,v(k))});T.length&&c.push(fe(fe({},b),{},ae({},a,T)))}return}g(n,v(b))&&c.push(b)}),c},[e,r,i,n,t])};var wD=0,Nte=ko();function Lte(){var e;return Nte?(e=wD,wD+=1):e="TEST_OR_SSR",e}function xB(e){var t=E.exports.useState(),n=$e(t,2),r=n[0],i=n[1];return E.exports.useEffect(function(){i("rc_select_".concat(Lte()))},[]),e||r}var Fte=["children","value"],zte=["children"];function $te(e){var t=e,n=t.key,r=t.props,i=r.children,a=r.value,s=In(r,Fte);return fe({key:n,value:a!==void 0?a:n,children:i},s)}function bB(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return To(e).map(function(n,r){if(!E.exports.isValidElement(n)||!n.type)return null;var i=n,a=i.type.isSelectOptGroup,s=i.key,o=i.props,c=o.children,f=In(o,zte);return t||!a?$te(n):fe(fe({key:"__RC_SELECT_GRP__".concat(s===null?r:s,"__"),label:s},f),{},{options:bB(c)})}).filter(function(n){return n})}function Bte(e,t,n,r,i){return E.exports.useMemo(function(){var a=e,s=!e;s&&(a=bB(t));var o=new Map,c=new Map,f=function(v,b,_){_&&typeof _=="string"&&v.set(b[_],b)};function p(g){for(var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,b=0;b<g.length;b+=1){var _=g[b];!_[n.options]||v?(o.set(_[n.value],_),f(c,_,n.label),f(c,_,r),f(c,_,i)):p(_[n.options],!0)}}return p(a),{options:a,valueOptions:o,labelOptions:c}},[e,t,n,r,i])}function CD(e){var t=E.exports.useRef();t.current=e;var n=E.exports.useCallback(function(){return t.current.apply(t,arguments)},[]);return n}var xT=function(){return null};xT.isSelectOptGroup=!0;var bT=function(){return null};bT.isSelectOption=!0;var _B=E.exports.forwardRef(function(e,t){var n=e.height,r=e.offset,i=e.children,a=e.prefixCls,s=e.onInnerResize,o=e.innerProps,c={},f={display:"flex",flexDirection:"column"};return r!==void 0&&(c={height:n,position:"relative",overflow:"hidden"},f=fe(fe({},f),{},{transform:"translateY(".concat(r,"px)"),position:"absolute",left:0,right:0,top:0})),A("div",{style:c,children:A(tu,{onResize:function(g){var v=g.offsetHeight;v&&s&&s()},children:A("div",{style:f,className:He(ae({},"".concat(a,"-holder-inner"),a)),ref:t,...o,children:i})})})});_B.displayName="Filler";var Vte=20;function SD(e){return"touches"in e?e.touches[0].pageY:e.pageY}var Ute=function(e){ai(n,e);var t=si(n);function n(){var r;Ur(this,n);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),r.moveRaf=null,r.scrollbarRef=E.exports.createRef(),r.thumbRef=E.exports.createRef(),r.visibleTimeout=null,r.state={dragging:!1,pageY:null,startTop:null,visible:!1},r.delayHidden=function(){clearTimeout(r.visibleTimeout),r.setState({visible:!0}),r.visibleTimeout=setTimeout(function(){r.setState({visible:!1})},2e3)},r.onScrollbarTouchStart=function(o){o.preventDefault()},r.onContainerMouseDown=function(o){o.stopPropagation(),o.preventDefault()},r.patchEvents=function(){window.addEventListener("mousemove",r.onMouseMove),window.addEventListener("mouseup",r.onMouseUp),r.thumbRef.current.addEventListener("touchmove",r.onMouseMove),r.thumbRef.current.addEventListener("touchend",r.onMouseUp)},r.removeEvents=function(){var o;window.removeEventListener("mousemove",r.onMouseMove),window.removeEventListener("mouseup",r.onMouseUp),(o=r.scrollbarRef.current)===null||o===void 0||o.removeEventListener("touchstart",r.onScrollbarTouchStart),r.thumbRef.current&&(r.thumbRef.current.removeEventListener("touchstart",r.onMouseDown),r.thumbRef.current.removeEventListener("touchmove",r.onMouseMove),r.thumbRef.current.removeEventListener("touchend",r.onMouseUp)),ur.cancel(r.moveRaf)},r.onMouseDown=function(o){var c=r.props.onStartMove;r.setState({dragging:!0,pageY:SD(o),startTop:r.getTop()}),c(),r.patchEvents(),o.stopPropagation(),o.preventDefault()},r.onMouseMove=function(o){var c=r.state,f=c.dragging,p=c.pageY,g=c.startTop,v=r.props.onScroll;if(ur.cancel(r.moveRaf),f){var b=SD(o)-p,_=g+b,T=r.getEnableScrollRange(),k=r.getEnableHeightRange(),P=k?_/k:0,M=Math.ceil(P*T);r.moveRaf=ur(function(){v(M)})}},r.onMouseUp=function(){var o=r.props.onStopMove;r.setState({dragging:!1}),o(),r.removeEvents()},r.getSpinHeight=function(){var o=r.props,c=o.height,f=o.count,p=c/f*10;return p=Math.max(p,Vte),p=Math.min(p,c/2),Math.floor(p)},r.getEnableScrollRange=function(){var o=r.props,c=o.scrollHeight,f=o.height;return c-f||0},r.getEnableHeightRange=function(){var o=r.props.height,c=r.getSpinHeight();return o-c||0},r.getTop=function(){var o=r.props.scrollTop,c=r.getEnableScrollRange(),f=r.getEnableHeightRange();if(o===0||c===0)return 0;var p=o/c;return p*f},r.showScroll=function(){var o=r.props,c=o.height,f=o.scrollHeight;return f>c},r}return jr(n,[{key:"componentDidMount",value:function(){this.scrollbarRef.current.addEventListener("touchstart",this.onScrollbarTouchStart),this.thumbRef.current.addEventListener("touchstart",this.onMouseDown)}},{key:"componentDidUpdate",value:function(i){i.scrollTop!==this.props.scrollTop&&this.delayHidden()}},{key:"componentWillUnmount",value:function(){this.removeEvents(),clearTimeout(this.visibleTimeout)}},{key:"render",value:function(){var i=this.state,a=i.dragging,s=i.visible,o=this.props.prefixCls,c=this.getSpinHeight(),f=this.getTop(),p=this.showScroll(),g=p&&s;return A("div",{ref:this.scrollbarRef,className:He("".concat(o,"-scrollbar"),ae({},"".concat(o,"-scrollbar-show"),p)),style:{width:8,top:0,bottom:0,right:0,position:"absolute",display:g?null:"none"},onMouseDown:this.onContainerMouseDown,onMouseMove:this.delayHidden,children:A("div",{ref:this.thumbRef,className:He("".concat(o,"-scrollbar-thumb"),ae({},"".concat(o,"-scrollbar-thumb-moving"),a)),style:{width:"100%",height:c,top:f,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"},onMouseDown:this.onMouseDown})})}}]),n}(E.exports.Component);function jte(e){var t=e.children,n=e.setRef,r=E.exports.useCallback(function(i){n(i)},[]);return E.exports.cloneElement(t,{ref:r})}function Hte(e,t,n,r,i,a){var s=a.getKey;return e.slice(t,n+1).map(function(o,c){var f=t+c,p=i(o,f,{}),g=s(o);return A(jte,{setRef:function(b){return r(o,b)},children:p},g)})}var Kte=function(){function e(){Ur(this,e),this.maps=void 0,this.maps=Object.create(null)}return jr(e,[{key:"set",value:function(n,r){this.maps[n]=r}},{key:"get",value:function(n){return this.maps[n]}}]),e}();function Wte(e,t,n){var r=E.exports.useState(0),i=$e(r,2),a=i[0],s=i[1],o=E.exports.useRef(new Map),c=E.exports.useRef(new Kte),f=E.exports.useRef();function p(){ur.cancel(f.current)}function g(){p(),f.current=ur(function(){o.current.forEach(function(b,_){if(b&&b.offsetParent){var T=_g(b),k=T.offsetHeight;c.current.get(_)!==k&&c.current.set(_,T.offsetHeight)}}),s(function(b){return b+1})})}function v(b,_){var T=e(b),k=o.current.get(T);_?(o.current.set(T,_),g()):o.current.delete(T),!k!=!_&&(_?t==null||t(b):n==null||n(b))}return E.exports.useEffect(function(){return p},[]),[v,g,c.current,a]}function Gte(e,t,n,r,i,a,s,o){var c=E.exports.useRef();return function(f){if(f==null){o();return}if(ur.cancel(c.current),typeof f=="number")s(f);else if(f&&on(f)==="object"){var p,g=f.align;"index"in f?p=f.index:p=t.findIndex(function(T){return i(T)===f.key});var v=f.offset,b=v===void 0?0:v,_=function T(k,P){if(!(k<0||!e.current)){var M=e.current.clientHeight,O=!1,N=P;if(M){for(var L=P||g,$=0,j=0,U=0,G=Math.min(t.length,p),Z=0;Z<=G;Z+=1){var Q=i(t[Z]);j=$;var J=n.get(Q);U=j+(J===void 0?r:J),$=U,Z===p&&J===void 0&&(O=!0)}var re=null;switch(L){case"top":re=j-b;break;case"bottom":re=U-M+b;break;default:{var ne=e.current.scrollTop,ge=ne+M;j<ne?N="top":U>ge&&(N="bottom")}}re!==null&&re!==e.current.scrollTop&&s(re)}c.current=ur(function(){O&&a(),T(k-1,N)},2)}};_(3)}}}function qte(e,t,n){var r=e.length,i=t.length,a,s;if(r===0&&i===0)return null;r<i?(a=e,s=t):(a=t,s=e);var o={__EMPTY_ITEM__:!0};function c(_){return _!==void 0?n(_):o}for(var f=null,p=Math.abs(r-i)!==1,g=0;g<s.length;g+=1){var v=c(a[g]),b=c(s[g]);if(v!==b){f=g,p=p||v!==c(s[g+1]);break}}return f===null?null:{index:f,multiple:p}}function Zte(e,t,n){var r=E.exports.useState(e),i=$e(r,2),a=i[0],s=i[1],o=E.exports.useState(null),c=$e(o,2),f=c[0],p=c[1];return E.exports.useEffect(function(){var g=qte(a||[],e||[],t);(g==null?void 0:g.index)!==void 0&&(n==null||n(g.index),p(e[g.index])),s(e)},[e]),[f]}var Xte=(typeof navigator>"u"?"undefined":on(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const wB=function(e,t){var n=E.exports.useRef(!1),r=E.exports.useRef(null);function i(){clearTimeout(r.current),n.current=!0,r.current=setTimeout(function(){n.current=!1},50)}var a=E.exports.useRef({top:e,bottom:t});return a.current.top=e,a.current.bottom=t,function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,c=s<0&&a.current.top||s>0&&a.current.bottom;return o&&c?(clearTimeout(r.current),n.current=!1):(!c||n.current)&&i(),!n.current&&c}};function Yte(e,t,n,r){var i=E.exports.useRef(0),a=E.exports.useRef(null),s=E.exports.useRef(null),o=E.exports.useRef(!1),c=wB(t,n);function f(g){if(!!e){ur.cancel(a.current);var v=g.deltaY;i.current+=v,s.current=v,!c(v)&&(Xte||g.preventDefault(),a.current=ur(function(){var b=o.current?10:1;r(i.current*b),i.current=0}))}}function p(g){!e||(o.current=g.detail===s.current)}return[f,p]}var Qte=14/15;function Jte(e,t,n){var r=E.exports.useRef(!1),i=E.exports.useRef(0),a=E.exports.useRef(null),s=E.exports.useRef(null),o,c=function(v){if(r.current){var b=Math.ceil(v.touches[0].pageY),_=i.current-b;i.current=b,n(_)&&v.preventDefault(),clearInterval(s.current),s.current=setInterval(function(){_*=Qte,(!n(_,!0)||Math.abs(_)<=.1)&&clearInterval(s.current)},16)}},f=function(){r.current=!1,o()},p=function(v){o(),v.touches.length===1&&!r.current&&(r.current=!0,i.current=Math.ceil(v.touches[0].pageY),a.current=v.target,a.current.addEventListener("touchmove",c),a.current.addEventListener("touchend",f))};o=function(){a.current&&(a.current.removeEventListener("touchmove",c),a.current.removeEventListener("touchend",f))},Ci(function(){return e&&t.current.addEventListener("touchstart",p),function(){var g;(g=t.current)===null||g===void 0||g.removeEventListener("touchstart",p),o(),clearInterval(s.current)}},[e])}var ene=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","component","onScroll","onVisibleChange","innerProps"],tne=[],nne={overflowY:"auto",overflowAnchor:"none"};function rne(e,t){var n=e.prefixCls,r=n===void 0?"rc-virtual-list":n,i=e.className,a=e.height,s=e.itemHeight,o=e.fullHeight,c=o===void 0?!0:o,f=e.style,p=e.data,g=e.children,v=e.itemKey,b=e.virtual,_=e.component,T=_===void 0?"div":_,k=e.onScroll,P=e.onVisibleChange,M=e.innerProps,O=In(e,ene),N=!!(b!==!1&&a&&s),L=N&&p&&s*p.length>a,$=E.exports.useState(0),j=$e($,2),U=j[0],G=j[1],Z=E.exports.useState(!1),Q=$e(Z,2),J=Q[0],re=Q[1],ne=He(r,i),ge=p||tne,ie=E.exports.useRef(),ue=E.exports.useRef(),oe=E.exports.useRef(),me=E.exports.useCallback(function(Vt){return typeof v=="function"?v(Vt):Vt==null?void 0:Vt[v]},[v]),Te={getKey:me};function we(Vt){G(function(It){var Xt;typeof Vt=="function"?Xt=Vt(It):Xt=Vt;var pn=ut(Xt);return ie.current.scrollTop=pn,pn})}var be=E.exports.useRef({start:0,end:ge.length}),Re=E.exports.useRef(),Ee=Zte(ge,me),Me=$e(Ee,1),Ae=Me[0];Re.current=Ae;var Fe=Wte(me,null,null),We=$e(Fe,4),je=We[0],pt=We[1],gt=We[2],Ot=We[3],Ze=E.exports.useMemo(function(){if(!N)return{scrollHeight:void 0,start:0,end:ge.length-1,offset:void 0};if(!L){var Vt;return{scrollHeight:((Vt=ue.current)===null||Vt===void 0?void 0:Vt.offsetHeight)||0,start:0,end:ge.length-1,offset:void 0}}for(var It=0,Xt,pn,tt,Nt=ge.length,qt=0;qt<Nt;qt+=1){var En=ge[qt],yn=me(En),Et=gt.get(yn),Pn=It+(Et===void 0?s:Et);Pn>=U&&Xt===void 0&&(Xt=qt,pn=It),Pn>U+a&&tt===void 0&&(tt=qt),It=Pn}return Xt===void 0&&(Xt=0,pn=0,tt=Math.ceil(a/s)),tt===void 0&&(tt=ge.length-1),tt=Math.min(tt+1,ge.length),{scrollHeight:It,start:Xt,end:tt,offset:pn}},[L,N,U,ge,Ot,a]),St=Ze.scrollHeight,ot=Ze.start,vt=Ze.end,yt=Ze.offset;be.current.start=ot,be.current.end=vt;var kt=St-a,et=E.exports.useRef(kt);et.current=kt;function ut(Vt){var It=Vt;return Number.isNaN(et.current)||(It=Math.min(It,et.current)),It=Math.max(It,0),It}var at=U<=0,Ke=U>=kt,ct=wB(at,Ke);function bt(Vt){var It=Vt;we(It)}function At(Vt){var It=Vt.currentTarget.scrollTop;It!==U&&we(It),k==null||k(Vt)}var Lt=Yte(N,at,Ke,function(Vt){we(function(It){var Xt=It+Vt;return Xt})}),Ht=$e(Lt,2),ze=Ht[0],Qe=Ht[1];Jte(N,ie,function(Vt,It){return ct(Vt,It)?!1:(ze({preventDefault:function(){},deltaY:Vt}),!0)}),Ci(function(){function Vt(It){N&&It.preventDefault()}return ie.current.addEventListener("wheel",ze),ie.current.addEventListener("DOMMouseScroll",Qe),ie.current.addEventListener("MozMousePixelScroll",Vt),function(){ie.current&&(ie.current.removeEventListener("wheel",ze),ie.current.removeEventListener("DOMMouseScroll",Qe),ie.current.removeEventListener("MozMousePixelScroll",Vt))}},[N]);var Zt=Gte(ie,ge,gt,s,me,pt,we,function(){var Vt;(Vt=oe.current)===null||Vt===void 0||Vt.delayHidden()});E.exports.useImperativeHandle(t,function(){return{scrollTo:Zt}}),Ci(function(){if(P){var Vt=ge.slice(ot,vt+1);P(Vt,ge)}},[ot,vt,ge]);var an=Hte(ge,ot,vt,je,g,Te),Kt=null;return a&&(Kt=fe(ae({},c?"height":"maxHeight",a),nne),N&&(Kt.overflowY="hidden",J&&(Kt.pointerEvents="none"))),it("div",{style:fe(fe({},f),{},{position:"relative"}),className:ne,...O,children:[A(T,{className:"".concat(r,"-holder"),style:Kt,ref:ie,onScroll:At,children:A(_B,{prefixCls:r,height:St,offset:yt,onInnerResize:pt,ref:ue,innerProps:M,children:an})}),N&&A(Ute,{ref:oe,prefixCls:r,scrollTop:U,height:a,scrollHeight:St,count:ge.length,onScroll:bt,onStartMove:function(){re(!0)},onStopMove:function(){re(!1)}})]})}var _T=E.exports.forwardRef(rne);_T.displayName="List";function ine(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var CB=E.exports.createContext(null),one=["disabled","title","children","style","className"];function ED(e){return typeof e=="string"||typeof e=="number"}var ane=function(t,n){var r=Z$(),i=r.prefixCls,a=r.id,s=r.open,o=r.multiple,c=r.mode,f=r.searchValue,p=r.toggleOpen,g=r.notFoundContent,v=r.onPopupScroll,b=E.exports.useContext(CB),_=b.flattenOptions,T=b.onActiveValue,k=b.defaultActiveFirstOption,P=b.onSelect,M=b.menuItemSelectedIcon,O=b.rawValues,N=b.fieldNames,L=b.virtual,$=b.listHeight,j=b.listItemHeight,U="".concat(i,"-item"),G=Yg(function(){return _},[s,_],function(Ee,Me){return Me[0]&&Ee[1]!==Me[1]}),Z=E.exports.useRef(null),Q=function(Me){Me.preventDefault()},J=function(Me){Z.current&&Z.current.scrollTo(typeof Me=="number"?{index:Me}:Me)},re=function(Me){for(var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Fe=G.length,We=0;We<Fe;We+=1){var je=(Me+We*Ae+Fe)%Fe,pt=G[je],gt=pt.group,Ot=pt.data;if(!gt&&!Ot.disabled)return je}return-1},ne=E.exports.useState(function(){return re(0)}),ge=$e(ne,2),ie=ge[0],ue=ge[1],oe=function(Me){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;ue(Me);var Fe={source:Ae?"keyboard":"mouse"},We=G[Me];if(!We){T(null,-1,Fe);return}T(We.value,Me,Fe)};E.exports.useEffect(function(){oe(k!==!1?re(0):-1)},[G.length,f]);var me=E.exports.useCallback(function(Ee){return O.has(Ee)&&c!=="combobox"},[c,Rt(O).toString(),O.size]);E.exports.useEffect(function(){var Ee=setTimeout(function(){if(!o&&s&&O.size===1){var Ae=Array.from(O)[0],Fe=G.findIndex(function(We){var je=We.data;return je.value===Ae});Fe!==-1&&(oe(Fe),J(Fe))}});if(s){var Me;(Me=Z.current)===null||Me===void 0||Me.scrollTo(void 0)}return function(){return clearTimeout(Ee)}},[s,f]);var Te=function(Me){Me!==void 0&&P(Me,{selected:!O.has(Me)}),o||p(!1)};if(E.exports.useImperativeHandle(n,function(){return{onKeyDown:function(Me){var Ae=Me.which,Fe=Me.ctrlKey;switch(Ae){case Tt.N:case Tt.P:case Tt.UP:case Tt.DOWN:{var We=0;if(Ae===Tt.UP?We=-1:Ae===Tt.DOWN?We=1:ine()&&Fe&&(Ae===Tt.N?We=1:Ae===Tt.P&&(We=-1)),We!==0){var je=re(ie+We,We);J(je),oe(je,!0)}break}case Tt.ENTER:{var pt=G[ie];pt&&!pt.data.disabled?Te(pt.value):Te(void 0),s&&Me.preventDefault();break}case Tt.ESC:p(!1),s&&Me.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Me){J(Me)}}}),G.length===0)return A("div",{role:"listbox",id:"".concat(a,"_list"),className:"".concat(U,"-empty"),onMouseDown:Q,children:g});var we=Object.keys(N).map(function(Ee){return N[Ee]}),be=function(Me){return Me.label},Re=function(Me){var Ae=G[Me];if(!Ae)return null;var Fe=Ae.data||{},We=Fe.value,je=Ae.group,pt=Ql(Fe,!0),gt=be(Ae);return Ae?E.exports.createElement("div",{"aria-label":typeof gt=="string"&&!je?gt:null,...pt,key:Me,role:je?"presentation":"option",id:"".concat(a,"_list_").concat(Me),"aria-selected":me(We)},We):null};return it(nr,{children:[it("div",{role:"listbox",id:"".concat(a,"_list"),style:{height:0,width:0,overflow:"hidden"},children:[Re(ie-1),Re(ie),Re(ie+1)]}),A(_T,{itemKey:"key",ref:Z,data:G,height:$,itemHeight:j,fullHeight:!1,onMouseDown:Q,onScroll:v,virtual:L,children:function(Ee,Me){var Ae,Fe=Ee.group,We=Ee.groupOption,je=Ee.data,pt=Ee.label,gt=Ee.value,Ot=je.key;if(Fe){var Ze,St=(Ze=je.title)!==null&&Ze!==void 0?Ze:ED(pt)?pt.toString():void 0;return A("div",{className:He(U,"".concat(U,"-group")),title:St,children:pt!==void 0?pt:Ot})}var ot=je.disabled,vt=je.title;je.children;var yt=je.style,kt=je.className,et=In(je,one),ut=Wi(et,we),at=me(gt),Ke="".concat(U,"-option"),ct=He(U,Ke,kt,(Ae={},ae(Ae,"".concat(Ke,"-grouped"),We),ae(Ae,"".concat(Ke,"-active"),ie===Me&&!ot),ae(Ae,"".concat(Ke,"-disabled"),ot),ae(Ae,"".concat(Ke,"-selected"),at),Ae)),bt=be(Ee),At=!M||typeof M=="function"||at,Lt=typeof bt=="number"?bt:bt||gt,Ht=ED(Lt)?Lt.toString():void 0;return vt!==void 0&&(Ht=vt),it("div",{...Ql(ut),"aria-selected":at,className:ct,title:Ht,onMouseMove:function(){ie===Me||ot||oe(Me)},onClick:function(){ot||Te(gt)},style:yt,children:[A("div",{className:"".concat(Ke,"-content"),children:Lt}),E.exports.isValidElement(M)||at,At&&A(mb,{className:"".concat(U,"-option-state"),customizeIcon:M,customizeIconProps:{isSelected:at},children:at?"\u2713":null})]})}})]})},SB=E.exports.forwardRef(ane);SB.displayName="OptionList";var sne=["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"],lne=["inputValue"];function une(e){return!e||on(e)!=="object"}var cne=E.exports.forwardRef(function(e,t){var n=e.id,r=e.mode,i=e.prefixCls,a=i===void 0?"rc-select":i,s=e.backfill,o=e.fieldNames,c=e.inputValue,f=e.searchValue,p=e.onSearch,g=e.autoClearSearchValue,v=g===void 0?!0:g,b=e.onSelect,_=e.onDeselect,T=e.dropdownMatchSelectWidth,k=T===void 0?!0:T,P=e.filterOption,M=e.filterSort,O=e.optionFilterProp,N=e.optionLabelProp,L=e.options,$=e.children,j=e.defaultActiveFirstOption,U=e.menuItemSelectedIcon,G=e.virtual,Z=e.listHeight,Q=Z===void 0?200:Z,J=e.listItemHeight,re=J===void 0?20:J,ne=e.value,ge=e.defaultValue,ie=e.labelInValue,ue=e.onChange,oe=In(e,sne),me=xB(n),Te=O4(r),we=!!(!L&&$),be=E.exports.useMemo(function(){return P===void 0&&r==="combobox"?!1:P},[P,r]),Re=E.exports.useMemo(function(){return vB(o,we)},[JSON.stringify(o),we]),Ee=Si("",{value:f!==void 0?f:c,postState:function(mt){return mt||""}}),Me=$e(Ee,2),Ae=Me[0],Fe=Me[1],We=Bte(L,$,Re,O,N),je=We.valueOptions,pt=We.labelOptions,gt=We.options,Ot=E.exports.useCallback(function(dt){var mt=eB(dt);return mt.map(function($t){var Wt,mn,An,Qn,Jn;if(une($t))Wt=$t;else{var ye;An=$t.key,mn=$t.label,Wt=(ye=$t.value)!==null&&ye!==void 0?ye:An}var W=je.get(Wt);if(W){var X;mn===void 0&&(mn=W==null?void 0:W[N||Re.label]),An===void 0&&(An=(X=W==null?void 0:W.key)!==null&&X!==void 0?X:Wt),Qn=W==null?void 0:W.disabled,Jn=W==null?void 0:W.title}return{label:mn,value:Wt,key:An,disabled:Qn,title:Jn}})},[Re,N,je]),Ze=Si(ge,{value:ne}),St=$e(Ze,2),ot=St[0],vt=St[1],yt=E.exports.useMemo(function(){var dt,mt=Ot(ot);return r==="combobox"&&!((dt=mt[0])!==null&&dt!==void 0&&dt.value)?[]:mt},[ot,Ot,r]),kt=Ote(yt,je),et=$e(kt,2),ut=et[0],at=et[1],Ke=E.exports.useMemo(function(){if(!r&&ut.length===1){var dt=ut[0];if(dt.value===null&&(dt.label===null||dt.label===void 0))return[]}return ut.map(function(mt){var $t;return fe(fe({},mt),{},{label:($t=mt.label)!==null&&$t!==void 0?$t:mt.value})})},[r,ut]),ct=E.exports.useMemo(function(){return new Set(ut.map(function(dt){return dt.value}))},[ut]);E.exports.useEffect(function(){if(r==="combobox"){var dt,mt=(dt=ut[0])===null||dt===void 0?void 0:dt.value;Fe(Mee(mt)?String(mt):"")}},[ut]);var bt=CD(function(dt,mt){var $t,Wt=mt!=null?mt:dt;return $t={},ae($t,Re.value,dt),ae($t,Re.label,Wt),$t}),At=E.exports.useMemo(function(){if(r!=="tags")return gt;var dt=Rt(gt),mt=function(Wt){return je.has(Wt)};return Rt(ut).sort(function($t,Wt){return $t.value<Wt.value?-1:1}).forEach(function($t){var Wt=$t.value;mt(Wt)||dt.push(bt(Wt,$t.label))}),dt},[bt,gt,je,ut,r]),Lt=Ate(At,Re,Ae,be,O),Ht=E.exports.useMemo(function(){return r!=="tags"||!Ae||Lt.some(function(dt){return dt[O||"value"]===Ae})?Lt:[bt(Ae)].concat(Rt(Lt))},[bt,O,r,Lt,Ae]),ze=E.exports.useMemo(function(){return M?Rt(Ht).sort(function(dt,mt){return M(dt,mt)}):Ht},[Ht,M]),Qe=E.exports.useMemo(function(){return Ite(ze,{fieldNames:Re,childrenAsData:we})},[ze,Re,we]),Zt=function(mt){var $t=Ot(mt);if(vt($t),ue&&($t.length!==ut.length||$t.some(function(An,Qn){var Jn;return((Jn=ut[Qn])===null||Jn===void 0?void 0:Jn.value)!==(An==null?void 0:An.value)}))){var Wt=ie?$t:$t.map(function(An){return An.value}),mn=$t.map(function(An){return D4(at(An.value))});ue(Te?Wt:Wt[0],Te?mn:mn[0])}},an=E.exports.useState(null),Kt=$e(an,2),Vt=Kt[0],It=Kt[1],Xt=E.exports.useState(0),pn=$e(Xt,2),tt=pn[0],Nt=pn[1],qt=j!==void 0?j:r!=="combobox",En=E.exports.useCallback(function(dt,mt){var $t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Wt=$t.source,mn=Wt===void 0?"keyboard":Wt;Nt(mt),s&&r==="combobox"&&dt!==null&&mn==="keyboard"&&It(String(dt))},[s,r]),yn=function(mt,$t,Wt){var mn=function(){var Ie,Ce=at(mt);return[ie?{label:Ce==null?void 0:Ce[Re.label],value:mt,key:(Ie=Ce==null?void 0:Ce.key)!==null&&Ie!==void 0?Ie:mt}:mt,D4(Ce)]};if($t&&b){var An=mn(),Qn=$e(An,2),Jn=Qn[0],ye=Qn[1];b(Jn,ye)}else if(!$t&&_&&Wt!=="clear"){var W=mn(),X=$e(W,2),de=X[0],le=X[1];_(de,le)}},Et=CD(function(dt,mt){var $t,Wt=Te?mt.selected:!0;Wt?$t=Te?[].concat(Rt(ut),[dt]):[dt]:$t=ut.filter(function(mn){return mn.value!==dt}),Zt($t),yn(dt,Wt),r==="combobox"?It(""):(!O4||v)&&(Fe(""),It(""))}),Pn=function(mt,$t){Zt(mt);var Wt=$t.type,mn=$t.values;(Wt==="remove"||Wt==="clear")&&mn.forEach(function(An){yn(An.value,!1,Wt)})},_n=function(mt,$t){if(Fe(mt),It(null),$t.source==="submit"){var Wt=(mt||"").trim();if(Wt){var mn=Array.from(new Set([].concat(Rt(ct),[Wt])));Zt(mn),yn(Wt,!0),Fe("")}return}$t.source!=="blur"&&(r==="combobox"&&Zt(mt),p==null||p(mt))},tn=function(mt){var $t=mt;r!=="tags"&&($t=mt.map(function(mn){var An=pt.get(mn);return An==null?void 0:An.value}).filter(function(mn){return mn!==void 0}));var Wt=Array.from(new Set([].concat(Rt(ct),Rt($t))));Zt(Wt),Wt.forEach(function(mn){yn(mn,!0)})},zt=E.exports.useMemo(function(){var dt=G!==!1&&k!==!1;return fe(fe({},We),{},{flattenOptions:Qe,onActiveValue:En,defaultActiveFirstOption:qt,onSelect:Et,menuItemSelectedIcon:U,rawValues:ct,fieldNames:Re,virtual:dt,listHeight:Q,listItemHeight:re,childrenAsData:we})},[We,Qe,En,qt,Et,U,ct,Re,G,k,Q,re,we]);return A(CB.Provider,{value:zt,children:A(yB,{...oe,id:me,prefixCls:a,ref:t,omitDomProps:lne,mode:r,displayValues:Ke,onDisplayValuesChange:Pn,searchValue:Ae,onSearch:_n,autoClearSearchValue:v,onSearchSplit:tn,dropdownMatchSelectWidth:k,OptionList:SB,emptyOptions:!Qe.length,activeValue:Vt,activeDescendantId:"".concat(me,"_list_").concat(tt)})})}),wT=cne;wT.Option=bT;wT.OptGroup=xT;var dne=function(){var t=E.exports.useContext(Fn),n=t.getPrefixCls,r=n("empty-img-default");return A("svg",{className:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg",children:it("g",{fill:"none",fillRule:"evenodd",children:[it("g",{transform:"translate(24 31.67)",children:[A("ellipse",{className:"".concat(r,"-ellipse"),cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),A("path",{className:"".concat(r,"-path-1"),d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"}),A("path",{className:"".concat(r,"-path-2"),d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",transform:"translate(13.56)"}),A("path",{className:"".concat(r,"-path-3"),d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"}),A("path",{className:"".concat(r,"-path-4"),d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"})]}),A("path",{className:"".concat(r,"-path-5"),d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"}),it("g",{className:"".concat(r,"-g"),transform:"translate(149.65 15.383)",children:[A("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),A("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"})]})]})})};const fne=dne;var hne=function(){var t=E.exports.useContext(Fn),n=t.getPrefixCls,r=n("empty-img-simple");return A("svg",{className:r,width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:it("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd",children:[A("ellipse",{className:"".concat(r,"-ellipse"),cx:"32",cy:"33",rx:"32",ry:"7"}),it("g",{className:"".concat(r,"-g"),fillRule:"nonzero",children:[A("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"}),A("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",className:"".concat(r,"-path")})]})]})})};const pne=hne;var mne=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},EB=A(fne,{}),PB=A(pne,{}),CT=function(t){var n=t.className,r=t.prefixCls,i=t.image,a=i===void 0?EB:i,s=t.description,o=t.children,c=t.imageStyle,f=mne(t,["className","prefixCls","image","description","children","imageStyle"]),p=E.exports.useContext(Fn),g=p.getPrefixCls,v=p.direction;return A(Fh,{componentName:"Empty",children:function(b){var _,T=g("empty",r),k=typeof s<"u"?s:b.description,P=typeof k=="string"?k:"empty",M=null;return typeof a=="string"?M=A("img",{alt:P,src:a}):M=a,it("div",{className:He(T,(_={},ae(_,"".concat(T,"-normal"),a===PB),ae(_,"".concat(T,"-rtl"),v==="rtl"),_),n),...f,children:[A("div",{className:"".concat(T,"-image"),style:c,children:M}),k&&A("div",{className:"".concat(T,"-description"),children:k}),o&&A("div",{className:"".concat(T,"-footer"),children:o})]})}})};CT.PRESENTED_IMAGE_DEFAULT=EB;CT.PRESENTED_IMAGE_SIMPLE=PB;const nl=CT;var gne=function(t){return A(Ud,{children:function(n){var r=n.getPrefixCls,i=r("empty");switch(t){case"Table":case"List":return A(nl,{image:nl.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return A(nl,{image:nl.PRESENTED_IMAGE_SIMPLE,className:"".concat(i,"-small")});default:return A(nl,{})}}})};const ST=gne;var As=E.exports.createContext({}),A4=function(t){var n=t.children,r=t.status,i=t.override,a=E.exports.useContext(As),s=E.exports.useMemo(function(){var o=Be({},a);return i&&delete o.isFormItemInput,r&&(delete o.status,delete o.hasFeedback,delete o.feedbackIcon),o},[r,i,a]);return A(As.Provider,{value:s,children:n})},la=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n},vne=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n},VC=function(){return{height:0,opacity:0}},PD=function(t){var n=t.scrollHeight;return{height:n,opacity:1}},yne=function(t){return{height:t?t.offsetHeight:0}},UC=function(t,n){return(n==null?void 0:n.deadline)===!0||n.propertyName==="height"},xne={motionName:"ant-motion-collapse",onAppearStart:VC,onEnterStart:VC,onAppearActive:PD,onEnterActive:PD,onLeaveStart:yne,onLeaveActive:VC,onAppearEnd:UC,onEnterEnd:UC,onLeaveEnd:UC,motionDeadline:500};la("bottomLeft","bottomRight","topLeft","topRight");var TB=function(t){return t!==void 0&&(t==="topLeft"||t==="topRight")?"slide-down":"slide-up"},Ma=function(t,n,r){return r!==void 0?r:"".concat(t,"-").concat(n)};const G_=xne;la("warning","error","");function Yu(e,t,n){var r;return He((r={},ae(r,"".concat(e,"-status-success"),t==="success"),ae(r,"".concat(e,"-status-warning"),t==="warning"),ae(r,"".concat(e,"-status-error"),t==="error"),ae(r,"".concat(e,"-status-validating"),t==="validating"),ae(r,"".concat(e,"-has-feedback"),n),r))}var rv=function(t,n){return n||t},bne={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 _ne=bne;var kB=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:_ne})})};kB.displayName="CheckOutlined";const ET=E.exports.forwardRef(kB);var wne={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 Cne=wne;var IB=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:Cne})})};IB.displayName="DownOutlined";const MB=E.exports.forwardRef(IB);var Sne={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 Ene=Sne;var RB=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:Ene})})};RB.displayName="SearchOutlined";const PT=E.exports.forwardRef(RB);function DB(e){var t=e.suffixIcon,n=e.clearIcon,r=e.menuItemSelectedIcon,i=e.removeIcon,a=e.loading,s=e.multiple,o=e.hasFeedback,c=e.prefixCls,f=e.showArrow,p=e.feedbackIcon,g=n!=null?n:A(zh,{}),v=function(M){return it(nr,{children:[f!==!1&&M,o&&p]})},b=null;if(t!==void 0)b=v(t);else if(a)b=v(A(Id,{spin:!0}));else{var _="".concat(c,"-suffix");b=function(M){var O=M.open,N=M.showSearch;return v(O&&N?A(PT,{className:_}):A(MB,{className:_}))}}var T=null;r!==void 0?T=r:s?T=A(ET,{}):T=null;var k=null;return i!==void 0?k=i:k=A($h,{}),{clearIcon:g,suffixIcon:b,itemIcon:T,removeIcon:k}}var OB=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},q_=E.exports.createContext(null),Vh=function(t,n){var r=E.exports.useContext(q_),i=E.exports.useMemo(function(){var a;if(!r)return"";var s=r.compactDirection,o=r.isFirstItem,c=r.isLastItem,f=s==="vertical"?"-vertical-":"-";return He((a={},ae(a,"".concat(t,"-compact").concat(f,"item"),!0),ae(a,"".concat(t,"-compact").concat(f,"first-item"),o),ae(a,"".concat(t,"-compact").concat(f,"last-item"),c),ae(a,"".concat(t,"-compact").concat(f,"item-rtl"),n==="rtl"),a))},[t,n,r]);return{compactSize:r==null?void 0:r.compactSize,compactDirection:r==null?void 0:r.compactDirection,compactItemClassnames:i}},vb=function(t){var n=t.children;return A(q_.Provider,{value:null,children:n})},Pne=function(t){var n=t.children,r=OB(t,["children"]);return A(q_.Provider,{value:r,children:n})},Tne=function(t){var n,r=E.exports.useContext(Fn),i=r.getPrefixCls,a=r.direction,s=t.size,o=s===void 0?"middle":s,c=t.direction,f=t.block,p=t.prefixCls,g=t.className,v=t.children,b=OB(t,["size","direction","block","prefixCls","className","children"]),_=i("space-compact",p),T=He(_,(n={},ae(n,"".concat(_,"-rtl"),a==="rtl"),ae(n,"".concat(_,"-block"),f),ae(n,"".concat(_,"-vertical"),c==="vertical"),n),g),k=E.exports.useContext(q_),P=To(v),M=E.exports.useMemo(function(){return P.map(function(O,N){var L=O&&O.key||"".concat(_,"-item-").concat(N);return A(Pne,{compactSize:o,compactDirection:c,isFirstItem:N===0&&(!k||(k==null?void 0:k.isFirstItem)),isLastItem:N===P.length-1&&(!k||(k==null?void 0:k.isLastItem)),children:O},L)})},[o,P,k]);return P.length===0?null:A("div",{className:T,...b,children:M})},kne=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},AB="SECRET_COMBOBOX_MODE_DO_NOT_USE",Ine=function(t,n){var r,i=t.prefixCls,a=t.bordered,s=a===void 0?!0:a,o=t.className,c=t.getPopupContainer,f=t.dropdownClassName,p=t.popupClassName,g=t.listHeight,v=g===void 0?256:g,b=t.placement,_=t.listItemHeight,T=_===void 0?24:_,k=t.size,P=t.disabled,M=t.notFoundContent,O=t.status,N=t.showArrow,L=kne(t,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","popupClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","showArrow"]),$=E.exports.useContext(Fn),j=$.getPopupContainer,U=$.getPrefixCls,G=$.renderEmpty,Z=$.direction,Q=$.virtual,J=$.dropdownMatchSelectWidth,re=E.exports.useContext(nu),ne=U("select",i),ge=U(),ie=Vh(ne,Z),ue=ie.compactSize,oe=ie.compactItemClassnames,me=E.exports.useMemo(function(){var at=L.mode;if(at!=="combobox")return at===AB?"combobox":at},[L.mode]),Te=me==="multiple"||me==="tags",we=N!==void 0?N:L.loading||!(Te||me==="combobox"),be=E.exports.useContext(As),Re=be.status,Ee=be.hasFeedback,Me=be.isFormItemInput,Ae=be.feedbackIcon,Fe=rv(Re,O),We;M!==void 0?We=M:me==="combobox"?We=null:We=(G||ST)("Select");var je=DB(Be(Be({},L),{multiple:Te,hasFeedback:Ee,feedbackIcon:Ae,showArrow:we,prefixCls:ne})),pt=je.suffixIcon,gt=je.itemIcon,Ot=je.removeIcon,Ze=je.clearIcon,St=Wi(L,["suffixIcon","itemIcon"]),ot=He(p||f,ae({},"".concat(ne,"-dropdown-").concat(Z),Z==="rtl")),vt=ue||k||re,yt=E.exports.useContext(fc),kt=P!=null?P:yt,et=He((r={},ae(r,"".concat(ne,"-lg"),vt==="large"),ae(r,"".concat(ne,"-sm"),vt==="small"),ae(r,"".concat(ne,"-rtl"),Z==="rtl"),ae(r,"".concat(ne,"-borderless"),!s),ae(r,"".concat(ne,"-in-form-item"),Me),r),Yu(ne,Fe,Ee),oe,o),ut=function(){return b!==void 0?b:Z==="rtl"?"bottomRight":"bottomLeft"};return A(wT,{ref:n,virtual:Q,dropdownMatchSelectWidth:J,...St,transitionName:Ma(ge,TB(b),L.transitionName),listHeight:v,listItemHeight:T,mode:me,prefixCls:ne,placement:ut(),direction:Z,inputIcon:pt,menuItemSelectedIcon:gt,removeIcon:Ot,clearIcon:Ze,notFoundContent:We,className:et,getPopupContainer:c||j,dropdownClassName:ot,showArrow:Ee||N,disabled:kt})},Z_=E.exports.forwardRef(Ine);Z_.SECRET_COMBOBOX_MODE_DO_NOT_USE=AB;Z_.Option=bT;Z_.OptGroup=xT;const jd=Z_;function TT(){var e=E.exports.useReducer(function(r){return r+1},0),t=$e(e,2),n=t[1];return n}var yb=["xxl","xl","lg","md","sm","xs"],p0={xs:"(max-width: 575px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)",xxl:"(min-width: 1600px)"},jc=new Map,jC=-1,m0={},Mne={matchHandlers:{},dispatch:function(t){return m0=t,jc.forEach(function(n){return n(m0)}),jc.size>=1},subscribe:function(t){return jc.size||this.register(),jC+=1,jc.set(jC,t),t(m0),jC},unsubscribe:function(t){jc.delete(t),jc.size||this.unregister()},unregister:function(){var t=this;Object.keys(p0).forEach(function(n){var r=p0[n],i=t.matchHandlers[r];i==null||i.mql.removeListener(i==null?void 0:i.listener)}),jc.clear()},register:function(){var t=this;Object.keys(p0).forEach(function(n){var r=p0[n],i=function(o){var c=o.matches;t.dispatch(Be(Be({},m0),ae({},n,c)))},a=window.matchMedia(r);a.addListener(i),t.matchHandlers[r]={mql:a,listener:i},i(a)})}};const xb=Mne;function NB(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=E.exports.useRef({}),n=TT();return E.exports.useEffect(function(){var r=xb.subscribe(function(i){t.current=i,e&&n()});return function(){return xb.unsubscribe(r)}},[]),t.current}var Ha={adjustX:1,adjustY:1},Ka=[0,0],LB={left:{points:["cr","cl"],overflow:Ha,offset:[-4,0],targetOffset:Ka},right:{points:["cl","cr"],overflow:Ha,offset:[4,0],targetOffset:Ka},top:{points:["bc","tc"],overflow:Ha,offset:[0,-4],targetOffset:Ka},bottom:{points:["tc","bc"],overflow:Ha,offset:[0,4],targetOffset:Ka},topLeft:{points:["bl","tl"],overflow:Ha,offset:[0,-4],targetOffset:Ka},leftTop:{points:["tr","tl"],overflow:Ha,offset:[-4,0],targetOffset:Ka},topRight:{points:["br","tr"],overflow:Ha,offset:[0,-4],targetOffset:Ka},rightTop:{points:["tl","tr"],overflow:Ha,offset:[4,0],targetOffset:Ka},bottomRight:{points:["tr","br"],overflow:Ha,offset:[0,4],targetOffset:Ka},rightBottom:{points:["bl","br"],overflow:Ha,offset:[4,0],targetOffset:Ka},bottomLeft:{points:["tl","bl"],overflow:Ha,offset:[0,4],targetOffset:Ka},leftBottom:{points:["br","bl"],overflow:Ha,offset:[-4,0],targetOffset:Ka}};function Rne(e){var t=e.showArrow,n=e.arrowContent,r=e.children,i=e.prefixCls,a=e.id,s=e.overlayInnerStyle,o=e.className,c=e.style;return it("div",{className:He("".concat(i,"-content"),o),style:c,children:[t!==!1&&A("div",{className:"".concat(i,"-arrow"),children:n},"arrow"),A("div",{className:"".concat(i,"-inner"),id:a,role:"tooltip",style:s,children:typeof r=="function"?r():r})]})}var Dne=function(t,n){var r=t.overlayClassName,i=t.trigger,a=i===void 0?["hover"]:i,s=t.mouseEnterDelay,o=s===void 0?0:s,c=t.mouseLeaveDelay,f=c===void 0?.1:c,p=t.overlayStyle,g=t.prefixCls,v=g===void 0?"rc-tooltip":g,b=t.children,_=t.onVisibleChange,T=t.afterVisibleChange,k=t.transitionName,P=t.animation,M=t.motion,O=t.placement,N=O===void 0?"right":O,L=t.align,$=L===void 0?{}:L,j=t.destroyTooltipOnHide,U=j===void 0?!1:j,G=t.defaultVisible,Z=t.getTooltipContainer,Q=t.overlayInnerStyle,J=t.arrowContent,re=t.overlay,ne=t.id,ge=t.showArrow,ie=In(t,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"]),ue=E.exports.useRef(null);E.exports.useImperativeHandle(n,function(){return ue.current});var oe=fe({},ie);"visible"in t&&(oe.popupVisible=t.visible);var me=function(){return A(Rne,{showArrow:ge,arrowContent:J,prefixCls:v,id:ne,overlayInnerStyle:Q,children:re},"content")},Te=!1,we=!1;if(typeof U=="boolean")Te=U;else if(U&&on(U)==="object"){var be=U.keepParent;Te=be===!0,we=be===!1}return A(W_,{popupClassName:r,prefixCls:v,popup:me,action:a,builtinPlacements:LB,popupPlacement:N,ref:ue,popupAlign:$,getPopupContainer:Z,onPopupVisibleChange:_,afterPopupVisibleChange:T,popupTransitionName:k,popupAnimation:P,popupMotion:M,defaultPopupVisible:G,destroyPopupOnHide:Te,autoDestroy:we,mouseLeaveDelay:f,popupStyle:p,mouseEnterDelay:o,...oe,children:b})};const One=E.exports.forwardRef(Dne);la("success","processing","error","default","warning");var Ane=la("pink","red","yellow","orange","cyan","green","blue","purple","geekblue","magenta","volcano","gold","lime"),Nne={adjustX:1,adjustY:1},TD={adjustX:0,adjustY:0},Lne=[0,0];function kD(e){return typeof e=="boolean"?e?Nne:TD:Be(Be({},TD),e)}function FB(e){var t=e.arrowWidth,n=t===void 0?4:t,r=e.horizontalArrowShift,i=r===void 0?16:r,a=e.verticalArrowShift,s=a===void 0?8:a,o=e.autoAdjustOverflow,c=e.arrowPointAtCenter,f={left:{points:["cr","cl"],offset:[-4,0]},right:{points:["cl","cr"],offset:[4,0]},top:{points:["bc","tc"],offset:[0,-4]},bottom:{points:["tc","bc"],offset:[0,4]},topLeft:{points:["bl","tc"],offset:[-(i+n),-4]},leftTop:{points:["tr","cl"],offset:[-4,-(s+n)]},topRight:{points:["br","tc"],offset:[i+n,-4]},rightTop:{points:["tl","cr"],offset:[4,-(s+n)]},bottomRight:{points:["tr","bc"],offset:[i+n,4]},rightBottom:{points:["bl","cr"],offset:[4,s+n]},bottomLeft:{points:["tl","bc"],offset:[-(i+n),4]},leftBottom:{points:["br","cl"],offset:[-4,s+n]}};return Object.keys(f).forEach(function(p){f[p]=c?Be(Be({},f[p]),{overflow:kD(o),targetOffset:Lne}):Be(Be({},LB[p]),{overflow:kD(o)}),f[p].ignoreShake=!0}),f}var Fne=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},zne=function(t,n){var r={},i=Be({},t);return n.forEach(function(a){t&&a in t&&(r[a]=t[a],delete i[a])}),{picked:r,omitted:i}},ID=new RegExp("^(".concat(Ane.join("|"),")(-inverse)?$"));function $ne(e,t){var n=e.type;if((n.__ANT_BUTTON===!0||e.type==="button")&&e.props.disabled||n.__ANT_SWITCH===!0&&(e.props.disabled||e.props.loading)||n.__ANT_RADIO===!0&&e.props.disabled){var r=zne(e.props.style,["position","left","right","top","bottom","float","display","zIndex"]),i=r.picked,a=r.omitted,s=Be(Be({display:"inline-block"},i),{cursor:"not-allowed",width:e.props.block?"100%":void 0}),o=Be(Be({},a),{pointerEvents:"none"}),c=Ei(e,{style:o,className:null});return A("span",{style:s,className:He(e.props.className,"".concat(t,"-disabled-compatible-wrapper")),children:c})}return e}var Bne=E.exports.forwardRef(function(e,t){var n,r=E.exports.useContext(Fn),i=r.getPopupContainer,a=r.getPrefixCls,s=r.direction,o=Si(!1,{value:e.open!==void 0?e.open:e.visible,defaultValue:e.defaultOpen!==void 0?e.defaultOpen:e.defaultVisible}),c=$e(o,2),f=c[0],p=c[1],g=function(){var Me=e.title,Ae=e.overlay;return!Me&&!Ae&&Me!==0},v=function(Me){var Ae,Fe;p(g()?!1:Me),g()||((Ae=e.onOpenChange)===null||Ae===void 0||Ae.call(e,Me),(Fe=e.onVisibleChange)===null||Fe===void 0||Fe.call(e,Me))},b=function(){var Me=e.builtinPlacements,Ae=e.arrowPointAtCenter,Fe=Ae===void 0?!1:Ae,We=e.autoAdjustOverflow,je=We===void 0?!0:We;return Me||FB({arrowPointAtCenter:Fe,autoAdjustOverflow:je})},_=function(Me,Ae){var Fe=b(),We=Object.keys(Fe).find(function(gt){var Ot,Ze;return Fe[gt].points[0]===((Ot=Ae.points)===null||Ot===void 0?void 0:Ot[0])&&Fe[gt].points[1]===((Ze=Ae.points)===null||Ze===void 0?void 0:Ze[1])});if(!!We){var je=Me.getBoundingClientRect(),pt={top:"50%",left:"50%"};/top|Bottom/.test(We)?pt.top="".concat(je.height-Ae.offset[1],"px"):/Top|bottom/.test(We)&&(pt.top="".concat(-Ae.offset[1],"px")),/left|Right/.test(We)?pt.left="".concat(je.width-Ae.offset[0],"px"):/right|Left/.test(We)&&(pt.left="".concat(-Ae.offset[0],"px")),Me.style.transformOrigin="".concat(pt.left," ").concat(pt.top)}},T=function(){var Me=e.title,Ae=e.overlay;return Me===0?Me:Ae||Me||""},k=e.getPopupContainer,P=e.placement,M=P===void 0?"top":P,O=e.mouseEnterDelay,N=O===void 0?.1:O,L=e.mouseLeaveDelay,$=L===void 0?.1:L,j=Fne(e,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay"]),U=e.prefixCls,G=e.openClassName,Z=e.getTooltipContainer,Q=e.overlayClassName,J=e.color,re=e.overlayInnerStyle,ne=e.children,ge=a("tooltip",U),ie=a(),ue=f;!("open"in e)&&!("visible"in e)&&g()&&(ue=!1);var oe=$ne(Ia(ne)&&!j$(ne)?ne:A("span",{children:ne}),ge),me=oe.props,Te=!me.className||typeof me.className=="string"?He(me.className,ae({},G||"".concat(ge,"-open"),!0)):me.className,we=He(Q,(n={},ae(n,"".concat(ge,"-rtl"),s==="rtl"),ae(n,"".concat(ge,"-").concat(J),J&&ID.test(J)),n)),be=re,Re={};return J&&!ID.test(J)&&(be=Be(Be({},re),{background:J}),Re={"--antd-arrow-background-color":J}),A(One,{...j,placement:M,mouseEnterDelay:N,mouseLeaveDelay:$,prefixCls:ge,overlayClassName:we,getTooltipContainer:k||Z||i,ref:t,builtinPlacements:b(),overlay:T(),visible:ue,onVisibleChange:v,onPopupAlign:_,overlayInnerStyle:be,arrowContent:A("span",{className:"".concat(ge,"-arrow-content"),style:Re}),motion:{motionName:Ma(ie,"zoom-big-fast",e.transitionName),motionDeadline:1e3},children:ue?Ei(oe,{className:Te}):oe})});const Ra=Bne;var MD=function(t){return t?typeof t=="function"?t():t:null},Vne=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Une=function(t){var n=t.title,r=t.content,i=t.prefixCls;return!n&&!r?null:it(nr,{children:[n&&A("div",{className:"".concat(i,"-title"),children:MD(n)}),A("div",{className:"".concat(i,"-inner-content"),children:MD(r)})]})},jne=E.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.title,i=e.content,a=e._overlay,s=e.placement,o=s===void 0?"top":s,c=e.trigger,f=c===void 0?"hover":c,p=e.mouseEnterDelay,g=p===void 0?.1:p,v=e.mouseLeaveDelay,b=v===void 0?.1:v,_=e.overlayStyle,T=_===void 0?{}:_,k=Vne(e,["prefixCls","title","content","_overlay","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),P=E.exports.useContext(Fn),M=P.getPrefixCls,O=M("popover",n),N=M();return A(Ra,{placement:o,trigger:f,mouseEnterDelay:g,mouseLeaveDelay:b,overlayStyle:T,...k,prefixCls:O,ref:t,overlay:a||A(Une,{prefixCls:O,title:r,content:i}),transitionName:Ma(N,"zoom-big",k.transitionName)})});const zB=jne;var Hne={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 Kne=Hne;var $B=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:Kne})})};$B.displayName="EllipsisOutlined";const BB=E.exports.forwardRef($B);var VB=E.exports.createContext(null);function kT(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function UB(e){var t=E.exports.useContext(VB);return kT(t,e)}var Wne=["children","locked"],Ns=E.exports.createContext(null);function Gne(e,t){var n=fe({},e);return Object.keys(t).forEach(function(r){var i=t[r];i!==void 0&&(n[r]=i)}),n}function kg(e){var t=e.children,n=e.locked,r=In(e,Wne),i=E.exports.useContext(Ns),a=Yg(function(){return Gne(i,r)},[i,r],function(s,o){return!n&&(s[0]!==o[0]||!vT(s[1],o[1],!0))});return A(Ns.Provider,{value:a,children:t})}var qne=[],jB=E.exports.createContext(null);function X_(){return E.exports.useContext(jB)}var HB=E.exports.createContext(qne);function Uh(e){var t=E.exports.useContext(HB);return E.exports.useMemo(function(){return e!==void 0?[].concat(Rt(t),[e]):t},[t,e])}var KB=E.exports.createContext(null),IT=E.exports.createContext({});function RD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(yT(e)){var n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||n==="a"&&!!e.getAttribute("href"),i=e.getAttribute("tabindex"),a=Number(i),s=null;return i&&!Number.isNaN(a)?s=a:r&&s===null&&(s=0),r&&e.disabled&&(s=null),s!==null&&(s>=0||t&&s<0)}return!1}function WB(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=Rt(e.querySelectorAll("*")).filter(function(r){return RD(r,t)});return RD(e,t)&&n.unshift(e),n}var N4=Tt.LEFT,L4=Tt.RIGHT,F4=Tt.UP,ux=Tt.DOWN,cx=Tt.ENTER,GB=Tt.ESC,om=Tt.HOME,am=Tt.END,DD=[F4,ux,N4,L4];function Zne(e,t,n,r){var i,a,s,o,c="prev",f="next",p="children",g="parent";if(e==="inline"&&r===cx)return{inlineTrigger:!0};var v=(i={},ae(i,F4,c),ae(i,ux,f),i),b=(a={},ae(a,N4,n?f:c),ae(a,L4,n?c:f),ae(a,ux,p),ae(a,cx,p),a),_=(s={},ae(s,F4,c),ae(s,ux,f),ae(s,cx,p),ae(s,GB,g),ae(s,N4,n?p:g),ae(s,L4,n?g:p),s),T={inline:v,horizontal:b,vertical:_,inlineSub:v,horizontalSub:_,verticalSub:_},k=(o=T["".concat(e).concat(t?"":"Sub")])===null||o===void 0?void 0:o[r];switch(k){case c:return{offset:-1,sibling:!0};case f:return{offset:1,sibling:!0};case g:return{offset:-1,sibling:!1};case p:return{offset:1,sibling:!1};default:return null}}function Xne(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function Yne(e,t){for(var n=e||document.activeElement;n;){if(t.has(n))return n;n=n.parentElement}return null}function qB(e,t){var n=WB(e,!0);return n.filter(function(r){return t.has(r)})}function OD(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var i=qB(e,t),a=i.length,s=i.findIndex(function(o){return n===o});return r<0?s===-1?s=a-1:s-=1:r>0&&(s+=1),s=(s+a)%a,i[s]}function Qne(e,t,n,r,i,a,s,o,c,f){var p=E.exports.useRef(),g=E.exports.useRef();g.current=t;var v=function(){ur.cancel(p.current)};return E.exports.useEffect(function(){return function(){v()}},[]),function(b){var _=b.which;if([].concat(DD,[cx,GB,om,am]).includes(_)){var T,k,P,M=function(){T=new Set,k=new Map,P=new Map;var ge=a();return ge.forEach(function(ie){var ue=document.querySelector("[data-menu-id='".concat(kT(r,ie),"']"));ue&&(T.add(ue),P.set(ue,ie),k.set(ie,ue))}),T};M();var O=k.get(t),N=Yne(O,T),L=P.get(N),$=Zne(e,s(L,!0).length===1,n,_);if(!$&&_!==om&&_!==am)return;(DD.includes(_)||[om,am].includes(_))&&b.preventDefault();var j=function(ge){if(ge){var ie=ge,ue=ge.querySelector("a");ue!=null&&ue.getAttribute("href")&&(ie=ue);var oe=P.get(ge);o(oe),v(),p.current=ur(function(){g.current===oe&&ie.focus()})}};if([om,am].includes(_)||$.sibling||!N){var U;!N||e==="inline"?U=i.current:U=Xne(N);var G,Z=qB(U,T);_===om?G=Z[0]:_===am?G=Z[Z.length-1]:G=OD(U,T,N,$.offset),j(G)}else if($.inlineTrigger)c(L);else if($.offset>0)c(L,!0),v(),p.current=ur(function(){M();var ne=N.getAttribute("aria-controls"),ge=document.getElementById(ne),ie=OD(ge,T);j(ie)},5);else if($.offset<0){var Q=s(L,!0),J=Q[Q.length-2],re=k.get(J);c(J,!1),j(re)}}f==null||f(b)}}function Jne(e){Promise.resolve().then(e)}var MT="__RC_UTIL_PATH_SPLIT__",AD=function(t){return t.join(MT)},ere=function(t){return t.split(MT)},z4="rc-menu-more";function tre(){var e=E.exports.useState({}),t=$e(e,2),n=t[1],r=E.exports.useRef(new Map),i=E.exports.useRef(new Map),a=E.exports.useState([]),s=$e(a,2),o=s[0],c=s[1],f=E.exports.useRef(0),p=E.exports.useRef(!1),g=function(){p.current||n({})},v=E.exports.useCallback(function(O,N){var L=AD(N);i.current.set(L,O),r.current.set(O,L),f.current+=1;var $=f.current;Jne(function(){$===f.current&&g()})},[]),b=E.exports.useCallback(function(O,N){var L=AD(N);i.current.delete(L),r.current.delete(O)},[]),_=E.exports.useCallback(function(O){c(O)},[]),T=E.exports.useCallback(function(O,N){var L=r.current.get(O)||"",$=ere(L);return N&&o.includes($[0])&&$.unshift(z4),$},[o]),k=E.exports.useCallback(function(O,N){return O.some(function(L){var $=T(L,!0);return $.includes(N)})},[T]),P=function(){var N=Rt(r.current.keys());return o.length&&N.push(z4),N},M=E.exports.useCallback(function(O){var N="".concat(r.current.get(O)).concat(MT),L=new Set;return Rt(i.current.keys()).forEach(function($){$.startsWith(N)&&L.add(i.current.get($))}),L},[]);return E.exports.useEffect(function(){return function(){p.current=!0}},[]),{registerPath:v,unregisterPath:b,refreshOverflowKeys:_,isSubPathKey:k,getKeyPath:T,getKeys:P,getSubPathKeys:M}}function Df(e){var t=E.exports.useRef(e);t.current=e;var n=E.exports.useCallback(function(){for(var r,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return(r=t.current)===null||r===void 0?void 0:r.call.apply(r,[t].concat(a))},[]);return e?n:void 0}var nre=Math.random().toFixed(5).toString().slice(2),ND=0;function rre(e){var t=Si(e,{value:e}),n=$e(t,2),r=n[0],i=n[1];return E.exports.useEffect(function(){ND+=1;var a="".concat(nre,"-").concat(ND);i("rc-menu-uuid-".concat(a))},[]),r}function ZB(e,t,n,r){var i=E.exports.useContext(Ns),a=i.activeKey,s=i.onActive,o=i.onInactive,c={active:a===e};return t||(c.onMouseEnter=function(f){n==null||n({key:e,domEvent:f}),s(e)},c.onMouseLeave=function(f){r==null||r({key:e,domEvent:f}),o(e)}),c}var ire=["item"];function bb(e){var t=e.item,n=In(e,ire);return Object.defineProperty(n,"item",{get:function(){return Nr(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),n}function XB(e){var t=e.icon,n=e.props,r=e.children,i;return typeof t=="function"?i=E.exports.createElement(t,fe({},n)):i=t,i||r||null}function YB(e){var t=E.exports.useContext(Ns),n=t.mode,r=t.rtl,i=t.inlineIndent;if(n!=="inline")return null;var a=e;return r?{paddingRight:a*i}:{paddingLeft:a*i}}var ore=["title","attribute","elementRef"],are=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],sre=["active"],lre=function(e){ai(n,e);var t=si(n);function n(){return Ur(this,n),t.apply(this,arguments)}return jr(n,[{key:"render",value:function(){var i=this.props,a=i.title,s=i.attribute,o=i.elementRef,c=In(i,ore),f=Wi(c,["eventKey"]);return Nr(!s,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),A(al.Item,{...s,title:typeof a=="string"?a:void 0,...f,ref:o})}}]),n}(E.exports.Component),ure=function(t){var n,r=t.style,i=t.className,a=t.eventKey;t.warnKey;var s=t.disabled,o=t.itemIcon,c=t.children,f=t.role,p=t.onMouseEnter,g=t.onMouseLeave,v=t.onClick,b=t.onKeyDown,_=t.onFocus,T=In(t,are),k=UB(a),P=E.exports.useContext(Ns),M=P.prefixCls,O=P.onItemClick,N=P.disabled,L=P.overflowDisabled,$=P.itemIcon,j=P.selectedKeys,U=P.onActive,G=E.exports.useContext(IT),Z=G._internalRenderMenuItem,Q="".concat(M,"-item"),J=E.exports.useRef(),re=E.exports.useRef(),ne=N||s,ge=Uh(a),ie=function(je){return{key:a,keyPath:Rt(ge).reverse(),item:J.current,domEvent:je}},ue=o||$,oe=ZB(a,ne,p,g),me=oe.active,Te=In(oe,sre),we=j.includes(a),be=YB(ge.length),Re=function(je){if(!ne){var pt=ie(je);v==null||v(bb(pt)),O(pt)}},Ee=function(je){if(b==null||b(je),je.which===Tt.ENTER){var pt=ie(je);v==null||v(bb(pt)),O(pt)}},Me=function(je){U(a),_==null||_(je)},Ae={};t.role==="option"&&(Ae["aria-selected"]=we);var Fe=it(lre,{ref:J,elementRef:re,role:f===null?"none":f||"menuitem",tabIndex:s?null:-1,"data-menu-id":L&&k?null:k,...T,...Te,...Ae,component:"li","aria-disabled":s,style:fe(fe({},be),r),className:He(Q,(n={},ae(n,"".concat(Q,"-active"),me),ae(n,"".concat(Q,"-selected"),we),ae(n,"".concat(Q,"-disabled"),ne),n),i),onClick:Re,onKeyDown:Ee,onFocus:Me,children:[c,A(XB,{props:fe(fe({},t),{},{isSelected:we}),icon:ue})]});return Z&&(Fe=Z(Fe,t,{selected:we})),Fe};function Y_(e){var t=e.eventKey,n=X_(),r=Uh(t);return E.exports.useEffect(function(){if(n)return n.registerPath(t,r),function(){n.unregisterPath(t,r)}},[r]),n?null:A(ure,{...e})}var cre=["className","children"],dre=function(t,n){var r=t.className,i=t.children,a=In(t,cre),s=E.exports.useContext(Ns),o=s.prefixCls,c=s.mode,f=s.rtl;return A("ul",{className:He(o,f&&"".concat(o,"-rtl"),"".concat(o,"-sub"),"".concat(o,"-").concat(c==="inline"?"inline":"vertical"),r),role:"menu",...a,"data-menu-list":!0,ref:n,children:i})},RT=E.exports.forwardRef(dre);RT.displayName="SubMenuList";var fre=["label","children","key","type"];function DT(e,t){return To(e).map(function(n,r){if(E.exports.isValidElement(n)){var i,a,s=n.key,o=(i=(a=n.props)===null||a===void 0?void 0:a.eventKey)!==null&&i!==void 0?i:s,c=o==null;c&&(o="tmp_key-".concat([].concat(Rt(t),[r]).join("-")));var f={key:o,eventKey:o};return E.exports.cloneElement(n,f)}return n})}function $4(e){return(e||[]).map(function(t,n){if(t&&on(t)==="object"){var r=t,i=r.label,a=r.children,s=r.key,o=r.type,c=In(r,fre),f=s!=null?s:"tmp-".concat(n);return a||o==="group"?o==="group"?A(J_,{...c,title:i,children:$4(a)},f):A(Q_,{...c,title:i,children:$4(a)},f):o==="divider"?A(OT,{...c},f):A(Y_,{...c,children:i},f)}return null}).filter(function(t){return t})}function hre(e,t,n){var r=e;return t&&(r=$4(t)),DT(r,n)}var zu={adjustX:1,adjustY:1},pre={topLeft:{points:["bl","tl"],overflow:zu,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:zu,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:zu,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:zu,offset:[4,0]}},mre={topLeft:{points:["bl","tl"],overflow:zu,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:zu,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:zu,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:zu,offset:[4,0]}};function QB(e,t,n){if(t)return t;if(n)return n[e]||n.other}var gre={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function vre(e){var t=e.prefixCls,n=e.visible,r=e.children,i=e.popup,a=e.popupClassName,s=e.popupOffset,o=e.disabled,c=e.mode,f=e.onVisibleChange,p=E.exports.useContext(Ns),g=p.getPopupContainer,v=p.rtl,b=p.subMenuOpenDelay,_=p.subMenuCloseDelay,T=p.builtinPlacements,k=p.triggerSubMenuAction,P=p.forceSubMenuRender,M=p.rootClassName,O=p.motion,N=p.defaultMotions,L=E.exports.useState(!1),$=$e(L,2),j=$[0],U=$[1],G=fe(v?fe({},mre):fe({},pre),T),Z=gre[c],Q=QB(c,O,N),J=E.exports.useRef(Q);c!=="inline"&&(J.current=Q);var re=fe(fe({},J.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),ne=E.exports.useRef();return E.exports.useEffect(function(){return ne.current=ur(function(){U(n)}),function(){ur.cancel(ne.current)}},[n]),A(W_,{prefixCls:t,popupClassName:He("".concat(t,"-popup"),ae({},"".concat(t,"-rtl"),v),a,M),stretch:c==="horizontal"?"minWidth":null,getPopupContainer:g,builtinPlacements:G,popupPlacement:Z,popupVisible:j,popup:i,popupAlign:s&&{offset:s},action:o?[]:[k],mouseEnterDelay:b,mouseLeaveDelay:_,onPopupVisibleChange:f,forceRender:P,popupMotion:re,children:r})}function yre(e){var t=e.id,n=e.open,r=e.keyPath,i=e.children,a="inline",s=E.exports.useContext(Ns),o=s.prefixCls,c=s.forceSubMenuRender,f=s.motion,p=s.defaultMotions,g=s.mode,v=E.exports.useRef(!1);v.current=g===a;var b=E.exports.useState(!v.current),_=$e(b,2),T=_[0],k=_[1],P=v.current?n:!1;E.exports.useEffect(function(){v.current&&k(!1)},[g]);var M=fe({},QB(a,f,p));r.length>1&&(M.motionAppear=!1);var O=M.onVisibleChanged;return M.onVisibleChanged=function(N){return!v.current&&!N&&k(!0),O==null?void 0:O(N)},T?null:A(kg,{mode:a,locked:!v.current,children:A(sa,{visible:P,...M,forceRender:c,removeOnLeave:!1,leavedClassName:"".concat(o,"-hidden"),children:function(N){var L=N.className,$=N.style;return A(RT,{id:t,className:L,style:$,children:i})}})})}var xre=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],bre=["active"],_re=function(t){var n,r=t.style,i=t.className,a=t.title,s=t.eventKey;t.warnKey;var o=t.disabled,c=t.internalPopupClose,f=t.children,p=t.itemIcon,g=t.expandIcon,v=t.popupClassName,b=t.popupOffset,_=t.onClick,T=t.onMouseEnter,k=t.onMouseLeave,P=t.onTitleClick,M=t.onTitleMouseEnter,O=t.onTitleMouseLeave,N=In(t,xre),L=UB(s),$=E.exports.useContext(Ns),j=$.prefixCls,U=$.mode,G=$.openKeys,Z=$.disabled,Q=$.overflowDisabled,J=$.activeKey,re=$.selectedKeys,ne=$.itemIcon,ge=$.expandIcon,ie=$.onItemClick,ue=$.onOpenChange,oe=$.onActive,me=E.exports.useContext(IT),Te=me._internalRenderSubMenuItem,we=E.exports.useContext(KB),be=we.isSubPathKey,Re=Uh(),Ee="".concat(j,"-submenu"),Me=Z||o,Ae=E.exports.useRef(),Fe=E.exports.useRef(),We=p||ne,je=g||ge,pt=G.includes(s),gt=!Q&&pt,Ot=be(re,s),Ze=ZB(s,Me,M,O),St=Ze.active,ot=In(Ze,bre),vt=E.exports.useState(!1),yt=$e(vt,2),kt=yt[0],et=yt[1],ut=function(Xt){Me||et(Xt)},at=function(Xt){ut(!0),T==null||T({key:s,domEvent:Xt})},Ke=function(Xt){ut(!1),k==null||k({key:s,domEvent:Xt})},ct=E.exports.useMemo(function(){return St||(U!=="inline"?kt||be([J],s):!1)},[U,St,J,kt,s,be]),bt=YB(Re.length),At=function(Xt){Me||(P==null||P({key:s,domEvent:Xt}),U==="inline"&&ue(s,!pt))},Lt=Df(function(It){_==null||_(bb(It)),ie(It)}),Ht=function(Xt){U!=="inline"&&ue(s,Xt)},ze=function(){oe(s)},Qe=L&&"".concat(L,"-popup"),Zt=it("div",{role:"menuitem",style:bt,className:"".concat(Ee,"-title"),tabIndex:Me?null:-1,ref:Ae,title:typeof a=="string"?a:null,"data-menu-id":Q&&L?null:L,"aria-expanded":gt,"aria-haspopup":!0,"aria-controls":Qe,"aria-disabled":Me,onClick:At,onFocus:ze,...ot,children:[a,A(XB,{icon:U!=="horizontal"?je:null,props:fe(fe({},t),{},{isOpen:gt,isSubMenu:!0}),children:A("i",{className:"".concat(Ee,"-arrow")})})]}),an=E.exports.useRef(U);if(U!=="inline"&&Re.length>1?an.current="vertical":an.current=U,!Q){var Kt=an.current;Zt=A(vre,{mode:Kt,prefixCls:Ee,visible:!c&&gt&&U!=="inline",popupClassName:v,popupOffset:b,popup:A(kg,{mode:Kt==="horizontal"?"vertical":Kt,children:A(RT,{id:Qe,ref:Fe,children:f})}),disabled:Me,onVisibleChange:Ht,children:Zt})}var Vt=it(al.Item,{role:"none",...N,component:"li",style:r,className:He(Ee,"".concat(Ee,"-").concat(U),i,(n={},ae(n,"".concat(Ee,"-open"),gt),ae(n,"".concat(Ee,"-active"),ct),ae(n,"".concat(Ee,"-selected"),Ot),ae(n,"".concat(Ee,"-disabled"),Me),n)),onMouseEnter:at,onMouseLeave:Ke,children:[Zt,!Q&&A(yre,{id:Qe,open:gt,keyPath:Re,children:f})]});return Te&&(Vt=Te(Vt,t,{selected:Ot,active:ct,open:gt,disabled:Me})),A(kg,{onItemClick:Lt,mode:U==="horizontal"?"vertical":U,itemIcon:We,expandIcon:je,children:Vt})};function Q_(e){var t=e.eventKey,n=e.children,r=Uh(t),i=DT(n,r),a=X_();E.exports.useEffect(function(){if(a)return a.registerPath(t,r),function(){a.unregisterPath(t,r)}},[r]);var s;return a?s=i:s=A(_re,{...e,children:i}),A(HB.Provider,{value:r,children:s})}var wre=["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"],Pf=[],Cre=E.exports.forwardRef(function(e,t){var n,r,i=e,a=i.prefixCls,s=a===void 0?"rc-menu":a,o=i.rootClassName,c=i.style,f=i.className,p=i.tabIndex,g=p===void 0?0:p,v=i.items,b=i.children,_=i.direction,T=i.id,k=i.mode,P=k===void 0?"vertical":k,M=i.inlineCollapsed,O=i.disabled,N=i.disabledOverflow,L=i.subMenuOpenDelay,$=L===void 0?.1:L,j=i.subMenuCloseDelay,U=j===void 0?.1:j,G=i.forceSubMenuRender,Z=i.defaultOpenKeys,Q=i.openKeys,J=i.activeKey,re=i.defaultActiveFirst,ne=i.selectable,ge=ne===void 0?!0:ne,ie=i.multiple,ue=ie===void 0?!1:ie,oe=i.defaultSelectedKeys,me=i.selectedKeys,Te=i.onSelect,we=i.onDeselect,be=i.inlineIndent,Re=be===void 0?24:be,Ee=i.motion,Me=i.defaultMotions,Ae=i.triggerSubMenuAction,Fe=Ae===void 0?"hover":Ae,We=i.builtinPlacements,je=i.itemIcon,pt=i.expandIcon,gt=i.overflowedIndicator,Ot=gt===void 0?"...":gt,Ze=i.overflowedIndicatorPopupClassName,St=i.getPopupContainer,ot=i.onClick,vt=i.onOpenChange,yt=i.onKeyDown;i.openAnimation,i.openTransitionName;var kt=i._internalRenderMenuItem,et=i._internalRenderSubMenuItem,ut=In(i,wre),at=E.exports.useMemo(function(){return hre(b,v,Pf)},[b,v]),Ke=E.exports.useState(!1),ct=$e(Ke,2),bt=ct[0],At=ct[1],Lt=E.exports.useRef(),Ht=rre(T),ze=_==="rtl",Qe=Si(Z,{value:Q,postState:function(Bn){return Bn||Pf}}),Zt=$e(Qe,2),an=Zt[0],Kt=Zt[1],Vt=function(Bn){var rr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Sr(){Kt(Bn),vt==null||vt(Bn)}rr?cl.exports.flushSync(Sr):Sr()},It=E.exports.useState(an),Xt=$e(It,2),pn=Xt[0],tt=Xt[1],Nt=E.exports.useRef(!1),qt=E.exports.useMemo(function(){return(P==="inline"||P==="vertical")&&M?["vertical",M]:[P,!1]},[P,M]),En=$e(qt,2),yn=En[0],Et=En[1],Pn=yn==="inline",_n=E.exports.useState(yn),tn=$e(_n,2),zt=tn[0],dt=tn[1],mt=E.exports.useState(Et),$t=$e(mt,2),Wt=$t[0],mn=$t[1];E.exports.useEffect(function(){dt(yn),mn(Et),Nt.current&&(Pn?Kt(pn):Vt(Pf))},[yn,Et]);var An=E.exports.useState(0),Qn=$e(An,2),Jn=Qn[0],ye=Qn[1],W=Jn>=at.length-1||zt!=="horizontal"||N;E.exports.useEffect(function(){Pn&&tt(an)},[an]),E.exports.useEffect(function(){return Nt.current=!0,function(){Nt.current=!1}},[]);var X=tre(),de=X.registerPath,le=X.unregisterPath,xe=X.refreshOverflowKeys,Ie=X.isSubPathKey,Ce=X.getKeyPath,Pe=X.getKeys,Le=X.getSubPathKeys,Xe=E.exports.useMemo(function(){return{registerPath:de,unregisterPath:le}},[de,le]),Ye=E.exports.useMemo(function(){return{isSubPathKey:Ie}},[Ie]);E.exports.useEffect(function(){xe(W?Pf:at.slice(Jn+1).map(function(Wn){return Wn.key}))},[Jn,W]);var Ue=Si(J||re&&((n=at[0])===null||n===void 0?void 0:n.key),{value:J}),Bt=$e(Ue,2),Pt=Bt[0],nt=Bt[1],Ft=Df(function(Wn){nt(Wn)}),Gt=Df(function(){nt(void 0)});E.exports.useImperativeHandle(t,function(){return{list:Lt.current,focus:function(Bn){var rr,Sr=Pt!=null?Pt:(rr=at.find(function(ou){return!ou.props.disabled}))===null||rr===void 0?void 0:rr.key;if(Sr){var Pr,Wr,Mo;(Pr=Lt.current)===null||Pr===void 0||(Wr=Pr.querySelector("li[data-menu-id='".concat(kT(Ht,Sr),"']")))===null||Wr===void 0||(Mo=Wr.focus)===null||Mo===void 0||Mo.call(Wr,Bn)}}}});var wn=Si(oe||[],{value:me,postState:function(Bn){return Array.isArray(Bn)?Bn:Bn==null?Pf:[Bn]}}),dn=$e(wn,2),Cn=dn[0],jn=dn[1],or=function(Bn){if(ge){var rr=Bn.key,Sr=Cn.includes(rr),Pr;ue?Sr?Pr=Cn.filter(function(Mo){return Mo!==rr}):Pr=[].concat(Rt(Cn),[rr]):Pr=[rr],jn(Pr);var Wr=fe(fe({},Bn),{},{selectedKeys:Pr});Sr?we==null||we(Wr):Te==null||Te(Wr)}!ue&&an.length&&zt!=="inline"&&Vt(Pf)},Kr=Df(function(Wn){ot==null||ot(bb(Wn)),or(Wn)}),dr=Df(function(Wn,Bn){var rr=an.filter(function(Pr){return Pr!==Wn});if(Bn)rr.push(Wn);else if(zt!=="inline"){var Sr=Le(Wn);rr=rr.filter(function(Pr){return!Sr.has(Pr)})}vT(an,rr,!0)||Vt(rr,!0)}),Lr=Df(St),Dn=function(Bn,rr){var Sr=rr!=null?rr:!an.includes(Bn);dr(Bn,Sr)},Mn=Qne(zt,Pt,ze,Ht,Lt,Pe,Ce,nt,Dn,yt);E.exports.useEffect(function(){At(!0)},[]);var Nn=E.exports.useMemo(function(){return{_internalRenderMenuItem:kt,_internalRenderSubMenuItem:et}},[kt,et]),ei=zt!=="horizontal"||N?at:at.map(function(Wn,Bn){return A(kg,{overflowDisabled:Bn>Jn,children:Wn},Wn.key)}),_r=A(al,{id:T,ref:Lt,prefixCls:"".concat(s,"-overflow"),component:"ul",itemComponent:Y_,className:He(s,"".concat(s,"-root"),"".concat(s,"-").concat(zt),f,(r={},ae(r,"".concat(s,"-inline-collapsed"),Wt),ae(r,"".concat(s,"-rtl"),ze),r),o),dir:_,style:c,role:"menu",tabIndex:g,data:ei,renderRawItem:function(Bn){return Bn},renderRawRest:function(Bn){var rr=Bn.length,Sr=rr?at.slice(-rr):null;return A(Q_,{eventKey:z4,title:Ot,disabled:W,internalPopupClose:rr===0,popupClassName:Ze,children:Sr})},maxCount:zt!=="horizontal"||N?al.INVALIDATE:al.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Bn){ye(Bn)},onKeyDown:Mn,...ut});return A(IT.Provider,{value:Nn,children:A(VB.Provider,{value:Ht,children:it(kg,{prefixCls:s,rootClassName:o,mode:zt,openKeys:an,rtl:ze,disabled:O,motion:bt?Ee:null,defaultMotions:bt?Me:null,activeKey:Pt,onActive:Ft,onInactive:Gt,selectedKeys:Cn,inlineIndent:Re,subMenuOpenDelay:$,subMenuCloseDelay:U,forceSubMenuRender:G,builtinPlacements:We,triggerSubMenuAction:Fe,getPopupContainer:Lr,itemIcon:je,expandIcon:pt,onItemClick:Kr,onOpenChange:dr,children:[A(KB.Provider,{value:Ye,children:_r}),A("div",{style:{display:"none"},"aria-hidden":!0,children:A(jB.Provider,{value:Xe,children:at})})]})})})}),Sre=["className","title","eventKey","children"],Ere=["children"],Pre=function(t){var n=t.className,r=t.title;t.eventKey;var i=t.children,a=In(t,Sre),s=E.exports.useContext(Ns),o=s.prefixCls,c="".concat(o,"-item-group");return it("li",{role:"presentation",...a,onClick:function(p){return p.stopPropagation()},className:He(c,n),children:[A("div",{role:"presentation",className:"".concat(c,"-title"),title:typeof r=="string"?r:void 0,children:r}),A("ul",{role:"group",className:"".concat(c,"-list"),children:i})]})};function J_(e){var t=e.children,n=In(e,Ere),r=Uh(n.eventKey),i=DT(t,r),a=X_();return a?i:A(Pre,{...Wi(n,["warnKey"]),children:i})}function OT(e){var t=e.className,n=e.style,r=E.exports.useContext(Ns),i=r.prefixCls,a=X_();return a?null:A("li",{className:He("".concat(i,"-item-divider"),t),style:n})}var iv=Cre;iv.Item=Y_;iv.SubMenu=Q_;iv.ItemGroup=J_;iv.Divider=OT;var Tre={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 kre=Tre;var JB=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:kre})})};JB.displayName="LeftOutlined";const e8=E.exports.forwardRef(JB);var Ire={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 Mre=Ire;var t8=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:Mre})})};t8.displayName="RightOutlined";const e1=E.exports.forwardRef(t8);globalThis&&globalThis.__rest;var n8=E.exports.createContext({}),Rre=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Dre=function(t){var n=t.prefixCls,r=t.className,i=t.dashed,a=Rre(t,["prefixCls","className","dashed"]),s=E.exports.useContext(Fn),o=s.getPrefixCls,c=o("menu",n),f=He(ae({},"".concat(c,"-item-divider-dashed"),!!i),r);return A(OT,{className:f,...a})};const r8=Dre;var Ore=E.exports.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});const _b=Ore;var Are=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},AT=function(e){ai(n,e);var t=si(n);function n(){var r;return Ur(this,n),r=t.apply(this,arguments),r.renderItem=function(i){var a,s=i.siderCollapsed,o,c=r.context,f=c.prefixCls,p=c.firstLevel,g=c.inlineCollapsed,v=c.direction,b=c.disableMenuItemTitleTooltip,_=r.props,T=_.className,k=_.children,P=r.props,M=P.title,O=P.icon,N=P.danger,L=Are(P,["title","icon","danger"]),$=M;typeof M>"u"?$=p?k:"":M===!1&&($="");var j={title:$};!s&&!g&&(j.title=null,j.open=!1);var U=To(k).length,G=it(Y_,{...L,className:He((a={},ae(a,"".concat(f,"-item-danger"),N),ae(a,"".concat(f,"-item-only-child"),(O?U+1:U)===1),a),T),title:typeof M=="string"?M:void 0,children:[Ei(O,{className:He(Ia(O)?(o=O.props)===null||o===void 0?void 0:o.className:"","".concat(f,"-item-icon"))}),r.renderItemChildren(g)]});return b||(G=A(Ra,{...j,placement:v==="rtl"?"left":"right",overlayClassName:"".concat(f,"-inline-collapsed-tooltip"),children:G})),G},r}return jr(n,[{key:"renderItemChildren",value:function(i){var a=this.context,s=a.prefixCls,o=a.firstLevel,c=this.props,f=c.icon,p=c.children,g=A("span",{className:"".concat(s,"-title-content"),children:p});return(!f||Ia(p)&&p.type==="span")&&p&&i&&o&&typeof p=="string"?A("div",{className:"".concat(s,"-inline-collapsed-noicon"),children:p.charAt(0)}):g}},{key:"render",value:function(){return A(n8.Consumer,{children:this.renderItem})}}]),n}(E.exports.Component);AT.contextType=_b;function i8(e){var t,n=e.popupClassName,r=e.icon,i=e.title,a=e.theme,s=E.exports.useContext(_b),o=s.prefixCls,c=s.inlineCollapsed,f=s.antdMenuTheme,p=Uh(),g;if(!r)g=c&&!p.length&&i&&typeof i=="string"?A("div",{className:"".concat(o,"-inline-collapsed-noicon"),children:i.charAt(0)}):A("span",{className:"".concat(o,"-title-content"),children:i});else{var v=Ia(i)&&i.type==="span";g=it(nr,{children:[Ei(r,{className:He(Ia(r)?(t=r.props)===null||t===void 0?void 0:t.className:"","".concat(o,"-item-icon"))}),v?i:A("span",{className:"".concat(o,"-title-content"),children:i})]})}var b=E.exports.useMemo(function(){return Be(Be({},s),{firstLevel:!1})},[s]);return A(_b.Provider,{value:b,children:A(Q_,{...Wi(e,["icon"]),title:g,popupClassName:He(o,"".concat(o,"-").concat(a||f),n)})})}var Nre=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function B4(e){return(e||[]).map(function(t,n){if(t&&on(t)==="object"){var r=t,i=r.label,a=r.children,s=r.key,o=r.type,c=Nre(r,["label","children","key","type"]),f=s!=null?s:"tmp-".concat(n);return a||o==="group"?o==="group"?A(J_,{...c,title:i,children:B4(a)},f):A(i8,{...c,title:i,children:B4(a)},f):o==="divider"?A(r8,{...c},f):A(AT,{...c,children:i},f)}return null}).filter(function(t){return t})}function Lre(e){return E.exports.useMemo(function(){return e&&B4(e)},[e])}var Fre=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},wb=E.exports.createContext(null),o8=function(t){var n=t.children,r=Fre(t,["children"]),i=E.exports.useContext(wb),a=E.exports.useMemo(function(){return Be(Be({},i),r)},[i,r.prefixCls,r.mode,r.selectable]);return A(wb.Provider,{value:a,children:n})},zre=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},$re=E.exports.forwardRef(function(e,t){var n,r=E.exports.useContext(wb)||{},i=E.exports.useContext(Fn),a=i.getPrefixCls,s=i.getPopupContainer,o=i.direction,c=a(),f=e.prefixCls,p=e.className,g=e.theme,v=g===void 0?"light":g,b=e.expandIcon,_=e._internalDisableMenuItemTitleTooltip,T=e.inlineCollapsed,k=e.siderCollapsed,P=e.items,M=e.children,O=e.mode,N=e.selectable,L=e.onClick,$=zre(e,["prefixCls","className","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","mode","selectable","onClick"]),j=Wi($,["collapsedWidth"]),U=Lre(P)||M;(n=r.validator)===null||n===void 0||n.call(r,{mode:O});var G=Pg(function(){var oe;L==null||L.apply(void 0,arguments),(oe=r==null?void 0:r.onClick)===null||oe===void 0||oe.call(r)}),Z=r.mode||O,Q=N!=null?N:r.selectable,J=E.exports.useMemo(function(){return k!==void 0?k:T},[T,k]),re={horizontal:{motionName:"".concat(c,"-slide-up")},inline:G_,other:{motionName:"".concat(c,"-zoom-big")}},ne=a("menu",f||r.prefixCls),ge=He("".concat(ne,"-").concat(v),p),ie;typeof b=="function"?ie=b:ie=Ei(b||r.expandIcon,{className:"".concat(ne,"-submenu-expand-icon")});var ue=E.exports.useMemo(function(){return{prefixCls:ne,inlineCollapsed:J||!1,antdMenuTheme:v,direction:o,firstLevel:!0,disableMenuItemTitleTooltip:_}},[ne,J,v,o,_]);return A(wb.Provider,{value:null,children:A(_b.Provider,{value:ue,children:A(iv,{getPopupContainer:s,overflowedIndicator:A(BB,{}),overflowedIndicatorPopupClassName:"".concat(ne,"-").concat(v),mode:Z,selectable:Q,onClick:G,...j,inlineCollapsed:J,className:ge,prefixCls:ne,direction:o,defaultMotions:re,expandIcon:ie,ref:t,children:U})})})}),ov=function(e){ai(n,e);var t=si(n);function n(){var r;return Ur(this,n),r=t.apply(this,arguments),r.focus=function(i){var a;(a=r.menu)===null||a===void 0||a.focus(i)},r}return jr(n,[{key:"render",value:function(){var i=this;return A(n8.Consumer,{children:function(a){return A($re,{ref:function(o){i.menu=o},...i.props,...a})}})}}]),n}(E.exports.Component);ov.Divider=r8;ov.Item=AT;ov.SubMenu=i8;ov.ItemGroup=J_;const a8=ov;var Tf={adjustX:1,adjustY:1},kf=[0,0],Bre={topLeft:{points:["bl","tl"],overflow:Tf,offset:[0,-4],targetOffset:kf},topCenter:{points:["bc","tc"],overflow:Tf,offset:[0,-4],targetOffset:kf},topRight:{points:["br","tr"],overflow:Tf,offset:[0,-4],targetOffset:kf},bottomLeft:{points:["tl","bl"],overflow:Tf,offset:[0,4],targetOffset:kf},bottomCenter:{points:["tc","bc"],overflow:Tf,offset:[0,4],targetOffset:kf},bottomRight:{points:["tr","br"],overflow:Tf,offset:[0,4],targetOffset:kf}},Vre=Tt.ESC,Ure=Tt.TAB;function jre(e){var t=e.visible,n=e.setTriggerVisible,r=e.triggerRef,i=e.onVisibleChange,a=e.autoFocus,s=E.exports.useRef(!1),o=function(){if(t&&r.current){var g,v,b,_;(g=r.current)===null||g===void 0||(v=g.triggerRef)===null||v===void 0||(b=v.current)===null||b===void 0||(_=b.focus)===null||_===void 0||_.call(b),n(!1),typeof i=="function"&&i(!1)}},c=function(){var g,v,b,_,T=WB((g=r.current)===null||g===void 0||(v=g.popupRef)===null||v===void 0||(b=v.current)===null||b===void 0||(_=b.getElement)===null||_===void 0?void 0:_.call(b)),k=T[0];return k!=null&&k.focus?(k.focus(),s.current=!0,!0):!1},f=function(g){switch(g.keyCode){case Vre:o();break;case Ure:{var v=!1;s.current||(v=c()),v?g.preventDefault():o();break}}};E.exports.useEffect(function(){return t?(window.addEventListener("keydown",f),a&&ur(c,3),function(){window.removeEventListener("keydown",f),s.current=!1}):function(){s.current=!1}},[t])}var Hre=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus"];function Kre(e,t){var n=e.arrow,r=n===void 0?!1:n,i=e.prefixCls,a=i===void 0?"rc-dropdown":i,s=e.transitionName,o=e.animation,c=e.align,f=e.placement,p=f===void 0?"bottomLeft":f,g=e.placements,v=g===void 0?Bre:g,b=e.getPopupContainer,_=e.showAction,T=e.hideAction,k=e.overlayClassName,P=e.overlayStyle,M=e.visible,O=e.trigger,N=O===void 0?["hover"]:O,L=e.autoFocus,$=In(e,Hre),j=E.exports.useState(),U=$e(j,2),G=U[0],Z=U[1],Q="visible"in e?M:G,J=E.exports.useRef(null);E.exports.useImperativeHandle(t,function(){return J.current}),jre({visible:Q,setTriggerVisible:Z,triggerRef:J,onVisibleChange:e.onVisibleChange,autoFocus:L});var re=function(){var Re=e.overlay,Ee;return typeof Re=="function"?Ee=Re():Ee=Re,Ee},ne=function(Re){var Ee=e.onOverlayClick;Z(!1),Ee&&Ee(Re)},ge=function(Re){var Ee=e.onVisibleChange;Z(Re),typeof Ee=="function"&&Ee(Re)},ie=function(){var Re=re();return it(nr,{children:[r&&A("div",{className:"".concat(a,"-arrow")}),Re]})},ue=function(){var Re=e.overlay;return typeof Re=="function"?ie:ie()},oe=function(){var Re=e.minOverlayWidthMatchTrigger,Ee=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?Re:!Ee},me=function(){var Re=e.openClassName;return Re!==void 0?Re:"".concat(a,"-open")},Te=function(){var Re=e.children,Ee=Re.props?Re.props:{},Me=He(Ee.className,me());return Q&&Re?E.exports.cloneElement(Re,{className:Me}):Re},we=T;return!we&&N.indexOf("contextMenu")!==-1&&(we=["click"]),A(W_,{...fe(fe({builtinPlacements:v},$),{},{prefixCls:a,ref:J,popupClassName:He(k,ae({},"".concat(a,"-show-arrow"),r)),popupStyle:P,action:N,showAction:_,hideAction:we||[],popupPlacement:p,popupAlign:c,popupTransitionName:s,popupAnimation:o,popupVisible:Q,stretch:oe()?"minWidth":"",popup:ue(),onPopupVisibleChange:ge,onPopupClick:ne,getPopupContainer:b}),children:Te()})}const Wre=E.exports.forwardRef(Kre);var Gre=0,ih={};function Cb(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,n=Gre++,r=t;function i(){r-=1,r<=0?(e(),delete ih[n]):ih[n]=ur(i)}return ih[n]=ur(i),n}Cb.cancel=function(t){t!==void 0&&(ur.cancel(ih[t]),delete ih[t])};Cb.ids=ih;var HC;function LD(e){return!e||e.offsetParent===null||e.hidden}function qre(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 Zre(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 s8=function(e){ai(n,e);var t=si(n);function n(){var r;return Ur(this,n),r=t.apply(this,arguments),r.containerRef=E.exports.createRef(),r.animationStart=!1,r.destroyed=!1,r.onClick=function(i,a){var s,o,c=r.props,f=c.insertExtraNode,p=c.disabled;if(!(p||!i||LD(i)||i.className.includes("-leave"))){r.extraNode=document.createElement("div");var g=zn(r),v=g.extraNode,b=r.context.getPrefixCls;v.className="".concat(b(""),"-click-animating-node");var _=r.getAttributeName();if(i.setAttribute(_,"true"),a&&a!=="#fff"&&a!=="#ffffff"&&a!=="rgb(255, 255, 255)"&&a!=="rgba(255, 255, 255, 1)"&&Zre(a)&&!/rgba\((?:\d*, ){3}0\)/.test(a)&&a!=="transparent"){v.style.borderColor=a;var T=((s=i.getRootNode)===null||s===void 0?void 0:s.call(i))||i.ownerDocument,k=(o=qre(T))!==null&&o!==void 0?o:T;HC=ev(`
[`.concat(b(""),"-click-animating-without-extra-node='true']::after, .").concat(b(""),`-click-animating-node {
--antd-wave-shadow-color: `).concat(a,`;
}`),"antd-wave",{csp:r.csp,attachTo:k})}f&&i.appendChild(v),["transition","animation"].forEach(function(P){i.addEventListener("".concat(P,"start"),r.onTransitionStart),i.addEventListener("".concat(P,"end"),r.onTransitionEnd)})}},r.onTransitionStart=function(i){if(!r.destroyed){var a=r.containerRef.current;!i||i.target!==a||r.animationStart||r.resetEffect(a)}},r.onTransitionEnd=function(i){!i||i.animationName!=="fadeEffect"||r.resetEffect(i.target)},r.bindAnimationEvent=function(i){if(!(!i||!i.getAttribute||i.getAttribute("disabled")||i.className.includes("disabled"))){var a=function(o){if(!(o.target.tagName==="INPUT"||LD(o.target))){r.resetEffect(i);var c=getComputedStyle(i).getPropertyValue("border-top-color")||getComputedStyle(i).getPropertyValue("border-color")||getComputedStyle(i).getPropertyValue("background-color");r.clickWaveTimeoutId=window.setTimeout(function(){return r.onClick(i,c)},0),Cb.cancel(r.animationStartId),r.animationStart=!0,r.animationStartId=Cb(function(){r.animationStart=!1},10)}};return i.addEventListener("click",a,!0),{cancel:function(){i.removeEventListener("click",a,!0)}}}},r.renderWave=function(i){var a=i.csp,s=r.props.children;if(r.csp=a,!E.exports.isValidElement(s))return s;var o=r.containerRef;return Lh(s)&&(o=La(s.ref,r.containerRef)),Ei(s,{ref:o})},r}return jr(n,[{key:"componentDidMount",value:function(){this.destroyed=!1;var i=this.containerRef.current;!i||i.nodeType!==1||(this.instance=this.bindAnimationEvent(i))}},{key:"componentWillUnmount",value:function(){this.instance&&this.instance.cancel(),this.clickWaveTimeoutId&&clearTimeout(this.clickWaveTimeoutId),this.destroyed=!0}},{key:"getAttributeName",value:function(){var i=this.context.getPrefixCls,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 s=this.props.insertExtraNode,o=this.getAttributeName();i.setAttribute(o,"false"),HC&&(HC.innerHTML=""),s&&this.extraNode&&i.contains(this.extraNode)&&i.removeChild(this.extraNode),["transition","animation"].forEach(function(c){i.removeEventListener("".concat(c,"start"),a.onTransitionStart),i.removeEventListener("".concat(c,"end"),a.onTransitionEnd)})}}},{key:"render",value:function(){return A(Ud,{children:this.renderWave})}}]),n}(E.exports.Component);s8.contextType=Fn;const Xre=s8;var Yre=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},l8=E.exports.createContext(void 0),Qre=function(t){var n,r=E.exports.useContext(Fn),i=r.getPrefixCls,a=r.direction,s=t.prefixCls,o=t.size,c=t.className,f=Yre(t,["prefixCls","size","className"]),p=i("btn-group",s),g="";switch(o){case"large":g="lg";break;case"small":g="sm";break}var v=He(p,(n={},ae(n,"".concat(p,"-").concat(g),g),ae(n,"".concat(p,"-rtl"),a==="rtl"),n),c);return A(l8.Provider,{value:o,children:A("div",{...f,className:v})})};const Jre=Qre;var KC=function(){return{width:0,opacity:0,transform:"scale(0)"}},WC=function(t){return{width:t.scrollWidth,opacity:1,transform:"scale(1)"}},eie=function(t){var n=t.prefixCls,r=t.loading,i=t.existIcon,a=!!r;return i?A("span",{className:"".concat(n,"-loading-icon"),children:A(Id,{})}):A(sa,{visible:a,motionName:"".concat(n,"-loading-icon-motion"),removeOnLeave:!0,onAppearStart:KC,onAppearActive:WC,onEnterStart:KC,onEnterActive:WC,onLeaveStart:WC,onLeaveActive:KC,children:function(s,o){var c=s.className,f=s.style;return A("span",{className:"".concat(n,"-loading-icon"),style:f,ref:o,children:A(Id,{className:c})})}})};const tie=eie;var nie=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},FD=/^[\u4e00-\u9fa5]{2}$/,V4=FD.test.bind(FD);function rie(e){return typeof e=="string"}function GC(e){return e==="text"||e==="link"}function iie(e,t){if(e!=null){var n=t?" ":"";return typeof e!="string"&&typeof e!="number"&&rie(e.type)&&V4(e.props.children)?Ei(e,{children:e.props.children.split("").join(n)}):typeof e=="string"?V4(e)?A("span",{children:e.split("").join(n)}):A("span",{children:e}):j$(e)?A("span",{children:e}):e}}function oie(e,t){var n=!1,r=[];return E.exports.Children.forEach(e,function(i){var a=on(i),s=a==="string"||a==="number";if(n&&s){var o=r.length-1,c=r[o];r[o]="".concat(c).concat(i)}else r.push(i);n=s}),E.exports.Children.map(r,function(i){return iie(i,t)})}la("default","primary","ghost","dashed","link","text");la("default","circle","round");la("submit","button","reset");function u8(e){return e==="danger"?{danger:!0}:{type:e}}var aie=function(t,n){var r,i=t.loading,a=i===void 0?!1:i,s=t.prefixCls,o=t.type,c=o===void 0?"default":o,f=t.danger,p=t.shape,g=p===void 0?"default":p,v=t.size,b=t.disabled,_=t.className,T=t.children,k=t.icon,P=t.ghost,M=P===void 0?!1:P,O=t.block,N=O===void 0?!1:O,L=t.htmlType,$=L===void 0?"button":L,j=nie(t,["loading","prefixCls","type","danger","shape","size","disabled","className","children","icon","ghost","block","htmlType"]),U=E.exports.useContext(nu),G=E.exports.useContext(fc),Z=b!=null?b:G,Q=E.exports.useContext(l8),J=E.exports.useState(!!a),re=$e(J,2),ne=re[0],ge=re[1],ie=E.exports.useState(!1),ue=$e(ie,2),oe=ue[0],me=ue[1],Te=E.exports.useContext(Fn),we=Te.getPrefixCls,be=Te.autoInsertSpaceInButton,Re=Te.direction,Ee=n||E.exports.createRef(),Me=function(){return E.exports.Children.count(T)===1&&!k&&!GC(c)},Ae=function(){if(!(!Ee||!Ee.current||be===!1)){var bt=Ee.current.textContent;Me()&&V4(bt)?oe||me(!0):oe&&me(!1)}},Fe=typeof a=="boolean"?a:(a==null?void 0:a.delay)||!0;E.exports.useEffect(function(){var ct=null;return typeof Fe=="number"?ct=window.setTimeout(function(){ct=null,ge(Fe)},Fe):ge(Fe),function(){ct&&(window.clearTimeout(ct),ct=null)}},[Fe]),E.exports.useEffect(Ae,[Ee]);var We=function(bt){var At=t.onClick;if(ne||Z){bt.preventDefault();return}At==null||At(bt)},je=we("btn",s),pt=be!==!1,gt=Vh(je,Re),Ot=gt.compactSize,Ze=gt.compactItemClassnames,St={large:"lg",small:"sm",middle:void 0},ot=Ot||Q||v||U,vt=ot&&St[ot]||"",yt=ne?"loading":k,kt=Wi(j,["navigate"]),et=He(je,(r={},ae(r,"".concat(je,"-").concat(g),g!=="default"&&g),ae(r,"".concat(je,"-").concat(c),c),ae(r,"".concat(je,"-").concat(vt),vt),ae(r,"".concat(je,"-icon-only"),!T&&T!==0&&!!yt),ae(r,"".concat(je,"-background-ghost"),M&&!GC(c)),ae(r,"".concat(je,"-loading"),ne),ae(r,"".concat(je,"-two-chinese-chars"),oe&&pt&&!ne),ae(r,"".concat(je,"-block"),N),ae(r,"".concat(je,"-dangerous"),!!f),ae(r,"".concat(je,"-rtl"),Re==="rtl"),ae(r,"".concat(je,"-disabled"),kt.href!==void 0&&Z),r),Ze,_),ut=k&&!ne?k:A(tie,{existIcon:!!k,prefixCls:je,loading:!!ne}),at=T||T===0?oie(T,Me()&&pt):null;if(kt.href!==void 0)return it("a",{...kt,className:et,onClick:We,ref:Ee,children:[ut,at]});var Ke=it("button",{...j,type:$,className:et,onClick:We,disabled:Z,ref:Ee,children:[ut,at]});return GC(c)?Ke:A(Xre,{disabled:!!ne,children:Ke})},NT=E.exports.forwardRef(aie);NT.Group=Jre;NT.__ANT_BUTTON=!0;const Xr=NT;var c8=function(t){if(ko()&&window.document.documentElement){var n=Array.isArray(t)?t:[t],r=window.document.documentElement;return n.some(function(i){return i in r.style})}return!1},sie=function(t,n){if(!c8(t))return!1;var r=document.createElement("div"),i=r.style[t];return r.style[t]=n,r.style[t]!==i};function U4(e,t){return!Array.isArray(e)&&t!==void 0?sie(e,t):c8(e)}var d8=function(){return ko()&&window.document.documentElement},g0,lie=function(){if(!d8())return!1;if(g0!==void 0)return g0;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),g0=t.scrollHeight===1,document.body.removeChild(t),g0};const f8=function(){var e=E.exports.useState(!1),t=$e(e,2),n=t[0],r=t[1];return E.exports.useEffect(function(){r(lie())},[]),n};function uie(e){var t=e.className,n=e.direction,r=e.index,i=e.marginDirection,a=e.children,s=e.split,o=e.wrap,c=E.exports.useContext(h8),f=c.horizontalSize,p=c.verticalSize,g=c.latestIndex,v=c.supportFlexGap,b={};return v||(n==="vertical"?r<g&&(b={marginBottom:f/(s?2:1)}):b=Be(Be({},r<g&&ae({},i,f/(s?2:1))),o&&{paddingBottom:p})),a==null?null:it(nr,{children:[A("div",{className:t,style:b,children:a}),r<g&&s&&A("span",{className:"".concat(t,"-split"),style:b,children:s})]})}var cie=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},h8=E.exports.createContext({latestIndex:0,horizontalSize:0,verticalSize:0,supportFlexGap:!1}),die={small:8,middle:16,large:24};function fie(e){return typeof e=="string"?die[e]:e||0}var hie=function(t){var n,r=E.exports.useContext(Fn),i=r.getPrefixCls,a=r.space,s=r.direction,o=t.size,c=o===void 0?(a==null?void 0:a.size)||"small":o,f=t.align,p=t.className,g=t.children,v=t.direction,b=v===void 0?"horizontal":v,_=t.prefixCls,T=t.split,k=t.style,P=t.wrap,M=P===void 0?!1:P,O=cie(t,["size","align","className","children","direction","prefixCls","split","style","wrap"]),N=f8(),L=E.exports.useMemo(function(){return(Array.isArray(c)?c:[c,c]).map(function(me){return fie(me)})},[c]),$=$e(L,2),j=$[0],U=$[1],G=To(g,{keepEmpty:!0}),Z=f===void 0&&b==="horizontal"?"center":f,Q=i("space",_),J=He(Q,"".concat(Q,"-").concat(b),(n={},ae(n,"".concat(Q,"-rtl"),s==="rtl"),ae(n,"".concat(Q,"-align-").concat(Z),Z),n),p),re="".concat(Q,"-item"),ne=s==="rtl"?"marginLeft":"marginRight",ge=0,ie=G.map(function(me,Te){me!=null&&(ge=Te);var we=me&&me.key||"".concat(re,"-").concat(Te);return A(uie,{className:re,direction:b,index:Te,marginDirection:ne,split:T,wrap:M,children:me},we)}),ue=E.exports.useMemo(function(){return{horizontalSize:j,verticalSize:U,latestIndex:ge,supportFlexGap:N}},[j,U,ge,N]);if(G.length===0)return null;var oe={};return M&&(oe.flexWrap="wrap",N||(oe.marginBottom=-U)),N&&(oe.columnGap=j,oe.rowGap=U),A("div",{className:J,style:Be(Be({},oe),k),...O,children:A(h8.Provider,{value:ue,children:ie})})},p8=hie;p8.Compact=Tne;const pie=p8;var mie=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},m8=function(t){var n=E.exports.useContext(Fn),r=n.getPopupContainer,i=n.getPrefixCls,a=n.direction,s=t.prefixCls,o=t.type,c=o===void 0?"default":o,f=t.danger,p=t.disabled,g=t.loading,v=t.onClick,b=t.htmlType,_=t.children,T=t.className,k=t.menu,P=t.arrow,M=t.autoFocus,O=t.overlay,N=t.trigger,L=t.align,$=t.visible,j=t.open,U=t.onVisibleChange,G=t.onOpenChange,Z=t.placement,Q=t.getPopupContainer,J=t.href,re=t.icon,ne=re===void 0?A(BB,{}):re,ge=t.title,ie=t.buttonsRender,ue=ie===void 0?function(vt){return vt}:ie,oe=t.mouseEnterDelay,me=t.mouseLeaveDelay,Te=t.overlayClassName,we=t.overlayStyle,be=t.destroyPopupOnHide,Re=mie(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"]),Ee=i("dropdown-button",s),Me={menu:k,arrow:P,autoFocus:M,align:L,disabled:p,trigger:p?[]:N,onOpenChange:G||U,getPopupContainer:Q||r,mouseEnterDelay:oe,mouseLeaveDelay:me,overlayClassName:Te,overlayStyle:we,destroyPopupOnHide:be},Ae=Vh(Ee,a),Fe=Ae.compactSize,We=Ae.compactItemClassnames,je=He(Ee,We,T);"overlay"in t&&(Me.overlay=O),"open"in t?Me.open=j:"visible"in t&&(Me.open=$),"placement"in t?Me.placement=Z:Me.placement=a==="rtl"?"bottomLeft":"bottomRight";var pt=A(Xr,{type:c,danger:f,disabled:p,loading:g,onClick:v,htmlType:b,href:J,title:ge,children:_}),gt=A(Xr,{type:c,danger:f,icon:ne}),Ot=ue([pt,gt]),Ze=$e(Ot,2),St=Ze[0],ot=Ze[1];return it(pie.Compact,{className:je,size:Fe,block:!0,...Re,children:[St,A(t1,{...Me,children:ot})]})};m8.__ANT_BUTTON=!0;const gie=m8;la("topLeft","topCenter","topRight","bottomLeft","bottomCenter","bottomRight","top","bottom");var g8=function(t){var n=E.exports.useContext(Fn),r=n.getPopupContainer,i=n.getPrefixCls,a=n.direction,s=function(){var Ae=i(),Fe=t.placement,We=Fe===void 0?"":Fe,je=t.transitionName;return je!==void 0?je:We.includes("top")?"".concat(Ae,"-slide-down"):"".concat(Ae,"-slide-up")},o=function(){var Ae=t.placement;if(!Ae)return a==="rtl"?"bottomRight":"bottomLeft";if(Ae.includes("Center")){var Fe=Ae.slice(0,Ae.indexOf("Center"));return Fe}return Ae},c=t.menu,f=t.arrow,p=t.prefixCls,g=t.children,v=t.trigger,b=t.disabled,_=t.dropdownRender,T=t.getPopupContainer,k=t.overlayClassName,P=t.visible,M=t.open,O=t.onVisibleChange,N=t.onOpenChange,L=t.mouseEnterDelay,$=L===void 0?.15:L,j=t.mouseLeaveDelay,U=j===void 0?.1:j,G=t.autoAdjustOverflow,Z=G===void 0?!0:G,Q=i("dropdown",p),J=E.exports.Children.only(g),re=Ei(J,{className:He("".concat(Q,"-trigger"),ae({},"".concat(Q,"-rtl"),a==="rtl"),J.props.className),disabled:b}),ne=b?[]:v,ge;ne&&ne.includes("contextMenu")&&(ge=!0);var ie=Si(!1,{value:M!==void 0?M:P}),ue=$e(ie,2),oe=ue[0],me=ue[1],Te=Pg(function(Me){O==null||O(Me),N==null||N(Me),me(Me)}),we=He(k,ae({},"".concat(Q,"-rtl"),a==="rtl")),be=FB({arrowPointAtCenter:on(f)==="object"&&f.pointAtCenter,autoAdjustOverflow:Z}),Re=E.exports.useCallback(function(){me(!1)},[]),Ee=function(){var Ae=t.overlay,Fe;return c!=null&&c.items?Fe=A(a8,{...c}):typeof Ae=="function"?Fe=Ae():Fe=Ae,_&&(Fe=_(Fe)),Fe=E.exports.Children.only(typeof Fe=="string"?A("span",{children:Fe}):Fe),A(o8,{prefixCls:"".concat(Q,"-menu"),expandIcon:A("span",{className:"".concat(Q,"-menu-submenu-arrow"),children:A(e1,{className:"".concat(Q,"-menu-submenu-arrow-icon")})}),mode:"vertical",selectable:!1,onClick:Re,validator:function(je){je.mode},children:A(vb,{children:Fe})})};return A(Wre,{alignPoint:ge,...t,mouseEnterDelay:$,mouseLeaveDelay:U,visible:oe,builtinPlacements:be,arrow:!!f,overlayClassName:we,prefixCls:Q,getPopupContainer:T||r,transitionName:s(),trigger:ne,overlay:Ee,placement:o(),onVisibleChange:Te,children:re})};g8.Button=gie;const t1=g8;var vie=typeof Vl=="object"&&Vl&&Vl.Object===Object&&Vl,v8=vie,yie=v8,xie=typeof self=="object"&&self&&self.Object===Object&&self,bie=yie||xie||Function("return this")(),dl=bie,_ie=dl,wie=_ie.Symbol,LT=wie,Cie=Array.isArray,FT=Cie,zD=LT,y8=Object.prototype,Sie=y8.hasOwnProperty,Eie=y8.toString,sm=zD?zD.toStringTag:void 0;function Pie(e){var t=Sie.call(e,sm),n=e[sm];try{e[sm]=void 0;var r=!0}catch{}var i=Eie.call(e);return r&&(t?e[sm]=n:delete e[sm]),i}var Tie=Pie,kie=Object.prototype,Iie=kie.toString;function Mie(e){return Iie.call(e)}var Rie=Mie,$D=LT,Die=Tie,Oie=Rie,Aie="[object Null]",Nie="[object Undefined]",BD=$D?$D.toStringTag:void 0;function Lie(e){return e==null?e===void 0?Nie:Aie:BD&&BD in Object(e)?Die(e):Oie(e)}var av=Lie;function Fie(e){return e!=null&&typeof e=="object"}var sv=Fie,zie=av,$ie=sv,Bie="[object Symbol]";function Vie(e){return typeof e=="symbol"||$ie(e)&&zie(e)==Bie}var Uie=Vie,jie=/\s/;function Hie(e){for(var t=e.length;t--&&jie.test(e.charAt(t)););return t}var Kie=Hie,Wie=Kie,Gie=/^\s+/;function qie(e){return e&&e.slice(0,Wie(e)+1).replace(Gie,"")}var Zie=qie;function Xie(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var n1=Xie,Yie=Zie,VD=n1,Qie=Uie,UD=0/0,Jie=/^[-+]0x[0-9a-f]+$/i,eoe=/^0b[01]+$/i,toe=/^0o[0-7]+$/i,noe=parseInt;function roe(e){if(typeof e=="number")return e;if(Qie(e))return UD;if(VD(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=VD(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Yie(e);var n=eoe.test(e);return n||toe.test(e)?noe(e.slice(2),n?2:8):Jie.test(e)?UD:+e}var ioe=roe,Md=function(t,n,r,i){var a=r?r.call(i,t,n):void 0;if(a!==void 0)return!!a;if(t===n)return!0;if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;var s=Object.keys(t),o=Object.keys(n);if(s.length!==o.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(n),f=0;f<s.length;f++){var p=s[f];if(!c(p))return!1;var g=t[p],v=n[p];if(a=r?r.call(i,g,v,p):void 0,a===!1||a===void 0&&g!==v)return!1}return!0},x8=E.exports.createContext(null),ooe=x8.Provider,b8=E.exports.createContext(null),aoe=b8.Provider,zT=function(e){ai(n,e);var t=si(n);function n(r){var i;Ur(this,n),i=t.call(this,r),i.handleChange=function(s){var o=i.props,c=o.disabled,f=o.onChange;c||("checked"in i.props||i.setState({checked:s.target.checked}),f&&f({target:fe(fe({},i.props),{},{checked:s.target.checked}),stopPropagation:function(){s.stopPropagation()},preventDefault:function(){s.preventDefault()},nativeEvent:s.nativeEvent}))},i.saveInput=function(s){i.input=s};var a="checked"in r?r.checked:r.defaultChecked;return i.state={checked:a},i}return jr(n,[{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"render",value:function(){var i,a=this.props,s=a.prefixCls,o=a.className,c=a.style,f=a.name,p=a.id,g=a.type,v=a.disabled,b=a.readOnly,_=a.tabIndex,T=a.onClick,k=a.onFocus,P=a.onBlur,M=a.onKeyDown,O=a.onKeyPress,N=a.onKeyUp,L=a.autoFocus,$=a.value,j=a.required,U=In(a,["prefixCls","className","style","name","id","type","disabled","readOnly","tabIndex","onClick","onFocus","onBlur","onKeyDown","onKeyPress","onKeyUp","autoFocus","value","required"]),G=Object.keys(U).reduce(function(J,re){return(re.substr(0,5)==="aria-"||re.substr(0,5)==="data-"||re==="role")&&(J[re]=U[re]),J},{}),Z=this.state.checked,Q=He(s,o,(i={},ae(i,"".concat(s,"-checked"),Z),ae(i,"".concat(s,"-disabled"),v),i));return it("span",{className:Q,style:c,children:[A("input",{name:f,id:p,type:g,required:j,readOnly:b,disabled:v,tabIndex:_,className:"".concat(s,"-input"),checked:!!Z,onClick:T,onFocus:k,onBlur:P,onKeyUp:N,onKeyDown:M,onKeyPress:O,onChange:this.handleChange,autoFocus:L,ref:this.saveInput,value:$,...G}),A("span",{className:"".concat(s,"-inner")})]})}}],[{key:"getDerivedStateFromProps",value:function(i,a){return"checked"in i?fe(fe({},a),{},{checked:i.checked}):null}}]),n}(E.exports.Component);zT.defaultProps={prefixCls:"rc-checkbox",className:"",style:{},type:"checkbox",defaultChecked:!1,onFocus:function(){},onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){}};var soe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},loe=function(t,n){var r,i=E.exports.useContext(x8),a=E.exports.useContext(b8),s=E.exports.useContext(Fn),o=s.getPrefixCls,c=s.direction,f=E.exports.useRef(),p=La(n,f),g=E.exports.useContext(As),v=g.isFormItemInput,b=function(Z){var Q,J;(Q=t.onChange)===null||Q===void 0||Q.call(t,Z),(J=i==null?void 0:i.onChange)===null||J===void 0||J.call(i,Z)},_=t.prefixCls,T=t.className,k=t.children,P=t.style,M=t.disabled,O=soe(t,["prefixCls","className","children","style","disabled"]),N=o("radio",_),L=((i==null?void 0:i.optionType)||a)==="button"?"".concat(N,"-button"):N,$=Be({},O),j=E.exports.useContext(fc);$.disabled=M||j,i&&($.name=i.name,$.onChange=b,$.checked=t.value===i.value,$.disabled=$.disabled||i.disabled);var U=He("".concat(L,"-wrapper"),(r={},ae(r,"".concat(L,"-wrapper-checked"),$.checked),ae(r,"".concat(L,"-wrapper-disabled"),$.disabled),ae(r,"".concat(L,"-wrapper-rtl"),c==="rtl"),ae(r,"".concat(L,"-wrapper-in-form-item"),v),r),T);return it("label",{className:U,style:P,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,children:[A(zT,{...$,type:"radio",prefixCls:L,ref:p}),k!==void 0?A("span",{children:k}):null]})},uoe=E.exports.forwardRef(loe);const Sb=uoe;var coe=E.exports.forwardRef(function(e,t){var n,r=E.exports.useContext(Fn),i=r.getPrefixCls,a=r.direction,s=E.exports.useContext(nu),o=Si(e.defaultValue,{value:e.value}),c=$e(o,2),f=c[0],p=c[1],g=function(ue){var oe=f,me=ue.target.value;"value"in e||p(me);var Te=e.onChange;Te&&me!==oe&&Te(ue)},v=e.prefixCls,b=e.className,_=b===void 0?"":b,T=e.options,k=e.buttonStyle,P=k===void 0?"outline":k,M=e.disabled,O=e.children,N=e.size,L=e.style,$=e.id,j=e.onMouseEnter,U=e.onMouseLeave,G=e.onFocus,Z=e.onBlur,Q=i("radio",v),J="".concat(Q,"-group"),re=O;T&&T.length>0&&(re=T.map(function(ie){return typeof ie=="string"||typeof ie=="number"?A(Sb,{prefixCls:Q,disabled:M,value:ie,checked:f===ie,children:ie},ie.toString()):A(Sb,{prefixCls:Q,disabled:ie.disabled||M,value:ie.value,checked:f===ie.value,style:ie.style,children:ie.label},"radio-group-value-options-".concat(ie.value))}));var ne=N||s,ge=He(J,"".concat(J,"-").concat(P),(n={},ae(n,"".concat(J,"-").concat(ne),ne),ae(n,"".concat(J,"-rtl"),a==="rtl"),n),_);return A("div",{...U$(e),className:ge,style:L,onMouseEnter:j,onMouseLeave:U,onFocus:G,onBlur:Z,id:$,ref:t,children:A(ooe,{value:{onChange:g,value:f,disabled:e.disabled,name:e.name,optionType:e.optionType},children:re})})});const doe=E.exports.memo(coe);var foe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},hoe=function(t,n){var r=E.exports.useContext(Fn),i=r.getPrefixCls,a=t.prefixCls,s=foe(t,["prefixCls"]),o=i("radio",a);return A(aoe,{value:"button",children:A(Sb,{prefixCls:o,...s,type:"radio",ref:n})})};const poe=E.exports.forwardRef(hoe);var r1=Sb;r1.Button=poe;r1.Group=doe;r1.__ANT_RADIO=!0;const _8=r1;var moe=dl,goe=function(){return moe.Date.now()},voe=goe,yoe=n1,qC=voe,jD=ioe,xoe="Expected a function",boe=Math.max,_oe=Math.min;function woe(e,t,n){var r,i,a,s,o,c,f=0,p=!1,g=!1,v=!0;if(typeof e!="function")throw new TypeError(xoe);t=jD(t)||0,yoe(n)&&(p=!!n.leading,g="maxWait"in n,a=g?boe(jD(n.maxWait)||0,t):a,v="trailing"in n?!!n.trailing:v);function b($){var j=r,U=i;return r=i=void 0,f=$,s=e.apply(U,j),s}function _($){return f=$,o=setTimeout(P,t),p?b($):s}function T($){var j=$-c,U=$-f,G=t-j;return g?_oe(G,a-U):G}function k($){var j=$-c,U=$-f;return c===void 0||j>=t||j<0||g&&U>=a}function P(){var $=qC();if(k($))return M($);o=setTimeout(P,T($))}function M($){return o=void 0,v&&r?b($):(r=i=void 0,s)}function O(){o!==void 0&&clearTimeout(o),f=0,r=c=i=o=void 0}function N(){return o===void 0?s:M(qC())}function L(){var $=qC(),j=k($);if(r=arguments,i=this,c=$,j){if(o===void 0)return _(c);if(g)return clearTimeout(o),o=setTimeout(P,t),b(c)}return o===void 0&&(o=setTimeout(P,t)),s}return L.cancel=O,L.flush=N,L}var Coe=woe;function w8(e,t){var n=new Set;return e.forEach(function(r){t.has(r)||n.add(r)}),n}function Soe(e){var t=e||{},n=t.disabled,r=t.disableCheckbox,i=t.checkable;return!!(n||r)||i===!1}function Eoe(e,t,n,r){for(var i=new Set(e),a=new Set,s=0;s<=n;s+=1){var o=t.get(s)||new Set;o.forEach(function(g){var v=g.key,b=g.node,_=g.children,T=_===void 0?[]:_;i.has(v)&&!r(b)&&T.filter(function(k){return!r(k.node)}).forEach(function(k){i.add(k.key)})})}for(var c=new Set,f=n;f>=0;f-=1){var p=t.get(f)||new Set;p.forEach(function(g){var v=g.parent,b=g.node;if(!(r(b)||!g.parent||c.has(g.parent.key))){if(r(g.parent.node)){c.add(v.key);return}var _=!0,T=!1;(v.children||[]).filter(function(k){return!r(k.node)}).forEach(function(k){var P=k.key,M=i.has(P);_&&!M&&(_=!1),!T&&(M||a.has(P))&&(T=!0)}),_&&i.add(v.key),T&&a.add(v.key),c.add(v.key)}})}return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(w8(a,i))}}function Poe(e,t,n,r,i){for(var a=new Set(e),s=new Set(t),o=0;o<=r;o+=1){var c=n.get(o)||new Set;c.forEach(function(v){var b=v.key,_=v.node,T=v.children,k=T===void 0?[]:T;!a.has(b)&&!s.has(b)&&!i(_)&&k.filter(function(P){return!i(P.node)}).forEach(function(P){a.delete(P.key)})})}s=new Set;for(var f=new Set,p=r;p>=0;p-=1){var g=n.get(p)||new Set;g.forEach(function(v){var b=v.parent,_=v.node;if(!(i(_)||!v.parent||f.has(v.parent.key))){if(i(v.parent.node)){f.add(b.key);return}var T=!0,k=!1;(b.children||[]).filter(function(P){return!i(P.node)}).forEach(function(P){var M=P.key,O=a.has(M);T&&!O&&(T=!1),!k&&(O||s.has(M))&&(k=!0)}),T||a.delete(b.key),k&&s.add(b.key),f.add(b.key)}})}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(w8(s,a))}}function Gl(e,t,n,r){var i=[],a;r?a=r:a=Soe;var s=new Set(e.filter(function(p){var g=!!n[p];return g||i.push(p),g})),o=new Map,c=0;Object.keys(n).forEach(function(p){var g=n[p],v=g.level,b=o.get(v);b||(b=new Set,o.set(v,b)),b.add(g),c=Math.max(c,v)}),Nr(!i.length,"Tree missing follow keys: ".concat(i.slice(0,100).map(function(p){return"'".concat(p,"'")}).join(", ")));var f;return t===!0?f=Eoe(s,o,c,a):f=Poe(s,t.halfCheckedKeys,o,c,a),f}var $T=E.exports.createContext(null),Toe=function(t){for(var n=t.prefixCls,r=t.level,i=t.isStart,a=t.isEnd,s="".concat(n,"-indent-unit"),o=[],c=0;c<r;c+=1){var f;o.push(A("span",{className:He(s,(f={},ae(f,"".concat(s,"-start"),i[c]),ae(f,"".concat(s,"-end"),a[c]),f))},c))}return A("span",{"aria-hidden":"true",className:"".concat(n,"-indent"),children:o})};const koe=E.exports.memo(Toe);var Ioe=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],HD="open",KD="close",Moe="---",Roe=function(e){ai(n,e);var t=si(n);function n(){var r;Ur(this,n);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),r.state={dragNodeHighlight:!1},r.selectHandle=void 0,r.onSelectorClick=function(o){var c=r.props.context.onNodeClick;c(o,Di(r.props)),r.isSelectable()?r.onSelect(o):r.onCheck(o)},r.onSelectorDoubleClick=function(o){var c=r.props.context.onNodeDoubleClick;c(o,Di(r.props))},r.onSelect=function(o){if(!r.isDisabled()){var c=r.props.context.onNodeSelect;o.preventDefault(),c(o,Di(r.props))}},r.onCheck=function(o){if(!r.isDisabled()){var c=r.props,f=c.disableCheckbox,p=c.checked,g=r.props.context.onNodeCheck;if(!(!r.isCheckable()||f)){o.preventDefault();var v=!p;g(o,Di(r.props),v)}}},r.onMouseEnter=function(o){var c=r.props.context.onNodeMouseEnter;c(o,Di(r.props))},r.onMouseLeave=function(o){var c=r.props.context.onNodeMouseLeave;c(o,Di(r.props))},r.onContextMenu=function(o){var c=r.props.context.onNodeContextMenu;c(o,Di(r.props))},r.onDragStart=function(o){var c=r.props.context.onNodeDragStart;o.stopPropagation(),r.setState({dragNodeHighlight:!0}),c(o,zn(r));try{o.dataTransfer.setData("text/plain","")}catch{}},r.onDragEnter=function(o){var c=r.props.context.onNodeDragEnter;o.preventDefault(),o.stopPropagation(),c(o,zn(r))},r.onDragOver=function(o){var c=r.props.context.onNodeDragOver;o.preventDefault(),o.stopPropagation(),c(o,zn(r))},r.onDragLeave=function(o){var c=r.props.context.onNodeDragLeave;o.stopPropagation(),c(o,zn(r))},r.onDragEnd=function(o){var c=r.props.context.onNodeDragEnd;o.stopPropagation(),r.setState({dragNodeHighlight:!1}),c(o,zn(r))},r.onDrop=function(o){var c=r.props.context.onNodeDrop;o.preventDefault(),o.stopPropagation(),r.setState({dragNodeHighlight:!1}),c(o,zn(r))},r.onExpand=function(o){var c=r.props,f=c.loading,p=c.context.onNodeExpand;f||p(o,Di(r.props))},r.setSelectHandle=function(o){r.selectHandle=o},r.getNodeState=function(){var o=r.props.expanded;return r.isLeaf()?null:o?HD:KD},r.hasChildren=function(){var o=r.props.eventKey,c=r.props.context.keyEntities,f=c[o]||{},p=f.children;return!!(p||[]).length},r.isLeaf=function(){var o=r.props,c=o.isLeaf,f=o.loaded,p=r.props.context.loadData,g=r.hasChildren();return c===!1?!1:c||!p&&!g||p&&f&&!g},r.isDisabled=function(){var o=r.props.disabled,c=r.props.context.disabled;return!!(c||o)},r.isCheckable=function(){var o=r.props.checkable,c=r.props.context.checkable;return!c||o===!1?!1:c},r.syncLoadData=function(o){var c=o.expanded,f=o.loading,p=o.loaded,g=r.props.context,v=g.loadData,b=g.onNodeLoad;f||v&&c&&!r.isLeaf()&&!r.hasChildren()&&!p&&b(Di(r.props))},r.isDraggable=function(){var o=r.props,c=o.data,f=o.context.draggable;return!!(f&&(!f.nodeDraggable||f.nodeDraggable(c)))},r.renderDragHandler=function(){var o=r.props.context,c=o.draggable,f=o.prefixCls;return c!=null&&c.icon?A("span",{className:"".concat(f,"-draggable-icon"),children:c.icon}):null},r.renderSwitcherIconDom=function(o){var c=r.props.switcherIcon,f=r.props.context.switcherIcon,p=c||f;return typeof p=="function"?p(fe(fe({},r.props),{},{isLeaf:o})):p},r.renderSwitcher=function(){var o=r.props.expanded,c=r.props.context.prefixCls;if(r.isLeaf()){var f=r.renderSwitcherIconDom(!0);return f!==!1?A("span",{className:He("".concat(c,"-switcher"),"".concat(c,"-switcher-noop")),children:f}):null}var p=He("".concat(c,"-switcher"),"".concat(c,"-switcher_").concat(o?HD:KD)),g=r.renderSwitcherIconDom(!1);return g!==!1?A("span",{onClick:r.onExpand,className:p,children:g}):null},r.renderCheckbox=function(){var o=r.props,c=o.checked,f=o.halfChecked,p=o.disableCheckbox,g=r.props.context.prefixCls,v=r.isDisabled(),b=r.isCheckable();if(!b)return null;var _=typeof b!="boolean"?b:null;return A("span",{className:He("".concat(g,"-checkbox"),c&&"".concat(g,"-checkbox-checked"),!c&&f&&"".concat(g,"-checkbox-indeterminate"),(v||p)&&"".concat(g,"-checkbox-disabled")),onClick:r.onCheck,children:_})},r.renderIcon=function(){var o=r.props.loading,c=r.props.context.prefixCls;return A("span",{className:He("".concat(c,"-iconEle"),"".concat(c,"-icon__").concat(r.getNodeState()||"docu"),o&&"".concat(c,"-icon_loading"))})},r.renderSelector=function(){var o=r.state.dragNodeHighlight,c=r.props,f=c.title,p=c.selected,g=c.icon,v=c.loading,b=c.data,_=r.props.context,T=_.prefixCls,k=_.showIcon,P=_.icon,M=_.loadData,O=_.titleRender,N=r.isDisabled(),L="".concat(T,"-node-content-wrapper"),$;if(k){var j=g||P;$=j?A("span",{className:He("".concat(T,"-iconEle"),"".concat(T,"-icon__customize")),children:typeof j=="function"?j(r.props):j}):r.renderIcon()}else M&&v&&($=r.renderIcon());var U;typeof f=="function"?U=f(b):O?U=O(b):U=f;var G=A("span",{className:"".concat(T,"-title"),children:U});return it("span",{ref:r.setSelectHandle,title:typeof f=="string"?f:"",className:He("".concat(L),"".concat(L,"-").concat(r.getNodeState()||"normal"),!N&&(p||o)&&"".concat(T,"-node-selected")),onMouseEnter:r.onMouseEnter,onMouseLeave:r.onMouseLeave,onContextMenu:r.onContextMenu,onClick:r.onSelectorClick,onDoubleClick:r.onSelectorDoubleClick,children:[$,G,r.renderDropIndicator()]})},r.renderDropIndicator=function(){var o=r.props,c=o.disabled,f=o.eventKey,p=r.props.context,g=p.draggable,v=p.dropLevelOffset,b=p.dropPosition,_=p.prefixCls,T=p.indent,k=p.dropIndicatorRender,P=p.dragOverNodeKey,M=p.direction,O=!!g,N=!c&&O&&P===f;return N?k({dropPosition:b,dropLevelOffset:v,indent:T,prefixCls:_,direction:M}):null},r}return jr(n,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var i=this.props.selectable,a=this.props.context.selectable;return typeof i=="boolean"?i:a}},{key:"render",value:function(){var i,a=this.props,s=a.eventKey,o=a.className,c=a.style,f=a.dragOver,p=a.dragOverGapTop,g=a.dragOverGapBottom,v=a.isLeaf,b=a.isStart,_=a.isEnd,T=a.expanded,k=a.selected,P=a.checked,M=a.halfChecked,O=a.loading,N=a.domRef,L=a.active;a.data;var $=a.onMouseMove,j=a.selectable,U=In(a,Ioe),G=this.props.context,Z=G.prefixCls,Q=G.filterTreeNode,J=G.keyEntities,re=G.dropContainerKey,ne=G.dropTargetKey,ge=G.draggingNodeKey,ie=this.isDisabled(),ue=Ql(U,{aria:!0,data:!0}),oe=J[s]||{},me=oe.level,Te=_[_.length-1],we=this.isDraggable(),be=!ie&&we,Re=ge===s,Ee=j!==void 0?{"aria-selected":!!j}:void 0;return it("div",{ref:N,className:He(o,"".concat(Z,"-treenode"),(i={},ae(i,"".concat(Z,"-treenode-disabled"),ie),ae(i,"".concat(Z,"-treenode-switcher-").concat(T?"open":"close"),!v),ae(i,"".concat(Z,"-treenode-checkbox-checked"),P),ae(i,"".concat(Z,"-treenode-checkbox-indeterminate"),M),ae(i,"".concat(Z,"-treenode-selected"),k),ae(i,"".concat(Z,"-treenode-loading"),O),ae(i,"".concat(Z,"-treenode-active"),L),ae(i,"".concat(Z,"-treenode-leaf-last"),Te),ae(i,"".concat(Z,"-treenode-draggable"),we),ae(i,"dragging",Re),ae(i,"drop-target",ne===s),ae(i,"drop-container",re===s),ae(i,"drag-over",!ie&&f),ae(i,"drag-over-gap-top",!ie&&p),ae(i,"drag-over-gap-bottom",!ie&&g),ae(i,"filter-node",Q&&Q(Di(this.props))),i)),style:c,draggable:be,"aria-grabbed":Re,onDragStart:be?this.onDragStart:void 0,onDragEnter:we?this.onDragEnter:void 0,onDragOver:we?this.onDragOver:void 0,onDragLeave:we?this.onDragLeave:void 0,onDrop:we?this.onDrop:void 0,onDragEnd:we?this.onDragEnd:void 0,onMouseMove:$,...Ee,...ue,children:[A(koe,{prefixCls:Z,level:me,isStart:b,isEnd:_}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector()]})}}]),n}(E.exports.Component),Rd=function(t){return A($T.Consumer,{children:function(n){return A(Roe,{...t,context:n})}})};Rd.displayName="TreeNode";Rd.defaultProps={title:Moe};Rd.isTreeNode=1;function Xs(e,t){if(!e)return[];var n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function Rl(e,t){var n=(e||[]).slice();return n.indexOf(t)===-1&&n.push(t),n}function BT(e){return e.split("-")}function C8(e,t){return"".concat(e,"-").concat(t)}function Doe(e){return e&&e.type&&e.type.isTreeNode}function Ooe(e,t){var n=[],r=t[e];function i(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];a.forEach(function(s){var o=s.key,c=s.children;n.push(o),i(c)})}return i(r.children),n}function Aoe(e){if(e.parent){var t=BT(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function Noe(e){var t=BT(e.pos);return Number(t[t.length-1])===0}function WD(e,t,n,r,i,a,s,o,c,f){var p,g=e.clientX,v=e.clientY,b=e.target.getBoundingClientRect(),_=b.top,T=b.height,k=(f==="rtl"?-1:1)*(((i==null?void 0:i.x)||0)-g),P=(k-12)/r,M=o[n.props.eventKey];if(v<_+T/2){var O=s.findIndex(function(ge){return ge.key===M.key}),N=O<=0?0:O-1,L=s[N].key;M=o[L]}var $=M.key,j=M,U=M.key,G=0,Z=0;if(!c.includes($))for(var Q=0;Q<P&&Aoe(M);Q+=1)M=M.parent,Z+=1;var J=t.props.data,re=M.node,ne=!0;return Noe(M)&&M.level===0&&v<_+T/2&&a({dragNode:J,dropNode:re,dropPosition:-1})&&M.key===n.props.eventKey?G=-1:(j.children||[]).length&&c.includes(U)?a({dragNode:J,dropNode:re,dropPosition:0})?G=0:ne=!1:Z===0?P>-1.5?a({dragNode:J,dropNode:re,dropPosition:1})?G=1:ne=!1:a({dragNode:J,dropNode:re,dropPosition:0})?G=0:a({dragNode:J,dropNode:re,dropPosition:1})?G=1:ne=!1:a({dragNode:J,dropNode:re,dropPosition:1})?G=1:ne=!1,{dropPosition:G,dropLevelOffset:Z,dropTargetKey:M.key,dropTargetPos:M.pos,dragOverNodeKey:U,dropContainerKey:G===0?null:((p=M.parent)===null||p===void 0?void 0:p.key)||null,dropAllowed:ne}}function GD(e,t){if(!!e){var n=t.multiple;return n?e.slice():e.length?[e[0]]:e}}function ZC(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(on(e)==="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return Nr(!1,"`checkedKeys` is not an array or an object"),null;return t}function j4(e,t){var n=new Set;function r(i){if(!n.has(i)){var a=t[i];if(!!a){n.add(i);var s=a.parent,o=a.node;o.disabled||s&&r(s.key)}}}return(e||[]).forEach(function(i){r(i)}),Rt(n)}var Loe=["children"];function lv(e,t){return e!=null?e:t}function Eb(e){var t=e||{},n=t.title,r=t._title,i=t.key,a=t.children,s=n||"title";return{title:s,_title:r||[s],key:i||"key",children:a||"children"}}function S8(e){function t(n){var r=To(n);return r.map(function(i){if(!Doe(i))return Nr(!i,"Tree/TreeNode can only accept TreeNode as children."),null;var a=i.key,s=i.props,o=s.children,c=In(s,Loe),f=fe({key:a},c),p=t(o);return p.length&&(f.children=p),f}).filter(function(i){return i})}return t(e)}function XC(e,t,n){var r=Eb(n),i=r._title,a=r.key,s=r.children,o=new Set(t===!0?[]:t),c=[];function f(p){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return p.map(function(v,b){for(var _=C8(g?g.pos:"0",b),T=lv(v[a],_),k,P=0;P<i.length;P+=1){var M=i[P];if(v[M]!==void 0){k=v[M];break}}var O=fe(fe({},Wi(v,[].concat(Rt(i),[a,s]))),{},{title:k,key:T,parent:g,pos:_,children:null,data:v,isStart:[].concat(Rt(g?g.isStart:[]),[b===0]),isEnd:[].concat(Rt(g?g.isEnd:[]),[b===p.length-1])});return c.push(O),t===!0||o.has(T)?O.children=f(v[s]||[],O):O.children=[],O})}return f(e),c}function Foe(e,t,n){var r={};on(n)==="object"?r=n:r={externalGetKey:n},r=r||{};var i=r,a=i.childrenPropName,s=i.externalGetKey,o=i.fieldNames,c=Eb(o),f=c.key,p=c.children,g=a||p,v;s?typeof s=="string"?v=function(T){return T[s]}:typeof s=="function"&&(v=function(T){return s(T)}):v=function(T,k){return lv(T[f],k)};function b(_,T,k,P){var M=_?_[g]:e,O=_?C8(k.pos,T):"0",N=_?[].concat(Rt(P),[_]):[];if(_){var L=v(_,O),$={node:_,index:T,pos:O,key:L,parentPos:k.node?k.pos:null,level:k.level+1,nodes:N};t($)}M&&M.forEach(function(j,U){b(j,U,{node:_,pos:O,level:k?k.level+1:-1},N)})}b(null)}function i1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.initWrapper,r=t.processEntity,i=t.onProcessFinished,a=t.externalGetKey,s=t.childrenPropName,o=t.fieldNames,c=arguments.length>2?arguments[2]:void 0,f=a||c,p={},g={},v={posEntities:p,keyEntities:g};return n&&(v=n(v)||v),Foe(e,function(b){var _=b.node,T=b.index,k=b.pos,P=b.key,M=b.parentPos,O=b.level,N=b.nodes,L={node:_,nodes:N,index:T,key:P,pos:k,level:O},$=lv(P,k);p[k]=L,g[$]=L,L.parent=p[M],L.parent&&(L.parent.children=L.parent.children||[],L.parent.children.push(L)),r&&r(L,v)},{externalGetKey:f,childrenPropName:s,fieldNames:o}),i&&i(v),v}function qm(e,t){var n=t.expandedKeys,r=t.selectedKeys,i=t.loadedKeys,a=t.loadingKeys,s=t.checkedKeys,o=t.halfCheckedKeys,c=t.dragOverNodeKey,f=t.dropPosition,p=t.keyEntities,g=p[e],v={eventKey:e,expanded:n.indexOf(e)!==-1,selected:r.indexOf(e)!==-1,loaded:i.indexOf(e)!==-1,loading:a.indexOf(e)!==-1,checked:s.indexOf(e)!==-1,halfChecked:o.indexOf(e)!==-1,pos:String(g?g.pos:""),dragOver:c===e&&f===0,dragOverGapTop:c===e&&f===-1,dragOverGapBottom:c===e&&f===1};return v}function Di(e){var t=e.data,n=e.expanded,r=e.selected,i=e.checked,a=e.loaded,s=e.loading,o=e.halfChecked,c=e.dragOver,f=e.dragOverGapTop,p=e.dragOverGapBottom,g=e.pos,v=e.active,b=e.eventKey,_=fe(fe({},t),{},{expanded:n,selected:r,checked:i,loaded:a,loading:s,halfChecked:o,dragOver:c,dragOverGapTop:f,dragOverGapBottom:p,pos:g,active:v,key:b});return"props"in _||Object.defineProperty(_,"props",{get:function(){return Nr(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),_}var zoe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},E8=E.exports.createContext(null),$oe=function(t,n){var r=t.defaultValue,i=t.children,a=t.options,s=a===void 0?[]:a,o=t.prefixCls,c=t.className,f=t.style,p=t.onChange,g=zoe(t,["defaultValue","children","options","prefixCls","className","style","onChange"]),v=E.exports.useContext(Fn),b=v.getPrefixCls,_=v.direction,T=E.exports.useState(g.value||r||[]),k=$e(T,2),P=k[0],M=k[1],O=E.exports.useState([]),N=$e(O,2),L=N[0],$=N[1];E.exports.useEffect(function(){"value"in g&&M(g.value||[])},[g.value]);var j=function(){return s.map(function(ue){return typeof ue=="string"||typeof ue=="number"?{label:ue,value:ue}:ue})},U=function(ue){$(function(oe){return oe.filter(function(me){return me!==ue})})},G=function(ue){$(function(oe){return[].concat(Rt(oe),[ue])})},Z=function(ue){var oe=P.indexOf(ue.value),me=Rt(P);oe===-1?me.push(ue.value):me.splice(oe,1),"value"in g||M(me);var Te=j();p==null||p(me.filter(function(we){return L.includes(we)}).sort(function(we,be){var Re=Te.findIndex(function(Me){return Me.value===we}),Ee=Te.findIndex(function(Me){return Me.value===be});return Re-Ee}))},Q=b("checkbox",o),J="".concat(Q,"-group"),re=Wi(g,["value","disabled"]);s&&s.length>0&&(i=j().map(function(ie){return A(Zm,{prefixCls:Q,disabled:"disabled"in ie?ie.disabled:g.disabled,value:ie.value,checked:P.includes(ie.value),onChange:ie.onChange,className:"".concat(J,"-item"),style:ie.style,children:ie.label},ie.value.toString())}));var ne={toggleOption:Z,value:P,disabled:g.disabled,name:g.name,registerValue:G,cancelValue:U},ge=He(J,ae({},"".concat(J,"-rtl"),_==="rtl"),c);return A("div",{className:ge,style:f,...re,ref:n,children:A(E8.Provider,{value:ne,children:i})})},Boe=E.exports.forwardRef($oe);const Voe=E.exports.memo(Boe);var Uoe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},joe=function(t,n){var r,i,a=t.prefixCls,s=t.className,o=t.children,c=t.indeterminate,f=c===void 0?!1:c,p=t.style,g=t.onMouseEnter,v=t.onMouseLeave,b=t.skipGroup,_=b===void 0?!1:b,T=t.disabled,k=Uoe(t,["prefixCls","className","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),P=E.exports.useContext(Fn),M=P.getPrefixCls,O=P.direction,N=E.exports.useContext(E8),L=E.exports.useContext(As),$=L.isFormItemInput,j=E.exports.useContext(fc),U=(i=(N==null?void 0:N.disabled)||T)!==null&&i!==void 0?i:j,G=E.exports.useRef(k.value);E.exports.useEffect(function(){N==null||N.registerValue(k.value)},[]),E.exports.useEffect(function(){if(!_)return k.value!==G.current&&(N==null||N.cancelValue(G.current),N==null||N.registerValue(k.value),G.current=k.value),function(){return N==null?void 0:N.cancelValue(k.value)}},[k.value]);var Z=M("checkbox",a),Q=Be({},k);N&&!_&&(Q.onChange=function(){k.onChange&&k.onChange.apply(k,arguments),N.toggleOption&&N.toggleOption({label:o,value:k.value})},Q.name=N.name,Q.checked=N.value.includes(k.value));var J=He((r={},ae(r,"".concat(Z,"-wrapper"),!0),ae(r,"".concat(Z,"-rtl"),O==="rtl"),ae(r,"".concat(Z,"-wrapper-checked"),Q.checked),ae(r,"".concat(Z,"-wrapper-disabled"),U),ae(r,"".concat(Z,"-wrapper-in-form-item"),$),r),s),re=He(ae({},"".concat(Z,"-indeterminate"),f)),ne=f?"mixed":void 0;return it("label",{className:J,style:p,onMouseEnter:g,onMouseLeave:v,children:[A(zT,{"aria-checked":ne,...Q,prefixCls:Z,className:re,disabled:U,ref:n}),o!==void 0&&A("span",{children:o})]})},Hoe=E.exports.forwardRef(joe);const Zm=Hoe;var VT=Zm;VT.Group=Voe;VT.__ANT_CHECKBOX=!0;const _h=VT;var Koe=E.exports.createContext({});const P8=Koe;var Woe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Goe(e){return typeof e=="number"?"".concat(e," ").concat(e," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?"0 0 ".concat(e):e}var qoe=["xs","sm","md","lg","xl","xxl"],Zoe=E.exports.forwardRef(function(e,t){var n,r=E.exports.useContext(Fn),i=r.getPrefixCls,a=r.direction,s=E.exports.useContext(P8),o=s.gutter,c=s.wrap,f=s.supportFlexGap,p=e.prefixCls,g=e.span,v=e.order,b=e.offset,_=e.push,T=e.pull,k=e.className,P=e.children,M=e.flex,O=e.style,N=Woe(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),L=i("col",p),$={};qoe.forEach(function(Q){var J,re={},ne=e[Q];typeof ne=="number"?re.span=ne:on(ne)==="object"&&(re=ne||{}),delete N[Q],$=Be(Be({},$),(J={},ae(J,"".concat(L,"-").concat(Q,"-").concat(re.span),re.span!==void 0),ae(J,"".concat(L,"-").concat(Q,"-order-").concat(re.order),re.order||re.order===0),ae(J,"".concat(L,"-").concat(Q,"-offset-").concat(re.offset),re.offset||re.offset===0),ae(J,"".concat(L,"-").concat(Q,"-push-").concat(re.push),re.push||re.push===0),ae(J,"".concat(L,"-").concat(Q,"-pull-").concat(re.pull),re.pull||re.pull===0),ae(J,"".concat(L,"-rtl"),a==="rtl"),J))});var j=He(L,(n={},ae(n,"".concat(L,"-").concat(g),g!==void 0),ae(n,"".concat(L,"-order-").concat(v),v),ae(n,"".concat(L,"-offset-").concat(b),b),ae(n,"".concat(L,"-push-").concat(_),_),ae(n,"".concat(L,"-pull-").concat(T),T),n),k,$),U={};if(o&&o[0]>0){var G=o[0]/2;U.paddingLeft=G,U.paddingRight=G}if(o&&o[1]>0&&!f){var Z=o[1]/2;U.paddingTop=Z,U.paddingBottom=Z}return M&&(U.flex=Goe(M),c===!1&&!U.minWidth&&(U.minWidth=0)),A("div",{...N,style:Be(Be({},U),O),className:j,ref:t,children:P})});const Pb=Zoe;var Xoe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};la("top","middle","bottom","stretch");la("start","end","center","space-around","space-between","space-evenly");function qD(e,t){var n=E.exports.useState(typeof e=="string"?e:""),r=$e(n,2),i=r[0],a=r[1],s=function(){if(typeof e=="string"&&a(e),on(e)==="object")for(var c=0;c<yb.length;c++){var f=yb[c];if(!!t[f]){var p=e[f];if(p!==void 0){a(p);return}}}};return E.exports.useEffect(function(){s()},[JSON.stringify(e),t]),i}var Yoe=E.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.justify,a=e.align,s=e.className,o=e.style,c=e.children,f=e.gutter,p=f===void 0?0:f,g=e.wrap,v=Xoe(e,["prefixCls","justify","align","className","style","children","gutter","wrap"]),b=E.exports.useContext(Fn),_=b.getPrefixCls,T=b.direction,k=E.exports.useState({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),P=$e(k,2),M=P[0],O=P[1],N=E.exports.useState({xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1}),L=$e(N,2),$=L[0],j=L[1],U=qD(a,$),G=qD(i,$),Z=f8(),Q=E.exports.useRef(p);E.exports.useEffect(function(){var Ee=xb.subscribe(function(Me){j(Me);var Ae=Q.current||0;(!Array.isArray(Ae)&&on(Ae)==="object"||Array.isArray(Ae)&&(on(Ae[0])==="object"||on(Ae[1])==="object"))&&O(Me)});return function(){return xb.unsubscribe(Ee)}},[]);var J=function(){var Me=[void 0,void 0],Ae=Array.isArray(p)?p:[p,void 0];return Ae.forEach(function(Fe,We){if(on(Fe)==="object")for(var je=0;je<yb.length;je++){var pt=yb[je];if(M[pt]&&Fe[pt]!==void 0){Me[We]=Fe[pt];break}}else Me[We]=Fe}),Me},re=_("row",r),ne=J(),ge=He(re,(n={},ae(n,"".concat(re,"-no-wrap"),g===!1),ae(n,"".concat(re,"-").concat(G),G),ae(n,"".concat(re,"-").concat(U),U),ae(n,"".concat(re,"-rtl"),T==="rtl"),n),s),ie={},ue=ne[0]!=null&&ne[0]>0?ne[0]/-2:void 0,oe=ne[1]!=null&&ne[1]>0?ne[1]/-2:void 0;if(ue&&(ie.marginLeft=ue,ie.marginRight=ue),Z){var me=$e(ne,2);ie.rowGap=me[1]}else oe&&(ie.marginTop=oe,ie.marginBottom=oe);var Te=$e(ne,2),we=Te[0],be=Te[1],Re=E.exports.useMemo(function(){return{gutter:[we,be],wrap:g,supportFlexGap:Z}},[we,be,g,Z]);return A(P8.Provider,{value:Re,children:A("div",{...v,className:ge,style:Be(Be({},ie),o),ref:t,children:c})})});const ad=Yoe;var T8=E.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.forceRender,a=e.className,s=e.style,o=e.children,c=e.isActive,f=e.role,p=E.exports.useState(c||i),g=$e(p,2),v=g[0],b=g[1];return E.exports.useEffect(function(){(i||c)&&b(!0)},[i,c]),v?A("div",{ref:t,className:He("".concat(r,"-content"),(n={},ae(n,"".concat(r,"-content-active"),c),ae(n,"".concat(r,"-content-inactive"),!c),n),a),style:s,role:f,children:A("div",{className:"".concat(r,"-content-box"),children:o})}):null});T8.displayName="PanelContent";var Qoe=["className","id","style","prefixCls","headerClass","children","isActive","destroyInactivePanel","accordion","forceRender","openMotion","extra","collapsible"],k8=function(e){ai(n,e);var t=si(n);function n(){var r;Ur(this,n);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),r.onItemClick=function(){var o=r.props,c=o.onItemClick,f=o.panelKey;typeof c=="function"&&c(f)},r.handleKeyPress=function(o){(o.key==="Enter"||o.keyCode===13||o.which===13)&&r.onItemClick()},r.renderIcon=function(){var o=r.props,c=o.showArrow,f=o.expandIcon,p=o.prefixCls,g=o.collapsible;if(!c)return null;var v=typeof f=="function"?f(r.props):A("i",{className:"arrow"});return v&&A("div",{className:"".concat(p,"-expand-icon"),onClick:g==="header"||g==="icon"?r.onItemClick:null,children:v})},r.renderTitle=function(){var o=r.props,c=o.header,f=o.prefixCls,p=o.collapsible;return A("span",{className:"".concat(f,"-header-text"),onClick:p==="header"?r.onItemClick:null,children:c})},r}return jr(n,[{key:"shouldComponentUpdate",value:function(i){return!Md(this.props,i)}},{key:"render",value:function(){var i,a,s=this.props,o=s.className,c=s.id,f=s.style,p=s.prefixCls,g=s.headerClass,v=s.children,b=s.isActive,_=s.destroyInactivePanel,T=s.accordion,k=s.forceRender,P=s.openMotion,M=s.extra,O=s.collapsible,N=In(s,Qoe),L=O==="disabled",$=O==="header",j=O==="icon",U=He((i={},ae(i,"".concat(p,"-item"),!0),ae(i,"".concat(p,"-item-active"),b),ae(i,"".concat(p,"-item-disabled"),L),i),o),G=He("".concat(p,"-header"),(a={},ae(a,g,g),ae(a,"".concat(p,"-header-collapsible-only"),$),ae(a,"".concat(p,"-icon-collapsible-only"),j),a)),Z={className:G,"aria-expanded":b,"aria-disabled":L,onKeyPress:this.handleKeyPress};!$&&!j&&(Z.onClick=this.onItemClick,Z.role=T?"tab":"button",Z.tabIndex=L?-1:0);var Q=M!=null&&typeof M!="boolean";return delete N.header,delete N.panelKey,delete N.onItemClick,delete N.showArrow,delete N.expandIcon,it("div",{...N,className:U,style:f,id:c,children:[it("div",{...Z,children:[this.renderIcon(),this.renderTitle(),Q&&A("div",{className:"".concat(p,"-extra"),children:M})]}),A(sa,{visible:b,leavedClassName:"".concat(p,"-content-hidden"),...P,forceRender:k,removeOnLeave:_,children:function(J,re){var ne=J.className,ge=J.style;return A(T8,{ref:re,prefixCls:p,className:ne,style:ge,isActive:b,forceRender:k,role:T?"tabpanel":null,children:v})}})]})}}]),n}(E.exports.Component);k8.defaultProps={showArrow:!0,isActive:!1,onItemClick:function(){},headerClass:"",forceRender:!1};function ZD(e){var t=e;if(!Array.isArray(t)){var n=on(t);t=n==="number"||n==="string"?[t]:[]}return t.map(function(r){return String(r)})}var uv=function(e){ai(n,e);var t=si(n);function n(r){var i;Ur(this,n),i=t.call(this,r),i.onClickItem=function(c){var f=i.state.activeKey;if(i.props.accordion)f=f[0]===c?[]:[c];else{f=Rt(f);var p=f.indexOf(c),g=p>-1;g?f.splice(p,1):f.push(c)}i.setActiveKey(f)},i.getNewChild=function(c,f){if(!c)return null;var p=i.state.activeKey,g=i.props,v=g.prefixCls,b=g.openMotion,_=g.accordion,T=g.destroyInactivePanel,k=g.expandIcon,P=g.collapsible,M=c.key||String(f),O=c.props,N=O.header,L=O.headerClass,$=O.destroyInactivePanel,j=O.collapsible,U=!1;_?U=p[0]===M:U=p.indexOf(M)>-1;var G=j!=null?j:P,Z={key:M,panelKey:M,header:N,headerClass:L,isActive:U,prefixCls:v,destroyInactivePanel:$!=null?$:T,openMotion:b,accordion:_,children:c.props.children,onItemClick:G==="disabled"?null:i.onClickItem,expandIcon:k,collapsible:G};return typeof c.type=="string"?c:(Object.keys(Z).forEach(function(Q){typeof Z[Q]>"u"&&delete Z[Q]}),E.exports.cloneElement(c,Z))},i.getItems=function(){var c=i.props.children;return To(c).map(i.getNewChild)},i.setActiveKey=function(c){"activeKey"in i.props||i.setState({activeKey:c}),i.props.onChange(i.props.accordion?c[0]:c)};var a=r.activeKey,s=r.defaultActiveKey,o=s;return"activeKey"in r&&(o=a),i.state={activeKey:ZD(o)},i}return jr(n,[{key:"shouldComponentUpdate",value:function(i,a){return!Md(this.props,i)||!Md(this.state,a)}},{key:"render",value:function(){var i,a=this.props,s=a.prefixCls,o=a.className,c=a.style,f=a.accordion,p=He((i={},ae(i,s,!0),ae(i,o,!!o),i));return A("div",{className:p,style:c,role:f?"tablist":null,children:this.getItems()})}}],[{key:"getDerivedStateFromProps",value:function(i){var a={};return"activeKey"in i&&(a.activeKey=ZD(i.activeKey)),a}}]),n}(E.exports.Component);uv.defaultProps={prefixCls:"rc-collapse",onChange:function(){},accordion:!1,destroyInactivePanel:!1};uv.Panel=k8;uv.Panel;var Joe=function(t){var n=E.exports.useContext(Fn),r=n.getPrefixCls,i=t.prefixCls,a=t.className,s=a===void 0?"":a,o=t.showArrow,c=o===void 0?!0:o,f=r("collapse",i),p=He(ae({},"".concat(f,"-no-arrow"),!c),s);return A(uv.Panel,{...t,prefixCls:f,className:p})};const eae=Joe;var I8=function(t){var n,r=E.exports.useContext(Fn),i=r.getPrefixCls,a=r.direction,s=t.prefixCls,o=t.className,c=o===void 0?"":o,f=t.bordered,p=f===void 0?!0:f,g=t.ghost,v=t.expandIconPosition,b=v===void 0?"start":v,_=i("collapse",s),T=E.exports.useMemo(function(){return b==="left"?"start":b==="right"?"end":b},[b]),k=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},$=t.expandIcon,j=$?$(L):A(e1,{rotate:L.isActive?90:void 0});return Ei(j,function(){return{className:He(j.props.className,"".concat(_,"-arrow"))}})},P=He("".concat(_,"-icon-position-").concat(T),(n={},ae(n,"".concat(_,"-borderless"),!p),ae(n,"".concat(_,"-rtl"),a==="rtl"),ae(n,"".concat(_,"-ghost"),!!g),n),c),M=Be(Be({},G_),{motionAppear:!1,leavedClassName:"".concat(_,"-content-hidden")}),O=function(){var L=t.children;return To(L).map(function($,j){var U;if(!((U=$.props)===null||U===void 0)&&U.disabled){var G=$.key||String(j),Z=$.props,Q=Z.disabled,J=Z.collapsible,re=Be(Be({},Wi($.props,["disabled"])),{key:G,collapsible:J!=null?J:Q?"disabled":void 0});return Ei($,re)}return $})};return A(uv,{openMotion:M,...t,expandIcon:k,prefixCls:_,className:P,children:O()})};I8.Panel=eae;const XD=I8;var tae=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},nae=function(t){var n,r=E.exports.useContext(Fn),i=r.getPrefixCls,a=r.direction,s=t.prefixCls,o=t.type,c=o===void 0?"horizontal":o,f=t.orientation,p=f===void 0?"center":f,g=t.orientationMargin,v=t.className,b=t.children,_=t.dashed,T=t.plain,k=tae(t,["prefixCls","type","orientation","orientationMargin","className","children","dashed","plain"]),P=i("divider",s),M=p.length>0?"-".concat(p):p,O=!!b,N=p==="left"&&g!=null,L=p==="right"&&g!=null,$=He(P,"".concat(P,"-").concat(c),(n={},ae(n,"".concat(P,"-with-text"),O),ae(n,"".concat(P,"-with-text").concat(M),O),ae(n,"".concat(P,"-dashed"),!!_),ae(n,"".concat(P,"-plain"),!!T),ae(n,"".concat(P,"-rtl"),a==="rtl"),ae(n,"".concat(P,"-no-default-orientation-margin-left"),N),ae(n,"".concat(P,"-no-default-orientation-margin-right"),L),n),v),j=Be(Be({},N&&{marginLeft:g}),L&&{marginRight:g});return A("div",{className:$,...k,role:"separator",children:b&&c!=="vertical"&&A("span",{className:"".concat(P,"-inner-text"),style:j,children:b})})};const rae=nae;var M8=E.exports.createContext(null),YD=[];function iae(e,t){var n=E.exports.useState(function(){if(!ko())return null;var _=document.createElement("div");return _}),r=$e(n,1),i=r[0],a=E.exports.useRef(!1),s=E.exports.useContext(M8),o=E.exports.useState(YD),c=$e(o,2),f=c[0],p=c[1],g=s||(a.current?void 0:function(_){p(function(T){var k=[_].concat(Rt(T));return k})});function v(){i.parentElement||document.body.appendChild(i),a.current=!0}function b(){var _;(_=i.parentElement)===null||_===void 0||_.removeChild(i),a.current=!1}return Ci(function(){return e?s?s(v):v():b(),b},[e]),Ci(function(){f.length&&(f.forEach(function(_){return _()}),p(YD))},[f]),[i,g]}var YC;function Tb(e){if(typeof document>"u")return 0;if(e||YC===void 0){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var n=document.createElement("div"),r=n.style;r.position="absolute",r.top="0",r.left="0",r.pointerEvents="none",r.visibility="hidden",r.width="200px",r.height="150px",r.overflow="hidden",n.appendChild(t),document.body.appendChild(n);var i=t.offsetWidth;n.style.overflow="scroll";var a=t.offsetWidth;i===a&&(a=n.clientWidth),document.body.removeChild(n),YC=i-a}return YC}function QD(e){var t=e.match(/^(.*)px$/),n=Number(t==null?void 0:t[1]);return Number.isNaN(n)?Tb():n}function JD(e){if(typeof document>"u"||!e||!(e instanceof Element))return{width:0,height:0};var t=getComputedStyle(e,"::-webkit-scrollbar"),n=t.width,r=t.height;return{width:QD(n),height:QD(r)}}function oae(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var aae="rc-util-locker-".concat(Date.now()),eO=0;function sae(e){var t=!!e,n=E.exports.useState(function(){return eO+=1,"".concat(aae,"_").concat(eO)}),r=$e(n,1),i=r[0];Ci(function(){if(t){var a=Tb(),s=oae();ev(`
html body {
overflow-y: hidden;
`.concat(s?"width: calc(100% - ".concat(a,"px);"):"",`
}`),i)}else $R(i);return function(){$R(i)}},[t,i])}var tO=!1;function lae(e){return typeof e=="boolean"&&(tO=e),tO}var nO=function(t){return t===!1?!1:!ko()||!t?null:typeof t=="string"?document.querySelector(t):typeof t=="function"?t():t},R8=E.exports.forwardRef(function(e,t){var n=e.open,r=e.autoLock,i=e.getContainer;e.debug;var a=e.autoDestroy,s=a===void 0?!0:a,o=e.children,c=E.exports.useState(n),f=$e(c,2),p=f[0],g=f[1],v=p||n;E.exports.useEffect(function(){(s||n)&&g(n)},[n,s]);var b=E.exports.useState(function(){return nO(i)}),_=$e(b,2),T=_[0],k=_[1];E.exports.useEffect(function(){var Q=nO(i);k(Q!=null?Q:null)});var P=iae(v&&!T),M=$e(P,2),O=M[0],N=M[1],L=T!=null?T:O;sae(r&&n&&ko()&&(L===O||L===document.body));var $=null;if(o&&Lh(o)&&t){var j=o;$=j.ref}var U=u6($,t);if(!v||!ko()||T===void 0)return null;var G=L===!1||lae(),Z=o;return t&&(Z=E.exports.cloneElement(o,{ref:U})),A(M8.Provider,{value:N,children:G?Z:cl.exports.createPortal(Z,L)})}),uae={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 cae=uae;var D8=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:cae})})};D8.displayName="EyeOutlined";const UT=E.exports.forwardRef(D8);function O8(){var e=document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight;return{width:e,height:t}}function H4(e){var t=e.getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}function dae(){var e=fe({},Ix);return e.useId}var rO=0;function fae(e){var t=E.exports.useState("ssr-id"),n=$e(t,2),r=n[0],i=n[1],a=dae(),s=a==null?void 0:a();return E.exports.useEffect(function(){if(!a){var o=rO;rO+=1,i("rc_unique_".concat(o))}},[]),e||s||r}function hae(e){var t=e.prefixCls,n=e.style,r=e.visible,i=e.maskProps,a=e.motionName;return A(sa,{visible:r,motionName:a,leavedClassName:"".concat(t,"-mask-hidden"),children:function(s,o){var c=s.className,f=s.style;return A("div",{ref:o,style:fe(fe({},f),n),className:He("".concat(t,"-mask"),c),...i})}},"mask")}function iO(e,t,n){var r=t;return!r&&n&&(r="".concat(e,"-").concat(n)),r}function oO(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if(typeof n!="number"){var i=e.document;n=i.documentElement[r],typeof n!="number"&&(n=i.body[r])}return n}function pae(e){var t=e.getBoundingClientRect(),n={left:t.left,top:t.top},r=e.ownerDocument,i=r.defaultView||r.parentWindow;return n.left+=oO(i),n.top+=oO(i,!0),n}const mae=E.exports.memo(function(e){var t=e.children;return t},function(e,t){var n=t.shouldUpdate;return!n});var aO={width:0,height:0,overflow:"hidden",outline:"none"},gae=Un.forwardRef(function(e,t){var n=e.prefixCls,r=e.className,i=e.style,a=e.title,s=e.ariaId,o=e.footer,c=e.closable,f=e.closeIcon,p=e.onClose,g=e.children,v=e.bodyStyle,b=e.bodyProps,_=e.modalRender,T=e.onMouseDown,k=e.onMouseUp,P=e.holderRef,M=e.visible,O=e.forceRender,N=e.width,L=e.height,$=E.exports.useRef(),j=E.exports.useRef();Un.useImperativeHandle(t,function(){return{focus:function(){var ne;(ne=$.current)===null||ne===void 0||ne.focus()},changeActive:function(ne){var ge=document,ie=ge.activeElement;ne&&ie===j.current?$.current.focus():!ne&&ie===$.current&&j.current.focus()}}});var U={};N!==void 0&&(U.width=N),L!==void 0&&(U.height=L);var G;o&&(G=A("div",{className:"".concat(n,"-footer"),children:o}));var Z;a&&(Z=A("div",{className:"".concat(n,"-header"),children:A("div",{className:"".concat(n,"-title"),id:s,children:a})}));var Q;c&&(Q=A("button",{type:"button",onClick:p,"aria-label":"Close",className:"".concat(n,"-close"),children:f||A("span",{className:"".concat(n,"-close-x")})}));var J=it("div",{className:"".concat(n,"-content"),children:[Q,Z,A("div",{className:"".concat(n,"-body"),style:v,...b,children:g}),G]});return it("div",{role:"dialog","aria-labelledby":a?s:null,"aria-modal":"true",ref:P,style:fe(fe({},i),U),className:He(n,r),onMouseDown:T,onMouseUp:k,children:[A("div",{tabIndex:0,ref:$,style:aO,"aria-hidden":"true"}),A(mae,{shouldUpdate:M||O,children:_?_(J):J}),A("div",{tabIndex:0,ref:j,style:aO,"aria-hidden":"true"})]},"dialog-element")}),A8=E.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.title,i=e.style,a=e.className,s=e.visible,o=e.forceRender,c=e.destroyOnClose,f=e.motionName,p=e.ariaId,g=e.onVisibleChanged,v=e.mousePosition,b=E.exports.useRef(),_=E.exports.useState(),T=$e(_,2),k=T[0],P=T[1],M={};k&&(M.transformOrigin=k);function O(){var N=pae(b.current);P(v?"".concat(v.x-N.left,"px ").concat(v.y-N.top,"px"):"")}return A(sa,{visible:s,onVisibleChanged:g,onAppearPrepare:O,onEnterPrepare:O,forceRender:o,motionName:f,removeOnLeave:c,ref:b,children:function(N,L){var $=N.className,j=N.style;return A(gae,{...e,ref:t,title:r,ariaId:p,prefixCls:n,holderRef:L,style:fe(fe(fe({},j),i),M),className:He(a,$)})}})});A8.displayName="Content";function vae(e){var t=e.prefixCls,n=t===void 0?"rc-dialog":t,r=e.zIndex,i=e.visible,a=i===void 0?!1:i,s=e.keyboard,o=s===void 0?!0:s,c=e.focusTriggerAfterClose,f=c===void 0?!0:c,p=e.wrapStyle,g=e.wrapClassName,v=e.wrapProps,b=e.onClose,_=e.afterClose,T=e.transitionName,k=e.animation,P=e.closable,M=P===void 0?!0:P,O=e.mask,N=O===void 0?!0:O,L=e.maskTransitionName,$=e.maskAnimation,j=e.maskClosable,U=j===void 0?!0:j,G=e.maskStyle,Z=e.maskProps,Q=e.rootClassName,J=E.exports.useRef(),re=E.exports.useRef(),ne=E.exports.useRef(),ge=E.exports.useState(a),ie=$e(ge,2),ue=ie[0],oe=ie[1],me=fae();function Te(){xd(re.current,document.activeElement)||(J.current=document.activeElement)}function we(){if(!xd(re.current,document.activeElement)){var pt;(pt=ne.current)===null||pt===void 0||pt.focus()}}function be(pt){if(pt)we();else{if(oe(!1),N&&J.current&&f){try{J.current.focus({preventScroll:!0})}catch{}J.current=null}ue&&(_==null||_())}}function Re(pt){b==null||b(pt)}var Ee=E.exports.useRef(!1),Me=E.exports.useRef(),Ae=function(){clearTimeout(Me.current),Ee.current=!0},Fe=function(){Me.current=setTimeout(function(){Ee.current=!1})},We=null;U&&(We=function(gt){Ee.current?Ee.current=!1:re.current===gt.target&&Re(gt)});function je(pt){if(o&&pt.keyCode===Tt.ESC){pt.stopPropagation(),Re(pt);return}a&&pt.keyCode===Tt.TAB&&ne.current.changeActive(!pt.shiftKey)}return E.exports.useEffect(function(){a&&(oe(!0),Te())},[a]),E.exports.useEffect(function(){return function(){clearTimeout(Me.current)}},[]),it("div",{className:He("".concat(n,"-root"),Q),...Ql(e,{data:!0}),children:[A(hae,{prefixCls:n,visible:N&&a,motionName:iO(n,L,$),style:fe({zIndex:r},G),maskProps:Z}),A("div",{tabIndex:-1,onKeyDown:je,className:He("".concat(n,"-wrap"),g),ref:re,onClick:We,style:fe(fe({zIndex:r},p),{},{display:ue?null:"none"}),...v,children:A(A8,{...e,onMouseDown:Ae,onMouseUp:Fe,ref:ne,closable:M,ariaId:me,prefixCls:n,visible:a&&ue,onClose:Re,onVisibleChanged:be,motionName:iO(n,T,k)})})]})}var jT=function(t){var n=t.visible,r=t.getContainer,i=t.forceRender,a=t.destroyOnClose,s=a===void 0?!1:a,o=t.afterClose,c=E.exports.useState(n),f=$e(c,2),p=f[0],g=f[1];return E.exports.useEffect(function(){n&&g(!0)},[n]),!i&&s&&!p?null:A(R8,{open:n||i||p,autoDestroy:!1,getContainer:r,autoLock:n||p,children:A(vae,{...t,destroyOnClose:s,afterClose:function(){o==null||o(),g(!1)}})})};jT.displayName="Dialog";var yae=["visible","onVisibleChange","getContainer","current","countRender"],HT=E.exports.createContext({previewUrls:new Map,setPreviewUrls:function(){return null},current:null,setCurrent:function(){return null},setShowPreview:function(){return null},setMousePosition:function(){return null},registerImage:function(){return function(){return null}},rootClassName:""}),xae=HT.Provider,bae=function(t){var n=t.previewPrefixCls,r=n===void 0?"rc-image-preview":n,i=t.children,a=t.icons,s=a===void 0?{}:a,o=t.preview,c=on(o)==="object"?o:{},f=c.visible,p=f===void 0?void 0:f,g=c.onVisibleChange,v=g===void 0?void 0:g,b=c.getContainer,_=b===void 0?void 0:b,T=c.current,k=T===void 0?0:T,P=c.countRender,M=P===void 0?void 0:P,O=In(c,yae),N=E.exports.useState(new Map),L=$e(N,2),$=L[0],j=L[1],U=E.exports.useState(),G=$e(U,2),Z=G[0],Q=G[1],J=Si(!!p,{value:p,onChange:v}),re=$e(J,2),ne=re[0],ge=re[1],ie=E.exports.useState(null),ue=$e(ie,2),oe=ue[0],me=ue[1],Te=p!==void 0,we=Array.from($.keys()),be=we[k],Re=new Map(Array.from($).filter(function(Ae){var Fe=$e(Ae,2),We=Fe[1].canPreview;return!!We}).map(function(Ae){var Fe=$e(Ae,2),We=Fe[0],je=Fe[1].url;return[We,je]})),Ee=function(Fe,We){var je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,pt=function(){j(function(Ot){var Ze=new Map(Ot),St=Ze.delete(Fe);return St?Ze:Ot})};return j(function(gt){return new Map(gt).set(Fe,{url:We,canPreview:je})}),pt},Me=function(Fe){Fe.stopPropagation(),ge(!1),me(null)};return E.exports.useEffect(function(){Q(be)},[be]),E.exports.useEffect(function(){!ne&&Te&&Q(be)},[be,Te,ne]),it(xae,{value:{isPreviewGroup:!0,previewUrls:Re,setPreviewUrls:j,current:Z,setCurrent:Q,setShowPreview:ge,setMousePosition:me,registerImage:Ee},children:[i,A(N8,{"aria-hidden":!ne,visible:ne,prefixCls:r,onClose:Me,mousePosition:oe,src:Re.get(Z),icons:s,getContainer:_,countRender:M,...O})]})},dx=1,fx=50,lm=1,_ae=.2,wae=function(t){var n,r=t.visible,i=t.maskTransitionName,a=t.getContainer,s=t.prefixCls,o=t.rootClassName,c=t.icons,f=t.countRender,p=t.showSwitch,g=t.showProgress,v=t.current,b=t.count,_=t.scale,T=t.onSwitchLeft,k=t.onSwitchRight,P=t.onClose,M=t.onZoomIn,O=t.onZoomOut,N=t.onRotateRight,L=t.onRotateLeft,$=c.rotateLeft,j=c.rotateRight,U=c.zoomIn,G=c.zoomOut,Z=c.close,Q=c.left,J=c.right,re="".concat(s,"-operations-operation"),ne="".concat(s,"-operations-icon"),ge=[{icon:Z,onClick:P,type:"close"},{icon:U,onClick:M,type:"zoomIn",disabled:_===fx},{icon:G,onClick:O,type:"zoomOut",disabled:_===dx},{icon:j,onClick:N,type:"rotateRight"},{icon:$,onClick:L,type:"rotateLeft"}],ie=it(nr,{children:[p&&it(nr,{children:[A("div",{className:He("".concat(s,"-switch-left"),ae({},"".concat(s,"-switch-left-disabled"),v===0)),onClick:T,children:Q}),A("div",{className:He("".concat(s,"-switch-right"),ae({},"".concat(s,"-switch-right-disabled"),v===b-1)),onClick:k,children:J})]}),it("ul",{className:"".concat(s,"-operations"),children:[g&&A("li",{className:"".concat(s,"-operations-progress"),children:(n=f==null?void 0:f(v+1,b))!==null&&n!==void 0?n:"".concat(v+1," / ").concat(b)}),ge.map(function(ue){var oe,me=ue.icon,Te=ue.onClick,we=ue.type,be=ue.disabled;return A("li",{className:He(re,(oe={},ae(oe,"".concat(s,"-operations-operation-").concat(we),!0),ae(oe,"".concat(s,"-operations-operation-disabled"),!!be),oe)),onClick:Te,children:E.exports.isValidElement(me)?E.exports.cloneElement(me,{className:ne}):me},we)})]})]});return A(sa,{visible:r,motionName:i,children:function(ue){var oe=ue.className,me=ue.style;return A(R8,{open:!0,getContainer:a!=null?a:document.body,children:A("div",{className:He("".concat(s,"-operations-wrapper"),oe,o),style:me,children:ie})})}})},sO={x:0,y:0,rotate:0,scale:1};function Cae(e){var t=E.exports.useRef(null),n=E.exports.useRef([]),r=E.exports.useState(sO),i=$e(r,2),a=i[0],s=i[1],o=function(){s(sO)},c=function(g){t.current===null&&(n.current=[],t.current=ur(function(){s(function(v){var b=v;return n.current.forEach(function(_){b=fe(fe({},b),_)}),t.current=null,b})})),n.current.push(fe(fe({},a),g))},f=function(g,v,b){var _=e.current,T=_.width,k=_.height,P=_.offsetWidth,M=_.offsetHeight,O=_.offsetLeft,N=_.offsetTop,L=g,$=a.scale*g;$>fx?(L=fx/a.scale,$=fx):$<dx&&(L=dx/a.scale,$=dx);var j=v!=null?v:innerWidth/2,U=b!=null?b:innerHeight/2,G=L-1,Z=G*T*.5,Q=G*k*.5,J=G*(j-a.x-O),re=G*(U-a.y-N),ne=a.x-(J-Z),ge=a.y-(re-Q);if(g<1&&$===1){var ie=P*$,ue=M*$,oe=O8(),me=oe.width,Te=oe.height;ie<=me&&ue<=Te&&(ne=0,ge=0)}c({x:ne,y:ge,scale:$})};return{transform:a,resetTransform:o,updateTransform:c,dispatchZoonChange:f}}function lO(e,t,n,r){var i=t+n,a=(n-r)/2;if(n>r){if(t>0)return ae({},e,a);if(t<0&&i<r)return ae({},e,-a)}else if(t<0||i>r)return ae({},e,t<0?a:-a);return{}}function Sae(e,t,n,r){var i=O8(),a=i.width,s=i.height,o=null;return e<=a&&t<=s?o={x:0,y:0}:(e>a||t>s)&&(o=fe(fe({},lO("x",n,e,a)),lO("y",r,t,s))),o}var Eae=["prefixCls","src","alt","onClose","afterClose","visible","icons","rootClassName","getContainer","countRender","scaleStep","transitionName","maskTransitionName"],N8=function(t){var n=t.prefixCls,r=t.src,i=t.alt,a=t.onClose;t.afterClose;var s=t.visible,o=t.icons,c=o===void 0?{}:o,f=t.rootClassName,p=t.getContainer,g=t.countRender,v=t.scaleStep,b=v===void 0?.5:v,_=t.transitionName,T=_===void 0?"zoom":_,k=t.maskTransitionName,P=k===void 0?"fade":k,M=In(t,Eae),O=E.exports.useRef(),N=E.exports.useRef({deltaX:0,deltaY:0,transformX:0,transformY:0}),L=E.exports.useState(!1),$=$e(L,2),j=$[0],U=$[1],G=E.exports.useContext(HT),Z=G.previewUrls,Q=G.current,J=G.isPreviewGroup,re=G.setCurrent,ne=Z.size,ge=Array.from(Z.keys()),ie=ge.indexOf(Q),ue=J?Z.get(Q):r,oe=J&&ne>1,me=J&&ne>=1,Te=Cae(O),we=Te.transform,be=Te.resetTransform,Re=Te.updateTransform,Ee=Te.dispatchZoonChange,Me=we.rotate,Ae=we.scale,Fe=He(ae({},"".concat(n,"-moving"),j)),We=function(){be()},je=function(){Ee(lm+b)},pt=function(){Ee(lm-b)},gt=function(){Re({rotate:Me+90})},Ot=function(){Re({rotate:Me-90})},Ze=function(Ke){Ke.preventDefault(),Ke.stopPropagation(),ie>0&&re(ge[ie-1])},St=function(Ke){Ke.preventDefault(),Ke.stopPropagation(),ie<ne-1&&re(ge[ie+1])},ot=function(){if(s&&j){U(!1);var Ke=N.current,ct=Ke.transformX,bt=Ke.transformY,At=we.x!==ct&&we.y!==bt;if(!At)return;var Lt=O.current.offsetWidth*Ae,Ht=O.current.offsetHeight*Ae,ze=O.current.getBoundingClientRect(),Qe=ze.left,Zt=ze.top,an=Me%180!==0,Kt=Sae(an?Ht:Lt,an?Lt:Ht,Qe,Zt);Kt&&Re(fe({},Kt))}},vt=function(Ke){Ke.button===0&&(Ke.preventDefault(),Ke.stopPropagation(),N.current={deltaX:Ke.pageX-we.x,deltaY:Ke.pageY-we.y,transformX:we.x,transformY:we.y},U(!0))},yt=function(Ke){s&&j&&Re({x:Ke.pageX-N.current.deltaX,y:Ke.pageY-N.current.deltaY})},kt=function(Ke){if(!(!s||Ke.deltaY==0)){var ct=Math.abs(Ke.deltaY/100),bt=Math.min(ct,_ae),At=lm+bt*b;Ke.deltaY>0&&(At=lm/At),Ee(At,Ke.clientX,Ke.clientY)}},et=E.exports.useCallback(function(at){!s||!oe||(at.keyCode===Tt.LEFT?ie>0&&re(ge[ie-1]):at.keyCode===Tt.RIGHT&&ie<ne-1&&re(ge[ie+1]))},[ie,ne,ge,re,oe,s]),ut=function(Ke){s&&(Ae!==1?Re({x:0,y:0,scale:1}):Ee(lm+b,Ke.clientX,Ke.clientY))};return E.exports.useEffect(function(){var at,Ke,ct=Jo(window,"mouseup",ot,!1),bt=Jo(window,"mousemove",yt,!1),At=Jo(window,"keydown",et,!1);try{window.top!==window.self&&(at=Jo(window.top,"mouseup",ot,!1),Ke=Jo(window.top,"mousemove",yt,!1))}catch{}return function(){var Lt,Ht;ct.remove(),bt.remove(),At.remove(),(Lt=at)===null||Lt===void 0||Lt.remove(),(Ht=Ke)===null||Ht===void 0||Ht.remove()}},[s,j,et]),it(nr,{children:[A(jT,{transitionName:T,maskTransitionName:P,closable:!1,keyboard:!0,prefixCls:n,onClose:a,afterClose:We,visible:s,wrapClassName:Fe,rootClassName:f,getContainer:p,...M,children:A("div",{className:"".concat(n,"-img-wrapper"),children:A("img",{width:t.width,height:t.height,onWheel:kt,onMouseDown:vt,onDoubleClick:ut,ref:O,className:"".concat(n,"-img"),src:ue,alt:i,style:{transform:"translate3d(".concat(we.x,"px, ").concat(we.y,"px, 0) scale3d(").concat(Ae,", ").concat(Ae,", 1) rotate(").concat(Me,"deg)")}})})}),A(wae,{visible:s,maskTransitionName:P,getContainer:p,prefixCls:n,rootClassName:f,icons:c,countRender:g,showSwitch:oe,showProgress:me,current:ie,count:ne,scale:Ae,onSwitchLeft:Ze,onSwitchRight:St,onZoomIn:je,onZoomOut:pt,onRotateRight:gt,onRotateLeft:Ot,onClose:a})]})},Pae=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName","crossOrigin","decoding","loading","referrerPolicy","sizes","srcSet","useMap","draggable"],Tae=["src","visible","onVisibleChange","getContainer","mask","maskClassName","icons","scaleStep"],uO=0,o1=function(t){var n,r=t.src,i=t.alt,a=t.onPreviewClose,s=t.prefixCls,o=s===void 0?"rc-image":s,c=t.previewPrefixCls,f=c===void 0?"".concat(o,"-preview"):c,p=t.placeholder,g=t.fallback,v=t.width,b=t.height,_=t.style,T=t.preview,k=T===void 0?!0:T,P=t.className,M=t.onClick,O=t.onError,N=t.wrapperClassName,L=t.wrapperStyle,$=t.rootClassName,j=t.crossOrigin,U=t.decoding,G=t.loading,Z=t.referrerPolicy,Q=t.sizes,J=t.srcSet,re=t.useMap,ne=t.draggable,ge=In(t,Pae),ie=p&&p!==!0,ue=on(k)==="object"?k:{},oe=ue.src,me=ue.visible,Te=me===void 0?void 0:me,we=ue.onVisibleChange,be=we===void 0?a:we,Re=ue.getContainer,Ee=Re===void 0?void 0:Re,Me=ue.mask,Ae=ue.maskClassName,Fe=ue.icons,We=ue.scaleStep,je=In(ue,Tae),pt=oe!=null?oe:r,gt=Te!==void 0,Ot=Si(!!Te,{value:Te,onChange:be}),Ze=$e(Ot,2),St=Ze[0],ot=Ze[1],vt=E.exports.useState(ie?"loading":"normal"),yt=$e(vt,2),kt=yt[0],et=yt[1],ut=E.exports.useState(null),at=$e(ut,2),Ke=at[0],ct=at[1],bt=kt==="error",At=E.exports.useContext(HT),Lt=At.isPreviewGroup,Ht=At.setCurrent,ze=At.setShowPreview,Qe=At.setMousePosition,Zt=At.registerImage,an=E.exports.useState(function(){return uO+=1,uO}),Kt=$e(an,1),Vt=Kt[0],It=!!k,Xt=E.exports.useRef(!1),pn=function(){et("normal")},tt=function(tn){O&&O(tn),et("error")},Nt=function(tn){if(!gt){var zt=H4(tn.target),dt=zt.left,mt=zt.top;Lt?(Ht(Vt),Qe({x:dt,y:mt})):ct({x:dt,y:mt})}Lt?ze(!0):ot(!0),M&&M(tn)},qt=function(tn){tn.stopPropagation(),ot(!1),gt||ct(null)},En=function(tn){Xt.current=!1,kt==="loading"&&tn!=null&&tn.complete&&(tn.naturalWidth||tn.naturalHeight)&&(Xt.current=!0,pn())};E.exports.useEffect(function(){var _n=Zt(Vt,pt);return _n},[]),E.exports.useEffect(function(){Zt(Vt,pt,It)},[pt,It]),E.exports.useEffect(function(){bt&&et("normal"),ie&&!Xt.current&&et("loading")},[r]);var yn=He(o,N,$,ae({},"".concat(o,"-error"),bt)),Et=bt&&g?g:pt,Pn={crossOrigin:j,decoding:U,draggable:ne,loading:G,referrerPolicy:Z,sizes:Q,srcSet:J,useMap:re,alt:i,className:He("".concat(o,"-img"),ae({},"".concat(o,"-img-placeholder"),p===!0),P),style:fe({height:b},_)};return it(nr,{children:[it("div",{...ge,className:yn,onClick:It?Nt:M,style:fe({width:v,height:b},L),children:[A("img",{...Pn,ref:En,...bt&&g?{src:g}:{onLoad:pn,onError:tt,src:r},width:v,height:b}),kt==="loading"&&A("div",{"aria-hidden":"true",className:"".concat(o,"-placeholder"),children:p}),Me&&It&&A("div",{className:He("".concat(o,"-mask"),Ae),style:{display:((n=Pn.style)===null||n===void 0?void 0:n.display)==="none"?"none":void 0},children:Me})]}),!Lt&&It&&A(N8,{"aria-hidden":!St,visible:St,prefixCls:f,onClose:qt,mousePosition:Ke,src:Et,alt:i,getContainer:Ee,icons:Fe,scaleStep:We,rootClassName:$,...je})]})};o1.PreviewGroup=bae;o1.displayName="Image";var kae={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"};const Iae=kae;var L8=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:Iae})})};L8.displayName="RotateLeftOutlined";const Mae=E.exports.forwardRef(L8);var Rae={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z"}},{tag:"path",attrs:{d:"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z"}}]},name:"rotate-right",theme:"outlined"};const Dae=Rae;var F8=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:Dae})})};F8.displayName="RotateRightOutlined";const Oae=E.exports.forwardRef(F8);var Aae={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"};const Nae=Aae;var z8=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:Nae})})};z8.displayName="ZoomInOutlined";const Lae=E.exports.forwardRef(z8);var Fae={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-out",theme:"outlined"};const zae=Fae;var $8=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:zae})})};$8.displayName="ZoomOutOutlined";const $ae=E.exports.forwardRef($8);var Bae=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},B8={rotateLeft:A(Mae,{}),rotateRight:A(Oae,{}),zoomIn:A(Lae,{}),zoomOut:A($ae,{}),close:A($h,{}),left:A(e8,{}),right:A(e1,{})},Vae=function(t){var n=t.previewPrefixCls,r=t.preview,i=Bae(t,["previewPrefixCls","preview"]),a=E.exports.useContext(Fn),s=a.getPrefixCls,o=s("image-preview",n),c=s(),f=E.exports.useMemo(function(){if(r===!1)return r;var p=on(r)==="object"?r:{};return Be(Be({},p),{transitionName:Ma(c,"zoom",p.transitionName),maskTransitionName:Ma(c,"fade",p.maskTransitionName)})},[r]);return A(o1.PreviewGroup,{preview:f,previewPrefixCls:o,icons:B8,...i})};const Uae=Vae;var cO=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},V8=function(t){var n=t.prefixCls,r=t.preview,i=cO(t,["prefixCls","preview"]),a=E.exports.useContext(Fn),s=a.getPrefixCls,o=a.locale,c=o===void 0?Os:o,f=a.getPopupContainer,p=s("image",n),g=s(),v=c.Image||Os.Image,b=E.exports.useMemo(function(){if(r===!1)return r;var _=on(r)==="object"?r:{},T=_.getContainer,k=cO(_,["getContainer"]);return Be(Be({mask:it("div",{className:"".concat(p,"-mask-info"),children:[A(UT,{}),v==null?void 0:v.preview]}),icons:B8},k),{getContainer:T||f,transitionName:Ma(g,"zoom",_.transitionName),maskTransitionName:Ma(g,"fade",_.maskTransitionName)})},[r,v]);return A(o1,{prefixCls:p,preview:b,...i})};V8.PreviewGroup=Uae;const jae=V8;var Hae=function(t){var n,r=E.exports.useContext(Fn),i=r.getPrefixCls,a=r.direction,s=t.prefixCls,o=t.className,c=o===void 0?"":o,f=i("input-group",s),p=He(f,(n={},ae(n,"".concat(f,"-lg"),t.size==="large"),ae(n,"".concat(f,"-sm"),t.size==="small"),ae(n,"".concat(f,"-compact"),t.compact),ae(n,"".concat(f,"-rtl"),a==="rtl"),n),c),g=E.exports.useContext(As),v=E.exports.useMemo(function(){return Be(Be({},g),{isFormItemInput:!1})},[g]);return A("span",{className:p,style:t.style,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onFocus:t.onFocus,onBlur:t.onBlur,children:A(As.Provider,{value:v,children:t.children})})};const Kae=Hae;function hx(e){return!!(e.addonBefore||e.addonAfter)}function U8(e){return!!(e.prefix||e.suffix||e.allowClear)}function dO(e,t,n,r){if(!!n){var i=t;if(t.type==="click"){var a=e.cloneNode(!0);i=Object.create(t,{target:{value:a},currentTarget:{value:a}}),a.value="",n(i);return}if(r!==void 0){i=Object.create(t,{target:{value:e},currentTarget:{value:e}}),e.value=r,n(i);return}n(i)}}function Wae(e,t){if(!!e){e.focus(t);var n=t||{},r=n.cursor;if(r){var i=e.value.length;switch(r){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(i,i);break;default:e.setSelectionRange(0,i)}}}}function fO(e){return typeof e>"u"||e===null?"":String(e)}var Gae=function(t){var n=t.inputElement,r=t.prefixCls,i=t.prefix,a=t.suffix,s=t.addonBefore,o=t.addonAfter,c=t.className,f=t.style,p=t.affixWrapperClassName,g=t.groupClassName,v=t.wrapperClassName,b=t.disabled,_=t.readOnly,T=t.focused,k=t.triggerFocus,P=t.allowClear,M=t.value,O=t.handleReset,N=t.hidden,L=E.exports.useRef(null),$=function(oe){var me;(me=L.current)!==null&&me!==void 0&&me.contains(oe.target)&&(k==null||k())},j=function(){var oe;if(!P)return null;var me=!b&&!_&&M,Te="".concat(r,"-clear-icon"),we=on(P)==="object"&&P!==null&&P!==void 0&&P.clearIcon?P.clearIcon:"\u2716";return A("span",{onClick:O,onMouseDown:function(Re){return Re.preventDefault()},className:He(Te,(oe={},ae(oe,"".concat(Te,"-hidden"),!me),ae(oe,"".concat(Te,"-has-suffix"),!!a),oe)),role:"button",tabIndex:-1,children:we})},U=E.exports.cloneElement(n,{value:M,hidden:N});if(U8(t)){var G,Z="".concat(r,"-affix-wrapper"),Q=He(Z,(G={},ae(G,"".concat(Z,"-disabled"),b),ae(G,"".concat(Z,"-focused"),T),ae(G,"".concat(Z,"-readonly"),_),ae(G,"".concat(Z,"-input-with-clear-btn"),a&&P&&M),G),!hx(t)&&c,p),J=(a||P)&&it("span",{className:"".concat(r,"-suffix"),children:[j(),a]});U=it("span",{className:Q,style:f,hidden:!hx(t)&&N,onClick:$,ref:L,children:[i&&A("span",{className:"".concat(r,"-prefix"),children:i}),E.exports.cloneElement(n,{style:null,value:M,hidden:null}),J]})}if(hx(t)){var re="".concat(r,"-group"),ne="".concat(re,"-addon"),ge=He("".concat(r,"-wrapper"),re,v),ie=He("".concat(r,"-group-wrapper"),c,g);return A("span",{className:ie,style:f,hidden:N,children:it("span",{className:ge,children:[s&&A("span",{className:ne,children:s}),E.exports.cloneElement(U,{style:null,hidden:null}),o&&A("span",{className:ne,children:o})]})})}return U},qae=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","inputClassName"],Zae=E.exports.forwardRef(function(e,t){var n=e.autoComplete,r=e.onChange,i=e.onFocus,a=e.onBlur,s=e.onPressEnter,o=e.onKeyDown,c=e.prefixCls,f=c===void 0?"rc-input":c,p=e.disabled,g=e.htmlSize,v=e.className,b=e.maxLength,_=e.suffix,T=e.showCount,k=e.type,P=k===void 0?"text":k,M=e.inputClassName,O=In(e,qae),N=Si(e.defaultValue,{value:e.value}),L=$e(N,2),$=L[0],j=L[1],U=E.exports.useState(!1),G=$e(U,2),Z=G[0],Q=G[1],J=E.exports.useRef(null),re=function(be){J.current&&Wae(J.current,be)};E.exports.useImperativeHandle(t,function(){return{focus:re,blur:function(){var be;(be=J.current)===null||be===void 0||be.blur()},setSelectionRange:function(be,Re,Ee){var Me;(Me=J.current)===null||Me===void 0||Me.setSelectionRange(be,Re,Ee)},select:function(){var be;(be=J.current)===null||be===void 0||be.select()},input:J.current}}),E.exports.useEffect(function(){Q(function(we){return we&&p?!1:we})},[p]);var ne=function(be){e.value===void 0&&j(be.target.value),J.current&&dO(J.current,be,r)},ge=function(be){s&&be.key==="Enter"&&s(be),o==null||o(be)},ie=function(be){Q(!0),i==null||i(be)},ue=function(be){Q(!1),a==null||a(be)},oe=function(be){j(""),re(),J.current&&dO(J.current,be,r)},me=function(){var be=Wi(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","affixWrapperClassName","groupClassName","inputClassName","wrapperClassName","htmlSize"]);return A("input",{autoComplete:n,...be,onChange:ne,onFocus:ie,onBlur:ue,onKeyDown:ge,className:He(f,ae({},"".concat(f,"-disabled"),p),M,!hx(e)&&!U8(e)&&v),ref:J,size:g,type:P})},Te=function(){var be=Number(b)>0;if(_||T){var Re=fO($),Ee=Rt(Re).length,Me=on(T)==="object"?T.formatter({value:Re,count:Ee,maxLength:b}):"".concat(Ee).concat(be?" / ".concat(b):"");return it(nr,{children:[!!T&&A("span",{className:He("".concat(f,"-show-count-suffix"),ae({},"".concat(f,"-show-count-has-suffix"),!!_)),children:Me}),_]})}return null};return A(Gae,{...O,prefixCls:f,className:v,inputElement:me(),handleReset:oe,value:fO($),focused:Z,triggerFocus:re,suffix:Te(),disabled:p})});function j8(e,t){var n=E.exports.useRef([]),r=function(){n.current.push(setTimeout(function(){var a,s,o,c;((a=e.current)===null||a===void 0?void 0:a.input)&&((s=e.current)===null||s===void 0?void 0:s.input.getAttribute("type"))==="password"&&((o=e.current)===null||o===void 0?void 0:o.input.hasAttribute("value"))&&((c=e.current)===null||c===void 0||c.input.removeAttribute("value"))}))};return E.exports.useEffect(function(){return t&&r(),function(){return n.current.forEach(function(i){i&&clearTimeout(i)})}},[]),r}function Xae(e){return!!(e.prefix||e.suffix||e.allowClear)}var Yae=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Qae(e){return typeof e>"u"||e===null?"":String(e)}function QC(e,t,n,r){if(!!n){var i=t;if(t.type==="click"){var a=e.cloneNode(!0);i=Object.create(t,{target:{value:a},currentTarget:{value:a}}),a.value="",n(i);return}if(r!==void 0){i=Object.create(t,{target:{value:e},currentTarget:{value:e}}),e.value=r,n(i);return}n(i)}}function Jae(e,t){if(!!e){e.focus(t);var n=t||{},r=n.cursor;if(r){var i=e.value.length;switch(r){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(i,i);break;default:e.setSelectionRange(0,i);break}}}}var KT=E.exports.forwardRef(function(e,t){var n,r,i,a=e.prefixCls,s=e.bordered,o=s===void 0?!0:s,c=e.status,f=e.size,p=e.disabled,g=e.onBlur,v=e.onFocus,b=e.suffix,_=e.allowClear,T=e.addonAfter,k=e.addonBefore,P=e.className,M=e.onChange,O=Yae(e,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","onChange"]),N=Un.useContext(Fn),L=N.getPrefixCls,$=N.direction,j=N.input,U=L("input",a),G=E.exports.useRef(null),Z=Vh(U,$),Q=Z.compactSize,J=Z.compactItemClassnames,re=Un.useContext(nu),ne=Q||f||re,ge=Un.useContext(fc),ie=p!=null?p:ge,ue=E.exports.useContext(As),oe=ue.status,me=ue.hasFeedback,Te=ue.feedbackIcon,we=rv(oe,c),be=Xae(e)||!!me,Re=E.exports.useRef(be);E.exports.useEffect(function(){be&&Re.current,Re.current=be},[be]);var Ee=j8(G,!0),Me=function(gt){Ee(),g==null||g(gt)},Ae=function(gt){Ee(),v==null||v(gt)},Fe=function(gt){Ee(),M==null||M(gt)},We=(me||b)&&it(nr,{children:[b,me&&Te]}),je;return on(_)==="object"&&(_==null?void 0:_.clearIcon)?je=_:_&&(je={clearIcon:A(zh,{})}),A(Zae,{ref:La(t,G),prefixCls:U,autoComplete:j==null?void 0:j.autoComplete,...O,disabled:ie||void 0,onBlur:Me,onFocus:Ae,suffix:We,allowClear:je,className:He(P,J),onChange:Fe,addonAfter:T&&A(vb,{children:A(A4,{override:!0,status:!0,children:T})}),addonBefore:k&&A(vb,{children:A(A4,{override:!0,status:!0,children:k})}),inputClassName:He((n={},ae(n,"".concat(U,"-sm"),ne==="small"),ae(n,"".concat(U,"-lg"),ne==="large"),ae(n,"".concat(U,"-rtl"),$==="rtl"),ae(n,"".concat(U,"-borderless"),!o),n),!be&&Yu(U,we)),affixWrapperClassName:He((r={},ae(r,"".concat(U,"-affix-wrapper-sm"),ne==="small"),ae(r,"".concat(U,"-affix-wrapper-lg"),ne==="large"),ae(r,"".concat(U,"-affix-wrapper-rtl"),$==="rtl"),ae(r,"".concat(U,"-affix-wrapper-borderless"),!o),r),Yu("".concat(U,"-affix-wrapper"),we,me)),wrapperClassName:He(ae({},"".concat(U,"-group-rtl"),$==="rtl")),groupClassName:He((i={},ae(i,"".concat(U,"-group-wrapper-sm"),ne==="small"),ae(i,"".concat(U,"-group-wrapper-lg"),ne==="large"),ae(i,"".concat(U,"-group-wrapper-rtl"),$==="rtl"),i),Yu("".concat(U,"-group-wrapper"),we,me))})}),ese={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 tse=ese;var H8=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:tse})})};H8.displayName="EyeInvisibleOutlined";const nse=E.exports.forwardRef(H8);var rse=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},ise=function(t){return t?A(UT,{}):A(nse,{})},ose={click:"onClick",hover:"onMouseOver"},ase=E.exports.forwardRef(function(e,t){var n=e.visibilityToggle,r=n===void 0?!0:n,i=on(r)==="object"&&r.visible!==void 0,a=E.exports.useState(function(){return i?r.visible:!1}),s=$e(a,2),o=s[0],c=s[1],f=E.exports.useRef(null);E.exports.useEffect(function(){i&&c(r.visible)},[i,r]);var p=j8(f),g=function(){var T=e.disabled;T||(o&&p(),c(function(k){var P,M=!k;return on(r)==="object"&&((P=r.onVisibleChange)===null||P===void 0||P.call(r,M)),M}))},v=function(T){var k,P=e.action,M=P===void 0?"click":P,O=e.iconRender,N=O===void 0?ise:O,L=ose[M]||"",$=N(o),j=(k={},ae(k,L,g),ae(k,"className","".concat(T,"-icon")),ae(k,"key","passwordIcon"),ae(k,"onMouseDown",function(G){G.preventDefault()}),ae(k,"onMouseUp",function(G){G.preventDefault()}),k);return E.exports.cloneElement(E.exports.isValidElement($)?$:A("span",{children:$}),j)},b=function(T){var k=T.getPrefixCls,P=e.className,M=e.prefixCls,O=e.inputPrefixCls,N=e.size,L=rse(e,["className","prefixCls","inputPrefixCls","size"]),$=k("input",O),j=k("input-password",M),U=r&&v(j),G=He(j,P,ae({},"".concat(j,"-").concat(N),!!N)),Z=Be(Be({},Wi(L,["suffix","iconRender","visibilityToggle"])),{type:o?"text":"password",className:G,prefixCls:$,suffix:U});return N&&(Z.size=N),A(KT,{ref:La(t,f),...Z})};return A(Ud,{children:b})});const sse=ase;var lse=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},use=E.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.inputPrefixCls,a=e.className,s=e.size,o=e.suffix,c=e.enterButton,f=c===void 0?!1:c,p=e.addonAfter,g=e.loading,v=e.disabled,b=e.onSearch,_=e.onChange,T=e.onCompositionStart,k=e.onCompositionEnd,P=lse(e,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),M=E.exports.useContext(Fn),O=M.getPrefixCls,N=M.direction,L=E.exports.useContext(nu),$=E.exports.useRef(!1),j=O("input-search",r),U=O("input",i),G=Vh(j,N),Z=G.compactSize,Q=Z||s||L,J=E.exports.useRef(null),re=function(Ae){Ae&&Ae.target&&Ae.type==="click"&&b&&b(Ae.target.value,Ae),_&&_(Ae)},ne=function(Ae){var Fe;document.activeElement===((Fe=J.current)===null||Fe===void 0?void 0:Fe.input)&&Ae.preventDefault()},ge=function(Ae){var Fe,We;b&&b((We=(Fe=J.current)===null||Fe===void 0?void 0:Fe.input)===null||We===void 0?void 0:We.value,Ae)},ie=function(Ae){$.current||g||ge(Ae)},ue=typeof f=="boolean"?A(PT,{}):null,oe="".concat(j,"-button"),me,Te=f||{},we=Te.type&&Te.type.__ANT_BUTTON===!0;we||Te.type==="button"?me=Ei(Te,Be({onMouseDown:ne,onClick:function(Ae){var Fe,We;(We=(Fe=Te==null?void 0:Te.props)===null||Fe===void 0?void 0:Fe.onClick)===null||We===void 0||We.call(Fe,Ae),ge(Ae)},key:"enterButton"},we?{className:oe,size:Q}:{})):me=A(Xr,{className:oe,type:f?"primary":void 0,size:Q,disabled:v,onMouseDown:ne,onClick:ge,loading:g,icon:ue,children:f},"enterButton"),p&&(me=[me,Ei(p,{key:"addonAfter"})]);var be=He(j,(n={},ae(n,"".concat(j,"-rtl"),N==="rtl"),ae(n,"".concat(j,"-").concat(Q),!!Q),ae(n,"".concat(j,"-with-button"),!!f),n),a),Re=function(Ae){$.current=!0,T==null||T(Ae)},Ee=function(Ae){$.current=!1,k==null||k(Ae)};return A(KT,{ref:La(J,t),onPressEnter:ie,...P,size:Q,onCompositionStart:Re,onCompositionEnd:Ee,prefixCls:U,addonAfter:me,suffix:o,onChange:re,className:be,disabled:v})});const cse=use;var dse=`
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;
`,fse=["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"],JC={},Wa;function hse(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&JC[n])return JC[n];var r=window.getComputedStyle(e),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),a=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),s=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),o=fse.map(function(f){return"".concat(f,":").concat(r.getPropertyValue(f))}).join(";"),c={sizingStyle:o,paddingSize:a,borderSize:s,boxSizing:i};return t&&n&&(JC[n]=c),c}function pse(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Wa||(Wa=document.createElement("textarea"),Wa.setAttribute("tab-index","-1"),Wa.setAttribute("aria-hidden","true"),document.body.appendChild(Wa)),e.getAttribute("wrap")?Wa.setAttribute("wrap",e.getAttribute("wrap")):Wa.removeAttribute("wrap");var i=hse(e,t),a=i.paddingSize,s=i.borderSize,o=i.boxSizing,c=i.sizingStyle;Wa.setAttribute("style","".concat(c,";").concat(dse)),Wa.value=e.value||e.placeholder||"";var f=void 0,p=void 0,g,v=Wa.scrollHeight;if(o==="border-box"?v+=s:o==="content-box"&&(v-=a),n!==null||r!==null){Wa.value=" ";var b=Wa.scrollHeight-a;n!==null&&(f=b*n,o==="border-box"&&(f=f+a+s),v=Math.max(f,v)),r!==null&&(p=b*r,o==="border-box"&&(p=p+a+s),g=v>p?"":"hidden",v=Math.min(p,v))}var _={height:v,overflowY:g,resize:"none"};return f&&(_.minHeight=f),p&&(_.maxHeight=p),_}var mse=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],eS=0,tS=1,nS=2,gse=E.exports.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-textarea":n;e.onPressEnter;var i=e.defaultValue,a=e.value,s=e.autoSize,o=e.onResize,c=e.className,f=e.style,p=e.disabled,g=e.onChange;e.onInternalAutoSize;var v=In(e,mse),b=Si(i,{value:a,postState:function(Ee){return Ee!=null?Ee:""}}),_=$e(b,2),T=_[0],k=_[1],P=function(Ee){k(Ee.target.value),g==null||g(Ee)},M=E.exports.useRef();E.exports.useImperativeHandle(t,function(){return{textArea:M.current}});var O=E.exports.useMemo(function(){return s&&on(s)==="object"?[s.minRows,s.maxRows]:[]},[s]),N=$e(O,2),L=N[0],$=N[1],j=!!s,U=function(){try{if(document.activeElement===M.current){var Ee=M.current,Me=Ee.selectionStart,Ae=Ee.selectionEnd,Fe=Ee.scrollTop;M.current.setSelectionRange(Me,Ae),M.current.scrollTop=Fe}}catch{}},G=E.exports.useState(nS),Z=$e(G,2),Q=Z[0],J=Z[1],re=E.exports.useState(),ne=$e(re,2),ge=ne[0],ie=ne[1],ue=function(){J(eS)};Ci(function(){j&&ue()},[a,L,$,j]),Ci(function(){if(Q===eS)J(tS);else if(Q===tS){var Re=pse(M.current,!1,L,$);J(nS),ie(Re)}else U()},[Q]);var oe=E.exports.useRef(),me=function(){ur.cancel(oe.current)},Te=function(Ee){Q===nS&&(o==null||o(Ee),s&&(me(),oe.current=ur(function(){ue()})))};E.exports.useEffect(function(){return me},[]);var we=j?ge:null,be=fe(fe({},f),we);return(Q===eS||Q===tS)&&(be.overflowY="hidden",be.overflowX="hidden"),A(tu,{onResize:Te,disabled:!(s||o),children:A("textarea",{...v,ref:M,style:be,className:He(r,c,ae({},"".concat(r,"-disabled"),p)),disabled:p,value:T,onChange:P})})}),vse=function(e){ai(n,e);var t=si(n);function n(r){var i;Ur(this,n),i=t.call(this,r),i.resizableTextArea=void 0,i.focus=function(){i.resizableTextArea.textArea.focus()},i.saveTextArea=function(s){i.resizableTextArea=s},i.handleChange=function(s){var o=i.props.onChange;i.setValue(s.target.value),o&&o(s)},i.handleKeyDown=function(s){var o=i.props,c=o.onPressEnter,f=o.onKeyDown;s.keyCode===13&&c&&c(s),f&&f(s)};var a=typeof r.value>"u"||r.value===null?r.defaultValue:r.value;return i.state={value:a},i}return jr(n,[{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 A(gse,{...this.props,value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea})}}],[{key:"getDerivedStateFromProps",value:function(i){return"value"in i?{value:i.value}:null}}]),n}(E.exports.Component),yse=la("text","input");function xse(e){return!!(e.addonBefore||e.addonAfter)}var bse=function(e){ai(n,e);var t=si(n);function n(){return Ur(this,n),t.apply(this,arguments)}return jr(n,[{key:"renderClearIcon",value:function(i){var a,s=this.props,o=s.value,c=s.disabled,f=s.readOnly,p=s.handleReset,g=s.suffix,v=!c&&!f&&o,b="".concat(i,"-clear-icon");return A(zh,{onClick:p,onMouseDown:function(T){return T.preventDefault()},className:He((a={},ae(a,"".concat(b,"-hidden"),!v),ae(a,"".concat(b,"-has-suffix"),!!g),a),b),role:"button"})}},{key:"renderTextAreaWithClearIcon",value:function(i,a,s){var o,c=this.props,f=c.value,p=c.allowClear,g=c.className,v=c.style,b=c.direction,_=c.bordered,T=c.hidden,k=c.status,P=s.status,M=s.hasFeedback;if(!p)return Ei(a,{value:f});var O=He("".concat(i,"-affix-wrapper"),"".concat(i,"-affix-wrapper-textarea-with-clear-btn"),Yu("".concat(i,"-affix-wrapper"),rv(P,k),M),(o={},ae(o,"".concat(i,"-affix-wrapper-rtl"),b==="rtl"),ae(o,"".concat(i,"-affix-wrapper-borderless"),!_),ae(o,"".concat(g),!xse(this.props)&&g),o));return it("span",{className:O,style:v,hidden:T,children:[Ei(a,{style:null,value:f}),this.renderClearIcon(i)]})}},{key:"render",value:function(){var i=this;return A(As.Consumer,{children:function(a){var s=i.props,o=s.prefixCls,c=s.inputType,f=s.element;if(c===yse[0])return i.renderTextAreaWithClearIcon(o,f,a)}})}}]),n}(E.exports.Component);const _se=bse;var wse=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function K8(e,t){return Rt(e||"").slice(0,t).join("")}function hO(e,t,n,r){var i=n;return e?i=K8(n,r):Rt(t||"").length<n.length&&Rt(n||"").length>r&&(i=t),i}var Cse=E.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.bordered,a=i===void 0?!0:i,s=e.showCount,o=s===void 0?!1:s,c=e.maxLength,f=e.className,p=e.style,g=e.size,v=e.disabled,b=e.onCompositionStart,_=e.onCompositionEnd,T=e.onChange,k=e.status,P=wse(e,["prefixCls","bordered","showCount","maxLength","className","style","size","disabled","onCompositionStart","onCompositionEnd","onChange","status"]),M=E.exports.useContext(Fn),O=M.getPrefixCls,N=M.direction,L=E.exports.useContext(nu),$=E.exports.useContext(fc),j=v!=null?v:$,U=E.exports.useContext(As),G=U.status,Z=U.hasFeedback,Q=U.isFormItemInput,J=U.feedbackIcon,re=rv(G,k),ne=E.exports.useRef(null),ge=E.exports.useRef(null),ie=E.exports.useState(!1),ue=$e(ie,2),oe=ue[0],me=ue[1],Te=E.exports.useRef(),we=E.exports.useRef(0),be=Si(P.defaultValue,{value:P.value}),Re=$e(be,2),Ee=Re[0],Me=Re[1],Ae=P.hidden,Fe=function(at,Ke){P.value===void 0&&(Me(at),Ke==null||Ke())},We=Number(c)>0,je=function(at){me(!0),Te.current=Ee,we.current=at.currentTarget.selectionStart,b==null||b(at)},pt=function(at){var Ke;me(!1);var ct=at.currentTarget.value;if(We){var bt=we.current>=c+1||we.current===((Ke=Te.current)===null||Ke===void 0?void 0:Ke.length);ct=hO(bt,Te.current,ct,c)}ct!==Ee&&(Fe(ct),QC(at.currentTarget,at,T,ct)),_==null||_(at)},gt=function(at){var Ke=at.target.value;if(!oe&&We){var ct=at.target.selectionStart>=c+1||at.target.selectionStart===Ke.length||!at.target.selectionStart;Ke=hO(ct,Ee,Ke,c)}Fe(Ke),QC(at.currentTarget,at,T,Ke)},Ot=function(at){var Ke,ct,bt;Fe(""),(Ke=ne.current)===null||Ke===void 0||Ke.focus(),QC((bt=(ct=ne.current)===null||ct===void 0?void 0:ct.resizableTextArea)===null||bt===void 0?void 0:bt.textArea,at,T)},Ze=O("input",r);E.exports.useImperativeHandle(t,function(){var ut;return{resizableTextArea:(ut=ne.current)===null||ut===void 0?void 0:ut.resizableTextArea,focus:function(Ke){var ct,bt;Jae((bt=(ct=ne.current)===null||ct===void 0?void 0:ct.resizableTextArea)===null||bt===void 0?void 0:bt.textArea,Ke)},blur:function(){var Ke;return(Ke=ne.current)===null||Ke===void 0?void 0:Ke.blur()}}});var St=A(vse,{...Wi(P,["allowClear"]),disabled:j,className:He((n={},ae(n,"".concat(Ze,"-borderless"),!a),ae(n,f,f&&!o),ae(n,"".concat(Ze,"-sm"),L==="small"||g==="small"),ae(n,"".concat(Ze,"-lg"),L==="large"||g==="large"),n),Yu(Ze,re)),style:o?{resize:p==null?void 0:p.resize}:p,prefixCls:Ze,onCompositionStart:je,onChange:gt,onCompositionEnd:pt,ref:ne}),ot=Qae(Ee);!oe&&We&&(P.value===null||P.value===void 0)&&(ot=K8(ot,c));var vt=A(_se,{disabled:j,...P,prefixCls:Ze,direction:N,inputType:"text",value:ot,element:St,handleReset:Ot,ref:ge,bordered:a,status:k,style:o?void 0:p});if(o||Z){var yt,kt=Rt(ot).length,et="";return on(o)==="object"?et=o.formatter({value:ot,count:kt,maxLength:c}):et="".concat(kt).concat(We?" / ".concat(c):""),it("div",{hidden:Ae,className:He("".concat(Ze,"-textarea"),(yt={},ae(yt,"".concat(Ze,"-textarea-rtl"),N==="rtl"),ae(yt,"".concat(Ze,"-textarea-show-count"),o),ae(yt,"".concat(Ze,"-textarea-in-form-item"),Q),yt),Yu("".concat(Ze,"-textarea"),re,Z),f),style:p,"data-count":et,children:[vt,Z&&A("span",{className:"".concat(Ze,"-textarea-suffix"),children:J})]})}return vt});const W8=Cse;var cv=KT;cv.Group=Kae;cv.Search=cse;cv.TextArea=W8;cv.Password=sse;const Sse=cv;var Ese={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 Pse=Ese;var G8=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:Pse})})};G8.displayName="DoubleLeftOutlined";const Tse=E.exports.forwardRef(G8);var kse={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 Ise=kse;var q8=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:Ise})})};q8.displayName="DoubleRightOutlined";const Mse=E.exports.forwardRef(q8);var um=function(t){var n,r="".concat(t.rootPrefixCls,"-item"),i=He(r,"".concat(r,"-").concat(t.page),(n={},ae(n,"".concat(r,"-active"),t.active),ae(n,"".concat(r,"-disabled"),!t.page),ae(n,t.className,!!t.className),n)),a=function(){t.onClick(t.page)},s=function(c){t.onKeyPress(c,t.onClick,t.page)};return A("li",{title:t.showTitle?t.page:null,className:i,onClick:a,onKeyPress:s,tabIndex:"0",children:t.itemRender(t.page,"page",A("a",{rel:"nofollow",children:t.page}))})};const Qc={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40};var Z8=function(e){ai(n,e);var t=si(n);function n(){var r;Ur(this,n);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),r.state={goInputText:""},r.buildOptionText=function(o){return"".concat(o," ").concat(r.props.locale.items_per_page)},r.changeSize=function(o){r.props.changeSize(Number(o))},r.handleChange=function(o){r.setState({goInputText:o.target.value})},r.handleBlur=function(o){var c=r.props,f=c.goButton,p=c.quickGo,g=c.rootPrefixCls,v=r.state.goInputText;f||v===""||(r.setState({goInputText:""}),!(o.relatedTarget&&(o.relatedTarget.className.indexOf("".concat(g,"-item-link"))>=0||o.relatedTarget.className.indexOf("".concat(g,"-item"))>=0))&&p(r.getValidValue()))},r.go=function(o){var c=r.state.goInputText;c!==""&&(o.keyCode===Qc.ENTER||o.type==="click")&&(r.setState({goInputText:""}),r.props.quickGo(r.getValidValue()))},r}return jr(n,[{key:"getValidValue",value:function(){var i=this.state.goInputText;return!i||isNaN(i)?void 0:Number(i)}},{key:"getPageSizeOptions",value:function(){var i=this.props,a=i.pageSize,s=i.pageSizeOptions;return s.some(function(o){return o.toString()===a.toString()})?s:s.concat([a.toString()]).sort(function(o,c){var f=isNaN(Number(o))?0:Number(o),p=isNaN(Number(c))?0:Number(c);return f-p})}},{key:"render",value:function(){var i=this,a=this.props,s=a.pageSize,o=a.locale,c=a.rootPrefixCls,f=a.changeSize,p=a.quickGo,g=a.goButton,v=a.selectComponentClass,b=a.buildOptionText,_=a.selectPrefixCls,T=a.disabled,k=this.state.goInputText,P="".concat(c,"-options"),M=v,O=null,N=null,L=null;if(!f&&!p)return null;var $=this.getPageSizeOptions();if(f&&M){var j=$.map(function(U,G){return A(M.Option,{value:U.toString(),children:(b||i.buildOptionText)(U)},G)});O=A(M,{disabled:T,prefixCls:_,showSearch:!1,className:"".concat(P,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(s||$[0]).toString(),onChange:this.changeSize,getPopupContainer:function(G){return G.parentNode},"aria-label":o.page_size,defaultOpen:!1,children:j})}return p&&(g&&(L=typeof g=="boolean"?A("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:T,className:"".concat(P,"-quick-jumper-button"),children:o.jump_to_confirm}):A("span",{onClick:this.go,onKeyUp:this.go,children:g})),N=it("div",{className:"".concat(P,"-quick-jumper"),children:[o.jump_to,A("input",{disabled:T,type:"text",value:k,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":o.page}),o.page,L]})),it("li",{className:"".concat(P),children:[O,N]})}}]),n}(Un.Component);Z8.defaultProps={pageSizeOptions:["10","20","50","100"]};const Rse={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 K4(){}function pO(e){var t=Number(e);return typeof t=="number"&&!isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function Dse(e,t,n){return n}function Cu(e,t,n){var r=typeof e>"u"?t.pageSize:e;return Math.floor((n.total-1)/r)+1}var X8=function(e){ai(n,e);var t=si(n);function n(r){var i;Ur(this,n),i=t.call(this,r),i.getJumpPrevPage=function(){return Math.max(1,i.state.current-(i.props.showLessItems?3:5))},i.getJumpNextPage=function(){return Math.min(Cu(void 0,i.state,i.props),i.state.current+(i.props.showLessItems?3:5))},i.getItemIcon=function(f,p){var g=i.props.prefixCls,v=f||A("button",{type:"button","aria-label":p,className:"".concat(g,"-item-link")});return typeof f=="function"&&(v=Un.createElement(f,fe({},i.props))),v},i.savePaginationNode=function(f){i.paginationNode=f},i.isValid=function(f){var p=i.props.total;return pO(f)&&f!==i.state.current&&pO(p)&&p>0},i.shouldDisplayQuickJumper=function(){var f=i.props,p=f.showQuickJumper,g=f.total,v=i.state.pageSize;return g<=v?!1:p},i.handleKeyDown=function(f){(f.keyCode===Qc.ARROW_UP||f.keyCode===Qc.ARROW_DOWN)&&f.preventDefault()},i.handleKeyUp=function(f){var p=i.getValidValue(f),g=i.state.currentInputValue;p!==g&&i.setState({currentInputValue:p}),f.keyCode===Qc.ENTER?i.handleChange(p):f.keyCode===Qc.ARROW_UP?i.handleChange(p-1):f.keyCode===Qc.ARROW_DOWN&&i.handleChange(p+1)},i.handleBlur=function(f){var p=i.getValidValue(f);i.handleChange(p)},i.changePageSize=function(f){var p=i.state.current,g=Cu(f,i.state,i.props);p=p>g?g:p,g===0&&(p=i.state.current),typeof f=="number"&&("pageSize"in i.props||i.setState({pageSize:f}),"current"in i.props||i.setState({current:p,currentInputValue:p})),i.props.onShowSizeChange(p,f),"onChange"in i.props&&i.props.onChange&&i.props.onChange(p,f)},i.handleChange=function(f){var p=i.props,g=p.disabled,v=p.onChange,b=i.state,_=b.pageSize,T=b.current,k=b.currentInputValue;if(i.isValid(f)&&!g){var P=Cu(void 0,i.state,i.props),M=f;return f>P?M=P:f<1&&(M=1),"current"in i.props||i.setState({current:M}),M!==k&&i.setState({currentInputValue:M}),v(M,_),M}return T},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<Cu(void 0,i.state,i.props)},i.runIfEnter=function(f,p){if(f.key==="Enter"||f.charCode===13){for(var g=arguments.length,v=new Array(g>2?g-2:0),b=2;b<g;b++)v[b-2]=arguments[b];p.apply(void 0,v)}},i.runIfEnterPrev=function(f){i.runIfEnter(f,i.prev)},i.runIfEnterNext=function(f){i.runIfEnter(f,i.next)},i.runIfEnterJumpPrev=function(f){i.runIfEnter(f,i.jumpPrev)},i.runIfEnterJumpNext=function(f){i.runIfEnter(f,i.jumpNext)},i.handleGoTO=function(f){(f.keyCode===Qc.ENTER||f.type==="click")&&i.handleChange(i.state.currentInputValue)};var a=r.onChange!==K4,s="current"in r;s&&!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=r.defaultCurrent;"current"in r&&(o=r.current);var c=r.defaultPageSize;return"pageSize"in r&&(c=r.pageSize),o=Math.min(o,Cu(c,void 0,r)),i.state={current:o,currentInputValue:o,pageSize:c},i}return jr(n,[{key:"componentDidUpdate",value:function(i,a){var s=this.props.prefixCls;if(a.current!==this.state.current&&this.paginationNode){var o=this.paginationNode.querySelector(".".concat(s,"-item-").concat(a.current));o&&document.activeElement===o&&o.blur()}}},{key:"getValidValue",value:function(i){var a=i.target.value,s=Cu(void 0,this.state,this.props),o=this.state.currentInputValue,c;return a===""?c=a:isNaN(Number(a))?c=o:a>=s?c=s:c=Number(a),c}},{key:"getShowSizeChanger",value:function(){var i=this.props,a=i.showSizeChanger,s=i.total,o=i.totalBoundaryShowSizeChanger;return typeof a<"u"?a:s>o}},{key:"renderPrev",value:function(i){var a=this.props,s=a.prevIcon,o=a.itemRender,c=o(i,"prev",this.getItemIcon(s,"prev page")),f=!this.hasPrev();return E.exports.isValidElement(c)?E.exports.cloneElement(c,{disabled:f}):c}},{key:"renderNext",value:function(i){var a=this.props,s=a.nextIcon,o=a.itemRender,c=o(i,"next",this.getItemIcon(s,"next page")),f=!this.hasNext();return E.exports.isValidElement(c)?E.exports.cloneElement(c,{disabled:f}):c}},{key:"render",value:function(){var i=this,a=this.props,s=a.prefixCls,o=a.className,c=a.style,f=a.disabled,p=a.hideOnSinglePage,g=a.total,v=a.locale,b=a.showQuickJumper,_=a.showLessItems,T=a.showTitle,k=a.showTotal,P=a.simple,M=a.itemRender,O=a.showPrevNextJumpers,N=a.jumpPrevIcon,L=a.jumpNextIcon,$=a.selectComponentClass,j=a.selectPrefixCls,U=a.pageSizeOptions,G=this.state,Z=G.current,Q=G.pageSize,J=G.currentInputValue;if(p===!0&&g<=Q)return null;var re=Cu(void 0,this.state,this.props),ne=[],ge=null,ie=null,ue=null,oe=null,me=null,Te=b&&b.goButton,we=_?1:2,be=Z-1>0?Z-1:0,Re=Z+1<re?Z+1:re,Ee=Object.keys(this.props).reduce(function(yt,kt){return(kt.substr(0,5)==="data-"||kt.substr(0,5)==="aria-"||kt==="role")&&(yt[kt]=i.props[kt]),yt},{}),Me=k&&A("li",{className:"".concat(s,"-total-text"),children:k(g,[g===0?0:(Z-1)*Q+1,Z*Q>g?g:Z*Q])});if(P)return Te&&(typeof Te=="boolean"?me=A("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO,children:v.jump_to_confirm}):me=A("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO,children:Te}),me=A("li",{title:T?"".concat(v.jump_to).concat(Z,"/").concat(re):null,className:"".concat(s,"-simple-pager"),children:me})),it("ul",{className:He(s,"".concat(s,"-simple"),ae({},"".concat(s,"-disabled"),f),o),style:c,ref:this.savePaginationNode,...Ee,children:[Me,A("li",{title:T?v.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:He("".concat(s,"-prev"),ae({},"".concat(s,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev(),children:this.renderPrev(be)}),it("li",{title:T?"".concat(Z,"/").concat(re):null,className:"".concat(s,"-simple-pager"),children:[A("input",{type:"text",value:J,disabled:f,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:"3"}),A("span",{className:"".concat(s,"-slash"),children:"/"}),re]}),A("li",{title:T?v.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:He("".concat(s,"-next"),ae({},"".concat(s,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext(),children:this.renderNext(Re)}),me]});if(re<=3+we*2){var Ae={locale:v,rootPrefixCls:s,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:T,itemRender:M};re||ne.push(E.exports.createElement(um,{...Ae,key:"noPager",page:1,className:"".concat(s,"-item-disabled")}));for(var Fe=1;Fe<=re;Fe+=1){var We=Z===Fe;ne.push(E.exports.createElement(um,{...Ae,key:Fe,page:Fe,active:We}))}}else{var je=_?v.prev_3:v.prev_5,pt=_?v.next_3:v.next_5;O&&(ge=A("li",{title:T?je:null,onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:He("".concat(s,"-jump-prev"),ae({},"".concat(s,"-jump-prev-custom-icon"),!!N)),children:M(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(N,"prev page"))},"prev"),ie=A("li",{title:T?pt:null,tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:He("".concat(s,"-jump-next"),ae({},"".concat(s,"-jump-next-custom-icon"),!!L)),children:M(this.getJumpNextPage(),"jump-next",this.getItemIcon(L,"next page"))},"next")),oe=A(um,{locale:v,last:!0,rootPrefixCls:s,onClick:this.handleChange,onKeyPress:this.runIfEnter,page:re,active:!1,showTitle:T,itemRender:M},re),ue=A(um,{locale:v,rootPrefixCls:s,onClick:this.handleChange,onKeyPress:this.runIfEnter,page:1,active:!1,showTitle:T,itemRender:M},1);var gt=Math.max(1,Z-we),Ot=Math.min(Z+we,re);Z-1<=we&&(Ot=1+we*2),re-Z<=we&&(gt=re-we*2);for(var Ze=gt;Ze<=Ot;Ze+=1){var St=Z===Ze;ne.push(A(um,{locale:v,rootPrefixCls:s,onClick:this.handleChange,onKeyPress:this.runIfEnter,page:Ze,active:St,showTitle:T,itemRender:M},Ze))}Z-1>=we*2&&Z!==1+2&&(ne[0]=E.exports.cloneElement(ne[0],{className:"".concat(s,"-item-after-jump-prev")}),ne.unshift(ge)),re-Z>=we*2&&Z!==re-2&&(ne[ne.length-1]=E.exports.cloneElement(ne[ne.length-1],{className:"".concat(s,"-item-before-jump-next")}),ne.push(ie)),gt!==1&&ne.unshift(ue),Ot!==re&&ne.push(oe)}var ot=!this.hasPrev()||!re,vt=!this.hasNext()||!re;return it("ul",{className:He(s,o,ae({},"".concat(s,"-disabled"),f)),style:c,ref:this.savePaginationNode,...Ee,children:[Me,A("li",{title:T?v.prev_page:null,onClick:this.prev,tabIndex:ot?null:0,onKeyPress:this.runIfEnterPrev,className:He("".concat(s,"-prev"),ae({},"".concat(s,"-disabled"),ot)),"aria-disabled":ot,children:this.renderPrev(be)}),ne,A("li",{title:T?v.next_page:null,onClick:this.next,tabIndex:vt?null:0,onKeyPress:this.runIfEnterNext,className:He("".concat(s,"-next"),ae({},"".concat(s,"-disabled"),vt)),"aria-disabled":vt,children:this.renderNext(Re)}),A(Z8,{disabled:f,locale:v,rootPrefixCls:s,selectComponentClass:$,selectPrefixCls:j,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Z,pageSize:Q,pageSizeOptions:U,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Te})]})}}],[{key:"getDerivedStateFromProps",value:function(i,a){var s={};if("current"in i&&(s.current=i.current,i.current!==a.current&&(s.currentInputValue=s.current)),"pageSize"in i&&i.pageSize!==a.pageSize){var o=a.current,c=Cu(i.pageSize,a,i);o=o>c?c:o,"current"in i||(s.current=o,s.currentInputValue=o),s.pageSize=i.pageSize}return s}}]),n}(Un.Component);X8.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:K4,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:K4,locale:Rse,style:{},itemRender:Dse,totalBoundaryShowSizeChanger:50};var Y8=function(t){return A(jd,{...t,size:"small"})},Q8=function(t){return A(jd,{...t,size:"middle"})};Y8.Option=jd.Option;Q8.Option=jd.Option;var Ose=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Ase=function(t){var n=t.prefixCls,r=t.selectPrefixCls,i=t.className,a=t.size,s=t.locale,o=t.selectComponentClass,c=t.responsive,f=t.showSizeChanger,p=Ose(t,["prefixCls","selectPrefixCls","className","size","locale","selectComponentClass","responsive","showSizeChanger"]),g=NB(c),v=g.xs,b=E.exports.useContext(Fn),_=b.getPrefixCls,T=b.direction,k=b.pagination,P=k===void 0?{}:k,M=_("pagination",n),O=f!=null?f:P.showSizeChanger,N=function(){var $=A("span",{className:"".concat(M,"-item-ellipsis"),children:"\u2022\u2022\u2022"}),j=A("button",{className:"".concat(M,"-item-link"),type:"button",tabIndex:-1,children:A(e8,{})}),U=A("button",{className:"".concat(M,"-item-link"),type:"button",tabIndex:-1,children:A(e1,{})}),G=A("a",{className:"".concat(M,"-item-link"),children:it("div",{className:"".concat(M,"-item-container"),children:[A(Tse,{className:"".concat(M,"-item-link-icon")}),$]})}),Z=A("a",{className:"".concat(M,"-item-link"),children:it("div",{className:"".concat(M,"-item-container"),children:[A(Mse,{className:"".concat(M,"-item-link-icon")}),$]})});if(T==="rtl"){var Q=[U,j];j=Q[0],U=Q[1];var J=[Z,G];G=J[0],Z=J[1]}return{prevIcon:j,nextIcon:U,jumpPrevIcon:G,jumpNextIcon:Z}};return A(Fh,{componentName:"Pagination",defaultLocale:D6,children:function(L){var $,j=Be(Be({},L),s),U=a==="small"||!!(v&&!a&&c),G=_("select",r),Z=He(($={},ae($,"".concat(M,"-mini"),U),ae($,"".concat(M,"-rtl"),T==="rtl"),$),i);return A(X8,{...N(),...p,prefixCls:M,selectPrefixCls:G,className:Z,selectComponentClass:o||(U?Y8:Q8),locale:j,showSizeChanger:O})}})};const Nse=Ase;var Lse=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};la("small","default","large");var px=null;function Fse(e,t){var n=t.indicator,r="".concat(e,"-dot");return n===null?null:Ia(n)?Ei(n,{className:He(n.props.className,r)}):Ia(px)?Ei(px,{className:He(px.props.className,r)}):it("span",{className:He(r,"".concat(e,"-dot-spin")),children:[A("i",{className:"".concat(e,"-dot-item")}),A("i",{className:"".concat(e,"-dot-item")}),A("i",{className:"".concat(e,"-dot-item")}),A("i",{className:"".concat(e,"-dot-item")})]})}function zse(e,t){return!!e&&!!t&&!isNaN(Number(t))}var $se=function(t){var n=t.spinPrefixCls,r=t.spinning,i=r===void 0?!0:r,a=t.delay,s=t.className,o=t.size,c=o===void 0?"default":o,f=t.tip,p=t.wrapperClassName,g=t.style,v=t.children,b=Lse(t,["spinPrefixCls","spinning","delay","className","size","tip","wrapperClassName","style","children"]),_=E.exports.useState(function(){return i&&!zse(i,a)}),T=$e(_,2),k=T[0],P=T[1];E.exports.useEffect(function(){var N=Coe(function(){P(i)},a);return N(),function(){var L;(L=N==null?void 0:N.cancel)===null||L===void 0||L.call(N)}},[a,i]);var M=function(){return typeof v<"u"},O=function(L){var $,j=L.direction,U=He(n,($={},ae($,"".concat(n,"-sm"),c==="small"),ae($,"".concat(n,"-lg"),c==="large"),ae($,"".concat(n,"-spinning"),k),ae($,"".concat(n,"-show-text"),!!f),ae($,"".concat(n,"-rtl"),j==="rtl"),$),s),G=Wi(b,["indicator","prefixCls"]),Z=it("div",{...G,style:g,className:U,"aria-live":"polite","aria-busy":k,children:[Fse(n,t),f?A("div",{className:"".concat(n,"-text"),children:f}):null]});if(M()){var Q=He("".concat(n,"-container"),ae({},"".concat(n,"-blur"),k));return it("div",{...G,className:He("".concat(n,"-nested-loading"),p),children:[k&&A("div",{children:Z},"loading"),A("div",{className:Q,children:v},"container")]})}return Z};return A(Ud,{children:O})},J8=function(t){var n=t.prefixCls,r=E.exports.useContext(Fn),i=r.getPrefixCls,a=i("spin",n),s=Be(Be({},t),{spinPrefixCls:a});return A($se,{...s})};J8.setDefaultIndicator=function(e){px=e};const dv=J8;function mO(e){return!!(e&&!!e.then)}var Bse=function(t){var n=E.exports.useRef(!1),r=E.exports.useRef(null),i=Wl(!1),a=$e(i,2),s=a[0],o=a[1],c=t.close,f=function(){c==null||c.apply(void 0,arguments)};E.exports.useEffect(function(){var k=null;return t.autoFocus&&(k=setTimeout(function(){var P;(P=r.current)===null||P===void 0||P.focus()})),function(){k&&clearTimeout(k)}},[]);var p=function(P){!mO(P)||(o(!0),P.then(function(){o(!1,!0),f.apply(void 0,arguments),n.current=!1},function(M){console.error(M),o(!1,!0),n.current=!1}))},g=function(P){var M=t.actionFn;if(!n.current){if(n.current=!0,!M){f();return}var O;if(t.emitEvent){if(O=M(P),t.quitOnNullishReturnValue&&!mO(O)){n.current=!1,f(P);return}}else if(M.length)O=M(c),n.current=!1;else if(O=M(),!O){f();return}p(O)}},v=t.type,b=t.children,_=t.prefixCls,T=t.buttonProps;return A(Xr,{...u8(v),onClick:g,loading:s,prefixCls:_,...T,ref:r,children:b})};const gO=Bse;var Vse=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},W4,Use=function(t){W4={x:t.pageX,y:t.pageY},setTimeout(function(){W4=null},100)};d8()&&document.documentElement.addEventListener("click",Use,!0);var jse=function(t){var n,r,i=E.exports.useContext(Fn),a=i.getPopupContainer,s=i.getPrefixCls,o=i.direction,c=function(ne){var ge=t.onCancel;ge==null||ge(ne)},f=function(ne){var ge=t.onOk;ge==null||ge(ne)},p=t.prefixCls,g=t.footer,v=t.visible,b=t.open,_=b===void 0?!1:b,T=t.wrapClassName,k=t.centered,P=t.getContainer,M=t.closeIcon,O=t.focusTriggerAfterClose,N=O===void 0?!0:O,L=t.width,$=L===void 0?520:L,j=Vse(t,["prefixCls","footer","visible","open","wrapClassName","centered","getContainer","closeIcon","focusTriggerAfterClose","width"]),U=s("modal",p),G=s(),Z=A(Fh,{componentName:"Modal",defaultLocale:A6(),children:function(re){var ne=t.okText,ge=t.okType,ie=ge===void 0?"primary":ge,ue=t.cancelText,oe=t.confirmLoading,me=oe===void 0?!1:oe;return it(nr,{children:[A(Xr,{onClick:c,...t.cancelButtonProps,children:ue||re.cancelText}),A(Xr,{...u8(ie),loading:me,onClick:f,...t.okButtonProps,children:ne!=null?ne:re.okText})]})}}),Q=A("span",{className:"".concat(U,"-close-x"),children:M||A($h,{className:"".concat(U,"-close-icon")})}),J=He(T,(n={},ae(n,"".concat(U,"-centered"),!!k),ae(n,"".concat(U,"-wrap-rtl"),o==="rtl"),n));return A(vb,{children:A(A4,{status:!0,override:!0,children:A(jT,{width:$,...j,getContainer:P===void 0?a:P,prefixCls:U,wrapClassName:J,footer:g===void 0?Z:g,visible:_||v,mousePosition:(r=j.mousePosition)!==null&&r!==void 0?r:W4,onClose:c,closeIcon:Q,focusTriggerAfterClose:N,transitionName:Ma(G,"zoom",t.transitionName),maskTransitionName:Ma(G,"fade",t.maskTransitionName)})})})};const eV=jse;var Hse=function(t){var n=t.icon,r=t.onCancel,i=t.onOk,a=t.close,s=t.zIndex,o=t.afterClose,c=t.visible,f=t.open,p=t.keyboard,g=t.centered,v=t.getContainer,b=t.maskStyle,_=t.okText,T=t.okButtonProps,k=t.cancelText,P=t.cancelButtonProps,M=t.direction,O=t.prefixCls,N=t.wrapClassName,L=t.rootPrefixCls,$=t.iconPrefixCls,j=t.bodyStyle,U=t.closable,G=U===void 0?!1:U,Z=t.closeIcon,Q=t.modalRender,J=t.focusTriggerAfterClose,re=t.okType||"primary",ne="".concat(O,"-confirm"),ge="okCancel"in t?t.okCancel:!0,ie=t.width||416,ue=t.style||{},oe=t.mask===void 0?!0:t.mask,me=t.maskClosable===void 0?!1:t.maskClosable,Te=t.autoFocusButton===null?!1:t.autoFocusButton||"ok",we=He(ne,"".concat(ne,"-").concat(t.type),ae({},"".concat(ne,"-rtl"),M==="rtl"),t.className),be=ge&&A(gO,{actionFn:r,close:a,autoFocus:Te==="cancel",buttonProps:P,prefixCls:"".concat(L,"-btn"),children:k});return A(Bh,{prefixCls:L,iconPrefixCls:$,direction:M,children:A(eV,{prefixCls:O,className:we,wrapClassName:He(ae({},"".concat(ne,"-centered"),!!t.centered),N),onCancel:function(){return a==null?void 0:a({triggerCancel:!0})},open:f||c,title:"",footer:"",transitionName:Ma(L,"zoom",t.transitionName),maskTransitionName:Ma(L,"fade",t.maskTransitionName),mask:oe,maskClosable:me,maskStyle:b,style:ue,bodyStyle:j,width:ie,zIndex:s,afterClose:o,keyboard:p,centered:g,getContainer:v,closable:G,closeIcon:Z,modalRender:Q,focusTriggerAfterClose:J,children:it("div",{className:"".concat(ne,"-body-wrapper"),children:[it("div",{className:"".concat(ne,"-body"),children:[n,t.title===void 0?null:A("span",{className:"".concat(ne,"-title"),children:t.title}),A("div",{className:"".concat(ne,"-content"),children:t.content})]}),it("div",{className:"".concat(ne,"-btns"),children:[be,A(gO,{type:re,actionFn:i,close:a,autoFocus:Te==="ok",buttonProps:T,prefixCls:"".concat(L,"-btn"),children:_})]})]})})})};const tV=Hse;var Kse=[];const Gf=Kse;var Wse=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},nV="";function Gse(){return nV}function fv(e){var t=document.createDocumentFragment(),n=Be(Be({},e),{close:s,open:!0}),r;function i(){for(var c=arguments.length,f=new Array(c),p=0;p<c;p++)f[p]=arguments[p];var g=f.some(function(_){return _&&_.triggerCancel});e.onCancel&&g&&e.onCancel.apply(e,[function(){}].concat(Rt(f.slice(1))));for(var v=0;v<Gf.length;v++){var b=Gf[v];if(b===s){Gf.splice(v,1);break}}e$(t)}function a(c){var f=c.okText,p=c.cancelText,g=c.prefixCls,v=Wse(c,["okText","cancelText","prefixCls"]);clearTimeout(r),r=setTimeout(function(){var b=A6(),_=cT(),T=_.getPrefixCls,k=_.getIconPrefixCls,P=T(void 0,Gse()),M=g||"".concat(P,"-modal"),O=k();J6(A(tV,{...v,prefixCls:M,rootPrefixCls:P,iconPrefixCls:O,okText:f||(v.okCancel?b.okText:b.justOkText),cancelText:p||b.cancelText}),t)})}function s(){for(var c=this,f=arguments.length,p=new Array(f),g=0;g<f;g++)p[g]=arguments[g];n=Be(Be({},n),{open:!1,afterClose:function(){typeof e.afterClose=="function"&&e.afterClose(),i.apply(c,p)}}),n.visible&&delete n.visible,a(n)}function o(c){typeof c=="function"?n=c(n):n=Be(Be({},n),c),a(n)}return a(n),Gf.push(s),{destroy:s,update:o}}function rV(e){return Be(Be({icon:A(H_,{}),okCancel:!1},e),{type:"warning"})}function iV(e){return Be(Be({icon:A(uT,{}),okCancel:!1},e),{type:"info"})}function oV(e){return Be(Be({icon:A(sT,{}),okCancel:!1},e),{type:"success"})}function aV(e){return Be(Be({icon:A(lT,{}),okCancel:!1},e),{type:"error"})}function sV(e){return Be(Be({icon:A(H_,{}),okCancel:!0},e),{type:"confirm"})}function qse(e){var t=e.rootPrefixCls;nV=t}function Zse(){var e=E.exports.useState([]),t=$e(e,2),n=t[0],r=t[1],i=E.exports.useCallback(function(a){return r(function(s){return[].concat(Rt(s),[a])}),function(){r(function(s){return s.filter(function(o){return o!==a})})}},[]);return[n,i]}var Xse=function(t,n){var r=t.afterClose,i=t.config,a=E.exports.useState(!0),s=$e(a,2),o=s[0],c=s[1],f=E.exports.useState(i),p=$e(f,2),g=p[0],v=p[1],b=E.exports.useContext(Fn),_=b.direction,T=b.getPrefixCls,k=T("modal"),P=T(),M=function(){c(!1);for(var N=arguments.length,L=new Array(N),$=0;$<N;$++)L[$]=arguments[$];var j=L.some(function(U){return U&&U.triggerCancel});g.onCancel&&j&&g.onCancel.apply(g,[function(){}].concat(Rt(L.slice(1))))};return E.exports.useImperativeHandle(n,function(){return{destroy:M,update:function(N){v(function(L){return Be(Be({},L),N)})}}}),A(Fh,{componentName:"Modal",defaultLocale:Os.Modal,children:function(O){return A(tV,{prefixCls:k,rootPrefixCls:P,...g,close:M,open:o,afterClose:r,okText:g.okText||(g.okCancel?O.okText:O.justOkText),direction:_,cancelText:g.cancelText||O.cancelText})}})};const Yse=E.exports.forwardRef(Xse);var vO=0,Qse=E.exports.memo(E.exports.forwardRef(function(e,t){var n=Zse(),r=$e(n,2),i=r[0],a=r[1];return E.exports.useImperativeHandle(t,function(){return{patchElement:a}},[]),A(nr,{children:i})}));function Jse(){var e=E.exports.useRef(null),t=E.exports.useState([]),n=$e(t,2),r=n[0],i=n[1];E.exports.useEffect(function(){if(r.length){var o=Rt(r);o.forEach(function(c){c()}),i([])}},[r]);var a=E.exports.useCallback(function(o){return function(f){var p;vO+=1;var g=E.exports.createRef(),v,b=A(Yse,{config:o(f),ref:g,afterClose:function(){v==null||v()}},"modal-".concat(vO));return v=(p=e.current)===null||p===void 0?void 0:p.patchElement(b),{destroy:function(){function T(){var k;(k=g.current)===null||k===void 0||k.destroy()}g.current?T():i(function(k){return[].concat(Rt(k),[T])})},update:function(T){function k(){var P;(P=g.current)===null||P===void 0||P.update(T)}g.current?k():i(function(P){return[].concat(Rt(P),[k])})}}}},[]),s=E.exports.useMemo(function(){return{info:a(iV),success:a(oV),error:a(aV),warning:a(rV),confirm:a(sV)}},[]);return[s,A(Qse,{ref:e})]}function lV(e){return fv(rV(e))}var fl=eV;fl.useModal=Jse;fl.info=function(t){return fv(iV(t))};fl.success=function(t){return fv(oV(t))};fl.error=function(t){return fv(aV(t))};fl.warning=lV;fl.warn=lV;fl.confirm=function(t){return fv(sV(t))};fl.destroyAll=function(){for(;Gf.length;){var t=Gf.pop();t&&t()}};fl.config=qse;const uV=fl;var ele=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},tle={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-block"},nle=E.exports.forwardRef(function(e,t){var n=function(p){var g=p.keyCode;g===Tt.ENTER&&p.preventDefault()},r=function(p){var g=p.keyCode,v=e.onClick;g===Tt.ENTER&&v&&v()},i=e.style,a=e.noStyle,s=e.disabled,o=ele(e,["style","noStyle","disabled"]),c={};return a||(c=Be({},tle)),s&&(c.pointerEvents="none"),c=Be(Be({},c),i),A("div",{role:"button",tabIndex:0,ref:t,...o,onKeyDown:n,onKeyUp:r,style:c})});const yO=nle;var rle={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},ile=function(){var t=E.exports.useRef([]),n=E.exports.useRef(null);return E.exports.useEffect(function(){var r=Date.now(),i=!1;t.current.forEach(function(a){if(!!a){i=!0;var s=a.style;s.transitionDuration=".3s, .3s, .3s, .06s",n.current&&r-n.current<100&&(s.transitionDuration="0s, 0s")}}),i&&(n.current=Date.now())}),t.current},xO=0,ole=ko();function ale(){var e;return ole?(e=xO,xO+=1):e="TEST_OR_SSR",e}const sle=function(e){var t=E.exports.useState(),n=$e(t,2),r=n[0],i=n[1];return E.exports.useEffect(function(){i("rc_progress_".concat(ale()))},[]),e||r};var lle=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function bO(e){return+e.replace("%","")}function _O(e){var t=e!=null?e:[];return Array.isArray(t)?t:[t]}var cm=100,rS=function(t,n,r,i,a,s,o,c,f,p){var g=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,v=r/100*360*((360-s)/360),b=s===0?0:{bottom:0,top:180,left:90,right:-90}[o],_=(100-i)/100*n;return f==="round"&&i!==100&&(_+=p/2,_>=n&&(_=n-.01)),{stroke:typeof c=="string"?c:void 0,strokeDasharray:"".concat(n,"px ").concat(t),strokeDashoffset:_+g,transform:"rotate(".concat(a+v+b,"deg)"),transformOrigin:"0 0",transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},WT=function(t){var n=t.id,r=t.prefixCls,i=t.steps,a=t.strokeWidth,s=t.trailWidth,o=t.gapDegree,c=o===void 0?0:o,f=t.gapPosition,p=t.trailColor,g=t.strokeLinecap,v=t.style,b=t.className,_=t.strokeColor,T=t.percent,k=In(t,lle),P=sle(n),M="".concat(P,"-gradient"),O=cm/2-a/2,N=Math.PI*2*O,L=c>0?90+c/2:-90,$=N*((360-c)/360),j=on(i)==="object"?i:{count:i,space:2},U=j.count,G=j.space,Z=rS(N,$,0,100,L,c,f,p,g,a),Q=_O(T),J=_O(_),re=J.find(function(ue){return ue&&on(ue)==="object"}),ne=ile(),ge=function(){var oe=0;return Q.map(function(me,Te){var we=J[Te]||J[J.length-1],be=we&&on(we)==="object"?"url(#".concat(M,")"):void 0,Re=rS(N,$,oe,me,L,c,f,we,g,a);return oe+=me,A("circle",{className:"".concat(r,"-circle-path"),r:O,cx:0,cy:0,stroke:be,strokeLinecap:g,strokeWidth:a,opacity:me===0?0:1,style:Re,ref:function(Me){ne[Te]=Me}},Te)}).reverse()},ie=function(){var oe=Math.round(U*(Q[0]/100)),me=100/U,Te=0;return new Array(U).fill(null).map(function(we,be){var Re=be<=oe-1?J[0]:p,Ee=Re&&on(Re)==="object"?"url(#".concat(M,")"):void 0,Me=rS(N,$,Te,me,L,c,f,Re,"butt",a,G);return Te+=($-Me.strokeDashoffset+G)*100/$,A("circle",{className:"".concat(r,"-circle-path"),r:O,cx:0,cy:0,stroke:Ee,strokeWidth:a,opacity:1,style:Me,ref:function(Fe){ne[be]=Fe}},be)})};return it("svg",{className:He("".concat(r,"-circle"),b),viewBox:"".concat(-cm/2," ").concat(-cm/2," ").concat(cm," ").concat(cm),style:v,id:n,role:"presentation",...k,children:[re&&A("defs",{children:A("linearGradient",{id:M,x1:"100%",y1:"0%",x2:"0%",y2:"0%",children:Object.keys(re).sort(function(ue,oe){return bO(ue)-bO(oe)}).map(function(ue,oe){return A("stop",{offset:ue,stopColor:re[ue]},oe)})})}),!U&&A("circle",{className:"".concat(r,"-circle-trail"),r:O,cx:0,cy:0,stroke:p,strokeLinecap:g,strokeWidth:s||a,style:Z}),U?ie():ge()]})};WT.defaultProps=rle;WT.displayName="Circle";function bd(e){return!e||e<0?0:e>100?100:e}function kb(e){var t=e.success,n=e.successPercent,r=n;return t&&"progress"in t&&(r=t.progress),t&&"percent"in t&&(r=t.percent),r}function ule(e){var t=e.percent,n=e.success,r=e.successPercent,i=bd(kb({success:n,successPercent:r}));return[i,bd(bd(t)-i)]}function cle(e){var t=e.success,n=t===void 0?{}:t,r=e.strokeColor,i=n.strokeColor;return[i||nh.green,r||null]}var dle=function(t){var n=t.prefixCls,r=t.width,i=t.strokeWidth,a=t.trailColor,s=a===void 0?null:a,o=t.strokeLinecap,c=o===void 0?"round":o,f=t.gapPosition,p=t.gapDegree,g=t.type,v=t.children,b=t.success,_=r||120,T={width:_,height:_,fontSize:_*.15+6},k=i||6,P=f||g==="dashboard"&&"bottom"||void 0,M=function(){if(p||p===0)return p;if(g==="dashboard")return 75},O=Object.prototype.toString.call(t.strokeColor)==="[object Object]",N=cle({success:b,strokeColor:t.strokeColor}),L=He("".concat(n,"-inner"),ae({},"".concat(n,"-circle-gradient"),O));return it("div",{className:L,style:T,children:[A(WT,{percent:ule(t),strokeWidth:k,trailWidth:k,strokeColor:N,strokeLinecap:c,trailColor:s,prefixCls:n,gapDegree:M(),gapPosition:P}),v]})};const fle=dle;var hle=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},ple=function(t){var n=[];return Object.keys(t).forEach(function(r){var i=parseFloat(r.replace(/%/g,""));isNaN(i)||n.push({key:i,value:t[r]})}),n=n.sort(function(r,i){return r.key-i.key}),n.map(function(r){var i=r.key,a=r.value;return"".concat(a," ").concat(i,"%")}).join(", ")},mle=function(t,n){var r=t.from,i=r===void 0?nh.blue:r,a=t.to,s=a===void 0?nh.blue:a,o=t.direction,c=o===void 0?n==="rtl"?"to left":"to right":o,f=hle(t,["from","to","direction"]);if(Object.keys(f).length!==0){var p=ple(f);return{backgroundImage:"linear-gradient(".concat(c,", ").concat(p,")")}}return{backgroundImage:"linear-gradient(".concat(c,", ").concat(i,", ").concat(s,")")}},gle=function(t){var n=t.prefixCls,r=t.direction,i=t.percent,a=t.strokeWidth,s=t.size,o=t.strokeColor,c=t.strokeLinecap,f=c===void 0?"round":c,p=t.children,g=t.trailColor,v=g===void 0?null:g,b=t.success,_=o&&typeof o!="string"?mle(o,r):{background:o},T=f==="square"||f==="butt"?0:void 0,k={backgroundColor:v||void 0,borderRadius:T},P=Be({width:"".concat(bd(i),"%"),height:a||(s==="small"?6:8),borderRadius:T},_),M=kb(t),O={width:"".concat(bd(M),"%"),height:a||(s==="small"?6:8),borderRadius:T,backgroundColor:b==null?void 0:b.strokeColor},N=M!==void 0?A("div",{className:"".concat(n,"-success-bg"),style:O}):null;return it(nr,{children:[A("div",{className:"".concat(n,"-outer"),children:it("div",{className:"".concat(n,"-inner"),style:k,children:[A("div",{className:"".concat(n,"-bg"),style:P}),N]})}),p]})};const vle=gle;var yle=function(t){for(var n=t.size,r=t.steps,i=t.percent,a=i===void 0?0:i,s=t.strokeWidth,o=s===void 0?8:s,c=t.strokeColor,f=t.trailColor,p=f===void 0?null:f,g=t.prefixCls,v=t.children,b=Math.round(r*(a/100)),_=n==="small"?2:14,T=new Array(r),k=0;k<r;k++){var P=Array.isArray(c)?c[k]:c;T[k]=A("div",{className:He("".concat(g,"-steps-item"),ae({},"".concat(g,"-steps-item-active"),k<=b-1)),style:{backgroundColor:k<=b-1?P:p,width:_,height:o}},k)}return it("div",{className:"".concat(g,"-steps-outer"),children:[T,v]})};const xle=yle;var ble=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};la("line","circle","dashboard");var _le=la("normal","exception","active","success"),wle=function(t){var n,r=t.prefixCls,i=t.className,a=t.steps,s=t.strokeColor,o=t.percent,c=o===void 0?0:o,f=t.size,p=f===void 0?"default":f,g=t.showInfo,v=g===void 0?!0:g,b=t.type,_=b===void 0?"line":b,T=ble(t,["prefixCls","className","steps","strokeColor","percent","size","showInfo","type"]);function k(){var re=kb(t);return parseInt(re!==void 0?re.toString():c.toString(),10)}function P(){var re=t.status;return!_le.includes(re)&&k()>=100?"success":re||"normal"}function M(re,ne){var ge=t.format,ie=kb(t);if(!v)return null;var ue,oe=ge||function(Te){return"".concat(Te,"%")},me=_==="line";return ge||ne!=="exception"&&ne!=="success"?ue=oe(bd(c),bd(ie)):ne==="exception"?ue=me?A(zh,{}):A($h,{}):ne==="success"&&(ue=me?A(nT,{}):A(ET,{})),A("span",{className:"".concat(re,"-text"),title:typeof ue=="string"?ue:void 0,children:ue})}var O=E.exports.useContext(Fn),N=O.getPrefixCls,L=O.direction,$=N("progress",r),j=P(),U=M($,j),G=Array.isArray(s)?s[0]:s,Z=typeof s=="string"||Array.isArray(s)?s:void 0,Q;_==="line"?Q=a?A(xle,{...t,strokeColor:Z,prefixCls:$,steps:a,children:U}):A(vle,{...t,strokeColor:G,prefixCls:$,direction:L,children:U}):(_==="circle"||_==="dashboard")&&(Q=A(fle,{...t,strokeColor:G,prefixCls:$,progressStatus:j,children:U}));var J=He($,(n={},ae(n,"".concat($,"-").concat(_==="dashboard"&&"circle"||a&&"steps"||_),!0),ae(n,"".concat($,"-status-").concat(j),!0),ae(n,"".concat($,"-show-info"),v),ae(n,"".concat($,"-").concat(p),p),ae(n,"".concat($,"-rtl"),L==="rtl"),n),i);return A("div",{...Wi(T,["status","format","trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"]),className:J,role:"progressbar",children:Q})};const GT=wle;var Hd=E.exports.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0});function G4(e,t,n){return(e-t)/(n-t)}function qT(e,t,n,r){var i=G4(t,n,r),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 qf(e,t){return Array.isArray(e)?e[t]:e}var Cle=["prefixCls","value","valueIndex","onStartMove","style","render","dragging","onOffsetChange"],Sle=E.exports.forwardRef(function(e,t){var n,r,i=e.prefixCls,a=e.value,s=e.valueIndex,o=e.onStartMove,c=e.style,f=e.render,p=e.dragging,g=e.onOffsetChange,v=In(e,Cle),b=E.exports.useContext(Hd),_=b.min,T=b.max,k=b.direction,P=b.disabled,M=b.range,O=b.tabIndex,N=b.ariaLabelForHandle,L=b.ariaLabelledByForHandle,$=b.ariaValueTextFormatterForHandle,j="".concat(i,"-handle"),U=function(re){P||o(re,s)},G=function(re){if(!P){var ne=null;switch(re.which||re.keyCode){case Tt.LEFT:ne=k==="ltr"||k==="btt"?-1:1;break;case Tt.RIGHT:ne=k==="ltr"||k==="btt"?1:-1;break;case Tt.UP:ne=k!=="ttb"?1:-1;break;case Tt.DOWN:ne=k!=="ttb"?-1:1;break;case Tt.HOME:ne="min";break;case Tt.END:ne="max";break;case Tt.PAGE_UP:ne=2;break;case Tt.PAGE_DOWN:ne=-2;break}ne!==null&&(re.preventDefault(),g(ne,s))}},Z=qT(k,a,_,T),Q=A("div",{ref:t,className:He(j,(n={},ae(n,"".concat(j,"-").concat(s+1),M),ae(n,"".concat(j,"-dragging"),p),n)),style:fe(fe({},Z),c),onMouseDown:U,onTouchStart:U,onKeyDown:G,tabIndex:P?null:qf(O,s),role:"slider","aria-valuemin":_,"aria-valuemax":T,"aria-valuenow":a,"aria-disabled":P,"aria-label":qf(N,s),"aria-labelledby":qf(L,s),"aria-valuetext":(r=qf($,s))===null||r===void 0?void 0:r(a),...v});return f&&(Q=f(Q,{index:s,prefixCls:i,value:a,dragging:p})),Q}),Ele=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","draggingIndex"],Ple=E.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.style,i=e.onStartMove,a=e.onOffsetChange,s=e.values,o=e.handleRender,c=e.draggingIndex,f=In(e,Ele),p=E.exports.useRef({});return E.exports.useImperativeHandle(t,function(){return{focus:function(v){var b;(b=p.current[v])===null||b===void 0||b.focus()}}}),A(nr,{children:s.map(function(g,v){return A(Sle,{ref:function(_){_?p.current[v]=_:delete p.current[v]},dragging:c===v,prefixCls:n,style:qf(r,v),value:g,valueIndex:v,onStartMove:i,onOffsetChange:a,render:o,...f},v)})})});function wO(e){var t="touches"in e?e.touches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function Tle(e,t,n,r,i,a,s,o,c){var f=E.exports.useState(null),p=$e(f,2),g=p[0],v=p[1],b=E.exports.useState(-1),_=$e(b,2),T=_[0],k=_[1],P=E.exports.useState(n),M=$e(P,2),O=M[0],N=M[1],L=E.exports.useState(n),$=$e(L,2),j=$[0],U=$[1],G=E.exports.useRef(null),Z=E.exports.useRef(null);E.exports.useEffect(function(){T===-1&&N(n)},[n,T]),E.exports.useEffect(function(){return function(){document.removeEventListener("mousemove",G.current),document.removeEventListener("mouseup",Z.current),document.removeEventListener("touchmove",G.current),document.removeEventListener("touchend",Z.current)}},[]);var Q=function(ue,oe){O.some(function(me,Te){return me!==ue[Te]})&&(oe!==void 0&&v(oe),N(ue),s(ue))},J=function(ue,oe){if(ue===-1){var me=j[0],Te=j[j.length-1],we=r-me,be=i-Te,Re=oe*(i-r);Re=Math.max(Re,we),Re=Math.min(Re,be);var Ee=a(me+Re);Re=Ee-me;var Me=j.map(function(je){return je+Re});Q(Me)}else{var Ae=(i-r)*oe,Fe=Rt(O);Fe[ue]=j[ue];var We=c(Fe,Ae,ue,"dist");Q(We.values,We.value)}},re=E.exports.useRef(J);re.current=J;var ne=function(ue,oe){ue.stopPropagation();var me=n[oe];k(oe),v(me),U(n);var Te=wO(ue),we=Te.pageX,be=Te.pageY,Re=function(Ae){Ae.preventDefault();var Fe=wO(Ae),We=Fe.pageX,je=Fe.pageY,pt=We-we,gt=je-be,Ot=e.current.getBoundingClientRect(),Ze=Ot.width,St=Ot.height,ot;switch(t){case"btt":ot=-gt/St;break;case"ttb":ot=gt/St;break;case"rtl":ot=-pt/Ze;break;default:ot=pt/Ze}re.current(oe,ot)},Ee=function Me(Ae){Ae.preventDefault(),document.removeEventListener("mouseup",Me),document.removeEventListener("mousemove",Re),document.removeEventListener("touchend",Me),document.removeEventListener("touchmove",Re),G.current=null,Z.current=null,k(-1),o()};document.addEventListener("mouseup",Ee),document.addEventListener("mousemove",Re),document.addEventListener("touchend",Ee),document.addEventListener("touchmove",Re),G.current=Re,Z.current=Ee},ge=E.exports.useMemo(function(){var ie=Rt(n).sort(function(oe,me){return oe-me}),ue=Rt(O).sort(function(oe,me){return oe-me});return ie.every(function(oe,me){return oe===ue[me]})?O:n},[n,O]);return[T,g,ge,ne]}function kle(e){var t=e.prefixCls,n=e.style,r=e.start,i=e.end,a=e.index,s=e.onStartMove,o=E.exports.useContext(Hd),c=o.direction,f=o.min,p=o.max,g=o.disabled,v=o.range,b="".concat(t,"-track"),_=G4(r,f,p),T=G4(i,f,p),k=function(O){!g&&s&&s(O,-1)},P={};switch(c){case"rtl":P.right="".concat(_*100,"%"),P.width="".concat(T*100-_*100,"%");break;case"btt":P.bottom="".concat(_*100,"%"),P.height="".concat(T*100-_*100,"%");break;case"ttb":P.top="".concat(_*100,"%"),P.height="".concat(T*100-_*100,"%");break;default:P.left="".concat(_*100,"%"),P.width="".concat(T*100-_*100,"%")}return A("div",{className:He(b,v&&"".concat(b,"-").concat(a+1)),style:fe(fe({},P),n),onMouseDown:k,onTouchStart:k})}function Ile(e){var t=e.prefixCls,n=e.style,r=e.values,i=e.startPoint,a=e.onStartMove,s=E.exports.useContext(Hd),o=s.included,c=s.range,f=s.min,p=E.exports.useMemo(function(){if(!c){if(r.length===0)return[];var g=i!=null?i:f,v=r[0];return[{start:Math.min(g,v),end:Math.max(g,v)}]}for(var b=[],_=0;_<r.length-1;_+=1)b.push({start:r[_],end:r[_+1]});return b},[r,c,i,f]);return o?p.map(function(g,v){var b=g.start,_=g.end;return A(kle,{index:v,prefixCls:t,style:qf(n,v),start:b,end:_,onStartMove:a},v)}):null}function Mle(e){var t=e.prefixCls,n=e.style,r=e.children,i=e.value,a=e.onClick,s=E.exports.useContext(Hd),o=s.min,c=s.max,f=s.direction,p=s.includedStart,g=s.includedEnd,v=s.included,b="".concat(t,"-text"),_=qT(f,i,o,c);return A("span",{className:He(b,ae({},"".concat(b,"-active"),v&&p<=i&&i<=g)),style:fe(fe({},_),n),onMouseDown:function(k){k.stopPropagation()},onClick:function(){a(i)},children:r})}function Rle(e){var t=e.prefixCls,n=e.marks,r=e.onClick,i="".concat(t,"-mark");return n.length?A("div",{className:i,children:n.map(function(a){var s=a.value,o=a.style,c=a.label;return A(Mle,{prefixCls:i,style:o,value:s,onClick:r,children:c},s)})}):null}function Dle(e){var t=e.prefixCls,n=e.value,r=e.style,i=e.activeStyle,a=E.exports.useContext(Hd),s=a.min,o=a.max,c=a.direction,f=a.included,p=a.includedStart,g=a.includedEnd,v="".concat(t,"-dot"),b=f&&p<=n&&n<=g,_=fe(fe({},qT(c,n,s,o)),typeof r=="function"?r(n):r);return b&&(_=fe(fe({},_),typeof i=="function"?i(n):i)),A("span",{className:He(v,ae({},"".concat(v,"-active"),b)),style:_})}function Ole(e){var t=e.prefixCls,n=e.marks,r=e.dots,i=e.style,a=e.activeStyle,s=E.exports.useContext(Hd),o=s.min,c=s.max,f=s.step,p=E.exports.useMemo(function(){var g=new Set;if(n.forEach(function(b){g.add(b.value)}),r&&f!==null)for(var v=o;v<=c;)g.add(v),v+=f;return Array.from(g)},[o,c,f,r,n]);return A("div",{className:"".concat(t,"-step"),children:p.map(function(g){return A(Dle,{prefixCls:t,value:g,style:i,activeStyle:a},g)})})}function Ale(e,t,n,r,i,a){var s=E.exports.useCallback(function(b){var _=isFinite(b)?b:e;return _=Math.min(t,b),_=Math.max(e,_),_},[e,t]),o=E.exports.useCallback(function(b){if(n!==null){var _=e+Math.round((s(b)-e)/n)*n,T=function(O){return(String(O).split(".")[1]||"").length},k=Math.max(T(n),T(t),T(e)),P=Number(_.toFixed(k));return e<=P&&P<=t?P:null}return null},[n,e,t,s]),c=E.exports.useCallback(function(b){var _=s(b),T=r.map(function(M){return M.value});n!==null&&T.push(o(b)),T.push(e,t);var k=T[0],P=t-e;return T.forEach(function(M){var O=Math.abs(_-M);O<=P&&(k=M,P=O)}),k},[e,t,r,n,s,o]),f=function b(_,T,k){var P=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof T=="number"){var M,O=_[k],N=O+T,L=[];r.forEach(function(Z){L.push(Z.value)}),L.push(e,t),L.push(o(O));var $=T>0?1:-1;P==="unit"?L.push(o(O+$*n)):L.push(o(N)),L=L.filter(function(Z){return Z!==null}).filter(function(Z){return T<0?Z<=O:Z>=O}),P==="unit"&&(L=L.filter(function(Z){return Z!==O}));var j=P==="unit"?O:N;M=L[0];var U=Math.abs(M-j);if(L.forEach(function(Z){var Q=Math.abs(Z-j);Q<U&&(M=Z,U=Q)}),M===void 0)return T<0?e:t;if(P==="dist")return M;if(Math.abs(T)>1){var G=Rt(_);return G[k]=M,b(G,T-$,k,P)}return M}else{if(T==="min")return e;if(T==="max")return t}},p=function(_,T,k){var P=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",M=_[k],O=f(_,T,k,P);return{value:O,changed:O!==M}},g=function(_){return a===null&&_===0||typeof a=="number"&&_<a},v=function(_,T,k){var P=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",M=_.map(c),O=M[k],N=f(M,T,k,P);if(M[k]=N,i===!1){var L=a||0;k>0&&M[k-1]!==O&&(M[k]=Math.max(M[k],M[k-1]+L)),k<M.length-1&&M[k+1]!==O&&(M[k]=Math.min(M[k],M[k+1]-L))}else if(typeof a=="number"||a===null){for(var $=k+1;$<M.length;$+=1)for(var j=!0;g(M[$]-M[$-1])&&j;){var U=p(M,1,$);M[$]=U.value,j=U.changed}for(var G=k;G>0;G-=1)for(var Z=!0;g(M[G]-M[G-1])&&Z;){var Q=p(M,-1,G-1);M[G-1]=Q.value,Z=Q.changed}for(var J=M.length-1;J>0;J-=1)for(var re=!0;g(M[J]-M[J-1])&&re;){var ne=p(M,-1,J-1);M[J-1]=ne.value,re=ne.changed}for(var ge=0;ge<M.length-1;ge+=1)for(var ie=!0;g(M[ge+1]-M[ge])&&ie;){var ue=p(M,1,ge+1);M[ge+1]=ue.value,ie=ue.changed}}return{value:M[k],values:M}};return[c,v]}var Nle=E.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=r===void 0?"rc-slider":r,a=e.className,s=e.style,o=e.disabled,c=o===void 0?!1:o,f=e.autoFocus,p=e.onFocus,g=e.onBlur,v=e.min,b=v===void 0?0:v,_=e.max,T=_===void 0?100:_,k=e.step,P=k===void 0?1:k,M=e.value,O=e.defaultValue,N=e.range,L=e.count,$=e.onChange,j=e.onBeforeChange,U=e.onAfterChange,G=e.allowCross,Z=G===void 0?!0:G,Q=e.pushable,J=Q===void 0?!1:Q,re=e.draggableTrack,ne=e.reverse,ge=e.vertical,ie=e.included,ue=ie===void 0?!0:ie,oe=e.startPoint,me=e.trackStyle,Te=e.handleStyle,we=e.railStyle,be=e.dotStyle,Re=e.activeDotStyle,Ee=e.marks,Me=e.dots,Ae=e.handleRender,Fe=e.tabIndex,We=Fe===void 0?0:Fe,je=e.ariaLabelForHandle,pt=e.ariaLabelledByForHandle,gt=e.ariaValueTextFormatterForHandle,Ot=E.exports.useRef(),Ze=E.exports.useRef(),St=E.exports.useMemo(function(){return ge?ne?"ttb":"btt":ne?"rtl":"ltr"},[ne,ge]),ot=E.exports.useMemo(function(){return isFinite(b)?b:0},[b]),vt=E.exports.useMemo(function(){return isFinite(T)?T:100},[T]),yt=E.exports.useMemo(function(){return P!==null&&P<=0?1:P},[P]),kt=E.exports.useMemo(function(){return J===!0?yt:J>=0?J:!1},[J,yt]),et=E.exports.useMemo(function(){var ye=Object.keys(Ee||{});return ye.map(function(W){var X=Ee[W],de={value:Number(W)};return X&&on(X)==="object"&&!E.exports.isValidElement(X)&&("label"in X||"style"in X)?(de.style=X.style,de.label=X.label):de.label=X,de}).filter(function(W){var X=W.label;return X||typeof X=="number"}).sort(function(W,X){return W.value-X.value})},[Ee]),ut=Ale(ot,vt,yt,et,Z,kt),at=$e(ut,2),Ke=at[0],ct=at[1],bt=Si(O,{value:M}),At=$e(bt,2),Lt=At[0],Ht=At[1],ze=E.exports.useMemo(function(){var ye=Lt==null?[]:Array.isArray(Lt)?Lt:[Lt],W=$e(ye,1),X=W[0],de=X===void 0?ot:X,le=Lt===null?[]:[de];if(N){if(le=Rt(ye),L||Lt===void 0){var xe=L>=0?L+1:2;for(le=le.slice(0,xe);le.length<xe;){var Ie;le.push((Ie=le[le.length-1])!==null&&Ie!==void 0?Ie:ot)}}le.sort(function(Ce,Pe){return Ce-Pe})}return le.forEach(function(Ce,Pe){le[Pe]=Ke(Ce)}),le},[Lt,N,ot,L,Ke]),Qe=E.exports.useRef(ze);Qe.current=ze;var Zt=function(W){return N?W:W[0]},an=function(W){var X=Rt(W).sort(function(de,le){return de-le});$&&!Md(X,Qe.current)&&$(Zt(X)),Ht(X)},Kt=function(W){if(!c){var X=0,de=vt-ot;ze.forEach(function(xe,Ie){var Ce=Math.abs(W-xe);Ce<=de&&(de=Ce,X=Ie)});var le=Rt(ze);le[X]=W,N&&!ze.length&&L===void 0&&le.push(W),j==null||j(Zt(le)),an(le),U==null||U(Zt(le))}},Vt=function(W){W.preventDefault();var X=Ze.current.getBoundingClientRect(),de=X.width,le=X.height,xe=X.left,Ie=X.top,Ce=X.bottom,Pe=X.right,Le=W.clientX,Xe=W.clientY,Ye;switch(St){case"btt":Ye=(Ce-Xe)/le;break;case"ttb":Ye=(Xe-Ie)/le;break;case"rtl":Ye=(Pe-Le)/de;break;default:Ye=(Le-xe)/de}var Ue=ot+Ye*(vt-ot);Kt(Ke(Ue))},It=E.exports.useState(null),Xt=$e(It,2),pn=Xt[0],tt=Xt[1],Nt=function(W,X){if(!c){var de=ct(ze,W,X);j==null||j(Zt(ze)),an(de.values),U==null||U(Zt(de.values)),tt(de.value)}};E.exports.useEffect(function(){if(pn!==null){var ye=ze.indexOf(pn);ye>=0&&Ot.current.focus(ye)}tt(null)},[pn]);var qt=E.exports.useMemo(function(){return re&&yt===null?!1:re},[re,yt]),En=function(){U==null||U(Zt(Qe.current))},yn=Tle(Ze,St,ze,ot,vt,Ke,an,En,ct),Et=$e(yn,4),Pn=Et[0],_n=Et[1],tn=Et[2],zt=Et[3],dt=function(W,X){zt(W,X),j==null||j(Zt(Qe.current))},mt=Pn!==-1;E.exports.useEffect(function(){if(!mt){var ye=ze.lastIndexOf(_n);Ot.current.focus(ye)}},[mt]);var $t=E.exports.useMemo(function(){return Rt(tn).sort(function(ye,W){return ye-W})},[tn]),Wt=E.exports.useMemo(function(){return N?[$t[0],$t[$t.length-1]]:[ot,$t[0]]},[$t,N,ot]),mn=$e(Wt,2),An=mn[0],Qn=mn[1];E.exports.useImperativeHandle(t,function(){return{focus:function(){Ot.current.focus(0)},blur:function(){var W=document,X=W.activeElement;Ze.current.contains(X)&&(X==null||X.blur())}}}),E.exports.useEffect(function(){f&&Ot.current.focus(0)},[]);var Jn=E.exports.useMemo(function(){return{min:ot,max:vt,direction:St,disabled:c,step:yt,included:ue,includedStart:An,includedEnd:Qn,range:N,tabIndex:We,ariaLabelForHandle:je,ariaLabelledByForHandle:pt,ariaValueTextFormatterForHandle:gt}},[ot,vt,St,c,yt,ue,An,Qn,N,We,je,pt,gt]);return A(Hd.Provider,{value:Jn,children:it("div",{ref:Ze,className:He(i,a,(n={},ae(n,"".concat(i,"-disabled"),c),ae(n,"".concat(i,"-vertical"),ge),ae(n,"".concat(i,"-horizontal"),!ge),ae(n,"".concat(i,"-with-marks"),et.length),n)),style:s,onMouseDown:Vt,children:[A("div",{className:"".concat(i,"-rail"),style:we}),A(Ile,{prefixCls:i,style:me,values:$t,startPoint:oe,onStartMove:qt?dt:null}),A(Ole,{prefixCls:i,marks:et,dots:Me,style:be,activeStyle:Re}),A(Ple,{ref:Ot,prefixCls:i,style:Te,values:tn,draggingIndex:Pn,onStartMove:dt,onOffsetChange:Nt,onFocus:p,onBlur:g,handleRender:Ae}),A(Rle,{prefixCls:i,marks:et,onClick:Kt})]})})}),Lle=E.exports.forwardRef(function(e,t){var n=e.open,r=E.exports.useRef(null),i=E.exports.useRef(null);function a(){ur.cancel(i.current),i.current=null}function s(){i.current=ur(function(){var o;(o=r.current)===null||o===void 0||o.forcePopupAlign(),i.current=null})}return E.exports.useEffect(function(){return n?s():a(),a},[n,e.title]),A(Ra,{ref:La(r,t),...e})});const Fle=Lle;var zle=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},$le=E.exports.forwardRef(function(e,t){var n=E.exports.useContext(Fn),r=n.getPrefixCls,i=n.direction,a=n.getPopupContainer,s=E.exports.useState({}),o=$e(s,2),c=o[0],f=o[1],p=function(U,G){f(function(Z){return Be(Be({},Z),ae({},U,G))})},g=function(U,G){return U||(G?i==="rtl"?"left":"right":"top")},v=e.prefixCls,b=e.range,_=e.className,T=zle(e,["prefixCls","range","className"]),k=r("slider",v),P=He(_,ae({},"".concat(k,"-rtl"),i==="rtl"));i==="rtl"&&!T.vertical&&(T.reverse=!T.reverse);var M=E.exports.useMemo(function(){return b?on(b)==="object"?[!0,b.draggableTrack]:[!0,!1]:[!1]},[b]),O=$e(M,2),N=O[0],L=O[1],$=function(U,G){var Z,Q=G.index,J=G.dragging,re=r(),ne=e.tooltip,ge=ne===void 0?{}:ne,ie=e.vertical,ue=Be({formatter:(Z=e.tipFormatter)!==null&&Z!==void 0?Z:function(Fe){return typeof Fe=="number"?Fe.toString():""},open:e.tooltipVisible,placement:e.tooltipPlacement,getPopupContainer:e.getTooltipPopupContainer},ge),oe=ue.open,me=ue.placement,Te=ue.getPopupContainer,we=ue.prefixCls,be=ue.formatter,Re=be?c[Q]||J:!1,Ee=oe||oe===void 0&&Re,Me=Be(Be({},U.props),{onMouseEnter:function(){return p(Q,!0)},onMouseLeave:function(){return p(Q,!1)}}),Ae=r("tooltip",we);return A(Fle,{prefixCls:Ae,title:be?be(G.value):"",open:Ee,placement:g(me,ie),transitionName:"".concat(re,"-zoom-down"),overlayClassName:"".concat(k,"-tooltip"),getPopupContainer:Te||a,children:E.exports.cloneElement(U,Me)},Q)};return A(Nle,{...T,step:T.step,range:N,draggableTrack:L,className:P,ref:t,prefixCls:k,handleRender:$})});const Ble=$le;function Vle(e){return null}function Ule(e){return null}var jle="RC_TABLE_KEY";function cV(e){return e==null?[]:Array.isArray(e)?e:[e]}function dV(e,t){if(!t&&typeof t!="number")return e;for(var n=cV(t),r=e,i=0;i<n.length;i+=1){if(!r)return null;var a=n[i];r=r[a]}return r}function a1(e){var t=[],n={};return e.forEach(function(r){for(var i=r||{},a=i.key,s=i.dataIndex,o=a||cV(s).join("-")||jle;n[o];)o="".concat(o,"_next");n[o]=!0,t.push(o)}),t}function q4(e){return e!=null}var fV=E.exports.createContext(!1);function Hle(){var e=E.exports.createContext(null),t=function(r){var i=r.value,a=r.children,s=E.exports.useRef(i);s.current=i;var o=E.exports.useState(function(){return{getValue:function(){return s.current},listeners:new Set}}),c=$e(o,1),f=c[0];return Ci(function(){f.listeners.forEach(function(p){p(i)})},[i]),A(e.Provider,{value:f,children:a})};return{Context:e,Provider:t}}function Kle(e,t){var n=Pg(t),r=E.exports.useContext(e==null?void 0:e.Context),i=r||{},a=i.listeners,s=i.getValue,o=E.exports.useState(function(){return n(r?s():null)}),c=$e(o,2),f=c[0],p=c[1];return Ci(function(){if(!r)return;function g(v){p(function(b){var _=n(v);return Md(b,_)?b:_})}return a.add(g),function(){a.delete(g)}},[r]),f}var hV=Hle(),s1=E.exports.createContext(null),pV=E.exports.createContext({renderWithProps:!1}),Wle=["colSpan","rowSpan","style","className"];function Gle(e,t,n,r){var i=e+t-1;return e<=r&&i>=n}function qle(e){return e&&on(e)==="object"&&!Array.isArray(e)&&!E.exports.isValidElement(e)}function Zle(e){return typeof e=="string"?!0:Lh(e)}var Xle=function(t){var n=t.ellipsis,r=t.rowType,i=t.children,a,s=n===!0?{showTitle:!0}:n;return s&&(s.showTitle||r==="header")&&(typeof i=="string"||typeof i=="number"?a=i.toString():E.exports.isValidElement(i)&&typeof i.props.children=="string"&&(a=i.props.children)),a};function Yle(e,t){var n,r,i,a=e.prefixCls,s=e.className,o=e.record,c=e.index,f=e.renderIndex,p=e.dataIndex,g=e.render,v=e.children,b=e.component,_=b===void 0?"td":b,T=e.colSpan,k=e.rowSpan,P=e.fixLeft,M=e.fixRight,O=e.firstFixLeft,N=e.lastFixLeft,L=e.firstFixRight,$=e.lastFixRight,j=e.appendNode,U=e.additionalProps,G=U===void 0?{}:U,Z=e.ellipsis,Q=e.align,J=e.rowType,re=e.isSticky,ne=e.hovering,ge=e.onHover,ie="".concat(a,"-cell"),ue=E.exports.useContext(pV),oe=E.exports.useContext(fV),me=E.exports.useContext(s1),Te=me.allColumnsFixedLeft,we=E.exports.useMemo(function(){if(q4(v))return[v];var Ke=dV(o,p),ct=Ke,bt=void 0;if(g){var At=g(Ke,o,f);qle(At)?(ct=At.children,bt=At.props,ue.renderWithProps=!0):ct=At}return[ct,bt]},[ue.renderWithProps?Math.random():0,v,p,ue,o,g,f]),be=$e(we,2),Re=be[0],Ee=be[1],Me=Re;on(Me)==="object"&&!Array.isArray(Me)&&!E.exports.isValidElement(Me)&&(Me=null),Z&&(N||L)&&(Me=A("span",{className:"".concat(ie,"-content"),children:Me}));var Ae=Ee||{},Fe=Ae.colSpan,We=Ae.rowSpan,je=Ae.style,pt=Ae.className,gt=In(Ae,Wle),Ot=(n=Fe!==void 0?Fe:T)!==null&&n!==void 0?n:1,Ze=(r=We!==void 0?We:k)!==null&&r!==void 0?r:1;if(Ot===0||Ze===0)return null;var St={},ot=typeof P=="number"&&oe,vt=typeof M=="number"&&oe;ot&&(St.position="sticky",St.left=P),vt&&(St.position="sticky",St.right=M);var yt={};Q&&(yt.textAlign=Q);var kt=function(ct){var bt;o&&ge(c,c+Ze-1),G==null||(bt=G.onMouseEnter)===null||bt===void 0||bt.call(G,ct)},et=function(ct){var bt;o&&ge(-1,-1),G==null||(bt=G.onMouseLeave)===null||bt===void 0||bt.call(G,ct)},ut=Xle({rowType:J,ellipsis:Z,children:Re}),at=fe(fe(fe({title:ut},gt),G),{},{colSpan:Ot!==1?Ot:null,rowSpan:Ze!==1?Ze:null,className:He(ie,s,(i={},ae(i,"".concat(ie,"-fix-left"),ot&&oe),ae(i,"".concat(ie,"-fix-left-first"),O&&oe),ae(i,"".concat(ie,"-fix-left-last"),N&&oe),ae(i,"".concat(ie,"-fix-left-all"),N&&Te&&oe),ae(i,"".concat(ie,"-fix-right"),vt&&oe),ae(i,"".concat(ie,"-fix-right-first"),L&&oe),ae(i,"".concat(ie,"-fix-right-last"),$&&oe),ae(i,"".concat(ie,"-ellipsis"),Z),ae(i,"".concat(ie,"-with-append"),j),ae(i,"".concat(ie,"-fix-sticky"),(ot||vt)&&re&&oe),ae(i,"".concat(ie,"-row-hover"),!Ee&&ne),i),G.className,pt),style:fe(fe(fe(fe({},G.style),yt),St),je),onMouseEnter:kt,onMouseLeave:et,ref:Zle(_)?t:null});return it(_,{...at,children:[j,Me]})}var mV=E.exports.forwardRef(Yle);mV.displayName="Cell";var Qle=["expanded","className","hovering"],Jle=E.exports.memo(mV,function(e,t){return t.shouldCellUpdate?Qle.every(function(n){return e[n]===t[n]})&&!t.shouldCellUpdate(t.record,e.record):Md(e,t)}),hv=E.exports.forwardRef(function(e,t){var n=e.index,r=e.additionalProps,i=r===void 0?{}:r,a=e.colSpan,s=e.rowSpan,o=i.colSpan,c=i.rowSpan,f=a!=null?a:o,p=s!=null?s:c,g=Kle(hV,function(_){var T=Gle(n,p||1,_==null?void 0:_.startRow,_==null?void 0:_.endRow);return{onHover:_==null?void 0:_.onHover,hovering:T}}),v=g.onHover,b=g.hovering;return A(Jle,{...e,colSpan:f,rowSpan:p,hovering:b,ref:t,onHover:v})});hv.displayName="WrappedCell";var hl=E.exports.createContext(null);function ZT(e,t,n,r,i){var a=n[e]||{},s=n[t]||{},o,c;a.fixed==="left"?o=r.left[e]:s.fixed==="right"&&(c=r.right[t]);var f=!1,p=!1,g=!1,v=!1,b=n[t+1],_=n[e-1];if(i==="rtl"){if(o!==void 0){var T=_&&_.fixed==="left";v=!T}else if(c!==void 0){var k=b&&b.fixed==="right";g=!k}}else if(o!==void 0){var P=b&&b.fixed==="left";f=!P}else if(c!==void 0){var M=_&&_.fixed==="right";p=!M}return{fixLeft:o,fixRight:c,lastFixLeft:f,firstFixRight:p,lastFixRight:g,firstFixLeft:v,isSticky:r.isSticky}}function gV(e){var t=e.cells,n=e.stickyOffsets,r=e.flattenColumns,i=e.rowComponent,a=e.cellComponent,s=e.onHeaderRow,o=e.index,c=E.exports.useContext(hl),f=c.prefixCls,p=c.direction,g;s&&(g=s(t.map(function(b){return b.column}),o));var v=a1(t.map(function(b){return b.column}));return A(i,{...g,children:t.map(function(b,_){var T=b.column,k=ZT(b.colStart,b.colEnd,r,n,p),P;return T&&T.onHeaderCell&&(P=b.column.onHeaderCell(T)),E.exports.createElement(hv,{...b,ellipsis:T.ellipsis,align:T.align,component:a,prefixCls:f,key:v[_],...k,additionalProps:P,rowType:"header"})})})}gV.displayName="HeaderRow";function eue(e){var t=[];function n(s,o){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;t[c]=t[c]||[];var f=o,p=s.filter(Boolean).map(function(g){var v={key:g.key,className:g.className||"",children:g.title,column:g,colStart:f},b=1,_=g.children;return _&&_.length>0&&(b=n(_,f,c+1).reduce(function(T,k){return T+k},0),v.hasSubColumns=!0),"colSpan"in g&&(b=g.colSpan),"rowSpan"in g&&(v.rowSpan=g.rowSpan),v.colSpan=b,v.colEnd=v.colStart+b-1,t[c].push(v),f+=b,b});return p}n(e,0);for(var r=t.length,i=function(o){t[o].forEach(function(c){!("rowSpan"in c)&&!c.hasSubColumns&&(c.rowSpan=r-o)})},a=0;a<r;a+=1)i(a);return t}function CO(e){var t=e.stickyOffsets,n=e.columns,r=e.flattenColumns,i=e.onHeaderRow,a=E.exports.useContext(hl),s=a.prefixCls,o=a.getComponent,c=E.exports.useMemo(function(){return eue(n)},[n]),f=o(["header","wrapper"],"thead"),p=o(["header","row"],"tr"),g=o(["header","cell"],"th");return A(f,{className:"".concat(s,"-thead"),children:c.map(function(v,b){var _=A(gV,{flattenColumns:r,cells:v,stickyOffsets:t,rowComponent:p,cellComponent:g,onHeaderRow:i,index:b},b);return _})})}var vV=E.exports.createContext(null);function yV(e){var t=e.prefixCls,n=e.children,r=e.component,i=e.cellComponent,a=e.className,s=e.expanded,o=e.colSpan,c=e.isEmpty,f=E.exports.useContext(hl),p=f.scrollbarSize,g=E.exports.useContext(vV),v=g.fixHeader,b=g.fixColumn,_=g.componentWidth,T=g.horizonScroll;return E.exports.useMemo(function(){var k=n;return(c?T:b)&&(k=A("div",{style:{width:_-(v?p:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed"),children:_!==0&&k})),A(r,{className:a,style:{display:s?null:"none"},children:A(hv,{component:i,prefixCls:t,colSpan:o,children:k})})},[n,r,a,s,o,c,p,_,b,v,T])}var xV=E.exports.createContext(null);function bV(e){var t=e.className,n=e.style,r=e.record,i=e.index,a=e.renderIndex,s=e.rowKey,o=e.rowExpandable,c=e.expandedKeys,f=e.onRow,p=e.indent,g=p===void 0?0:p,v=e.rowComponent,b=e.cellComponent,_=e.childrenColumnName,T=E.exports.useContext(hl),k=T.prefixCls,P=T.fixedInfoList,M=E.exports.useContext(s1),O=M.flattenColumns,N=M.expandableType,L=M.expandRowByClick,$=M.onTriggerExpand,j=M.rowClassName,U=M.expandedRowClassName,G=M.indentSize,Z=M.expandIcon,Q=M.expandedRowRender,J=M.expandIconColumnIndex,re=E.exports.useState(!1),ne=$e(re,2),ge=ne[0],ie=ne[1],ue=c&&c.has(e.recordKey);E.exports.useEffect(function(){ue&&ie(!0)},[ue]);var oe=N==="row"&&(!o||o(r)),me=N==="nest",Te=_&&r&&r[_],we=oe||me,be=E.exports.useRef($);be.current=$;var Re=function(){be.current.apply(be,arguments)},Ee=f==null?void 0:f(r,i),Me=function(Ze){var St;L&&we&&Re(r,Ze);for(var ot=arguments.length,vt=new Array(ot>1?ot-1:0),yt=1;yt<ot;yt++)vt[yt-1]=arguments[yt];Ee==null||(St=Ee.onClick)===null||St===void 0||St.call.apply(St,[Ee,Ze].concat(vt))},Ae;typeof j=="string"?Ae=j:typeof j=="function"&&(Ae=j(r,i,g));var Fe=a1(O),We=A(v,{...Ee,"data-row-key":s,className:He(t,"".concat(k,"-row"),"".concat(k,"-row-level-").concat(g),Ae,Ee&&Ee.className),style:fe(fe({},n),Ee?Ee.style:null),onClick:Me,children:O.map(function(Ot,Ze){var St=Ot.render,ot=Ot.dataIndex,vt=Ot.className,yt=Fe[Ze],kt=P[Ze],et;Ze===(J||0)&&me&&(et=it(nr,{children:[A("span",{style:{paddingLeft:"".concat(G*g,"px")},className:"".concat(k,"-row-indent indent-level-").concat(g)}),Z({prefixCls:k,expanded:ue,expandable:Te,record:r,onExpand:Re})]}));var ut;return Ot.onCell&&(ut=Ot.onCell(r,i)),A(hv,{className:vt,ellipsis:Ot.ellipsis,align:Ot.align,component:b,prefixCls:k,record:r,index:i,renderIndex:a,dataIndex:ot,render:St,shouldCellUpdate:Ot.shouldCellUpdate,expanded:et&&ue,...kt,appendNode:et,additionalProps:ut},yt)})}),je;if(oe&&(ge||ue)){var pt=Q(r,i,g+1,ue),gt=U&&U(r,i,g);je=A(yV,{expanded:ue,className:He("".concat(k,"-expanded-row"),"".concat(k,"-expanded-row-level-").concat(g+1),gt),prefixCls:k,component:v,cellComponent:b,colSpan:O.length,isEmpty:!1,children:pt})}return it(nr,{children:[We,je]})}bV.displayName="BodyRow";function _V(e,t,n,r,i,a){var s=[];s.push({record:e,indent:t,index:a});var o=i(e),c=r==null?void 0:r.has(o);if(e&&Array.isArray(e[n])&&c)for(var f=0;f<e[n].length;f+=1){var p=_V(e[n][f],t+1,n,r,i,f);s.push.apply(s,Rt(p))}return s}function tue(e,t,n,r){var i=E.exports.useMemo(function(){if(n!=null&&n.size){for(var a=[],s=0;s<(e==null?void 0:e.length);s+=1){var o=e[s];a.push.apply(a,Rt(_V(o,0,t,n,r,s)))}return a}return e==null?void 0:e.map(function(c,f){return{record:c,indent:0,index:f}})},[e,t,n,r]);return i}function nue(e){var t=e.columnKey,n=e.onColumnResize,r=E.exports.useRef();return E.exports.useEffect(function(){r.current&&n(t,r.current.offsetWidth)},[]),A(tu,{data:t,children:A("td",{ref:r,style:{padding:0,border:0,height:0},children:A("div",{style:{height:0,overflow:"hidden"},children:"\xA0"})})})}function rue(e){var t=e.prefixCls,n=e.columnsKey,r=e.onColumnResize;return A("tr",{"aria-hidden":"true",className:"".concat(t,"-measure-row"),style:{height:0,fontSize:0},children:A(tu.Collection,{onBatchResize:function(a){a.forEach(function(s){var o=s.data,c=s.size;r(o,c.offsetWidth)})},children:n.map(function(i){return A(nue,{columnKey:i,onColumnResize:r},i)})})})}function iue(e){var t=e.data,n=e.getRowKey,r=e.measureColumnWidth,i=e.expandedKeys,a=e.onRow,s=e.rowExpandable,o=e.emptyNode,c=e.childrenColumnName,f=E.exports.useContext(xV),p=f.onColumnResize,g=E.exports.useContext(hl),v=g.prefixCls,b=g.getComponent,_=E.exports.useContext(s1),T=_.flattenColumns,k=tue(t,c,i,n),P=E.exports.useRef({renderWithProps:!1}),M=E.exports.useState(-1),O=$e(M,2),N=O[0],L=O[1],$=E.exports.useState(-1),j=$e($,2),U=j[0],G=j[1],Z=E.exports.useCallback(function(J,re){L(J),G(re)},[]),Q=E.exports.useMemo(function(){var J=b(["body","wrapper"],"tbody"),re=b(["body","row"],"tr"),ne=b(["body","cell"],"td"),ge;t.length?ge=k.map(function(ue,oe){var me=ue.record,Te=ue.indent,we=ue.index,be=n(me,oe);return A(bV,{rowKey:be,record:me,recordKey:be,index:oe,renderIndex:we,rowComponent:re,cellComponent:ne,expandedKeys:i,onRow:a,getRowKey:n,rowExpandable:s,childrenColumnName:c,indent:Te},be)}):ge=A(yV,{expanded:!0,className:"".concat(v,"-placeholder"),prefixCls:v,component:re,cellComponent:ne,colSpan:T.length,isEmpty:!0,children:o});var ie=a1(T);return it(J,{className:"".concat(v,"-tbody"),children:[r&&A(rue,{prefixCls:v,columnsKey:ie,onColumnResize:p}),ge]})},[t,v,a,r,i,n,b,o,T,c,p,s,k]);return A(pV.Provider,{value:P.current,children:A(hV.Provider,{value:{startRow:N,endRow:U,onHover:Z},children:Q})})}var wV=E.exports.memo(iue);wV.displayName="Body";var oue=["expandable"],Xm="RC_TABLE_INTERNAL_COL_DEFINE";function aue(e){var t=e.expandable,n=In(e,oue),r;return"expandable"in e?r=fe(fe({},n),t):r=n,r.showExpandColumn===!1&&(r.expandIconColumnIndex=-1),r}var Jc={},sue=["children"],lue=["fixed"];function XT(e){return To(e).filter(function(t){return E.exports.isValidElement(t)}).map(function(t){var n=t.key,r=t.props,i=r.children,a=In(r,sue),s=fe({key:n},a);return i&&(s.children=XT(i)),s})}function Z4(e){return e.reduce(function(t,n){var r=n.fixed,i=r===!0?"left":r,a=n.children;return a&&a.length>0?[].concat(Rt(t),Rt(Z4(a).map(function(s){return fe({fixed:i},s)}))):[].concat(Rt(t),[fe(fe({},n),{},{fixed:i})])},[])}function uue(e){return e.map(function(t){var n=t.fixed,r=In(t,lue),i=n;return n==="left"?i="right":n==="right"&&(i="left"),fe({fixed:i},r)})}function cue(e,t){var n=e.prefixCls,r=e.columns,i=e.children,a=e.expandable,s=e.expandedKeys,o=e.columnTitle,c=e.getRowKey,f=e.onTriggerExpand,p=e.expandIcon,g=e.rowExpandable,v=e.expandIconColumnIndex,b=e.direction,_=e.expandRowByClick,T=e.columnWidth,k=e.fixed,P=E.exports.useMemo(function(){return r||XT(i)},[r,i]),M=E.exports.useMemo(function(){if(a){var L,$=P.slice();if(!$.includes(Jc)){var j=v||0;j>=0&&$.splice(j,0,Jc)}var U=$.indexOf(Jc);$=$.filter(function(J,re){return J!==Jc||re===U});var G=P[U],Z;(k==="left"||k)&&!v?Z="left":(k==="right"||k)&&v===P.length?Z="right":Z=G?G.fixed:null;var Q=(L={},ae(L,Xm,{className:"".concat(n,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),ae(L,"title",o),ae(L,"fixed",Z),ae(L,"className","".concat(n,"-row-expand-icon-cell")),ae(L,"width",T),ae(L,"render",function(re,ne,ge){var ie=c(ne,ge),ue=s.has(ie),oe=g?g(ne):!0,me=p({prefixCls:n,expanded:ue,expandable:oe,record:ne,onExpand:f});return _?A("span",{onClick:function(we){return we.stopPropagation()},children:me}):me}),L);return $.map(function(J){return J===Jc?Q:J})}return P.filter(function(J){return J!==Jc})},[a,P,c,s,p,b]),O=E.exports.useMemo(function(){var L=M;return t&&(L=t(L)),L.length||(L=[{render:function(){return null}}]),L},[t,M,b]),N=E.exports.useMemo(function(){return b==="rtl"?uue(Z4(O)):Z4(O)},[O,b]);return[O,N]}function CV(e){var t=E.exports.useRef(e),n=E.exports.useState({}),r=$e(n,2),i=r[1],a=E.exports.useRef(null),s=E.exports.useRef([]);function o(c){s.current.push(c);var f=Promise.resolve();a.current=f,f.then(function(){if(a.current===f){var p=s.current,g=t.current;s.current=[],p.forEach(function(v){t.current=v(t.current)}),a.current=null,g!==t.current&&i({})}})}return E.exports.useEffect(function(){return function(){a.current=null}},[]),[t.current,o]}function due(e){var t=E.exports.useRef(e||null),n=E.exports.useRef();function r(){window.clearTimeout(n.current)}function i(s){t.current=s,r(),n.current=window.setTimeout(function(){t.current=null,n.current=void 0},100)}function a(){return t.current}return E.exports.useEffect(function(){return r},[]),[i,a]}function fue(e,t,n){var r=E.exports.useMemo(function(){for(var i=[],a=[],s=0,o=0,c=0;c<t;c+=1)if(n==="rtl"){a[c]=o,o+=e[c]||0;var f=t-c-1;i[f]=s,s+=e[f]||0}else{i[c]=s,s+=e[c]||0;var p=t-c-1;a[p]=o,o+=e[p]||0}return{left:i,right:a}},[e,t,n]);return r}var hue=["columnType"];function SV(e){for(var t=e.colWidths,n=e.columns,r=e.columCount,i=[],a=r||n.length,s=!1,o=a-1;o>=0;o-=1){var c=t[o],f=n&&n[o],p=f&&f[Xm];if(c||p||s){var g=p||{};g.columnType;var v=In(g,hue);i.unshift(A("col",{style:{width:c},...v},o)),s=!0}}return A("colgroup",{children:i})}function SO(e){var t=e.className,n=e.children;return A("div",{className:t,children:n})}var EV=E.exports.createContext({});function pue(e){var t=e.className,n=e.index,r=e.children,i=e.colSpan,a=i===void 0?1:i,s=e.rowSpan,o=e.align,c=E.exports.useContext(hl),f=c.prefixCls,p=c.direction,g=E.exports.useContext(EV),v=g.scrollColumnIndex,b=g.stickyOffsets,_=g.flattenColumns,T=n+a-1,k=T+1===v?a+1:a,P=ZT(n,n+k-1,_,b,p);return A(hv,{className:t,index:n,component:"td",prefixCls:f,record:null,dataIndex:null,align:o,colSpan:k,rowSpan:s,render:function(){return r},...P})}var mue=["children"];function gue(e){var t=e.children,n=In(e,mue);return A("tr",{...n,children:t})}function l1(e){var t=e.children;return t}l1.Row=gue;l1.Cell=pue;function v0(e){var t=e.children,n=e.stickyOffsets,r=e.flattenColumns,i=E.exports.useContext(hl),a=i.prefixCls,s=r.length-1,o=r[s],c=E.exports.useMemo(function(){return{stickyOffsets:n,flattenColumns:r,scrollColumnIndex:o!=null&&o.scrollbar?s:null}},[o,r,s,n]);return A(EV.Provider,{value:c,children:A("tfoot",{className:"".concat(a,"-summary"),children:t})})}var PV=l1;function vue(e){var t,n=e.prefixCls,r=e.record,i=e.onExpand,a=e.expanded,s=e.expandable,o="".concat(n,"-row-expand-icon");if(!s)return A("span",{className:He(o,"".concat(n,"-row-spaced"))});var c=function(p){i(r,p),p.stopPropagation()};return A("span",{className:He(o,(t={},ae(t,"".concat(n,"-row-expanded"),a),ae(t,"".concat(n,"-row-collapsed"),!a),t)),onClick:c})}function yue(e,t,n){var r=[];function i(a){(a||[]).forEach(function(s,o){r.push(t(s,o)),i(s[n])})}return i(e),r}var xue=function(t,n){var r,i,a=t.scrollBodyRef,s=t.onScroll,o=t.offsetScroll,c=t.container,f=E.exports.useContext(hl),p=f.prefixCls,g=((r=a.current)===null||r===void 0?void 0:r.scrollWidth)||0,v=((i=a.current)===null||i===void 0?void 0:i.clientWidth)||0,b=g&&v*(v/g),_=E.exports.useRef(),T=CV({scrollLeft:0,isHiddenScrollBar:!1}),k=$e(T,2),P=k[0],M=k[1],O=E.exports.useRef({delta:0,x:0}),N=E.exports.useState(!1),L=$e(N,2),$=L[0],j=L[1],U=function(){j(!1)},G=function(ne){ne.persist(),O.current.delta=ne.pageX-P.scrollLeft,O.current.x=0,j(!0),ne.preventDefault()},Z=function(ne){var ge,ie=ne||((ge=window)===null||ge===void 0?void 0:ge.event),ue=ie.buttons;if(!$||ue===0){$&&j(!1);return}var oe=O.current.x+ne.pageX-O.current.x-O.current.delta;oe<=0&&(oe=0),oe+b>=v&&(oe=v-b),s({scrollLeft:oe/v*(g+2)}),O.current.x=ne.pageX},Q=function(){if(!!a.current){var ne=H4(a.current).top,ge=ne+a.current.offsetHeight,ie=c===window?document.documentElement.scrollTop+window.innerHeight:H4(c).top+c.clientHeight;ge-Tb()<=ie||ne>=ie-o?M(function(ue){return fe(fe({},ue),{},{isHiddenScrollBar:!0})}):M(function(ue){return fe(fe({},ue),{},{isHiddenScrollBar:!1})})}},J=function(ne){M(function(ge){return fe(fe({},ge),{},{scrollLeft:ne/g*v||0})})};return E.exports.useImperativeHandle(n,function(){return{setScrollLeft:J}}),E.exports.useEffect(function(){var re=Jo(document.body,"mouseup",U,!1),ne=Jo(document.body,"mousemove",Z,!1);return Q(),function(){re.remove(),ne.remove()}},[b,$]),E.exports.useEffect(function(){var re=Jo(c,"scroll",Q,!1),ne=Jo(window,"resize",Q,!1);return function(){re.remove(),ne.remove()}},[c]),E.exports.useEffect(function(){P.isHiddenScrollBar||M(function(re){var ne=a.current;return ne?fe(fe({},re),{},{scrollLeft:ne.scrollLeft/ne.scrollWidth*ne.clientWidth}):re})},[P.isHiddenScrollBar]),g<=v||!b||P.isHiddenScrollBar?null:A("div",{style:{height:Tb(),width:v,bottom:o},className:"".concat(p,"-sticky-scroll"),children:A("div",{onMouseDown:G,ref:_,className:He("".concat(p,"-sticky-scroll-bar"),ae({},"".concat(p,"-sticky-scroll-bar-active"),$)),style:{width:"".concat(b,"px"),transform:"translate3d(".concat(P.scrollLeft,"px, 0, 0)")}})})};const bue=E.exports.forwardRef(xue);var EO=ko()?window:null;function _ue(e,t){var n=on(e)==="object"?e:{},r=n.offsetHeader,i=r===void 0?0:r,a=n.offsetSummary,s=a===void 0?0:a,o=n.offsetScroll,c=o===void 0?0:o,f=n.getContainer,p=f===void 0?function(){return EO}:f,g=p()||EO;return E.exports.useMemo(function(){var v=!!e;return{isSticky:v,stickyClassName:v?"".concat(t,"-sticky-holder"):"",offsetHeader:i,offsetSummary:s,offsetScroll:c,container:g}},[c,i,s,t,g])}var wue=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Cue(e,t){return E.exports.useMemo(function(){for(var n=[],r=0;r<t;r+=1){var i=e[r];if(i!==void 0)n[r]=i;else return null}return n},[e.join("_"),t])}var X4=E.exports.forwardRef(function(e,t){var n=e.className,r=e.noData,i=e.columns,a=e.flattenColumns,s=e.colWidths,o=e.columCount,c=e.stickyOffsets,f=e.direction,p=e.fixHeader,g=e.stickyTopOffset,v=e.stickyBottomOffset,b=e.stickyClassName,_=e.onScroll,T=e.maxContentScroll,k=e.children,P=In(e,wue),M=E.exports.useContext(hl),O=M.prefixCls,N=M.scrollbarSize,L=M.isSticky,$=L&&!p?0:N,j=E.exports.useRef(null),U=E.exports.useCallback(function(ie){ab(t,ie),ab(j,ie)},[]);E.exports.useEffect(function(){var ie;function ue(oe){var me=oe.currentTarget,Te=oe.deltaX;Te&&(_({currentTarget:me,scrollLeft:me.scrollLeft+Te}),oe.preventDefault())}return(ie=j.current)===null||ie===void 0||ie.addEventListener("wheel",ue),function(){var oe;(oe=j.current)===null||oe===void 0||oe.removeEventListener("wheel",ue)}},[]);var G=E.exports.useMemo(function(){return a.every(function(ie){return ie.width>=0})},[a]),Z=a[a.length-1],Q={fixed:Z?Z.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(O,"-cell-scrollbar")}}},J=E.exports.useMemo(function(){return $?[].concat(Rt(i),[Q]):i},[$,i]),re=E.exports.useMemo(function(){return $?[].concat(Rt(a),[Q]):a},[$,a]),ne=E.exports.useMemo(function(){var ie=c.right,ue=c.left;return fe(fe({},c),{},{left:f==="rtl"?[].concat(Rt(ue.map(function(oe){return oe+$})),[0]):ue,right:f==="rtl"?ie:[].concat(Rt(ie.map(function(oe){return oe+$})),[0]),isSticky:L})},[$,c,L]),ge=Cue(s,o);return A("div",{style:fe({overflow:"hidden"},L?{top:g,bottom:v}:{}),ref:U,className:He(n,ae({},b,!!b)),children:it("table",{style:{tableLayout:"fixed",visibility:r||ge?null:"hidden"},children:[(!r||!T||G)&&A(SV,{colWidths:ge?[].concat(Rt(ge),[$]):[],columCount:o+1,columns:re}),k(fe(fe({},P),{},{stickyOffsets:ne,columns:J,flattenColumns:re}))]})})});X4.displayName="FixedHolder";var Sue=[],Eue={},mx="rc-table-internal-hook",Pue=E.exports.memo(function(e){var t=e.children;return t},function(e,t){return Md(e.props,t.props)?e.pingLeft!==t.pingLeft||e.pingRight!==t.pingRight:!1});function Kd(e){var t,n=e.prefixCls,r=e.className,i=e.rowClassName,a=e.style,s=e.data,o=e.rowKey,c=e.scroll,f=e.tableLayout,p=e.direction,g=e.title,v=e.footer,b=e.summary,_=e.id,T=e.showHeader,k=e.components,P=e.emptyText,M=e.onRow,O=e.onHeaderRow,N=e.internalHooks,L=e.transformColumns,$=e.internalRefs,j=e.sticky,U=s||Sue,G=!!U.length,Z=E.exports.useCallback(function(Vn,er){return dV(k||{},Vn)||er},[k]),Q=E.exports.useMemo(function(){return typeof o=="function"?o:function(Vn){var er=Vn&&Vn[o];return er}},[o]),J=aue(e),re=J.expandIcon,ne=J.expandedRowKeys,ge=J.defaultExpandedRowKeys,ie=J.defaultExpandAllRows,ue=J.expandedRowRender,oe=J.columnTitle,me=J.onExpand,Te=J.onExpandedRowsChange,we=J.expandRowByClick,be=J.rowExpandable,Re=J.expandIconColumnIndex,Ee=J.expandedRowClassName,Me=J.childrenColumnName,Ae=J.indentSize,Fe=re||vue,We=Me||"children",je=E.exports.useMemo(function(){return ue?"row":e.expandable&&N===mx&&e.expandable.__PARENT_RENDER_ICON__||U.some(function(Vn){return Vn&&on(Vn)==="object"&&Vn[We]})?"nest":!1},[!!ue,U]),pt=E.exports.useState(function(){return ge||(ie?yue(U,Q,We):[])}),gt=$e(pt,2),Ot=gt[0],Ze=gt[1],St=E.exports.useMemo(function(){return new Set(ne||Ot||[])},[ne,Ot]),ot=E.exports.useCallback(function(Vn){var er=Q(Vn,U.indexOf(Vn)),Fr,zi=St.has(er);zi?(St.delete(er),Fr=Rt(St)):Fr=[].concat(Rt(St),[er]),Ze(Fr),me&&me(!zi,Vn),Te&&Te(Fr)},[Q,St,U,me,Te]),vt=E.exports.useState(0),yt=$e(vt,2),kt=yt[0],et=yt[1],ut=cue(fe(fe(fe({},e),J),{},{expandable:!!ue,columnTitle:oe,expandedKeys:St,getRowKey:Q,onTriggerExpand:ot,expandIcon:Fe,expandIconColumnIndex:Re,direction:p}),N===mx?L:null),at=$e(ut,2),Ke=at[0],ct=at[1],bt=E.exports.useMemo(function(){return{columns:Ke,flattenColumns:ct}},[Ke,ct]),At=E.exports.useRef(),Lt=E.exports.useRef(),Ht=E.exports.useRef(),ze=E.exports.useRef(),Qe=E.exports.useRef(),Zt=E.exports.useState(!1),an=$e(Zt,2),Kt=an[0],Vt=an[1],It=E.exports.useState(!1),Xt=$e(It,2),pn=Xt[0],tt=Xt[1],Nt=CV(new Map),qt=$e(Nt,2),En=qt[0],yn=qt[1],Et=a1(ct),Pn=Et.map(function(Vn){return En.get(Vn)}),_n=E.exports.useMemo(function(){return Pn},[Pn.join("_")]),tn=fue(_n,ct.length,p),zt=c&&q4(c.y),dt=c&&q4(c.x)||Boolean(J.fixed),mt=dt&&ct.some(function(Vn){var er=Vn.fixed;return er}),$t=E.exports.useRef(),Wt=_ue(j,n),mn=Wt.isSticky,An=Wt.offsetHeader,Qn=Wt.offsetSummary,Jn=Wt.offsetScroll,ye=Wt.stickyClassName,W=Wt.container,X=b==null?void 0:b(U),de=(zt||mn)&&E.exports.isValidElement(X)&&X.type===l1&&X.props.fixed,le,xe,Ie;zt&&(xe={overflowY:"scroll",maxHeight:c.y}),dt&&(le={overflowX:"auto"},zt||(xe={overflowY:"hidden"}),Ie={width:(c==null?void 0:c.x)===!0?"auto":c==null?void 0:c.x,minWidth:"100%"});var Ce=E.exports.useCallback(function(Vn,er){yT(At.current)&&yn(function(Fr){if(Fr.get(Vn)!==er){var zi=new Map(Fr);return zi.set(Vn,er),zi}return Fr})},[]),Pe=due(null),Le=$e(Pe,2),Xe=Le[0],Ye=Le[1];function Ue(Vn,er){!er||(typeof er=="function"?er(Vn):er.scrollLeft!==Vn&&(er.scrollLeft=Vn))}var Bt=function(er){var Fr=er.currentTarget,zi=er.scrollLeft,zs=p==="rtl",Ko=typeof zi=="number"?zi:Fr.scrollLeft,ml=Fr||Eue;if(!Ye()||Ye()===ml){var ds;Xe(ml),Ue(Ko,Lt.current),Ue(Ko,Ht.current),Ue(Ko,Qe.current),Ue(Ko,(ds=$t.current)===null||ds===void 0?void 0:ds.setScrollLeft)}if(Fr){var wr=Fr.scrollWidth,fs=Fr.clientWidth;if(wr===fs){Vt(!1),tt(!1);return}zs?(Vt(-Ko<wr-fs),tt(-Ko>0)):(Vt(Ko>0),tt(Ko<wr-fs))}},Pt=function(){dt&&Ht.current?Bt({currentTarget:Ht.current}):(Vt(!1),tt(!1))},nt=function(er){var Fr=er.width;Fr!==kt&&(Pt(),et(At.current?At.current.offsetWidth:Fr))},Ft=E.exports.useRef(!1);E.exports.useEffect(function(){Ft.current&&Pt()},[dt,s,Ke.length]),E.exports.useEffect(function(){Ft.current=!0},[]);var Gt=E.exports.useState(0),wn=$e(Gt,2),dn=wn[0],Cn=wn[1],jn=E.exports.useState(!0),or=$e(jn,2),Kr=or[0],dr=or[1];E.exports.useEffect(function(){Ht.current instanceof Element?Cn(JD(Ht.current).width):Cn(JD(ze.current).width),dr(U4("position","sticky"))},[]),E.exports.useEffect(function(){N===mx&&$&&($.body.current=Ht.current)});var Lr=Z(["table"],"table"),Dn=E.exports.useMemo(function(){return f||(mt?(c==null?void 0:c.x)==="max-content"?"auto":"fixed":zt||mn||ct.some(function(Vn){var er=Vn.ellipsis;return er})?"fixed":"auto")},[zt,mt,ct,f,mn]),Mn,Nn={colWidths:_n,columCount:ct.length,stickyOffsets:tn,onHeaderRow:O,fixHeader:zt,scroll:c},ei=E.exports.useMemo(function(){return G?null:typeof P=="function"?P():P},[G,P]),_r=A(wV,{data:U,measureColumnWidth:zt||dt||mn,expandedKeys:St,rowExpandable:be,getRowKey:Q,onRow:M,emptyNode:ei,childrenColumnName:We}),Wn=A(SV,{colWidths:ct.map(function(Vn){var er=Vn.width;return er}),columns:ct}),Bn=Z(["body"]);if(zt||mn){var rr;typeof Bn=="function"?(rr=Bn(U,{scrollbarSize:dn,ref:Ht,onScroll:Bt}),Nn.colWidths=ct.map(function(Vn,er){var Fr=Vn.width,zi=er===Ke.length-1?Fr-dn:Fr;return typeof zi=="number"&&!Number.isNaN(zi)?zi:(Nr(!1,"When use `components.body` with render props. Each column should have a fixed `width` value."),0)})):rr=A("div",{style:fe(fe({},le),xe),onScroll:Bt,ref:Ht,className:He("".concat(n,"-body")),children:it(Lr,{style:fe(fe({},Ie),{},{tableLayout:Dn}),children:[Wn,_r,!de&&X&&A(v0,{stickyOffsets:tn,flattenColumns:ct,children:X})]})});var Sr=fe(fe(fe({noData:!U.length,maxContentScroll:dt&&c.x==="max-content"},Nn),bt),{},{direction:p,stickyClassName:ye,onScroll:Bt});Mn=it(nr,{children:[T!==!1&&A(X4,{...Sr,stickyTopOffset:An,className:"".concat(n,"-header"),ref:Lt,children:function(Vn){return it(nr,{children:[A(CO,{...Vn}),de==="top"&&A(v0,{...Vn,children:X})]})}}),rr,de&&de!=="top"&&A(X4,{...Sr,stickyBottomOffset:Qn,className:"".concat(n,"-summary"),ref:Qe,children:function(Vn){return A(v0,{...Vn,children:X})}}),mn&&A(bue,{ref:$t,offsetScroll:Jn,scrollBodyRef:Ht,onScroll:Bt,container:W})]})}else Mn=A("div",{style:fe(fe({},le),xe),className:He("".concat(n,"-content")),onScroll:Bt,ref:Ht,children:it(Lr,{style:fe(fe({},Ie),{},{tableLayout:Dn}),children:[Wn,T!==!1&&A(CO,{...Nn,...bt}),_r,X&&A(v0,{stickyOffsets:tn,flattenColumns:ct,children:X})]})});var Pr=Ql(e,{aria:!0,data:!0}),Wr=A("div",{className:He(n,r,(t={},ae(t,"".concat(n,"-rtl"),p==="rtl"),ae(t,"".concat(n,"-ping-left"),Kt),ae(t,"".concat(n,"-ping-right"),pn),ae(t,"".concat(n,"-layout-fixed"),f==="fixed"),ae(t,"".concat(n,"-fixed-header"),zt),ae(t,"".concat(n,"-fixed-column"),mt),ae(t,"".concat(n,"-scroll-horizontal"),dt),ae(t,"".concat(n,"-has-fix-left"),ct[0]&&ct[0].fixed),ae(t,"".concat(n,"-has-fix-right"),ct[ct.length-1]&&ct[ct.length-1].fixed==="right"),t)),style:a,id:_,ref:At,...Pr,children:it(Pue,{pingLeft:Kt,pingRight:pn,props:fe(fe({},e),{},{stickyOffsets:tn,mergedExpandedKeys:St}),children:[g&&A(SO,{className:"".concat(n,"-title"),children:g(U)}),A("div",{ref:ze,className:"".concat(n,"-container"),children:Mn}),v&&A(SO,{className:"".concat(n,"-footer"),children:v(U)})]})});dt&&(Wr=A(tu,{onResize:nt,children:Wr}));var Mo=E.exports.useMemo(function(){return{prefixCls:n,getComponent:Z,scrollbarSize:dn,direction:p,fixedInfoList:ct.map(function(Vn,er){return ZT(er,er,ct,tn,p)}),isSticky:mn}},[n,Z,dn,p,ct,tn,mn]),ou=E.exports.useMemo(function(){return fe(fe({},bt),{},{tableLayout:Dn,rowClassName:i,expandedRowClassName:Ee,expandIcon:Fe,expandableType:je,expandRowByClick:we,expandedRowRender:ue,onTriggerExpand:ot,expandIconColumnIndex:Re,indentSize:Ae,allColumnsFixedLeft:bt.flattenColumns.every(function(Vn){return Vn.fixed==="left"})})},[bt,Dn,i,Ee,Fe,je,we,ue,ot,Re,Ae]),qd=E.exports.useMemo(function(){return{componentWidth:kt,fixHeader:zt,fixColumn:mt,horizonScroll:dt}},[kt,zt,mt,dt]),cs=E.exports.useMemo(function(){return{onColumnResize:Ce}},[Ce]);return A(fV.Provider,{value:Kr,children:A(hl.Provider,{value:Mo,children:A(s1.Provider,{value:ou,children:A(vV.Provider,{value:qd,children:A(xV.Provider,{value:cs,children:Wr})})})})})}Kd.EXPAND_COLUMN=Jc;Kd.Column=Ule;Kd.ColumnGroup=Vle;Kd.Summary=PV;Kd.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};function Tue(e){return null}function kue(e){return null}function Iue(e){return function(n){var r,i=n.prefixCls,a=n.onExpand,s=n.record,o=n.expanded,c=n.expandable,f="".concat(i,"-row-expand-icon");return A("button",{type:"button",onClick:function(g){a(s,g),g.stopPropagation()},className:He(f,(r={},ae(r,"".concat(f,"-spaced"),!c),ae(r,"".concat(f,"-expanded"),c&&o),ae(r,"".concat(f,"-collapsed"),c&&!o),r)),"aria-label":o?e.collapse:e.expand,"aria-expanded":o})}}function wh(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 u1(e,t){return t?"".concat(t,"-").concat(e):"".concat(e)}function c1(e,t){return typeof e=="function"?e(t):e}function Mue(e,t){var n=c1(e,t);return Object.prototype.toString.call(n)==="[object Object]"?"":n}var Rue={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 Due=Rue;var TV=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:Due})})};TV.displayName="FilterFilled";const Oue=E.exports.forwardRef(TV);function Aue(){this.__data__=[],this.size=0}var Nue=Aue;function Lue(e,t){return e===t||e!==e&&t!==t}var kV=Lue,Fue=kV;function zue(e,t){for(var n=e.length;n--;)if(Fue(e[n][0],t))return n;return-1}var d1=zue,$ue=d1,Bue=Array.prototype,Vue=Bue.splice;function Uue(e){var t=this.__data__,n=$ue(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Vue.call(t,n,1),--this.size,!0}var jue=Uue,Hue=d1;function Kue(e){var t=this.__data__,n=Hue(t,e);return n<0?void 0:t[n][1]}var Wue=Kue,Gue=d1;function que(e){return Gue(this.__data__,e)>-1}var Zue=que,Xue=d1;function Yue(e,t){var n=this.__data__,r=Xue(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Que=Yue,Jue=Nue,ece=jue,tce=Wue,nce=Zue,rce=Que;function jh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}jh.prototype.clear=Jue;jh.prototype.delete=ece;jh.prototype.get=tce;jh.prototype.has=nce;jh.prototype.set=rce;var f1=jh,ice=f1;function oce(){this.__data__=new ice,this.size=0}var ace=oce;function sce(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var lce=sce;function uce(e){return this.__data__.get(e)}var cce=uce;function dce(e){return this.__data__.has(e)}var fce=dce,hce=av,pce=n1,mce="[object AsyncFunction]",gce="[object Function]",vce="[object GeneratorFunction]",yce="[object Proxy]";function xce(e){if(!pce(e))return!1;var t=hce(e);return t==gce||t==vce||t==mce||t==yce}var IV=xce,bce=dl,_ce=bce["__core-js_shared__"],wce=_ce,iS=wce,PO=function(){var e=/[^.]+$/.exec(iS&&iS.keys&&iS.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Cce(e){return!!PO&&PO in e}var Sce=Cce,Ece=Function.prototype,Pce=Ece.toString;function Tce(e){if(e!=null){try{return Pce.call(e)}catch{}try{return e+""}catch{}}return""}var MV=Tce,kce=IV,Ice=Sce,Mce=n1,Rce=MV,Dce=/[\\^$.*+?()[\]{}|]/g,Oce=/^\[object .+?Constructor\]$/,Ace=Function.prototype,Nce=Object.prototype,Lce=Ace.toString,Fce=Nce.hasOwnProperty,zce=RegExp("^"+Lce.call(Fce).replace(Dce,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function $ce(e){if(!Mce(e)||Ice(e))return!1;var t=kce(e)?zce:Oce;return t.test(Rce(e))}var Bce=$ce;function Vce(e,t){return e==null?void 0:e[t]}var Uce=Vce,jce=Bce,Hce=Uce;function Kce(e,t){var n=Hce(e,t);return jce(n)?n:void 0}var Hh=Kce,Wce=Hh,Gce=dl,qce=Wce(Gce,"Map"),YT=qce,Zce=Hh,Xce=Zce(Object,"create"),h1=Xce,TO=h1;function Yce(){this.__data__=TO?TO(null):{},this.size=0}var Qce=Yce;function Jce(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ede=Jce,tde=h1,nde="__lodash_hash_undefined__",rde=Object.prototype,ide=rde.hasOwnProperty;function ode(e){var t=this.__data__;if(tde){var n=t[e];return n===nde?void 0:n}return ide.call(t,e)?t[e]:void 0}var ade=ode,sde=h1,lde=Object.prototype,ude=lde.hasOwnProperty;function cde(e){var t=this.__data__;return sde?t[e]!==void 0:ude.call(t,e)}var dde=cde,fde=h1,hde="__lodash_hash_undefined__";function pde(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=fde&&t===void 0?hde:t,this}var mde=pde,gde=Qce,vde=ede,yde=ade,xde=dde,bde=mde;function Kh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Kh.prototype.clear=gde;Kh.prototype.delete=vde;Kh.prototype.get=yde;Kh.prototype.has=xde;Kh.prototype.set=bde;var _de=Kh,kO=_de,wde=f1,Cde=YT;function Sde(){this.size=0,this.__data__={hash:new kO,map:new(Cde||wde),string:new kO}}var Ede=Sde;function Pde(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Tde=Pde,kde=Tde;function Ide(e,t){var n=e.__data__;return kde(t)?n[typeof t=="string"?"string":"hash"]:n.map}var p1=Ide,Mde=p1;function Rde(e){var t=Mde(this,e).delete(e);return this.size-=t?1:0,t}var Dde=Rde,Ode=p1;function Ade(e){return Ode(this,e).get(e)}var Nde=Ade,Lde=p1;function Fde(e){return Lde(this,e).has(e)}var zde=Fde,$de=p1;function Bde(e,t){var n=$de(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var Vde=Bde,Ude=Ede,jde=Dde,Hde=Nde,Kde=zde,Wde=Vde;function Wh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Wh.prototype.clear=Ude;Wh.prototype.delete=jde;Wh.prototype.get=Hde;Wh.prototype.has=Kde;Wh.prototype.set=Wde;var RV=Wh,Gde=f1,qde=YT,Zde=RV,Xde=200;function Yde(e,t){var n=this.__data__;if(n instanceof Gde){var r=n.__data__;if(!qde||r.length<Xde-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Zde(r)}return n.set(e,t),this.size=n.size,this}var Qde=Yde,Jde=f1,efe=ace,tfe=lce,nfe=cce,rfe=fce,ife=Qde;function Gh(e){var t=this.__data__=new Jde(e);this.size=t.size}Gh.prototype.clear=efe;Gh.prototype.delete=tfe;Gh.prototype.get=nfe;Gh.prototype.has=rfe;Gh.prototype.set=ife;var ofe=Gh,afe="__lodash_hash_undefined__";function sfe(e){return this.__data__.set(e,afe),this}var lfe=sfe;function ufe(e){return this.__data__.has(e)}var cfe=ufe,dfe=RV,ffe=lfe,hfe=cfe;function Ib(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new dfe;++t<n;)this.add(e[t])}Ib.prototype.add=Ib.prototype.push=ffe;Ib.prototype.has=hfe;var pfe=Ib;function mfe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var gfe=mfe;function vfe(e,t){return e.has(t)}var yfe=vfe,xfe=pfe,bfe=gfe,_fe=yfe,wfe=1,Cfe=2;function Sfe(e,t,n,r,i,a){var s=n&wfe,o=e.length,c=t.length;if(o!=c&&!(s&&c>o))return!1;var f=a.get(e),p=a.get(t);if(f&&p)return f==t&&p==e;var g=-1,v=!0,b=n&Cfe?new xfe:void 0;for(a.set(e,t),a.set(t,e);++g<o;){var _=e[g],T=t[g];if(r)var k=s?r(T,_,g,t,e,a):r(_,T,g,e,t,a);if(k!==void 0){if(k)continue;v=!1;break}if(b){if(!bfe(t,function(P,M){if(!_fe(b,M)&&(_===P||i(_,P,n,r,a)))return b.push(M)})){v=!1;break}}else if(!(_===T||i(_,T,n,r,a))){v=!1;break}}return a.delete(e),a.delete(t),v}var DV=Sfe,Efe=dl,Pfe=Efe.Uint8Array,Tfe=Pfe;function kfe(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}var Ife=kfe;function Mfe(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Rfe=Mfe,IO=LT,MO=Tfe,Dfe=kV,Ofe=DV,Afe=Ife,Nfe=Rfe,Lfe=1,Ffe=2,zfe="[object Boolean]",$fe="[object Date]",Bfe="[object Error]",Vfe="[object Map]",Ufe="[object Number]",jfe="[object RegExp]",Hfe="[object Set]",Kfe="[object String]",Wfe="[object Symbol]",Gfe="[object ArrayBuffer]",qfe="[object DataView]",RO=IO?IO.prototype:void 0,oS=RO?RO.valueOf:void 0;function Zfe(e,t,n,r,i,a,s){switch(n){case qfe:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Gfe:return!(e.byteLength!=t.byteLength||!a(new MO(e),new MO(t)));case zfe:case $fe:case Ufe:return Dfe(+e,+t);case Bfe:return e.name==t.name&&e.message==t.message;case jfe:case Kfe:return e==t+"";case Vfe:var o=Afe;case Hfe:var c=r&Lfe;if(o||(o=Nfe),e.size!=t.size&&!c)return!1;var f=s.get(e);if(f)return f==t;r|=Ffe,s.set(e,t);var p=Ofe(o(e),o(t),r,i,a,s);return s.delete(e),p;case Wfe:if(oS)return oS.call(e)==oS.call(t)}return!1}var Xfe=Zfe;function Yfe(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Qfe=Yfe,Jfe=Qfe,ehe=FT;function the(e,t,n){var r=t(e);return ehe(e)?r:Jfe(r,n(e))}var nhe=the;function rhe(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var s=e[n];t(s,n,e)&&(a[i++]=s)}return a}var ihe=rhe;function ohe(){return[]}var ahe=ohe,she=ihe,lhe=ahe,uhe=Object.prototype,che=uhe.propertyIsEnumerable,DO=Object.getOwnPropertySymbols,dhe=DO?function(e){return e==null?[]:(e=Object(e),she(DO(e),function(t){return che.call(e,t)}))}:lhe,fhe=dhe;function hhe(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var phe=hhe,mhe=av,ghe=sv,vhe="[object Arguments]";function yhe(e){return ghe(e)&&mhe(e)==vhe}var xhe=yhe,OO=xhe,bhe=sv,OV=Object.prototype,_he=OV.hasOwnProperty,whe=OV.propertyIsEnumerable,Che=OO(function(){return arguments}())?OO:function(e){return bhe(e)&&_he.call(e,"callee")&&!whe.call(e,"callee")},She=Che,Mb={exports:{}};function Ehe(){return!1}var Phe=Ehe;(function(e,t){var n=dl,r=Phe,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,s=a&&a.exports===i,o=s?n.Buffer:void 0,c=o?o.isBuffer:void 0,f=c||r;e.exports=f})(Mb,Mb.exports);var The=9007199254740991,khe=/^(?:0|[1-9]\d*)$/;function Ihe(e,t){var n=typeof e;return t=t==null?The:t,!!t&&(n=="number"||n!="symbol"&&khe.test(e))&&e>-1&&e%1==0&&e<t}var Mhe=Ihe,Rhe=9007199254740991;function Dhe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Rhe}var AV=Dhe,Ohe=av,Ahe=AV,Nhe=sv,Lhe="[object Arguments]",Fhe="[object Array]",zhe="[object Boolean]",$he="[object Date]",Bhe="[object Error]",Vhe="[object Function]",Uhe="[object Map]",jhe="[object Number]",Hhe="[object Object]",Khe="[object RegExp]",Whe="[object Set]",Ghe="[object String]",qhe="[object WeakMap]",Zhe="[object ArrayBuffer]",Xhe="[object DataView]",Yhe="[object Float32Array]",Qhe="[object Float64Array]",Jhe="[object Int8Array]",epe="[object Int16Array]",tpe="[object Int32Array]",npe="[object Uint8Array]",rpe="[object Uint8ClampedArray]",ipe="[object Uint16Array]",ope="[object Uint32Array]",Qr={};Qr[Yhe]=Qr[Qhe]=Qr[Jhe]=Qr[epe]=Qr[tpe]=Qr[npe]=Qr[rpe]=Qr[ipe]=Qr[ope]=!0;Qr[Lhe]=Qr[Fhe]=Qr[Zhe]=Qr[zhe]=Qr[Xhe]=Qr[$he]=Qr[Bhe]=Qr[Vhe]=Qr[Uhe]=Qr[jhe]=Qr[Hhe]=Qr[Khe]=Qr[Whe]=Qr[Ghe]=Qr[qhe]=!1;function ape(e){return Nhe(e)&&Ahe(e.length)&&!!Qr[Ohe(e)]}var spe=ape;function lpe(e){return function(t){return e(t)}}var upe=lpe,Y4={exports:{}};(function(e,t){var n=v8,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,s=a&&n.process,o=function(){try{var c=i&&i.require&&i.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}}();e.exports=o})(Y4,Y4.exports);var cpe=spe,dpe=upe,AO=Y4.exports,NO=AO&&AO.isTypedArray,fpe=NO?dpe(NO):cpe,NV=fpe,hpe=phe,ppe=She,mpe=FT,gpe=Mb.exports,vpe=Mhe,ype=NV,xpe=Object.prototype,bpe=xpe.hasOwnProperty;function _pe(e,t){var n=mpe(e),r=!n&&ppe(e),i=!n&&!r&&gpe(e),a=!n&&!r&&!i&&ype(e),s=n||r||i||a,o=s?hpe(e.length,String):[],c=o.length;for(var f in e)(t||bpe.call(e,f))&&!(s&&(f=="length"||i&&(f=="offset"||f=="parent")||a&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||vpe(f,c)))&&o.push(f);return o}var wpe=_pe,Cpe=Object.prototype;function Spe(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Cpe;return e===n}var Epe=Spe;function Ppe(e,t){return function(n){return e(t(n))}}var Tpe=Ppe,kpe=Tpe,Ipe=kpe(Object.keys,Object),Mpe=Ipe,Rpe=Epe,Dpe=Mpe,Ope=Object.prototype,Ape=Ope.hasOwnProperty;function Npe(e){if(!Rpe(e))return Dpe(e);var t=[];for(var n in Object(e))Ape.call(e,n)&&n!="constructor"&&t.push(n);return t}var Lpe=Npe,Fpe=IV,zpe=AV;function $pe(e){return e!=null&&zpe(e.length)&&!Fpe(e)}var Bpe=$pe,Vpe=wpe,Upe=Lpe,jpe=Bpe;function Hpe(e){return jpe(e)?Vpe(e):Upe(e)}var Kpe=Hpe,Wpe=nhe,Gpe=fhe,qpe=Kpe;function Zpe(e){return Wpe(e,qpe,Gpe)}var Xpe=Zpe,LO=Xpe,Ype=1,Qpe=Object.prototype,Jpe=Qpe.hasOwnProperty;function eme(e,t,n,r,i,a){var s=n&Ype,o=LO(e),c=o.length,f=LO(t),p=f.length;if(c!=p&&!s)return!1;for(var g=c;g--;){var v=o[g];if(!(s?v in t:Jpe.call(t,v)))return!1}var b=a.get(e),_=a.get(t);if(b&&_)return b==t&&_==e;var T=!0;a.set(e,t),a.set(t,e);for(var k=s;++g<c;){v=o[g];var P=e[v],M=t[v];if(r)var O=s?r(M,P,v,t,e,a):r(P,M,v,e,t,a);if(!(O===void 0?P===M||i(P,M,n,r,a):O)){T=!1;break}k||(k=v=="constructor")}if(T&&!k){var N=e.constructor,L=t.constructor;N!=L&&"constructor"in e&&"constructor"in t&&!(typeof N=="function"&&N instanceof N&&typeof L=="function"&&L instanceof L)&&(T=!1)}return a.delete(e),a.delete(t),T}var tme=eme,nme=Hh,rme=dl,ime=nme(rme,"DataView"),ome=ime,ame=Hh,sme=dl,lme=ame(sme,"Promise"),ume=lme,cme=Hh,dme=dl,fme=cme(dme,"Set"),hme=fme,pme=Hh,mme=dl,gme=pme(mme,"WeakMap"),vme=gme,Q4=ome,J4=YT,eE=ume,tE=hme,nE=vme,LV=av,qh=MV,FO="[object Map]",yme="[object Object]",zO="[object Promise]",$O="[object Set]",BO="[object WeakMap]",VO="[object DataView]",xme=qh(Q4),bme=qh(J4),_me=qh(eE),wme=qh(tE),Cme=qh(nE),ed=LV;(Q4&&ed(new Q4(new ArrayBuffer(1)))!=VO||J4&&ed(new J4)!=FO||eE&&ed(eE.resolve())!=zO||tE&&ed(new tE)!=$O||nE&&ed(new nE)!=BO)&&(ed=function(e){var t=LV(e),n=t==yme?e.constructor:void 0,r=n?qh(n):"";if(r)switch(r){case xme:return VO;case bme:return FO;case _me:return zO;case wme:return $O;case Cme:return BO}return t});var Sme=ed,aS=ofe,Eme=DV,Pme=Xfe,Tme=tme,UO=Sme,jO=FT,HO=Mb.exports,kme=NV,Ime=1,KO="[object Arguments]",WO="[object Array]",y0="[object Object]",Mme=Object.prototype,GO=Mme.hasOwnProperty;function Rme(e,t,n,r,i,a){var s=jO(e),o=jO(t),c=s?WO:UO(e),f=o?WO:UO(t);c=c==KO?y0:c,f=f==KO?y0:f;var p=c==y0,g=f==y0,v=c==f;if(v&&HO(e)){if(!HO(t))return!1;s=!0,p=!1}if(v&&!p)return a||(a=new aS),s||kme(e)?Eme(e,t,n,r,i,a):Pme(e,t,c,n,r,i,a);if(!(n&Ime)){var b=p&&GO.call(e,"__wrapped__"),_=g&&GO.call(t,"__wrapped__");if(b||_){var T=b?e.value():e,k=_?t.value():t;return a||(a=new aS),i(T,k,n,r,a)}}return v?(a||(a=new aS),Tme(e,t,n,r,i,a)):!1}var Dme=Rme,Ome=Dme,qO=sv;function FV(e,t,n,r,i){return e===t?!0:e==null||t==null||!qO(e)&&!qO(t)?e!==e&&t!==t:Ome(e,t,n,r,FV,i)}var Ame=FV,Nme=Ame;function Lme(e,t){return Nme(e,t)}var ZO=Lme;function zV(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var Fme=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],$V=function(t,n){var r=t.className,i=t.style,a=t.motion,s=t.motionNodes,o=t.motionType,c=t.onMotionStart,f=t.onMotionEnd,p=t.active,g=t.treeNodeRequiredProps,v=In(t,Fme),b=E.exports.useState(!0),_=$e(b,2),T=_[0],k=_[1],P=E.exports.useContext($T),M=P.prefixCls,O=E.exports.useRef(!1),N=function(){O.current||f(),O.current=!0};return E.exports.useEffect(function(){s&&o==="hide"&&T&&k(!1)},[s]),E.exports.useEffect(function(){return s&&c(),function(){s&&N()}},[]),s?A(sa,{ref:n,visible:T,...a,motionAppear:o==="show",onAppearEnd:N,onLeaveEnd:N,children:function(L,$){var j=L.className,U=L.style;return A("div",{ref:$,className:He("".concat(M,"-treenode-motion"),j),style:U,children:s.map(function(G){var Z=Be({},(zV(G.data),G.data)),Q=G.title,J=G.key,re=G.isStart,ne=G.isEnd;delete Z.children;var ge=qm(J,g);return E.exports.createElement(Rd,{...Z,...ge,title:Q,active:p,data:G.data,key:J,isStart:re,isEnd:ne})})})}}):A(Rd,{domRef:n,className:r,style:i,...v,active:p})};$V.displayName="MotionTreeNode";var zme=E.exports.forwardRef($V);function $me(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=e.length,r=t.length;if(Math.abs(n-r)!==1)return{add:!1,key:null};function i(a,s){var o=new Map;a.forEach(function(f){o.set(f,!0)});var c=s.filter(function(f){return!o.has(f)});return c.length===1?c[0]:null}return n<r?{add:!0,key:i(e,t)}:{add:!1,key:i(t,e)}}function XO(e,t,n){var r=e.findIndex(function(o){return o.key===n}),i=e[r+1],a=t.findIndex(function(o){return o.key===n});if(i){var s=t.findIndex(function(o){return o.key===i.key});return t.slice(a+1,s)}return t.slice(a+1)}var Bme=["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"],YO={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Vme=function(){},Dd="RC_TREE_MOTION_".concat(Math.random()),rE={key:Dd},BV={key:Dd,level:0,index:0,pos:"0",node:rE,nodes:[rE]},QO={parent:null,children:[],pos:BV.pos,data:rE,title:null,key:Dd,isStart:[],isEnd:[]};function JO(e,t,n,r){return t===!1||!n?e:e.slice(0,Math.ceil(n/r)+1)}function eA(e){var t=e.key,n=e.pos;return lv(t,n)}function Ume(e){for(var t=String(e.data.key),n=e;n.parent;)n=n.parent,t="".concat(n.data.key," > ").concat(t);return t}var VV=E.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.data;e.selectable,e.checkable;var i=e.expandedKeys,a=e.selectedKeys,s=e.checkedKeys,o=e.loadedKeys,c=e.loadingKeys,f=e.halfCheckedKeys,p=e.keyEntities,g=e.disabled,v=e.dragging,b=e.dragOverNodeKey,_=e.dropPosition,T=e.motion,k=e.height,P=e.itemHeight,M=e.virtual,O=e.focusable,N=e.activeItem,L=e.focused,$=e.tabIndex,j=e.onKeyDown,U=e.onFocus,G=e.onBlur,Z=e.onActiveChange,Q=e.onListChangeStart,J=e.onListChangeEnd,re=In(e,Bme),ne=E.exports.useRef(null),ge=E.exports.useRef(null);E.exports.useImperativeHandle(t,function(){return{scrollTo:function(at){ne.current.scrollTo(at)},getIndentWidth:function(){return ge.current.offsetWidth}}});var ie=E.exports.useState(i),ue=$e(ie,2),oe=ue[0],me=ue[1],Te=E.exports.useState(r),we=$e(Te,2),be=we[0],Re=we[1],Ee=E.exports.useState(r),Me=$e(Ee,2),Ae=Me[0],Fe=Me[1],We=E.exports.useState([]),je=$e(We,2),pt=je[0],gt=je[1],Ot=E.exports.useState(null),Ze=$e(Ot,2),St=Ze[0],ot=Ze[1],vt=E.exports.useRef(r);vt.current=r;function yt(){var ut=vt.current;Re(ut),Fe(ut),gt([]),ot(null),J()}E.exports.useEffect(function(){me(i);var ut=$me(oe,i);if(ut.key!==null)if(ut.add){var at=be.findIndex(function(Ht){var ze=Ht.key;return ze===ut.key}),Ke=JO(XO(be,r,ut.key),M,k,P),ct=be.slice();ct.splice(at+1,0,QO),Fe(ct),gt(Ke),ot("show")}else{var bt=r.findIndex(function(Ht){var ze=Ht.key;return ze===ut.key}),At=JO(XO(r,be,ut.key),M,k,P),Lt=r.slice();Lt.splice(bt+1,0,QO),Fe(Lt),gt(At),ot("hide")}else be!==r&&(Re(r),Fe(r))},[i,r]),E.exports.useEffect(function(){v||yt()},[v]);var kt=T?Ae:r,et={expandedKeys:i,selectedKeys:a,loadedKeys:o,loadingKeys:c,checkedKeys:s,halfCheckedKeys:f,dragOverNodeKey:b,dropPosition:_,keyEntities:p};return it(nr,{children:[L&&N&&A("span",{style:YO,"aria-live":"assertive",children:Ume(N)}),A("div",{children:A("input",{style:YO,disabled:O===!1||g,tabIndex:O!==!1?$:null,onKeyDown:j,onFocus:U,onBlur:G,value:"",onChange:Vme,"aria-label":"for screen reader"})}),A("div",{className:"".concat(n,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0},children:A("div",{className:"".concat(n,"-indent"),children:A("div",{ref:ge,className:"".concat(n,"-indent-unit")})})}),A(_T,{...re,data:kt,itemKey:eA,height:k,fullHeight:!1,virtual:M,itemHeight:P,prefixCls:"".concat(n,"-list"),ref:ne,onVisibleChange:function(at,Ke){var ct=new Set(at),bt=Ke.filter(function(At){return!ct.has(At)});bt.some(function(At){return eA(At)===Dd})&&yt()},children:function(ut){var at=ut.pos,Ke=Be({},(zV(ut.data),ut.data)),ct=ut.title,bt=ut.key,At=ut.isStart,Lt=ut.isEnd,Ht=lv(bt,at);delete Ke.key,delete Ke.children;var ze=qm(Ht,et);return A(zme,{...Ke,...ze,title:ct,active:!!N&&bt===N.key,pos:at,data:ut.data,isStart:At,isEnd:Lt,motion:T,motionNodes:bt===Dd?pt:null,motionType:St,onMotionStart:Q,onMotionEnd:yt,treeNodeRequiredProps:et,onMouseMove:function(){Z(null)}})}})]})});VV.displayName="NodeList";function jme(e){var t=e.dropPosition,n=e.dropLevelOffset,r=e.indent,i={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(t){case-1:i.top=0,i.left=-n*r;break;case 1:i.bottom=0,i.left=-n*r;break;case 0:i.bottom=0,i.left=r;break}return A("div",{style:i})}var Hme=10,m1=function(e){ai(n,e);var t=si(n);function n(){var r;Ur(this,n);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),r.destroyed=!1,r.delayedDragEnterLogic=void 0,r.loadingRetryTimes={},r.state={keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:Eb()},r.dragStartMousePosition=null,r.dragNode=void 0,r.currentMouseOverDroppableNodeKey=null,r.listRef=E.exports.createRef(),r.onNodeDragStart=function(o,c){var f=r.state,p=f.expandedKeys,g=f.keyEntities,v=r.props.onDragStart,b=c.props.eventKey;r.dragNode=c,r.dragStartMousePosition={x:o.clientX,y:o.clientY};var _=Xs(p,b);r.setState({draggingNodeKey:b,dragChildrenKeys:Ooe(b,g),indent:r.listRef.current.getIndentWidth()}),r.setExpandedKeys(_),window.addEventListener("dragend",r.onWindowDragEnd),v==null||v({event:o,node:Di(c.props)})},r.onNodeDragEnter=function(o,c){var f=r.state,p=f.expandedKeys,g=f.keyEntities,v=f.dragChildrenKeys,b=f.flattenNodes,_=f.indent,T=r.props,k=T.onDragEnter,P=T.onExpand,M=T.allowDrop,O=T.direction,N=c.props,L=N.pos,$=N.eventKey,j=zn(r),U=j.dragNode;if(r.currentMouseOverDroppableNodeKey!==$&&(r.currentMouseOverDroppableNodeKey=$),!U){r.resetDragState();return}var G=WD(o,U,c,_,r.dragStartMousePosition,M,b,g,p,O),Z=G.dropPosition,Q=G.dropLevelOffset,J=G.dropTargetKey,re=G.dropContainerKey,ne=G.dropTargetPos,ge=G.dropAllowed,ie=G.dragOverNodeKey;if(v.indexOf(J)!==-1||!ge){r.resetDragState();return}if(r.delayedDragEnterLogic||(r.delayedDragEnterLogic={}),Object.keys(r.delayedDragEnterLogic).forEach(function(ue){clearTimeout(r.delayedDragEnterLogic[ue])}),U.props.eventKey!==c.props.eventKey&&(o.persist(),r.delayedDragEnterLogic[L]=window.setTimeout(function(){if(r.state.draggingNodeKey!==null){var ue=Rt(p),oe=g[c.props.eventKey];oe&&(oe.children||[]).length&&(ue=Rl(p,c.props.eventKey)),"expandedKeys"in r.props||r.setExpandedKeys(ue),P==null||P(ue,{node:Di(c.props),expanded:!0,nativeEvent:o.nativeEvent})}},800)),U.props.eventKey===J&&Q===0){r.resetDragState();return}r.setState({dragOverNodeKey:ie,dropPosition:Z,dropLevelOffset:Q,dropTargetKey:J,dropContainerKey:re,dropTargetPos:ne,dropAllowed:ge}),k==null||k({event:o,node:Di(c.props),expandedKeys:p})},r.onNodeDragOver=function(o,c){var f=r.state,p=f.dragChildrenKeys,g=f.flattenNodes,v=f.keyEntities,b=f.expandedKeys,_=f.indent,T=r.props,k=T.onDragOver,P=T.allowDrop,M=T.direction,O=zn(r),N=O.dragNode;if(!!N){var L=WD(o,N,c,_,r.dragStartMousePosition,P,g,v,b,M),$=L.dropPosition,j=L.dropLevelOffset,U=L.dropTargetKey,G=L.dropContainerKey,Z=L.dropAllowed,Q=L.dropTargetPos,J=L.dragOverNodeKey;p.indexOf(U)!==-1||!Z||(N.props.eventKey===U&&j===0?r.state.dropPosition===null&&r.state.dropLevelOffset===null&&r.state.dropTargetKey===null&&r.state.dropContainerKey===null&&r.state.dropTargetPos===null&&r.state.dropAllowed===!1&&r.state.dragOverNodeKey===null||r.resetDragState():$===r.state.dropPosition&&j===r.state.dropLevelOffset&&U===r.state.dropTargetKey&&G===r.state.dropContainerKey&&Q===r.state.dropTargetPos&&Z===r.state.dropAllowed&&J===r.state.dragOverNodeKey||r.setState({dropPosition:$,dropLevelOffset:j,dropTargetKey:U,dropContainerKey:G,dropTargetPos:Q,dropAllowed:Z,dragOverNodeKey:J}),k==null||k({event:o,node:Di(c.props)}))}},r.onNodeDragLeave=function(o,c){r.currentMouseOverDroppableNodeKey===c.props.eventKey&&!o.currentTarget.contains(o.relatedTarget)&&(r.resetDragState(),r.currentMouseOverDroppableNodeKey=null);var f=r.props.onDragLeave;f==null||f({event:o,node:Di(c.props)})},r.onWindowDragEnd=function(o){r.onNodeDragEnd(o,null,!0),window.removeEventListener("dragend",r.onWindowDragEnd)},r.onNodeDragEnd=function(o,c){var f=r.props.onDragEnd;r.setState({dragOverNodeKey:null}),r.cleanDragState(),f==null||f({event:o,node:Di(c.props)}),r.dragNode=null,window.removeEventListener("dragend",r.onWindowDragEnd)},r.onNodeDrop=function(o,c){var f,p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,g=r.state,v=g.dragChildrenKeys,b=g.dropPosition,_=g.dropTargetKey,T=g.dropTargetPos,k=g.dropAllowed;if(!!k){var P=r.props.onDrop;if(r.setState({dragOverNodeKey:null}),r.cleanDragState(),_!==null){var M=fe(fe({},qm(_,r.getTreeNodeRequiredProps())),{},{active:((f=r.getActiveItem())===null||f===void 0?void 0:f.key)===_,data:r.state.keyEntities[_].node}),O=v.indexOf(_)!==-1;Nr(!O,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var N=BT(T),L={event:o,node:Di(M),dragNode:r.dragNode?Di(r.dragNode.props):null,dragNodesKeys:[r.dragNode.props.eventKey].concat(v),dropToGap:b!==0,dropPosition:b+Number(N[N.length-1])};p||P==null||P(L),r.dragNode=null}}},r.cleanDragState=function(){var o=r.state.draggingNodeKey;o!==null&&r.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),r.dragStartMousePosition=null,r.currentMouseOverDroppableNodeKey=null},r.triggerExpandActionExpand=function(o,c){var f=r.state,p=f.expandedKeys,g=f.flattenNodes,v=c.expanded,b=c.key,_=c.isLeaf;if(!(_||o.shiftKey||o.metaKey||o.ctrlKey)){var T=g.filter(function(P){return P.key===b})[0],k=Di(fe(fe({},qm(b,r.getTreeNodeRequiredProps())),{},{data:T.data}));r.setExpandedKeys(v?Xs(p,b):Rl(p,b)),r.onNodeExpand(o,k)}},r.onNodeClick=function(o,c){var f=r.props,p=f.onClick,g=f.expandAction;g==="click"&&r.triggerExpandActionExpand(o,c),p==null||p(o,c)},r.onNodeDoubleClick=function(o,c){var f=r.props,p=f.onDoubleClick,g=f.expandAction;g==="doubleClick"&&r.triggerExpandActionExpand(o,c),p==null||p(o,c)},r.onNodeSelect=function(o,c){var f=r.state.selectedKeys,p=r.state,g=p.keyEntities,v=p.fieldNames,b=r.props,_=b.onSelect,T=b.multiple,k=c.selected,P=c[v.key],M=!k;M?T?f=Rl(f,P):f=[P]:f=Xs(f,P);var O=f.map(function(N){var L=g[N];return L?L.node:null}).filter(function(N){return N});r.setUncontrolledState({selectedKeys:f}),_==null||_(f,{event:"select",selected:M,node:c,selectedNodes:O,nativeEvent:o.nativeEvent})},r.onNodeCheck=function(o,c,f){var p=r.state,g=p.keyEntities,v=p.checkedKeys,b=p.halfCheckedKeys,_=r.props,T=_.checkStrictly,k=_.onCheck,P=c.key,M,O={event:"check",node:c,checked:f,nativeEvent:o.nativeEvent};if(T){var N=f?Rl(v,P):Xs(v,P),L=Xs(b,P);M={checked:N,halfChecked:L},O.checkedNodes=N.map(function(Q){return g[Q]}).filter(function(Q){return Q}).map(function(Q){return Q.node}),r.setUncontrolledState({checkedKeys:N})}else{var $=Gl([].concat(Rt(v),[P]),!0,g),j=$.checkedKeys,U=$.halfCheckedKeys;if(!f){var G=new Set(j);G.delete(P);var Z=Gl(Array.from(G),{checked:!1,halfCheckedKeys:U},g);j=Z.checkedKeys,U=Z.halfCheckedKeys}M=j,O.checkedNodes=[],O.checkedNodesPositions=[],O.halfCheckedKeys=U,j.forEach(function(Q){var J=g[Q];if(!!J){var re=J.node,ne=J.pos;O.checkedNodes.push(re),O.checkedNodesPositions.push({node:re,pos:ne})}}),r.setUncontrolledState({checkedKeys:j},!1,{halfCheckedKeys:U})}k==null||k(M,O)},r.onNodeLoad=function(o){var c=o.key,f=new Promise(function(p,g){r.setState(function(v){var b=v.loadedKeys,_=b===void 0?[]:b,T=v.loadingKeys,k=T===void 0?[]:T,P=r.props,M=P.loadData,O=P.onLoad;if(!M||_.indexOf(c)!==-1||k.indexOf(c)!==-1)return null;var N=M(o);return N.then(function(){var L=r.state.loadedKeys,$=Rl(L,c);O==null||O($,{event:"load",node:o}),r.setUncontrolledState({loadedKeys:$}),r.setState(function(j){return{loadingKeys:Xs(j.loadingKeys,c)}}),p()}).catch(function(L){if(r.setState(function(j){return{loadingKeys:Xs(j.loadingKeys,c)}}),r.loadingRetryTimes[c]=(r.loadingRetryTimes[c]||0)+1,r.loadingRetryTimes[c]>=Hme){var $=r.state.loadedKeys;Nr(!1,"Retry for `loadData` many times but still failed. No more retry."),r.setUncontrolledState({loadedKeys:Rl($,c)}),p()}g(L)}),{loadingKeys:Rl(k,c)}})});return f.catch(function(){}),f},r.onNodeMouseEnter=function(o,c){var f=r.props.onMouseEnter;f==null||f({event:o,node:c})},r.onNodeMouseLeave=function(o,c){var f=r.props.onMouseLeave;f==null||f({event:o,node:c})},r.onNodeContextMenu=function(o,c){var f=r.props.onRightClick;f&&(o.preventDefault(),f({event:o,node:c}))},r.onFocus=function(){var o=r.props.onFocus;r.setState({focused:!0});for(var c=arguments.length,f=new Array(c),p=0;p<c;p++)f[p]=arguments[p];o==null||o.apply(void 0,f)},r.onBlur=function(){var o=r.props.onBlur;r.setState({focused:!1}),r.onActiveChange(null);for(var c=arguments.length,f=new Array(c),p=0;p<c;p++)f[p]=arguments[p];o==null||o.apply(void 0,f)},r.getTreeNodeRequiredProps=function(){var o=r.state,c=o.expandedKeys,f=o.selectedKeys,p=o.loadedKeys,g=o.loadingKeys,v=o.checkedKeys,b=o.halfCheckedKeys,_=o.dragOverNodeKey,T=o.dropPosition,k=o.keyEntities;return{expandedKeys:c||[],selectedKeys:f||[],loadedKeys:p||[],loadingKeys:g||[],checkedKeys:v||[],halfCheckedKeys:b||[],dragOverNodeKey:_,dropPosition:T,keyEntities:k}},r.setExpandedKeys=function(o){var c=r.state,f=c.treeData,p=c.fieldNames,g=XC(f,o,p);r.setUncontrolledState({expandedKeys:o,flattenNodes:g},!0)},r.onNodeExpand=function(o,c){var f=r.state.expandedKeys,p=r.state,g=p.listChanging,v=p.fieldNames,b=r.props,_=b.onExpand,T=b.loadData,k=c.expanded,P=c[v.key];if(!g){var M=f.indexOf(P),O=!k;if(Nr(k&&M!==-1||!k&&M===-1,"Expand state not sync with index check"),O?f=Rl(f,P):f=Xs(f,P),r.setExpandedKeys(f),_==null||_(f,{node:c,expanded:O,nativeEvent:o.nativeEvent}),O&&T){var N=r.onNodeLoad(c);N&&N.then(function(){var L=XC(r.state.treeData,f,v);r.setUncontrolledState({flattenNodes:L})}).catch(function(){var L=r.state.expandedKeys,$=Xs(L,P);r.setExpandedKeys($)})}}},r.onListChangeStart=function(){r.setUncontrolledState({listChanging:!0})},r.onListChangeEnd=function(){setTimeout(function(){r.setUncontrolledState({listChanging:!1})})},r.onActiveChange=function(o){var c=r.state.activeKey,f=r.props.onActiveChange;c!==o&&(r.setState({activeKey:o}),o!==null&&r.scrollTo({key:o}),f==null||f(o))},r.getActiveItem=function(){var o=r.state,c=o.activeKey,f=o.flattenNodes;return c===null?null:f.find(function(p){var g=p.key;return g===c})||null},r.offsetActiveKey=function(o){var c=r.state,f=c.flattenNodes,p=c.activeKey,g=f.findIndex(function(_){var T=_.key;return T===p});g===-1&&o<0&&(g=f.length),g=(g+o+f.length)%f.length;var v=f[g];if(v){var b=v.key;r.onActiveChange(b)}else r.onActiveChange(null)},r.onKeyDown=function(o){var c=r.state,f=c.activeKey,p=c.expandedKeys,g=c.checkedKeys,v=c.fieldNames,b=r.props,_=b.onKeyDown,T=b.checkable,k=b.selectable;switch(o.which){case Tt.UP:{r.offsetActiveKey(-1),o.preventDefault();break}case Tt.DOWN:{r.offsetActiveKey(1),o.preventDefault();break}}var P=r.getActiveItem();if(P&&P.data){var M=r.getTreeNodeRequiredProps(),O=P.data.isLeaf===!1||!!(P.data[v.children]||[]).length,N=Di(fe(fe({},qm(f,M)),{},{data:P.data,active:!0}));switch(o.which){case Tt.LEFT:{O&&p.includes(f)?r.onNodeExpand({},N):P.parent&&r.onActiveChange(P.parent.key),o.preventDefault();break}case Tt.RIGHT:{O&&!p.includes(f)?r.onNodeExpand({},N):P.children&&P.children.length&&r.onActiveChange(P.children[0].key),o.preventDefault();break}case Tt.ENTER:case Tt.SPACE:{T&&!N.disabled&&N.checkable!==!1&&!N.disableCheckbox?r.onNodeCheck({},N,!g.includes(f)):!T&&k&&!N.disabled&&N.selectable!==!1&&r.onNodeSelect({},N);break}}}_==null||_(o)},r.setUncontrolledState=function(o){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!r.destroyed){var p=!1,g=!0,v={};Object.keys(o).forEach(function(b){if(b in r.props){g=!1;return}p=!0,v[b]=o[b]}),p&&(!c||g)&&r.setState(fe(fe({},v),f))}},r.scrollTo=function(o){r.listRef.current.scrollTo(o)},r}return jr(n,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var i=this.props.activeKey;i!==void 0&&i!==this.state.activeKey&&(this.setState({activeKey:i}),i!==null&&this.scrollTo({key:i}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var i,a=this.state,s=a.focused,o=a.flattenNodes,c=a.keyEntities,f=a.draggingNodeKey,p=a.activeKey,g=a.dropLevelOffset,v=a.dropContainerKey,b=a.dropTargetKey,_=a.dropPosition,T=a.dragOverNodeKey,k=a.indent,P=this.props,M=P.prefixCls,O=P.className,N=P.style,L=P.showLine,$=P.focusable,j=P.tabIndex,U=j===void 0?0:j,G=P.selectable,Z=P.showIcon,Q=P.icon,J=P.switcherIcon,re=P.draggable,ne=P.checkable,ge=P.checkStrictly,ie=P.disabled,ue=P.motion,oe=P.loadData,me=P.filterTreeNode,Te=P.height,we=P.itemHeight,be=P.virtual,Re=P.titleRender,Ee=P.dropIndicatorRender,Me=P.onContextMenu,Ae=P.onScroll,Fe=P.direction,We=P.rootClassName,je=P.rootStyle,pt=Ql(this.props,{aria:!0,data:!0}),gt;return re&&(on(re)==="object"?gt=re:typeof re=="function"?gt={nodeDraggable:re}:gt={}),A($T.Provider,{value:{prefixCls:M,selectable:G,showIcon:Z,icon:Q,switcherIcon:J,draggable:gt,draggingNodeKey:f,checkable:ne,checkStrictly:ge,disabled:ie,keyEntities:c,dropLevelOffset:g,dropContainerKey:v,dropTargetKey:b,dropPosition:_,dragOverNodeKey:T,indent:k,direction:Fe,dropIndicatorRender:Ee,loadData:oe,filterTreeNode:me,titleRender:Re,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:A("div",{role:"tree",className:He(M,O,We,(i={},ae(i,"".concat(M,"-show-line"),L),ae(i,"".concat(M,"-focused"),s),ae(i,"".concat(M,"-active-focused"),p!==null),i)),style:je,children:A(VV,{ref:this.listRef,prefixCls:M,style:N,data:o,disabled:ie,selectable:G,checkable:!!ne,motion:ue,dragging:f!==null,height:Te,itemHeight:we,virtual:be,focusable:$,focused:s,tabIndex:U,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Me,onScroll:Ae,...this.getTreeNodeRequiredProps(),...pt})})})}}],[{key:"getDerivedStateFromProps",value:function(i,a){var s=a.prevProps,o={prevProps:i};function c($){return!s&&$ in i||s&&s[$]!==i[$]}var f,p=a.fieldNames;if(c("fieldNames")&&(p=Eb(i.fieldNames),o.fieldNames=p),c("treeData")?f=i.treeData:c("children")&&(Nr(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),f=S8(i.children)),f){o.treeData=f;var g=i1(f,{fieldNames:p});o.keyEntities=fe(ae({},Dd,BV),g.keyEntities)}var v=o.keyEntities||a.keyEntities;if(c("expandedKeys")||s&&c("autoExpandParent"))o.expandedKeys=i.autoExpandParent||!s&&i.defaultExpandParent?j4(i.expandedKeys,v):i.expandedKeys;else if(!s&&i.defaultExpandAll){var b=fe({},v);delete b[Dd],o.expandedKeys=Object.keys(b).map(function($){return b[$].key})}else!s&&i.defaultExpandedKeys&&(o.expandedKeys=i.autoExpandParent||i.defaultExpandParent?j4(i.defaultExpandedKeys,v):i.defaultExpandedKeys);if(o.expandedKeys||delete o.expandedKeys,f||o.expandedKeys){var _=XC(f||a.treeData,o.expandedKeys||a.expandedKeys,p);o.flattenNodes=_}if(i.selectable&&(c("selectedKeys")?o.selectedKeys=GD(i.selectedKeys,i):!s&&i.defaultSelectedKeys&&(o.selectedKeys=GD(i.defaultSelectedKeys,i))),i.checkable){var T;if(c("checkedKeys")?T=ZC(i.checkedKeys)||{}:!s&&i.defaultCheckedKeys?T=ZC(i.defaultCheckedKeys)||{}:f&&(T=ZC(i.checkedKeys)||{checkedKeys:a.checkedKeys,halfCheckedKeys:a.halfCheckedKeys}),T){var k=T,P=k.checkedKeys,M=P===void 0?[]:P,O=k.halfCheckedKeys,N=O===void 0?[]:O;if(!i.checkStrictly){var L=Gl(M,!0,v);M=L.checkedKeys,N=L.halfCheckedKeys}o.checkedKeys=M,o.halfCheckedKeys=N}}return c("loadedKeys")&&(o.loadedKeys=i.loadedKeys),o}}]),n}(E.exports.Component);m1.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:jme,allowDrop:function(){return!0},expandAction:!1};m1.TreeNode=Rd;var Kme={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 Wme=Kme;var UV=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:Wme})})};UV.displayName="HolderOutlined";const Gme=E.exports.forwardRef(UV);var tA=4;function qme(e){var t,n=e.dropPosition,r=e.dropLevelOffset,i=e.prefixCls,a=e.indent,s=e.direction,o=s===void 0?"ltr":s,c=o==="ltr"?"left":"right",f=o==="ltr"?"right":"left",p=(t={},ae(t,c,-r*a+tA),ae(t,f,0),t);switch(n){case-1:p.top=-3;break;case 1:p.bottom=-3;break;default:p.bottom=-3,p[c]=a+tA;break}return A("div",{style:p,className:"".concat(i,"-drop-indicator")})}var Zme={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 Xme=Zme;var jV=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:Xme})})};jV.displayName="CaretDownFilled";const Yme=E.exports.forwardRef(jV);var Qme={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 Jme=Qme;var HV=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:Jme})})};HV.displayName="FileOutlined";const KV=E.exports.forwardRef(HV);var ege={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 tge=ege;var WV=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:tge})})};WV.displayName="MinusSquareOutlined";const nge=E.exports.forwardRef(WV);var rge={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 ige=rge;var GV=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:ige})})};GV.displayName="PlusSquareOutlined";const oge=E.exports.forwardRef(GV);function qV(e,t,n,r){var i=r.isLeaf,a=r.expanded,s=r.loading;if(s)return A(Id,{className:"".concat(e,"-switcher-loading-icon")});var o;if(n&&on(n)==="object"&&(o=n.showLeafIcon),i){if(!n)return null;if(typeof o!="boolean"&&!!o){var c=typeof o=="function"?o(r):o,f="".concat(e,"-switcher-line-custom-icon");return Ia(c)?Ei(c,{className:He(c.props.className||"",f)}):c}return o?A(KV,{className:"".concat(e,"-switcher-line-icon")}):A("span",{className:"".concat(e,"-switcher-leaf-line")})}var p="".concat(e,"-switcher-icon"),g=typeof t=="function"?t(r):t;return Ia(g)?Ei(g,{className:He(g.props.className||"",p)}):g||(n?a?A(nge,{className:"".concat(e,"-switcher-line-icon")}):A(oge,{className:"".concat(e,"-switcher-line-icon")}):A(Yme,{className:p}))}var age=E.exports.forwardRef(function(e,t){var n,r=E.exports.useContext(Fn),i=r.getPrefixCls,a=r.direction,s=r.virtual,o=e.prefixCls,c=e.className,f=e.showIcon,p=f===void 0?!1:f,g=e.showLine,v=e.switcherIcon,b=e.blockNode,_=b===void 0?!1:b,T=e.children,k=e.checkable,P=k===void 0?!1:k,M=e.selectable,O=M===void 0?!0:M,N=e.draggable,L=e.motion,$=L===void 0?Be(Be({},G_),{motionAppear:!1}):L,j=i("tree",o),U=Be(Be({},e),{checkable:P,selectable:O,showIcon:p,motion:$,blockNode:_,showLine:Boolean(g),dropIndicatorRender:qme}),G=E.exports.useMemo(function(){if(!N)return!1;var Z={};switch(on(N)){case"function":Z.nodeDraggable=N;break;case"object":Z=Be({},N);break}return Z.icon!==!1&&(Z.icon=Z.icon||A(Gme,{})),Z},[N]);return A(m1,{itemHeight:20,ref:t,virtual:s,...U,prefixCls:j,className:He((n={},ae(n,"".concat(j,"-icon-hide"),!p),ae(n,"".concat(j,"-block-node"),_),ae(n,"".concat(j,"-unselectable"),!O),ae(n,"".concat(j,"-rtl"),a==="rtl"),n),c),direction:a,checkable:P&&A("span",{className:"".concat(j,"-checkbox-inner")}),selectable:O,switcherIcon:function(Q){return qV(j,v,g,Q)},draggable:G,children:T})});const ZV=age;var sge={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 lge=sge;var XV=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:lge})})};XV.displayName="FolderOpenOutlined";const uge=E.exports.forwardRef(XV);var cge={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 dge=cge;var YV=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:dge})})};YV.displayName="FolderOutlined";const fge=E.exports.forwardRef(YV);var Nl;(function(e){e[e.None=0]="None",e[e.Start=1]="Start",e[e.End=2]="End"})(Nl||(Nl={}));function QT(e,t){function n(r){var i=r.key,a=r.children;t(i,r)!==!1&&QT(a||[],t)}e.forEach(n)}function hge(e){var t=e.treeData,n=e.expandedKeys,r=e.startKey,i=e.endKey,a=[],s=Nl.None;if(r&&r===i)return[r];if(!r||!i)return[];function o(c){return c===r||c===i}return QT(t,function(c){if(s===Nl.End)return!1;if(o(c)){if(a.push(c),s===Nl.None)s=Nl.Start;else if(s===Nl.Start)return s=Nl.End,!1}else s===Nl.Start&&a.push(c);return n.includes(c)}),a}function sS(e,t){var n=Rt(t),r=[];return QT(e,function(i,a){var s=n.indexOf(i);return s!==-1&&(r.push(a),n.splice(s,1)),!!n.length}),r}var nA=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function pge(e){var t=e.isLeaf,n=e.expanded;return t?A(KV,{}):n?A(uge,{}):A(fge,{})}function rA(e){var t=e.treeData,n=e.children;return t||S8(n)}var mge=function(t,n){var r=t.defaultExpandAll,i=t.defaultExpandParent,a=t.defaultExpandedKeys,s=nA(t,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]),o=E.exports.useRef(),c=E.exports.useRef(),f=function(){var ue=i1(rA(s)),oe=ue.keyEntities,me;return r?me=Object.keys(oe):i?me=j4(s.expandedKeys||a||[],oe):me=s.expandedKeys||a,me},p=E.exports.useState(s.selectedKeys||s.defaultSelectedKeys||[]),g=$e(p,2),v=g[0],b=g[1],_=E.exports.useState(function(){return f()}),T=$e(_,2),k=T[0],P=T[1];E.exports.useEffect(function(){"selectedKeys"in s&&b(s.selectedKeys)},[s.selectedKeys]),E.exports.useEffect(function(){"expandedKeys"in s&&P(s.expandedKeys)},[s.expandedKeys]);var M=function(ue,oe){var me;return"expandedKeys"in s||P(ue),(me=s.onExpand)===null||me===void 0?void 0:me.call(s,ue,oe)},O=function(ue,oe){var me,Te=s.multiple,we=oe.node,be=oe.nativeEvent,Re=we.key,Ee=Re===void 0?"":Re,Me=rA(s),Ae=Be(Be({},oe),{selected:!0}),Fe=(be==null?void 0:be.ctrlKey)||(be==null?void 0:be.metaKey),We=be==null?void 0:be.shiftKey,je;Te&&Fe?(je=ue,o.current=Ee,c.current=je,Ae.selectedNodes=sS(Me,je)):Te&&We?(je=Array.from(new Set([].concat(Rt(c.current||[]),Rt(hge({treeData:Me,expandedKeys:k,startKey:Ee,endKey:o.current}))))),Ae.selectedNodes=sS(Me,je)):(je=[Ee],o.current=Ee,c.current=je,Ae.selectedNodes=sS(Me,je)),(me=s.onSelect)===null||me===void 0||me.call(s,je,Ae),"selectedKeys"in s||b(je)},N=E.exports.useContext(Fn),L=N.getPrefixCls,$=N.direction,j=s.prefixCls,U=s.className,G=s.showIcon,Z=G===void 0?!0:G,Q=s.expandAction,J=Q===void 0?"click":Q,re=nA(s,["prefixCls","className","showIcon","expandAction"]),ne=L("tree",j),ge=He("".concat(ne,"-directory"),ae({},"".concat(ne,"-directory-rtl"),$==="rtl"),U);return A(ZV,{icon:pge,ref:n,blockNode:!0,...re,showIcon:Z,expandAction:J,prefixCls:ne,className:ge,expandedKeys:k,selectedKeys:v,onSelect:O,onExpand:M})},gge=E.exports.forwardRef(mge);const vge=gge;var JT=ZV;JT.DirectoryTree=vge;JT.TreeNode=Rd;const yge=JT;function xge(e){var t=E.exports.useRef(e),n=TT();return[function(){return t.current},function(r){t.current=r,n()}]}function iA(e){var t=e.value,n=e.onChange,r=e.filterSearch,i=e.tablePrefixCls,a=e.locale;return r?A("div",{className:"".concat(i,"-filter-dropdown-search"),children:A(Sse,{prefix:A(PT,{}),placeholder:a.filterSearchPlaceholder,onChange:n,value:t,htmlSize:1,className:"".concat(i,"-filter-dropdown-search-input")})}):null}var bge=function(t){var n=t.keyCode;n===Tt.ENTER&&t.stopPropagation()},_ge=function(t){return A("div",{className:t.className,onClick:function(r){return r.stopPropagation()},onKeyDown:bge,children:t.children})};const wge=_ge;function Cge(e){return e.some(function(t){var n=t.children;return n})}function QV(e,t){return typeof t=="string"||typeof t=="number"?t==null?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()):!1}function JV(e){var t=e.filters,n=e.prefixCls,r=e.filteredKeys,i=e.filterMultiple,a=e.searchValue,s=e.filterSearch;return t.map(function(o,c){var f=String(o.value);if(o.children)return{key:f||c,label:o.text,popupClassName:"".concat(n,"-dropdown-submenu"),children:JV({filters:o.children,prefixCls:n,filteredKeys:r,filterMultiple:i,searchValue:a,filterSearch:s})};var p=i?_h:_8,g={key:o.value!==void 0?f:c,label:it(nr,{children:[A(p,{checked:r.includes(f)}),A("span",{children:o.text})]})};return a.trim()?typeof s=="function"?s(a,o)?g:null:QV(a,o.text)?g:null:g})}function Sge(e){var t,n=e.tablePrefixCls,r=e.prefixCls,i=e.column,a=e.dropdownPrefixCls,s=e.columnKey,o=e.filterMultiple,c=e.filterMode,f=c===void 0?"menu":c,p=e.filterSearch,g=p===void 0?!1:p,v=e.filterState,b=e.triggerFilter,_=e.locale,T=e.children,k=e.getPopupContainer,P=i.filterDropdownOpen,M=i.onFilterDropdownOpenChange,O=i.filterDropdownVisible,N=i.onFilterDropdownVisibleChange,L=i.filterResetToDefaultFilteredValue,$=i.defaultFilteredValue,j=E.exports.useState(!1),U=$e(j,2),G=U[0],Z=U[1],Q=!!(v&&(((t=v.filteredKeys)===null||t===void 0?void 0:t.length)||v.forceFiltered)),J=function(Qe){Z(Qe),M==null||M(Qe),N==null||N(Qe)},re;typeof P=="boolean"?re=P:re=typeof O=="boolean"?O:G;var ne=v==null?void 0:v.filteredKeys,ge=xge(ne||[]),ie=$e(ge,2),ue=ie[0],oe=ie[1],me=function(Qe){var Zt=Qe.selectedKeys;oe(Zt)},Te=function(Qe,Zt){var an=Zt.node,Kt=Zt.checked;me(o?{selectedKeys:Qe}:{selectedKeys:Kt&&an.key?[an.key]:[]})};E.exports.useEffect(function(){!G||me({selectedKeys:ne||[]})},[ne]);var we=E.exports.useState([]),be=$e(we,2),Re=be[0],Ee=be[1],Me=function(Qe){Ee(Qe)},Ae=E.exports.useState(""),Fe=$e(Ae,2),We=Fe[0],je=Fe[1],pt=function(Qe){var Zt=Qe.target.value;je(Zt)};E.exports.useEffect(function(){G||je("")},[G]);var gt=function(Qe){var Zt=Qe&&Qe.length?Qe:null;if(Zt===null&&(!v||!v.filteredKeys)||ZO(Zt,v==null?void 0:v.filteredKeys))return null;b({column:i,key:s,filteredKeys:Zt})},Ot=function(){J(!1),gt(ue())},Ze=function(){var Qe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1},Zt=Qe.confirm,an=Qe.closeDropdown;Zt&&gt([]),an&&J(!1),je(""),oe(L?($||[]).map(function(Kt){return String(Kt)}):[])},St=function(){var Qe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0},Zt=Qe.closeDropdown;Zt&&J(!1),gt(ue())},ot=function(Qe){Qe&&ne!==void 0&&oe(ne||[]),J(Qe),!Qe&&!i.filterDropdown&&Ot()},vt=He(ae({},"".concat(a,"-menu-without-submenu"),!Cge(i.filters||[]))),yt=function(Qe){if(Qe.target.checked){var Zt=oh(i==null?void 0:i.filters).map(function(an){return String(an)});oe(Zt)}else oe([])},kt=function ze(Qe){var Zt=Qe.filters;return(Zt||[]).map(function(an,Kt){var Vt=String(an.value),It={title:an.text,key:an.value!==void 0?Vt:Kt};return an.children&&(It.children=ze({filters:an.children})),It})},et=function ze(Qe){var Zt;return Be(Be({},Qe),{text:Qe.title,value:Qe.key,children:((Zt=Qe.children)===null||Zt===void 0?void 0:Zt.map(function(an){return ze(an)}))||[]})},ut;if(typeof i.filterDropdown=="function")ut=i.filterDropdown({prefixCls:"".concat(a,"-custom"),setSelectedKeys:function(Qe){return me({selectedKeys:Qe})},selectedKeys:ue(),confirm:St,clearFilters:Ze,filters:i.filters,visible:re,close:function(){J(!1)}});else if(i.filterDropdown)ut=i.filterDropdown;else{var at=ue()||[],Ke=function(){return(i.filters||[]).length===0?A(nl,{image:nl.PRESENTED_IMAGE_SIMPLE,description:_.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):f==="tree"?it(nr,{children:[A(iA,{filterSearch:g,value:We,onChange:pt,tablePrefixCls:n,locale:_}),it("div",{className:"".concat(n,"-filter-dropdown-tree"),children:[o?A(_h,{checked:at.length===oh(i.filters).length,indeterminate:at.length>0&&at.length<oh(i.filters).length,className:"".concat(n,"-filter-dropdown-checkall"),onChange:yt,children:_.filterCheckall}):null,A(yge,{checkable:!0,selectable:!1,blockNode:!0,multiple:o,checkStrictly:!o,className:"".concat(a,"-menu"),onCheck:Te,checkedKeys:at,selectedKeys:at,showIcon:!1,treeData:kt({filters:i.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:We.trim()?function(Qe){return typeof g=="function"?g(We,et(Qe)):QV(We,Qe.title)}:void 0})]})]}):it(nr,{children:[A(iA,{filterSearch:g,value:We,onChange:pt,tablePrefixCls:n,locale:_}),A(a8,{selectable:!0,multiple:o,prefixCls:"".concat(a,"-menu"),className:vt,onSelect:me,onDeselect:me,selectedKeys:at,getPopupContainer:k,openKeys:Re,onOpenChange:Me,items:JV({filters:i.filters||[],filterSearch:g,prefixCls:r,filteredKeys:ue(),filterMultiple:o,searchValue:We})})]})},ct=function(){return L?ZO(($||[]).map(function(Qe){return String(Qe)}),at):at.length===0};ut=it(nr,{children:[Ke(),it("div",{className:"".concat(r,"-dropdown-btns"),children:[A(Xr,{type:"link",size:"small",disabled:ct(),onClick:function(){return Ze()},children:_.filterReset}),A(Xr,{type:"primary",size:"small",onClick:Ot,children:_.filterConfirm})]})]})}i.filterDropdown&&(ut=A(o8,{selectable:void 0,children:ut}));var bt=function(){return A(wge,{className:"".concat(r,"-dropdown"),children:ut})},At;typeof i.filterIcon=="function"?At=i.filterIcon(Q):i.filterIcon?At=i.filterIcon:At=A(Oue,{});var Lt=E.exports.useContext(Fn),Ht=Lt.direction;return it("div",{className:"".concat(r,"-column"),children:[A("span",{className:"".concat(n,"-column-title"),children:T}),A(t1,{dropdownRender:bt,trigger:["click"],open:re,onOpenChange:ot,getPopupContainer:k,placement:Ht==="rtl"?"bottomLeft":"bottomRight",children:A("span",{role:"button",tabIndex:-1,className:He("".concat(r,"-trigger"),{active:Q}),onClick:function(Qe){Qe.stopPropagation()},children:At})})]})}function iE(e,t,n){var r=[];return(e||[]).forEach(function(i,a){var s,o=u1(a,n);if(i.filters||"filterDropdown"in i||"onFilter"in i)if("filteredValue"in i){var c=i.filteredValue;"filterDropdown"in i||(c=(s=c==null?void 0:c.map(String))!==null&&s!==void 0?s:c),r.push({column:i,key:wh(i,o),filteredKeys:c,forceFiltered:i.filtered})}else r.push({column:i,key:wh(i,o),filteredKeys:t&&i.defaultFilteredValue?i.defaultFilteredValue:void 0,forceFiltered:i.filtered});"children"in i&&(r=[].concat(Rt(r),Rt(iE(i.children,t,o))))}),r}function eU(e,t,n,r,i,a,s,o){return n.map(function(c,f){var p=u1(f,o),g=c.filterMultiple,v=g===void 0?!0:g,b=c.filterMode,_=c.filterSearch,T=c;if(T.filters||T.filterDropdown){var k=wh(T,p),P=r.find(function(M){var O=M.key;return k===O});T=Be(Be({},T),{title:function(O){return A(Sge,{tablePrefixCls:e,prefixCls:"".concat(e,"-filter"),dropdownPrefixCls:t,column:T,columnKey:k,filterState:P,filterMultiple:v,filterMode:b,filterSearch:_,triggerFilter:i,locale:s,getPopupContainer:a,children:c1(c.title,O)})}})}return"children"in T&&(T=Be(Be({},T),{children:eU(e,t,T.children,r,i,a,s,p)})),T})}function oh(e){var t=[];return(e||[]).forEach(function(n){var r=n.value,i=n.children;t.push(r),i&&(t=[].concat(Rt(t),Rt(oh(i))))}),t}function oA(e){var t={};return e.forEach(function(n){var r=n.key,i=n.filteredKeys,a=n.column,s=a.filters,o=a.filterDropdown;if(o)t[r]=i||null;else if(Array.isArray(i)){var c=oh(s);t[r]=c.filter(function(f){return i.includes(String(f))})}else t[r]=null}),t}function aA(e,t){return t.reduce(function(n,r){var i=r.column,a=i.onFilter,s=i.filters,o=r.filteredKeys;return a&&o&&o.length?n.filter(function(c){return o.some(function(f){var p=oh(s),g=p.findIndex(function(b){return String(b)===String(f)}),v=g!==-1?p[g]:f;return a(v,c)})}):n},e)}function Ege(e){var t=e.prefixCls,n=e.dropdownPrefixCls,r=e.mergedColumns,i=e.onFilterChange,a=e.getPopupContainer,s=e.locale,o=E.exports.useState(function(){return iE(r,!0)}),c=$e(o,2),f=c[0],p=c[1],g=E.exports.useMemo(function(){var T=iE(r,!1),k=!0;return T.forEach(function(P){var M=P.filteredKeys;M!==void 0&&(k=!1)}),k?f:T},[r,f]),v=E.exports.useMemo(function(){return oA(g)},[g]),b=function(k){var P=g.filter(function(M){var O=M.key;return O!==k.key});P.push(k),p(P),i(oA(P),P)},_=function(k){return eU(t,n,k,g,b,a,s)};return[_,g,v]}function Pge(e,t,n){var r=E.exports.useRef({});function i(a){if(!r.current||r.current.data!==e||r.current.childrenColumnName!==t||r.current.getRowKey!==n){let c=function(f){f.forEach(function(p,g){var v=n(p,g);s.set(v,p),p&&on(p)==="object"&&t in p&&c(p[t]||[])})};var o=c,s=new Map;c(e),r.current={data:e,childrenColumnName:t,kvMap:s,getRowKey:n}}return r.current.kvMap.get(a)}return[i]}var Tge=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},tU=10;function kge(e,t){var n={current:t.current,pageSize:t.pageSize},r=e&&on(e)==="object"?e:{};return Object.keys(r).forEach(function(i){var a=t[i];typeof a!="function"&&(n[i]=a)}),n}function Ige(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(i){i&&Object.keys(i).forEach(function(a){var s=i[a];s!==void 0&&(e[a]=s)})}),e}function Mge(e,t,n){var r=t&&on(t)==="object"?t:{},i=r.total,a=i===void 0?0:i,s=Tge(r,["total"]),o=E.exports.useState(function(){return{current:"defaultCurrent"in s?s.defaultCurrent:1,pageSize:"defaultPageSize"in s?s.defaultPageSize:tU}}),c=$e(o,2),f=c[0],p=c[1],g=Ige(f,s,{total:a>0?a:e}),v=Math.ceil((a||e)/g.pageSize);g.current>v&&(g.current=v||1);var b=function(k,P){p({current:k!=null?k:1,pageSize:P||g.pageSize})},_=function(k,P){var M;t&&((M=t.onChange)===null||M===void 0||M.call(t,k,P)),b(k,P),n(k,P||(g==null?void 0:g.pageSize))};return t===!1?[{},function(){}]:[Be(Be({},g),{onChange:_}),b]}var Pu={},oE="SELECT_ALL",aE="SELECT_INVERT",sE="SELECT_NONE",sA=[];function nU(e,t){var n=[];return(e||[]).forEach(function(r){n.push(r),r&&on(r)==="object"&&t in r&&(n=[].concat(Rt(n),Rt(nU(r[t],t))))}),n}function Rge(e,t){var n=e||{},r=n.preserveSelectedRowKeys,i=n.selectedRowKeys,a=n.defaultSelectedRowKeys,s=n.getCheckboxProps,o=n.onChange,c=n.onSelect,f=n.onSelectAll,p=n.onSelectInvert,g=n.onSelectNone,v=n.onSelectMultiple,b=n.columnWidth,_=n.type,T=n.selections,k=n.fixed,P=n.renderCell,M=n.hideSelectAll,O=n.checkStrictly,N=O===void 0?!0:O,L=t.prefixCls,$=t.data,j=t.pageData,U=t.getRecordByKey,G=t.getRowKey,Z=t.expandType,Q=t.childrenColumnName,J=t.locale,re=t.getPopupContainer,ne=Si(i||a||sA,{value:i}),ge=$e(ne,2),ie=ge[0],ue=ge[1],oe=E.exports.useRef(new Map),me=E.exports.useCallback(function(et){if(r){var ut=new Map;et.forEach(function(at){var Ke=U(at);!Ke&&oe.current.has(at)&&(Ke=oe.current.get(at)),ut.set(at,Ke)}),oe.current=ut}},[U,r]);E.exports.useEffect(function(){me(ie)},[ie]);var Te=E.exports.useMemo(function(){return N?{keyEntities:null}:i1($,{externalGetKey:G,childrenPropName:Q})},[$,G,N,Q]),we=Te.keyEntities,be=E.exports.useMemo(function(){return nU(j,Q)},[j,Q]),Re=E.exports.useMemo(function(){var et=new Map;return be.forEach(function(ut,at){var Ke=G(ut,at),ct=(s?s(ut):null)||{};et.set(Ke,ct)}),et},[be,G,s]),Ee=E.exports.useCallback(function(et){var ut;return!!(!((ut=Re.get(G(et)))===null||ut===void 0)&&ut.disabled)},[Re,G]),Me=E.exports.useMemo(function(){if(N)return[ie||[],[]];var et=Gl(ie,!0,we,Ee),ut=et.checkedKeys,at=et.halfCheckedKeys;return[ut||[],at]},[ie,N,we,Ee]),Ae=$e(Me,2),Fe=Ae[0],We=Ae[1],je=E.exports.useMemo(function(){var et=_==="radio"?Fe.slice(0,1):Fe;return new Set(et)},[Fe,_]),pt=E.exports.useMemo(function(){return _==="radio"?new Set:new Set(We)},[We,_]),gt=E.exports.useState(null),Ot=$e(gt,2),Ze=Ot[0],St=Ot[1];E.exports.useEffect(function(){e||ue(sA)},[!!e]);var ot=E.exports.useCallback(function(et,ut){var at,Ke;me(et),r?(at=et,Ke=et.map(function(ct){return oe.current.get(ct)})):(at=[],Ke=[],et.forEach(function(ct){var bt=U(ct);bt!==void 0&&(at.push(ct),Ke.push(bt))})),ue(at),o==null||o(at,Ke,{type:ut})},[ue,U,o,r]),vt=E.exports.useCallback(function(et,ut,at,Ke){if(c){var ct=at.map(function(bt){return U(bt)});c(U(et),ut,ct,Ke)}ot(at,"single")},[c,U,ot]),yt=E.exports.useMemo(function(){if(!T||M)return null;var et=T===!0?[oE,aE,sE]:T;return et.map(function(ut){return ut===oE?{key:"all",text:J.selectionAll,onSelect:function(){ot($.map(function(Ke,ct){return G(Ke,ct)}).filter(function(Ke){var ct=Re.get(Ke);return!(ct!=null&&ct.disabled)||je.has(Ke)}),"all")}}:ut===aE?{key:"invert",text:J.selectInvert,onSelect:function(){var Ke=new Set(je);j.forEach(function(bt,At){var Lt=G(bt,At),Ht=Re.get(Lt);Ht!=null&&Ht.disabled||(Ke.has(Lt)?Ke.delete(Lt):Ke.add(Lt))});var ct=Array.from(Ke);p&&p(ct),ot(ct,"invert")}}:ut===sE?{key:"none",text:J.selectNone,onSelect:function(){g==null||g(),ot(Array.from(je).filter(function(Ke){var ct=Re.get(Ke);return ct==null?void 0:ct.disabled}),"none")}}:ut}).map(function(ut){return Be(Be({},ut),{onSelect:function(){for(var Ke,ct,bt=arguments.length,At=new Array(bt),Lt=0;Lt<bt;Lt++)At[Lt]=arguments[Lt];(ct=ut.onSelect)===null||ct===void 0||(Ke=ct).call.apply(Ke,[ut].concat(At)),St(null)}})})},[T,je,j,G,p,ot]),kt=E.exports.useCallback(function(et){var ut;if(!e)return et.filter(function(tn){return tn!==Pu});var at=Rt(et),Ke=new Set(je),ct=be.map(G).filter(function(tn){return!Re.get(tn).disabled}),bt=ct.every(function(tn){return Ke.has(tn)}),At=ct.some(function(tn){return Ke.has(tn)}),Lt=function(){var zt=[];bt?ct.forEach(function(mt){Ke.delete(mt),zt.push(mt)}):ct.forEach(function(mt){Ke.has(mt)||(Ke.add(mt),zt.push(mt))});var dt=Array.from(Ke);f==null||f(!bt,dt.map(function(mt){return U(mt)}),zt.map(function(mt){return U(mt)})),ot(dt,"all"),St(null)},Ht;if(_!=="radio"){var ze;if(yt){var Qe={getPopupContainer:re,items:yt.map(function(tn,zt){var dt=tn.key,mt=tn.text,$t=tn.onSelect;return{key:dt||zt,onClick:function(){$t==null||$t(ct)},label:mt}})};ze=A("div",{className:"".concat(L,"-selection-extra"),children:A(t1,{menu:Qe,getPopupContainer:re,children:A("span",{children:A(MB,{})})})})}var Zt=be.map(function(tn,zt){var dt=G(tn,zt),mt=Re.get(dt)||{};return Be({checked:Ke.has(dt)},mt)}).filter(function(tn){var zt=tn.disabled;return zt}),an=!!Zt.length&&Zt.length===be.length,Kt=an&&Zt.every(function(tn){var zt=tn.checked;return zt}),Vt=an&&Zt.some(function(tn){var zt=tn.checked;return zt});Ht=!M&&it("div",{className:"".concat(L,"-selection"),children:[A(_h,{checked:an?Kt:!!be.length&&bt,indeterminate:an?!Kt&&Vt:!bt&&At,onChange:Lt,disabled:be.length===0||an,"aria-label":ze?"Custom selection":"Select all",skipGroup:!0}),ze]})}var It;_==="radio"?It=function(zt,dt,mt){var $t=G(dt,mt),Wt=Ke.has($t);return{node:A(_8,{...Re.get($t),checked:Wt,onClick:function(An){return An.stopPropagation()},onChange:function(An){Ke.has($t)||vt($t,!0,[$t],An.nativeEvent)}}),checked:Wt}}:It=function(zt,dt,mt){var $t,Wt=G(dt,mt),mn=Ke.has(Wt),An=pt.has(Wt),Qn=Re.get(Wt),Jn;return Z==="nest"?Jn=An:Jn=($t=Qn==null?void 0:Qn.indeterminate)!==null&&$t!==void 0?$t:An,{node:A(_h,{...Qn,indeterminate:Jn,checked:mn,skipGroup:!0,onClick:function(W){return W.stopPropagation()},onChange:function(W){var X=W.nativeEvent,de=X.shiftKey,le=-1,xe=-1;if(de&&N){var Ie=new Set([Ze,Wt]);ct.some(function(Gt,wn){if(Ie.has(Gt))if(le===-1)le=wn;else return xe=wn,!0;return!1})}if(xe!==-1&&le!==xe&&N){var Ce=ct.slice(le,xe+1),Pe=[];mn?Ce.forEach(function(Gt){Ke.has(Gt)&&(Pe.push(Gt),Ke.delete(Gt))}):Ce.forEach(function(Gt){Ke.has(Gt)||(Pe.push(Gt),Ke.add(Gt))});var Le=Array.from(Ke);v==null||v(!mn,Le.map(function(Gt){return U(Gt)}),Pe.map(function(Gt){return U(Gt)})),ot(Le,"multiple")}else{var Xe=Fe;if(N){var Ye=mn?Xs(Xe,Wt):Rl(Xe,Wt);vt(Wt,!mn,Ye,X)}else{var Ue=Gl([].concat(Rt(Xe),[Wt]),!0,we,Ee),Bt=Ue.checkedKeys,Pt=Ue.halfCheckedKeys,nt=Bt;if(mn){var Ft=new Set(Bt);Ft.delete(Wt),nt=Gl(Array.from(Ft),{checked:!1,halfCheckedKeys:Pt},we,Ee).checkedKeys}vt(Wt,!mn,nt,X)}}St(mn?null:Wt)}}),checked:mn}};var Xt=function(zt,dt,mt){var $t=It(zt,dt,mt),Wt=$t.node,mn=$t.checked;return P?P(mn,dt,mt,Wt):Wt};if(!at.includes(Pu))if(at.findIndex(function(tn){var zt;return((zt=tn[Xm])===null||zt===void 0?void 0:zt.columnType)==="EXPAND_COLUMN"})===0){var pn=at,tt=QP(pn),Nt=tt[0],qt=tt.slice(1);at=[Nt,Pu].concat(Rt(qt))}else at=[Pu].concat(Rt(at));var En=at.indexOf(Pu);at=at.filter(function(tn,zt){return tn!==Pu||zt===En});var yn=at[En-1],Et=at[En+1],Pn=k;Pn===void 0&&((Et==null?void 0:Et.fixed)!==void 0?Pn=Et.fixed:(yn==null?void 0:yn.fixed)!==void 0&&(Pn=yn.fixed)),Pn&&yn&&((ut=yn[Xm])===null||ut===void 0?void 0:ut.columnType)==="EXPAND_COLUMN"&&yn.fixed===void 0&&(yn.fixed=Pn);var _n=ae({fixed:Pn,width:b,className:"".concat(L,"-selection-column"),title:e.columnTitle||Ht,render:Xt},Xm,{className:"".concat(L,"-selection-col")});return at.map(function(tn){return tn===Pu?_n:tn})},[G,be,e,Fe,je,pt,b,yt,Z,Ze,Re,v,vt,Ee]);return[kt,je]}var Dge={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 Oge=Dge;var rU=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:Oge})})};rU.displayName="CaretDownOutlined";const Age=E.exports.forwardRef(rU);var Nge={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 Lge=Nge;var iU=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:Lge})})};iU.displayName="CaretUpOutlined";const Fge=E.exports.forwardRef(iU);var gx="ascend",lS="descend";function Rb(e){return on(e.sorter)==="object"&&typeof e.sorter.multiple=="number"?e.sorter.multiple:!1}function lA(e){return typeof e=="function"?e:e&&on(e)==="object"&&e.compare?e.compare:!1}function zge(e,t){return t?e[e.indexOf(t)+1]:e[0]}function lE(e,t,n){var r=[];function i(a,s){r.push({column:a,key:wh(a,s),multiplePriority:Rb(a),sortOrder:a.sortOrder})}return(e||[]).forEach(function(a,s){var o=u1(s,n);a.children?("sortOrder"in a&&i(a,o),r=[].concat(Rt(r),Rt(lE(a.children,t,o)))):a.sorter&&("sortOrder"in a?i(a,o):t&&a.defaultSortOrder&&r.push({column:a,key:wh(a,o),multiplePriority:Rb(a),sortOrder:a.defaultSortOrder}))}),r}function oU(e,t,n,r,i,a,s,o){return(t||[]).map(function(c,f){var p=u1(f,o),g=c;if(g.sorter){var v=g.sortDirections||i,b=g.showSorterTooltip===void 0?s:g.showSorterTooltip,_=wh(g,p),T=n.find(function(Z){var Q=Z.key;return Q===_}),k=T?T.sortOrder:null,P=zge(v,k),M=v.includes(gx)&&A(Fge,{className:He("".concat(e,"-column-sorter-up"),{active:k===gx}),role:"presentation"}),O=v.includes(lS)&&A(Age,{className:He("".concat(e,"-column-sorter-down"),{active:k===lS}),role:"presentation"}),N=a||{},L=N.cancelSort,$=N.triggerAsc,j=N.triggerDesc,U=L;P===lS?U=j:P===gx&&(U=$);var G=on(b)==="object"?b:{title:U};g=Be(Be({},g),{className:He(g.className,ae({},"".concat(e,"-column-sort"),k)),title:function(Q){var J=it("div",{className:"".concat(e,"-column-sorters"),children:[A("span",{className:"".concat(e,"-column-title"),children:c1(c.title,Q)}),A("span",{className:He("".concat(e,"-column-sorter"),ae({},"".concat(e,"-column-sorter-full"),!!(M&&O))),children:it("span",{className:"".concat(e,"-column-sorter-inner"),children:[M,O]})})]});return b?A(Ra,{...G,children:J}):J},onHeaderCell:function(Q){var J=c.onHeaderCell&&c.onHeaderCell(Q)||{},re=J.onClick,ne=J.onKeyDown;J.onClick=function(ue){r({column:c,key:_,sortOrder:P,multiplePriority:Rb(c)}),re==null||re(ue)},J.onKeyDown=function(ue){ue.keyCode===Tt.ENTER&&(r({column:c,key:_,sortOrder:P,multiplePriority:Rb(c)}),ne==null||ne(ue))};var ge=Mue(c.title,{}),ie=ge==null?void 0:ge.toString();return k?J["aria-sort"]=k==="ascend"?"ascending":"descending":J["aria-label"]=ie||"",J.className=He(J.className,"".concat(e,"-column-has-sorters")),J.tabIndex=0,c.ellipsis&&(J.title=(ge!=null?ge:"").toString()),J}})}return"children"in g&&(g=Be(Be({},g),{children:oU(e,g.children,n,r,i,a,s,p)})),g})}function uA(e){var t=e.column,n=e.sortOrder;return{column:t,order:n,field:t.dataIndex,columnKey:t.key}}function cA(e){var t=e.filter(function(n){var r=n.sortOrder;return r}).map(uA);return t.length===0&&e.length?Be(Be({},uA(e[e.length-1])),{column:void 0}):t.length<=1?t[0]||{}:t}function uE(e,t,n){var r=t.slice().sort(function(s,o){return o.multiplePriority-s.multiplePriority}),i=e.slice(),a=r.filter(function(s){var o=s.column.sorter,c=s.sortOrder;return lA(o)&&c});return a.length?i.sort(function(s,o){for(var c=0;c<a.length;c+=1){var f=a[c],p=f.column.sorter,g=f.sortOrder,v=lA(p);if(v&&g){var b=v(s,o,g);if(b!==0)return g===gx?b:-b}}return 0}).map(function(s){var o=s[n];return o?Be(Be({},s),ae({},n,uE(o,t,n))):s}):i}function $ge(e){var t=e.prefixCls,n=e.mergedColumns,r=e.onSorterChange,i=e.sortDirections,a=e.tableLocale,s=e.showSorterTooltip,o=E.exports.useState(lE(n,!0)),c=$e(o,2),f=c[0],p=c[1],g=E.exports.useMemo(function(){var k=!0,P=lE(n,!1);if(!P.length)return f;var M=[];function O(L){k?M.push(L):M.push(Be(Be({},L),{sortOrder:null}))}var N=null;return P.forEach(function(L){N===null?(O(L),L.sortOrder&&(L.multiplePriority===!1?k=!1:N=!0)):(N&&L.multiplePriority!==!1||(k=!1),O(L))}),M},[n,f]),v=E.exports.useMemo(function(){var k=g.map(function(P){var M=P.column,O=P.sortOrder;return{column:M,order:O}});return{sortColumns:k,sortColumn:k[0]&&k[0].column,sortOrder:k[0]&&k[0].order}},[g]);function b(k){var P;k.multiplePriority===!1||!g.length||g[0].multiplePriority===!1?P=[k]:P=[].concat(Rt(g.filter(function(M){var O=M.key;return O!==k.key})),[k]),p(P),r(cA(P),P)}var _=function(P){return oU(t,P,g,b,i,a,s)},T=function(){return cA(g)};return[_,g,v,T]}function aU(e,t){return e.map(function(n){var r=Be({},n);return r.title=c1(n.title,t),"children"in r&&(r.children=aU(r.children,t)),r})}function Bge(e){var t=E.exports.useCallback(function(n){return aU(n,e)},[e]);return[t]}var Vge=[];function Uge(e,t){var n,r=e.prefixCls,i=e.className,a=e.style,s=e.size,o=e.bordered,c=e.dropdownPrefixCls,f=e.dataSource,p=e.pagination,g=e.rowSelection,v=e.rowKey,b=v===void 0?"key":v,_=e.rowClassName,T=e.columns,k=e.children,P=e.childrenColumnName,M=e.onChange,O=e.getPopupContainer,N=e.loading,L=e.expandIcon,$=e.expandable,j=e.expandedRowRender,U=e.expandIconColumnIndex,G=e.indentSize,Z=e.scroll,Q=e.sortDirections,J=e.locale,re=e.showSorterTooltip,ne=re===void 0?!0:re;[["filterDropdownVisible","filterDropdownOpen"],["onFilterDropdownVisibleChange","onFilterDropdownOpenChange"]].forEach(function(Ye){var Ue=$e(Ye,2);Ue[0],Ue[1]});var ge=E.exports.useMemo(function(){return T||XT(k)},[T,k]),ie=E.exports.useMemo(function(){return ge.some(function(Ye){return Ye.responsive})},[ge]),ue=NB(ie),oe=E.exports.useMemo(function(){var Ye=new Set(Object.keys(ue).filter(function(Ue){return ue[Ue]}));return ge.filter(function(Ue){return!Ue.responsive||Ue.responsive.some(function(Bt){return Ye.has(Bt)})})},[ge,ue]),me=Wi(e,["className","style","columns"]),Te=E.exports.useContext(nu),we=E.exports.useContext(Fn),be=we.locale,Re=be===void 0?Os:be,Ee=we.renderEmpty,Me=we.direction,Ae=s||Te,Fe=Be(Be({},Re.Table),J),We=f||Vge,je=E.exports.useContext(Fn),pt=je.getPrefixCls,gt=pt("table",r),Ot=pt("dropdown",c),Ze=Be({childrenColumnName:P,expandIconColumnIndex:U},$),St=Ze.childrenColumnName,ot=St===void 0?"children":St,vt=E.exports.useMemo(function(){return We.some(function(Ye){return Ye==null?void 0:Ye[ot]})?"nest":j||$&&$.expandedRowRender?"row":null},[We]),yt={body:E.exports.useRef()},kt=E.exports.useMemo(function(){return typeof b=="function"?b:function(Ye){return Ye==null?void 0:Ye[b]}},[b]),et=Pge(We,ot,kt),ut=$e(et,1),at=ut[0],Ke={},ct=function(Ue,Bt){var Pt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,nt=Be(Be({},Ke),Ue);Pt&&(Ke.resetPagination(),nt.pagination.current&&(nt.pagination.current=1),p&&p.onChange&&p.onChange(1,nt.pagination.pageSize)),Z&&Z.scrollToFirstRowOnChange!==!1&&yt.body.current&&uee(0,{getContainer:function(){return yt.body.current}}),M==null||M(nt.pagination,nt.filters,nt.sorter,{currentDataSource:aA(uE(We,nt.sorterStates,ot),nt.filterStates),action:Bt})},bt=function(Ue,Bt){ct({sorter:Ue,sorterStates:Bt},"sort",!1)},At=$ge({prefixCls:gt,mergedColumns:oe,onSorterChange:bt,sortDirections:Q||["ascend","descend"],tableLocale:Fe,showSorterTooltip:ne}),Lt=$e(At,4),Ht=Lt[0],ze=Lt[1],Qe=Lt[2],Zt=Lt[3],an=E.exports.useMemo(function(){return uE(We,ze,ot)},[We,ze]);Ke.sorter=Zt(),Ke.sorterStates=ze;var Kt=function(Ue,Bt){ct({filters:Ue,filterStates:Bt},"filter",!0)},Vt=Ege({prefixCls:gt,locale:Fe,dropdownPrefixCls:Ot,mergedColumns:oe,onFilterChange:Kt,getPopupContainer:O}),It=$e(Vt,3),Xt=It[0],pn=It[1],tt=It[2],Nt=aA(an,pn);Ke.filters=tt,Ke.filterStates=pn;var qt=E.exports.useMemo(function(){var Ye={};return Object.keys(tt).forEach(function(Ue){tt[Ue]!==null&&(Ye[Ue]=tt[Ue])}),Be(Be({},Qe),{filters:Ye})},[Qe,tt]),En=Bge(qt),yn=$e(En,1),Et=yn[0],Pn=function(Ue,Bt){ct({pagination:Be(Be({},Ke.pagination),{current:Ue,pageSize:Bt})},"paginate")},_n=Mge(Nt.length,p,Pn),tn=$e(_n,2),zt=tn[0],dt=tn[1];Ke.pagination=p===!1?{}:kge(p,zt),Ke.resetPagination=dt;var mt=E.exports.useMemo(function(){if(p===!1||!zt.pageSize)return Nt;var Ye=zt.current,Ue=Ye===void 0?1:Ye,Bt=zt.total,Pt=zt.pageSize,nt=Pt===void 0?tU:Pt;return Nt.length<Bt?Nt.length>nt?Nt.slice((Ue-1)*nt,Ue*nt):Nt:Nt.slice((Ue-1)*nt,Ue*nt)},[!!p,Nt,zt&&zt.current,zt&&zt.pageSize,zt&&zt.total]),$t=Rge(g,{prefixCls:gt,data:Nt,pageData:mt,getRowKey:kt,getRecordByKey:at,expandType:vt,childrenColumnName:ot,locale:Fe,getPopupContainer:O}),Wt=$e($t,2),mn=Wt[0],An=Wt[1],Qn=function(Ue,Bt,Pt){var nt;return typeof _=="function"?nt=He(_(Ue,Bt,Pt)):nt=He(_),He(ae({},"".concat(gt,"-row-selected"),An.has(kt(Ue,Bt))),nt)};Ze.__PARENT_RENDER_ICON__=Ze.expandIcon,Ze.expandIcon=Ze.expandIcon||L||Iue(Fe),vt==="nest"&&Ze.expandIconColumnIndex===void 0?Ze.expandIconColumnIndex=g?1:0:Ze.expandIconColumnIndex>0&&g&&(Ze.expandIconColumnIndex-=1),typeof Ze.indentSize!="number"&&(Ze.indentSize=typeof G=="number"?G:15);var Jn=E.exports.useCallback(function(Ye){return Et(mn(Xt(Ht(Ye))))},[Ht,Xt,mn]),ye,W;if(p!==!1&&(zt==null?void 0:zt.total)){var X;zt.size?X=zt.size:X=Ae==="small"||Ae==="middle"?"small":void 0;var de=function(Ue){return A(Nse,{...zt,className:He("".concat(gt,"-pagination ").concat(gt,"-pagination-").concat(Ue),zt.className),size:X})},le=Me==="rtl"?"left":"right",xe=zt.position;if(xe!==null&&Array.isArray(xe)){var Ie=xe.find(function(Ye){return Ye.includes("top")}),Ce=xe.find(function(Ye){return Ye.includes("bottom")}),Pe=xe.every(function(Ye){return"".concat(Ye)==="none"});!Ie&&!Ce&&!Pe&&(W=de(le)),Ie&&(ye=de(Ie.toLowerCase().replace("top",""))),Ce&&(W=de(Ce.toLowerCase().replace("bottom","")))}else W=de(le)}var Le;typeof N=="boolean"?Le={spinning:N}:on(N)==="object"&&(Le=Be({spinning:!0},N));var Xe=He("".concat(gt,"-wrapper"),ae({},"".concat(gt,"-wrapper-rtl"),Me==="rtl"),i);return A("div",{ref:t,className:Xe,style:a,children:it(dv,{spinning:!1,...Le,children:[ye,A(Kd,{...me,columns:oe,direction:Me,expandable:Ze,prefixCls:gt,className:He((n={},ae(n,"".concat(gt,"-middle"),Ae==="middle"),ae(n,"".concat(gt,"-small"),Ae==="small"),ae(n,"".concat(gt,"-bordered"),o),ae(n,"".concat(gt,"-empty"),We.length===0),n)),data:mt,rowKey:kt,rowClassName:Qn,emptyText:J&&J.emptyText||(Ee||ST)("Table"),internalHooks:mx,internalRefs:yt,transformColumns:Jn}),W]})})}var jge=E.exports.forwardRef(Uge),ru=jge;ru.SELECTION_COLUMN=Pu;ru.EXPAND_COLUMN=Kd.EXPAND_COLUMN;ru.SELECTION_ALL=oE;ru.SELECTION_INVERT=aE;ru.SELECTION_NONE=sE;ru.Column=Tue;ru.ColumnGroup=kue;ru.Summary=PV;const Hge=ru;var Kge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};const Wge=Kge;var sU=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:Wge})})};sU.displayName="DeleteOutlined";const Gge=E.exports.forwardRef(sU);var lU=E.exports.createContext(null),uU=E.exports.createContext(null);function qge(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function Zge(e){var t=e||{},n=t.label,r=t.value,i=t.children,a=r||"value";return{_title:n?[n]:["title","label"],value:a,key:a,children:i||"children"}}function cE(e){return!e||e.disabled||e.disableCheckbox||e.checkable===!1}function Xge(e,t){var n=[];function r(i){i.forEach(function(a){var s=a[t.children];s&&(n.push(a[t.value]),r(s))})}return r(e),n}function dA(e){return e==null}var Yge={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Qge=function(t,n){var r=Z$(),i=r.prefixCls,a=r.multiple,s=r.searchValue,o=r.toggleOpen,c=r.open,f=r.notFoundContent,p=E.exports.useContext(uU),g=p.virtual,v=p.listHeight,b=p.listItemHeight,_=p.treeData,T=p.fieldNames,k=p.onSelect,P=p.dropdownMatchSelectWidth,M=p.treeExpandAction,O=E.exports.useContext(lU),N=O.checkable,L=O.checkedKeys,$=O.halfCheckedKeys,j=O.treeExpandedKeys,U=O.treeDefaultExpandAll,G=O.treeDefaultExpandedKeys,Z=O.onTreeExpand,Q=O.treeIcon,J=O.showTreeIcon,re=O.switcherIcon,ne=O.treeLine,ge=O.treeNodeFilterProp,ie=O.loadData,ue=O.treeLoadedKeys,oe=O.treeMotion,me=O.onTreeLoad,Te=O.keyEntities,we=E.exports.useRef(),be=Yg(function(){return _},[c,_],function(bt,At){return At[0]&&bt[1]!==At[1]}),Re=E.exports.useMemo(function(){return N?{checked:L,halfChecked:$}:null},[N,L,$]);E.exports.useEffect(function(){if(c&&!a&&L.length){var bt;(bt=we.current)===null||bt===void 0||bt.scrollTo({key:L[0]})}},[c]);var Ee=String(s).toLowerCase(),Me=function(At){return Ee?String(At[ge]).toLowerCase().includes(Ee):!1},Ae=E.exports.useState(G),Fe=$e(Ae,2),We=Fe[0],je=Fe[1],pt=E.exports.useState(null),gt=$e(pt,2),Ot=gt[0],Ze=gt[1],St=E.exports.useMemo(function(){return j?Rt(j):s?Ot:We},[We,Ot,j,s]);E.exports.useEffect(function(){s&&Ze(Xge(_,T))},[s]);var ot=function(At){je(At),Ze(At),Z&&Z(At)},vt=function(At){At.preventDefault()},yt=function(At,Lt){var Ht=Lt.node;N&&cE(Ht)||(k(Ht.key,{selected:!L.includes(Ht.key)}),a||o(!1))},kt=E.exports.useState(null),et=$e(kt,2),ut=et[0],at=et[1],Ke=Te[ut];if(E.exports.useImperativeHandle(n,function(){var bt;return{scrollTo:(bt=we.current)===null||bt===void 0?void 0:bt.scrollTo,onKeyDown:function(Lt){var Ht,ze=Lt.which;switch(ze){case Tt.UP:case Tt.DOWN:case Tt.LEFT:case Tt.RIGHT:(Ht=we.current)===null||Ht===void 0||Ht.onKeyDown(Lt);break;case Tt.ENTER:{if(Ke){var Qe=(Ke==null?void 0:Ke.node)||{},Zt=Qe.selectable,an=Qe.value;Zt!==!1&&yt(null,{node:{key:ut},selected:!L.includes(an)})}break}case Tt.ESC:o(!1)}},onKeyUp:function(){}}}),be.length===0)return A("div",{role:"listbox",className:"".concat(i,"-empty"),onMouseDown:vt,children:f});var ct={fieldNames:T};return ue&&(ct.loadedKeys=ue),St&&(ct.expandedKeys=St),it("div",{onMouseDown:vt,children:[Ke&&c&&A("span",{style:Yge,"aria-live":"assertive",children:Ke.node.value}),A(m1,{ref:we,focusable:!1,prefixCls:"".concat(i,"-tree"),treeData:be,height:v,itemHeight:b,virtual:g!==!1&&P!==!1,multiple:a,icon:Q,showIcon:J,switcherIcon:re,showLine:ne,loadData:s?null:ie,motion:oe,activeKey:ut,checkable:N,checkStrictly:!0,checkedKeys:Re,selectedKeys:N?[]:L,defaultExpandAll:U,...ct,onActiveChange:at,onSelect:yt,onCheck:yt,onExpand:ot,onLoad:me,filterTreeNode:Me,expandAction:M})]})},cU=E.exports.forwardRef(Qge);cU.displayName="OptionList";var ek=function(){return null},dU="SHOW_ALL",tk="SHOW_PARENT",g1="SHOW_CHILD";function fA(e,t,n,r){var i=new Set(e);return t===g1?e.filter(function(a){var s=n[a];return!(s&&s.children&&s.children.some(function(o){var c=o.node;return i.has(c[r.value])})&&s.children.every(function(o){var c=o.node;return cE(c)||i.has(c[r.value])}))}):t===tk?e.filter(function(a){var s=n[a],o=s?s.parent:null;return!(o&&!cE(o.node)&&i.has(o.key))}):e}var Jge=["children","value"];function fU(e){return To(e).map(function(t){if(!E.exports.isValidElement(t)||!t.type)return null;var n=t,r=n.key,i=n.props,a=i.children,s=i.value,o=In(i,Jge),c=fe({key:r,value:s},o),f=fU(a);return f.length&&(c.children=f),c}).filter(function(t){return t})}function dE(e){if(!e)return e;var t=fe({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Nr(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),t}}),t}function eve(e,t,n,r,i,a){var s=null,o=null;function c(){function f(p){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return p.map(function(b,_){var T="".concat(g,"-").concat(_),k=b[a.value],P=n.includes(k),M=f(b[a.children]||[],T,P),O=A(ek,{...b,children:M.map(function(L){return L.node})});if(t===k&&(s=O),P){var N={pos:T,node:O,children:M};return v||o.push(N),N}return null}).filter(function(b){return b})}o||(o=[],f(r),o.sort(function(p,g){var v=p.node.props.value,b=g.node.props.value,_=n.indexOf(v),T=n.indexOf(b);return _-T}))}Object.defineProperty(e,"triggerNode",{get:function(){return Nr(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),c(),s}}),Object.defineProperty(e,"allCheckedNodes",{get:function(){return Nr(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),c(),i?o:o.map(function(p){var g=p.node;return g})}})}function tve(e,t){var n=t.id,r=t.pId,i=t.rootPId,a={},s=[],o=e.map(function(c){var f=fe({},c),p=f[n];return a[p]=f,f.key=f.key||p,f});return o.forEach(function(c){var f=c[r],p=a[f];p&&(p.children=p.children||[],p.children.push(c)),(f===i||!p&&i===null)&&s.push(c)}),s}function nve(e,t,n){return E.exports.useMemo(function(){return e?n?tve(e,fe({id:"id",pId:"pId",rootPId:null},n!==!0?n:{})):e:fU(t)},[t,n,e])}const rve=function(e){var t=E.exports.useRef({valueLabels:new Map});return E.exports.useMemo(function(){var n=t.current.valueLabels,r=new Map,i=e.map(function(a){var s,o=a.value,c=(s=a.label)!==null&&s!==void 0?s:n.get(o);return r.set(o,c),fe(fe({},a),{},{label:c})});return t.current.valueLabels=r,[i]},[e])};function hA(e){var t=E.exports.useRef();t.current=e;var n=E.exports.useCallback(function(){return t.current.apply(t,arguments)},[]);return n}const ive=function(e,t){return E.exports.useMemo(function(){var n=i1(e,{fieldNames:t,initWrapper:function(i){return fe(fe({},i),{},{valueEntities:new Map})},processEntity:function(i,a){var s=i.node[t.value];a.valueEntities.set(s,i)}});return n},[e,t])},ove=function(e,t,n,r){return E.exports.useMemo(function(){var i=e.map(function(c){var f=c.value;return f}),a=t.map(function(c){var f=c.value;return f}),s=i.filter(function(c){return!r[c]});if(n){var o=Gl(i,!0,r);i=o.checkedKeys,a=o.halfCheckedKeys}return[Array.from(new Set([].concat(Rt(s),Rt(i)))),a]},[e,t,n,r])},ave=function(e,t,n){var r=n.treeNodeFilterProp,i=n.filterTreeNode,a=n.fieldNames,s=a.children;return E.exports.useMemo(function(){if(!t||i===!1)return e;var o;if(typeof i=="function")o=i;else{var c=t.toUpperCase();o=function(g,v){var b=v[r];return String(b).toUpperCase().includes(c)}}function f(p){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return p.map(function(v){var b=v[s],_=g||o(t,dE(v)),T=f(b||[],_);return _||T.length?fe(fe({},v),{},ae({isLeaf:void 0},s,T)):null}).filter(function(v){return v})}return f(e)},[e,t,s,r,i])};var sve=["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 lve(e){return!e||on(e)!=="object"}var uve=E.exports.forwardRef(function(e,t){var n=e.id,r=e.prefixCls,i=r===void 0?"rc-tree-select":r,a=e.value,s=e.defaultValue,o=e.onChange,c=e.onSelect,f=e.onDeselect,p=e.searchValue,g=e.inputValue,v=e.onSearch,b=e.autoClearSearchValue,_=b===void 0?!0:b,T=e.filterTreeNode,k=e.treeNodeFilterProp,P=k===void 0?"value":k,M=e.showCheckedStrategy,O=M===void 0?g1:M,N=e.treeNodeLabelProp,L=e.multiple,$=e.treeCheckable,j=e.treeCheckStrictly,U=e.labelInValue,G=e.fieldNames,Z=e.treeDataSimpleMode,Q=e.treeData,J=e.children,re=e.loadData,ne=e.treeLoadedKeys,ge=e.onTreeLoad,ie=e.treeDefaultExpandAll,ue=e.treeExpandedKeys,oe=e.treeDefaultExpandedKeys,me=e.onTreeExpand,Te=e.treeExpandAction,we=e.virtual,be=e.listHeight,Re=be===void 0?200:be,Ee=e.listItemHeight,Me=Ee===void 0?20:Ee,Ae=e.onDropdownVisibleChange,Fe=e.dropdownMatchSelectWidth,We=Fe===void 0?!0:Fe,je=e.treeLine,pt=e.treeIcon,gt=e.showTreeIcon,Ot=e.switcherIcon,Ze=e.treeMotion,St=In(e,sve),ot=xB(n),vt=$&&!j,yt=$||j,kt=j||U,et=yt||L,ut=Si(s,{value:a}),at=$e(ut,2),Ke=at[0],ct=at[1],bt=E.exports.useMemo(function(){return Zge(G)},[JSON.stringify(G)]),At=Si("",{value:p!==void 0?p:g,postState:function(xe){return xe||""}}),Lt=$e(At,2),Ht=Lt[0],ze=Lt[1],Qe=function(xe){ze(xe),v==null||v(xe)},Zt=nve(Q,J,Z),an=ive(Zt,bt),Kt=an.keyEntities,Vt=an.valueEntities,It=E.exports.useCallback(function(le){var xe=[],Ie=[];return le.forEach(function(Ce){Vt.has(Ce)?Ie.push(Ce):xe.push(Ce)}),{missingRawValues:xe,existRawValues:Ie}},[Vt]),Xt=ave(Zt,Ht,{fieldNames:bt,treeNodeFilterProp:P,filterTreeNode:T}),pn=E.exports.useCallback(function(le){if(le){if(N)return le[N];for(var xe=bt._title,Ie=0;Ie<xe.length;Ie+=1){var Ce=le[xe[Ie]];if(Ce!==void 0)return Ce}}},[bt,N]),tt=E.exports.useCallback(function(le){var xe=qge(le);return xe.map(function(Ie){return lve(Ie)?{value:Ie}:Ie})},[]),Nt=E.exports.useCallback(function(le){var xe=tt(le);return xe.map(function(Ie){var Ce=Ie.label,Pe=Ie.value,Le=Ie.halfChecked,Xe,Ye=Vt.get(Pe);if(Ye){var Ue;Ce=(Ue=Ce)!==null&&Ue!==void 0?Ue:pn(Ye.node),Xe=Ye.node.disabled}else if(Ce===void 0){var Bt=tt(Ke).find(function(Pt){return Pt.value===Pe});Ce=Bt.label}return{label:Ce,value:Pe,halfChecked:Le,disabled:Xe}})},[Vt,pn,tt,Ke]),qt=E.exports.useMemo(function(){return tt(Ke)},[tt,Ke]),En=E.exports.useMemo(function(){var le=[],xe=[];return qt.forEach(function(Ie){Ie.halfChecked?xe.push(Ie):le.push(Ie)}),[le,xe]},[qt]),yn=$e(En,2),Et=yn[0],Pn=yn[1],_n=E.exports.useMemo(function(){return Et.map(function(le){return le.value})},[Et]),tn=ove(Et,Pn,vt,Kt),zt=$e(tn,2),dt=zt[0],mt=zt[1],$t=E.exports.useMemo(function(){var le=fA(dt,O,Kt,bt),xe=le.map(function(Le){var Xe,Ye,Ue;return(Xe=(Ye=Kt[Le])===null||Ye===void 0||(Ue=Ye.node)===null||Ue===void 0?void 0:Ue[bt.value])!==null&&Xe!==void 0?Xe:Le}),Ie=xe.map(function(Le){var Xe=Et.find(function(Ye){return Ye.value===Le});return{value:Le,label:Xe==null?void 0:Xe.label}}),Ce=Nt(Ie),Pe=Ce[0];return!et&&Pe&&dA(Pe.value)&&dA(Pe.label)?[]:Ce.map(function(Le){var Xe;return fe(fe({},Le),{},{label:(Xe=Le.label)!==null&&Xe!==void 0?Xe:Le.value})})},[bt,et,dt,Et,Nt,O,Kt]),Wt=rve($t),mn=$e(Wt,1),An=mn[0],Qn=hA(function(le,xe,Ie){var Ce=Nt(le);if(ct(Ce),_&&ze(""),o){var Pe=le;if(vt){var Le=fA(le,O,Kt,bt);Pe=Le.map(function(dn){var Cn=Vt.get(dn);return Cn?Cn.node[bt.value]:dn})}var Xe=xe||{triggerValue:void 0,selected:void 0},Ye=Xe.triggerValue,Ue=Xe.selected,Bt=Pe;if(j){var Pt=Pn.filter(function(dn){return!Pe.includes(dn.value)});Bt=[].concat(Rt(Bt),Rt(Pt))}var nt=Nt(Bt),Ft={preValue:Et,triggerValue:Ye},Gt=!0;(j||Ie==="selection"&&!Ue)&&(Gt=!1),eve(Ft,Ye,le,Zt,Gt,bt),yt?Ft.checked=Ue:Ft.selected=Ue;var wn=kt?nt:nt.map(function(dn){return dn.value});o(et?wn:wn[0],kt?null:nt.map(function(dn){return dn.label}),Ft)}}),Jn=E.exports.useCallback(function(le,xe){var Ie,Ce=xe.selected,Pe=xe.source,Le=Kt[le],Xe=Le==null?void 0:Le.node,Ye=(Ie=Xe==null?void 0:Xe[bt.value])!==null&&Ie!==void 0?Ie:le;if(!et)Qn([Ye],{selected:!0,triggerValue:Ye},"option");else{var Ue=Ce?[].concat(Rt(_n),[Ye]):dt.filter(function(Cn){return Cn!==Ye});if(vt){var Bt=It(Ue),Pt=Bt.missingRawValues,nt=Bt.existRawValues,Ft=nt.map(function(Cn){return Vt.get(Cn).key}),Gt;if(Ce){var wn=Gl(Ft,!0,Kt);Gt=wn.checkedKeys}else{var dn=Gl(Ft,{checked:!1,halfCheckedKeys:mt},Kt);Gt=dn.checkedKeys}Ue=[].concat(Rt(Pt),Rt(Gt.map(function(Cn){return Kt[Cn].node[bt.value]})))}Qn(Ue,{selected:Ce,triggerValue:Ye},Pe||"option")}Ce||!et?c==null||c(Ye,dE(Xe)):f==null||f(Ye,dE(Xe))},[It,Vt,Kt,bt,et,_n,Qn,vt,c,f,dt,mt]),ye=E.exports.useCallback(function(le){if(Ae){var xe={};Object.defineProperty(xe,"documentClickClose",{get:function(){return Nr(!1,"Second param of `onDropdownVisibleChange` has been removed."),!1}}),Ae(le,xe)}},[Ae]),W=hA(function(le,xe){var Ie=le.map(function(Ce){return Ce.value});if(xe.type==="clear"){Qn(Ie,{},"selection");return}xe.values.length&&Jn(xe.values[0].value,{selected:!1,source:"selection"})}),X=E.exports.useMemo(function(){return{virtual:we,dropdownMatchSelectWidth:We,listHeight:Re,listItemHeight:Me,treeData:Xt,fieldNames:bt,onSelect:Jn,treeExpandAction:Te}},[we,We,Re,Me,Xt,bt,Jn,Te]),de=E.exports.useMemo(function(){return{checkable:yt,loadData:re,treeLoadedKeys:ne,onTreeLoad:ge,checkedKeys:dt,halfCheckedKeys:mt,treeDefaultExpandAll:ie,treeExpandedKeys:ue,treeDefaultExpandedKeys:oe,onTreeExpand:me,treeIcon:pt,treeMotion:Ze,showTreeIcon:gt,switcherIcon:Ot,treeLine:je,treeNodeFilterProp:P,keyEntities:Kt}},[yt,re,ne,ge,dt,mt,ie,ue,oe,me,pt,Ze,gt,Ot,je,P,Kt]);return A(uU.Provider,{value:X,children:A(lU.Provider,{value:de,children:A(yB,{ref:t,...St,id:ot,prefixCls:i,mode:et?"multiple":void 0,displayValues:An,onDisplayValuesChange:W,searchValue:Ht,onSearch:Qe,OptionList:cU,emptyOptions:!Zt.length,onDropdownVisibleChange:ye,dropdownMatchSelectWidth:We})})})}),pv=uve;pv.TreeNode=ek;pv.SHOW_ALL=dU;pv.SHOW_PARENT=tk;pv.SHOW_CHILD=g1;var cve=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},dve=function(t,n){var r,i=t.prefixCls,a=t.size,s=t.disabled,o=t.bordered,c=o===void 0?!0:o,f=t.className,p=t.treeCheckable,g=t.multiple,v=t.listHeight,b=v===void 0?256:v,_=t.listItemHeight,T=_===void 0?26:_,k=t.placement,P=t.notFoundContent,M=t.switcherIcon,O=t.treeLine,N=t.getPopupContainer,L=t.dropdownClassName,$=t.popupClassName,j=t.treeIcon,U=j===void 0?!1:j,G=t.transitionName,Z=t.choiceTransitionName,Q=Z===void 0?"":Z,J=t.status,re=t.showArrow,ne=t.treeExpandAction,ge=cve(t,["prefixCls","size","disabled","bordered","className","treeCheckable","multiple","listHeight","listItemHeight","placement","notFoundContent","switcherIcon","treeLine","getPopupContainer","dropdownClassName","popupClassName","treeIcon","transitionName","choiceTransitionName","status","showArrow","treeExpandAction"]),ie=E.exports.useContext(Fn),ue=ie.getPopupContainer,oe=ie.getPrefixCls,me=ie.renderEmpty,Te=ie.direction,we=ie.virtual,be=ie.dropdownMatchSelectWidth,Re=E.exports.useContext(nu),Ee=oe("select",i),Me=oe("select-tree",i),Ae=oe("tree-select",i),Fe=Vh(Ee,Te),We=Fe.compactSize,je=Fe.compactItemClassnames,pt=He($||L,"".concat(Ae,"-dropdown"),ae({},"".concat(Ae,"-dropdown-rtl"),Te==="rtl")),gt=!!(p||g),Ot=re!==void 0?re:ge.loading||!gt,Ze=E.exports.useContext(As),St=Ze.status,ot=Ze.hasFeedback,vt=Ze.isFormItemInput,yt=Ze.feedbackIcon,kt=rv(St,J),et=DB(Be(Be({},ge),{multiple:gt,showArrow:Ot,hasFeedback:ot,feedbackIcon:yt,prefixCls:Ee})),ut=et.suffixIcon,at=et.removeIcon,Ke=et.clearIcon,ct;P!==void 0?ct=P:ct=(me||ST)("Select");var bt=Wi(ge,["suffixIcon","itemIcon","removeIcon","clearIcon","switcherIcon"]),At=function(){return k!==void 0?k:Te==="rtl"?"bottomRight":"bottomLeft"},Lt=We||a||Re,Ht=E.exports.useContext(fc),ze=s!=null?s:Ht,Qe=He(!i&&Ae,(r={},ae(r,"".concat(Ee,"-lg"),Lt==="large"),ae(r,"".concat(Ee,"-sm"),Lt==="small"),ae(r,"".concat(Ee,"-rtl"),Te==="rtl"),ae(r,"".concat(Ee,"-borderless"),!c),ae(r,"".concat(Ee,"-in-form-item"),vt),r),Yu(Ee,kt,ot),je,f),Zt=oe();return A(pv,{virtual:we,dropdownMatchSelectWidth:be,disabled:ze,...bt,ref:n,prefixCls:Ee,className:Qe,listHeight:b,listItemHeight:T,treeCheckable:p&&A("span",{className:"".concat(Ee,"-tree-checkbox-inner")}),treeLine:!!O,inputIcon:ut,multiple:g,placement:At(),removeIcon:at,clearIcon:Ke,switcherIcon:function(Kt){return qV(Me,M,O,Kt)},showTreeIcon:U,notFoundContent:ct,getPopupContainer:N||ue,treeMotion:null,dropdownClassName:pt,choiceTransitionName:Ma(Zt,"",Q),transitionName:Ma(Zt,TB(k),G),showArrow:ot||re,treeExpandAction:ne})},fve=E.exports.forwardRef(dve),mv=fve;mv.TreeNode=ek;mv.SHOW_ALL=dU;mv.SHOW_PARENT=tk;mv.SHOW_CHILD=g1;const v1=mv;var hve={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 pve=hve;var hU=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:pve})})};hU.displayName="CopyOutlined";const mve=E.exports.forwardRef(hU);var gve={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 vve=gve;var pU=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:vve})})};pU.displayName="EditOutlined";const yve=E.exports.forwardRef(pU);var xve=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(i){e.addRange(i)}),t&&t.focus()}},bve=xve,pA={"text/plain":"Text","text/html":"Url",default:"Text"},_ve="Copy to clipboard: #{key}, Enter";function wve(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function Cve(e,t){var n,r,i,a,s,o,c=!1;t||(t={}),n=t.debug||!1;try{i=bve(),a=document.createRange(),s=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(p){if(p.stopPropagation(),t.format)if(p.preventDefault(),typeof p.clipboardData>"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var g=pA[t.format]||pA.default;window.clipboardData.setData(g,e)}else p.clipboardData.clearData(),p.clipboardData.setData(t.format,e);t.onCopy&&(p.preventDefault(),t.onCopy(p.clipboardData))}),document.body.appendChild(o),a.selectNodeContents(o),s.addRange(a);var f=document.execCommand("copy");if(!f)throw new Error("copy command was unsuccessful");c=!0}catch(p){n&&console.error("unable to copy using execCommand: ",p),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(g){n&&console.error("unable to copy using clipboardData: ",g),n&&console.error("falling back to prompt"),r=wve("message"in t?t.message:_ve),window.prompt(r,e)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(a):s.removeAllRanges()),o&&document.body.removeChild(o),i()}return c}var Sve=Cve,Eve={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 Pve=Eve;var mU=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:Pve})})};mU.displayName="EnterOutlined";const Tve=E.exports.forwardRef(mU);var kve=function(t){var n=t.prefixCls,r=t["aria-label"],i=t.className,a=t.style,s=t.direction,o=t.maxLength,c=t.autoSize,f=c===void 0?!0:c,p=t.value,g=t.onSave,v=t.onCancel,b=t.onEnd,_=t.component,T=t.enterIcon,k=T===void 0?A(Tve,{}):T,P=E.exports.useRef(null),M=E.exports.useRef(!1),O=E.exports.useRef(),N=E.exports.useState(p),L=$e(N,2),$=L[0],j=L[1];E.exports.useEffect(function(){j(p)},[p]),E.exports.useEffect(function(){if(P.current&&P.current.resizableTextArea){var ue=P.current.resizableTextArea.textArea;ue.focus();var oe=ue.value.length;ue.setSelectionRange(oe,oe)}},[]);var U=function(oe){var me=oe.target;j(me.value.replace(/[\n\r]/g,""))},G=function(){M.current=!0},Z=function(){M.current=!1},Q=function(oe){var me=oe.keyCode;M.current||(O.current=me)},J=function(){g($.trim())},re=function(oe){var me=oe.keyCode,Te=oe.ctrlKey,we=oe.altKey,be=oe.metaKey,Re=oe.shiftKey;O.current===me&&!M.current&&!Te&&!we&&!be&&!Re&&(me===Tt.ENTER?(J(),b==null||b()):me===Tt.ESC&&v())},ne=function(){J()},ge=_?"".concat(n,"-").concat(_):"",ie=He(n,"".concat(n,"-edit-content"),ae({},"".concat(n,"-rtl"),s==="rtl"),i,ge);return it("div",{className:ie,style:a,children:[A(W8,{ref:P,maxLength:o,value:$,onChange:U,onKeyDown:Q,onKeyUp:re,onCompositionStart:G,onCompositionEnd:Z,onBlur:ne,"aria-label":r,rows:1,autoSize:f}),k!==null?Ei(k,{className:"".concat(n,"-edit-content-confirm")}):null]})};const Ive=kve;function uS(e,t){return E.exports.useMemo(function(){var n=!!e;return[n,Be(Be({},t),n&&on(e)==="object"?e:null)]},[e])}var Mve=function(t,n){var r=E.exports.useRef(!1);E.exports.useEffect(function(){r.current?t():r.current=!0},n)};const Rve=Mve;var Dve=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Ove=E.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.component,i=r===void 0?"article":r,a=e.className,s=e.setContentRef,o=e.children,c=e.direction,f=Dve(e,["prefixCls","component","className","setContentRef","children","direction"]),p=E.exports.useContext(Fn),g=p.getPrefixCls,v=p.direction,b=c!=null?c:v,_=t;s&&(_=La(t,s));var T=g("typography",n),k=He(T,ae({},"".concat(T,"-rtl"),b==="rtl"),a);return A(i,{className:k,ref:_,...f,children:o})});const gU=Ove;function vU(e){var t=on(e);return t==="string"||t==="number"}function Ave(e){var t=0;return e.forEach(function(n){vU(n)?t+=String(n).length:t+=1}),t}function mA(e,t){for(var n=0,r=[],i=0;i<e.length;i+=1){if(n===t)return r;var a=e[i],s=vU(a),o=s?String(a).length:1,c=n+o;if(c>t){var f=t-n;return r.push(String(a).slice(0,f)),r}r.push(a),n=c}return e}var Nve=0,x0=1,gA=2,cS=3,vA=4,Lve=function(t){var n=t.enabledMeasure,r=t.children,i=t.text,a=t.width,s=t.fontSize,o=t.rows,c=t.onEllipsis,f=E.exports.useState([0,0,0]),p=$e(f,2),g=$e(p[0],3),v=g[0],b=g[1],_=g[2],T=p[1],k=E.exports.useState(Nve),P=$e(k,2),M=P[0],O=P[1],N=E.exports.useState(0),L=$e(N,2),$=L[0],j=L[1],U=E.exports.useRef(null),G=E.exports.useRef(null),Z=E.exports.useMemo(function(){return To(i)},[i]),Q=E.exports.useMemo(function(){return Ave(Z)},[Z]),J=E.exports.useMemo(function(){return!n||M!==cS?r(Z,!1):r(mA(Z,b),b<Q)},[n,M,r,Z,b,Q]);Ci(function(){n&&a&&s&&Q&&(O(x0),T([0,Math.ceil(Q/2),Q]))},[n,a,s,i,Q,o]),Ci(function(){var ie;M===x0&&j(((ie=U.current)===null||ie===void 0?void 0:ie.offsetHeight)||0)},[M]),Ci(function(){var ie,ue;if($){if(M===x0){var oe=((ie=G.current)===null||ie===void 0?void 0:ie.offsetHeight)||0,me=o*$;oe<=me?(O(vA),c(!1)):O(gA)}else if(M===gA)if(v!==_){var Te=((ue=G.current)===null||ue===void 0?void 0:ue.offsetHeight)||0,we=o*$,be=v,Re=_;v===_-1?Re=v:Te<=we?be=b:Re=b;var Ee=Math.ceil((be+Re)/2);T([be,Ee,Re])}else O(cS),c(!0)}},[M,v,_,o,$]);var re={width:a,whiteSpace:"normal",margin:0,padding:0},ne=function(ue,oe,me){return A("span",{"aria-hidden":!0,ref:oe,style:Be({position:"fixed",display:"block",left:0,top:0,zIndex:-9999,visibility:"hidden",pointerEvents:"none",fontSize:Math.floor(s/2)*2},me),children:ue})},ge=function(ue,oe){var me=mA(Z,ue);return ne(r(me,!0),oe,re)};return it(nr,{children:[J,n&&M!==cS&&M!==vA&&it(nr,{children:[ne("lg",U,{wordBreak:"keep-all",whiteSpace:"nowrap"}),M===x0?ne(r(Z,!1),G,re):ge(b,G)]})]})};const Fve=Lve;var zve=function(t){var n=t.enabledEllipsis,r=t.isEllipsis,i=t.children,a=t.tooltipProps;return!(a!=null&&a.title)||!n?i:A(Ra,{open:r?void 0:!1,...a,children:i})};const $ve=zve;var Bve=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Vve(e,t){var n=e.mark,r=e.code,i=e.underline,a=e.delete,s=e.strong,o=e.keyboard,c=e.italic,f=t;function p(g,v){!g||(f=E.exports.createElement(v,{},f))}return p(s,"strong"),p(i,"u"),p(a,"del"),p(r,"code"),p(n,"mark"),p(o,"kbd"),p(c,"i"),f}function b0(e,t,n){return e===!0||e===void 0?t:e||n&&t}function yA(e){return e===!1?[!1,!1]:Array.isArray(e)?e:[e]}var Uve="...",jve=E.exports.forwardRef(function(e,t){var n,r,i,a=e.prefixCls,s=e.className,o=e.style,c=e.type,f=e.disabled,p=e.children,g=e.ellipsis,v=e.editable,b=e.copyable,_=e.component,T=e.title,k=Bve(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),P=E.exports.useContext(Fn),M=P.getPrefixCls,O=P.direction,N=dQ("Text")[0],L=E.exports.useRef(null),$=E.exports.useRef(null),j=M("typography",a),U=Wi(k,["mark","code","delete","underline","strong","keyboard","italic"]),G=uS(v),Z=$e(G,2),Q=Z[0],J=Z[1],re=Si(!1,{value:J.editing}),ne=$e(re,2),ge=ne[0],ie=ne[1],ue=J.triggerType,oe=ue===void 0?["icon"]:ue,me=function(nt){var Ft;nt&&((Ft=J.onStart)===null||Ft===void 0||Ft.call(J)),ie(nt)};Rve(function(){var Pt;ge||(Pt=$.current)===null||Pt===void 0||Pt.focus()},[ge]);var Te=function(nt){nt==null||nt.preventDefault(),me(!0)},we=function(nt){var Ft;(Ft=J.onChange)===null||Ft===void 0||Ft.call(J,nt),me(!1)},be=function(){var nt;(nt=J.onCancel)===null||nt===void 0||nt.call(J),me(!1)},Re=uS(b),Ee=$e(Re,2),Me=Ee[0],Ae=Ee[1],Fe=E.exports.useState(!1),We=$e(Fe,2),je=We[0],pt=We[1],gt=E.exports.useRef(),Ot={};Ae.format&&(Ot.format=Ae.format);var Ze=function(){window.clearTimeout(gt.current)},St=function(nt){var Ft;nt==null||nt.preventDefault(),nt==null||nt.stopPropagation(),Sve(Ae.text||String(p)||"",Ot),pt(!0),Ze(),gt.current=window.setTimeout(function(){pt(!1)},3e3),(Ft=Ae.onCopy)===null||Ft===void 0||Ft.call(Ae,nt)};E.exports.useEffect(function(){return Ze},[]);var ot=E.exports.useState(!1),vt=$e(ot,2),yt=vt[0],kt=vt[1],et=E.exports.useState(!1),ut=$e(et,2),at=ut[0],Ke=ut[1],ct=E.exports.useState(!1),bt=$e(ct,2),At=bt[0],Lt=bt[1],Ht=E.exports.useState(!1),ze=$e(Ht,2),Qe=ze[0],Zt=ze[1],an=E.exports.useState(!1),Kt=$e(an,2),Vt=Kt[0],It=Kt[1],Xt=E.exports.useState(!0),pn=$e(Xt,2),tt=pn[0],Nt=pn[1],qt=uS(g,{expandable:!1}),En=$e(qt,2),yn=En[0],Et=En[1],Pn=yn&&!At,_n=Et.rows,tn=_n===void 0?1:_n,zt=E.exports.useMemo(function(){return!Pn||Et.suffix!==void 0||Et.onEllipsis||Et.expandable||Q||Me},[Pn,Et,Q,Me]);Ci(function(){yn&&!zt&&(kt(U4("webkitLineClamp")),Ke(U4("textOverflow")))},[zt,yn]);var dt=E.exports.useMemo(function(){return zt?!1:tn===1?at:yt},[zt,at,yt]),mt=Pn&&(dt?Vt:Qe),$t=Pn&&tn===1&&dt,Wt=Pn&&tn>1&&dt,mn=function(nt){var Ft;Lt(!0),(Ft=Et.onExpand)===null||Ft===void 0||Ft.call(Et,nt)},An=E.exports.useState(0),Qn=$e(An,2),Jn=Qn[0],ye=Qn[1],W=E.exports.useState(0),X=$e(W,2),de=X[0],le=X[1],xe=function(nt,Ft){var Gt=nt.offsetWidth,wn;ye(Gt),le(parseInt((wn=window.getComputedStyle)===null||wn===void 0?void 0:wn.call(window,Ft).fontSize,10)||0)},Ie=function(nt){var Ft;Zt(nt),Qe!==nt&&((Ft=Et.onEllipsis)===null||Ft===void 0||Ft.call(Et,nt))};E.exports.useEffect(function(){var Pt=L.current;if(yn&&dt&&Pt){var nt=Wt?Pt.offsetHeight<Pt.scrollHeight:Pt.offsetWidth<Pt.scrollWidth;Vt!==nt&&It(nt)}},[yn,dt,p,Wt,tt]),E.exports.useEffect(function(){var Pt=L.current;if(!(typeof IntersectionObserver>"u"||!Pt||!dt||!Pn)){var nt=new IntersectionObserver(function(){Nt(!!Pt.offsetParent)});return nt.observe(Pt),function(){nt.disconnect()}}},[dt,Pn]);var Ce={};Et.tooltip===!0?Ce={title:(n=J.text)!==null&&n!==void 0?n:p}:E.exports.isValidElement(Et.tooltip)?Ce={title:Et.tooltip}:on(Et.tooltip)==="object"?Ce=Be({title:(r=J.text)!==null&&r!==void 0?r:p},Et.tooltip):Ce={title:Et.tooltip};var Pe=E.exports.useMemo(function(){var Pt=function(Ft){return["string","number"].includes(on(Ft))};if(!(!yn||dt)){if(Pt(J.text))return J.text;if(Pt(p))return p;if(Pt(T))return T;if(Pt(Ce.title))return Ce.title}},[yn,dt,T,Ce.title,mt]);if(ge)return A(Ive,{value:(i=J.text)!==null&&i!==void 0?i:typeof p=="string"?p:"",onSave:we,onCancel:be,onEnd:J.onEnd,prefixCls:j,className:s,style:o,direction:O,component:_,maxLength:J.maxLength,autoSize:J.autoSize,enterIcon:J.enterIcon});var Le=function(){var nt=Et.expandable,Ft=Et.symbol;if(!nt)return null;var Gt;return Ft?Gt=Ft:Gt=N.expand,A("a",{className:"".concat(j,"-expand"),onClick:mn,"aria-label":N.expand,children:Gt},"expand")},Xe=function(){if(!!Q){var nt=J.icon,Ft=J.tooltip,Gt=To(Ft)[0]||N.edit,wn=typeof Gt=="string"?Gt:"";return oe.includes("icon")?A(Ra,{title:Ft===!1?"":Gt,children:A(yO,{ref:$,className:"".concat(j,"-edit"),onClick:Te,"aria-label":wn,children:nt||A(yve,{role:"button"})})},"edit"):null}},Ye=function(){if(!!Me){var nt=Ae.tooltips,Ft=Ae.icon,Gt=yA(nt),wn=yA(Ft),dn=je?b0(Gt[1],N.copied):b0(Gt[0],N.copy),Cn=je?N.copied:N.copy,jn=typeof dn=="string"?dn:Cn;return A(Ra,{title:dn,children:A(yO,{className:He("".concat(j,"-copy"),je&&"".concat(j,"-copy-success")),onClick:St,"aria-label":jn,children:je?b0(wn[1],A(ET,{}),!0):b0(wn[0],A(mve,{}),!0)})},"copy")}},Ue=function(nt){return[nt&&Le(),Xe(),Ye()]},Bt=function(nt){return[nt&&A("span",{"aria-hidden":!0,children:Uve},"ellipsis"),Et.suffix,Ue(nt)]};return A(tu,{onResize:xe,disabled:!Pn||dt,children:function(Pt){var nt;return A($ve,{tooltipProps:Ce,enabledEllipsis:Pn,isEllipsis:mt,children:A(gU,{className:He((nt={},ae(nt,"".concat(j,"-").concat(c),c),ae(nt,"".concat(j,"-disabled"),f),ae(nt,"".concat(j,"-ellipsis"),yn),ae(nt,"".concat(j,"-single-line"),Pn&&tn===1),ae(nt,"".concat(j,"-ellipsis-single-line"),$t),ae(nt,"".concat(j,"-ellipsis-multiple-line"),Wt),nt),s),prefixCls:a,style:Be(Be({},o),{WebkitLineClamp:Wt?tn:void 0}),component:_,ref:La(Pt,L,t),direction:O,onClick:oe.includes("text")?Te:void 0,"aria-label":Pe==null?void 0:Pe.toString(),title:T,...U,children:A(Fve,{enabledMeasure:Pn&&!dt,text:p,rows:tn,width:Jn,fontSize:de,onEllipsis:Ie,children:function(Ft,Gt){var wn=Ft;Ft.length&&Gt&&Pe&&(wn=A("span",{"aria-hidden":!0,children:wn},"show-content"));var dn=Vve(e,it(nr,{children:[wn,Bt(Gt)]}));return dn}})})})}})});const y1=jve;var Hve=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Kve=E.exports.forwardRef(function(e,t){var n=e.ellipsis,r=e.rel,i=Hve(e,["ellipsis","rel"]),a=Be(Be({},i),{rel:r===void 0&&i.target==="_blank"?"noopener noreferrer":r});return delete a.navigate,A(y1,{...a,ref:t,ellipsis:!!n,component:"a"})});const Wve=Kve;var Gve=E.exports.forwardRef(function(e,t){return A(y1,{ref:t,...e,component:"div"})});const qve=Gve;var Zve=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Xve=function(t,n){var r=t.ellipsis,i=Zve(t,["ellipsis"]),a=E.exports.useMemo(function(){return r&&on(r)==="object"?Wi(r,["expandable","rows"]):r},[r]);return A(y1,{ref:n,...i,ellipsis:a,component:"span"})};const Yve=E.exports.forwardRef(Xve);var Qve=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Jve=vne(1,2,3,4,5),eye=E.exports.forwardRef(function(e,t){var n=e.level,r=n===void 0?1:n,i=Qve(e,["level"]),a;return Jve.includes(r)?a="h".concat(r):a="h1",A(y1,{ref:t,...i,component:a})});const tye=eye;var gv=gU;gv.Text=Yve;gv.Link=Wve;gv.Title=tye;gv.Paragraph=qve;const nye=gv;function rye(e,t){var n="cannot ".concat(e.method," ").concat(e.action," ").concat(t.status,"'"),r=new Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}function xA(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function iye(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(a){a.total>0&&(a.percent=a.loaded/a.total*100),e.onProgress(a)});var n=new FormData;e.data&&Object.keys(e.data).forEach(function(i){var a=e.data[i];if(Array.isArray(a)){a.forEach(function(s){n.append("".concat(i,"[]"),s)});return}n.append(i,a)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(a){e.onError(a)},t.onload=function(){return t.status<200||t.status>=300?e.onError(rye(e,t),xA(t)):e.onSuccess(xA(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var r=e.headers||{};return r["X-Requested-With"]!==null&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach(function(i){r[i]!==null&&t.setRequestHeader(i,r[i])}),t.send(n),{abort:function(){t.abort()}}}var oye=+new Date,aye=0;function dS(){return"rc-upload-".concat(oye,"-").concat(++aye)}const fS=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",i=e.type||"",a=i.replace(/\/.*$/,"");return n.some(function(s){var o=s.trim();if(/^\*(\/\*)?$/.test(s))return!0;if(o.charAt(0)==="."){var c=r.toLowerCase(),f=o.toLowerCase(),p=[f];return(f===".jpg"||f===".jpeg")&&(p=[".jpg",".jpeg"]),p.some(function(g){return c.endsWith(g)})}return/\/\*$/.test(o)?a===o.replace(/\/.*$/,""):i===o?!0:/^\w+$/.test(o)?(Nr(!1,"Upload takes an invalidate 'accept' type '".concat(o,"'.Skip for check.")),!0):!1})}return!0};function sye(e,t){var n=e.createReader(),r=[];function i(){n.readEntries(function(a){var s=Array.prototype.slice.apply(a);r=r.concat(s);var o=!s.length;o?t(r):i()})}i()}var lye=function(t,n,r){var i=function a(s,o){s.path=o||"",s.isFile?s.file(function(c){r(c)&&(s.fullPath&&!c.webkitRelativePath&&(Object.defineProperties(c,{webkitRelativePath:{writable:!0}}),c.webkitRelativePath=s.fullPath.replace(/^\//,""),Object.defineProperties(c,{webkitRelativePath:{writable:!1}})),n([c]))}):s.isDirectory&&sye(s,function(c){c.forEach(function(f){a(f,"".concat(o).concat(s.name,"/"))})})};t.forEach(function(a){i(a.webkitGetAsEntry())})},uye=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],cye=function(e){ai(n,e);var t=si(n);function n(){var r;Ur(this,n);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),r.state={uid:dS()},r.reqs={},r.fileInput=void 0,r._isMounted=void 0,r.onChange=function(o){var c=r.props,f=c.accept,p=c.directory,g=o.target.files,v=Rt(g).filter(function(b){return!p||fS(b,f)});r.uploadFiles(v),r.reset()},r.onClick=function(o){var c=r.fileInput;if(!!c){var f=r.props,p=f.children,g=f.onClick;if(p&&p.type==="button"){var v=c.parentNode;v.focus(),v.querySelector("button").blur()}c.click(),g&&g(o)}},r.onKeyDown=function(o){o.key==="Enter"&&r.onClick(o)},r.onFileDrop=function(o){var c=r.props.multiple;if(o.preventDefault(),o.type!=="dragover")if(r.props.directory)lye(Array.prototype.slice.call(o.dataTransfer.items),r.uploadFiles,function(p){return fS(p,r.props.accept)});else{var f=Rt(o.dataTransfer.files).filter(function(p){return fS(p,r.props.accept)});c===!1&&(f=f.slice(0,1)),r.uploadFiles(f)}},r.uploadFiles=function(o){var c=Rt(o),f=c.map(function(p){return p.uid=dS(),r.processFile(p,c)});Promise.all(f).then(function(p){var g=r.props.onBatchStart;g==null||g(p.map(function(v){var b=v.origin,_=v.parsedFile;return{file:b,parsedFile:_}})),p.filter(function(v){return v.parsedFile!==null}).forEach(function(v){r.post(v)})})},r.processFile=function(){var o=dc(Li().mark(function c(f,p){var g,v,b,_,T,k,P,M,O;return Li().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:if(g=r.props.beforeUpload,v=f,!g){L.next=14;break}return L.prev=3,L.next=6,g(f,p);case 6:v=L.sent,L.next=12;break;case 9:L.prev=9,L.t0=L.catch(3),v=!1;case 12:if(v!==!1){L.next=14;break}return L.abrupt("return",{origin:f,parsedFile:null,action:null,data:null});case 14:if(b=r.props.action,typeof b!="function"){L.next=21;break}return L.next=18,b(f);case 18:_=L.sent,L.next=22;break;case 21:_=b;case 22:if(T=r.props.data,typeof T!="function"){L.next=29;break}return L.next=26,T(f);case 26:k=L.sent,L.next=30;break;case 29:k=T;case 30:return P=(on(v)==="object"||typeof v=="string")&&v?v:f,P instanceof File?M=P:M=new File([P],f.name,{type:f.type}),O=M,O.uid=f.uid,L.abrupt("return",{origin:f,data:k,parsedFile:O,action:_});case 35:case"end":return L.stop()}},c,null,[[3,9]])}));return function(c,f){return o.apply(this,arguments)}}(),r.saveFileInput=function(o){r.fileInput=o},r}return jr(n,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(i){var a=this,s=i.data,o=i.origin,c=i.action,f=i.parsedFile;if(!!this._isMounted){var p=this.props,g=p.onStart,v=p.customRequest,b=p.name,_=p.headers,T=p.withCredentials,k=p.method,P=o.uid,M=v||iye,O={action:c,filename:b,data:s,file:f,headers:_,withCredentials:T,method:k||"post",onProgress:function(L){var $=a.props.onProgress;$==null||$(L,f)},onSuccess:function(L,$){var j=a.props.onSuccess;j==null||j(L,f,$),delete a.reqs[P]},onError:function(L,$){var j=a.props.onError;j==null||j(L,$,f),delete a.reqs[P]}};g(o),this.reqs[P]=M(O)}}},{key:"reset",value:function(){this.setState({uid:dS()})}},{key:"abort",value:function(i){var a=this.reqs;if(i){var s=i.uid?i.uid:i;a[s]&&a[s].abort&&a[s].abort(),delete a[s]}else Object.keys(a).forEach(function(o){a[o]&&a[o].abort&&a[o].abort(),delete a[o]})}},{key:"render",value:function(){var i,a=this.props,s=a.component,o=a.prefixCls,c=a.className,f=a.disabled,p=a.id,g=a.style,v=a.multiple,b=a.accept,_=a.capture,T=a.children,k=a.directory,P=a.openFileDialogOnClick,M=a.onMouseEnter,O=a.onMouseLeave,N=In(a,uye),L=He((i={},ae(i,o,!0),ae(i,"".concat(o,"-disabled"),f),ae(i,c,c),i)),$=k?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},j=f?{}:{onClick:P?this.onClick:function(){},onKeyDown:P?this.onKeyDown:function(){},onMouseEnter:M,onMouseLeave:O,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return it(s,{...j,className:L,role:"button",style:g,children:[E.exports.createElement("input",{...Ql(N,{aria:!0,data:!0}),id:p,type:"file",ref:this.saveFileInput,onClick:function(G){return G.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:b,...$,multiple:v,onChange:this.onChange,..._!=null?{capture:_}:{}}),T]})}}]),n}(E.exports.Component);function hS(){}var fE=function(e){ai(n,e);var t=si(n);function n(){var r;Ur(this,n);for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=t.call.apply(t,[this].concat(a)),r.uploader=void 0,r.saveUploader=function(o){r.uploader=o},r}return jr(n,[{key:"abort",value:function(i){this.uploader.abort(i)}},{key:"render",value:function(){return A(cye,{...this.props,ref:this.saveUploader})}}]),n}(E.exports.Component);fE.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:hS,onError:hS,onSuccess:hS,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var dye={icon:function(t,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:n}},{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.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:t}}]}},name:"file",theme:"twotone"};const fye=dye;var yU=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:fye})})};yU.displayName="FileTwoTone";const hye=E.exports.forwardRef(yU);var pye={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"};const mye=pye;var xU=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:mye})})};xU.displayName="PaperClipOutlined";const gye=E.exports.forwardRef(xU);var vye={icon:function(t,n){return{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 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:t}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:n}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:n}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:n}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:t}}]}},name:"picture",theme:"twotone"};const yye=vye;var bU=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:yye})})};bU.displayName="PictureTwoTone";const xye=E.exports.forwardRef(bU);function _0(e){return Be(Be({},e),{lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e})}function w0(e,t){var n=Rt(t),r=n.findIndex(function(i){var a=i.uid;return a===e.uid});return r===-1?n.push(e):n[r]=e,n}function pS(e,t){var n=e.uid!==void 0?"uid":"name";return t.filter(function(r){return r[n]===e[n]})[0]}function bye(e,t){var n=e.uid!==void 0?"uid":"name",r=t.filter(function(i){return i[n]!==e[n]});return r.length===t.length?null:r}var _ye=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split("/"),r=n[n.length-1],i=r.split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(i)||[""])[0]},_U=function(t){return t.indexOf("image/")===0},wye=function(t){if(t.type&&!t.thumbUrl)return _U(t.type);var n=t.thumbUrl||t.url||"",r=_ye(n);return/^data:image\//.test(n)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(r)?!0:!(/^data:/.test(n)||r)},Su=200;function Cye(e){return new Promise(function(t){if(!e.type||!_U(e.type)){t("");return}var n=document.createElement("canvas");n.width=Su,n.height=Su,n.style.cssText="position: fixed; left: 0; top: 0; width: ".concat(Su,"px; height: ").concat(Su,"px; z-index: 9999; display: none;"),document.body.appendChild(n);var r=n.getContext("2d"),i=new Image;if(i.onload=function(){var s=i.width,o=i.height,c=Su,f=Su,p=0,g=0;s>o?(f=o*(Su/s),g=-(f-c)/2):(c=s*(Su/o),p=-(c-f)/2),r.drawImage(i,p,g,c,f);var v=n.toDataURL();document.body.removeChild(n),t(v)},i.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){var a=new FileReader;a.addEventListener("load",function(){a.result&&(i.src=a.result)}),a.readAsDataURL(e)}else i.src=window.URL.createObjectURL(e)})}var Sye={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 wU=Sye;var CU=function(t,n){return A(Yn,{...fe(fe({},t),{},{ref:n,icon:wU})})};CU.displayName="DownloadOutlined";const Eye=E.exports.forwardRef(CU);var Pye=E.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.className,a=e.style,s=e.locale,o=e.listType,c=e.file,f=e.items,p=e.progress,g=e.iconRender,v=e.actionIconRender,b=e.itemRender,_=e.isImgUrl,T=e.showPreviewIcon,k=e.showRemoveIcon,P=e.showDownloadIcon,M=e.previewIcon,O=e.removeIcon,N=e.downloadIcon,L=e.onPreview,$=e.onDownload,j=e.onClose,U,G,Z=c.status,Q=E.exports.useState(Z),J=$e(Q,2),re=J[0],ne=J[1];E.exports.useEffect(function(){Z!=="removed"&&ne(Z)},[Z]);var ge=E.exports.useState(!1),ie=$e(ge,2),ue=ie[0],oe=ie[1],me=E.exports.useRef(null);E.exports.useEffect(function(){return me.current=setTimeout(function(){oe(!0)},300),function(){me.current&&clearTimeout(me.current)}},[]);var Te="".concat(r,"-span"),we=g(c),be=A("div",{className:"".concat(r,"-text-icon"),children:we});if(o==="picture"||o==="picture-card")if(re==="uploading"||!c.thumbUrl&&!c.url){var Re,Ee=He((Re={},ae(Re,"".concat(r,"-list-item-thumbnail"),!0),ae(Re,"".concat(r,"-list-item-file"),re!=="uploading"),Re));be=A("div",{className:Ee,children:we})}else{var Me,Ae=_!=null&&_(c)?A("img",{src:c.thumbUrl||c.url,alt:c.name,className:"".concat(r,"-list-item-image"),crossOrigin:c.crossOrigin}):we,Fe=He((Me={},ae(Me,"".concat(r,"-list-item-thumbnail"),!0),ae(Me,"".concat(r,"-list-item-file"),_&&!_(c)),Me));be=A("a",{className:Fe,onClick:function(Ht){return L(c,Ht)},href:c.url||c.thumbUrl,target:"_blank",rel:"noopener noreferrer",children:Ae})}var We=He((n={},ae(n,"".concat(r,"-list-item"),!0),ae(n,"".concat(r,"-list-item-").concat(re),!0),ae(n,"".concat(r,"-list-item-list-type-").concat(o),!0),n)),je=typeof c.linkProps=="string"?JSON.parse(c.linkProps):c.linkProps,pt=k?v((typeof O=="function"?O(c):O)||A(Gge,{}),function(){return j(c)},r,s.removeFile):null,gt=P&&re==="done"?v((typeof N=="function"?N(c):N)||A(Eye,{}),function(){return $(c)},r,s.downloadFile):null,Ot=o!=="picture-card"&&it("span",{className:He("".concat(r,"-list-item-card-actions"),{picture:o==="picture"}),children:[gt,pt]},"download-delete"),Ze=He("".concat(r,"-list-item-name")),St=c.url?[A("a",{target:"_blank",rel:"noopener noreferrer",className:Ze,title:c.name,...je,href:c.url,onClick:function(Ht){return L(c,Ht)},children:c.name},"view"),Ot]:[A("span",{className:Ze,onClick:function(Ht){return L(c,Ht)},title:c.name,children:c.name},"view"),Ot],ot={pointerEvents:"none",opacity:.5},vt=T?A("a",{href:c.url||c.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:c.url||c.thumbUrl?void 0:ot,onClick:function(Ht){return L(c,Ht)},title:s.previewFile,children:typeof M=="function"?M(c):M||A(UT,{})}):null,yt=o==="picture-card"&&re!=="uploading"&&it("span",{className:"".concat(r,"-list-item-actions"),children:[vt,re==="done"&&gt,pt]}),kt;c.response&&typeof c.response=="string"?kt=c.response:kt=((U=c.error)===null||U===void 0?void 0:U.statusText)||((G=c.error)===null||G===void 0?void 0:G.message)||s.uploadError;var et=it("span",{className:Te,children:[be,St]}),ut=E.exports.useContext(Fn),at=ut.getPrefixCls,Ke=at(),ct=it("div",{className:We,children:[A("div",{className:"".concat(r,"-list-item-info"),children:et}),yt,ue&&A(sa,{motionName:"".concat(Ke,"-fade"),visible:re==="uploading",motionDeadline:2e3,children:function(Lt){var Ht=Lt.className,ze="percent"in c?A(GT,{...p,type:"line",percent:c.percent}):null;return A("div",{className:He("".concat(r,"-list-item-progress"),Ht),children:ze})}})]}),bt=He("".concat(r,"-list-").concat(o,"-container"),i),At=re==="error"?A(Ra,{title:kt,getPopupContainer:function(Ht){return Ht.parentNode},children:ct}):ct;return A("div",{className:bt,style:a,ref:t,children:b?b(At,c,f,{download:$.bind(null,c),preview:L.bind(null,c),remove:j.bind(null,c)}):At})});const Tye=Pye;var x1=Be({},G_);delete x1.onAppearEnd;delete x1.onEnterEnd;delete x1.onLeaveEnd;var kye=function(t,n){var r,i=t.listType,a=i===void 0?"text":i,s=t.previewFile,o=s===void 0?Cye:s,c=t.onPreview,f=t.onDownload,p=t.onRemove,g=t.locale,v=t.iconRender,b=t.isImageUrl,_=b===void 0?wye:b,T=t.prefixCls,k=t.items,P=k===void 0?[]:k,M=t.showPreviewIcon,O=M===void 0?!0:M,N=t.showRemoveIcon,L=N===void 0?!0:N,$=t.showDownloadIcon,j=$===void 0?!1:$,U=t.removeIcon,G=t.previewIcon,Z=t.downloadIcon,Q=t.progress,J=Q===void 0?{strokeWidth:2,showInfo:!1}:Q,re=t.appendAction,ne=t.appendActionVisible,ge=ne===void 0?!0:ne,ie=t.itemRender,ue=TT(),oe=E.exports.useState(!1),me=$e(oe,2),Te=me[0],we=me[1];E.exports.useEffect(function(){a!=="picture"&&a!=="picture-card"||(P||[]).forEach(function(ot){typeof document>"u"||typeof window>"u"||!window.FileReader||!window.File||!(ot.originFileObj instanceof File||ot.originFileObj instanceof Blob)||ot.thumbUrl!==void 0||(ot.thumbUrl="",o&&o(ot.originFileObj).then(function(vt){ot.thumbUrl=vt||"",ue()}))})},[a,P,o]),E.exports.useEffect(function(){we(!0)},[]);var be=function(vt,yt){if(!!c)return yt==null||yt.preventDefault(),c(vt)},Re=function(vt){typeof f=="function"?f(vt):vt.url&&window.open(vt.url)},Ee=function(vt){p==null||p(vt)},Me=function(vt){if(v)return v(vt,a);var yt=vt.status==="uploading",kt=_&&_(vt)?A(xye,{}):A(hye,{}),et=yt?A(Id,{}):A(gye,{});return a==="picture"?et=yt?A(Id,{}):kt:a==="picture-card"&&(et=yt?g.uploading:kt),et},Ae=function(vt,yt,kt,et){var ut={type:"text",size:"small",title:et,onClick:function(ct){yt(),Ia(vt)&&vt.props.onClick&&vt.props.onClick(ct)},className:"".concat(kt,"-list-item-card-actions-btn")};if(Ia(vt)){var at=Ei(vt,Be(Be({},vt.props),{onClick:function(){}}));return A(Xr,{...ut,icon:at})}return A(Xr,{...ut,children:A("span",{children:vt})})};E.exports.useImperativeHandle(n,function(){return{handlePreview:be,handleDownload:Re}});var Fe=E.exports.useContext(Fn),We=Fe.getPrefixCls,je=Fe.direction,pt=We("upload",T),gt=He((r={},ae(r,"".concat(pt,"-list"),!0),ae(r,"".concat(pt,"-list-").concat(a),!0),ae(r,"".concat(pt,"-list-rtl"),je==="rtl"),r)),Ot=Rt(P.map(function(ot){return{key:ot.uid,file:ot}})),Ze=a==="picture-card"?"animate-inline":"animate",St={motionDeadline:2e3,motionName:"".concat(pt,"-").concat(Ze),keys:Ot,motionAppear:Te};return a!=="picture-card"&&(St=Be(Be({},x1),St)),it("div",{className:gt,children:[A(f$,{...St,component:!1,children:function(ot){var vt=ot.key,yt=ot.file,kt=ot.className,et=ot.style;return A(Tye,{locale:g,prefixCls:pt,className:kt,style:et,file:yt,items:P,progress:J,listType:a,isImgUrl:_,showPreviewIcon:O,showRemoveIcon:L,showDownloadIcon:j,removeIcon:U,previewIcon:G,downloadIcon:Z,iconRender:Me,actionIconRender:Ae,itemRender:ie,onPreview:be,onDownload:Re,onClose:Ee},vt)}}),re&&A(sa,{...St,visible:ge,forceRender:!0,children:function(ot){var vt=ot.className,yt=ot.style;return Ei(re,function(kt){return{className:He(kt.className,vt),style:Be(Be(Be({},yt),{pointerEvents:vt?"none":void 0}),kt.style)}})}})]})},Iye=E.exports.forwardRef(kye);const Mye=Iye;var Rye=globalThis&&globalThis.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(p){try{f(r.next(p))}catch(g){s(g)}}function c(p){try{f(r.throw(p))}catch(g){s(g)}}function f(p){p.done?a(p.value):i(p.value).then(o,c)}f((r=r.apply(e,t||[])).next())})},Tm="__LIST_IGNORE_".concat(Date.now(),"__"),Dye=function(t,n){var r,i=t.fileList,a=t.defaultFileList,s=t.onRemove,o=t.showUploadList,c=o===void 0?!0:o,f=t.listType,p=f===void 0?"text":f,g=t.onPreview,v=t.onDownload,b=t.onChange,_=t.onDrop,T=t.previewFile,k=t.disabled,P=t.locale,M=t.iconRender,O=t.isImageUrl,N=t.progress,L=t.prefixCls,$=t.className,j=t.type,U=j===void 0?"select":j,G=t.children,Z=t.style,Q=t.itemRender,J=t.maxCount,re=t.data,ne=re===void 0?{}:re,ge=t.multiple,ie=ge===void 0?!1:ge,ue=t.action,oe=ue===void 0?"":ue,me=t.accept,Te=me===void 0?"":me,we=t.supportServerRender,be=we===void 0?!0:we,Re=E.exports.useContext(fc),Ee=k!=null?k:Re,Me=Si(a||[],{value:i,postState:function(It){return It!=null?It:[]}}),Ae=$e(Me,2),Fe=Ae[0],We=Ae[1],je=E.exports.useState("drop"),pt=$e(je,2),gt=pt[0],Ot=pt[1],Ze=E.exports.useRef(null);E.exports.useMemo(function(){var Vt=Date.now();(i||[]).forEach(function(It,Xt){!It.uid&&!Object.isFrozen(It)&&(It.uid="__AUTO__".concat(Vt,"_").concat(Xt,"__"))})},[i]);var St=function(It,Xt,pn){var tt=Rt(Xt);J===1?tt=tt.slice(-1):J&&(tt=tt.slice(0,J)),cl.exports.flushSync(function(){We(tt)});var Nt={file:It,fileList:tt};pn&&(Nt.event=pn),b==null||b(Nt)},ot=function(It,Xt){return Rye(void 0,void 0,void 0,Li().mark(function pn(){var tt,Nt,qt,En;return Li().wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:if(tt=t.beforeUpload,Nt=t.transformFile,qt=It,!tt){Et.next=13;break}return Et.next=5,tt(It,Xt);case 5:if(En=Et.sent,En!==!1){Et.next=8;break}return Et.abrupt("return",!1);case 8:if(delete It[Tm],En!==Tm){Et.next=12;break}return Object.defineProperty(It,Tm,{value:!0,configurable:!0}),Et.abrupt("return",!1);case 12:on(En)==="object"&&En&&(qt=En);case 13:if(!Nt){Et.next=17;break}return Et.next=16,Nt(qt);case 16:qt=Et.sent;case 17:return Et.abrupt("return",qt);case 18:case"end":return Et.stop()}},pn)}))},vt=function(It){var Xt=It.filter(function(Nt){return!Nt.file[Tm]});if(!!Xt.length){var pn=Xt.map(function(Nt){return _0(Nt.file)}),tt=Rt(Fe);pn.forEach(function(Nt){tt=w0(Nt,tt)}),pn.forEach(function(Nt,qt){var En=Nt;if(Xt[qt].parsedFile)Nt.status="uploading";else{var yn=Nt.originFileObj,Et;try{Et=new File([yn],yn.name,{type:yn.type})}catch{Et=new Blob([yn],{type:yn.type}),Et.name=yn.name,Et.lastModifiedDate=new Date,Et.lastModified=new Date().getTime()}Et.uid=Nt.uid,En=Et}St(En,tt)})}},yt=function(It,Xt,pn){try{typeof It=="string"&&(It=JSON.parse(It))}catch{}if(!!pS(Xt,Fe)){var tt=_0(Xt);tt.status="done",tt.percent=100,tt.response=It,tt.xhr=pn;var Nt=w0(tt,Fe);St(tt,Nt)}},kt=function(It,Xt){if(!!pS(Xt,Fe)){var pn=_0(Xt);pn.status="uploading",pn.percent=It.percent;var tt=w0(pn,Fe);St(pn,tt,It)}},et=function(It,Xt,pn){if(!!pS(pn,Fe)){var tt=_0(pn);tt.error=It,tt.response=Xt,tt.status="error";var Nt=w0(tt,Fe);St(tt,Nt)}},ut=function(It){var Xt;Promise.resolve(typeof s=="function"?s(It):s).then(function(pn){var tt;if(pn!==!1){var Nt=bye(It,Fe);Nt&&(Xt=Be(Be({},It),{status:"removed"}),Fe==null||Fe.forEach(function(qt){var En=Xt.uid!==void 0?"uid":"name";qt[En]===Xt[En]&&!Object.isFrozen(qt)&&(qt.status="removed")}),(tt=Ze.current)===null||tt===void 0||tt.abort(Xt),St(Xt,Nt))}})},at=function(It){Ot(It.type),It.type==="drop"&&(_==null||_(It))};E.exports.useImperativeHandle(n,function(){return{onBatchStart:vt,onSuccess:yt,onProgress:kt,onError:et,fileList:Fe,upload:Ze.current}});var Ke=E.exports.useContext(Fn),ct=Ke.getPrefixCls,bt=Ke.direction,At=ct("upload",L),Lt=Be(Be({onBatchStart:vt,onError:et,onProgress:kt,onSuccess:yt},t),{data:ne,multiple:ie,action:oe,accept:Te,supportServerRender:be,prefixCls:At,disabled:Ee,beforeUpload:ot,onChange:void 0});delete Lt.className,delete Lt.style,(!G||Ee)&&delete Lt.id;var Ht=function(It,Xt){return c?A(Fh,{componentName:"Upload",defaultLocale:Os.Upload,children:function(pn){var tt=typeof c=="boolean"?{}:c,Nt=tt.showRemoveIcon,qt=tt.showPreviewIcon,En=tt.showDownloadIcon,yn=tt.removeIcon,Et=tt.previewIcon,Pn=tt.downloadIcon;return A(Mye,{prefixCls:At,listType:p,items:Fe,previewFile:T,onPreview:g,onDownload:v,onRemove:ut,showRemoveIcon:!Ee&&Nt,showPreviewIcon:qt,showDownloadIcon:En,removeIcon:yn,previewIcon:Et,downloadIcon:Pn,iconRender:M,locale:Be(Be({},pn),P),isImageUrl:O,progress:N,appendAction:It,appendActionVisible:Xt,itemRender:Q})}}):It};if(U==="drag"){var ze,Qe=He(At,(ze={},ae(ze,"".concat(At,"-drag"),!0),ae(ze,"".concat(At,"-drag-uploading"),Fe.some(function(Vt){return Vt.status==="uploading"})),ae(ze,"".concat(At,"-drag-hover"),gt==="dragover"),ae(ze,"".concat(At,"-disabled"),Ee),ae(ze,"".concat(At,"-rtl"),bt==="rtl"),ze),$);return it("span",{children:[A("div",{className:Qe,onDrop:at,onDragOver:at,onDragLeave:at,style:Z,children:A(fE,{...Lt,ref:Ze,className:"".concat(At,"-btn"),children:A("div",{className:"".concat(At,"-drag-container"),children:G})})}),Ht()]})}var Zt=He(At,(r={},ae(r,"".concat(At,"-select"),!0),ae(r,"".concat(At,"-select-").concat(p),!0),ae(r,"".concat(At,"-disabled"),Ee),ae(r,"".concat(At,"-rtl"),bt==="rtl"),r)),an=function(It){return A("div",{className:Zt,style:It,children:A(fE,{...Lt,ref:Ze})})},Kt=an(G?void 0:{display:"none"});return p==="picture-card"?A("span",{className:He("".concat(At,"-picture-card-wrapper"),$),children:Ht(Kt,!!G)}):it("span",{className:$,children:[Kt,Ht()]})},Oye=E.exports.forwardRef(Dye);const SU=Oye;var Aye=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Nye=E.exports.forwardRef(function(e,t){var n=e.style,r=e.height,i=Aye(e,["style","height"]);return A(SU,{ref:t,...i,type:"drag",style:Be(Be({},n),{height:r})})});const Lye=Nye;var nk=SU;nk.Dragger=Lye;nk.LIST_IGNORE=Tm;const Fye=nk,bA=e=>{let t;const n=new Set,r=(c,f)=>{const p=typeof c=="function"?c(t):c;if(!Object.is(p,t)){const g=t;t=(f!=null?f:typeof p!="object")?p:Object.assign({},t,p),n.forEach(v=>v(t,g))}},i=()=>t,o={setState:r,getState:i,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{var c;((c={VITE_API_URL:"https://geoheat.spatialsystems.ru",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0})==null?void 0:c.MODE)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,i,o),o},zye=e=>e?bA(e):bA;var EU={exports:{}},PU={},rk={exports:{}},TU={};/**
* @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 Ch=E.exports;function $ye(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Bye=typeof Object.is=="function"?Object.is:$ye,Vye=Ch.useState,Uye=Ch.useEffect,jye=Ch.useLayoutEffect,Hye=Ch.useDebugValue;function Kye(e,t){var n=t(),r=Vye({inst:{value:n,getSnapshot:t}}),i=r[0].inst,a=r[1];return jye(function(){i.value=n,i.getSnapshot=t,mS(i)&&a({inst:i})},[e,n,t]),Uye(function(){return mS(i)&&a({inst:i}),e(function(){mS(i)&&a({inst:i})})},[e]),Hye(n),n}function mS(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Bye(e,n)}catch{return!0}}function Wye(e,t){return t()}var Gye=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Wye:Kye;TU.useSyncExternalStore=Ch.useSyncExternalStore!==void 0?Ch.useSyncExternalStore:Gye;(function(e){e.exports=TU})(rk);/**
* @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 b1=E.exports,qye=rk.exports;function Zye(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Xye=typeof Object.is=="function"?Object.is:Zye,Yye=qye.useSyncExternalStore,Qye=b1.useRef,Jye=b1.useEffect,e0e=b1.useMemo,t0e=b1.useDebugValue;PU.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var a=Qye(null);if(a.current===null){var s={hasValue:!1,value:null};a.current=s}else s=a.current;a=e0e(function(){function c(b){if(!f){if(f=!0,p=b,b=r(b),i!==void 0&&s.hasValue){var _=s.value;if(i(_,b))return g=_}return g=b}if(_=g,Xye(p,b))return _;var T=r(b);return i!==void 0&&i(_,T)?_:(p=b,g=T)}var f=!1,p,g,v=n===void 0?null:n;return[function(){return c(t())},v===null?void 0:function(){return c(v())}]},[t,n,r,i]);var o=Yye(e,a[0],a[1]);return Jye(function(){s.hasValue=!0,s.value=o},[o]),t0e(o),o};(function(e){e.exports=PU})(EU);const n0e=WE(EU.exports),{useSyncExternalStoreWithSelector:r0e}=n0e;function i0e(e,t=e.getState,n){const r=r0e(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return E.exports.useDebugValue(r),r}const _A=e=>{var t;((t={VITE_API_URL:"https://geoheat.spatialsystems.ru",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0})==null?void 0:t.MODE)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const n=typeof e=="function"?zye(e):e,r=(i,a)=>i0e(n,i,a);return Object.assign(r,n),r},hc=e=>e?_A(e):_A;function Ja(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map(function(i){return"'"+i+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Sh(e){return!!e&&!!e[Er]}function Jl(e){var t;return!!e&&(function(n){if(!n||typeof n!="object")return!1;var r=Object.getPrototypeOf(n);if(r===null)return!0;var i=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===p0e}(e)||Array.isArray(e)||!!e[kA]||!!(!((t=e.constructor)===null||t===void 0)&&t[kA])||ik(e)||ok(e))}function Eh(e,t,n){n===void 0&&(n=!1),Zh(e)===0?(n?Object.keys:ck)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,i){return t(i,r,e)})}function Zh(e){var t=e[Er];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:ik(e)?2:ok(e)?3:0}function hE(e,t){return Zh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function o0e(e,t){return Zh(e)===2?e.get(t):e[t]}function kU(e,t,n){var r=Zh(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function a0e(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function ik(e){return f0e&&e instanceof Map}function ok(e){return h0e&&e instanceof Set}function Qi(e){return e.o||e.t}function ak(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=m0e(e);delete t[Er];for(var n=ck(t),r=0;r<n.length;r++){var i=n[r],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 sk(e,t){return t===void 0&&(t=!1),lk(e)||Sh(e)||!Jl(e)||(Zh(e)>1&&(e.set=e.add=e.clear=e.delete=s0e),Object.freeze(e),t&&Eh(e,function(n,r){return sk(r,!0)},!0)),e}function s0e(){Ja(2)}function lk(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function sl(e){var t=mE[e];return t||Ja(18,e),t}function l0e(e,t){mE[e]||(mE[e]=t)}function Db(){return Mg}function gS(e,t){t&&(sl("Patches"),e.u=[],e.s=[],e.v=t)}function Ob(e){pE(e),e.p.forEach(u0e),e.p=null}function pE(e){e===Mg&&(Mg=e.l)}function wA(e){return Mg={p:[],l:Mg,h:e,m:!0,_:0}}function u0e(e){var t=e[Er];t.i===0||t.i===1?t.j():t.O=!0}function vS(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||sl("ES5").S(t,e,r),r?(n[Er].P&&(Ob(t),Ja(4)),Jl(e)&&(e=Ab(t,e),t.l||Nb(t,e)),t.u&&sl("Patches").M(n[Er].t,e,t.u,t.s)):e=Ab(t,n,[]),Ob(t),t.u&&t.v(t.u,t.s),e!==IU?e:void 0}function Ab(e,t,n){if(lk(t))return t;var r=t[Er];if(!r)return Eh(t,function(o,c){return CA(e,r,t,o,c,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Nb(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=ak(r.k):r.o,a=i,s=!1;r.i===3&&(a=new Set(i),i.clear(),s=!0),Eh(a,function(o,c){return CA(e,r,i,o,c,n,s)}),Nb(e,i,!1),n&&e.u&&sl("Patches").N(r,n,e.u,e.s)}return r.o}function CA(e,t,n,r,i,a,s){if(Sh(i)){var o=Ab(e,i,a&&t&&t.i!==3&&!hE(t.R,r)?a.concat(r):void 0);if(kU(n,r,o),!Sh(o))return;e.m=!1}else s&&n.add(i);if(Jl(i)&&!lk(i)){if(!e.h.D&&e._<1)return;Ab(e,i),t&&t.A.l||Nb(e,i)}}function Nb(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&sk(t,n)}function yS(e,t){var n=e[Er];return(n?Qi(n):e)[t]}function SA(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function zl(e){e.P||(e.P=!0,e.l&&zl(e.l))}function xS(e){e.o||(e.o=ak(e.t))}function Ig(e,t,n){var r=ik(t)?sl("MapSet").F(t,n):ok(t)?sl("MapSet").T(t,n):e.g?function(i,a){var s=Array.isArray(i),o={i:s?1:0,A:a?a.A:Db(),P:!1,I:!1,R:{},l:a,t:i,k:null,o:null,j:null,C:!1},c=o,f=gE;s&&(c=[o],f=km);var p=Proxy.revocable(c,f),g=p.revoke,v=p.proxy;return o.k=v,o.j=g,v}(t,n):sl("ES5").J(t,n);return(n?n.A:Db()).p.push(r),r}function c0e(e){return Sh(e)||Ja(22,e),function t(n){if(!Jl(n))return n;var r,i=n[Er],a=Zh(n);if(i){if(!i.P&&(i.i<4||!sl("ES5").K(i)))return i.t;i.I=!0,r=EA(n,a),i.I=!1}else r=EA(n,a);return Eh(r,function(s,o){i&&o0e(i.t,s)===o||kU(r,s,t(o))}),a===3?new Set(r):r}(e)}function EA(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return ak(e)}function d0e(){function e(o,c){function f(){this.constructor=o}i(o,c),o.prototype=(f.prototype=c.prototype,new f)}function t(o){o.o||(o.R=new Map,o.o=new Map(o.t))}function n(o){o.o||(o.o=new Set,o.t.forEach(function(c){if(Jl(c)){var f=Ig(o.A.h,c,o);o.p.set(c,f),o.o.add(f)}else o.o.add(c)}))}function r(o){o.O&&Ja(3,JSON.stringify(Qi(o)))}var i=function(o,c){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,p){f.__proto__=p}||function(f,p){for(var g in p)p.hasOwnProperty(g)&&(f[g]=p[g])})(o,c)},a=function(){function o(f,p){return this[Er]={i:2,l:p,A:p?p.A:Db(),P:!1,I:!1,o:void 0,R:void 0,t:f,k:this,C:!1,O:!1},this}e(o,Map);var c=o.prototype;return Object.defineProperty(c,"size",{get:function(){return Qi(this[Er]).size}}),c.has=function(f){return Qi(this[Er]).has(f)},c.set=function(f,p){var g=this[Er];return r(g),Qi(g).has(f)&&Qi(g).get(f)===p||(t(g),zl(g),g.R.set(f,!0),g.o.set(f,p),g.R.set(f,!0)),this},c.delete=function(f){if(!this.has(f))return!1;var p=this[Er];return r(p),t(p),zl(p),p.t.has(f)?p.R.set(f,!1):p.R.delete(f),p.o.delete(f),!0},c.clear=function(){var f=this[Er];r(f),Qi(f).size&&(t(f),zl(f),f.R=new Map,Eh(f.t,function(p){f.R.set(p,!1)}),f.o.clear())},c.forEach=function(f,p){var g=this;Qi(this[Er]).forEach(function(v,b){f.call(p,g.get(b),b,g)})},c.get=function(f){var p=this[Er];r(p);var g=Qi(p).get(f);if(p.I||!Jl(g)||g!==p.t.get(f))return g;var v=Ig(p.A.h,g,p);return t(p),p.o.set(f,v),v},c.keys=function(){return Qi(this[Er]).keys()},c.values=function(){var f,p=this,g=this.keys();return(f={})[C0]=function(){return p.values()},f.next=function(){var v=g.next();return v.done?v:{done:!1,value:p.get(v.value)}},f},c.entries=function(){var f,p=this,g=this.keys();return(f={})[C0]=function(){return p.entries()},f.next=function(){var v=g.next();if(v.done)return v;var b=p.get(v.value);return{done:!1,value:[v.value,b]}},f},c[C0]=function(){return this.entries()},o}(),s=function(){function o(f,p){return this[Er]={i:3,l:p,A:p?p.A:Db(),P:!1,I:!1,o:void 0,t:f,k:this,p:new Map,O:!1,C:!1},this}e(o,Set);var c=o.prototype;return Object.defineProperty(c,"size",{get:function(){return Qi(this[Er]).size}}),c.has=function(f){var p=this[Er];return r(p),p.o?!!p.o.has(f)||!(!p.p.has(f)||!p.o.has(p.p.get(f))):p.t.has(f)},c.add=function(f){var p=this[Er];return r(p),this.has(f)||(n(p),zl(p),p.o.add(f)),this},c.delete=function(f){if(!this.has(f))return!1;var p=this[Er];return r(p),n(p),zl(p),p.o.delete(f)||!!p.p.has(f)&&p.o.delete(p.p.get(f))},c.clear=function(){var f=this[Er];r(f),Qi(f).size&&(n(f),zl(f),f.o.clear())},c.values=function(){var f=this[Er];return r(f),n(f),f.o.values()},c.entries=function(){var f=this[Er];return r(f),n(f),f.o.entries()},c.keys=function(){return this.values()},c[C0]=function(){return this.values()},c.forEach=function(f,p){for(var g=this.values(),v=g.next();!v.done;)f.call(p,v.value,v.value,this),v=g.next()},o}();l0e("MapSet",{F:function(o,c){return new a(o,c)},T:function(o,c){return new s(o,c)}})}var PA,Mg,uk=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",f0e=typeof Map<"u",h0e=typeof Set<"u",TA=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",IU=uk?Symbol.for("immer-nothing"):((PA={})["immer-nothing"]=!0,PA),kA=uk?Symbol.for("immer-draftable"):"__$immer_draftable",Er=uk?Symbol.for("immer-state"):"__$immer_state",C0=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",p0e=""+Object.prototype.constructor,ck=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,m0e=Object.getOwnPropertyDescriptors||function(e){var t={};return ck(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},mE={},gE={get:function(e,t){if(t===Er)return e;var n=Qi(e);if(!hE(n,t))return function(i,a,s){var o,c=SA(a,s);return c?"value"in c?c.value:(o=c.get)===null||o===void 0?void 0:o.call(i.k):void 0}(e,n,t);var r=n[t];return e.I||!Jl(r)?r:r===yS(e.t,t)?(xS(e),e.o[t]=Ig(e.A.h,r,e)):r},has:function(e,t){return t in Qi(e)},ownKeys:function(e){return Reflect.ownKeys(Qi(e))},set:function(e,t,n){var r=SA(Qi(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=yS(Qi(e),t),a=i==null?void 0:i[Er];if(a&&a.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(a0e(n,i)&&(n!==void 0||hE(e.t,t)))return!0;xS(e),zl(e)}return e.o[t]===n&&(n!==void 0||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return yS(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,xS(e),zl(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=Qi(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Ja(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ja(12)}},km={};Eh(gE,function(e,t){km[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),km.deleteProperty=function(e,t){return km.set.call(this,e,t,void 0)},km.set=function(e,t,n){return gE.set.call(this,e[0],t,n,e[0])};var g0e=function(){function e(n){var r=this;this.g=TA,this.D=!0,this.produce=function(i,a,s){if(typeof i=="function"&&typeof a!="function"){var o=a;a=i;var c=r;return function(T){var k=this;T===void 0&&(T=o);for(var P=arguments.length,M=Array(P>1?P-1:0),O=1;O<P;O++)M[O-1]=arguments[O];return c.produce(T,function(N){var L;return(L=a).call.apply(L,[k,N].concat(M))})}}var f;if(typeof a!="function"&&Ja(6),s!==void 0&&typeof s!="function"&&Ja(7),Jl(i)){var p=wA(r),g=Ig(r,i,void 0),v=!0;try{f=a(g),v=!1}finally{v?Ob(p):pE(p)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(T){return gS(p,s),vS(T,p)},function(T){throw Ob(p),T}):(gS(p,s),vS(f,p))}if(!i||typeof i!="object"){if((f=a(i))===void 0&&(f=i),f===IU&&(f=void 0),r.D&&sk(f,!0),s){var b=[],_=[];sl("Patches").M(i,f,b,_),s(b,_)}return f}Ja(21,i)},this.produceWithPatches=function(i,a){if(typeof i=="function")return function(f){for(var p=arguments.length,g=Array(p>1?p-1:0),v=1;v<p;v++)g[v-1]=arguments[v];return r.produceWithPatches(f,function(b){return i.apply(void 0,[b].concat(g))})};var s,o,c=r.produce(i,a,function(f,p){s=f,o=p});return typeof Promise<"u"&&c instanceof Promise?c.then(function(f){return[f,s,o]}):[c,s,o]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){Jl(n)||Ja(8),Sh(n)&&(n=c0e(n));var r=wA(this),i=Ig(this,n,void 0);return i[Er].C=!0,pE(r),i},t.finishDraft=function(n,r){var i=n&&n[Er],a=i.A;return gS(a,r),vS(void 0,a)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!TA&&Ja(20),this.g=n},t.applyPatches=function(n,r){var i;for(i=r.length-1;i>=0;i--){var a=r[i];if(a.path.length===0&&a.op==="replace"){n=a.value;break}}i>-1&&(r=r.slice(i+1));var s=sl("Patches").$;return Sh(n)?s(n,r):this.produce(n,function(o){return s(o,r)})},e}(),Da=new g0e,v0e=Da.produce;Da.produceWithPatches.bind(Da);Da.setAutoFreeze.bind(Da);Da.setUseProxies.bind(Da);Da.applyPatches.bind(Da);Da.createDraft.bind(Da);Da.finishDraft.bind(Da);const y0e=e=>(t,n,r)=>(r.setState=(i,a,...s)=>{const o=typeof i=="function"?v0e(i):i;return t(o,a,...s)},e(r.setState,n,r)),pc=y0e,x0e=e=>({selectedSourceConfig:{sourceId:null,dispatcherNumber:null},setSelectedSourceConfig:({pointId:t,sourceId:n,dispatcherNumber:r})=>e(i=>{i.selectedSourceConfig={pointId:t,sourceId:n,dispatcherNumber:r||null}})}),Wd=hc(pc(x0e)),{Text:b0e}=nye,pl=({text:e,className:t,classNameText:n,type:r="secondary"})=>A("div",{className:kd("mb-1",t),children:A(b0e,{type:r,className:n,children:e})});class vv{constructor(){this.listeners=[],this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.push(t),this.onSubscribe(),()=>{this.listeners=this.listeners.filter(n=>n!==t),this.onUnsubscribe()}}hasListeners(){return this.listeners.length>0}onSubscribe(){}onUnsubscribe(){}}const Rg=typeof window>"u"||"Deno"in window;function Za(){}function _0e(e,t){return typeof e=="function"?e(t):e}function vE(e){return typeof e=="number"&&e>=0&&e!==1/0}function MU(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Im(e,t,n){return _1(e)?typeof t=="function"?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function Iu(e,t,n){return _1(e)?[{...t,queryKey:e},n]:[e||{},t]}function IA(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(_1(s)){if(r){if(t.queryHash!==dk(s,t.options))return!1}else if(!Lb(t.queryKey,s))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||typeof i<"u"&&i!==t.state.fetchStatus||a&&!a(t))}function MA(e,t){const{exact:n,fetching:r,predicate:i,mutationKey:a}=e;if(_1(a)){if(!t.options.mutationKey)return!1;if(n){if(hd(t.options.mutationKey)!==hd(a))return!1}else if(!Lb(t.options.mutationKey,a))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||i&&!i(t))}function dk(e,t){return((t==null?void 0:t.queryKeyHashFn)||hd)(e)}function hd(e){return JSON.stringify(e,(t,n)=>yE(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Lb(e,t){return RU(e,t)}function RU(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!RU(e[n],t[n])):!1}function DU(e,t){if(e===t)return e;const n=DA(e)&&DA(t);if(n||yE(e)&&yE(t)){const r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),a=i.length,s=n?[]:{};let o=0;for(let c=0;c<a;c++){const f=n?c:i[c];s[f]=DU(e[f],t[f]),s[f]===e[f]&&o++}return r===a&&o===r?e:s}return t}function RA(e,t){if(e&&!t||t&&!e)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function DA(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function yE(e){if(!OA(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!OA(n)||!n.hasOwnProperty("isPrototypeOf"))}function OA(e){return Object.prototype.toString.call(e)==="[object Object]"}function _1(e){return Array.isArray(e)}function OU(e){return new Promise(t=>{setTimeout(t,e)})}function AA(e){OU(0).then(e)}function w0e(){if(typeof AbortController=="function")return new AbortController}function xE(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?DU(e,t):t}class C0e extends vv{constructor(){super(),this.setup=t=>{if(!Rg&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.focused=t,t&&this.onFocus()}onFocus(){this.listeners.forEach(t=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Fb=new C0e;class S0e extends vv{constructor(){super(),this.setup=t=>{if(!Rg&&window.addEventListener){const n=()=>t();return window.addEventListener("online",n,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(t){this.online=t,t&&this.onOnline()}onOnline(){this.listeners.forEach(t=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const zb=new S0e;function E0e(e){return Math.min(1e3*2**e,3e4)}function w1(e){return(e!=null?e:"online")==="online"?zb.isOnline():!0}class AU{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function vx(e){return e instanceof AU}function NU(e){let t=!1,n=0,r=!1,i,a,s;const o=new Promise((k,P)=>{a=k,s=P}),c=k=>{r||(b(new AU(k)),e.abort==null||e.abort())},f=()=>{t=!0},p=()=>{t=!1},g=()=>!Fb.isFocused()||e.networkMode!=="always"&&!zb.isOnline(),v=k=>{r||(r=!0,e.onSuccess==null||e.onSuccess(k),i==null||i(),a(k))},b=k=>{r||(r=!0,e.onError==null||e.onError(k),i==null||i(),s(k))},_=()=>new Promise(k=>{i=P=>{const M=r||!g();return M&&k(P),M},e.onPause==null||e.onPause()}).then(()=>{i=void 0,r||e.onContinue==null||e.onContinue()}),T=()=>{if(r)return;let k;try{k=e.fn()}catch(P){k=Promise.reject(P)}Promise.resolve(k).then(v).catch(P=>{var M,O;if(r)return;const N=(M=e.retry)!=null?M:3,L=(O=e.retryDelay)!=null?O:E0e,$=typeof L=="function"?L(n,P):L,j=N===!0||typeof N=="number"&&n<N||typeof N=="function"&&N(n,P);if(t||!j){b(P);return}n++,e.onFail==null||e.onFail(n,P),OU($).then(()=>{if(g())return _()}).then(()=>{t?b(P):T()})})};return w1(e.networkMode)?T():_().then(T),{promise:o,cancel:c,continue:()=>(i==null?void 0:i())?o:Promise.resolve(),cancelRetry:f,continueRetry:p}}const fk=console;function P0e(){let e=[],t=0,n=p=>{p()},r=p=>{p()};const i=p=>{let g;t++;try{g=p()}finally{t--,t||o()}return g},a=p=>{t?e.push(p):AA(()=>{n(p)})},s=p=>(...g)=>{a(()=>{p(...g)})},o=()=>{const p=e;e=[],p.length&&AA(()=>{r(()=>{p.forEach(g=>{n(g)})})})};return{batch:i,batchCalls:s,schedule:a,setNotifyFunction:p=>{n=p},setBatchNotifyFunction:p=>{r=p}}}const Oi=P0e();class LU{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),vE(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t!=null?t:Rg?1/0:5*60*1e3)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class T0e extends LU{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||fk,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||k0e(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const r=xE(this.state.data,t,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const r=this.promise;return(n=this.retryer)==null||n.cancel(t),r?r.then(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||!MU(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(r=>r.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(r=>r.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.indexOf(t)===-1&&(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.indexOf(t)!==-1&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var r,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var a;return(a=this.retryer)==null||a.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const b=this.observers.find(_=>_.options.queryFn);b&&this.setOptions(b.options)}Array.isArray(this.options.queryKey);const s=w0e(),o={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},c=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>{if(s)return this.abortSignalConsumed=!0,s.signal}})};c(o);const f=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(o)):Promise.reject("Missing queryFn"),p={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:f};if(c(p),(r=this.options.behavior)==null||r.onFetch(p),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=p.fetchOptions)==null?void 0:i.meta)){var g;this.dispatch({type:"fetch",meta:(g=p.fetchOptions)==null?void 0:g.meta})}const v=b=>{if(vx(b)&&b.silent||this.dispatch({type:"error",error:b}),!vx(b)){var _,T;(_=(T=this.cache.config).onError)==null||_.call(T,b,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=NU({fn:p.fetchFn,abort:s==null?void 0:s.abort.bind(s),onSuccess:b=>{var _,T;if(typeof b>"u"){v(new Error("undefined"));return}this.setData(b),(_=(T=this.cache.config).onSuccess)==null||_.call(T,b,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:v,onFail:(b,_)=>{this.dispatch({type:"failed",failureCount:b,error:_})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=r=>{var i,a;switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(i=t.meta)!=null?i:null,fetchStatus:w1(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...r,data:t.data,dataUpdateCount:r.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 s=t.error;return vx(s)&&s.revert&&this.revertState?{...this.revertState}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Oi.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function k0e(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r!=null?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}class I0e extends vv{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var i;const a=n.queryKey,s=(i=n.queryHash)!=null?i:dk(a,n);let o=this.get(s);return o||(o=new T0e({cache:this,logger:t.getLogger(),queryKey:a,queryHash:s,options:t.defaultQueryOptions(n),state:r,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 n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(r=>r!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){Oi.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=Iu(t,n);return typeof r.exact>"u"&&(r.exact=!0),this.queries.find(i=>IA(r,i))}findAll(t,n){const[r]=Iu(t,n);return Object.keys(r).length>0?this.queries.filter(i=>IA(r,i)):this.queries}notify(t){Oi.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Oi.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){Oi.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class M0e extends LU{constructor(t){super(),this.options={...t.defaultOptions,...t.options},this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||fk,this.observers=[],this.state=t.state||R0e(),this.updateCacheTime(this.options.cacheTime),this.scheduleGc()}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.indexOf(t)===-1&&(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,n;return(t=(n=this.retryer)==null?void 0:n.continue())!=null?t:this.execute()}async execute(){const t=()=>{var O;return this.retryer=NU({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(N,L)=>{this.dispatch({type:"failed",failureCount:N,error:L})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(O=this.options.retry)!=null?O:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,i,a,s,o,c;if(!n){var f,p,g,v;this.dispatch({type:"loading",variables:this.options.variables}),await((f=(p=this.mutationCache.config).onMutate)==null?void 0:f.call(p,this.state.variables,this));const N=await((g=(v=this.options).onMutate)==null?void 0:g.call(v,this.state.variables));N!==this.state.context&&this.dispatch({type:"loading",context:N,variables:this.state.variables})}const O=await t();return await((r=(i=this.mutationCache.config).onSuccess)==null?void 0:r.call(i,O,this.state.variables,this.state.context,this)),await((a=(s=this.options).onSuccess)==null?void 0:a.call(s,O,this.state.variables,this.state.context)),await((o=(c=this.options).onSettled)==null?void 0:o.call(c,O,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:O}),O}catch(O){try{var b,_,T,k,P,M;throw await((b=(_=this.mutationCache.config).onError)==null?void 0:b.call(_,O,this.state.variables,this.state.context,this)),await((T=(k=this.options).onError)==null?void 0:T.call(k,O,this.state.variables,this.state.context)),await((P=(M=this.options).onSettled)==null?void 0:P.call(M,void 0,O,this.state.variables,this.state.context)),O}finally{this.dispatch({type:"error",error:O})}}}dispatch(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"loading":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!w1(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"};case"setState":return{...r,...t.state}}};this.state=n(this.state),Oi.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function R0e(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class D0e extends vv{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const i=new M0e({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:r,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0});return this.add(i),i}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){Oi.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(n=>MA(t,n))}findAll(t){return this.mutations.filter(n=>MA(t,n))}notify(t){Oi.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const n=this.mutations.filter(r=>r.state.isPaused);return Oi.batch(()=>n.reduce((r,i)=>r.then(()=>i.continue().catch(Za)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function O0e(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,i,a,s;const o=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,c=(r=e.fetchOptions)==null||(i=r.meta)==null?void 0:i.fetchMore,f=c==null?void 0:c.pageParam,p=(c==null?void 0:c.direction)==="forward",g=(c==null?void 0:c.direction)==="backward",v=((a=e.state.data)==null?void 0:a.pages)||[],b=((s=e.state.data)==null?void 0:s.pageParams)||[];let _=b,T=!1;const k=$=>{Object.defineProperty($,"signal",{enumerable:!0,get:()=>{var j;if((j=e.signal)!=null&&j.aborted)T=!0;else{var U;(U=e.signal)==null||U.addEventListener("abort",()=>{T=!0})}return e.signal}})},P=e.options.queryFn||(()=>Promise.reject("Missing queryFn")),M=($,j,U,G)=>(_=G?[j,..._]:[..._,j],G?[U,...$]:[...$,U]),O=($,j,U,G)=>{if(T)return Promise.reject("Cancelled");if(typeof U>"u"&&!j&&$.length)return Promise.resolve($);const Z={queryKey:e.queryKey,pageParam:U,meta:e.options.meta};k(Z);const Q=P(Z);return Promise.resolve(Q).then(re=>M($,U,re,G))};let N;if(!v.length)N=O([]);else if(p){const $=typeof f<"u",j=$?f:NA(e.options,v);N=O(v,$,j)}else if(g){const $=typeof f<"u",j=$?f:A0e(e.options,v);N=O(v,$,j,!0)}else{_=[];const $=typeof e.options.getNextPageParam>"u";N=(o&&v[0]?o(v[0],0,v):!0)?O([],$,b[0]):Promise.resolve(M([],b[0],v[0]));for(let U=1;U<v.length;U++)N=N.then(G=>{if(o&&v[U]?o(v[U],U,v):!0){const Q=$?b[U]:NA(e.options,G);return O(G,$,Q)}return Promise.resolve(M(G,b[U],v[U]))})}return N.then($=>({pages:$,pageParams:_}))}}}}function NA(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function A0e(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class N0e{constructor(t={}){this.queryCache=t.queryCache||new I0e,this.mutationCache=t.mutationCache||new D0e,this.logger=t.logger||fk,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Fb.subscribe(()=>{Fb.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=zb.subscribe(()=>{zb.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,n;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(n=this.unsubscribeOnline)==null||n.call(this),this.unsubscribeOnline=void 0)}isFetching(t,n){const[r]=Iu(t,n);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state.data}ensureQueryData(t,n,r){const i=Im(t,n,r),a=this.getQueryData(i.queryKey);return a?Promise.resolve(a):this.fetchQuery(i)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:r})=>{const i=r.data;return[n,i]})}setQueryData(t,n,r){const i=this.queryCache.find(t),a=i==null?void 0:i.state.data,s=_0e(n,a);if(typeof s>"u")return;const o=Im(t),c=this.defaultQueryOptions(o);return this.queryCache.build(this,c).setData(s,{...r,manual:!0})}setQueriesData(t,n,r){return Oi.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,n,r)]))}getQueryState(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state}removeQueries(t,n){const[r]=Iu(t,n),i=this.queryCache;Oi.batch(()=>{i.findAll(r).forEach(a=>{i.remove(a)})})}resetQueries(t,n,r){const[i,a]=Iu(t,n,r),s=this.queryCache,o={type:"active",...i};return Oi.batch(()=>(s.findAll(i).forEach(c=>{c.reset()}),this.refetchQueries(o,a)))}cancelQueries(t,n,r){const[i,a={}]=Iu(t,n,r);typeof a.revert>"u"&&(a.revert=!0);const s=Oi.batch(()=>this.queryCache.findAll(i).map(o=>o.cancel(a)));return Promise.all(s).then(Za).catch(Za)}invalidateQueries(t,n,r){const[i,a]=Iu(t,n,r);return Oi.batch(()=>{var s,o;if(this.queryCache.findAll(i).forEach(f=>{f.invalidate()}),i.refetchType==="none")return Promise.resolve();const c={...i,type:(s=(o=i.refetchType)!=null?o:i.type)!=null?s:"active"};return this.refetchQueries(c,a)})}refetchQueries(t,n,r){const[i,a]=Iu(t,n,r),s=Oi.batch(()=>this.queryCache.findAll(i).filter(c=>!c.isDisabled()).map(c=>{var f;return c.fetch(void 0,{...a,cancelRefetch:(f=a==null?void 0:a.cancelRefetch)!=null?f:!0,meta:{refetchPage:i.refetchPage}})}));let o=Promise.all(s).then(Za);return a!=null&&a.throwOnError||(o=o.catch(Za)),o}fetchQuery(t,n,r){const i=Im(t,n,r),a=this.defaultQueryOptions(i);typeof a.retry>"u"&&(a.retry=!1);const s=this.queryCache.build(this,a);return s.isStaleByTime(a.staleTime)?s.fetch(a):Promise.resolve(s.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(Za).catch(Za)}fetchInfiniteQuery(t,n,r){const i=Im(t,n,r);return i.behavior=O0e(),this.fetchQuery(i)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).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,n){const r=this.queryDefaults.find(i=>hd(t)===hd(i.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>Lb(t,r.queryKey));return n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(i=>hd(t)===hd(i.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>Lb(t,r.mutationKey));return n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n={...this.defaultOptions.queries,...this.getQueryDefaults(t==null?void 0:t.queryKey),...t,_defaulted:!0};return!n.queryHash&&n.queryKey&&(n.queryHash=dk(n.queryKey,n)),typeof n.refetchOnReconnect>"u"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary>"u"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(t==null?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class L0e extends vv{constructor(t,n){super(),this.client=t,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.length===1&&(this.currentQuery.addObserver(this),LA(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.listeners.length||this.destroy()}shouldFetchOnReconnect(){return bE(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return bE(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=[],this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,n){const r=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),RA(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();const a=this.hasListeners();a&&FA(this.currentQuery,i,this.options,r)&&this.executeFetch(),this.updateResult(n),a&&(this.currentQuery!==i||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();const s=this.computeRefetchInterval();a&&(this.currentQuery!==i||this.options.enabled!==r.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)}getOptimisticResult(t){const n=this.client.getQueryCache().build(this.client,t);return this.createResult(n,t)}getCurrentResult(){return this.currentResult}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),t[r])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...n}={}){return this.fetch({...n,meta:{refetchPage:t}})}fetchOptimistic(t){const n=this.client.defaultQueryOptions(t),r=this.client.getQueryCache().build(this.client,n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return this.executeFetch({...t,cancelRefetch:(n=t.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let n=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Za)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),Rg||this.currentResult.isStale||!vE(this.options.staleTime))return;const n=MU(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(Rg||this.options.enabled===!1||!vE(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Fb.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,n){const r=this.currentQuery,i=this.options,a=this.currentResult,s=this.currentResultState,o=this.currentResultOptions,c=t!==r,f=c?t.state:this.currentQueryInitialState,p=c?this.currentResult:this.previousQueryResult,{state:g}=t;let{dataUpdatedAt:v,error:b,errorUpdatedAt:_,fetchStatus:T,status:k}=g,P=!1,M=!1,O;if(n._optimisticResults){const U=this.hasListeners(),G=!U&&LA(t,n),Z=U&&FA(t,r,n,i);(G||Z)&&(T=w1(t.options.networkMode)?"fetching":"paused",v||(k="loading")),n._optimisticResults==="isRestoring"&&(T="idle")}if(n.keepPreviousData&&!g.dataUpdatedAt&&p!=null&&p.isSuccess&&k!=="error")O=p.data,v=p.dataUpdatedAt,k=p.status,P=!0;else if(n.select&&typeof g.data<"u")if(a&&g.data===(s==null?void 0:s.data)&&n.select===this.selectFn)O=this.selectResult;else try{this.selectFn=n.select,O=n.select(g.data),O=xE(a==null?void 0:a.data,O,n),this.selectResult=O,this.selectError=null}catch(U){this.selectError=U}else O=g.data;if(typeof n.placeholderData<"u"&&typeof O>"u"&&k==="loading"){let U;if(a!=null&&a.isPlaceholderData&&n.placeholderData===(o==null?void 0:o.placeholderData))U=a.data;else if(U=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof U<"u")try{U=n.select(U),this.selectError=null}catch(G){this.selectError=G}typeof U<"u"&&(k="success",O=xE(a==null?void 0:a.data,U,n),M=!0)}this.selectError&&(b=this.selectError,O=this.selectResult,_=Date.now(),k="error");const N=T==="fetching",L=k==="loading",$=k==="error";return{status:k,fetchStatus:T,isLoading:L,isSuccess:k==="success",isError:$,isInitialLoading:L&&N,data:O,dataUpdatedAt:v,error:b,errorUpdatedAt:_,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>f.dataUpdateCount||g.errorUpdateCount>f.errorUpdateCount,isFetching:N,isRefetching:N&&!L,isLoadingError:$&&g.dataUpdatedAt===0,isPaused:T==="paused",isPlaceholderData:M,isPreviousData:P,isRefetchError:$&&g.dataUpdatedAt!==0,isStale:hk(t,n),refetch:this.refetch,remove:this.remove}}updateResult(t){const n=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,RA(r,n))return;this.currentResult=r;const i={cache:!0},a=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options;if(s==="all"||!s&&!this.trackedProps.size)return!0;const o=new Set(s!=null?s:this.trackedProps);return this.options.useErrorBoundary&&o.add("error"),Object.keys(this.currentResult).some(c=>{const f=c;return this.currentResult[f]!==n[f]&&o.has(f)})};(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 n=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const n={};t.type==="success"?n.onSuccess=!t.manual:t.type==="error"&&!vx(t.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(t){Oi.batch(()=>{if(t.onSuccess){var n,r,i,a;(n=(r=this.options).onSuccess)==null||n.call(r,this.currentResult.data),(i=(a=this.options).onSettled)==null||i.call(a,this.currentResult.data,null)}else if(t.onError){var s,o,c,f;(s=(o=this.options).onError)==null||s.call(o,this.currentResult.error),(c=(f=this.options).onSettled)==null||c.call(f,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(p=>{p(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function F0e(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function LA(e,t){return F0e(e,t)||e.state.dataUpdatedAt>0&&bE(e,t,t.refetchOnMount)}function bE(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&hk(e,t)}return!1}function FA(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&hk(e,n)}function hk(e,t){return e.isStaleByTime(t.staleTime)}const z0e=rk.exports.useSyncExternalStore,zA=E.exports.createContext(void 0),FU=E.exports.createContext(!1);function zU(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=zA),window.ReactQueryClientContext):zA)}const $U=({context:e}={})=>{const t=E.exports.useContext(zU(e,E.exports.useContext(FU)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},$0e=({client:e,children:t,context:n,contextSharing:r=!1})=>{E.exports.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const i=zU(n,r);return A(FU.Provider,{value:!n&&r,children:A(i.Provider,{value:e,children:t})})},BU=E.exports.createContext(!1),B0e=()=>E.exports.useContext(BU);BU.Provider;function V0e(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const U0e=E.exports.createContext(V0e()),j0e=()=>E.exports.useContext(U0e);function H0e(e,t){return typeof e=="function"?e(...t):!!e}const K0e=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},W0e=e=>{E.exports.useEffect(()=>{e.clearReset()},[e])},G0e=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&H0e(n,[e.error,r]),q0e=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},Z0e=(e,t)=>e.isLoading&&e.isFetching&&!t,X0e=(e,t,n)=>(e==null?void 0:e.suspense)&&Z0e(t,n),Y0e=(e,t,n)=>t.fetchOptimistic(e).then(({data:r})=>{e.onSuccess==null||e.onSuccess(r),e.onSettled==null||e.onSettled(r,null)}).catch(r=>{n.clearReset(),e.onError==null||e.onError(r),e.onSettled==null||e.onSettled(void 0,r)});function Q0e(e,t){const n=$U({context:e.context}),r=B0e(),i=j0e(),a=n.defaultQueryOptions(e);a._optimisticResults=r?"isRestoring":"optimistic",a.onError&&(a.onError=Oi.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=Oi.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=Oi.batchCalls(a.onSettled)),q0e(a),K0e(a,i),W0e(i);const[s]=E.exports.useState(()=>new t(n,a)),o=s.getOptimisticResult(a);if(z0e(E.exports.useCallback(c=>r?()=>{}:s.subscribe(Oi.batchCalls(c)),[s,r]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),E.exports.useEffect(()=>{s.setOptions(a,{listeners:!1})},[a,s]),X0e(a,o,r))throw Y0e(a,s,i);if(G0e({result:o,errorResetBoundary:i,useErrorBoundary:a.useErrorBoundary,query:s.getCurrentQuery()}))throw o.error;return a.notifyOnChangeProps?o:s.trackResult(o)}function iu(e,t,n){const r=Im(e,t,n);return Q0e(r,L0e)}function VU(e,t){return function(){return e.apply(t,arguments)}}const{toString:J0e}=Object.prototype,{getPrototypeOf:pk}=Object,{iterator:C1,toStringTag:UU}=Symbol,S1=(e=>t=>{const n=J0e.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ls=e=>(e=e.toLowerCase(),t=>S1(t)===e),E1=e=>t=>typeof t===e,{isArray:Xh}=Array,Ph=E1("undefined");function yv(e){return e!==null&&!Ph(e)&&e.constructor!==null&&!Ph(e.constructor)&&oa(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const jU=Ls("ArrayBuffer");function exe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&jU(e.buffer),t}const txe=E1("string"),oa=E1("function"),HU=E1("number"),xv=e=>e!==null&&typeof e=="object",nxe=e=>e===!0||e===!1,yx=e=>{if(S1(e)!=="object")return!1;const t=pk(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(UU in e)&&!(C1 in e)},rxe=e=>{if(!xv(e)||yv(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},ixe=Ls("Date"),oxe=Ls("File"),axe=Ls("Blob"),sxe=Ls("FileList"),lxe=e=>xv(e)&&oa(e.pipe),uxe=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||oa(e.append)&&((t=S1(e))==="formdata"||t==="object"&&oa(e.toString)&&e.toString()==="[object FormData]"))},cxe=Ls("URLSearchParams"),[dxe,fxe,hxe,pxe]=["ReadableStream","Request","Response","Headers"].map(Ls),mxe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function bv(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Xh(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(yv(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),s=a.length;let o;for(r=0;r<s;r++)o=a[r],t.call(null,e[o],o,e)}}function KU(e,t){if(yv(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const pd=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),WU=e=>!Ph(e)&&e!==pd;function _E(){const{caseless:e,skipUndefined:t}=WU(this)&&this||{},n={},r=(i,a)=>{const s=e&&KU(n,a)||a;yx(n[s])&&yx(i)?n[s]=_E(n[s],i):yx(i)?n[s]=_E({},i):Xh(i)?n[s]=i.slice():(!t||!Ph(i))&&(n[s]=i)};for(let i=0,a=arguments.length;i<a;i++)arguments[i]&&bv(arguments[i],r);return n}const gxe=(e,t,n,{allOwnKeys:r}={})=>(bv(t,(i,a)=>{n&&oa(i)?e[a]=VU(i,n):e[a]=i},{allOwnKeys:r}),e),vxe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),yxe=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},xxe=(e,t,n,r)=>{let i,a,s;const o={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)s=i[a],(!r||r(s,e,t))&&!o[s]&&(t[s]=e[s],o[s]=!0);e=n!==!1&&pk(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},bxe=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},_xe=e=>{if(!e)return null;if(Xh(e))return e;let t=e.length;if(!HU(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},wxe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&pk(Uint8Array)),Cxe=(e,t)=>{const r=(e&&e[C1]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},Sxe=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Exe=Ls("HTMLFormElement"),Pxe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),$A=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Txe=Ls("RegExp"),GU=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};bv(n,(i,a)=>{let s;(s=t(i,a,e))!==!1&&(r[a]=s||i)}),Object.defineProperties(e,r)},kxe=e=>{GU(e,(t,n)=>{if(oa(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(!!oa(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Ixe=(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return Xh(e)?r(e):r(String(e).split(t)),n},Mxe=()=>{},Rxe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Dxe(e){return!!(e&&oa(e.append)&&e[UU]==="FormData"&&e[C1])}const Oxe=e=>{const t=new Array(10),n=(r,i)=>{if(xv(r)){if(t.indexOf(r)>=0)return;if(yv(r))return r;if(!("toJSON"in r)){t[i]=r;const a=Xh(r)?[]:{};return bv(r,(s,o)=>{const c=n(s,i+1);!Ph(c)&&(a[o]=c)}),t[i]=void 0,a}}return r};return n(e,0)},Axe=Ls("AsyncFunction"),Nxe=e=>e&&(xv(e)||oa(e))&&oa(e.then)&&oa(e.catch),qU=((e,t)=>e?setImmediate:t?((n,r)=>(pd.addEventListener("message",({source:i,data:a})=>{i===pd&&a===n&&r.length&&r.shift()()},!1),i=>{r.push(i),pd.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",oa(pd.postMessage)),Lxe=typeof queueMicrotask<"u"?queueMicrotask.bind(pd):typeof process<"u"&&process.nextTick||qU,Fxe=e=>e!=null&&oa(e[C1]),_t={isArray:Xh,isArrayBuffer:jU,isBuffer:yv,isFormData:uxe,isArrayBufferView:exe,isString:txe,isNumber:HU,isBoolean:nxe,isObject:xv,isPlainObject:yx,isEmptyObject:rxe,isReadableStream:dxe,isRequest:fxe,isResponse:hxe,isHeaders:pxe,isUndefined:Ph,isDate:ixe,isFile:oxe,isBlob:axe,isRegExp:Txe,isFunction:oa,isStream:lxe,isURLSearchParams:cxe,isTypedArray:wxe,isFileList:sxe,forEach:bv,merge:_E,extend:gxe,trim:mxe,stripBOM:vxe,inherits:yxe,toFlatObject:xxe,kindOf:S1,kindOfTest:Ls,endsWith:bxe,toArray:_xe,forEachEntry:Cxe,matchAll:Sxe,isHTMLForm:Exe,hasOwnProperty:$A,hasOwnProp:$A,reduceDescriptors:GU,freezeMethods:kxe,toObjectSet:Ixe,toCamelCase:Pxe,noop:Mxe,toFiniteNumber:Rxe,findKey:KU,global:pd,isContextDefined:WU,isSpecCompliantForm:Dxe,toJSONObject:Oxe,isAsyncFn:Axe,isThenable:Nxe,setImmediate:qU,asap:Lxe,isIterable:Fxe};function Xn(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}_t.inherits(Xn,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:_t.toJSONObject(this.config),code:this.code,status:this.status}}});const ZU=Xn.prototype,XU={};["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=>{XU[e]={value:e}});Object.defineProperties(Xn,XU);Object.defineProperty(ZU,"isAxiosError",{value:!0});Xn.from=(e,t,n,r,i,a)=>{const s=Object.create(ZU);_t.toFlatObject(e,s,function(p){return p!==Error.prototype},f=>f!=="isAxiosError");const o=e&&e.message?e.message:"Error",c=t==null&&e?e.code:t;return Xn.call(s,o,c,n,r,i),e&&s.cause==null&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",a&&Object.assign(s,a),s};const zxe=null;function wE(e){return _t.isPlainObject(e)||_t.isArray(e)}function YU(e){return _t.endsWith(e,"[]")?e.slice(0,-2):e}function BA(e,t,n){return e?e.concat(t).map(function(i,a){return i=YU(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function $xe(e){return _t.isArray(e)&&!e.some(wE)}const Bxe=_t.toFlatObject(_t,{},null,function(t){return/^is[A-Z]/.test(t)});function P1(e,t,n){if(!_t.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=_t.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(T,k){return!_t.isUndefined(k[T])});const r=n.metaTokens,i=n.visitor||p,a=n.dots,s=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&_t.isSpecCompliantForm(t);if(!_t.isFunction(i))throw new TypeError("visitor must be a function");function f(_){if(_===null)return"";if(_t.isDate(_))return _.toISOString();if(_t.isBoolean(_))return _.toString();if(!c&&_t.isBlob(_))throw new Xn("Blob is not supported. Use a Buffer instead.");return _t.isArrayBuffer(_)||_t.isTypedArray(_)?c&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function p(_,T,k){let P=_;if(_&&!k&&typeof _=="object"){if(_t.endsWith(T,"{}"))T=r?T:T.slice(0,-2),_=JSON.stringify(_);else if(_t.isArray(_)&&$xe(_)||(_t.isFileList(_)||_t.endsWith(T,"[]"))&&(P=_t.toArray(_)))return T=YU(T),P.forEach(function(O,N){!(_t.isUndefined(O)||O===null)&&t.append(s===!0?BA([T],N,a):s===null?T:T+"[]",f(O))}),!1}return wE(_)?!0:(t.append(BA(k,T,a),f(_)),!1)}const g=[],v=Object.assign(Bxe,{defaultVisitor:p,convertValue:f,isVisitable:wE});function b(_,T){if(!_t.isUndefined(_)){if(g.indexOf(_)!==-1)throw Error("Circular reference detected in "+T.join("."));g.push(_),_t.forEach(_,function(P,M){(!(_t.isUndefined(P)||P===null)&&i.call(t,P,_t.isString(M)?M.trim():M,T,v))===!0&&b(P,T?T.concat(M):[M])}),g.pop()}}if(!_t.isObject(e))throw new TypeError("data must be an object");return b(e),t}function VA(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function mk(e,t){this._pairs=[],e&&P1(e,this,t)}const QU=mk.prototype;QU.append=function(t,n){this._pairs.push([t,n])};QU.toString=function(t){const n=t?function(r){return t.call(this,r,VA)}:VA;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Vxe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function JU(e,t,n){if(!t)return e;const r=n&&n.encode||Vxe;_t.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let a;if(i?a=i(t,n):a=_t.isURLSearchParams(t)?t.toString():new mk(t,n).toString(r),a){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Uxe{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){_t.forEach(this.handlers,function(r){r!==null&&t(r)})}}const UA=Uxe,e7={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},jxe=typeof URLSearchParams<"u"?URLSearchParams:mk,Hxe=typeof FormData<"u"?FormData:null,Kxe=typeof Blob<"u"?Blob:null,Wxe={isBrowser:!0,classes:{URLSearchParams:jxe,FormData:Hxe,Blob:Kxe},protocols:["http","https","file","blob","url","data"]},gk=typeof window<"u"&&typeof document<"u",CE=typeof navigator=="object"&&navigator||void 0,Gxe=gk&&(!CE||["ReactNative","NativeScript","NS"].indexOf(CE.product)<0),qxe=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Zxe=gk&&window.location.href||"http://localhost",Xxe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:gk,hasStandardBrowserWebWorkerEnv:qxe,hasStandardBrowserEnv:Gxe,navigator:CE,origin:Zxe},Symbol.toStringTag,{value:"Module"})),Eo={...Xxe,...Wxe};function Yxe(e,t){return P1(e,new Eo.classes.URLSearchParams,{visitor:function(n,r,i,a){return Eo.isNode&&_t.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}function Qxe(e){return _t.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Jxe(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function t7(e){function t(n,r,i,a){let s=n[a++];if(s==="__proto__")return!0;const o=Number.isFinite(+s),c=a>=n.length;return s=!s&&_t.isArray(i)?i.length:s,c?(_t.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!o):((!i[s]||!_t.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],a)&&_t.isArray(i[s])&&(i[s]=Jxe(i[s])),!o)}if(_t.isFormData(e)&&_t.isFunction(e.entries)){const n={};return _t.forEachEntry(e,(r,i)=>{t(Qxe(r),i,n,0)}),n}return null}function ebe(e,t,n){if(_t.isString(e))try{return(t||JSON.parse)(e),_t.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const vk={transitional:e7,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=_t.isObject(t);if(a&&_t.isHTMLForm(t)&&(t=new FormData(t)),_t.isFormData(t))return i?JSON.stringify(t7(t)):t;if(_t.isArrayBuffer(t)||_t.isBuffer(t)||_t.isStream(t)||_t.isFile(t)||_t.isBlob(t)||_t.isReadableStream(t))return t;if(_t.isArrayBufferView(t))return t.buffer;if(_t.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Yxe(t,this.formSerializer).toString();if((o=_t.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return P1(o?{"files[]":t}:t,c&&new c,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),ebe(t)):t}],transformResponse:[function(t){const n=this.transitional||vk.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(_t.isResponse(t)||_t.isReadableStream(t))return t;if(t&&_t.isString(t)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(o){if(s)throw o.name==="SyntaxError"?Xn.from(o,Xn.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:Eo.classes.FormData,Blob:Eo.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_t.forEach(["delete","get","head","post","put","patch"],e=>{vk.headers[e]={}});const yk=vk,tbe=_t.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"]),nbe=e=>{const t={};let n,r,i;return e&&e.split(`
`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&tbe[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},jA=Symbol("internals");function dm(e){return e&&String(e).trim().toLowerCase()}function xx(e){return e===!1||e==null?e:_t.isArray(e)?e.map(xx):String(e)}function rbe(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const ibe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function bS(e,t,n,r,i){if(_t.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!_t.isString(t)){if(_t.isString(r))return t.indexOf(r)!==-1;if(_t.isRegExp(r))return r.test(t)}}function obe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function abe(e,t){const n=_t.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,a,s){return this[r].call(this,t,i,a,s)},configurable:!0})})}class T1{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function a(o,c,f){const p=dm(c);if(!p)throw new Error("header name must be a non-empty string");const g=_t.findKey(i,p);(!g||i[g]===void 0||f===!0||f===void 0&&i[g]!==!1)&&(i[g||c]=xx(o))}const s=(o,c)=>_t.forEach(o,(f,p)=>a(f,p,c));if(_t.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(_t.isString(t)&&(t=t.trim())&&!ibe(t))s(nbe(t),n);else if(_t.isObject(t)&&_t.isIterable(t)){let o={},c,f;for(const p of t){if(!_t.isArray(p))throw TypeError("Object iterator must return a key-value pair");o[f=p[0]]=(c=o[f])?_t.isArray(c)?[...c,p[1]]:[c,p[1]]:p[1]}s(o,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=dm(t),t){const r=_t.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return rbe(i);if(_t.isFunction(n))return n.call(this,i,r);if(_t.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=dm(t),t){const r=_t.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||bS(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function a(s){if(s=dm(s),s){const o=_t.findKey(r,s);o&&(!n||bS(r,r[o],o,n))&&(delete r[o],i=!0)}}return _t.isArray(t)?t.forEach(a):a(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const a=n[r];(!t||bS(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const n=this,r={};return _t.forEach(this,(i,a)=>{const s=_t.findKey(r,a);if(s){n[s]=xx(i),delete n[a];return}const o=t?obe(a):String(a).trim();o!==a&&delete n[a],n[o]=xx(i),r[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return _t.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&_t.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[jA]=this[jA]={accessors:{}}).accessors,i=this.prototype;function a(s){const o=dm(s);r[o]||(abe(i,s),r[o]=!0)}return _t.isArray(t)?t.forEach(a):a(t),this}}T1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_t.reduceDescriptors(T1.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});_t.freezeMethods(T1);const Rs=T1;function _S(e,t){const n=this||yk,r=t||n,i=Rs.from(r.headers);let a=r.data;return _t.forEach(e,function(o){a=o.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function n7(e){return!!(e&&e.__CANCEL__)}function Yh(e,t,n){Xn.call(this,e==null?"canceled":e,Xn.ERR_CANCELED,t,n),this.name="CanceledError"}_t.inherits(Yh,Xn,{__CANCEL__:!0});function r7(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Xn("Request failed with status code "+n.status,[Xn.ERR_BAD_REQUEST,Xn.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function sbe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function lbe(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,s;return t=t!==void 0?t:1e3,function(c){const f=Date.now(),p=r[a];s||(s=f),n[i]=c,r[i]=f;let g=a,v=0;for(;g!==i;)v+=n[g++],g=g%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),f-s<t)return;const b=p&&f-p;return b?Math.round(v*1e3/b):void 0}}function ube(e,t){let n=0,r=1e3/t,i,a;const s=(f,p=Date.now())=>{n=p,i=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const p=Date.now(),g=p-n;g>=r?s(f,p):(i=f,a||(a=setTimeout(()=>{a=null,s(i)},r-g)))},()=>i&&s(i)]}const $b=(e,t,n=3)=>{let r=0;const i=lbe(50,250);return ube(a=>{const s=a.loaded,o=a.lengthComputable?a.total:void 0,c=s-r,f=i(c),p=s<=o;r=s;const g={loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:f||void 0,estimated:f&&o&&p?(o-s)/f:void 0,event:a,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(g)},n)},HA=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},KA=e=>(...t)=>_t.asap(()=>e(...t)),cbe=Eo.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Eo.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Eo.origin),Eo.navigator&&/(msie|trident)/i.test(Eo.navigator.userAgent)):()=>!0,dbe=Eo.hasStandardBrowserEnv?{write(e,t,n,r,i,a){const s=[e+"="+encodeURIComponent(t)];_t.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),_t.isString(r)&&s.push("path="+r),_t.isString(i)&&s.push("domain="+i),a===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function fbe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function hbe(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function i7(e,t,n){let r=!fbe(t);return e&&(r||n==!1)?hbe(e,t):t}const WA=e=>e instanceof Rs?{...e}:e;function Od(e,t){t=t||{};const n={};function r(f,p,g,v){return _t.isPlainObject(f)&&_t.isPlainObject(p)?_t.merge.call({caseless:v},f,p):_t.isPlainObject(p)?_t.merge({},p):_t.isArray(p)?p.slice():p}function i(f,p,g,v){if(_t.isUndefined(p)){if(!_t.isUndefined(f))return r(void 0,f,g,v)}else return r(f,p,g,v)}function a(f,p){if(!_t.isUndefined(p))return r(void 0,p)}function s(f,p){if(_t.isUndefined(p)){if(!_t.isUndefined(f))return r(void 0,f)}else return r(void 0,p)}function o(f,p,g){if(g in t)return r(f,p);if(g in e)return r(void 0,f)}const c={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:o,headers:(f,p,g)=>i(WA(f),WA(p),g,!0)};return _t.forEach(Object.keys({...e,...t}),function(p){const g=c[p]||i,v=g(e[p],t[p],p);_t.isUndefined(v)&&g!==o||(n[p]=v)}),n}const o7=e=>{const t=Od({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:o}=t;if(t.headers=s=Rs.from(s),t.url=JU(i7(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),o&&s.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):""))),_t.isFormData(n)){if(Eo.hasStandardBrowserEnv||Eo.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(_t.isFunction(n.getHeaders)){const c=n.getHeaders(),f=["content-type","content-length"];Object.entries(c).forEach(([p,g])=>{f.includes(p.toLowerCase())&&s.set(p,g)})}}if(Eo.hasStandardBrowserEnv&&(r&&_t.isFunction(r)&&(r=r(t)),r||r!==!1&&cbe(t.url))){const c=i&&a&&dbe.read(a);c&&s.set(i,c)}return t},pbe=typeof XMLHttpRequest<"u",mbe=pbe&&function(e){return new Promise(function(n,r){const i=o7(e);let a=i.data;const s=Rs.from(i.headers).normalize();let{responseType:o,onUploadProgress:c,onDownloadProgress:f}=i,p,g,v,b,_;function T(){b&&b(),_&&_(),i.cancelToken&&i.cancelToken.unsubscribe(p),i.signal&&i.signal.removeEventListener("abort",p)}let k=new XMLHttpRequest;k.open(i.method.toUpperCase(),i.url,!0),k.timeout=i.timeout;function P(){if(!k)return;const O=Rs.from("getAllResponseHeaders"in k&&k.getAllResponseHeaders()),L={data:!o||o==="text"||o==="json"?k.responseText:k.response,status:k.status,statusText:k.statusText,headers:O,config:e,request:k};r7(function(j){n(j),T()},function(j){r(j),T()},L),k=null}"onloadend"in k?k.onloadend=P:k.onreadystatechange=function(){!k||k.readyState!==4||k.status===0&&!(k.responseURL&&k.responseURL.indexOf("file:")===0)||setTimeout(P)},k.onabort=function(){!k||(r(new Xn("Request aborted",Xn.ECONNABORTED,e,k)),k=null)},k.onerror=function(N){const L=N&&N.message?N.message:"Network Error",$=new Xn(L,Xn.ERR_NETWORK,e,k);$.event=N||null,r($),k=null},k.ontimeout=function(){let N=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const L=i.transitional||e7;i.timeoutErrorMessage&&(N=i.timeoutErrorMessage),r(new Xn(N,L.clarifyTimeoutError?Xn.ETIMEDOUT:Xn.ECONNABORTED,e,k)),k=null},a===void 0&&s.setContentType(null),"setRequestHeader"in k&&_t.forEach(s.toJSON(),function(N,L){k.setRequestHeader(L,N)}),_t.isUndefined(i.withCredentials)||(k.withCredentials=!!i.withCredentials),o&&o!=="json"&&(k.responseType=i.responseType),f&&([v,_]=$b(f,!0),k.addEventListener("progress",v)),c&&k.upload&&([g,b]=$b(c),k.upload.addEventListener("progress",g),k.upload.addEventListener("loadend",b)),(i.cancelToken||i.signal)&&(p=O=>{!k||(r(!O||O.type?new Yh(null,e,k):O),k.abort(),k=null)},i.cancelToken&&i.cancelToken.subscribe(p),i.signal&&(i.signal.aborted?p():i.signal.addEventListener("abort",p)));const M=sbe(i.url);if(M&&Eo.protocols.indexOf(M)===-1){r(new Xn("Unsupported protocol "+M+":",Xn.ERR_BAD_REQUEST,e));return}k.send(a||null)})},gbe=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const a=function(f){if(!i){i=!0,o();const p=f instanceof Error?f:this.reason;r.abort(p instanceof Xn?p:new Yh(p instanceof Error?p.message:p))}};let s=t&&setTimeout(()=>{s=null,a(new Xn(`timeout ${t} of ms exceeded`,Xn.ETIMEDOUT))},t);const o=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(a):f.removeEventListener("abort",a)}),e=null)};e.forEach(f=>f.addEventListener("abort",a));const{signal:c}=r;return c.unsubscribe=()=>_t.asap(o),c}},vbe=gbe,ybe=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},xbe=async function*(e,t){for await(const n of bbe(e))yield*ybe(n,t)},bbe=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},GA=(e,t,n,r)=>{const i=xbe(e,t);let a=0,s,o=c=>{s||(s=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:f,value:p}=await i.next();if(f){o(),c.close();return}let g=p.byteLength;if(n){let v=a+=g;n(v)}c.enqueue(new Uint8Array(p))}catch(f){throw o(f),f}},cancel(c){return o(c),i.return()}},{highWaterMark:2})},qA=64*1024,{isFunction:S0}=_t,_be=(({Request:e,Response:t})=>({Request:e,Response:t}))(_t.global),{ReadableStream:ZA,TextEncoder:XA}=_t.global,YA=(e,...t)=>{try{return!!e(...t)}catch{return!1}},wbe=e=>{e=_t.merge.call({skipUndefined:!0},_be,e);const{fetch:t,Request:n,Response:r}=e,i=t?S0(t):typeof fetch=="function",a=S0(n),s=S0(r);if(!i)return!1;const o=i&&S0(ZA),c=i&&(typeof XA=="function"?(_=>T=>_.encode(T))(new XA):async _=>new Uint8Array(await new n(_).arrayBuffer())),f=a&&o&&YA(()=>{let _=!1;const T=new n(Eo.origin,{body:new ZA,method:"POST",get duplex(){return _=!0,"half"}}).headers.has("Content-Type");return _&&!T}),p=s&&o&&YA(()=>_t.isReadableStream(new r("").body)),g={stream:p&&(_=>_.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!g[_]&&(g[_]=(T,k)=>{let P=T&&T[_];if(P)return P.call(T);throw new Xn(`Response type '${_}' is not supported`,Xn.ERR_NOT_SUPPORT,k)})});const v=async _=>{if(_==null)return 0;if(_t.isBlob(_))return _.size;if(_t.isSpecCompliantForm(_))return(await new n(Eo.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(_t.isArrayBufferView(_)||_t.isArrayBuffer(_))return _.byteLength;if(_t.isURLSearchParams(_)&&(_=_+""),_t.isString(_))return(await c(_)).byteLength},b=async(_,T)=>{const k=_t.toFiniteNumber(_.getContentLength());return k==null?v(T):k};return async _=>{let{url:T,method:k,data:P,signal:M,cancelToken:O,timeout:N,onDownloadProgress:L,onUploadProgress:$,responseType:j,headers:U,withCredentials:G="same-origin",fetchOptions:Z}=o7(_),Q=t||fetch;j=j?(j+"").toLowerCase():"text";let J=vbe([M,O&&O.toAbortSignal()],N),re=null;const ne=J&&J.unsubscribe&&(()=>{J.unsubscribe()});let ge;try{if($&&f&&k!=="get"&&k!=="head"&&(ge=await b(U,P))!==0){let we=new n(T,{method:"POST",body:P,duplex:"half"}),be;if(_t.isFormData(P)&&(be=we.headers.get("content-type"))&&U.setContentType(be),we.body){const[Re,Ee]=HA(ge,$b(KA($)));P=GA(we.body,qA,Re,Ee)}}_t.isString(G)||(G=G?"include":"omit");const ie=a&&"credentials"in n.prototype,ue={...Z,signal:J,method:k.toUpperCase(),headers:U.normalize().toJSON(),body:P,duplex:"half",credentials:ie?G:void 0};re=a&&new n(T,ue);let oe=await(a?Q(re,Z):Q(T,ue));const me=p&&(j==="stream"||j==="response");if(p&&(L||me&&ne)){const we={};["status","statusText","headers"].forEach(Me=>{we[Me]=oe[Me]});const be=_t.toFiniteNumber(oe.headers.get("content-length")),[Re,Ee]=L&&HA(be,$b(KA(L),!0))||[];oe=new r(GA(oe.body,qA,Re,()=>{Ee&&Ee(),ne&&ne()}),we)}j=j||"text";let Te=await g[_t.findKey(g,j)||"text"](oe,_);return!me&&ne&&ne(),await new Promise((we,be)=>{r7(we,be,{data:Te,headers:Rs.from(oe.headers),status:oe.status,statusText:oe.statusText,config:_,request:re})})}catch(ie){throw ne&&ne(),ie&&ie.name==="TypeError"&&/Load failed|fetch/i.test(ie.message)?Object.assign(new Xn("Network Error",Xn.ERR_NETWORK,_,re),{cause:ie.cause||ie}):Xn.from(ie,ie&&ie.code,_,re)}}},Cbe=new Map,a7=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:i}=t,a=[r,i,n];let s=a.length,o=s,c,f,p=Cbe;for(;o--;)c=a[o],f=p.get(c),f===void 0&&p.set(c,f=o?new Map:wbe(t)),p=f;return f};a7();const SE={http:zxe,xhr:mbe,fetch:{get:a7}};_t.forEach(SE,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const QA=e=>`- ${e}`,Sbe=e=>_t.isFunction(e)||e===null||e===!1,s7={getAdapter:(e,t)=>{e=_t.isArray(e)?e:[e];const{length:n}=e;let r,i;const a={};for(let s=0;s<n;s++){r=e[s];let o;if(i=r,!Sbe(r)&&(i=SE[(o=String(r)).toLowerCase()],i===void 0))throw new Xn(`Unknown adapter '${o}'`);if(i&&(_t.isFunction(i)||(i=i.get(t))))break;a[o||"#"+s]=i}if(!i){const s=Object.entries(a).map(([c,f])=>`adapter ${c} `+(f===!1?"is not supported by the environment":"is not available in the build"));let o=n?s.length>1?`since :
`+s.map(QA).join(`
`):" "+QA(s[0]):"as no adapter specified";throw new Xn("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return i},adapters:SE};function wS(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Yh(null,e)}function JA(e){return wS(e),e.headers=Rs.from(e.headers),e.data=_S.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),s7.getAdapter(e.adapter||yk.adapter,e)(e).then(function(r){return wS(e),r.data=_S.call(e,e.transformResponse,r),r.headers=Rs.from(r.headers),r},function(r){return n7(r)||(wS(e),r&&r.response&&(r.response.data=_S.call(e,e.transformResponse,r.response),r.response.headers=Rs.from(r.response.headers))),Promise.reject(r)})}const l7="1.12.2",k1={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{k1[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const eN={};k1.transitional=function(t,n,r){function i(a,s){return"[Axios v"+l7+"] Transitional option '"+a+"'"+s+(r?". "+r:"")}return(a,s,o)=>{if(t===!1)throw new Xn(i(s," has been removed"+(n?" in "+n:"")),Xn.ERR_DEPRECATED);return n&&!eN[s]&&(eN[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,s,o):!0}};k1.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Ebe(e,t,n){if(typeof e!="object")throw new Xn("options must be an object",Xn.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],s=t[a];if(s){const o=e[a],c=o===void 0||s(o,a,e);if(c!==!0)throw new Xn("option "+a+" must be "+c,Xn.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Xn("Unknown option "+a,Xn.ERR_BAD_OPTION)}}const bx={assertOptions:Ebe,validators:k1},Zs=bx.validators;class Bb{constructor(t){this.defaults=t||{},this.interceptors={request:new UA,response:new UA}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Od(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&bx.assertOptions(r,{silentJSONParsing:Zs.transitional(Zs.boolean),forcedJSONParsing:Zs.transitional(Zs.boolean),clarifyTimeoutError:Zs.transitional(Zs.boolean)},!1),i!=null&&(_t.isFunction(i)?n.paramsSerializer={serialize:i}:bx.assertOptions(i,{encode:Zs.function,serialize:Zs.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),bx.assertOptions(n,{baseUrl:Zs.spelling("baseURL"),withXsrfToken:Zs.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=a&&_t.merge(a.common,a[n.method]);a&&_t.forEach(["delete","get","head","post","put","patch","common"],_=>{delete a[_]}),n.headers=Rs.concat(s,a);const o=[];let c=!0;this.interceptors.request.forEach(function(T){typeof T.runWhen=="function"&&T.runWhen(n)===!1||(c=c&&T.synchronous,o.unshift(T.fulfilled,T.rejected))});const f=[];this.interceptors.response.forEach(function(T){f.push(T.fulfilled,T.rejected)});let p,g=0,v;if(!c){const _=[JA.bind(this),void 0];for(_.unshift(...o),_.push(...f),v=_.length,p=Promise.resolve(n);g<v;)p=p.then(_[g++],_[g++]);return p}v=o.length;let b=n;for(;g<v;){const _=o[g++],T=o[g++];try{b=_(b)}catch(k){T.call(this,k);break}}try{p=JA.call(this,b)}catch(_){return Promise.reject(_)}for(g=0,v=f.length;g<v;)p=p.then(f[g++],f[g++]);return p}getUri(t){t=Od(this.defaults,t);const n=i7(t.baseURL,t.url,t.allowAbsoluteUrls);return JU(n,t.params,t.paramsSerializer)}}_t.forEach(["delete","get","head","options"],function(t){Bb.prototype[t]=function(n,r){return this.request(Od(r||{},{method:t,url:n,data:(r||{}).data}))}});_t.forEach(["post","put","patch"],function(t){function n(r){return function(a,s,o){return this.request(Od(o||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:s}))}}Bb.prototype[t]=n(),Bb.prototype[t+"Form"]=n(!0)});const _x=Bb;class xk{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const s=new Promise(o=>{r.subscribe(o),a=o}).then(i);return s.cancel=function(){r.unsubscribe(a)},s},t(function(a,s,o){r.reason||(r.reason=new Yh(a,s,o),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new xk(function(i){t=i}),cancel:t}}}const Pbe=xk;function Tbe(e){return function(n){return e.apply(null,n)}}function kbe(e){return _t.isObject(e)&&e.isAxiosError===!0}const EE={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(EE).forEach(([e,t])=>{EE[t]=e});const Ibe=EE;function u7(e){const t=new _x(e),n=VU(_x.prototype.request,t);return _t.extend(n,_x.prototype,t,{allOwnKeys:!0}),_t.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return u7(Od(e,i))},n}const Fi=u7(yk);Fi.Axios=_x;Fi.CanceledError=Yh;Fi.CancelToken=Pbe;Fi.isCancel=n7;Fi.VERSION=l7;Fi.toFormData=P1;Fi.AxiosError=Xn;Fi.Cancel=Fi.CanceledError;Fi.all=function(t){return Promise.all(t)};Fi.spread=Tbe;Fi.isAxiosError=kbe;Fi.mergeConfig=Od;Fi.AxiosHeaders=Rs;Fi.formToJSON=e=>t7(_t.isHTMLForm(e)?new FormData(e):e);Fi.getAdapter=s7.getAdapter;Fi.HttpStatusCode=Ibe;Fi.default=Fi;const Mbe=Fi,Vb="https://geoheat.spatialsystems.ru",ls=Mbe.create({baseURL:Vb}),c7=(e,t)=>{const n=e||new URLSearchParams;return t&&(t.type==="ao"&&n.append("district[]",t.id),t.type==="rayon"&&n.append("rayon",t.id)),n},Rbe=async(e,t,n)=>{const r=c7(e,t),{data:i}=await ls.get(`/api/data/?${r.toString()}`,{signal:n});return i},Dbe=async(e,t)=>{const n=c7(e,t),{data:r}=await ls.get(`/api/data/to_csv/?${n.toString()}`,{responseType:"arraybuffer"});return r},Obe=async e=>{const{data:t}=await ls.get(`/default_data/templates/${e}.xlsx`,{responseType:"arraybuffer"});return t},Abe=async(e,t,n=!1)=>{const r=new FormData;r.append("file",e),r.append("model",t),r.append("refill",n);const{data:i}=await ls.post("/api/import_file/",r);return i},Nbe=async()=>{const{data:e}=await ls.get("/api/data/start_ds_miracle");return e};function Lbe(e){let t;try{t=e()}catch{return}return{getItem:r=>{var i;const a=o=>o===null?null:JSON.parse(o),s=(i=t.getItem(r))!=null?i:null;return s instanceof Promise?s.then(a):a(s)},setItem:(r,i)=>t.setItem(r,JSON.stringify(i)),removeItem:r=>t.removeItem(r)}}const Dg=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Dg(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Dg(r)(n)}}}},Fbe=(e,t)=>(n,r,i)=>{let a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:k=>k,version:0,merge:(k,P)=>({...P,...k}),...t},s=!1;const o=new Set,c=new Set;let f;try{f=a.getStorage()}catch{}if(!f)return e((...k)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...k)},r,i);const p=Dg(a.serialize),g=()=>{const k=a.partialize({...r()});let P;const M=p({state:k,version:a.version}).then(O=>f.setItem(a.name,O)).catch(O=>{P=O});if(P)throw P;return M},v=i.setState;i.setState=(k,P)=>{v(k,P),g()};const b=e((...k)=>{n(...k),g()},r,i);let _;const T=()=>{var k;if(!f)return;s=!1,o.forEach(M=>M(r()));const P=((k=a.onRehydrateStorage)==null?void 0:k.call(a,r()))||void 0;return Dg(f.getItem.bind(f))(a.name).then(M=>{if(M)return a.deserialize(M)}).then(M=>{if(M)if(typeof M.version=="number"&&M.version!==a.version){if(a.migrate)return a.migrate(M.state,M.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return M.state}).then(M=>{var O;return _=a.merge(M,(O=r())!=null?O:b),n(_,!0),g()}).then(()=>{P==null||P(_,void 0),s=!0,c.forEach(M=>M(_))}).catch(M=>{P==null||P(void 0,M)})};return i.persist={setOptions:k=>{a={...a,...k},k.getStorage&&(f=k.getStorage())},clearStorage:()=>{f==null||f.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>T(),hasHydrated:()=>s,onHydrate:k=>(o.add(k),()=>{o.delete(k)}),onFinishHydration:k=>(c.add(k),()=>{c.delete(k)})},T(),_||b},zbe=(e,t)=>(n,r,i)=>{let a={storage:Lbe(()=>localStorage),partialize:T=>T,version:0,merge:(T,k)=>({...k,...T}),...t},s=!1;const o=new Set,c=new Set;let f=a.storage;if(!f)return e((...T)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...T)},r,i);const p=()=>{const T=a.partialize({...r()});return f.setItem(a.name,{state:T,version:a.version})},g=i.setState;i.setState=(T,k)=>{g(T,k),p()};const v=e((...T)=>{n(...T),p()},r,i);let b;const _=()=>{var T;if(!f)return;s=!1,o.forEach(P=>P(r()));const k=((T=a.onRehydrateStorage)==null?void 0:T.call(a,r()))||void 0;return Dg(f.getItem.bind(f))(a.name).then(P=>{if(P)if(typeof P.version=="number"&&P.version!==a.version){if(a.migrate)return a.migrate(P.state,P.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return P.state}).then(P=>{var M;return b=a.merge(P,(M=r())!=null?M:v),n(b,!0),p()}).then(()=>{k==null||k(b,void 0),s=!0,c.forEach(P=>P(b))}).catch(P=>{k==null||k(void 0,P)})};return i.persist={setOptions:T=>{a={...a,...T},T.storage&&(f=T.storage)},clearStorage:()=>{f==null||f.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>_(),hasHydrated:()=>s,onHydrate:T=>(o.add(T),()=>{o.delete(T)}),onFinishHydration:T=>(c.add(T),()=>{c.delete(T)})},_(),b||v},$be=(e,t)=>{var n;return"getStorage"in t||"serialize"in t||"deserialize"in t?(((n={VITE_API_URL:"https://geoheat.spatialsystems.ru",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0})==null?void 0:n.MODE)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),Fbe(e,t)):zbe(e,t)},bk=$be,Bbe=e=>({value:0,range:[-25,18],setValue:t=>{e(n=>{n.value=t})},clear:()=>e(t=>{t.value=0})}),us=hc(bk(pc(Bbe),{name:"weather-filter"})),_k=e=>iu(["dzkh-filter-range",e],async()=>{const{data:t,isInitialLoading:n,isFetching:r}=await ls.get(`/api/data/filters_ranges/?field=${e}`);return{data:t,isLoading:n||r}},{select:({data:t,isLoading:n})=>{let r;return!t||!t[e]?r=[0,0]:r=[t[e].min,t[e].max],{range:r,isLoading:n}}}),wk=e=>iu(["dzkh-filter-values",e],async()=>{const{data:t,isInitialLoading:n,isFetching:r}=await ls.get(`/api/data/filters_ranges/?field=${e}`);return{data:t,isLoading:n||r}},{select:({data:t,isLoading:n})=>t?[...t[e]]:[]}),Vbe=e=>iu(["dzkh-shap",e],async()=>{const{data:t,isInitialLoading:n,isFetching:r}=await ls.get(`/api/data/${e}/data_shap/`);return{data:t,isLoading:n||r}},{select:t=>t.data.shap}),Ube=e=>{const{value:t}=us();return e?iu(["dzkh-crush",e],async()=>{const{data:n,isInitialLoading:r,isFetching:i}=await ls.get(`/api/data/${e}/crush_summary/?current_temp=${t}`);return{data:n,isLoading:r||i}},{select:n=>n.data}):{data:null}};function d7(e,t){const n=window.document.createElement("a");n.href=window.URL.createObjectURL(new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})),n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)}const td=e=>e==null||e==="",tN=({id:e,modalOpen:t,setModalOpen:n})=>{const{data:r,isLoading:i}=Ube(e);return it("div",{className:"flex flex-col gap-1",children:[A(ad,{className:kd("font-bold"),children:"\u0412 \u0437\u043E\u043D\u0435 \u0430\u0432\u0430\u0440\u0438\u0438 \u043E\u043A\u0430\u0437\u0430\u043B\u043E\u0441\u044C:"}),!td(r==null?void 0:r.potreb_count)&&!td(r==null?void 0:r.potreb_soc_count)&&it(ad,{children:[(r==null?void 0:r.potreb_count)+(r==null?void 0:r.potreb_soc_count)," \u043F\u043E\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043B\u0435\u0439 (\u0438\u0437 \u043D\u0438\u0445 ",r==null?void 0:r.potreb_soc_count," - \u0441\u043E\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0435 \u043E\u0431\u044A\u0435\u043A\u0442\u044B)"]}),!td(r==null?void 0:r.total_area)&&it(ad,{children:["\u041E\u0431\u0449\u0430\u044F \u043F\u043B\u043E\u0449\u0430\u0434\u044C \u043F\u043E\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043B\u0435\u0439 - ",Math.ceil(r==null?void 0:r.total_area)," \u043A\u0432. \u043C\u0435\u0442\u0440\u043E\u0432"]}),!td(r==null?void 0:r.number_of_apartments)&&it(ad,{children:[r==null?void 0:r.number_of_apartments," \u043A\u0432\u0430\u0440\u0442\u0438\u0440"]}),!td(r==null?void 0:r.data_min_cooling_time)&&!td(r==null?void 0:r.min_cooling_time)&&it(ad,{children:["\u0411\u044B\u0441\u0442\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043E \u043E\u0441\u0442\u044B\u043D\u0435\u0442 \u0437\u0434\u0430\u043D\u0438\u0435 \u043F\u043E \u0430\u0434\u0440\u0435\u0441\u0443 ",r==null?void 0:r.data_min_cooling_time.building_address," (",r==null?void 0:r.min_cooling_time," \u0447\u0430\u0441\u043E\u0432)"]})]})};var f7={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},nN=Un.createContext&&Un.createContext(f7),Qu=globalThis&&globalThis.__assign||function(){return Qu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Qu.apply(this,arguments)},jbe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function h7(e){return e&&e.map(function(t,n){return Un.createElement(t.tag,Qu({key:n},t.attr),h7(t.child))})}function Hbe(e){return function(t){return A(Kbe,{...Qu({attr:Qu({},e.attr)},t),children:h7(e.child)})}}function Kbe(e){var t=function(n){var r=e.attr,i=e.size,a=e.title,s=jbe(e,["attr","size","title"]),o=i||n.size||"1em",c;return n.className&&(c=n.className),e.className&&(c=(c?c+" ":"")+e.className),it("svg",{...Qu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:c,style:Qu(Qu({color:e.color||n.color},n.style),e.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),children:[a&&A("title",{children:a}),e.children]})};return nN!==void 0?A(nN.Consumer,{children:function(n){return t(n)}}):t(f7)}function Wbe(e){return Hbe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 2C6.486 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.514 2 12 2zm0 18c-4.411 0-8-3.589-8-8s3.589-8 8-8 8 3.589 8 8-3.589 8-8 8z"}},{tag:"path",attr:{d:"M11 11h2v6h-2zm0-4h2v2h-2z"}}]})(e)}const Gbe=()=>{const{selectedSourceConfig:e,setSelectedSourceConfig:t}=Wd(),[n,r]=E.exports.useState(!1);if(!e.pointId)return"";const{pointId:i}=e,a=()=>t({sourceId:null,dispatcherNumber:null});return it(nr,{children:[it("div",{className:"absolute bottom-[20px] left-[20px] text-grey z-10 bg-white-background rounded-xl p-3 text-center",children:[A(pl,{text:`\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043C\u043E\u0434\u0435\u043B\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u0430\u0432\u0430\u0440\u0438\u0438 \u043D\u0430 \u0422\u041F ${e==null?void 0:e.sourceId}`}),it("div",{className:"flex justify-center flex-row gap-2",children:[A(Xr,{type:"primary",onClick:a,children:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C"}),!!i&&A(zB,{content:A(tN,{id:i}),children:A(Xr,{className:"flex justify-center items-center",type:"primary",onClick:()=>r(!0),children:A(Wbe,{className:"w-4 h-4"})})})]})]}),!!i&&A(tN,{id:i,modalOpen:n,setModalOpen:r})]})};var qbe=E.exports.createContext({});const p7=qbe;var E0=2,rN=.16,Zbe=.05,Xbe=.05,Ybe=.15,m7=5,g7=4,Qbe=[{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 iN(e){var t=e.r,n=e.g,r=e.b,i=cb(t,n,r);return{h:i.h*360,s:i.s,v:i.v}}function P0(e){var t=e.r,n=e.g,r=e.b;return"#".concat(db(t,n,r,!1))}function Jbe(e,t,n){var r=n/100,i={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return i}function oN(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-E0*t:Math.round(e.h)+E0*t:r=n?Math.round(e.h)+E0*t:Math.round(e.h)-E0*t,r<0?r+=360:r>=360&&(r-=360),r}function aN(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-rN*t:t===g7?r=e.s+rN:r=e.s+Zbe*t,r>1&&(r=1),n&&t===m7&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function sN(e,t,n){var r;return n?r=e.v+Xbe*t:r=e.v-Ybe*t,r>1&&(r=1),Number(r.toFixed(2))}function PE(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=Ts(e),i=m7;i>0;i-=1){var a=iN(r),s=P0(Ts({h:oN(a,i,!0),s:aN(a,i,!0),v:sN(a,i,!0)}));n.push(s)}n.push(P0(r));for(var o=1;o<=g7;o+=1){var c=iN(r),f=P0(Ts({h:oN(c,o),s:aN(c,o),v:sN(c,o)}));n.push(f)}return t.theme==="dark"?Qbe.map(function(p){var g=p.index,v=p.opacity,b=P0(Jbe(Ts(t.backgroundColor||"#141414"),Ts(n[g]),v*100));return b}):n}var CS={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"},SS={},ES={};Object.keys(CS).forEach(function(e){SS[e]=PE(CS[e]),SS[e].primary=SS[e][5],ES[e]=PE(CS[e],{theme:"dark",backgroundColor:"#141414"}),ES[e].primary=ES[e][5]});function e_e(e,t){Nr(e,"[@ant-design/icons] ".concat(t))}function lN(e){return on(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(on(e.icon)==="object"||typeof e.icon=="function")}function uN(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:t[n]=r}return t},{})}function TE(e,t,n){return n?Un.createElement(e.tag,fe(fe({key:t},uN(e.attrs)),n),(e.children||[]).map(function(r,i){return TE(r,"".concat(t,"-").concat(e.tag,"-").concat(i))})):Un.createElement(e.tag,fe({key:t},uN(e.attrs)),(e.children||[]).map(function(r,i){return TE(r,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function v7(e){return PE(e)[0]}function y7(e){return e?Array.isArray(e)?e:[e]:[]}var t_e=`
.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);
}
}
`,n_e=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t_e,n=E.exports.useContext(p7),r=n.csp,i=n.prefixCls,a=t;i&&(a=a.replace(/anticon/g,i)),E.exports.useEffect(function(){ev(a,"@ant-design-icons",{prepend:!0,csp:r})},[])},r_e=["icon","className","onClick","style","primaryColor","secondaryColor"],Ym={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function i_e(e){var t=e.primaryColor,n=e.secondaryColor;Ym.primaryColor=t,Ym.secondaryColor=n||v7(t),Ym.calculated=!!n}function o_e(){return fe({},Ym)}var I1=function(t){var n=t.icon,r=t.className,i=t.onClick,a=t.style,s=t.primaryColor,o=t.secondaryColor,c=In(t,r_e),f=Ym;if(s&&(f={primaryColor:s,secondaryColor:o||v7(s)}),n_e(),e_e(lN(n),"icon should be icon definiton, but got ".concat(n)),!lN(n))return null;var p=n;return p&&typeof p.icon=="function"&&(p=fe(fe({},p),{},{icon:p.icon(f.primaryColor,f.secondaryColor)})),TE(p.icon,"svg-".concat(p.name),fe({className:r,onClick:i,style:a,"data-icon":p.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},c))};I1.displayName="IconReact";I1.getTwoToneColors=o_e;I1.setTwoToneColors=i_e;const Ck=I1;function x7(e){var t=y7(e),n=$e(t,2),r=n[0],i=n[1];return Ck.setTwoToneColors({primaryColor:r,secondaryColor:i})}function a_e(){var e=Ck.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var s_e=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];x7("#1890ff");var M1=E.exports.forwardRef(function(e,t){var n,r=e.className,i=e.icon,a=e.spin,s=e.rotate,o=e.tabIndex,c=e.onClick,f=e.twoToneColor,p=In(e,s_e),g=E.exports.useContext(p7),v=g.prefixCls,b=v===void 0?"anticon":v,_=g.rootClassName,T=He(_,b,(n={},ae(n,"".concat(b,"-").concat(i.name),!!i.name),ae(n,"".concat(b,"-spin"),!!a||i.name==="loading"),n),r),k=o;k===void 0&&c&&(k=-1);var P=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,M=y7(f),O=$e(M,2),N=O[0],L=O[1];return A("span",{...fe(fe({role:"img","aria-label":i.name},p),{},{ref:t,tabIndex:k,onClick:c,className:T}),children:A(Ck,{icon:i,primaryColor:N,secondaryColor:L,style:P})})});M1.displayName="AntdIcon";M1.getTwoToneColor=a_e;M1.setTwoToneColor=x7;const Qh=M1;var b7=function(t,n){return A(Qh,{...fe(fe({},t),{},{ref:n,icon:wU})})};b7.displayName="DownloadOutlined";const l_e=E.exports.forwardRef(b7);var u_e={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 c_e=u_e;var _7=function(t,n){return A(Qh,{...fe(fe({},t),{},{ref:n,icon:c_e})})};_7.displayName="FullscreenExitOutlined";const d_e=E.exports.forwardRef(_7);var f_e={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 h_e=f_e;var w7=function(t,n){return A(Qh,{...fe(fe({},t),{},{ref:n,icon:h_e})})};w7.displayName="FullscreenOutlined";const p_e=E.exports.forwardRef(w7);var C7=function(t,n){return A(Qh,{...fe(fe({},t),{},{ref:n,icon:Y6})})};C7.displayName="LoadingOutlined";const m_e=E.exports.forwardRef(C7);var g_e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"};const v_e=g_e;var S7=function(t,n){return A(Qh,{...fe(fe({},t),{},{ref:n,icon:v_e})})};S7.displayName="SettingOutlined";const y_e=E.exports.forwardRef(S7);var x_e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 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:"upload",theme:"outlined"};const b_e=x_e;var E7=function(t,n){return A(Qh,{...fe(fe({},t),{},{ref:n,icon:b_e})})};E7.displayName="UploadOutlined";const P7=E.exports.forwardRef(E7),__e=({onClick:e})=>A("div",{className:"absolute top-[20px] left-[20px]",children:A(Ra,{title:"\u0418\u043C\u043F\u043E\u0440\u0442 \u0434\u0430\u043D\u043D\u044B\u0445",placement:"right",children:A(Xr,{type:"primary",icon:A(P7,{}),onClick:e})})}),w_e=A(m_e,{style:{fontSize:14},spin:!0}),T7=e=>A(dv,{indicator:w_e,size:"small",...e}),k7=({taskId:e,onSuccess:t})=>iu(["tasks",e],async()=>{const{data:n}=await ls.get(`/api/task/${e}/`);return n},{enabled:e!==null,refetchInterval:1e3,onSuccess:t}),fm=({text:e,dataType:t,onSuccess:n,onError:r})=>{const[i,a]=E.exports.useState(!1),[s,o]=E.exports.useState(null),[c,f]=E.exports.useState(!1),[p,g]=E.exports.useState(!1),{data:v,isInitialLoading:b,isFetching:_}=k7({taskId:s,onSuccess:O=>{O.description==="\u0418\u043C\u043F\u043E\u0440\u0442 \u0434\u0430\u043D\u043D\u044B\u0445 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D"&&(o(null),f(!0),n(t))}}),T=b||_;return it("div",{children:[it("div",{className:"space-x-3",children:[A(Ra,{title:"\u041F\u0435\u0440\u0435\u0437\u0430\u043F\u0438\u0441\u0430\u0442\u044C \u0434\u0430\u043D\u043D\u044B\u0435",children:A(_h,{checked:i,onChange:O=>a(O.target.checked)})}),A(Fye,{name:"file",accept:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",customRequest:async O=>{const{file:N}=O;try{g(!0);const L=await Abe(N,t,i);L.task_id&&o(L.task_id)}catch(L){r(t),console.error(L)}finally{g(!1)}},itemRender:()=>null,children:A(Xr,{icon:A(P7,{}),children:e})}),A(Xr,{className:"p-0 text-xs text-grey underline h-auto",type:"text",onClick:async()=>{const O=await Obe(t);await d7(`${t}_template.xlsx`,O)},children:"\u0421\u043A\u0430\u0447\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D"})]}),(()=>{if(!p&&!v&&!c)return null;const N=()=>p?0:c?100:v.progress,L=()=>p?"\u0418\u043C\u043F\u043E\u0440\u0442 \u0434\u0430\u043D\u043D\u044B\u0445":c?"\u0418\u043C\u043F\u043E\u0440\u0442 \u0434\u0430\u043D\u043D\u044B\u0445 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D":v.description;return it("div",{children:[!c&&A(T7,{className:"mr-2"}),A(GT,{percent:N(),status:T?"active":null,size:"small",className:"w-[300px]"}),A(pl,{text:L(),className:"text-xs"})]})})()]})},C_e=({onClose:e})=>{const[t,n]=E.exports.useState(!1),[r,i]=E.exports.useState(!1),[a,s]=E.exports.useState({odpu:null,asupr:null,moek_scheme:null,events:null,houses:null}),[o,c]=E.exports.useState(null),[f,p]=E.exports.useState(!1),{data:g,isInitialLoading:v,isFetching:b}=k7({taskId:o,onSuccess:N=>{N.description==="\u041F\u0420\u041E\u0426\u0415\u0421\u0421\u0418\u041D\u0413 \u0434\u0430\u043D\u043D\u044B\u0445 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D"&&(c(null),p(!0),e())}}),_=v||b,T=N=>s(L=>({...L,[N]:!0})),k=N=>s(L=>({...L,[N]:!1})),P=Object.values(a).some(N=>N===null||N===!1);return A(uV,{open:!0,title:"\u0418\u043C\u043F\u043E\u0440\u0442 \u0434\u0430\u043D\u043D\u044B\u0445",width:400,footer:null,onCancel:e,children:it("div",{className:"text-center space-y-3",children:[A(W$,{message:"\u041E\u0431\u0440\u0430\u0449\u0430\u0435\u043C \u0432\u0430\u0448\u0435 \u0432\u043D\u0438\u043C\u0430\u043D\u0438\u0435, \u0447\u0442\u043E \u0438\u043C\u043F\u043E\u0440\u0442 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043C\u043E\u0441\u0442\u0438 \u043E\u0442 \u0440\u0430\u0437\u043C\u0435\u0440\u0430 \u0432\u0445\u043E\u0434\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445 \u043C\u043E\u0436\u0435\u0442 \u0437\u0430\u043D\u0438\u043C\u0430\u0442\u044C \u0437\u043D\u0430\u0447\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F (\u0434\u043E 10 \u043C\u0438\u043D)",type:"warning",className:"mb-5",showIcon:!0,closable:!0}),A(fm,{dataType:"odpu",text:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0444\u0430\u0439\u043B \u0441 \u041E\u0414\u041F\u0423",onSuccess:T,onError:k}),A(fm,{dataType:"asupr",text:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0444\u0430\u0439\u043B \u0441 \u0410\u0421\u0423\u041F\u0420",onSuccess:T,onError:k}),A(fm,{dataType:"moek_scheme",text:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0444\u0430\u0439\u043B \u0441 \u041C\u041E\u042D\u041A",onSuccess:T,onError:k}),A(fm,{dataType:"events",text:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0444\u0430\u0439\u043B \u0441 \u0441\u043E\u0431\u044B\u0442\u0438\u044F\u043C\u0438",onSuccess:T,onError:k}),A(fm,{dataType:"houses",text:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0444\u0430\u0439\u043B \u0441 \u0434\u043E\u043C\u0430\u043C\u0438",onSuccess:T,onError:k}),A(Xr,{className:"mt-5",type:"primary",onClick:async()=>{n(!0);try{const N=await Nbe();N.task_id&&c(N.task_id)}catch(N){console.error(N),i(!0)}finally{n(!1)}},loading:t,disabled:P||_,children:"\u041D\u0430\u0447\u0430\u0442\u044C \u0430\u043D\u0430\u043B\u0438\u0437 \u0434\u0430\u043D\u043D\u044B\u0445"},"start-upload"),(()=>{if(!t&&!g&&!f)return null;const L=()=>t?0:f?100:g.progress,$=()=>t?"\u041D\u0430\u0447\u0430\u043B\u043E \u0430\u043D\u0430\u043B\u0438\u0437\u0430":f?"\u0410\u043D\u0430\u043B\u0438\u0437 \u0434\u0430\u043D\u043D\u044B\u0445 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D":g.description;return it("div",{children:[!f&&A(T7,{className:"mr-2"}),A(GT,{percent:L(),status:_?"active":null,size:"small",className:"w-[300px]"}),A(pl,{text:$(),className:"text-xs"})]})})(),r&&A("p",{className:"text-red-600",children:"\u041F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043E\u0448\u0438\u0431\u043A\u0430"})]})})},S_e=e=>({updateCounter:-1,toggleUpdateCounter:()=>{e(t=>{t.updateCounter=t.updateCounter===-1?1:-1})}}),I7=hc(pc(S_e)),wi={consumer:"potreb",source:"tp",dispatcher:"ods"},E_e={[wi.consumer]:!0,[wi.source]:!0,[wi.dispatcher]:!0},P_e=e=>({isVisible:E_e,toggleVisibility:t=>e(n=>{n.isVisible[t]=!n.isVisible[t]}),showLayers:t=>e(n=>{t.forEach(r=>{n.isVisible[r]=!0})}),setLayersVisibility:t=>e(n=>{t.forEach(i=>{n.isVisible[i]=!0}),Object.keys(n.isVisible).filter(i=>!t.includes(i)).forEach(i=>{n.isVisible[i]=!1})})}),R1=hc(bk(pc(P_e),{name:"dzkh/layers-visibility"})),T_e={ao:"ao_id",rayon:"rayon_id"},Sk=e=>E.exports.useMemo(()=>e?["==",["get",T_e[e.type]],e.id]:null,[e]),k_e=6,Ub={stops:[[.05,"#fff700"],[.2,"#ffda00"],[.35,"#ffbc00"],[.5,"#ff9d00"],[.65,"#ff7a00"],[.8,"#ff5200"],[.95,"#ff0000"]]},I_e={stops:[[2.8,"#ff0000"],[3.7,"#ff5200"],[4.6,"#ff7a00"],[5.5,"#ff9d00"],[6.4,"#ffbc00"],[7.3,"#ffda00"],[8.2,"#fff700"]]},M7={stops:[[.05,"#fd99ff"],[.2,"#da7ee1"],[.35,"#b964c3"],[.5,"#984ba6"],[.65,"#793389"],[.8,"#5a1a6e"],[.95,"#3d0053"]]},cN={type:"circle",paint:{"circle-stroke-width":.1,"circle-stroke-color":"#262626","circle-opacity":.8}},jb=(e="grey",t=k_e)=>({...cN,paint:{...cN.paint,"circle-color":e,"circle-radius":["interpolate",["linear"],["zoom"],3,0,10,1,13,t]}}),dN=e=>({type:"symbol",layout:{"icon-image":["coalesce",["image",e],["image","defaultIcon"]],"icon-size":["interpolate",["linear"],["zoom"],3,0,9,.1,13,.5]}}),PS={...jb(),paint:{...jb().paint}},TS={...jb("grey",10),paint:{...jb("grey",10).paint}},R7="#676767",fN={id:"ao",type:"line",source:"ao","source-layer":"public.service_ao",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":R7,"line-width":1.5,"line-opacity":.8}},hN={id:"rayon",type:"line",source:"rayon","source-layer":"public.service_rayon",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":R7,"line-width":.5,"line-opacity":.8}},M_e={id:"selected-region",type:"line",source:"selected-region",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":"#CC2222","line-width":4}},kS={region:null,prob1__gt:0,prob1__lt:5e3,prob2__gt:0,prob2__lt:5e3,prob3__gt:0,prob3__lt:5e3,prob4__gt:0,prob4__lt:5e3,prob5__gt:0,prob5__lt:5e3,prob6__gt:0,prob6__lt:5e3,cooling_time__gt:0,cooling_time__lt:5e3,priority__gt:0,priority__lt:5e3},R_e={prob1:[0,5e3],prob2:[0,5e3],prob3:[0,5e3],prob4:[0,5e3],prob5:[0,5e3],prob6:[0,5e3],cooling_time:[0,5e3],priority:[0,5e3]},D_e=e=>({filters:kS,consumer_filter:null,consumer_ranges:null,source_filter:null,consumer_type:null,energy_class:null,wall_material:null,ranges:R_e,setConsumerFilter:(t,n)=>e(r=>{if(!t){r.consumer_filter=null;return}const i=n||r.ranges[t];r.consumer_filter={key:t,gt:i[0],lt:i[1]}}),setSourceFilter:(t,n)=>e(r=>{if(!t){r.source_filter=null;return}const i=n||r.ranges[t];r.source_filter={key:t,gt:i[0],lt:i[1]}}),setRegion:t=>e(n=>{n.filters.region=t}),setConsumerType:t=>e(n=>{n.consumer_type=t}),setEnergyClass:t=>e(n=>{n.energy_class=t}),setWallMaterial:t=>e(n=>{n.wall_material=t}),setFilterWithKey:(t,n)=>e(r=>{r.filters[`${n}__gt`]=t[0],r.filters[`${n}__lt`]=t[1]}),setRanges:t=>e(n=>{n.ranges=t}),clear:t=>e(n=>{if(n.consumer_filter=null,n.source_filter=null,n.energy_class=null,n.consumer_type=null,n.wall_material=null,!t)return n.filters=kS,n;n.filters={...kS,prediction:t.prediction}})}),Gi=hc(bk(pc(D_e),{name:"dzkh/filters"})),O_e=[{value:"category1",title:"\u041F\u0440\u043E\u0433\u043D\u043E\u0437\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435",selectable:!1,children:[{value:"prob1",title:"\u041E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043E\u0442\u043E\u043F\u043B\u0435\u043D\u0438\u044F \u0432 \u0434\u043E\u043C\u0435"},{value:"prob2",title:"\u041F\u0440\u043E\u0442\u0435\u0447\u043A\u0430 \u0442\u0440\u0443\u0431 \u0432 \u043F\u043E\u0434\u044A\u0435\u0437\u0434\u0435"},{value:"prob3",title:"\u0422\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0432 \u043A\u0432\u0430\u0440\u0442\u0438\u0440\u0435 \u043D\u0438\u0436\u0435 \u043D\u043E\u0440\u043C\u0430\u0442\u0438\u0432\u043D\u043E\u0439"},{value:"prob4",title:"\u0422\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0432 \u043F\u043E\u043C\u0435\u0449\u0435\u043D\u0438\u0438 \u043E\u0431\u0449\u0435\u0433\u043E \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u043D\u0438\u0436\u0435 \u043D\u043E\u0440\u043C\u0430\u0442\u0438\u0432\u043D\u043E\u0439"},{value:"prob5",title:"\u0422\u0435\u0447\u044C \u0432 \u0441\u0438\u0441\u0442\u0435\u043C\u0435 \u043E\u0442\u043E\u043F\u043B\u0435\u043D\u0438\u044F"}]},{value:"category2",title:"\u0420\u0435\u0430\u0433\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435",selectable:!1,children:[{value:"cooling_time",title:"\u0412\u0440\u0435\u043C\u044F \u043E\u0441\u0442\u044B\u0432\u0430\u043D\u0438\u044F, \u0447"},{value:"priority",title:"\u041F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442 \u0437\u0434\u0430\u043D\u0438\u044F"}]}],A_e=()=>{const e={};let t=0;for(let n=-25;n<25;n++)e[n]=t,t++;return e},Ui=A_e(),N_e=()=>{const{consumer_filter:e,consumer_type:t,energy_class:n,wall_material:r}=Gi(),{value:i}=us(),a=Ui[i];return[...(()=>{const o=[];if(e){const c=`${e.key}_${a}`;o.push([">=",["get",c],e.gt],["<=",["get",c],e.lt])}return t&&o.push(["==",["get","potreb_type"],t.value]),n&&o.push(["==",["get","fi_energy_class"],n.value]),r&&o.push(["==",["get","wall_materials"],r.value]),o})()]},L_e=["==",["get","point_type"],wi.consumer],F_e=()=>{const{isVisible:e}=R1(),{filters:{region:t},consumer_filter:n}=Gi(),r=Sk(t),i=N_e(),{selectedSourceConfig:a}=Wd(),{value:s}=us(),o=E.exports.useMemo(()=>n==null?void 0:n.key,[n==null?void 0:n.key]),c=E.exports.useMemo(()=>{if(o)return`${o}_${Ui[s]}`},[o,s]),{data:f,isLoading:p}=_k(c),g=E.exports.useMemo(()=>(f==null?void 0:f.range)||[0,0],[f==null?void 0:f.range]),v=()=>{const P=["all",L_e,...i];return r&&P.push(r),a.sourceId&&P.push(["==",["get","tp_number"],a.sourceId]),P},b=n!=null&&n.key?`${n.key}_${Ui[s]}`:null,_=E.exports.useMemo(()=>n&&n.key.includes("cooling"),[n]),T=E.exports.useMemo(()=>{const P=g[0],O=(g[1]-P)/8;return _?[].concat(Ub.stops).reverse().map((N,L)=>[P+L*O,N[1]]):Ub.stops.map((N,L)=>[P+L*O,N[1]])},[g]),k=b?{...PS.paint,"circle-color":{property:b,stops:T}}:PS.paint;return A(nr,{children:A(gh,{...PS,id:wi.consumer,source:"points","source-layer":"public.data",layout:{visibility:e[wi.consumer]?"visible":"none"},filter:v(),paint:k})})},z_e=["==",["get","point_type"],wi.dispatcher],$_e=()=>{const{isVisible:e}=R1(),{filters:{region:t}}=Gi(),n=Sk(t),{selectedSourceConfig:r}=Wd(),i=()=>{const a=["all",z_e];return n&&a.push(n),r.sourceId&&a.push(["==",["get","ods_number"],r.dispatcherNumber]),a};return A(nr,{children:A(gh,{type:dN("dispatcherIcon").type,id:wi.dispatcher,source:"points","source-layer":"public.data",layout:{...dN("dispatcherIcon").layout,visibility:e[wi.dispatcher]?"visible":"none"},filter:i()})})},B_e=()=>{const{source_filter:e}=Gi(),{value:t}=us(),n=Ui[t];return[...(()=>{if(e){const i=`${e.key}_${n}`;return[[">=",["get",i],e.gt],["<=",["get",i],e.lt]]}return[]})()]},V_e=["==",["get","point_type"],wi.source],U_e=()=>{const{isVisible:e}=R1(),{filters:{region:t},source_filter:n}=Gi(),r=Sk(t),i=B_e(),{selectedSourceConfig:a}=Wd(),{value:s}=us(),o=()=>{const p=["all",V_e,...i];return r&&p.push(r),a.sourceId&&p.push(["==",["get","tp_number"],a.sourceId]),p},c=n!=null&&n.key?`${n.key}_${Ui[s]}`:null,f=c?{...TS.paint,"circle-color":{property:c,stops:M7.stops}}:TS.paint;return A(nr,{children:A(gh,{...TS,id:wi.source,source:"points","source-layer":"public.data",layout:{visibility:e[wi.source]?"visible":"none"},filter:o(),paint:f})})},j_e=()=>{const{updateCounter:e}=I7();return A(nr,{children:it(rb,{id:"points",type:"vector",tiles:[`${Vb}/martin/public.data/{z}/{x}/{y}.pbf`],children:[A(U_e,{}),A(F_e,{}),A($_e,{})]},`points-${e}`)})},H_e=({data:e})=>A(rb,{id:"selected-region",type:"geojson",data:e,children:A(gh,{...M_e})}),K_e=()=>{const{filters:{region:e}}=Gi();return e!=null&&e.geometry?A(H_e,{data:e.geometry}):null},W_e=()=>it(nr,{children:[A(rb,{id:"ao",type:"vector",tiles:[`${Vb}/martin/public.service_ao/{z}/{x}/{y}.pbf`],children:A(gh,{...fN,layout:{...fN.layout}})}),A(rb,{id:"rayon",type:"vector",tiles:[`${Vb}/martin/public.service_rayon/{z}/{x}/{y}.pbf`],children:A(gh,{...hN,layout:{...hN.layout}})}),A(K_e,{}),A(j_e,{})]}),D7="/assets/circle.48dd350a.svg",IS=({color:e,imageSrc:t,name:n,border:r})=>it("div",{className:"flex gap-2 items-center",children:[t&&A(jae,{src:t,width:18,height:18,className:"flex items-center",preview:!1}),e&&!t&&A("span",{className:"w-4 h-[100%] flex items-center justify-center",children:A("span",{className:`rounded-xl w-3 h-3 inline-block ${r&&"border-black border-[1px] border-solid"}`,style:{backgroundColor:e}})}),A("span",{className:"text-xs text-grey",children:n})]}),pN=({colors:e,name:t,desc:n})=>it("div",{children:[A("span",{className:"text-xs text-grey",children:t}),A("div",{className:"w-[200px]",children:A("div",{className:"w-full h-[10px] rounded-xl",style:{background:`linear-gradient(to right, ${e.join(",")})`}})}),it("span",{className:"text-xs text-grey italic",children:[n," \u2192"]})]});Ub.stops.map(e=>e[1]);const G_e=M7.stops.map(e=>e[1]);function q_e(){const{toggleVisibility:e,isVisible:t}=R1(),{consumer_filter:n,source_filter:r}=Gi(),i=E.exports.useMemo(()=>n&&n.key.includes("cooling"),[n]),a=E.exports.useMemo(()=>i?I_e.stops.map(s=>s[1]):Ub.stops.map(s=>s[1]),[i]);return A("div",{className:"absolute bottom-[20px] right-[20px] text-xs text-grey z-10 bg-white-background rounded-xl p-3 space-y-3",children:A("div",{children:it("div",{className:"space-y-2 flex flex-col",children:[A(Zm,{className:"!ml-0",onChange:()=>e(wi.consumer),checked:t[wi.consumer],children:n?A(pN,{colors:a,name:"\u041F\u043E\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043B\u044C",desc:n.key.includes("prob")?"\u0441\u043A\u043B\u043E\u043D\u043D\u043E\u0441\u0442\u044C \u043A \u0430\u0432\u0430\u0440\u0438\u0439\u043D\u043E\u0441\u0442\u0438":n.key.includes("cooling_time")?"\u0432\u0440\u0435\u043C\u044F \u043E\u0441\u0442\u044B\u0432\u0430\u043D\u0438\u044F, \u0447":"\u043F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442 \u0437\u0434\u0430\u043D\u0438\u044F"}):A(IS,{name:"\u041F\u043E\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043B\u044C"})}),A(Zm,{className:"!ml-0",onChange:()=>e(wi.source),checked:t[wi.source],children:r?A(pN,{colors:G_e,name:"\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A",desc:"\u0441\u043A\u043B\u043E\u043D\u043D\u043E\u0441\u0442\u044C \u043A \u0430\u0432\u0430\u0440\u0438\u0439\u043D\u043E\u0441\u0442\u0438"}):A(IS,{name:"\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A"})}),A(Zm,{className:"!ml-0 flex items-center",onChange:()=>e(wi.dispatcher),checked:t[wi.dispatcher],children:A(IS,{name:"\u0414\u0438\u0441\u043F\u0435\u0442\u0447\u0435\u0440\u0441\u043A\u0430\u044F",imageSrc:D7})})]})})})}const $l=({value:e})=>A("span",{className:"text-grey text-xs bg-white-background-light",children:e}),mN=(e,t)=>{if(Array.isArray(t)){const[n,r]=t;return{...e,[n]:A($l,{value:n}),[r]:A($l,{value:r})}}else return{...e,[t]:A($l,{value:t})}},Ek=({title:e,value:t,onChange:n,onAfterChange:r,min:i=0,max:a=100,range:s=!1,step:o=1,disabled:c=!1,onMouseEnter:f,onMouseLeave:p,showZeroMark:g=!1})=>{const v={[i]:A($l,{value:i}),[a]:A($l,{value:a})},[b,_]=E.exports.useState(t),[T,k]=E.exports.useState(mN(v,t));E.exports.useEffect(()=>{_(t),k(mN(v,t))},[t]);const P=N=>{if(Array.isArray(N)){const[L,$]=N;k({...v,[L]:A($l,{value:L}),[$]:A($l,{value:$})})}else k({...v,[N]:A($l,{value:N})});r==null||r(N)},M=N=>{_(N),n==null||n(N)},O=g?{...T,0:A($l,{value:0})}:T;return it("div",{onMouseEnter:f,onMouseLeave:p,children:[A(pl,{text:e}),A(Ble,{range:s,value:b,marks:O,onChange:M,onAfterChange:P,min:i,max:a,step:o,disabled:c})]})},Z_e=({disabled:e,fullRange:t,isLoading:n})=>{const{value:r,setValue:i,range:a}=us();return n?A("div",{className:"flex justify-center items-center",children:A(dv,{})}):A("div",{className:"absolute w-[200px] top-[20px] right-[20px] text-xs text-grey z-10 bg-white-background rounded-xl p-3 space-y-3",children:A(Ek,{title:"\u0422\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0432\u043E\u0437\u0434\u0443\u0445\u0430 \u043D\u0430 \u0443\u043B\u0438\u0446\u0435",value:r,onAfterChange:i,min:a[0],max:a[1]})})},gN=[{name:"dispatcherIcon",url:D7}];function X_e(e,t,n){n===void 0&&(n={});var r={type:"Feature"};return(n.id===0||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function Y_e(e,t,n){n===void 0&&(n={});for(var r=0,i=e;r<i.length;r++){var a=i[r];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<a[a.length-1].length;s++)if(a[a.length-1][s]!==a[0][s])throw new Error("First and last Position are not equivalent.")}var o={type:"Polygon",coordinates:e};return X_e(o,t,n)}function O7(e,t,n){if(e!==null)for(var r,i,a,s,o,c,f,p=0,g=0,v,b=e.type,_=b==="FeatureCollection",T=b==="Feature",k=_?e.features.length:1,P=0;P<k;P++){f=_?e.features[P].geometry:T?e.geometry:e,v=f?f.type==="GeometryCollection":!1,o=v?f.geometries.length:1;for(var M=0;M<o;M++){var O=0,N=0;if(s=v?f.geometries[M]:f,s!==null){c=s.coordinates;var L=s.type;switch(p=n&&(L==="Polygon"||L==="MultiPolygon")?1:0,L){case null:break;case"Point":if(t(c,g,P,O,N)===!1)return!1;g++,O++;break;case"LineString":case"MultiPoint":for(r=0;r<c.length;r++){if(t(c[r],g,P,O,N)===!1)return!1;g++,L==="MultiPoint"&&O++}L==="LineString"&&O++;break;case"Polygon":case"MultiLineString":for(r=0;r<c.length;r++){for(i=0;i<c[r].length-p;i++){if(t(c[r][i],g,P,O,N)===!1)return!1;g++}L==="MultiLineString"&&O++,L==="Polygon"&&N++}L==="Polygon"&&O++;break;case"MultiPolygon":for(r=0;r<c.length;r++){for(N=0,i=0;i<c[r].length;i++){for(a=0;a<c[r][i].length-p;a++){if(t(c[r][i][a],g,P,O,N)===!1)return!1;g++}N++}O++}break;case"GeometryCollection":for(r=0;r<s.geometries.length;r++)if(O7(s.geometries[r],t,n)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function kE(e){var t=[1/0,1/0,-1/0,-1/0];return O7(e,function(n){t[0]>n[0]&&(t[0]=n[0]),t[1]>n[1]&&(t[1]=n[1]),t[2]<n[0]&&(t[2]=n[0]),t[3]<n[1]&&(t[3]=n[1])}),t}kE.default=kE;var _v={exports:{}};_v.exports=A7;_v.exports.parse=A7;_v.exports.stringify=N7;var vN=/[-+]?([0-9]*\.[0-9]+|[0-9]+)([eE][-+]?[0-9]+)?/,yN=new RegExp("^"+vN.source+"(\\s"+vN.source+"){1,}");function A7(e){var t=e.split(";"),n=t.pop(),r=(t.shift()||"").split("=").pop(),i=0;function a(M){var O=n.substring(i).match(M);return O?(i+=O[0].length,O[0]):null}function s(M){return M&&r.match(/\d+/)&&(M.crs={type:"name",properties:{name:"urn:ogc:def:crs:EPSG::"+r}}),M}function o(){a(/^\s*/)}function c(){o();for(var M=0,O=[],N=[O],L=O,$;$=a(/^(\()/)||a(/^(\))/)||a(/^(,)/)||a(yN);){if($==="(")N.push(L),L=[],N[N.length-1].push(L),M++;else if($===")"){if(L.length===0||(L=N.pop(),!L))return null;if(M--,M===0)break}else if($===",")L=[],N[N.length-1].push(L);else if(!$.split(/\s/g).some(isNaN))Array.prototype.push.apply(L,$.split(/\s/g).map(parseFloat));else return null;o()}return M!==0?null:O}function f(){for(var M=[],O,N;N=a(yN)||a(/^(,)/);)N===","?(M.push(O),O=[]):N.split(/\s/g).some(isNaN)||(O||(O=[]),Array.prototype.push.apply(O,N.split(/\s/g).map(parseFloat))),o();if(O)M.push(O);else return null;return M.length?M:null}function p(){if(!a(/^(point(\sz)?)/i)||(o(),!a(/^(\()/)))return null;var M=f();return!M||(o(),!a(/^(\))/))?null:{type:"Point",coordinates:M[0]}}function g(){if(!a(/^(multipoint)/i))return null;o();var M=n.substring(n.indexOf("(")+1,n.length-1).replace(/\(/g,"").replace(/\)/g,"");n="MULTIPOINT ("+M+")";var O=c();return O?(o(),{type:"MultiPoint",coordinates:O}):null}function v(){if(!a(/^(multilinestring)/i))return null;o();var M=c();return M?(o(),{type:"MultiLineString",coordinates:M}):null}function b(){if(!a(/^(linestring(\sz)?)/i)||(o(),!a(/^(\()/)))return null;var M=f();return!M||!a(/^(\))/)?null:{type:"LineString",coordinates:M}}function _(){if(!a(/^(polygon(\sz)?)/i))return null;o();var M=c();return M?{type:"Polygon",coordinates:M}:null}function T(){if(!a(/^(multipolygon)/i))return null;o();var M=c();return M?{type:"MultiPolygon",coordinates:M}:null}function k(){var M=[],O;if(!a(/^(geometrycollection)/i)||(o(),!a(/^(\()/)))return null;for(;O=P();)M.push(O),o(),a(/^(,)/),o();return a(/^(\))/)?{type:"GeometryCollection",geometries:M}:null}function P(){return p()||b()||_()||g()||v()||T()||k()}return s(P())}function N7(e){e.type==="Feature"&&(e=e.geometry);function t(s){return s.join(" ")}function n(s){return s.map(t).join(", ")}function r(s){return s.map(n).map(a).join(", ")}function i(s){return s.map(r).map(a).join(", ")}function a(s){return"("+s+")"}switch(e.type){case"Point":return"POINT ("+t(e.coordinates)+")";case"LineString":return"LINESTRING ("+n(e.coordinates)+")";case"Polygon":return"POLYGON ("+r(e.coordinates)+")";case"MultiPoint":return"MULTIPOINT ("+n(e.coordinates)+")";case"MultiPolygon":return"MULTIPOLYGON ("+i(e.coordinates)+")";case"MultiLineString":return"MULTILINESTRING ("+r(e.coordinates)+")";case"GeometryCollection":return"GEOMETRYCOLLECTION ("+e.geometries.map(N7).join(", ")+")";default:throw new Error("stringify requires a valid GeoJSON Feature or geometry object as input")}}const{TreeNode:xN}=v1,Q_e=e=>e.reduce((t,n)=>(t[n.name]=n,t[n.name].type="ao",n.rayons&&n.rayons.forEach(r=>{t[r.name]=r,t[r.name].type="rayon"}),t),{}),Pk=()=>iu(["regions"],async()=>{const{data:e}=await ls.get("/api/ao_rayons/");return e},{select:e=>({raw:e,normalized:Q_e(e)}),refetchOnWindowFocus:!1,refetchOnMount:!1}),J_e=({disabled:e,value:t,onChange:n})=>{const{map:r}=X5(),{data:i,isInitialLoading:a}=Pk();return it("div",{children:[A(pl,{text:"\u0410\u041E / \u0440\u0430\u0439\u043E\u043D"}),A(v1,{showSearch:!0,style:{width:"100%"},value:t,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:c=>{if(!c)return;const f=i.normalized[c],p=_v.exports(f.polygon),g=Y_e(p.coordinates[0]),v=kE(g);n({id:f.name,geometry:g,type:f.type}),r.fitBounds([[v[0],v[1]],[v[2],v[3]]],{padding:20})},loading:a,treeNodeFilterProp:"title",onClear:()=>n(null),notFoundContent:A(nl,{image:nl.PRESENTED_IMAGE_SIMPLE,description:"\u041D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E"}),disabled:e,children:i==null?void 0:i.raw.map(c=>{var f;return A(xN,{value:c.name,title:c.name,children:(f=c.rayons)==null?void 0:f.map(p=>A(xN,{value:p.name,title:p.name},p.name))},c.name)})})]})},e1e=({disabled:e})=>{const{consumer_filter:t,setConsumerFilter:n}=Gi();return it("div",{children:[A(pl,{text:"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044C \u043F\u043E\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043B\u044F"}),A(v1,{mode:"tags",style:{width:"100%"},placeholder:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044C",onChange:r=>n(r),treeData:O_e,allowClear:!0,value:t==null?void 0:t.key,disabled:e,treeDefaultExpandAll:!0})]})},t1e=({disabled:e,isLoading:t})=>{const{consumer_filter:n,setConsumerFilter:r}=Gi(),i=E.exports.useMemo(()=>n==null?void 0:n.key,[n==null?void 0:n.key]),a=E.exports.useMemo(()=>{if(!i)return[0,0];const v=n.gt,b=n.lt;return[v,b]},[n,i]),{value:s}=us(),o=E.exports.useMemo(()=>{if(i)return`${i}_${Ui[s]}`},[i,s]),{data:c,isLoading:f}=_k(o),p=E.exports.useMemo(()=>(c==null?void 0:c.range)||[0,0],[c==null?void 0:c.range]),g=v=>r(i,v);return t||f?A("div",{className:"flex justify-center items-center",children:A(dv,{})}):A(nr,{children:n&&p&&A(Ek,{title:i.includes("prob")?"\u0421\u043A\u043B\u043E\u043D\u043D\u043E\u0441\u0442\u044C \u043A \u0430\u0432\u0430\u0440\u0438\u0439\u043D\u043E\u0441\u0442\u0438":i.includes("cooling_time")?"\u0412\u0440\u0435\u043C\u044F \u043E\u0441\u0442\u044B\u0432\u0430\u043D\u0438\u044F, \u0447":"\u041F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442 \u0437\u0434\u0430\u043D\u0438\u044F",value:[a[0],a[1]],onAfterChange:g,min:p[0],max:p[1],range:!0,step:.01,disabled:e})})},n1e=[{value:"prob6",label:"\u0410\u0432\u0430\u0440\u0438\u044F \u043D\u0430 \u0422\u041F"}],r1e=({disabled:e})=>{const{source_filter:t,setSourceFilter:n}=Gi();return it("div",{children:[A(pl,{text:"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044C \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430"}),A(v1,{mode:"tags",style:{width:"100%"},placeholder:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044C",onChange:r=>n(r),treeData:n1e,allowClear:!0,value:t==null?void 0:t.key,disabled:e,treeDefaultExpandAll:!0})]})},i1e=({disabled:e,isLoading:t})=>{const{source_filter:n,setSourceFilter:r}=Gi(),i=E.exports.useMemo(()=>n==null?void 0:n.key,[n==null?void 0:n.key]),a=E.exports.useMemo(()=>{if(!i)return[0,0];const v=n.gt,b=n.lt;return[v,b]},[n,i]),{value:s}=us(),o=E.exports.useMemo(()=>{if(i)return`${i}_${Ui[s]}`},[i,s]),{data:c,isLoading:f}=_k(o),p=E.exports.useMemo(()=>(c==null?void 0:c.range)||[0,0],[c==null?void 0:c.range]),g=v=>r(i,v);return t?A("div",{className:"flex justify-center items-center",children:A(dv,{})}):A(nr,{children:n&&p&&A(Ek,{title:"\u0424\u0438\u043B\u044C\u0442\u0440 \u043F\u043E \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044E",value:[a[0],a[1]],onAfterChange:g,min:p[0],max:p[1],range:!0,step:.01,disabled:e})})},o1e="potreb_type",a1e={living_house:"\u0416\u0438\u043B\u043E\u0439 \u0434\u043E\u043C",soc_object:"\u0421\u043E\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0439 \u043E\u0431\u044A\u0435\u043A\u0442"},s1e=({disabled:e})=>{const{consumer_type:t,setConsumerType:n}=Gi(),{data:r,isLoading:i}=wk(o1e),a=E.exports.useMemo(()=>r?r==null?void 0:r.filter(Boolean).map(s=>({value:s,label:a1e[s]})):[],[r]);return it("div",{children:[A(pl,{text:"\u0422\u0438\u043F \u043F\u043E\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043B\u044F"}),A(jd,{style:{width:"100%"},placeholder:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0442\u0438\u043F",onChange:(s,o)=>n(o),options:a,allowClear:!0,value:t,disabled:e})]})},l1e="fi_energy_class",u1e=({disabled:e})=>{const{energy_class:t,setEnergyClass:n}=Gi(),{data:r,isLoading:i}=wk(l1e),a=E.exports.useMemo(()=>r?r==null?void 0:r.filter(Boolean).map(s=>({value:s,label:s})):[],[r]);return it("div",{children:[A(pl,{text:"\u041A\u043B\u0430\u0441\u0441 \u044D\u043D\u0435\u0440\u0433\u043E\u044D\u0444\u0444\u0435\u043A\u0442\u0438\u0432\u043D\u043E\u0441\u0442\u0438"}),A(jd,{style:{width:"100%"},placeholder:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0442\u0438\u043F",onChange:(s,o)=>n(o),options:a,allowClear:!0,value:t,disabled:e})]})},c1e="wall_materials",d1e=({disabled:e})=>{const{wall_material:t,setWallMaterial:n}=Gi(),{data:r,isLoading:i}=wk(c1e),a=E.exports.useMemo(()=>r?r==null?void 0:r.filter(Boolean).map(s=>({value:s,label:s})):[],[r]);return it("div",{children:[A(pl,{text:"\u041C\u0430\u0442\u0435\u0440\u0438\u0430\u043B \u0441\u0442\u0435\u043D"}),A(jd,{style:{width:"100%"},placeholder:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0442\u0438\u043F",onChange:(s,o)=>n(o),options:a,allowClear:!0,value:t,disabled:e})]})},f1e=()=>{const{clear:e,consumer_filter:t,source_filter:n}=Gi();return it("div",{className:"flex flex-col flex-1",children:[it("div",{className:"space-y-5",children:[A(e1e,{}),A(t1e,{}),A(r1e,{}),A(i1e,{}),A(s1e,{}),A(u1e,{}),A(d1e,{})]}),(t||n)&&A("div",{className:"flex items-center justify-end pt-4",children:A("div",{className:"flex gap-2",children:A(Xr,{onClick:()=>e(),type:"secondary",children:"\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u0444\u0438\u043B\u044C\u0442\u0440\u044B"})})})]})},h1e="/assets/dzkh_logo.bd091fb4.png",p1e="/assets/dit_logo.d7458a9f.png",m1e=E.exports.forwardRef(({isCollapsed:e},t)=>{var i;const{filters:n,setRegion:r}=Gi();return A("div",{className:kd("h-screen p-3 overflow-y-auto shrink-0 border-solid border-border border-0 border-r-[1px] flex flex-col transition-all",e?"basis-0 px-0 -translate-x-[320px]":"basis-[320px]"),ref:t,children:A("div",{className:"flex flex-col flex-1",children:it("div",{className:"space-y-5",children:[it("div",{className:"flex flex-row gap-1 justify-between items-center",children:[A("img",{width:"48%",height:50,src:h1e,alt:"logo"}),A("img",{width:"48%",height:50,src:p1e,alt:"logo"})]}),A(J_e,{value:(i=n.region)==null?void 0:i.id,onChange:r}),A(f1e,{})]})})})});const g1e=e=>({clickedPointConfig:null,setClickedPointConfig:(t,n=!1)=>{e(r=>{if(t===null)return r.clickedPointConfig=null,r;r.clickedPointConfig={id:t,shouldSelect:n}})}}),wv=hc(pc(g1e));let bN=e=>typeof e=="object"&&e!=null&&e.nodeType===1,_N=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",MS=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return _N(n.overflowY,t)||_N(n.overflowX,t)||(r=>{let i=(a=>{if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(e)}return!1},T0=(e,t,n,r,i,a,s,o)=>a<e&&s>t||a>e&&s<t?0:a<=e&&o<=n||s>=t&&o>=n?a-e-r:s>t&&o<n||a<e&&o>n?s-t+i:0,v1e=e=>{let t=e.parentElement;return t==null?e.getRootNode().host||null:t},wN=(e,t)=>{var n,r,i,a;if(typeof document>"u")return[];let{scrollMode:s,block:o,inline:c,boundary:f,skipOverflowHiddenElements:p}=t,g=typeof f=="function"?f:J=>J!==f;if(!bN(e))throw new TypeError("Invalid target");let v=document.scrollingElement||document.documentElement,b=[],_=e;for(;bN(_)&&g(_);){if(_=v1e(_),_===v){b.push(_);break}_!=null&&_===document.body&&MS(_)&&!MS(document.documentElement)||_!=null&&MS(_,p)&&b.push(_)}let T=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,k=(a=(i=window.visualViewport)==null?void 0:i.height)!=null?a:innerHeight,{scrollX:P,scrollY:M}=window,{height:O,width:N,top:L,right:$,bottom:j,left:U}=e.getBoundingClientRect(),G=o==="start"||o==="nearest"?L:o==="end"?j:L+O/2,Z=c==="center"?U+N/2:c==="end"?$:U,Q=[];for(let J=0;J<b.length;J++){let re=b[J],{height:ne,width:ge,top:ie,right:ue,bottom:oe,left:me}=re.getBoundingClientRect();if(s==="if-needed"&&L>=0&&U>=0&&j<=k&&$<=T&&L>=ie&&j<=oe&&U>=me&&$<=ue)return Q;let Te=getComputedStyle(re),we=parseInt(Te.borderLeftWidth,10),be=parseInt(Te.borderTopWidth,10),Re=parseInt(Te.borderRightWidth,10),Ee=parseInt(Te.borderBottomWidth,10),Me=0,Ae=0,Fe="offsetWidth"in re?re.offsetWidth-re.clientWidth-we-Re:0,We="offsetHeight"in re?re.offsetHeight-re.clientHeight-be-Ee:0,je="offsetWidth"in re?re.offsetWidth===0?0:ge/re.offsetWidth:0,pt="offsetHeight"in re?re.offsetHeight===0?0:ne/re.offsetHeight:0;if(v===re)Me=o==="start"?G:o==="end"?G-k:o==="nearest"?T0(M,M+k,k,be,Ee,M+G,M+G+O,O):G-k/2,Ae=c==="start"?Z:c==="center"?Z-T/2:c==="end"?Z-T:T0(P,P+T,T,we,Re,P+Z,P+Z+N,N),Me=Math.max(0,Me+M),Ae=Math.max(0,Ae+P);else{Me=o==="start"?G-ie-be:o==="end"?G-oe+Ee+We:o==="nearest"?T0(ie,oe,ne,be,Ee+We,G,G+O,O):G-(ie+ne/2)+We/2,Ae=c==="start"?Z-me-we:c==="center"?Z-(me+ge/2)+Fe/2:c==="end"?Z-ue+Re+Fe:T0(me,ue,ge,we,Re+Fe,Z,Z+N,N);let{scrollLeft:gt,scrollTop:Ot}=re;Me=Math.max(0,Math.min(Ot+Me/pt,re.scrollHeight-ne/pt+We)),Ae=Math.max(0,Math.min(gt+Ae/je,re.scrollWidth-ge/je+Fe)),G+=Ot-Me,Z+=gt-Ae}Q.push({el:re,top:Me,left:Ae})}return Q},y1e=e=>typeof e=="object"&&typeof e.behavior=="function",x1e=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function b1e(e,t){if(!e.isConnected||!e.ownerDocument.documentElement.contains(e))return;if(y1e(t))return t.behavior(wN(e,t));let n=typeof t=="boolean"||t==null?void 0:t.behavior;for(let{el:r,top:i,left:a}of wN(e,x1e(t)))r.scroll({top:i,left:a,behavior:n})}const _1e=e=>{d7("data.csv",e)},w1e=({provider:e})=>{const[t,n]=E.exports.useState(!1);return e(t,()=>n(!1)),A(Ra,{title:"\u0421\u043A\u0430\u0447\u0430\u0442\u044C \u0434\u0430\u043D\u043D\u044B\u0435",children:A(Xr,{onClick:i=>{i.stopPropagation(),n(!0)},loading:t,disabled:t,children:A(l_e,{})})})},C1e={isOpened:!1,fullScreen:!1},S1e=e=>({tableState:C1e,toggleOpened:t=>{e(n=>{n.tableState.isOpened=t[0]==="opened"})},toggleFullScreen:()=>{e(t=>{t.tableState.fullScreen=!t.tableState.fullScreen})},openTable:()=>{e(t=>{t.tableState.isOpened=!0})}}),D1=hc(pc(S1e));function L7(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ib(e,t)}function Yo(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var CN=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),RS=function(){return Math.random().toString(36).substring(7).split("").join(".")},SN={INIT:"@@redux/INIT"+RS(),REPLACE:"@@redux/REPLACE"+RS(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+RS()}};function E1e(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function F7(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Yo(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Yo(1));return n(F7)(e,t)}if(typeof e!="function")throw new Error(Yo(2));var i=e,a=t,s=[],o=s,c=!1;function f(){o===s&&(o=s.slice())}function p(){if(c)throw new Error(Yo(3));return a}function g(T){if(typeof T!="function")throw new Error(Yo(4));if(c)throw new Error(Yo(5));var k=!0;return f(),o.push(T),function(){if(!!k){if(c)throw new Error(Yo(6));k=!1,f();var M=o.indexOf(T);o.splice(M,1),s=null}}}function v(T){if(!E1e(T))throw new Error(Yo(7));if(typeof T.type>"u")throw new Error(Yo(8));if(c)throw new Error(Yo(9));try{c=!0,a=i(a,T)}finally{c=!1}for(var k=s=o,P=0;P<k.length;P++){var M=k[P];M()}return T}function b(T){if(typeof T!="function")throw new Error(Yo(10));i=T,v({type:SN.REPLACE})}function _(){var T,k=g;return T={subscribe:function(M){if(typeof M!="object"||M===null)throw new Error(Yo(11));function O(){M.next&&M.next(p())}O();var N=k(O);return{unsubscribe:N}}},T[CN]=function(){return this},T}return v({type:SN.INIT}),r={dispatch:v,subscribe:g,getState:p,replaceReducer:b},r[CN]=_,r}function EN(e,t){return function(){return t(e.apply(this,arguments))}}function PN(e,t){if(typeof e=="function")return EN(e,t);if(typeof e!="object"||e===null)throw new Error(Yo(16));var n={};for(var r in e){var i=e[r];typeof i=="function"&&(n[r]=EN(i,t))}return n}function z7(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?function(r){return r}:t.length===1?t[0]:t.reduce(function(r,i){return function(){return r(i.apply(void 0,arguments))}})}function P1e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return function(){var i=r.apply(void 0,arguments),a=function(){throw new Error(Yo(15))},s={getState:i.getState,dispatch:function(){return a.apply(void 0,arguments)}},o=t.map(function(c){return c(s)});return a=z7.apply(void 0,o)(i.dispatch),fe(fe({},i),{},{dispatch:a})}}}var $7=Un.createContext(null);function T1e(e){e()}var B7=T1e,k1e=function(t){return B7=t},I1e=function(){return B7};function M1e(){var e=I1e(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e(function(){for(var i=t;i;)i.callback(),i=i.next})},get:function(){for(var i=[],a=t;a;)i.push(a),a=a.next;return i},subscribe:function(i){var a=!0,s=n={callback:i,next:null,prev:n};return s.prev?s.prev.next=s:t=s,function(){!a||t===null||(a=!1,s.next?s.next.prev=s.prev:n=s.prev,s.prev?s.prev.next=s.next:t=s.next)}}}}var TN={notify:function(){},get:function(){return[]}};function V7(e,t){var n,r=TN;function i(g){return c(),r.subscribe(g)}function a(){r.notify()}function s(){p.onStateChange&&p.onStateChange()}function o(){return Boolean(n)}function c(){n||(n=t?t.addNestedSub(s):e.subscribe(s),r=M1e())}function f(){n&&(n(),n=void 0,r.clear(),r=TN)}var p={addNestedSub:i,notifyNestedSubs:a,handleChangeWrapper:s,isSubscribed:o,trySubscribe:c,tryUnsubscribe:f,getListeners:function(){return r}};return p}var U7=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?E.exports.useLayoutEffect:E.exports.useEffect;function R1e(e){var t=e.store,n=e.context,r=e.children,i=E.exports.useMemo(function(){var o=V7(t);return{store:t,subscription:o}},[t]),a=E.exports.useMemo(function(){return t.getState()},[t]);U7(function(){var o=i.subscription;return o.onStateChange=o.notifyNestedSubs,o.trySubscribe(),a!==t.getState()&&o.notifyNestedSubs(),function(){o.tryUnsubscribe(),o.onStateChange=null}},[i,a]);var s=n||$7;return A(s.Provider,{value:i,children:r})}var Tk=T_.exports,D1e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},O1e={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},A1e={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},j7={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},kk={};kk[Tk.ForwardRef]=A1e;kk[Tk.Memo]=j7;function kN(e){return Tk.isMemo(e)?j7:kk[e.$$typeof]||D1e}var N1e=Object.defineProperty,L1e=Object.getOwnPropertyNames,IN=Object.getOwnPropertySymbols,F1e=Object.getOwnPropertyDescriptor,z1e=Object.getPrototypeOf,MN=Object.prototype;function H7(e,t,n){if(typeof t!="string"){if(MN){var r=z1e(t);r&&r!==MN&&H7(e,r,n)}var i=L1e(t);IN&&(i=i.concat(IN(t)));for(var a=kN(e),s=kN(t),o=0;o<i.length;++o){var c=i[o];if(!O1e[c]&&!(n&&n[c])&&!(s&&s[c])&&!(a&&a[c])){var f=F1e(t,c);try{N1e(e,c,f)}catch{}}}}return e}var RN=H7,K7={exports:{}},Hr={};/** @license React v17.0.2
* 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 O1=60103,A1=60106,Cv=60107,Sv=60108,Ev=60114,Pv=60109,Tv=60110,kv=60112,Iv=60113,Ik=60120,Mv=60115,Rv=60116,W7=60121,G7=60122,q7=60117,Z7=60129,X7=60131;if(typeof Symbol=="function"&&Symbol.for){var lo=Symbol.for;O1=lo("react.element"),A1=lo("react.portal"),Cv=lo("react.fragment"),Sv=lo("react.strict_mode"),Ev=lo("react.profiler"),Pv=lo("react.provider"),Tv=lo("react.context"),kv=lo("react.forward_ref"),Iv=lo("react.suspense"),Ik=lo("react.suspense_list"),Mv=lo("react.memo"),Rv=lo("react.lazy"),W7=lo("react.block"),G7=lo("react.server.block"),q7=lo("react.fundamental"),Z7=lo("react.debug_trace_mode"),X7=lo("react.legacy_hidden")}function Fs(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case O1:switch(e=e.type,e){case Cv:case Ev:case Sv:case Iv:case Ik:return e;default:switch(e=e&&e.$$typeof,e){case Tv:case kv:case Rv:case Mv:case Pv:return e;default:return t}}case A1:return t}}}var $1e=Pv,B1e=O1,V1e=kv,U1e=Cv,j1e=Rv,H1e=Mv,K1e=A1,W1e=Ev,G1e=Sv,q1e=Iv;Hr.ContextConsumer=Tv;Hr.ContextProvider=$1e;Hr.Element=B1e;Hr.ForwardRef=V1e;Hr.Fragment=U1e;Hr.Lazy=j1e;Hr.Memo=H1e;Hr.Portal=K1e;Hr.Profiler=W1e;Hr.StrictMode=G1e;Hr.Suspense=q1e;Hr.isAsyncMode=function(){return!1};Hr.isConcurrentMode=function(){return!1};Hr.isContextConsumer=function(e){return Fs(e)===Tv};Hr.isContextProvider=function(e){return Fs(e)===Pv};Hr.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===O1};Hr.isForwardRef=function(e){return Fs(e)===kv};Hr.isFragment=function(e){return Fs(e)===Cv};Hr.isLazy=function(e){return Fs(e)===Rv};Hr.isMemo=function(e){return Fs(e)===Mv};Hr.isPortal=function(e){return Fs(e)===A1};Hr.isProfiler=function(e){return Fs(e)===Ev};Hr.isStrictMode=function(e){return Fs(e)===Sv};Hr.isSuspense=function(e){return Fs(e)===Iv};Hr.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Cv||e===Ev||e===Z7||e===Sv||e===Iv||e===Ik||e===X7||typeof e=="object"&&e!==null&&(e.$$typeof===Rv||e.$$typeof===Mv||e.$$typeof===Pv||e.$$typeof===Tv||e.$$typeof===kv||e.$$typeof===q7||e.$$typeof===W7||e[0]===G7)};Hr.typeOf=Fs;(function(e){e.exports=Hr})(K7);var Z1e=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],X1e=["reactReduxForwardedRef"],Y1e=[],Q1e=[null,null];function J1e(e,t){var n=e[1];return[t.payload,n+1]}function DN(e,t,n){U7(function(){return e.apply(void 0,t)},n)}function ewe(e,t,n,r,i,a,s){e.current=r,t.current=i,n.current=!1,a.current&&(a.current=null,s())}function twe(e,t,n,r,i,a,s,o,c,f){if(!!e){var p=!1,g=null,v=function(){if(!p){var T=t.getState(),k,P;try{k=r(T,i.current)}catch(M){P=M,g=M}P||(g=null),k===a.current?s.current||c():(a.current=k,o.current=k,s.current=!0,f({type:"STORE_UPDATED",payload:{error:P}}))}};n.onStateChange=v,n.trySubscribe(),v();var b=function(){if(p=!0,n.tryUnsubscribe(),n.onStateChange=null,g)throw g};return b}}var nwe=function(){return[null,0]};function rwe(e,t){t===void 0&&(t={});var n=t,r=n.getDisplayName,i=r===void 0?function(O){return"ConnectAdvanced("+O+")"}:r,a=n.methodName,s=a===void 0?"connectAdvanced":a,o=n.renderCountProp,c=o===void 0?void 0:o,f=n.shouldHandleStateChanges,p=f===void 0?!0:f,g=n.storeKey,v=g===void 0?"store":g;n.withRef;var b=n.forwardRef,_=b===void 0?!1:b,T=n.context,k=T===void 0?$7:T,P=wg(n,Z1e),M=k;return function(N){var L=N.displayName||N.name||"Component",$=i(L),j=Be({},P,{getDisplayName:i,methodName:s,renderCountProp:c,shouldHandleStateChanges:p,storeKey:v,displayName:$,wrappedComponentName:L,WrappedComponent:N}),U=P.pure;function G(ne){return e(ne.dispatch,j)}var Z=U?E.exports.useMemo:function(ne){return ne()};function Q(ne){var ge=E.exports.useMemo(function(){var et=ne.reactReduxForwardedRef,ut=wg(ne,X1e);return[ne.context,et,ut]},[ne]),ie=ge[0],ue=ge[1],oe=ge[2],me=E.exports.useMemo(function(){return ie&&ie.Consumer&&K7.exports.isContextConsumer(Un.createElement(ie.Consumer,null))?ie:M},[ie,M]),Te=E.exports.useContext(me),we=Boolean(ne.store)&&Boolean(ne.store.getState)&&Boolean(ne.store.dispatch);Boolean(Te)&&Boolean(Te.store);var be=we?ne.store:Te.store,Re=E.exports.useMemo(function(){return G(be)},[be]),Ee=E.exports.useMemo(function(){if(!p)return Q1e;var et=V7(be,we?null:Te.subscription),ut=et.notifyNestedSubs.bind(et);return[et,ut]},[be,we,Te]),Me=Ee[0],Ae=Ee[1],Fe=E.exports.useMemo(function(){return we?Te:Be({},Te,{subscription:Me})},[we,Te,Me]),We=E.exports.useReducer(J1e,Y1e,nwe),je=We[0],pt=je[0],gt=We[1];if(pt&&pt.error)throw pt.error;var Ot=E.exports.useRef(),Ze=E.exports.useRef(oe),St=E.exports.useRef(),ot=E.exports.useRef(!1),vt=Z(function(){return St.current&&oe===Ze.current?St.current:Re(be.getState(),oe)},[be,pt,oe]);DN(ewe,[Ze,Ot,ot,oe,vt,St,Ae]),DN(twe,[p,be,Me,Re,Ze,Ot,ot,St,Ae,gt],[be,Me,Re]);var yt=E.exports.useMemo(function(){return A(N,{...vt,ref:ue})},[ue,N,vt]),kt=E.exports.useMemo(function(){return p?A(me.Provider,{value:Fe,children:yt}):yt},[me,yt,Fe]);return kt}var J=U?Un.memo(Q):Q;if(J.WrappedComponent=N,J.displayName=Q.displayName=$,_){var re=Un.forwardRef(function(ge,ie){return A(J,{...ge,reactReduxForwardedRef:ie})});return re.displayName=$,re.WrappedComponent=N,RN(re,N)}return RN(J,N)}}function ON(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function DS(e,t){if(ON(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!ON(e[n[i]],t[n[i]]))return!1;return!0}function iwe(e,t){var n={},r=function(s){var o=e[s];typeof o=="function"&&(n[s]=function(){return t(o.apply(void 0,arguments))})};for(var i in e)r(i);return n}function Mk(e){return function(n,r){var i=e(n,r);function a(){return i}return a.dependsOnOwnProps=!1,a}}function AN(e){return e.dependsOnOwnProps!==null&&e.dependsOnOwnProps!==void 0?Boolean(e.dependsOnOwnProps):e.length!==1}function Y7(e,t){return function(r,i){i.displayName;var a=function(o,c){return a.dependsOnOwnProps?a.mapToProps(o,c):a.mapToProps(o)};return a.dependsOnOwnProps=!0,a.mapToProps=function(o,c){a.mapToProps=e,a.dependsOnOwnProps=AN(e);var f=a(o,c);return typeof f=="function"&&(a.mapToProps=f,a.dependsOnOwnProps=AN(f),f=a(o,c)),f},a}}function owe(e){return typeof e=="function"?Y7(e):void 0}function awe(e){return e?void 0:Mk(function(t){return{dispatch:t}})}function swe(e){return e&&typeof e=="object"?Mk(function(t){return iwe(e,t)}):void 0}const lwe=[owe,awe,swe];function uwe(e){return typeof e=="function"?Y7(e):void 0}function cwe(e){return e?void 0:Mk(function(){return{}})}const dwe=[uwe,cwe];function fwe(e,t,n){return Be({},n,e,t)}function hwe(e){return function(n,r){r.displayName;var i=r.pure,a=r.areMergedPropsEqual,s=!1,o;return function(f,p,g){var v=e(f,p,g);return s?(!i||!a(v,o))&&(o=v):(s=!0,o=v),o}}}function pwe(e){return typeof e=="function"?hwe(e):void 0}function mwe(e){return e?void 0:function(){return fwe}}const gwe=[pwe,mwe];var vwe=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function ywe(e,t,n,r){return function(a,s){return n(e(a,s),t(r,s),s)}}function xwe(e,t,n,r,i){var a=i.areStatesEqual,s=i.areOwnPropsEqual,o=i.areStatePropsEqual,c=!1,f,p,g,v,b;function _(O,N){return f=O,p=N,g=e(f,p),v=t(r,p),b=n(g,v,p),c=!0,b}function T(){return g=e(f,p),t.dependsOnOwnProps&&(v=t(r,p)),b=n(g,v,p),b}function k(){return e.dependsOnOwnProps&&(g=e(f,p)),t.dependsOnOwnProps&&(v=t(r,p)),b=n(g,v,p),b}function P(){var O=e(f,p),N=!o(O,g);return g=O,N&&(b=n(g,v,p)),b}function M(O,N){var L=!s(N,p),$=!a(O,f,N,p);return f=O,p=N,L&&$?T():L?k():$?P():b}return function(N,L){return c?M(N,L):_(N,L)}}function bwe(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,i=t.initMergeProps,a=wg(t,vwe),s=n(e,a),o=r(e,a),c=i(e,a),f=a.pure?xwe:ywe;return f(s,o,c,e,a)}var _we=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function OS(e,t,n){for(var r=t.length-1;r>=0;r--){var i=t[r](e);if(i)return i}return function(a,s){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+s.wrappedComponentName+".")}}function wwe(e,t){return e===t}function Cwe(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?rwe:n,i=t.mapStateToPropsFactories,a=i===void 0?dwe:i,s=t.mapDispatchToPropsFactories,o=s===void 0?lwe:s,c=t.mergePropsFactories,f=c===void 0?gwe:c,p=t.selectorFactory,g=p===void 0?bwe:p;return function(b,_,T,k){k===void 0&&(k={});var P=k,M=P.pure,O=M===void 0?!0:M,N=P.areStatesEqual,L=N===void 0?wwe:N,$=P.areOwnPropsEqual,j=$===void 0?DS:$,U=P.areStatePropsEqual,G=U===void 0?DS:U,Z=P.areMergedPropsEqual,Q=Z===void 0?DS:Z,J=wg(P,_we),re=OS(b,a,"mapStateToProps"),ne=OS(_,o,"mapDispatchToProps"),ge=OS(T,f,"mergeProps");return r(g,Be({methodName:"connect",getDisplayName:function(ue){return"Connect("+ue+")"},shouldHandleStateChanges:Boolean(b),initMapStateToProps:re,initMapDispatchToProps:ne,initMergeProps:ge,pure:O,areStatesEqual:L,areOwnPropsEqual:j,areStatePropsEqual:G,areMergedPropsEqual:Q},J))}}const Q7=Cwe();k1e(cl.exports.unstable_batchedUpdates);function Swe(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function J7(e,t){var n=E.exports.useState(function(){return{inputs:t,result:e()}})[0],r=E.exports.useRef(!0),i=E.exports.useRef(n),a=r.current||Boolean(t&&i.current.inputs&&Swe(t,i.current.inputs)),s=a?i.current:{inputs:t,result:e()};return E.exports.useEffect(function(){r.current=!1,i.current=s},[s]),s.result}function Ewe(e,t){return J7(function(){return e},t)}var vr=J7,On=Ewe,Pwe=!0,AS="Invariant failed";function Twe(e,t){if(!e){if(Pwe)throw new Error(AS);var n=typeof t=="function"?t():t,r=n?"".concat(AS,": ").concat(n):AS;throw new Error(r)}}var ks=function(t){var n=t.top,r=t.right,i=t.bottom,a=t.left,s=r-a,o=i-n,c={top:n,right:r,bottom:i,left:a,width:s,height:o,x:a,y:n,center:{x:(r+a)/2,y:(i+n)/2}};return c},Rk=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}},NN=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},kwe=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},NS={top:0,right:0,bottom:0,left:0},Dk=function(t){var n=t.borderBox,r=t.margin,i=r===void 0?NS:r,a=t.border,s=a===void 0?NS:a,o=t.padding,c=o===void 0?NS:o,f=ks(Rk(n,i)),p=ks(NN(n,s)),g=ks(NN(p,c));return{marginBox:f,borderBox:ks(n),paddingBox:p,contentBox:g,margin:i,border:s,padding:c}},Ga=function(t){var n=t.slice(0,-2),r=t.slice(-2);if(r!=="px")return 0;var i=Number(n);return isNaN(i)&&Twe(!1),i},Iwe=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Hb=function(t,n){var r=t.borderBox,i=t.border,a=t.margin,s=t.padding,o=kwe(r,n);return Dk({borderBox:o,border:i,margin:a,padding:s})},Kb=function(t,n){return n===void 0&&(n=Iwe()),Hb(t,n)},e9=function(t,n){var r={top:Ga(n.marginTop),right:Ga(n.marginRight),bottom:Ga(n.marginBottom),left:Ga(n.marginLeft)},i={top:Ga(n.paddingTop),right:Ga(n.paddingRight),bottom:Ga(n.paddingBottom),left:Ga(n.paddingLeft)},a={top:Ga(n.borderTopWidth),right:Ga(n.borderRightWidth),bottom:Ga(n.borderBottomWidth),left:Ga(n.borderLeftWidth)};return Dk({borderBox:t,margin:r,padding:i,border:a})},t9=function(t){var n=t.getBoundingClientRect(),r=window.getComputedStyle(t);return e9(n,r)},LN=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Mwe(e,t){return!!(e===t||LN(e)&&LN(t))}function Rwe(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Mwe(e[n],t[n]))return!1;return!0}function no(e,t){t===void 0&&(t=Rwe);var n,r=[],i,a=!1;function s(){for(var o=[],c=0;c<arguments.length;c++)o[c]=arguments[c];return a&&n===this&&t(o,r)||(i=e.apply(this,o),a=!0,n=this,r=o),i}return s}var Dwe=function(t){var n=[],r=null,i=function(){for(var s=arguments.length,o=new Array(s),c=0;c<s;c++)o[c]=arguments[c];n=o,!r&&(r=requestAnimationFrame(function(){r=null,t.apply(void 0,n)}))};return i.cancel=function(){!r||(cancelAnimationFrame(r),r=null)},i};const Og=Dwe;function n9(e,t){}n9.bind(null,"warn");n9.bind(null,"error");function Ju(){}function Owe(e,t){return Be({},e,{},t)}function ts(e,t,n){var r=t.map(function(i){var a=Owe(n,i.options);return e.addEventListener(i.eventName,i.fn,a),function(){e.removeEventListener(i.eventName,i.fn,a)}});return function(){r.forEach(function(a){a()})}}var Awe="Invariant failed";function Wb(e){this.message=e}Wb.prototype.toString=function(){return this.message};function rn(e,t){if(!e)throw new Wb(Awe)}var Nwe=function(e){L7(t,e);function t(){for(var r,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=e.call.apply(e,[this].concat(a))||this,r.callbacks=null,r.unbind=Ju,r.onWindowError=function(o){var c=r.getCallbacks();c.isDragging()&&c.tryAbort();var f=o.error;f instanceof Wb&&o.preventDefault()},r.getCallbacks=function(){if(!r.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return r.callbacks},r.setCallbacks=function(o){r.callbacks=o},r}var n=t.prototype;return n.componentDidMount=function(){this.unbind=ts(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(i){if(i instanceof Wb){this.setState({});return}throw i},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(Un.Component),Lwe=`
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
`,Gb=function(t){return t+1},Fwe=function(t){return`
You have lifted an item in position `+Gb(t.source.index)+`
`},r9=function(t,n){var r=t.droppableId===n.droppableId,i=Gb(t.index),a=Gb(n.index);return r?`
You have moved the item from position `+i+`
to position `+a+`
`:`
You have moved the item from position `+i+`
in list `+t.droppableId+`
to list `+n.droppableId+`
in position `+a+`
`},i9=function(t,n,r){var i=n.droppableId===r.droppableId;return i?`
The item `+t+`
has been combined with `+r.draggableId:`
The item `+t+`
in list `+n.droppableId+`
has been combined with `+r.draggableId+`
in list `+r.droppableId+`
`},zwe=function(t){var n=t.destination;if(n)return r9(t.source,n);var r=t.combine;return r?i9(t.draggableId,t.source,r):"You are over an area that cannot be dropped on"},FN=function(t){return`
The item has returned to its starting position
of `+Gb(t.index)+`
`},$we=function(t){if(t.reason==="CANCEL")return`
Movement cancelled.
`+FN(t.source)+`
`;var n=t.destination,r=t.combine;return n?`
You have dropped the item.
`+r9(t.source,n)+`
`:r?`
You have dropped the item.
`+i9(t.draggableId,t.source,r)+`
`:`
The item has been dropped while not over a drop area.
`+FN(t.source)+`
`},wx={dragHandleUsageInstructions:Lwe,onDragStart:Fwe,onDragUpdate:zwe,onDragEnd:$we},ro={x:0,y:0},co=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},wa=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},ec=function(t,n){return t.x===n.x&&t.y===n.y},Jh=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},Ad=function(t,n,r){var i;return r===void 0&&(r=0),i={},i[t]=n,i[t==="x"?"y":"x"]=r,i},Ag=function(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))},zN=function(t,n){return Math.min.apply(Math,n.map(function(r){return Ag(t,r)}))},o9=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},Bwe=function(e,t){var n=ks({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n},Dv=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},$N=function(t){return[{x:t.left,y:t.top},{x:t.right,y:t.top},{x:t.left,y:t.bottom},{x:t.right,y:t.bottom}]},Vwe={top:0,right:0,bottom:0,left:0},Uwe=function(t,n){return n?Dv(t,n.scroll.diff.displacement):t},jwe=function(t,n,r){if(r&&r.increasedBy){var i;return Be({},t,(i={},i[n.end]=t[n.end]+r.increasedBy[n.line],i))}return t},Hwe=function(t,n){return n&&n.shouldClipSubject?Bwe(n.pageMarginBox,t):ks(t)},Th=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,i=e.frame,a=Uwe(t.marginBox,i),s=jwe(a,r,n),o=Hwe(s,i);return{page:t,withPlaceholder:n,active:o}},Ok=function(e,t){e.frame||rn(!1);var n=e.frame,r=wa(t,n.scroll.initial),i=Jh(r),a=Be({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}}),s=Th({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:a}),o=Be({},e,{frame:a,subject:s});return o};function qb(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function Ak(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function mc(e,t){if(e.find)return e.find(t);var n=Ak(e,t);if(n!==-1)return e[n]}function a9(e){return Array.prototype.slice.call(e)}var s9=no(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),l9=no(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),N1=no(function(e){return qb(e)}),Kwe=no(function(e){return qb(e)}),ep=no(function(e,t){var n=Kwe(t).filter(function(r){return e===r.descriptor.droppableId}).sort(function(r,i){return r.descriptor.index-i.descriptor.index});return n});function Nk(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function L1(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var F1=no(function(e,t){return t.filter(function(n){return n.descriptor.id!==e.descriptor.id})}),Wwe=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,i=e.insideDestination,a=e.previousImpact;if(!r.isCombineEnabled)return null;var s=Nk(a);if(!s)return null;function o(T){var k={type:"COMBINE",combine:{draggableId:T,droppableId:r.descriptor.id}};return Be({},a,{at:k})}var c=a.displaced.all,f=c.length?c[0]:null;if(t)return f?o(f):null;var p=F1(n,i);if(!f){if(!p.length)return null;var g=p[p.length-1];return o(g.descriptor.id)}var v=Ak(p,function(T){return T.descriptor.id===f});v===-1&&rn(!1);var b=v-1;if(b<0)return null;var _=p[b];return o(_.descriptor.id)},tp=function(e,t){return e.descriptor.droppableId===t.descriptor.id},u9={point:ro,value:0},Ng={invisible:{},visible:{},all:[]},Gwe={displaced:Ng,displacedBy:u9,at:null},is=function(e,t){return function(n){return e<=n&&n<=t}},c9=function(e){var t=is(e.top,e.bottom),n=is(e.left,e.right);return function(r){var i=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);if(i)return!0;var a=t(r.top)||t(r.bottom),s=n(r.left)||n(r.right),o=a&&s;if(o)return!0;var c=r.top<e.top&&r.bottom>e.bottom,f=r.left<e.left&&r.right>e.right,p=c&&f;if(p)return!0;var g=c&&s||f&&a;return g}},qwe=function(e){var t=is(e.top,e.bottom),n=is(e.left,e.right);return function(r){var i=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);return i}},Lk={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},d9={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},Zwe=function(e){return function(t){var n=is(t.top,t.bottom),r=is(t.left,t.right);return function(i){return e===Lk?n(i.top)&&n(i.bottom):r(i.left)&&r(i.right)}}},Xwe=function(t,n){var r=n.frame?n.frame.scroll.diff.displacement:ro;return Dv(t,r)},Ywe=function(t,n,r){return n.subject.active?r(n.subject.active)(t):!1},Qwe=function(t,n,r){return r(n)(t)},Fk=function(t){var n=t.target,r=t.destination,i=t.viewport,a=t.withDroppableDisplacement,s=t.isVisibleThroughFrameFn,o=a?Xwe(n,r):n;return Ywe(o,r,s)&&Qwe(o,i,s)},Jwe=function(t){return Fk(Be({},t,{isVisibleThroughFrameFn:c9}))},f9=function(t){return Fk(Be({},t,{isVisibleThroughFrameFn:qwe}))},eCe=function(t){return Fk(Be({},t,{isVisibleThroughFrameFn:Zwe(t.destination.axis)}))},tCe=function(t,n,r){if(typeof r=="boolean")return r;if(!n)return!0;var i=n.invisible,a=n.visible;if(i[t])return!1;var s=a[t];return s?s.shouldAnimate:!0};function nCe(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return ks(Rk(n,r))}function Lg(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,i=e.viewport,a=e.forceShouldAnimate,s=e.last;return t.reduce(function(c,f){var p=nCe(f,r),g=f.descriptor.id;c.all.push(g);var v=Jwe({target:p,destination:n,viewport:i,withDroppableDisplacement:!0});if(!v)return c.invisible[f.descriptor.id]=!0,c;var b=tCe(g,s,a),_={draggableId:g,shouldAnimate:b};return c.visible[g]=_,c},{all:[],visible:{},invisible:{}})}function rCe(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function BN(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,i=e.destination,a=rCe(t,{inHomeList:n});return{displaced:Ng,displacedBy:r,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:a}}}}function Zb(e){var t=e.draggable,n=e.insideDestination,r=e.destination,i=e.viewport,a=e.displacedBy,s=e.last,o=e.index,c=e.forceShouldAnimate,f=tp(t,r);if(o==null)return BN({insideDestination:n,inHomeList:f,displacedBy:a,destination:r});var p=mc(n,function(T){return T.descriptor.index===o});if(!p)return BN({insideDestination:n,inHomeList:f,displacedBy:a,destination:r});var g=F1(t,n),v=n.indexOf(p),b=g.slice(v),_=Lg({afterDragging:b,destination:r,displacedBy:a,last:s,viewport:i.frame,forceShouldAnimate:c});return{displaced:_,displacedBy:a,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:o}}}}function ac(e,t){return Boolean(t.effected[e])}var iCe=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,i=e.combine,a=e.afterCritical;if(!n.isCombineEnabled)return null;var s=i.draggableId,o=r[s],c=o.descriptor.index,f=ac(s,a);return f?t?c:c-1:t?c+1:c},oCe=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,i=e.location;if(!r.length)return null;var a=i.index,s=t?a+1:a-1,o=r[0].descriptor.index,c=r[r.length-1].descriptor.index,f=n?c:c+1;return s<o||s>f?null:s},aCe=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,i=e.draggables,a=e.destination,s=e.insideDestination,o=e.previousImpact,c=e.viewport,f=e.afterCritical,p=o.at;if(p||rn(!1),p.type==="REORDER"){var g=oCe({isMovingForward:t,isInHomeList:n,location:p.destination,insideDestination:s});return g==null?null:Zb({draggable:r,insideDestination:s,destination:a,viewport:c,last:o.displaced,displacedBy:o.displacedBy,index:g})}var v=iCe({isMovingForward:t,destination:a,displaced:o.displaced,draggables:i,combine:p.combine,afterCritical:f});return v==null?null:Zb({draggable:r,insideDestination:s,destination:a,viewport:c,last:o.displaced,displacedBy:o.displacedBy,index:v})},sCe=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,i=e.displacedBy,a=Boolean(t.visible[r]||t.invisible[r]);return ac(r,n)?a?ro:Jh(i.point):a?i.point:ro},lCe=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,i=L1(n);i||rn(!1);var a=i.draggableId,s=r[a].page.borderBox.center,o=sCe({displaced:n.displaced,afterCritical:t,combineWith:a,displacedBy:n.displacedBy});return co(s,o)},h9=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},uCe=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},zk=function(t,n,r){return n[t.crossAxisStart]+r.margin[t.crossAxisStart]+r.borderBox[t.crossAxisSize]/2},VN=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return Ad(n.line,r.marginBox[n.end]+h9(n,i),zk(n,r.marginBox,i))},UN=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return Ad(n.line,r.marginBox[n.start]-uCe(n,i),zk(n,r.marginBox,i))},cCe=function(t){var n=t.axis,r=t.moveInto,i=t.isMoving;return Ad(n.line,r.contentBox[n.start]+h9(n,i),zk(n,r.contentBox,i))},dCe=function(e){var t=e.impact,n=e.draggable,r=e.draggables,i=e.droppable,a=e.afterCritical,s=ep(i.descriptor.id,r),o=n.page,c=i.axis;if(!s.length)return cCe({axis:c,moveInto:i.page,isMoving:o});var f=t.displaced,p=t.displacedBy,g=f.all[0];if(g){var v=r[g];if(ac(g,a))return UN({axis:c,moveRelativeTo:v.page,isMoving:o});var b=Hb(v.page,p.point);return UN({axis:c,moveRelativeTo:b,isMoving:o})}var _=s[s.length-1];if(_.descriptor.id===n.descriptor.id)return o.borderBox.center;if(ac(_.descriptor.id,a)){var T=Hb(_.page,Jh(a.displacedBy.point));return VN({axis:c,moveRelativeTo:T,isMoving:o})}return VN({axis:c,moveRelativeTo:_.page,isMoving:o})},IE=function(e,t){var n=e.frame;return n?co(t,n.scroll.diff.displacement):t},fCe=function(t){var n=t.impact,r=t.draggable,i=t.droppable,a=t.draggables,s=t.afterCritical,o=r.page.borderBox.center,c=n.at;return!i||!c?o:c.type==="REORDER"?dCe({impact:n,draggable:r,draggables:a,droppable:i,afterCritical:s}):lCe({impact:n,draggables:a,afterCritical:s})},z1=function(e){var t=fCe(e),n=e.droppable,r=n?IE(n,t):t;return r},p9=function(e,t){var n=wa(t,e.scroll.initial),r=Jh(n),i=ks({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),a={frame:i,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}};return a};function jN(e,t){return e.map(function(n){return t[n]})}function hCe(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}var pCe=function(e){var t=e.impact,n=e.viewport,r=e.destination,i=e.draggables,a=e.maxScrollChange,s=p9(n,co(n.scroll.current,a)),o=r.frame?Ok(r,co(r.frame.scroll.current,a)):r,c=t.displaced,f=Lg({afterDragging:jN(c.all,i),destination:r,displacedBy:t.displacedBy,viewport:s.frame,last:c,forceShouldAnimate:!1}),p=Lg({afterDragging:jN(c.all,i),destination:o,displacedBy:t.displacedBy,viewport:n.frame,last:c,forceShouldAnimate:!1}),g={},v={},b=[c,f,p];c.all.forEach(function(T){var k=hCe(T,b);if(k){v[T]=k;return}g[T]=!0});var _=Be({},t,{displaced:{all:c.all,invisible:g,visible:v}});return _},mCe=function(e,t){return co(e.scroll.diff.displacement,t)},$k=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,r=e.viewport,i=mCe(r,t),a=wa(i,n.page.borderBox.center);return co(n.client.borderBox.center,a)},m9=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,i=e.viewport,a=e.withDroppableDisplacement,s=e.onlyOnMainAxis,o=s===void 0?!1:s,c=wa(r,t.page.borderBox.center),f=Dv(t.page.borderBox,c),p={target:f,destination:n,withDroppableDisplacement:a,viewport:i};return o?eCe(p):f9(p)},gCe=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,i=e.draggables,a=e.previousImpact,s=e.viewport,o=e.previousPageBorderBoxCenter,c=e.previousClientSelection,f=e.afterCritical;if(!r.isEnabled)return null;var p=ep(r.descriptor.id,i),g=tp(n,r),v=Wwe({isMovingForward:t,draggable:n,destination:r,insideDestination:p,previousImpact:a})||aCe({isMovingForward:t,isInHomeList:g,draggable:n,draggables:i,destination:r,insideDestination:p,previousImpact:a,viewport:s,afterCritical:f});if(!v)return null;var b=z1({impact:v,draggable:n,droppable:r,draggables:i,afterCritical:f}),_=m9({draggable:n,destination:r,newPageBorderBoxCenter:b,viewport:s.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(_){var T=$k({pageBorderBoxCenter:b,draggable:n,viewport:s});return{clientSelection:T,impact:v,scrollJumpRequest:null}}var k=wa(b,o),P=pCe({impact:v,viewport:s,destination:r,draggables:i,maxScrollChange:k});return{clientSelection:c,impact:P,scrollJumpRequest:k}},$o=function(t){var n=t.subject.active;return n||rn(!1),n},vCe=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.source,i=e.droppables,a=e.viewport,s=r.subject.active;if(!s)return null;var o=r.axis,c=is(s[o.start],s[o.end]),f=N1(i).filter(function(g){return g!==r}).filter(function(g){return g.isEnabled}).filter(function(g){return Boolean(g.subject.active)}).filter(function(g){return c9(a.frame)($o(g))}).filter(function(g){var v=$o(g);return t?s[o.crossAxisEnd]<v[o.crossAxisEnd]:v[o.crossAxisStart]<s[o.crossAxisStart]}).filter(function(g){var v=$o(g),b=is(v[o.start],v[o.end]);return c(v[o.start])||c(v[o.end])||b(s[o.start])||b(s[o.end])}).sort(function(g,v){var b=$o(g)[o.crossAxisStart],_=$o(v)[o.crossAxisStart];return t?b-_:_-b}).filter(function(g,v,b){return $o(g)[o.crossAxisStart]===$o(b[0])[o.crossAxisStart]});if(!f.length)return null;if(f.length===1)return f[0];var p=f.filter(function(g){var v=is($o(g)[o.start],$o(g)[o.end]);return v(n[o.line])});return p.length===1?p[0]:p.length>1?p.sort(function(g,v){return $o(g)[o.start]-$o(v)[o.start]})[0]:f.sort(function(g,v){var b=zN(n,$N($o(g))),_=zN(n,$N($o(v)));return b!==_?b-_:$o(g)[o.start]-$o(v)[o.start]})[0]},HN=function(t,n){var r=t.page.borderBox.center;return ac(t.descriptor.id,n)?wa(r,n.displacedBy.point):r},yCe=function(t,n){var r=t.page.borderBox;return ac(t.descriptor.id,n)?Dv(r,Jh(n.displacedBy.point)):r},xCe=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,i=e.insideDestination,a=e.afterCritical,s=i.filter(function(o){return f9({target:yCe(o,a),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(o,c){var f=Ag(t,IE(r,HN(o,a))),p=Ag(t,IE(r,HN(c,a)));return f<p?-1:p<f?1:o.descriptor.index-c.descriptor.index});return s[0]||null},Ov=no(function(t,n){var r=n[t.line];return{value:r,point:Ad(t.line,r)}}),bCe=function(t,n,r){var i=t.axis;if(t.descriptor.mode==="virtual")return Ad(i.line,n[i.line]);var a=t.subject.page.contentBox[i.size],s=ep(t.descriptor.id,r),o=s.reduce(function(p,g){return p+g.client.marginBox[i.size]},0),c=o+n[i.line],f=c-a;return f<=0?null:Ad(i.line,f)},g9=function(t,n){return Be({},t,{scroll:Be({},t.scroll,{max:n})})},v9=function(t,n,r){var i=t.frame;tp(n,t)&&rn(!1),t.subject.withPlaceholder&&rn(!1);var a=Ov(t.axis,n.displaceBy).point,s=bCe(t,a,r),o={placeholderSize:a,increasedBy:s,oldFrameMaxScroll:t.frame?t.frame.scroll.max:null};if(!i){var c=Th({page:t.subject.page,withPlaceholder:o,axis:t.axis,frame:t.frame});return Be({},t,{subject:c})}var f=s?co(i.scroll.max,s):i.scroll.max,p=g9(i,f),g=Th({page:t.subject.page,withPlaceholder:o,axis:t.axis,frame:p});return Be({},t,{subject:g,frame:p})},_Ce=function(t){var n=t.subject.withPlaceholder;n||rn(!1);var r=t.frame;if(!r){var i=Th({page:t.subject.page,axis:t.axis,frame:null,withPlaceholder:null});return Be({},t,{subject:i})}var a=n.oldFrameMaxScroll;a||rn(!1);var s=g9(r,a),o=Th({page:t.subject.page,axis:t.axis,frame:s,withPlaceholder:null});return Be({},t,{subject:o,frame:s})},wCe=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,r=e.insideDestination,i=e.draggable,a=e.draggables,s=e.destination,o=e.viewport,c=e.afterCritical;if(!n){if(r.length)return null;var f={displaced:Ng,displacedBy:u9,at:{type:"REORDER",destination:{droppableId:s.descriptor.id,index:0}}},p=z1({impact:f,draggable:i,droppable:s,draggables:a,afterCritical:c}),g=tp(i,s)?s:v9(s,i,a),v=m9({draggable:i,destination:g,newPageBorderBoxCenter:p,viewport:o.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return v?f:null}var b=Boolean(t[s.axis.line]<=n.page.borderBox.center[s.axis.line]),_=function(){var k=n.descriptor.index;return n.descriptor.id===i.descriptor.id||b?k:k+1}(),T=Ov(s.axis,i.displaceBy);return Zb({draggable:i,insideDestination:r,destination:s,viewport:o,displacedBy:T,last:Ng,index:_})},CCe=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,i=e.isOver,a=e.draggables,s=e.droppables,o=e.viewport,c=e.afterCritical,f=vCe({isMovingForward:t,pageBorderBoxCenter:n,source:i,droppables:s,viewport:o});if(!f)return null;var p=ep(f.descriptor.id,a),g=xCe({pageBorderBoxCenter:n,viewport:o,destination:f,insideDestination:p,afterCritical:c}),v=wCe({previousPageBorderBoxCenter:n,destination:f,draggable:r,draggables:a,moveRelativeTo:g,insideDestination:p,viewport:o,afterCritical:c});if(!v)return null;var b=z1({impact:v,draggable:r,droppable:f,draggables:a,afterCritical:c}),_=$k({pageBorderBoxCenter:b,draggable:r,viewport:o});return{clientSelection:_,impact:v,scrollJumpRequest:null}},Pa=function(e){var t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null},SCe=function(t,n){var r=Pa(t);return r?n[r]:null},ECe=function(e){var t=e.state,n=e.type,r=SCe(t.impact,t.dimensions.droppables),i=Boolean(r),a=t.dimensions.droppables[t.critical.droppable.id],s=r||a,o=s.axis.direction,c=o==="vertical"&&(n==="MOVE_UP"||n==="MOVE_DOWN")||o==="horizontal"&&(n==="MOVE_LEFT"||n==="MOVE_RIGHT");if(c&&!i)return null;var f=n==="MOVE_DOWN"||n==="MOVE_RIGHT",p=t.dimensions.draggables[t.critical.draggable.id],g=t.current.page.borderBoxCenter,v=t.dimensions,b=v.draggables,_=v.droppables;return c?gCe({isMovingForward:f,previousPageBorderBoxCenter:g,draggable:p,destination:s,draggables:b,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):CCe({isMovingForward:f,previousPageBorderBoxCenter:g,draggable:p,isOver:s,draggables:b,droppables:_,viewport:t.viewport,afterCritical:t.afterCritical})};function nd(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function y9(e){var t=is(e.top,e.bottom),n=is(e.left,e.right);return function(i){return t(i.y)&&n(i.x)}}function PCe(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function TCe(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,i=n.page.borderBox.center,a=r.map(function(s){var o=s.axis,c=Ad(s.axis.line,t.center[o.line],s.page.borderBox.center[o.crossAxisLine]);return{id:s.descriptor.id,distance:Ag(i,c)}}).sort(function(s,o){return o.distance-s.distance});return a[0]?a[0].id:null}function kCe(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,i=N1(r).filter(function(a){if(!a.isEnabled)return!1;var s=a.subject.active;if(!s||!PCe(t,s))return!1;if(y9(s)(t.center))return!0;var o=a.axis,c=s.center[o.crossAxisLine],f=t[o.crossAxisStart],p=t[o.crossAxisEnd],g=is(s[o.crossAxisStart],s[o.crossAxisEnd]),v=g(f),b=g(p);return!v&&!b?!0:v?f<c:p>c});return i.length?i.length===1?i[0].descriptor.id:TCe({pageBorderBox:t,draggable:n,candidates:i}):null}var x9=function(t,n){return ks(Dv(t,n))},ICe=function(e,t){var n=e.frame;return n?x9(t,n.scroll.diff.value):t};function b9(e){var t=e.displaced,n=e.id;return Boolean(t.visible[n]||t.invisible[n])}function MCe(e){var t=e.draggable,n=e.closest,r=e.inHomeList;return n?r&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}var RCe=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,i=e.insideDestination,a=e.last,s=e.viewport,o=e.afterCritical,c=r.axis,f=Ov(r.axis,n.displaceBy),p=f.value,g=t[c.start],v=t[c.end],b=F1(n,i),_=mc(b,function(k){var P=k.descriptor.id,M=k.page.borderBox.center[c.line],O=ac(P,o),N=b9({displaced:a,id:P});return O?N?v<=M:g<M-p:N?v<=M+p:g<M}),T=MCe({draggable:n,closest:_,inHomeList:tp(n,r)});return Zb({draggable:n,insideDestination:i,destination:r,viewport:s,last:a,displacedBy:f,index:T})},DCe=4,OCe=function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,i=e.destination,a=e.insideDestination,s=e.afterCritical;if(!i.isCombineEnabled)return null;var o=i.axis,c=Ov(i.axis,t.displaceBy),f=c.value,p=n[o.start],g=n[o.end],v=F1(t,a),b=mc(v,function(T){var k=T.descriptor.id,P=T.page.borderBox,M=P[o.size],O=M/DCe,N=ac(k,s),L=b9({displaced:r.displaced,id:k});return N?L?g>P[o.start]+O&&g<P[o.end]-O:p>P[o.start]-f+O&&p<P[o.end]-f-O:L?g>P[o.start]+f+O&&g<P[o.end]+f-O:p>P[o.start]+O&&p<P[o.end]-O});if(!b)return null;var _={displacedBy:c,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:b.descriptor.id,droppableId:i.descriptor.id}}};return _},_9=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,i=e.droppables,a=e.previousImpact,s=e.viewport,o=e.afterCritical,c=x9(n.page.borderBox,t),f=kCe({pageBorderBox:c,draggable:n,droppables:i});if(!f)return Gwe;var p=i[f],g=ep(p.descriptor.id,r),v=ICe(p,c);return OCe({pageBorderBoxWithDroppableScroll:v,draggable:n,previousImpact:a,destination:p,insideDestination:g,afterCritical:o})||RCe({pageBorderBoxWithDroppableScroll:v,draggable:n,destination:p,insideDestination:g,last:a.displaced,viewport:s,afterCritical:o})},Bk=function(e,t){var n;return Be({},e,(n={},n[t.descriptor.id]=t,n))},ACe=function(t){var n=t.previousImpact,r=t.impact,i=t.droppables,a=Pa(n),s=Pa(r);if(!a||a===s)return i;var o=i[a];if(!o.subject.withPlaceholder)return i;var c=_Ce(o);return Bk(i,c)},NCe=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,i=e.previousImpact,a=e.impact,s=ACe({previousImpact:i,impact:a,droppables:r}),o=Pa(a);if(!o)return s;var c=r[o];if(tp(t,c)||c.subject.withPlaceholder)return s;var f=v9(c,t,n);return Bk(s,f)},Qm=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,i=e.viewport,a=e.impact,s=e.scrollJumpRequest,o=i||t.viewport,c=r||t.dimensions,f=n||t.current.client.selection,p=wa(f,t.initial.client.selection),g={offset:p,selection:f,borderBoxCenter:co(t.initial.client.borderBoxCenter,p)},v={selection:co(g.selection,o.scroll.current),borderBoxCenter:co(g.borderBoxCenter,o.scroll.current),offset:co(g.offset,o.scroll.diff.value)},b={client:g,page:v};if(t.phase==="COLLECTING")return Be({phase:"COLLECTING"},t,{dimensions:c,viewport:o,current:b});var _=c.draggables[t.critical.draggable.id],T=a||_9({pageOffset:v.offset,draggable:_,draggables:c.draggables,droppables:c.droppables,previousImpact:t.impact,viewport:o,afterCritical:t.afterCritical}),k=NCe({draggable:_,impact:T,previousImpact:t.impact,draggables:c.draggables,droppables:c.droppables}),P=Be({},t,{current:b,dimensions:{draggables:c.draggables,droppables:k},impact:T,viewport:o,scrollJumpRequest:s||null,forceShouldAnimate:s?!1:null});return P};function LCe(e,t){return e.map(function(n){return t[n]})}var w9=function(e){var t=e.impact,n=e.viewport,r=e.draggables,i=e.destination,a=e.forceShouldAnimate,s=t.displaced,o=LCe(s.all,r),c=Lg({afterDragging:o,destination:i,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:a,last:s});return Be({},t,{displaced:c})},C9=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,a=e.viewport,s=e.afterCritical,o=z1({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:s});return $k({pageBorderBoxCenter:o,draggable:n,viewport:a})},S9=function(e){var t=e.state,n=e.dimensions,r=e.viewport;t.movementMode!=="SNAP"&&rn(!1);var i=t.impact,a=r||t.viewport,s=n||t.dimensions,o=s.draggables,c=s.droppables,f=o[t.critical.draggable.id],p=Pa(i);p||rn(!1);var g=c[p],v=w9({impact:i,viewport:a,destination:g,draggables:o}),b=C9({impact:v,draggable:f,droppable:g,draggables:o,viewport:a,afterCritical:t.afterCritical});return Qm({impact:v,clientSelection:b,state:t,dimensions:s,viewport:a})},FCe=function(e){return{index:e.index,droppableId:e.droppableId}},E9=function(e){var t=e.draggable,n=e.home,r=e.draggables,i=e.viewport,a=Ov(n.axis,t.displaceBy),s=ep(n.descriptor.id,r),o=s.indexOf(t);o===-1&&rn(!1);var c=s.slice(o+1),f=c.reduce(function(b,_){return b[_.descriptor.id]=!0,b},{}),p={inVirtualList:n.descriptor.mode==="virtual",displacedBy:a,effected:f},g=Lg({afterDragging:c,destination:n,displacedBy:a,last:null,viewport:i.frame,forceShouldAnimate:!1}),v={displaced:g,displacedBy:a,at:{type:"REORDER",destination:FCe(t.descriptor)}};return{impact:v,afterCritical:p}},zCe=function(e,t){return{draggables:e.draggables,droppables:Bk(e.droppables,t)}},$Ce=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,i=Hb(t.client,n),a=Kb(i,r),s=Be({},t,{placeholder:Be({},t.placeholder,{client:i}),client:i,page:a});return s},BCe=function(e){var t=e.frame;return t||rn(!1),t},VCe=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,i=r.scroll.diff.value;return t.map(function(a){var s=a.descriptor.droppableId,o=n[s],c=BCe(o),f=c.scroll.diff.value,p=co(i,f),g=$Ce({draggable:a,offset:p,initialWindowScroll:r.scroll.initial});return g})},UCe=function(e){var t=e.state,n=e.published,r=n.modified.map(function(O){var N=t.dimensions.droppables[O.droppableId],L=Ok(N,O.scroll);return L}),i=Be({},t.dimensions.droppables,{},s9(r)),a=l9(VCe({additions:n.additions,updatedDroppables:i,viewport:t.viewport})),s=Be({},t.dimensions.draggables,{},a);n.removals.forEach(function(O){delete s[O]});var o={droppables:i,draggables:s},c=Pa(t.impact),f=c?o.droppables[c]:null,p=o.draggables[t.critical.draggable.id],g=o.droppables[t.critical.droppable.id],v=E9({draggable:p,home:g,draggables:s,viewport:t.viewport}),b=v.impact,_=v.afterCritical,T=f&&f.isCombineEnabled?t.impact:b,k=_9({pageOffset:t.current.page.offset,draggable:o.draggables[t.critical.draggable.id],draggables:o.draggables,droppables:o.droppables,previousImpact:T,viewport:t.viewport,afterCritical:_}),P=Be({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:k,onLiftImpact:b,dimensions:o,afterCritical:_,forceShouldAnimate:!1});if(t.phase==="COLLECTING")return P;var M=Be({phase:"DROP_PENDING"},P,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1});return M},ME=function(t){return t.movementMode==="SNAP"},LS=function(t,n,r){var i=zCe(t.dimensions,n);return!ME(t)||r?Qm({state:t,dimensions:i}):S9({state:t,dimensions:i})};function FS(e){return e.isDragging&&e.movementMode==="SNAP"?Be({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var KN={phase:"IDLE",completed:null,shouldFlush:!1},jCe=function(e,t){if(e===void 0&&(e=KN),t.type==="FLUSH")return Be({},KN,{shouldFlush:!0});if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&rn(!1);var n=t.payload,r=n.critical,i=n.clientSelection,a=n.viewport,s=n.dimensions,o=n.movementMode,c=s.draggables[r.draggable.id],f=s.droppables[r.droppable.id],p={selection:i,borderBoxCenter:c.client.borderBox.center,offset:ro},g={client:p,page:{selection:co(p.selection,a.scroll.initial),borderBoxCenter:co(p.selection,a.scroll.initial),offset:co(p.selection,a.scroll.diff.value)}},v=N1(s.droppables).every(function(gt){return!gt.isFixedOnPage}),b=E9({draggable:c,home:f,draggables:s.draggables,viewport:a}),_=b.impact,T=b.afterCritical,k={phase:"DRAGGING",isDragging:!0,critical:r,movementMode:o,dimensions:s,initial:g,current:g,isWindowScrollAllowed:v,impact:_,afterCritical:T,onLiftImpact:_,viewport:a,scrollJumpRequest:null,forceShouldAnimate:null};return k}if(t.type==="COLLECTION_STARTING"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&rn(!1);var P=Be({phase:"COLLECTING"},e,{phase:"COLLECTING"});return P}if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||rn(!1),UCe({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;nd(e)||rn(!1);var M=t.payload.client;return ec(M,e.current.client.selection)?e:Qm({state:e,clientSelection:M,impact:ME(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return FS(e);nd(e)||rn(!1);var O=t.payload,N=O.id,L=O.newScroll,$=e.dimensions.droppables[N];if(!$)return e;var j=Ok($,L);return LS(e,j,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;nd(e)||rn(!1);var U=t.payload,G=U.id,Z=U.isEnabled,Q=e.dimensions.droppables[G];Q||rn(!1),Q.isEnabled===Z&&rn(!1);var J=Be({},Q,{isEnabled:Z});return LS(e,J,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;nd(e)||rn(!1);var re=t.payload,ne=re.id,ge=re.isCombineEnabled,ie=e.dimensions.droppables[ne];ie||rn(!1),ie.isCombineEnabled===ge&&rn(!1);var ue=Be({},ie,{isCombineEnabled:ge});return LS(e,ue,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;nd(e)||rn(!1),e.isWindowScrollAllowed||rn(!1);var oe=t.payload.newScroll;if(ec(e.viewport.scroll.current,oe))return FS(e);var me=p9(e.viewport,oe);return ME(e)?S9({state:e,viewport:me}):Qm({state:e,viewport:me})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!nd(e))return e;var Te=t.payload.maxScroll;if(ec(Te,e.viewport.scroll.max))return e;var we=Be({},e.viewport,{scroll:Be({},e.viewport.scroll,{max:Te})});return Be({phase:"DRAGGING"},e,{viewport:we})}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&rn(!1);var be=ECe({state:e,type:t.type});return be?Qm({state:e,impact:be.impact,clientSelection:be.clientSelection,scrollJumpRequest:be.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){var Re=t.payload.reason;e.phase!=="COLLECTING"&&rn(!1);var Ee=Be({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:Re});return Ee}if(t.type==="DROP_ANIMATE"){var Me=t.payload,Ae=Me.completed,Fe=Me.dropDuration,We=Me.newHomeClientOffset;e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||rn(!1);var je={phase:"DROP_ANIMATING",completed:Ae,dropDuration:Fe,newHomeClientOffset:We,dimensions:e.dimensions};return je}if(t.type==="DROP_COMPLETE"){var pt=t.payload.completed;return{phase:"IDLE",completed:pt,shouldFlush:!1}}return e},HCe=function(t){return{type:"BEFORE_INITIAL_CAPTURE",payload:t}},KCe=function(t){return{type:"LIFT",payload:t}},WCe=function(t){return{type:"INITIAL_PUBLISH",payload:t}},GCe=function(t){return{type:"PUBLISH_WHILE_DRAGGING",payload:t}},qCe=function(){return{type:"COLLECTION_STARTING",payload:null}},ZCe=function(t){return{type:"UPDATE_DROPPABLE_SCROLL",payload:t}},XCe=function(t){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:t}},YCe=function(t){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:t}},P9=function(t){return{type:"MOVE",payload:t}},QCe=function(t){return{type:"MOVE_BY_WINDOW_SCROLL",payload:t}},JCe=function(t){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:t}},eSe=function(){return{type:"MOVE_UP",payload:null}},tSe=function(){return{type:"MOVE_DOWN",payload:null}},nSe=function(){return{type:"MOVE_RIGHT",payload:null}},rSe=function(){return{type:"MOVE_LEFT",payload:null}},Vk=function(){return{type:"FLUSH",payload:null}},iSe=function(t){return{type:"DROP_ANIMATE",payload:t}},Uk=function(t){return{type:"DROP_COMPLETE",payload:t}},T9=function(t){return{type:"DROP",payload:t}},oSe=function(t){return{type:"DROP_PENDING",payload:t}},k9=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}},aSe=function(e){return function(t){var n=t.getState,r=t.dispatch;return function(i){return function(a){if(a.type!=="LIFT"){i(a);return}var s=a.payload,o=s.id,c=s.clientSelection,f=s.movementMode,p=n();p.phase==="DROP_ANIMATING"&&r(Uk({completed:p.completed})),n().phase!=="IDLE"&&rn(!1),r(Vk()),r(HCe({draggableId:o,movementMode:f}));var g={shouldPublishImmediately:f==="SNAP"},v={draggableId:o,scrollOptions:g},b=e.startPublishing(v),_=b.critical,T=b.dimensions,k=b.viewport;r(WCe({critical:_,dimensions:T,clientSelection:c,movementMode:f,viewport:k}))}}}},sSe=function(e){return function(){return function(t){return function(n){n.type==="INITIAL_PUBLISH"&&e.dragging(),n.type==="DROP_ANIMATE"&&e.dropping(n.payload.completed.result.reason),(n.type==="FLUSH"||n.type==="DROP_COMPLETE")&&e.resting(),t(n)}}}},jk={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},Fg={opacity:{drop:0,combining:.7},scale:{drop:.75}},Hk={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Hc=Hk.outOfTheWay+"s "+jk.outOfTheWay,Jm={fluid:"opacity "+Hc,snap:"transform "+Hc+", opacity "+Hc,drop:function(t){var n=t+"s "+jk.drop;return"transform "+n+", opacity "+n},outOfTheWay:"transform "+Hc,placeholder:"height "+Hc+", width "+Hc+", margin "+Hc},WN=function(t){return ec(t,ro)?null:"translate("+t.x+"px, "+t.y+"px)"},RE={moveTo:WN,drop:function(t,n){var r=WN(t);return r?n?r+" scale("+Fg.scale.drop+")":r:null}},DE=Hk.minDropTime,I9=Hk.maxDropTime,lSe=I9-DE,GN=1500,uSe=.6,cSe=function(e){var t=e.current,n=e.destination,r=e.reason,i=Ag(t,n);if(i<=0)return DE;if(i>=GN)return I9;var a=i/GN,s=DE+lSe*a,o=r==="CANCEL"?s*uSe:s;return Number(o.toFixed(2))},dSe=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,i=e.viewport,a=e.afterCritical,s=r.draggables,o=r.droppables,c=Pa(t),f=c?o[c]:null,p=o[n.descriptor.droppableId],g=C9({impact:t,draggable:n,draggables:s,afterCritical:a,droppable:f||p,viewport:i}),v=wa(g,n.client.borderBox.center);return v},fSe=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,i=e.home,a=e.viewport,s=e.onLiftImpact;if(!r.at||n!=="DROP"){var o=w9({draggables:t,impact:s,destination:i,viewport:a,forceShouldAnimate:!0});return{impact:o,didDropInsideDroppable:!1}}if(r.at.type==="REORDER")return{impact:r,didDropInsideDroppable:!0};var c=Be({},r,{displaced:Ng});return{impact:c,didDropInsideDroppable:!0}},hSe=function(e){var t=e.getState,n=e.dispatch;return function(r){return function(i){if(i.type!=="DROP"){r(i);return}var a=t(),s=i.payload.reason;if(a.phase==="COLLECTING"){n(oSe({reason:s}));return}if(a.phase!=="IDLE"){var o=a.phase==="DROP_PENDING"&&a.isWaiting;o&&rn(!1),a.phase==="DRAGGING"||a.phase==="DROP_PENDING"||rn(!1);var c=a.critical,f=a.dimensions,p=f.draggables[a.critical.draggable.id],g=fSe({reason:s,lastImpact:a.impact,afterCritical:a.afterCritical,onLiftImpact:a.onLiftImpact,home:a.dimensions.droppables[a.critical.droppable.id],viewport:a.viewport,draggables:a.dimensions.draggables}),v=g.impact,b=g.didDropInsideDroppable,_=b?Nk(v):null,T=b?L1(v):null,k={index:c.draggable.index,droppableId:c.droppable.id},P={draggableId:p.descriptor.id,type:p.descriptor.type,source:k,reason:s,mode:a.movementMode,destination:_,combine:T},M=dSe({impact:v,draggable:p,dimensions:f,viewport:a.viewport,afterCritical:a.afterCritical}),O={critical:a.critical,afterCritical:a.afterCritical,result:P,impact:v},N=!ec(a.current.client.offset,M)||Boolean(P.combine);if(!N){n(Uk({completed:O}));return}var L=cSe({current:a.current.client.offset,destination:M,reason:s}),$={newHomeClientOffset:M,dropDuration:L,completed:O};n(iSe($))}}}},M9=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function pSe(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(n){n.target!==window&&n.target!==window.document||e()}}}function mSe(e){var t=e.onWindowScroll;function n(){t(M9())}var r=Og(n),i=pSe(r),a=Ju;function s(){return a!==Ju}function o(){s()&&rn(!1),a=ts(window,[i])}function c(){s()||rn(!1),r.cancel(),a(),a=Ju}return{start:o,stop:c,isActive:s}}var gSe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},vSe=function(e){var t=mSe({onWindowScroll:function(r){e.dispatch(QCe({newScroll:r}))}});return function(n){return function(r){!t.isActive()&&r.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&gSe(r)&&t.stop(),n(r)}}},ySe=function(e){var t=!1,n=!1,r=setTimeout(function(){n=!0}),i=function(s){t||n||(t=!0,e(s),clearTimeout(r))};return i.wasCalled=function(){return t},i},xSe=function(){var e=[],t=function(a){var s=Ak(e,function(f){return f.timerId===a});s===-1&&rn(!1);var o=e.splice(s,1),c=o[0];c.callback()},n=function(a){var s=setTimeout(function(){return t(s)}),o={timerId:s,callback:a};e.push(o)},r=function(){if(!!e.length){var a=[].concat(e);e.length=0,a.forEach(function(s){clearTimeout(s.timerId),s.callback()})}};return{add:n,flush:r}},bSe=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},_Se=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},wSe=function(t,n){if(t===n)return!0;var r=t.draggable.id===n.draggable.id&&t.draggable.droppableId===n.draggable.droppableId&&t.draggable.type===n.draggable.type&&t.draggable.index===n.draggable.index,i=t.droppable.id===n.droppable.id&&t.droppable.type===n.droppable.type;return r&&i},hm=function(t,n){n()},k0=function(t,n){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:n}},zS=function(t,n,r,i){if(!t){r(i(n));return}var a=ySe(r),s={announce:a};t(n,s),a.wasCalled()||r(i(n))},CSe=function(e,t){var n=xSe(),r=null,i=function(v,b){r&&rn(!1),hm("onBeforeCapture",function(){var _=e().onBeforeCapture;if(_){var T={draggableId:v,mode:b};_(T)}})},a=function(v,b){r&&rn(!1),hm("onBeforeDragStart",function(){var _=e().onBeforeDragStart;_&&_(k0(v,b))})},s=function(v,b){r&&rn(!1);var _=k0(v,b);r={mode:b,lastCritical:v,lastLocation:_.source,lastCombine:null},n.add(function(){hm("onDragStart",function(){return zS(e().onDragStart,_,t,wx.onDragStart)})})},o=function(v,b){var _=Nk(b),T=L1(b);r||rn(!1);var k=!wSe(v,r.lastCritical);k&&(r.lastCritical=v);var P=!bSe(r.lastLocation,_);P&&(r.lastLocation=_);var M=!_Se(r.lastCombine,T);if(M&&(r.lastCombine=T),!(!k&&!P&&!M)){var O=Be({},k0(v,r.mode),{combine:T,destination:_});n.add(function(){hm("onDragUpdate",function(){return zS(e().onDragUpdate,O,t,wx.onDragUpdate)})})}},c=function(){r||rn(!1),n.flush()},f=function(v){r||rn(!1),r=null,hm("onDragEnd",function(){return zS(e().onDragEnd,v,t,wx.onDragEnd)})},p=function(){if(!!r){var v=Be({},k0(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});f(v)}};return{beforeCapture:i,beforeStart:a,start:s,update:o,flush:c,drop:f,abort:p}},SSe=function(e,t){var n=CSe(e,t);return function(r){return function(i){return function(a){if(a.type==="BEFORE_INITIAL_CAPTURE"){n.beforeCapture(a.payload.draggableId,a.payload.movementMode);return}if(a.type==="INITIAL_PUBLISH"){var s=a.payload.critical;n.beforeStart(s,a.payload.movementMode),i(a),n.start(s,a.payload.movementMode);return}if(a.type==="DROP_COMPLETE"){var o=a.payload.completed.result;n.flush(),i(a),n.drop(o);return}if(i(a),a.type==="FLUSH"){n.abort();return}var c=r.getState();c.phase==="DRAGGING"&&n.update(c.critical,c.impact)}}}},ESe=function(e){return function(t){return function(n){if(n.type!=="DROP_ANIMATION_FINISHED"){t(n);return}var r=e.getState();r.phase!=="DROP_ANIMATING"&&rn(!1),e.dispatch(Uk({completed:r.completed}))}}},PSe=function(e){var t=null,n=null;function r(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return function(i){return function(a){if((a.type==="FLUSH"||a.type==="DROP_COMPLETE"||a.type==="DROP_ANIMATION_FINISHED")&&r(),i(a),a.type==="DROP_ANIMATE"){var s={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var c=e.getState();c.phase==="DROP_ANIMATING"&&e.dispatch(k9())}};n=requestAnimationFrame(function(){n=null,t=ts(window,[s])})}}}},TSe=function(e){return function(){return function(t){return function(n){(n.type==="DROP_COMPLETE"||n.type==="FLUSH"||n.type==="DROP_ANIMATE")&&e.stopPublishing(),t(n)}}}},kSe=function(e){var t=!1;return function(){return function(n){return function(r){if(r.type==="INITIAL_PUBLISH"){t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),e.tryRestoreFocusRecorded();return}if(n(r),!!t){if(r.type==="FLUSH"){t=!1,e.tryRestoreFocusRecorded();return}if(r.type==="DROP_COMPLETE"){t=!1;var i=r.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}},ISe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},MSe=function(e){return function(t){return function(n){return function(r){if(ISe(r)){e.stop(),n(r);return}if(r.type==="INITIAL_PUBLISH"){n(r);var i=t.getState();i.phase!=="DRAGGING"&&rn(!1),e.start(i);return}n(r),e.scroll(t.getState())}}}},RSe=function(e){return function(t){return function(n){if(t(n),n.type==="PUBLISH_WHILE_DRAGGING"){var r=e.getState();r.phase==="DROP_PENDING"&&(r.isWaiting||e.dispatch(T9({reason:r.reason})))}}}},DSe=z7,OSe=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,r=e.styleMarshal,i=e.getResponders,a=e.announce,s=e.autoScroller;return F7(jCe,DSe(P1e(sSe(r),TSe(t),aSe(t),hSe,ESe,PSe,RSe,MSe(s),vSe,kSe(n),SSe(i,a))))},$S=function(){return{additions:{},removals:{},modified:{}}};function ASe(e){var t=e.registry,n=e.callbacks,r=$S(),i=null,a=function(){i||(n.collectionStarting(),i=requestAnimationFrame(function(){i=null;var p=r,g=p.additions,v=p.removals,b=p.modified,_=Object.keys(g).map(function(P){return t.draggable.getById(P).getDimension(ro)}).sort(function(P,M){return P.descriptor.index-M.descriptor.index}),T=Object.keys(b).map(function(P){var M=t.droppable.getById(P),O=M.callbacks.getScrollWhileDragging();return{droppableId:P,scroll:O}}),k={additions:_,removals:Object.keys(v),modified:T};r=$S(),n.publish(k)}))},s=function(p){var g=p.descriptor.id;r.additions[g]=p,r.modified[p.descriptor.droppableId]=!0,r.removals[g]&&delete r.removals[g],a()},o=function(p){var g=p.descriptor;r.removals[g.id]=!0,r.modified[g.droppableId]=!0,r.additions[g.id]&&delete r.additions[g.id],a()},c=function(){!i||(cancelAnimationFrame(i),i=null,r=$S())};return{add:s,remove:o,stop:c}}var R9=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,i=e.width,a=wa({x:n,y:t},{x:i,y:r}),s={x:Math.max(0,a.x),y:Math.max(0,a.y)};return s},D9=function(){var e=document.documentElement;return e||rn(!1),e},O9=function(){var e=D9(),t=R9({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},NSe=function(){var e=M9(),t=O9(),n=e.y,r=e.x,i=D9(),a=i.clientWidth,s=i.clientHeight,o=r+a,c=n+s,f=ks({top:n,left:r,right:o,bottom:c}),p={frame:f,scroll:{initial:e,current:e,max:t,diff:{value:ro,displacement:ro}}};return p},LSe=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry,i=NSe(),a=i.scroll.current,s=t.droppable,o=r.droppable.getAllByType(s.type).map(function(g){return g.callbacks.getDimensionAndWatchScroll(a,n)}),c=r.draggable.getAllByType(t.draggable.type).map(function(g){return g.getDimension(a)}),f={draggables:l9(c),droppables:s9(o)},p={dimensions:f,critical:t,viewport:i};return p};function qN(e,t,n){if(n.descriptor.id===t.id||n.descriptor.type!==t.type)return!1;var r=e.droppable.getById(n.descriptor.droppableId);return r.descriptor.mode==="virtual"}var FSe=function(e,t){var n=null,r=ASe({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=function(b,_){e.droppable.exists(b)||rn(!1),n&&t.updateDroppableIsEnabled({id:b,isEnabled:_})},a=function(b,_){!n||(e.droppable.exists(b)||rn(!1),t.updateDroppableIsCombineEnabled({id:b,isCombineEnabled:_}))},s=function(b,_){!n||(e.droppable.exists(b)||rn(!1),t.updateDroppableScroll({id:b,newScroll:_}))},o=function(b,_){!n||e.droppable.getById(b).callbacks.scroll(_)},c=function(){if(!!n){r.stop();var b=n.critical.droppable;e.droppable.getAllByType(b.type).forEach(function(_){return _.callbacks.dragStopped()}),n.unsubscribe(),n=null}},f=function(b){n||rn(!1);var _=n.critical.draggable;b.type==="ADDITION"&&qN(e,_,b.value)&&r.add(b.value),b.type==="REMOVAL"&&qN(e,_,b.value)&&r.remove(b.value)},p=function(b){n&&rn(!1);var _=e.draggable.getById(b.draggableId),T=e.droppable.getById(_.descriptor.droppableId),k={draggable:_.descriptor,droppable:T.descriptor},P=e.subscribe(f);return n={critical:k,unsubscribe:P},LSe({critical:k,registry:e,scrollOptions:b.scrollOptions})},g={updateDroppableIsEnabled:i,updateDroppableIsCombineEnabled:a,scrollDroppable:o,updateDroppableScroll:s,startPublishing:p,stopPublishing:c};return g},A9=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},zSe=function(e){window.scrollBy(e.x,e.y)},$Se=no(function(e){return N1(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),BSe=function(t,n){var r=mc($Se(n),function(i){return i.frame||rn(!1),y9(i.frame.pageMarginBox)(t)});return r},VSe=function(e){var t=e.center,n=e.destination,r=e.droppables;if(n){var i=r[n];return i.frame?i:null}var a=BSe(t,r);return a},tc={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},USe=function(e,t){var n=e[t.size]*tc.startFromPercentage,r=e[t.size]*tc.maxScrollAtPercentage,i={startScrollingFrom:n,maxScrollValueAt:r};return i},N9=function(e){var t=e.startOfRange,n=e.endOfRange,r=e.current,i=n-t;if(i===0)return 0;var a=r-t,s=a/i;return s},Kk=1,jSe=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return tc.maxPixelScroll;if(e===t.startScrollingFrom)return Kk;var n=N9({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=1-n,i=tc.maxPixelScroll*tc.ease(r);return Math.ceil(i)},ZN=tc.durationDampening.accelerateAt,XN=tc.durationDampening.stopDampeningAt,HSe=function(e,t){var n=t,r=XN,i=Date.now(),a=i-n;if(a>=XN)return e;if(a<ZN)return Kk;var s=N9({startOfRange:ZN,endOfRange:r,current:a}),o=e*tc.ease(s);return Math.ceil(o)},YN=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,i=e.shouldUseTimeDampening,a=jSe(t,n);return a===0?0:i?Math.max(HSe(a,r),Kk):a},QN=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,i=e.axis,a=e.shouldUseTimeDampening,s=USe(t,i),o=n[i.end]<n[i.start];return o?YN({distanceToEdge:n[i.end],thresholds:s,dragStartTime:r,shouldUseTimeDampening:a}):-1*YN({distanceToEdge:n[i.start],thresholds:s,dragStartTime:r,shouldUseTimeDampening:a})},KSe=function(e){var t=e.container,n=e.subject,r=e.proposedScroll,i=n.height>t.height,a=n.width>t.width;return!a&&!i?r:a&&i?null:{x:a?0:r.x,y:i?0:r.y}},WSe=o9(function(e){return e===0?0:e}),L9=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,i=e.center,a=e.shouldUseTimeDampening,s={top:i.y-n.top,right:n.right-i.x,bottom:n.bottom-i.y,left:i.x-n.left},o=QN({container:n,distanceToEdges:s,dragStartTime:t,axis:Lk,shouldUseTimeDampening:a}),c=QN({container:n,distanceToEdges:s,dragStartTime:t,axis:d9,shouldUseTimeDampening:a}),f=WSe({x:c,y:o});if(ec(f,ro))return null;var p=KSe({container:n,subject:r,proposedScroll:f});return p?ec(p,ro)?null:p:null},GSe=o9(function(e){return e===0?0:e>0?1:-1}),Wk=function(){var e=function(n,r){return n<0?n:n>r?n-r:0};return function(t){var n=t.current,r=t.max,i=t.change,a=co(n,i),s={x:e(a.x,r.x),y:e(a.y,r.y)};return ec(s,ro)?null:s}}(),F9=function(t){var n=t.max,r=t.current,i=t.change,a={x:Math.max(r.x,n.x),y:Math.max(r.y,n.y)},s=GSe(i),o=Wk({max:a,current:r,change:s});return!o||s.x!==0&&o.x===0||s.y!==0&&o.y===0},Gk=function(t,n){return F9({current:t.scroll.current,max:t.scroll.max,change:n})},qSe=function(t,n){if(!Gk(t,n))return null;var r=t.scroll.max,i=t.scroll.current;return Wk({current:i,max:r,change:n})},qk=function(t,n){var r=t.frame;return r?F9({current:r.scroll.current,max:r.scroll.max,change:n}):!1},ZSe=function(t,n){var r=t.frame;return!r||!qk(t,n)?null:Wk({current:r.scroll.current,max:r.scroll.max,change:n})},XSe=function(e){var t=e.viewport,n=e.subject,r=e.center,i=e.dragStartTime,a=e.shouldUseTimeDampening,s=L9({dragStartTime:i,container:t.frame,subject:n,center:r,shouldUseTimeDampening:a});return s&&Gk(t,s)?s:null},YSe=function(e){var t=e.droppable,n=e.subject,r=e.center,i=e.dragStartTime,a=e.shouldUseTimeDampening,s=t.frame;if(!s)return null;var o=L9({dragStartTime:i,container:s.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:a});return o&&qk(t,o)?o:null},JN=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,i=e.scrollWindow,a=e.scrollDroppable,s=t.current.page.borderBoxCenter,o=t.dimensions.draggables[t.critical.draggable.id],c=o.page.marginBox;if(t.isWindowScrollAllowed){var f=t.viewport,p=XSe({dragStartTime:n,viewport:f,subject:c,center:s,shouldUseTimeDampening:r});if(p){i(p);return}}var g=VSe({center:s,destination:Pa(t.impact),droppables:t.dimensions.droppables});if(!!g){var v=YSe({dragStartTime:n,droppable:g,subject:c,center:s,shouldUseTimeDampening:r});v&&a(g.descriptor.id,v)}},QSe=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=Og(t),i=Og(n),a=null,s=function(p){a||rn(!1);var g=a,v=g.shouldUseTimeDampening,b=g.dragStartTime;JN({state:p,scrollWindow:r,scrollDroppable:i,dragStartTime:b,shouldUseTimeDampening:v})},o=function(p){a&&rn(!1);var g=Date.now(),v=!1,b=function(){v=!0};JN({state:p,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:b,scrollDroppable:b}),a={dragStartTime:g,shouldUseTimeDampening:v},v&&s(p)},c=function(){!a||(r.cancel(),i.cancel(),a=null)};return{start:o,stop:c,scroll:s}},JSe=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,i=function(f,p){var g=co(f.current.client.selection,p);t({client:g})},a=function(f,p){if(!qk(f,p))return p;var g=ZSe(f,p);if(!g)return n(f.descriptor.id,p),null;var v=wa(p,g);n(f.descriptor.id,v);var b=wa(p,v);return b},s=function(f,p,g){if(!f||!Gk(p,g))return g;var v=qSe(p,g);if(!v)return r(g),null;var b=wa(g,v);r(b);var _=wa(g,b);return _},o=function(f){var p=f.scrollJumpRequest;if(!!p){var g=Pa(f.impact);g||rn(!1);var v=a(f.dimensions.droppables[g],p);if(!!v){var b=f.viewport,_=s(f.isWindowScrollAllowed,b,v);!_||i(f,_)}}};return o},e2e=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,i=QSe({scrollWindow:n,scrollDroppable:t}),a=JSe({move:r,scrollWindow:n,scrollDroppable:t}),s=function(f){if(f.phase==="DRAGGING"){if(f.movementMode==="FLUID"){i.scroll(f);return}!f.scrollJumpRequest||a(f)}},o={scroll:s,start:i.start,stop:i.stop};return o},kh="data-rbd",Ih=function(){var e=kh+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),OE=function(){var e=kh+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),t2e=function(){var e=kh+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),eL={contextId:kh+"-scroll-container-context-id"},n2e=function(t){return function(n){return"["+n+'="'+t+'"]'}},pm=function(t,n){return t.map(function(r){var i=r.styles[n];return i?r.selector+" { "+i+" }":""}).join(" ")},r2e="pointer-events: none;",i2e=function(e){var t=n2e(e),n=function(){var o=`
cursor: -webkit-grab;
cursor: grab;
`;return{selector:t(Ih.contextId),styles:{always:`
-webkit-touch-callout: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
touch-action: manipulation;
`,resting:o,dragging:r2e,dropAnimating:o}}}(),r=function(){var o=`
transition: `+Jm.outOfTheWay+`;
`;return{selector:t(OE.contextId),styles:{dragging:o,dropAnimating:o,userCancel:o}}}(),i={selector:t(t2e.contextId),styles:{always:"overflow-anchor: none;"}},a={selector:"body",styles:{dragging:`
cursor: grabbing;
cursor: -webkit-grabbing;
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
overflow-anchor: none;
`}},s=[r,n,i,a];return{always:pm(s,"always"),resting:pm(s,"resting"),dragging:pm(s,"dragging"),dropAnimating:pm(s,"dropAnimating"),userCancel:pm(s,"userCancel")}},Ta=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?E.exports.useLayoutEffect:E.exports.useEffect,BS=function(){var t=document.querySelector("head");return t||rn(!1),t},tL=function(t){var n=document.createElement("style");return t&&n.setAttribute("nonce",t),n.type="text/css",n};function o2e(e,t){var n=vr(function(){return i2e(e)},[e]),r=E.exports.useRef(null),i=E.exports.useRef(null),a=On(no(function(g){var v=i.current;v||rn(!1),v.textContent=g}),[]),s=On(function(g){var v=r.current;v||rn(!1),v.textContent=g},[]);Ta(function(){!r.current&&!i.current||rn(!1);var g=tL(t),v=tL(t);return r.current=g,i.current=v,g.setAttribute(kh+"-always",e),v.setAttribute(kh+"-dynamic",e),BS().appendChild(g),BS().appendChild(v),s(n.always),a(n.resting),function(){var b=function(T){var k=T.current;k||rn(!1),BS().removeChild(k),T.current=null};b(r),b(i)}},[t,s,a,n.always,n.resting,e]);var o=On(function(){return a(n.dragging)},[a,n.dragging]),c=On(function(g){if(g==="DROP"){a(n.dropAnimating);return}a(n.userCancel)},[a,n.dropAnimating,n.userCancel]),f=On(function(){!i.current||a(n.resting)},[a,n.resting]),p=vr(function(){return{dragging:o,dropping:c,resting:f}},[o,c,f]);return p}var z9=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function $1(e){return e instanceof z9(e).HTMLElement}function a2e(e,t){var n="["+Ih.contextId+'="'+e+'"]',r=a9(document.querySelectorAll(n));if(!r.length)return null;var i=mc(r,function(a){return a.getAttribute(Ih.draggableId)===t});return!i||!$1(i)?null:i}function s2e(e){var t=E.exports.useRef({}),n=E.exports.useRef(null),r=E.exports.useRef(null),i=E.exports.useRef(!1),a=On(function(v,b){var _={id:v,focus:b};return t.current[v]=_,function(){var k=t.current,P=k[v];P!==_&&delete k[v]}},[]),s=On(function(v){var b=a2e(e,v);b&&b!==document.activeElement&&b.focus()},[e]),o=On(function(v,b){n.current===v&&(n.current=b)},[]),c=On(function(){r.current||!i.current||(r.current=requestAnimationFrame(function(){r.current=null;var v=n.current;v&&s(v)}))},[s]),f=On(function(v){n.current=null;var b=document.activeElement;!b||b.getAttribute(Ih.draggableId)===v&&(n.current=v)},[]);Ta(function(){return i.current=!0,function(){i.current=!1;var v=r.current;v&&cancelAnimationFrame(v)}},[]);var p=vr(function(){return{register:a,tryRecordFocus:f,tryRestoreFocusRecorded:c,tryShiftRecord:o}},[a,f,c,o]);return p}function l2e(){var e={draggables:{},droppables:{}},t=[];function n(g){return t.push(g),function(){var b=t.indexOf(g);b!==-1&&t.splice(b,1)}}function r(g){t.length&&t.forEach(function(v){return v(g)})}function i(g){return e.draggables[g]||null}function a(g){var v=i(g);return v||rn(!1),v}var s={register:function(v){e.draggables[v.descriptor.id]=v,r({type:"ADDITION",value:v})},update:function(v,b){var _=e.draggables[b.descriptor.id];!_||_.uniqueId===v.uniqueId&&(delete e.draggables[b.descriptor.id],e.draggables[v.descriptor.id]=v)},unregister:function(v){var b=v.descriptor.id,_=i(b);!_||v.uniqueId===_.uniqueId&&(delete e.draggables[b],r({type:"REMOVAL",value:v}))},getById:a,findById:i,exists:function(v){return Boolean(i(v))},getAllByType:function(v){return qb(e.draggables).filter(function(b){return b.descriptor.type===v})}};function o(g){return e.droppables[g]||null}function c(g){var v=o(g);return v||rn(!1),v}var f={register:function(v){e.droppables[v.descriptor.id]=v},unregister:function(v){var b=o(v.descriptor.id);!b||v.uniqueId===b.uniqueId&&delete e.droppables[v.descriptor.id]},getById:c,findById:o,exists:function(v){return Boolean(o(v))},getAllByType:function(v){return qb(e.droppables).filter(function(b){return b.descriptor.type===v})}};function p(){e.draggables={},e.droppables={},t.length=0}return{draggable:s,droppable:f,subscribe:n,clean:p}}function u2e(){var e=vr(l2e,[]);return E.exports.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var Zk=Un.createContext(null),Xb=function(){var e=document.body;return e||rn(!1),e},c2e={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},d2e=function(t){return"rbd-announcement-"+t};function f2e(e){var t=vr(function(){return d2e(e)},[e]),n=E.exports.useRef(null);E.exports.useEffect(function(){var a=document.createElement("div");return n.current=a,a.id=t,a.setAttribute("aria-live","assertive"),a.setAttribute("aria-atomic","true"),Be(a.style,c2e),Xb().appendChild(a),function(){setTimeout(function(){var c=Xb();c.contains(a)&&c.removeChild(a),a===n.current&&(n.current=null)})}},[t]);var r=On(function(i){var a=n.current;if(a){a.textContent=i;return}},[]);return r}var h2e=0,p2e={separator:"::"};function Xk(e,t){return t===void 0&&(t=p2e),vr(function(){return""+e+t.separator+h2e++},[t.separator,e])}function m2e(e){var t=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+t+"-"+n}function g2e(e){var t=e.contextId,n=e.text,r=Xk("hidden-text",{separator:"-"}),i=vr(function(){return m2e({contextId:t,uniqueId:r})},[r,t]);return E.exports.useEffect(function(){var s=document.createElement("div");return s.id=i,s.textContent=n,s.style.display="none",Xb().appendChild(s),function(){var c=Xb();c.contains(s)&&c.removeChild(s)}},[i,n]),i}var B1=Un.createContext(null);function $9(e){var t=E.exports.useRef(e);return E.exports.useEffect(function(){t.current=e}),t}function v2e(){var e=null;function t(){return Boolean(e)}function n(s){return s===e}function r(s){e&&rn(!1);var o={abandon:s};return e=o,o}function i(){e||rn(!1),e=null}function a(){e&&(e.abandon(),i())}return{isClaimed:t,isActive:n,claim:r,release:i,tryAbandon:a}}var y2e=9,x2e=13,Yk=27,B9=32,b2e=33,_2e=34,w2e=35,C2e=36,S2e=37,E2e=38,P2e=39,T2e=40,I0,k2e=(I0={},I0[x2e]=!0,I0[y2e]=!0,I0),V9=function(e){k2e[e.keyCode]&&e.preventDefault()},V1=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],n=mc(t,function(r){return"on"+r in document});return n||e}(),U9=0,nL=5;function I2e(e,t){return Math.abs(t.x-e.x)>=nL||Math.abs(t.y-e.y)>=nL}var rL={type:"IDLE"};function M2e(e){var t=e.cancel,n=e.completed,r=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(s){var o=s.button,c=s.clientX,f=s.clientY;if(o===U9){var p={x:c,y:f},g=r();if(g.type==="DRAGGING"){s.preventDefault(),g.actions.move(p);return}g.type!=="PENDING"&&rn(!1);var v=g.point;if(!!I2e(v,p)){s.preventDefault();var b=g.actions.fluidLift(p);i({type:"DRAGGING",actions:b})}}}},{eventName:"mouseup",fn:function(s){var o=r();if(o.type!=="DRAGGING"){t();return}s.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"mousedown",fn:function(s){r().type==="DRAGGING"&&s.preventDefault(),t()}},{eventName:"keydown",fn:function(s){var o=r();if(o.type==="PENDING"){t();return}if(s.keyCode===Yk){s.preventDefault(),t();return}V9(s)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){r().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(s){var o=r();if(o.type==="IDLE"&&rn(!1),o.actions.shouldRespectForcePress()){t();return}s.preventDefault()}},{eventName:V1,fn:t}]}function R2e(e){var t=E.exports.useRef(rL),n=E.exports.useRef(Ju),r=vr(function(){return{eventName:"mousedown",fn:function(g){if(!g.defaultPrevented&&g.button===U9&&!(g.ctrlKey||g.metaKey||g.shiftKey||g.altKey)){var v=e.findClosestDraggableId(g);if(!!v){var b=e.tryGetLock(v,s,{sourceEvent:g});if(!!b){g.preventDefault();var _={x:g.clientX,y:g.clientY};n.current(),f(b,_)}}}}}},[e]),i=vr(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(g){if(!g.defaultPrevented){var v=e.findClosestDraggableId(g);if(!!v){var b=e.findOptionsForDraggable(v);!b||b.shouldRespectForcePress||!e.canGetLock(v)||g.preventDefault()}}}}},[e]),a=On(function(){var g={passive:!1,capture:!0};n.current=ts(window,[i,r],g)},[i,r]),s=On(function(){var p=t.current;p.type!=="IDLE"&&(t.current=rL,n.current(),a())},[a]),o=On(function(){var p=t.current;s(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[s]),c=On(function(){var g={capture:!0,passive:!1},v=M2e({cancel:o,completed:s,getPhase:function(){return t.current},setPhase:function(_){t.current=_}});n.current=ts(window,v,g)},[o,s]),f=On(function(g,v){t.current.type!=="IDLE"&&rn(!1),t.current={type:"PENDING",point:v,actions:g},c()},[c]);Ta(function(){return a(),function(){n.current()}},[a])}var If;function D2e(){}var O2e=(If={},If[_2e]=!0,If[b2e]=!0,If[C2e]=!0,If[w2e]=!0,If);function A2e(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:function(a){if(a.keyCode===Yk){a.preventDefault(),n();return}if(a.keyCode===B9){a.preventDefault(),r();return}if(a.keyCode===T2e){a.preventDefault(),e.moveDown();return}if(a.keyCode===E2e){a.preventDefault(),e.moveUp();return}if(a.keyCode===P2e){a.preventDefault(),e.moveRight();return}if(a.keyCode===S2e){a.preventDefault(),e.moveLeft();return}if(O2e[a.keyCode]){a.preventDefault();return}V9(a)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:V1,fn:n}]}function N2e(e){var t=E.exports.useRef(D2e),n=vr(function(){return{eventName:"keydown",fn:function(a){if(a.defaultPrevented||a.keyCode!==B9)return;var s=e.findClosestDraggableId(a);if(!s)return;var o=e.tryGetLock(s,p,{sourceEvent:a});if(!o)return;a.preventDefault();var c=!0,f=o.snapLift();t.current();function p(){c||rn(!1),c=!1,t.current(),r()}t.current=ts(window,A2e(f,p),{capture:!0,passive:!1})}}},[e]),r=On(function(){var a={passive:!1,capture:!0};t.current=ts(window,[n],a)},[n]);Ta(function(){return r(),function(){t.current()}},[r])}var VS={type:"IDLE"},L2e=120,F2e=.15;function z2e(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(i){i.preventDefault()}},{eventName:"keydown",fn:function(i){if(n().type!=="DRAGGING"){t();return}i.keyCode===Yk&&i.preventDefault(),t()}},{eventName:V1,fn:t}]}function $2e(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(a){var s=r();if(s.type!=="DRAGGING"){t();return}s.hasMoved=!0;var o=a.touches[0],c=o.clientX,f=o.clientY,p={x:c,y:f};a.preventDefault(),s.actions.move(p)}},{eventName:"touchend",fn:function(a){var s=r();if(s.type!=="DRAGGING"){t();return}a.preventDefault(),s.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"touchcancel",fn:function(a){if(r().type!=="DRAGGING"){t();return}a.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(a){var s=r();s.type==="IDLE"&&rn(!1);var o=a.touches[0];if(!!o){var c=o.force>=F2e;if(!!c){var f=s.actions.shouldRespectForcePress();if(s.type==="PENDING"){f&&t();return}if(f){if(s.hasMoved){a.preventDefault();return}t();return}a.preventDefault()}}}},{eventName:V1,fn:t}]}function B2e(e){var t=E.exports.useRef(VS),n=E.exports.useRef(Ju),r=On(function(){return t.current},[]),i=On(function(b){t.current=b},[]),a=vr(function(){return{eventName:"touchstart",fn:function(b){if(!b.defaultPrevented){var _=e.findClosestDraggableId(b);if(!!_){var T=e.tryGetLock(_,o,{sourceEvent:b});if(!!T){var k=b.touches[0],P=k.clientX,M=k.clientY,O={x:P,y:M};n.current(),g(T,O)}}}}}},[e]),s=On(function(){var b={capture:!0,passive:!1};n.current=ts(window,[a],b)},[a]),o=On(function(){var v=t.current;v.type!=="IDLE"&&(v.type==="PENDING"&&clearTimeout(v.longPressTimerId),i(VS),n.current(),s())},[s,i]),c=On(function(){var v=t.current;o(),v.type==="DRAGGING"&&v.actions.cancel({shouldBlockNextClick:!0}),v.type==="PENDING"&&v.actions.abort()},[o]),f=On(function(){var b={capture:!0,passive:!1},_={cancel:c,completed:o,getPhase:r},T=ts(window,$2e(_),b),k=ts(window,z2e(_),b);n.current=function(){T(),k()}},[c,r,o]),p=On(function(){var b=r();b.type!=="PENDING"&&rn(!1);var _=b.actions.fluidLift(b.point);i({type:"DRAGGING",actions:_,hasMoved:!1})},[r,i]),g=On(function(b,_){r().type!=="IDLE"&&rn(!1);var T=setTimeout(p,L2e);i({type:"PENDING",point:_,actions:b,longPressTimerId:T}),f()},[f,r,i,p]);Ta(function(){return s(),function(){n.current();var _=r();_.type==="PENDING"&&(clearTimeout(_.longPressTimerId),i(VS))}},[r,s,i]),Ta(function(){var b=ts(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return b},[])}var V2e={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function j9(e,t){if(t==null)return!1;var n=Boolean(V2e[t.tagName.toLowerCase()]);if(n)return!0;var r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:j9(e,t.parentElement)}function U2e(e,t){var n=t.target;return $1(n)?j9(e,n):!1}var j2e=function(e){return ks(e.getBoundingClientRect()).center};function H2e(e){return e instanceof z9(e).Element}var K2e=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],n=mc(t,function(r){return r in Element.prototype});return n||e}();function H9(e,t){return e==null?null:e[K2e](t)?e:H9(e.parentElement,t)}function W2e(e,t){return e.closest?e.closest(t):H9(e,t)}function G2e(e){return"["+Ih.contextId+'="'+e+'"]'}function q2e(e,t){var n=t.target;if(!H2e(n))return null;var r=G2e(e),i=W2e(n,r);return!i||!$1(i)?null:i}function Z2e(e,t){var n=q2e(e,t);return n?n.getAttribute(Ih.draggableId):null}function X2e(e,t){var n="["+OE.contextId+'="'+e+'"]',r=a9(document.querySelectorAll(n)),i=mc(r,function(a){return a.getAttribute(OE.id)===t});return!i||!$1(i)?null:i}function Y2e(e){e.preventDefault()}function M0(e){var t=e.expected,n=e.phase,r=e.isLockActive;return e.shouldWarn,!(!r()||t!==n)}function K9(e){var t=e.lockAPI,n=e.store,r=e.registry,i=e.draggableId;if(t.isClaimed())return!1;var a=r.draggable.findById(i);return!(!a||!a.options.isEnabled||!A9(n.getState(),i))}function Q2e(e){var t=e.lockAPI,n=e.contextId,r=e.store,i=e.registry,a=e.draggableId,s=e.forceSensorStop,o=e.sourceEvent,c=K9({lockAPI:t,store:r,registry:i,draggableId:a});if(!c)return null;var f=i.draggable.getById(a),p=X2e(n,f.descriptor.id);if(!p||o&&!f.options.canDragInteractiveElements&&U2e(p,o))return null;var g=t.claim(s||Ju),v="PRE_DRAG";function b(){return f.options.shouldRespectForcePress}function _(){return t.isActive(g)}function T($,j){M0({expected:$,phase:v,isLockActive:_,shouldWarn:!0})&&r.dispatch(j())}var k=T.bind(null,"DRAGGING");function P($){function j(){t.release(),v="COMPLETED"}v!=="PRE_DRAG"&&(j(),v!=="PRE_DRAG"&&rn(!1)),r.dispatch(KCe($.liftActionArgs)),v="DRAGGING";function U(G,Z){if(Z===void 0&&(Z={shouldBlockNextClick:!1}),$.cleanup(),Z.shouldBlockNextClick){var Q=ts(window,[{eventName:"click",fn:Y2e,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(Q)}j(),r.dispatch(T9({reason:G}))}return Be({isActive:function(){return M0({expected:"DRAGGING",phase:v,isLockActive:_,shouldWarn:!1})},shouldRespectForcePress:b,drop:function(Z){return U("DROP",Z)},cancel:function(Z){return U("CANCEL",Z)}},$.actions)}function M($){var j=Og(function(G){k(function(){return P9({client:G})})}),U=P({liftActionArgs:{id:a,clientSelection:$,movementMode:"FLUID"},cleanup:function(){return j.cancel()},actions:{move:j}});return Be({},U,{move:j})}function O(){var $={moveUp:function(){return k(eSe)},moveRight:function(){return k(nSe)},moveDown:function(){return k(tSe)},moveLeft:function(){return k(rSe)}};return P({liftActionArgs:{id:a,clientSelection:j2e(p),movementMode:"SNAP"},cleanup:Ju,actions:$})}function N(){var $=M0({expected:"PRE_DRAG",phase:v,isLockActive:_,shouldWarn:!0});$&&t.release()}var L={isActive:function(){return M0({expected:"PRE_DRAG",phase:v,isLockActive:_,shouldWarn:!1})},shouldRespectForcePress:b,fluidLift:M,snapLift:O,abort:N};return L}var J2e=[R2e,N2e,B2e];function e4e(e){var t=e.contextId,n=e.store,r=e.registry,i=e.customSensors,a=e.enableDefaultSensors,s=[].concat(a?J2e:[],i||[]),o=E.exports.useState(function(){return v2e()})[0],c=On(function(M,O){M.isDragging&&!O.isDragging&&o.tryAbandon()},[o]);Ta(function(){var M=n.getState(),O=n.subscribe(function(){var N=n.getState();c(M,N),M=N});return O},[o,n,c]),Ta(function(){return o.tryAbandon},[o.tryAbandon]);for(var f=On(function(P){return K9({lockAPI:o,registry:r,store:n,draggableId:P})},[o,r,n]),p=On(function(P,M,O){return Q2e({lockAPI:o,registry:r,contextId:t,store:n,draggableId:P,forceSensorStop:M,sourceEvent:O&&O.sourceEvent?O.sourceEvent:null})},[t,o,r,n]),g=On(function(P){return Z2e(t,P)},[t]),v=On(function(P){var M=r.draggable.findById(P);return M?M.options:null},[r.draggable]),b=On(function(){!o.isClaimed()||(o.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(Vk()))},[o,n]),_=On(o.isClaimed,[o]),T=vr(function(){return{canGetLock:f,tryGetLock:p,findClosestDraggableId:g,findOptionsForDraggable:v,tryReleaseLock:b,isLockClaimed:_}},[f,p,g,v,b,_]),k=0;k<s.length;k++)s[k](T)}var t4e=function(t){return{onBeforeCapture:t.onBeforeCapture,onBeforeDragStart:t.onBeforeDragStart,onDragStart:t.onDragStart,onDragEnd:t.onDragEnd,onDragUpdate:t.onDragUpdate}};function mm(e){return e.current||rn(!1),e.current}function n4e(e){var t=e.contextId,n=e.setCallbacks,r=e.sensors,i=e.nonce,a=e.dragHandleUsageInstructions,s=E.exports.useRef(null),o=$9(e),c=On(function(){return t4e(o.current)},[o]),f=f2e(t),p=g2e({contextId:t,text:a}),g=o2e(t,i),v=On(function(G){mm(s).dispatch(G)},[]),b=vr(function(){return PN({publishWhileDragging:GCe,updateDroppableScroll:ZCe,updateDroppableIsEnabled:XCe,updateDroppableIsCombineEnabled:YCe,collectionStarting:qCe},v)},[v]),_=u2e(),T=vr(function(){return FSe(_,b)},[_,b]),k=vr(function(){return e2e(Be({scrollWindow:zSe,scrollDroppable:T.scrollDroppable},PN({move:P9},v)))},[T.scrollDroppable,v]),P=s2e(t),M=vr(function(){return OSe({announce:f,autoScroller:k,dimensionMarshal:T,focusMarshal:P,getResponders:c,styleMarshal:g})},[f,k,T,P,c,g]);s.current=M;var O=On(function(){var G=mm(s),Z=G.getState();Z.phase!=="IDLE"&&G.dispatch(Vk())},[]),N=On(function(){var G=mm(s).getState();return G.isDragging||G.phase==="DROP_ANIMATING"},[]),L=vr(function(){return{isDragging:N,tryAbort:O}},[N,O]);n(L);var $=On(function(G){return A9(mm(s).getState(),G)},[]),j=On(function(){return nd(mm(s).getState())},[]),U=vr(function(){return{marshal:T,focus:P,contextId:t,canLift:$,isMovementAllowed:j,dragHandleUsageInstructionsId:p,registry:_}},[t,T,p,P,$,j,_]);return e4e({contextId:t,store:M,registry:_,customSensors:r,enableDefaultSensors:e.enableDefaultSensors!==!1}),E.exports.useEffect(function(){return O},[O]),A(B1.Provider,{value:U,children:A(R1e,{context:Zk,store:M,children:e.children})})}var r4e=0;function i4e(){return vr(function(){return""+r4e++},[])}function o4e(e){var t=i4e(),n=e.dragHandleUsageInstructions||wx.dragHandleUsageInstructions;return A(Nwe,{children:function(r){return A(n4e,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,children:e.children})}})}var W9=function(t){return function(n){return t===n}},a4e=W9("scroll"),s4e=W9("auto"),iL=function(t,n){return n(t.overflowX)||n(t.overflowY)},l4e=function(t){var n=window.getComputedStyle(t),r={overflowX:n.overflowX,overflowY:n.overflowY};return iL(r,a4e)||iL(r,s4e)},u4e=function(){return!1},c4e=function e(t){return t==null?null:t===document.body?u4e()?t:null:t===document.documentElement?null:l4e(t)?t:e(t.parentElement)},AE=function(e){return{x:e.scrollLeft,y:e.scrollTop}},d4e=function e(t){if(!t)return!1;var n=window.getComputedStyle(t);return n.position==="fixed"?!0:e(t.parentElement)},f4e=function(e){var t=c4e(e),n=d4e(e);return{closestScrollable:t,isFixedOnPage:n}},h4e=function(e){var t=e.descriptor,n=e.isEnabled,r=e.isCombineEnabled,i=e.isFixedOnPage,a=e.direction,s=e.client,o=e.page,c=e.closest,f=function(){if(!c)return null;var b=c.scrollSize,_=c.client,T=R9({scrollHeight:b.scrollHeight,scrollWidth:b.scrollWidth,height:_.paddingBox.height,width:_.paddingBox.width});return{pageMarginBox:c.page.marginBox,frameClient:_,scrollSize:b,shouldClipSubject:c.shouldClipSubject,scroll:{initial:c.scroll,current:c.scroll,max:T,diff:{value:ro,displacement:ro}}}}(),p=a==="vertical"?Lk:d9,g=Th({page:o,withPlaceholder:null,axis:p,frame:f}),v={descriptor:t,isCombineEnabled:r,isFixedOnPage:i,axis:p,isEnabled:n,client:s,page:o,frame:f,subject:g};return v},p4e=function(t,n){var r=t9(t);if(!n||t!==n)return r;var i=r.paddingBox.top-n.scrollTop,a=r.paddingBox.left-n.scrollLeft,s=i+n.scrollHeight,o=a+n.scrollWidth,c={top:i,right:o,bottom:s,left:a},f=Rk(c,r.border),p=Dk({borderBox:f,margin:r.margin,border:r.border,padding:r.padding});return p},m4e=function(e){var t=e.ref,n=e.descriptor,r=e.env,i=e.windowScroll,a=e.direction,s=e.isDropDisabled,o=e.isCombineEnabled,c=e.shouldClipSubject,f=r.closestScrollable,p=p4e(t,f),g=Kb(p,i),v=function(){if(!f)return null;var _=t9(f),T={scrollHeight:f.scrollHeight,scrollWidth:f.scrollWidth};return{client:_,page:Kb(_,i),scroll:AE(f),scrollSize:T,shouldClipSubject:c}}(),b=h4e({descriptor:n,isEnabled:!s,isCombineEnabled:o,isFixedOnPage:r.isFixedOnPage,direction:a,client:p,page:g,closest:v});return b},g4e={passive:!1},v4e={passive:!0},oL=function(e){return e.shouldPublishImmediately?g4e:v4e};function Yb(e){var t=E.exports.useContext(e);return t||rn(!1),t}var R0=function(t){return t&&t.env.closestScrollable||null};function y4e(e){var t=E.exports.useRef(null),n=Yb(B1),r=Xk("droppable"),i=n.registry,a=n.marshal,s=$9(e),o=vr(function(){return{id:e.droppableId,type:e.type,mode:e.mode}},[e.droppableId,e.mode,e.type]),c=E.exports.useRef(o),f=vr(function(){return no(function(N,L){t.current||rn(!1);var $={x:N,y:L};a.updateDroppableScroll(o.id,$)})},[o.id,a]),p=On(function(){var N=t.current;return!N||!N.env.closestScrollable?ro:AE(N.env.closestScrollable)},[]),g=On(function(){var N=p();f(N.x,N.y)},[p,f]),v=vr(function(){return Og(g)},[g]),b=On(function(){var N=t.current,L=R0(N);N&&L||rn(!1);var $=N.scrollOptions;if($.shouldPublishImmediately){g();return}v()},[v,g]),_=On(function(N,L){t.current&&rn(!1);var $=s.current,j=$.getDroppableRef();j||rn(!1);var U=f4e(j),G={ref:j,descriptor:o,env:U,scrollOptions:L};t.current=G;var Z=m4e({ref:j,descriptor:o,env:U,windowScroll:N,direction:$.direction,isDropDisabled:$.isDropDisabled,isCombineEnabled:$.isCombineEnabled,shouldClipSubject:!$.ignoreContainerClipping}),Q=U.closestScrollable;return Q&&(Q.setAttribute(eL.contextId,n.contextId),Q.addEventListener("scroll",b,oL(G.scrollOptions))),Z},[n.contextId,o,b,s]),T=On(function(){var N=t.current,L=R0(N);return N&&L||rn(!1),AE(L)},[]),k=On(function(){var N=t.current;N||rn(!1);var L=R0(N);t.current=null,L&&(v.cancel(),L.removeAttribute(eL.contextId),L.removeEventListener("scroll",b,oL(N.scrollOptions)))},[b,v]),P=On(function(N){var L=t.current;L||rn(!1);var $=R0(L);$||rn(!1),$.scrollTop+=N.y,$.scrollLeft+=N.x},[]),M=vr(function(){return{getDimensionAndWatchScroll:_,getScrollWhileDragging:T,dragStopped:k,scroll:P}},[k,_,T,P]),O=vr(function(){return{uniqueId:r,descriptor:o,callbacks:M}},[M,o,r]);Ta(function(){return c.current=O.descriptor,i.droppable.register(O),function(){t.current&&k(),i.droppable.unregister(O)}},[M,o,k,O,a,i.droppable]),Ta(function(){!t.current||a.updateDroppableIsEnabled(c.current.id,!e.isDropDisabled)},[e.isDropDisabled,a]),Ta(function(){!t.current||a.updateDroppableIsCombineEnabled(c.current.id,e.isCombineEnabled)},[e.isCombineEnabled,a])}function US(){}var aL={width:0,height:0,margin:Vwe},x4e=function(t){var n=t.isAnimatingOpenOnMount,r=t.placeholder,i=t.animate;return n||i==="close"?aL:{height:r.client.borderBox.height,width:r.client.borderBox.width,margin:r.client.margin}},b4e=function(t){var n=t.isAnimatingOpenOnMount,r=t.placeholder,i=t.animate,a=x4e({isAnimatingOpenOnMount:n,placeholder:r,animate:i});return{display:r.display,boxSizing:"border-box",width:a.width,height:a.height,marginTop:a.margin.top,marginRight:a.margin.right,marginBottom:a.margin.bottom,marginLeft:a.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:i!=="none"?Jm.placeholder:null}};function _4e(e){var t=E.exports.useRef(null),n=On(function(){!t.current||(clearTimeout(t.current),t.current=null)},[]),r=e.animate,i=e.onTransitionEnd,a=e.onClose,s=e.contextId,o=E.exports.useState(e.animate==="open"),c=o[0],f=o[1];E.exports.useEffect(function(){return c?r!=="open"?(n(),f(!1),US):t.current?US:(t.current=setTimeout(function(){t.current=null,f(!1)}),n):US},[r,c,n]);var p=On(function(v){v.propertyName==="height"&&(i(),r==="close"&&a())},[r,a,i]),g=b4e({isAnimatingOpenOnMount:c,animate:e.animate,placeholder:e.placeholder});return Un.createElement(e.placeholder.tagName,{style:g,"data-rbd-placeholder-context-id":s,onTransitionEnd:p,ref:e.innerRef})}var w4e=Un.memo(_4e),Qk=Un.createContext(null),C4e=function(e){L7(t,e);function t(){for(var r,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=e.call.apply(e,[this].concat(a))||this,r.state={isVisible:Boolean(r.props.on),data:r.props.on,animate:r.props.shouldAnimate&&r.props.on?"open":"none"},r.onClose=function(){r.state.animate==="close"&&r.setState({isVisible:!1})},r}t.getDerivedStateFromProps=function(i,a){return i.shouldAnimate?i.on?{isVisible:!0,data:i.on,animate:"open"}:a.isVisible?{isVisible:!0,data:a.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(i.on),data:i.on,animate:"none"}};var n=t.prototype;return n.render=function(){if(!this.state.isVisible)return null;var i={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(i)},t}(Un.PureComponent),sL={dragging:5e3,dropAnimating:4500},S4e=function(t,n){return n?Jm.drop(n.duration):t?Jm.snap:Jm.fluid},E4e=function(t,n){return t?n?Fg.opacity.drop:Fg.opacity.combining:null},P4e=function(t){return t.forceShouldAnimate!=null?t.forceShouldAnimate:t.mode==="SNAP"};function T4e(e){var t=e.dimension,n=t.client,r=e.offset,i=e.combineWith,a=e.dropping,s=Boolean(i),o=P4e(e),c=Boolean(a),f=c?RE.drop(r,s):RE.moveTo(r),p={position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:S4e(o,a),transform:f,opacity:E4e(s,c),zIndex:c?sL.dropAnimating:sL.dragging,pointerEvents:"none"};return p}function k4e(e){return{transform:RE.moveTo(e.offset),transition:e.shouldAnimateDisplacement?null:"none"}}function I4e(e){return e.type==="DRAGGING"?T4e(e):k4e(e)}function M4e(e,t,n){n===void 0&&(n=ro);var r=window.getComputedStyle(t),i=t.getBoundingClientRect(),a=e9(i,r),s=Kb(a,n),o={client:a,tagName:t.tagName.toLowerCase(),display:r.display},c={x:a.marginBox.width,y:a.marginBox.height},f={descriptor:e,placeholder:o,displaceBy:c,client:a,page:s};return f}function R4e(e){var t=Xk("draggable"),n=e.descriptor,r=e.registry,i=e.getDraggableRef,a=e.canDragInteractiveElements,s=e.shouldRespectForcePress,o=e.isEnabled,c=vr(function(){return{canDragInteractiveElements:a,shouldRespectForcePress:s,isEnabled:o}},[a,o,s]),f=On(function(b){var _=i();return _||rn(!1),M4e(n,_,b)},[n,i]),p=vr(function(){return{uniqueId:t,descriptor:n,options:c,getDimension:f}},[n,f,c,t]),g=E.exports.useRef(p),v=E.exports.useRef(!0);Ta(function(){return r.draggable.register(g.current),function(){return r.draggable.unregister(g.current)}},[r.draggable]),Ta(function(){if(v.current){v.current=!1;return}var b=g.current;g.current=p,r.draggable.update(p,b)},[p,r.draggable])}function D4e(e){e.preventDefault()}function O4e(e){var t=E.exports.useRef(null),n=On(function(G){t.current=G},[]),r=On(function(){return t.current},[]),i=Yb(B1),a=i.contextId,s=i.dragHandleUsageInstructionsId,o=i.registry,c=Yb(Qk),f=c.type,p=c.droppableId,g=vr(function(){return{id:e.draggableId,index:e.index,type:f,droppableId:p}},[e.draggableId,e.index,f,p]),v=e.children,b=e.draggableId,_=e.isEnabled,T=e.shouldRespectForcePress,k=e.canDragInteractiveElements,P=e.isClone,M=e.mapped,O=e.dropAnimationFinished;if(!P){var N=vr(function(){return{descriptor:g,registry:o,getDraggableRef:r,canDragInteractiveElements:k,shouldRespectForcePress:T,isEnabled:_}},[g,o,r,k,T,_]);R4e(N)}var L=vr(function(){return _?{tabIndex:0,role:"button","aria-describedby":s,"data-rbd-drag-handle-draggable-id":b,"data-rbd-drag-handle-context-id":a,draggable:!1,onDragStart:D4e}:null},[a,s,b,_]),$=On(function(G){M.type==="DRAGGING"&&(!M.dropping||G.propertyName==="transform"&&O())},[O,M]),j=vr(function(){var G=I4e(M),Z=M.type==="DRAGGING"&&M.dropping?$:null,Q={innerRef:n,draggableProps:{"data-rbd-draggable-context-id":a,"data-rbd-draggable-id":b,style:G,onTransitionEnd:Z},dragHandleProps:L};return Q},[a,L,b,M,$,n]),U=vr(function(){return{draggableId:g.id,type:g.type,source:{index:g.index,droppableId:g.droppableId}}},[g.droppableId,g.id,g.index,g.type]);return v(j,M.snapshot,U)}var G9=function(e,t){return e===t},q9=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null},A4e=function(t){return t.combine?t.combine.draggableId:null},N4e=function(t){return t.at&&t.at.type==="COMBINE"?t.at.combine.draggableId:null};function L4e(){var e=no(function(i,a){return{x:i,y:a}}),t=no(function(i,a,s,o,c){return{isDragging:!0,isClone:a,isDropAnimating:Boolean(c),dropAnimation:c,mode:i,draggingOver:s,combineWith:o,combineTargetFor:null}}),n=no(function(i,a,s,o,c,f,p){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:c,combineWith:f,mode:a,offset:i,dimension:s,forceShouldAnimate:p,snapshot:t(a,o,c,f,null)}}}),r=function(a,s){if(a.isDragging){if(a.critical.draggable.id!==s.draggableId)return null;var o=a.current.client.offset,c=a.dimensions.draggables[s.draggableId],f=Pa(a.impact),p=N4e(a.impact),g=a.forceShouldAnimate;return n(e(o.x,o.y),a.movementMode,c,s.isClone,f,p,g)}if(a.phase==="DROP_ANIMATING"){var v=a.completed;if(v.result.draggableId!==s.draggableId)return null;var b=s.isClone,_=a.dimensions.draggables[s.draggableId],T=v.result,k=T.mode,P=q9(T),M=A4e(T),O=a.dropDuration,N={duration:O,curve:jk.drop,moveTo:a.newHomeClientOffset,opacity:M?Fg.opacity.drop:null,scale:M?Fg.scale.drop:null};return{mapped:{type:"DRAGGING",offset:a.newHomeClientOffset,dimension:_,dropping:N,draggingOver:P,combineWith:M,mode:k,forceShouldAnimate:null,snapshot:t(k,b,P,M,N)}}}return null};return r}function Z9(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var F4e={mapped:{type:"SECONDARY",offset:ro,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Z9(null)}};function z4e(){var e=no(function(s,o){return{x:s,y:o}}),t=no(Z9),n=no(function(s,o,c){return o===void 0&&(o=null),{mapped:{type:"SECONDARY",offset:s,combineTargetFor:o,shouldAnimateDisplacement:c,snapshot:t(o)}}}),r=function(o){return o?n(ro,o,!0):null},i=function(o,c,f,p){var g=f.displaced.visible[o],v=Boolean(p.inVirtualList&&p.effected[o]),b=L1(f),_=b&&b.draggableId===o?c:null;if(!g){if(!v)return r(_);if(f.displaced.invisible[o])return null;var T=Jh(p.displacedBy.point),k=e(T.x,T.y);return n(k,_,!0)}if(v)return r(_);var P=f.displacedBy.point,M=e(P.x,P.y);return n(M,_,g.shouldAnimate)},a=function(o,c){if(o.isDragging)return o.critical.draggable.id===c.draggableId?null:i(c.draggableId,o.critical.draggable.id,o.impact,o.afterCritical);if(o.phase==="DROP_ANIMATING"){var f=o.completed;return f.result.draggableId===c.draggableId?null:i(c.draggableId,f.result.draggableId,f.impact,f.afterCritical)}return null};return a}var $4e=function(){var t=L4e(),n=z4e(),r=function(a,s){return t(a,s)||n(a,s)||F4e};return r},B4e={dropAnimationFinished:k9},V4e=Q7($4e,B4e,null,{context:Zk,pure:!0,areStatePropsEqual:G9})(O4e);function X9(e){var t=Yb(Qk),n=t.isUsingCloneFor;return n===e.draggableId&&!e.isClone?null:A(V4e,{...e})}function U4e(e){var t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return A(X9,{...e,isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r})}function j4e(e){var t=E.exports.useContext(B1);t||rn(!1);var n=t.contextId,r=t.isMovementAllowed,i=E.exports.useRef(null),a=E.exports.useRef(null),s=e.children,o=e.droppableId,c=e.type,f=e.mode,p=e.direction,g=e.ignoreContainerClipping,v=e.isDropDisabled,b=e.isCombineEnabled,_=e.snapshot,T=e.useClone,k=e.updateViewportMaxScroll,P=e.getContainerForClone,M=On(function(){return i.current},[]),O=On(function(Q){i.current=Q},[]);On(function(){return a.current},[]);var N=On(function(Q){a.current=Q},[]),L=On(function(){r()&&k({maxScroll:O9()})},[r,k]);y4e({droppableId:o,type:c,mode:f,direction:p,isDropDisabled:v,isCombineEnabled:b,ignoreContainerClipping:g,getDroppableRef:M});var $=A(C4e,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder,children:function(Q){var J=Q.onClose,re=Q.data,ne=Q.animate;return A(w4e,{placeholder:re,onClose:J,innerRef:N,animate:ne,contextId:n,onTransitionEnd:L})}}),j=vr(function(){return{innerRef:O,placeholder:$,droppableProps:{"data-rbd-droppable-id":o,"data-rbd-droppable-context-id":n}}},[n,o,$,O]),U=T?T.dragging.draggableId:null,G=vr(function(){return{droppableId:o,type:c,isUsingCloneFor:U}},[o,U,c]);function Z(){if(!T)return null;var Q=T.dragging,J=T.render,re=A(X9,{draggableId:Q.draggableId,index:Q.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0,children:function(ne,ge){return J(ne,ge,Q)}});return oc.createPortal(re,P())}return it(Qk.Provider,{value:G,children:[s(j,_),Z()]})}var jS=function(t,n){return t===n.droppable.type},lL=function(t,n){return n.draggables[t.draggable.id]},H4e=function(){var t={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},n=Be({},t,{shouldAnimatePlaceholder:!1}),r=no(function(s){return{draggableId:s.id,type:s.type,source:{index:s.index,droppableId:s.droppableId}}}),i=no(function(s,o,c,f,p,g){var v=p.descriptor.id,b=p.descriptor.droppableId===s;if(b){var _=g?{render:g,dragging:r(p.descriptor)}:null,T={isDraggingOver:c,draggingOverWith:c?v:null,draggingFromThisWith:v,isUsingPlaceholder:!0};return{placeholder:p.placeholder,shouldAnimatePlaceholder:!1,snapshot:T,useClone:_}}if(!o)return n;if(!f)return t;var k={isDraggingOver:c,draggingOverWith:v,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:p.placeholder,shouldAnimatePlaceholder:!0,snapshot:k,useClone:null}}),a=function(o,c){var f=c.droppableId,p=c.type,g=!c.isDropDisabled,v=c.renderClone;if(o.isDragging){var b=o.critical;if(!jS(p,b))return n;var _=lL(b,o.dimensions),T=Pa(o.impact)===f;return i(f,g,T,T,_,v)}if(o.phase==="DROP_ANIMATING"){var k=o.completed;if(!jS(p,k.critical))return n;var P=lL(k.critical,o.dimensions);return i(f,g,q9(k.result)===f,Pa(k.impact)===f,P,v)}if(o.phase==="IDLE"&&o.completed&&!o.shouldFlush){var M=o.completed;if(!jS(p,M.critical))return n;var O=Pa(M.impact)===f,N=Boolean(M.impact.at&&M.impact.at.type==="COMBINE"),L=M.critical.droppable.id===f;return O?N?t:n:L?t:n}return n};return a},K4e={updateViewportMaxScroll:JCe};function W4e(){return document.body||rn(!1),document.body}var G4e={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:W4e},Y9=Q7(H4e,K4e,null,{context:Zk,pure:!0,areStatePropsEqual:G9})(j4e);Y9.defaultProps=G4e;const q4e=({orderColumns:e})=>{const[t,n]=E.exports.useState(e.order);E.exports.useEffect(()=>{n(e.order)},[e]);const r=s=>{if(!s.destination)return;var o=[...t];const[c]=o.splice(s.source.index,1);o.splice(s.destination.index,0,c),n(o),e.setOrder(o)},i=s=>{const o=t.map((c,f)=>s===f?{...c,show:!c.show}:c);n(o),e.setOrder(o)},a=()=>A("div",{onClick:s=>s.stopPropagation(),className:"z-10 bg-white-background rounded-xl p-3 space-y-3",style:{maxHeight:"80vh",overflowY:"scroll",margin:"24px 0 24px"},children:A(o4e,{onDragEnd:r,children:A(Y9,{droppableId:"tableOrder",children:s=>it("div",{className:"flex flex-col",...s.droppableProps,ref:s.innerRef,children:[t.map((o,c)=>{const f=o.position;if(!!e.defaultColumns[f])return A(U4e,{draggableId:`list-${f}`,index:c,children:p=>it("div",{className:"flex flex-row gap-2 p-1.5 hover:bg-gray-300 rounded-md",ref:p.innerRef,...p.draggableProps,...p.dragHandleProps,children:[A(_h,{onChange:()=>i(c),checked:o.show}),A("p",{className:"m-0",children:e.defaultColumns[f].name||e.defaultColumns[f].title})]})},`list-${f}`)}),s.placeholder]})})})});return A(t1,{trigger:"click",dropdownRender:()=>a(),children:A(Xr,{onClick:s=>s.stopPropagation(),children:A(y_e,{})})})},Z4e=()=>{const{tableState:{fullScreen:e},toggleFullScreen:t}=D1(),[n,r]=E.exports.useState(!1);return E.exports.useEffect(()=>{const o=setTimeout(()=>r(!1),1500);return()=>clearTimeout(o)},[n]),A(Ra,{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:n,children:A(Xr,{onClick:o=>{o.stopPropagation(),t()},onMouseEnter:()=>{r(!0)},onMouseLeave:()=>{r(!1)},children:e?A(d_e,{}):A(p_e,{})})})},Q9=({leftColumn:e,rightColumn:t,exportProvider:n,classes:r,orderColumns:i})=>it("div",{className:"flex items-center w-full justify-between",children:[it("div",{className:r==null?void 0:r.leftColumn,children:[A("span",{className:"py-[5px]",children:"\u0422\u0430\u0431\u043B\u0438\u0446\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043E\u0432"}),e]}),it("div",{className:r==null?void 0:r.rightColumn,children:[t,it("div",{className:"flex items-center gap-x-1",children:[A(q4e,{orderColumns:i}),n&&A(w1e,{provider:n}),A(Z4e,{})]})]})]}),X4e=e=>({popup:null,setPopup:t=>{e(n=>{if(!t)return n.popup=null,n;n.popup=t})}}),U1=hc(pc(X4e)),Y4e=Un.memo(({data:e,pageSize:t,isClickedPointLoading:n,page:r,onPageChange:i,columns:a,header:s,fullWidth:o,loading:c,onChange:f})=>{const{clickedPointConfig:p,setClickedPointConfig:g}=wv(),{map:v}=X5(),{tableState:b,toggleOpened:_}=D1(),{setPopup:T}=U1(),k={y:b.fullScreen?"calc(100vh - 136px)":"200px",x:"max-content"};return E.exports.useEffect(()=>{if(p===null||n)return;const P=document.querySelector(".scroll-row");P&&b1e(P,{behavior:"smooth"})},[p,e]),A(XD,{bordered:!1,onChange:_,activeKey:b.isOpened?"opened":null,children:A(XD.Panel,{header:s||A(Q9,{}),collapsible:b.fullScreen?"disabled":void 0,children:A(Hge,{size:"small",className:kd("table__wrapper",b.fullScreen&&"table__wrapper__fullScreen"),locale:{emptyText:A(nl,{description:"\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445"})},pagination:{pageSize:t,current:r,onChange:i,total:e==null?void 0:e.count,showSizeChanger:!1,position:"bottomCenter"},showHeader:(e==null?void 0:e.results)&&e.results.length>0,dataSource:e==null?void 0:e.results,columns:a,onChange:f,rowKey:"id",scroll:k,sticky:!0,onRow:P=>({onClick:()=>{const M=_v.exports(P.geometry);v.flyTo({center:[M.coordinates[0],M.coordinates[1]],zoom:13,essential:!0}),T({features:[{properties:P}],coordinates:M.coordinates}),g(P.id,rowSelection==null?void 0:rowSelection.selectedRowKeys.includes(P.id))}}),rowClassName:P=>kd("cursor-pointer",P.id===(p==null?void 0:p.id)&&"scroll-row"),"data-fullwidth":o,loading:c})},"opened")})}),Qb=30,Q4e=(e,t)=>{const{clickedPointConfig:n}=wv(),{data:r,isInitialLoading:i,isFetching:a}=iu(["clicked-point",n==null?void 0:n.id],async()=>{const s=new URLSearchParams({"location_ids[]":[n.id]}),{data:o}=await ls.get(`/api/placement_points?${s.toString()}`);return o},{enabled:e,onSuccess:t});return{data:r,isLoading:i||a}},J4e=(e,t)=>{const[n,r]=E.exports.useState(),[i,a]=E.exports.useState(!1),s=E.exports.useRef(),{data:o,isLoading:c}=Q4e(i,()=>a(!1)),{clickedPointConfig:f}=wv(),p=$U();return E.exports.useEffect(()=>{!e||r(e)},[e]),E.exports.useEffect(()=>{!e||f===null||e.results.find(v=>v.id===f.id)||a(!0)},[e,f]),E.exports.useEffect(()=>{var g;!((g=o==null?void 0:o.results)!=null&&g[0])||(s.current=o.results[0].id,t(Qb+1),r({count:(e==null?void 0:e.count)+1,results:[o.results[0],...e.results]}))},[o,e]),E.exports.useEffect(()=>{if(f===null){const g=["clicked-point",s.current];p.removeQueries({queryKey:g}),t(Qb),r(e)}},[f,e]),{data:n,isClickedPointLoading:c}},eEe=(e,t,n,r,i)=>{const{filters:a,consumer_filter:s,source_filter:o,consumer_type:c,wall_material:f,energy_class:p}=Gi(),{value:g}=us(),{selectedSourceConfig:v}=Wd(),b=Ui[g],{updateCounter:_}=I7(),{region:T}=a,k=()=>{const $=i&&(i.includes("prob")||i.includes("cooling_time")||i.includes("priority"))?`${i}_${b}`:i,j=new URLSearchParams({page:e,page_size:n});$&&j.append("ordering",$);const U=[];if(s&&o){const G=s.key+"_"+b,Z=o.key+"_"+b,Q=`${G}__gte=${s.gt}&${G}__lte=${s.lt}`,J=`${Z}__gte=${o.gt}&${Z}__lt=${o.lt}`;U.push(`(${J})|(${Q})`)}return v&&(v.sourceId&&U.push(`(tp_number=${v.sourceId})`),v.dispatcherNumber&&U.push(`(ods_number=${v.dispatcherNumber})`)),U.length!==0&&j.append("filters",U.join("&")),s&&!o&&(j.append(s.key+"_"+b+"__gt",s.gt),j.append(s.key+"_"+b+"__lt",s.lt)),o&&!s&&(j.append(o.key+"_"+b+"__gt",o.gt),j.append(o.key+"_"+b+"__lt",o.lt)),j},{data:P,isInitialLoading:M,isFetching:O}=iu(["table",e,a,i,_,s,o,v],async({signal:$})=>{const j=k();return await Rbe(j,T,$)},{onError:$=>{$.response.data.detail==="\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430"&&t()},refetchOnWindowFocus:!1}),{data:N,isClickedPointLoading:L}=J4e(P,r);return{data:N,pageSize:n,isClickedPointLoading:L,isDataLoading:M||O}},tEe=(e,t)=>{const{filters:n,consumer_filter:r,source_filter:i,consumer_type:a,wall_material:s,energy_class:o}=Gi(),{value:c}=us(),{selectedSourceConfig:f}=Wd(),p=Ui[c],{region:g}=n,v=()=>{const b=new URLSearchParams,_=[];if(r&&i){const T=r.key+"_"+p,k=i.key+"_"+p,P=`${T}__gte=${r.gt}&${T}__lte=${r.lt}`,M=`${k}__gte=${i.gt}&${k}__lt=${i.lt}`;_.push(`(${M})|(${P})`)}return f&&(f.sourceId&&_.push(`(tp_number=${f.sourceId})`),f.dispatcherNumber&&_.push(`(ods_number=${f.dispatcherNumber})`)),_.length!==0&&b.append("filters",_.join("&")),r&&!i&&(b.append(r.key+"_"+p+"__gt",r.gt),b.append(r.key+"_"+p+"__lt",r.lt)),i&&!r&&(b.append(i.key+"_"+p+"__gt",i.gt),b.append(i.key+"_"+p+"__lt",i.lt)),b};return iu(["export-initial",n],async()=>await Dbe(v(),g),{enabled:e,onSuccess:_1e,onSettled:t,retry:!1})},uL=(e,t)=>{const[n,r]=E.exports.useState(()=>{let i;try{i=JSON.parse(localStorage.getItem(e)||String(t))}catch{i=t}return i});return E.exports.useEffect(()=>{localStorage.setItem(e,JSON.stringify(n))},[n,e]),[n,r]},nEe=e=>{const{data:t}=Pk(),{tableState:{fullScreen:n}}=D1(),{value:r}=us(),[i,a]=uL(`${e}Sort`,null),s=E.exports.useMemo(()=>[{title:"\u0410\u0434\u0440\u0435\u0441",dataIndex:"building_address",key:"building_address",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041D\u043E\u043C\u0435\u0440 \u0422\u041F",dataIndex:"tp_number",key:"tp_number",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041D\u043E\u043C\u0435\u0440 \u041E\u0414\u0421",dataIndex:"ods_number",key:"ods_number",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u0422\u0435\u043B\u0435\u0444\u043E\u043D \u041E\u0414\u0421",dataIndex:"phone_number",key:"phone_number",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043E\u0442\u043E\u043F\u043B\u0435\u043D\u0438\u044F \u0432 \u0434\u043E\u043C\u0435",dataIndex:`prob1_${Ui[r]}`,key:"prob1",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041F\u0440\u043E\u0442\u0435\u0447\u043A\u0430 \u0442\u0440\u0443\u0431 \u0432 \u043F\u043E\u0434\u044A\u0435\u0437\u0434\u0435",dataIndex:`prob2_${Ui[r]}`,key:"prob2",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u0422\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0432 \u043A\u0432\u0430\u0440\u0442\u0438\u0440\u0435 \u043D\u0438\u0436\u0435 \u043D\u043E\u0440\u043C\u0430\u0442\u0438\u0432\u043D\u043E\u0439",dataIndex:`prob3_${Ui[r]}`,key:"prob3",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u0422\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0432 \u043F\u043E\u043C\u0435\u0449\u0435\u043D\u0438\u0438 \u043E\u0431\u0449\u0435\u0433\u043E \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u043D\u0438\u0436\u0435 \u043D\u043E\u0440\u043C\u0430\u0442\u0438\u0432\u043D\u043E\u0439",dataIndex:`prob4_${Ui[r]}`,key:"prob4",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u0422\u0435\u0447\u044C \u0432 \u0441\u0438\u0441\u0442\u0435\u043C\u0435 \u043E\u0442\u043E\u043F\u043B\u0435\u043D\u0438\u044F",dataIndex:`prob5_${Ui[r]}`,key:"prob5",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u0410\u0432\u0430\u0440\u0438\u044F \u043D\u0430 \u0422\u041F",dataIndex:`prob6_${Ui[r]}`,key:"prob6",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u0412\u0440\u0435\u043C\u044F \u043E\u0441\u0442\u044B\u0432\u0430\u043D\u0438\u044F, \u0447",dataIndex:`cooling_time_${Ui[r]}`,key:"cooling_time",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442 \u0437\u0434\u0430\u043D\u0438\u044F",dataIndex:`priority_${Ui[r]}`,key:"priority",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041C\u0430\u0442\u0435\u0440\u0438\u0430\u043B \u0441\u0442\u0435\u043D",dataIndex:"wall_materials",key:"wall_materials",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"\u041A\u043B\u0430\u0441\u0441 \u044D\u043D\u0435\u0440\u0433\u043E\u044D\u0444\u0444\u0435\u043A\u0442\u0438\u0432\u043D\u043E\u0441\u0442\u0438",dataIndex:"fi_energy_class",key:"fi_energy_class",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1}].filter(Boolean),[t==null?void 0:t.normalized,n,r]),[o,c]=uL(`${e}Order`,s.map((p,g)=>({key:p.key,position:g,show:!0})));return E.exports.useEffect(()=>{const g=s.filter(v=>!o.find(b=>b.key===v.key)).map((v,b)=>({key:v.key,position:s.length-b-1,show:!0}));c([...o,...g])},[s]),{columns:E.exports.useMemo(()=>o.flatMap(p=>p.show?s[p.position]:[]).map(p=>i&&i.includes(p==null?void 0:p.key)?{...p,defaultSortOrder:i.includes("-")?"descend":"ascend"}:p).filter(Boolean),[s,o,i]),orderColumns:{defaultColumns:s,order:o,setOrder:c},sort:i,setSort:a}},rEe="dzkhTable",iEe=({fullWidth:e})=>{const{setClickedPointConfig:t}=wv(),[n,r]=E.exports.useState(1),[i,a]=E.exports.useState(Qb),{columns:s,orderColumns:o,sort:c,setSort:f}=nEe(rEe),{setPopup:p}=U1(),g=(P,M)=>{P==="ascend"&&f(M),P==="descend"&&f(`-${M}`),P||f(null)},{data:v,isClickedPointLoading:b,isDataLoading:_}=eEe(n,()=>r(1),i,a,c),T=()=>a(Qb),k=E.exports.useCallback(P=>{T(),t(null),p(null),r(P)},[]);return A(Y4e,{data:v,onPageChange:k,page:n,pageSize:i,isClickedPointLoading:b,columns:s,fullWidth:e,onChange:(P,M,O)=>{g(O.order,O.columnKey)},header:A(Q9,{exportProvider:tEe,orderColumns:o}),loading:_})},oEe=({fullWidth:e})=>A(iEe,{fullWidth:e}),aEe=({lat:e,lng:t,onClose:n,children:r})=>A(AZ,{longitude:t,latitude:e,onClose:n,closeOnClick:!1,style:{minWidth:"330px"},children:r}),HS=[{name:"\u0410\u0434\u0440\u0435\u0441",field:"building_address"},{name:"\u041D\u043E\u043C\u0435\u0440 \u0422\u041F",field:"tp_number"},{name:"\u041D\u043E\u043C\u0435\u0440 \u041E\u0414\u0421",field:"ods_number"},{name:"\u0422\u0435\u043B\u0435\u0444\u043E\u043D \u041E\u0414\u0421",field:"phone_number"}],sEe=[{field:"prob1",name:"\u041E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043E\u0442\u043E\u043F\u043B\u0435\u043D\u0438\u044F \u0432 \u0434\u043E\u043C\u0435"},{field:"prob2",name:"\u041F\u0440\u043E\u0442\u0435\u0447\u043A\u0430 \u0442\u0440\u0443\u0431 \u0432 \u043F\u043E\u0434\u044A\u0435\u0437\u0434\u0435"},{field:"prob3",name:"\u0422\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0432 \u043A\u0432\u0430\u0440\u0442\u0438\u0440\u0435 \u043D\u0438\u0436\u0435 \u043D\u043E\u0440\u043C\u0430\u0442\u0438\u0432\u043D\u043E\u0439"},{field:"prob4",name:"\u0422\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0432 \u043F\u043E\u043C\u0435\u0449\u0435\u043D\u0438\u0438 \u043E\u0431\u0449\u0435\u0433\u043E \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u043D\u0438\u0436\u0435 \u043D\u043E\u0440\u043C\u0430\u0442\u0438\u0432\u043D\u043E\u0439"},{field:"prob5",name:"\u0422\u0435\u0447\u044C \u0432 \u0441\u0438\u0441\u0442\u0435\u043C\u0435 \u043E\u0442\u043E\u043F\u043B\u0435\u043D\u0438\u044F"},{field:"cooling_time",name:"\u0412\u0440\u0435\u043C\u044F \u043E\u0441\u0442\u044B\u0432\u0430\u043D\u0438\u044F (\u0447\u0430\u0441\u044B)"},{field:"priority",name:"\u041F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442 \u0437\u0434\u0430\u043D\u0438\u044F"}],lEe=({feature:e})=>{const{data:t}=Pk(),{setSelectedSourceConfig:n}=Wd(),{value:r}=us(),i=e.properties.point_type==="tp",a=e.properties.point_type==="ods",s=()=>{if(a)return HS;if(i)return[...HS,{field:`prob6_${Ui[r]}`,name:"\u0410\u0432\u0430\u0440\u0438\u044F \u043D\u0430 \u0422\u041F"}];const f=sEe.map(p=>({...p,field:`${p.field}_${Ui[r]}`}));return[...HS,...f]},o=({field:f,render:p,empty:g,type:v,fallbackField:b})=>{let _=e.properties[f];return v==="region"?(_=_||e[b],_=p(_,t==null?void 0:t.normalized)):(_=p?p(_):_,_=td(_)&&g?g:_),_},c=()=>n({pointId:e.properties.id,sourceId:e.properties.tp_number,dispatcherNumber:e.properties.ods_number});return it("div",{children:[s().map(f=>it(ad,{className:"p-1",children:[A(Pb,{className:"font-semibold",span:12,children:f.name}),A(Pb,{span:12,className:"text-right",children:o(f)})]},f.field)),i?A("div",{className:"mt-3 text-center",children:A(Xr,{type:"primary",onClick:c,children:"\u0421\u043C\u043E\u0434\u0435\u043B\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0430\u0432\u0430\u0440\u0438\u044E"})}):null]})};/*!
* @kurkle/color v0.3.2
* https://github.com/kurkle/color#readme
* (c) 2023 Jukka Kurkela
* Released under the MIT License
*/function Av(e){return e+.5|0}const $u=(e,t,n)=>Math.max(Math.min(e,n),t);function Mm(e){return $u(Av(e*2.55),0,255)}function nc(e){return $u(Av(e*255),0,255)}function Bl(e){return $u(Av(e/2.55)/100,0,1)}function cL(e){return $u(Av(e*100),0,100)}const qa={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},NE=[..."0123456789ABCDEF"],uEe=e=>NE[e&15],cEe=e=>NE[(e&240)>>4]+NE[e&15],D0=e=>(e&240)>>4===(e&15),dEe=e=>D0(e.r)&&D0(e.g)&&D0(e.b)&&D0(e.a);function fEe(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&qa[e[1]]*17,g:255&qa[e[2]]*17,b:255&qa[e[3]]*17,a:t===5?qa[e[4]]*17:255}:(t===7||t===9)&&(n={r:qa[e[1]]<<4|qa[e[2]],g:qa[e[3]]<<4|qa[e[4]],b:qa[e[5]]<<4|qa[e[6]],a:t===9?qa[e[7]]<<4|qa[e[8]]:255})),n}const hEe=(e,t)=>e<255?t(e):"";function pEe(e){var t=dEe(e)?uEe:cEe;return e?"#"+t(e.r)+t(e.g)+t(e.b)+hEe(e.a,t):void 0}const mEe=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function J9(e,t,n){const r=t*Math.min(n,1-n),i=(a,s=(a+e/30)%12)=>n-r*Math.max(Math.min(s-3,9-s,1),-1);return[i(0),i(8),i(4)]}function gEe(e,t,n){const r=(i,a=(i+e/60)%6)=>n-n*t*Math.max(Math.min(a,4-a,1),0);return[r(5),r(3),r(1)]}function vEe(e,t,n){const r=J9(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function yEe(e,t,n,r,i){return e===i?(t-n)/r+(t<n?6:0):t===i?(n-e)/r+2:(e-t)/r+4}function Jk(e){const n=e.r/255,r=e.g/255,i=e.b/255,a=Math.max(n,r,i),s=Math.min(n,r,i),o=(a+s)/2;let c,f,p;return a!==s&&(p=a-s,f=o>.5?p/(2-a-s):p/(a+s),c=yEe(n,r,i,p,a),c=c*60+.5),[c|0,f||0,o]}function eI(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(nc)}function tI(e,t,n){return eI(J9,e,t,n)}function xEe(e,t,n){return eI(vEe,e,t,n)}function bEe(e,t,n){return eI(gEe,e,t,n)}function ej(e){return(e%360+360)%360}function _Ee(e){const t=mEe.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?Mm(+t[5]):nc(+t[5]));const i=ej(+t[2]),a=+t[3]/100,s=+t[4]/100;return t[1]==="hwb"?r=xEe(i,a,s):t[1]==="hsv"?r=bEe(i,a,s):r=tI(i,a,s),{r:r[0],g:r[1],b:r[2],a:n}}function wEe(e,t){var n=Jk(e);n[0]=ej(n[0]+t),n=tI(n),e.r=n[0],e.g=n[1],e.b=n[2]}function CEe(e){if(!e)return;const t=Jk(e),n=t[0],r=cL(t[1]),i=cL(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${Bl(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const dL={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},fL={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function SEe(){const e={},t=Object.keys(fL),n=Object.keys(dL);let r,i,a,s,o;for(r=0;r<t.length;r++){for(s=o=t[r],i=0;i<n.length;i++)a=n[i],o=o.replace(a,dL[a]);a=parseInt(fL[s],16),e[o]=[a>>16&255,a>>8&255,a&255]}return e}let O0;function EEe(e){O0||(O0=SEe(),O0.transparent=[0,0,0,0]);const t=O0[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const PEe=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function TEe(e){const t=PEe.exec(e);let n=255,r,i,a;if(!!t){if(t[7]!==r){const s=+t[7];n=t[8]?Mm(s):$u(s*255,0,255)}return r=+t[1],i=+t[3],a=+t[5],r=255&(t[2]?Mm(r):$u(r,0,255)),i=255&(t[4]?Mm(i):$u(i,0,255)),a=255&(t[6]?Mm(a):$u(a,0,255)),{r,g:i,b:a,a:n}}}function kEe(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Bl(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const KS=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Mf=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function IEe(e,t,n){const r=Mf(Bl(e.r)),i=Mf(Bl(e.g)),a=Mf(Bl(e.b));return{r:nc(KS(r+n*(Mf(Bl(t.r))-r))),g:nc(KS(i+n*(Mf(Bl(t.g))-i))),b:nc(KS(a+n*(Mf(Bl(t.b))-a))),a:e.a+n*(t.a-e.a)}}function A0(e,t,n){if(e){let r=Jk(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=tI(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function tj(e,t){return e&&Object.assign(t||{},e)}function hL(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=nc(e[3]))):(t=tj(e,{r:0,g:0,b:0,a:1}),t.a=nc(t.a)),t}function MEe(e){return e.charAt(0)==="r"?TEe(e):_Ee(e)}class zg{constructor(t){if(t instanceof zg)return t;const n=typeof t;let r;n==="object"?r=hL(t):n==="string"&&(r=fEe(t)||EEe(t)||MEe(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=tj(this._rgb);return t&&(t.a=Bl(t.a)),t}set rgb(t){this._rgb=hL(t)}rgbString(){return this._valid?kEe(this._rgb):void 0}hexString(){return this._valid?pEe(this._rgb):void 0}hslString(){return this._valid?CEe(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let a;const s=n===a?.5:n,o=2*s-1,c=r.a-i.a,f=((o*c===-1?o:(o+c)/(1+o*c))+1)/2;a=1-f,r.r=255&f*r.r+a*i.r+.5,r.g=255&f*r.g+a*i.g+.5,r.b=255&f*r.b+a*i.b+.5,r.a=s*r.a+(1-s)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=IEe(this._rgb,t._rgb,n)),this}clone(){return new zg(this.rgb)}alpha(t){return this._rgb.a=nc(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Av(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return A0(this._rgb,2,t),this}darken(t){return A0(this._rgb,2,-t),this}saturate(t){return A0(this._rgb,1,t),this}desaturate(t){return A0(this._rgb,1,-t),this}rotate(t){return wEe(this._rgb,t),this}}/*!
* Chart.js v4.4.0
* https://www.chartjs.org
* (c) 2023 Chart.js Contributors
* Released under the MIT License
*/function Ml(){}const REe=(()=>{let e=0;return()=>e++})();function Ir(e){return e===null||typeof e>"u"}function oi(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function br(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function eo(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function ya(e,t){return eo(e)?e:t}function sr(e,t){return typeof e>"u"?t:e}const DEe=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function qr(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function kr(e,t,n,r){let i,a,s;if(oi(e))if(a=e.length,r)for(i=a-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;i<a;i++)t.call(n,e[i],i);else if(br(e))for(s=Object.keys(e),a=s.length,i=0;i<a;i++)t.call(n,e[s[i]],s[i])}function Jb(e,t){let n,r,i,a;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],a=t[n],i.datasetIndex!==a.datasetIndex||i.index!==a.index)return!1;return!0}function e_(e){if(oi(e))return e.map(e_);if(br(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let i=0;for(;i<r;++i)t[n[i]]=e_(e[n[i]]);return t}return e}function nj(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function OEe(e,t,n,r){if(!nj(e))return;const i=t[e],a=n[e];br(i)&&br(a)?$g(i,a,r):t[e]=e_(a)}function $g(e,t,n){const r=oi(t)?t:[t],i=r.length;if(!br(e))return e;n=n||{};const a=n.merger||OEe;let s;for(let o=0;o<i;++o){if(s=r[o],!br(s))continue;const c=Object.keys(s);for(let f=0,p=c.length;f<p;++f)a(c[f],e,s,n)}return e}function eg(e,t){return $g(e,t,{merger:AEe})}function AEe(e,t,n){if(!nj(e))return;const r=t[e],i=n[e];br(r)&&br(i)?eg(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=e_(i))}const pL={"":e=>e,x:e=>e.x,y:e=>e.y};function NEe(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function LEe(e){const t=NEe(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function Mh(e,t){return(pL[t]||(pL[t]=LEe(t)))(e)}function nI(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Bg=e=>typeof e<"u",sc=e=>typeof e=="function",mL=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function FEe(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Ni=Math.PI,os=2*Ni,zEe=os+Ni,t_=Number.POSITIVE_INFINITY,$Ee=Ni/180,Ca=Ni/2,Kc=Ni/4,gL=Ni*2/3,Bu=Math.log10,ll=Math.sign;function tg(e,t,n){return Math.abs(e-t)<n}function vL(e){const t=Math.round(e);e=tg(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(Bu(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function BEe(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((i,a)=>i-a).pop(),t}function Vg(e){return!isNaN(parseFloat(e))&&isFinite(e)}function VEe(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function rj(e,t,n){let r,i,a;for(r=0,i=e.length;r<i;r++)a=e[r][n],isNaN(a)||(t.min=Math.min(t.min,a),t.max=Math.max(t.max,a))}function Vu(e){return e*(Ni/180)}function rI(e){return e*(180/Ni)}function yL(e){if(!eo(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function UEe(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);let a=Math.atan2(r,n);return a<-.5*Ni&&(a+=os),{angle:a,distance:i}}function LE(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function jEe(e,t){return(e-t+zEe)%os-Ni}function Es(e){return(e%os+os)%os}function ij(e,t,n,r){const i=Es(e),a=Es(t),s=Es(n),o=Es(a-i),c=Es(s-i),f=Es(i-a),p=Es(i-s);return i===a||i===s||r&&a===s||o>c&&f<p}function Sa(e,t,n){return Math.max(t,Math.min(n,e))}function HEe(e){return Sa(e,-32768,32767)}function md(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function iI(e,t,n){n=n||(s=>e[s]<t);let r=e.length-1,i=0,a;for(;r-i>1;)a=i+r>>1,n(a)?i=a:r=a;return{lo:i,hi:r}}const gd=(e,t,n,r)=>iI(e,n,r?i=>{const a=e[i][t];return a<n||a===n&&e[i+1][t]===n}:i=>e[i][t]<n),KEe=(e,t,n)=>iI(e,n,r=>e[r][t]>=n);function WEe(e,t,n){let r=0,i=e.length;for(;r<i&&e[r]<t;)r++;for(;i>r&&e[i-1]>n;)i--;return r>0||i<e.length?e.slice(r,i):e}const oj=["push","pop","shift","splice","unshift"];function GEe(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),oj.forEach(n=>{const r="_onData"+nI(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...a){const s=i.apply(this,a);return e._chartjs.listeners.forEach(o=>{typeof o[r]=="function"&&o[r](...a)}),s}})})}function xL(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(oj.forEach(a=>{delete e[a]}),delete e._chartjs)}function aj(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const sj=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function lj(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,sj.call(window,()=>{r=!1,e.apply(t,n)}))}}function qEe(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const oI=e=>e==="start"?"left":e==="end"?"right":"center",wo=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,ZEe=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function XEe(e,t,n){const r=t.length;let i=0,a=r;if(e._sorted){const{iScale:s,_parsed:o}=e,c=s.axis,{min:f,max:p,minDefined:g,maxDefined:v}=s.getUserBounds();g&&(i=Sa(Math.min(gd(o,c,f).lo,n?r:gd(t,c,s.getPixelForValue(f)).lo),0,r-1)),v?a=Sa(Math.max(gd(o,s.axis,p,!0).hi+1,n?0:gd(t,c,s.getPixelForValue(p),!0).hi+1),i,r)-i:a=r-i}return{start:i,count:a}}function YEe(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const a=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),a}const N0=e=>e===0||e===1,bL=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*os/n)),_L=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*os/n)+1,ng={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Ca)+1,easeOutSine:e=>Math.sin(e*Ca),easeInOutSine:e=>-.5*(Math.cos(Ni*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>N0(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>N0(e)?e:bL(e,.075,.3),easeOutElastic:e=>N0(e)?e:_L(e,.075,.3),easeInOutElastic(e){return N0(e)?e:e<.5?.5*bL(e*2,.1125,.45):.5+.5*_L(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-ng.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?ng.easeInBounce(e*2)*.5:ng.easeOutBounce(e*2-1)*.5+.5};function aI(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function wL(e){return aI(e)?e:new zg(e)}function WS(e){return aI(e)?e:new zg(e).saturate(.5).darken(.1).hexString()}const QEe=["x","y","borderWidth","radius","tension"],JEe=["color","borderColor","backgroundColor"];function ePe(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:JEe},numbers:{type:"number",properties:QEe}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function tPe(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const CL=new Map;function nPe(e,t){t=t||{};const n=e+JSON.stringify(t);let r=CL.get(n);return r||(r=new Intl.NumberFormat(e,t),CL.set(n,r)),r}function sI(e,t,n){return nPe(t,n).format(e)}const uj={values(e){return oi(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,a=e;if(n.length>1){const f=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(f<1e-4||f>1e15)&&(i="scientific"),a=rPe(e,n)}const s=Bu(Math.abs(a)),o=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),c={notation:i,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(c,this.options.ticks.format),sI(e,r,c)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(Bu(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?uj.numeric.call(this,e,t,n):""}};function rPe(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var j1={formatters:uj};function iPe(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:j1.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Nd=Object.create(null),FE=Object.create(null);function rg(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;r<i;++r){const a=n[r];e=e[a]||(e[a]=Object.create(null))}return e}function GS(e,t,n){return typeof t=="string"?$g(rg(e,t),n):$g(rg(e,""),t)}class oPe{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,i)=>WS(i.backgroundColor),this.hoverBorderColor=(r,i)=>WS(i.borderColor),this.hoverColor=(r,i)=>WS(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return GS(this,t,n)}get(t){return rg(this,t)}describe(t,n){return GS(FE,t,n)}override(t,n){return GS(Nd,t,n)}route(t,n,r,i){const a=rg(this,t),s=rg(this,r),o="_"+n;Object.defineProperties(a,{[o]:{value:a[n],writable:!0},[n]:{enumerable:!0,get(){const c=this[o],f=s[i];return br(c)?Object.assign({},f,c):sr(c,f)},set(c){this[o]=c}}})}apply(t){t.forEach(n=>n(this))}}var gi=new oPe({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[ePe,tPe,iPe]);function aPe(e){return!e||Ir(e.size)||Ir(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function n_(e,t,n,r,i){let a=t[i];return a||(a=t[i]=e.measureText(i).width,n.push(i)),a>r&&(r=a),r}function sPe(e,t,n,r){r=r||{};let i=r.data=r.data||{},a=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},a=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let s=0;const o=n.length;let c,f,p,g,v;for(c=0;c<o;c++)if(g=n[c],g!=null&&!oi(g))s=n_(e,i,a,s,g);else if(oi(g))for(f=0,p=g.length;f<p;f++)v=g[f],v!=null&&!oi(v)&&(s=n_(e,i,a,s,v));e.restore();const b=a.length/2;if(b>n.length){for(c=0;c<b;c++)delete i[a[c]];a.splice(0,b)}return s}function Wc(e,t,n){const r=e.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((t-i)*r)/r+i}function SL(e,t){t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore()}function zE(e,t,n,r){cj(e,t,n,r,null)}function cj(e,t,n,r,i){let a,s,o,c,f,p,g,v;const b=t.pointStyle,_=t.rotation,T=t.radius;let k=(_||0)*$Ee;if(b&&typeof b=="object"&&(a=b.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(k),e.drawImage(b,-b.width/2,-b.height/2,b.width,b.height),e.restore();return}if(!(isNaN(T)||T<=0)){switch(e.beginPath(),b){default:i?e.ellipse(n,r,i/2,T,0,0,os):e.arc(n,r,T,0,os),e.closePath();break;case"triangle":p=i?i/2:T,e.moveTo(n+Math.sin(k)*p,r-Math.cos(k)*T),k+=gL,e.lineTo(n+Math.sin(k)*p,r-Math.cos(k)*T),k+=gL,e.lineTo(n+Math.sin(k)*p,r-Math.cos(k)*T),e.closePath();break;case"rectRounded":f=T*.516,c=T-f,s=Math.cos(k+Kc)*c,g=Math.cos(k+Kc)*(i?i/2-f:c),o=Math.sin(k+Kc)*c,v=Math.sin(k+Kc)*(i?i/2-f:c),e.arc(n-g,r-o,f,k-Ni,k-Ca),e.arc(n+v,r-s,f,k-Ca,k),e.arc(n+g,r+o,f,k,k+Ca),e.arc(n-v,r+s,f,k+Ca,k+Ni),e.closePath();break;case"rect":if(!_){c=Math.SQRT1_2*T,p=i?i/2:c,e.rect(n-p,r-c,2*p,2*c);break}k+=Kc;case"rectRot":g=Math.cos(k)*(i?i/2:T),s=Math.cos(k)*T,o=Math.sin(k)*T,v=Math.sin(k)*(i?i/2:T),e.moveTo(n-g,r-o),e.lineTo(n+v,r-s),e.lineTo(n+g,r+o),e.lineTo(n-v,r+s),e.closePath();break;case"crossRot":k+=Kc;case"cross":g=Math.cos(k)*(i?i/2:T),s=Math.cos(k)*T,o=Math.sin(k)*T,v=Math.sin(k)*(i?i/2:T),e.moveTo(n-g,r-o),e.lineTo(n+g,r+o),e.moveTo(n+v,r-s),e.lineTo(n-v,r+s);break;case"star":g=Math.cos(k)*(i?i/2:T),s=Math.cos(k)*T,o=Math.sin(k)*T,v=Math.sin(k)*(i?i/2:T),e.moveTo(n-g,r-o),e.lineTo(n+g,r+o),e.moveTo(n+v,r-s),e.lineTo(n-v,r+s),k+=Kc,g=Math.cos(k)*(i?i/2:T),s=Math.cos(k)*T,o=Math.sin(k)*T,v=Math.sin(k)*(i?i/2:T),e.moveTo(n-g,r-o),e.lineTo(n+g,r+o),e.moveTo(n+v,r-s),e.lineTo(n-v,r+s);break;case"line":s=i?i/2:Math.cos(k)*T,o=Math.sin(k)*T,e.moveTo(n-s,r-o),e.lineTo(n+s,r+o);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(k)*(i?i/2:T),r+Math.sin(k)*T);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function Hl(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function lI(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function uI(e){e.restore()}function lPe(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if(i==="middle"){const a=(t.x+n.x)/2;e.lineTo(a,t.y),e.lineTo(a,n.y)}else i==="after"!=!!r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function uPe(e,t,n,r){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function cPe(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),Ir(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function dPe(e,t,n,r,i){if(i.strikethrough||i.underline){const a=e.measureText(r),s=t-a.actualBoundingBoxLeft,o=t+a.actualBoundingBoxRight,c=n-a.actualBoundingBoxAscent,f=n+a.actualBoundingBoxDescent,p=i.strikethrough?(c+f)/2:f;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(s,p),e.lineTo(o,p),e.stroke()}}function fPe(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Ld(e,t,n,r,i,a={}){const s=oi(t)?t:[t],o=a.strokeWidth>0&&a.strokeColor!=="";let c,f;for(e.save(),e.font=i.string,cPe(e,a),c=0;c<s.length;++c)f=s[c],a.backdrop&&fPe(e,a.backdrop),o&&(a.strokeColor&&(e.strokeStyle=a.strokeColor),Ir(a.strokeWidth)||(e.lineWidth=a.strokeWidth),e.strokeText(f,n,r,a.maxWidth)),e.fillText(f,n,r,a.maxWidth),dPe(e,n,r,f,a),r+=Number(i.lineHeight);e.restore()}function Ug(e,t){const{x:n,y:r,w:i,h:a,radius:s}=t;e.arc(n+s.topLeft,r+s.topLeft,s.topLeft,1.5*Ni,Ni,!0),e.lineTo(n,r+a-s.bottomLeft),e.arc(n+s.bottomLeft,r+a-s.bottomLeft,s.bottomLeft,Ni,Ca,!0),e.lineTo(n+i-s.bottomRight,r+a),e.arc(n+i-s.bottomRight,r+a-s.bottomRight,s.bottomRight,Ca,0,!0),e.lineTo(n+i,r+s.topRight),e.arc(n+i-s.topRight,r+s.topRight,s.topRight,0,-Ca,!0),e.lineTo(n+s.topLeft,r)}const hPe=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,pPe=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function mPe(e,t){const n=(""+e).match(hPe);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const gPe=e=>+e||0;function dj(e,t){const n={},r=br(t),i=r?Object.keys(t):t,a=br(e)?r?s=>sr(e[s],e[t[s]]):s=>e[s]:()=>e;for(const s of i)n[s]=gPe(a(s));return n}function fj(e){return dj(e,{top:"y",right:"x",bottom:"y",left:"x"})}function _d(e){return dj(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Io(e){const t=fj(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Hi(e,t){e=e||{},t=t||gi.font;let n=sr(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=sr(e.style,t.style);r&&!(""+r).match(pPe)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:sr(e.family,t.family),lineHeight:mPe(sr(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:sr(e.weight,t.weight),string:""};return i.string=aPe(i),i}function L0(e,t,n,r){let i=!0,a,s,o;for(a=0,s=e.length;a<s;++a)if(o=e[a],o!==void 0&&(t!==void 0&&typeof o=="function"&&(o=o(t),i=!1),n!==void 0&&oi(o)&&(o=o[n%o.length],i=!1),o!==void 0))return r&&!i&&(r.cacheable=!1),o}function vPe(e,t,n){const{min:r,max:i}=e,a=DEe(t,(i-r)/2),s=(o,c)=>n&&o===0?0:o+c;return{min:s(r,-Math.abs(a)),max:s(i,a)}}function gc(e,t){return Object.assign(Object.create(e),t)}function cI(e,t=[""],n,r,i=()=>e[0]){const a=n||e;typeof r>"u"&&(r=gj("_fallback",e));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:r,_getTarget:i,override:o=>cI([o,...e],t,a,r)};return new Proxy(s,{deleteProperty(o,c){return delete o[c],delete o._keys,delete e[0][c],!0},get(o,c){return pj(o,c,()=>EPe(c,t,e,o))},getOwnPropertyDescriptor(o,c){return Reflect.getOwnPropertyDescriptor(o._scopes[0],c)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(o,c){return PL(o).includes(c)},ownKeys(o){return PL(o)},set(o,c,f){const p=o._storage||(o._storage=i());return o[c]=p[c]=f,delete o._keys,!0}})}function Rh(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:hj(e,r),setContext:a=>Rh(e,a,n,r),override:a=>Rh(e.override(a),t,n,r)};return new Proxy(i,{deleteProperty(a,s){return delete a[s],delete e[s],!0},get(a,s,o){return pj(a,s,()=>xPe(a,s,o))},getOwnPropertyDescriptor(a,s){return a._descriptors.allKeys?Reflect.has(e,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,s)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(a,s){return Reflect.has(e,s)},ownKeys(){return Reflect.ownKeys(e)},set(a,s,o){return e[s]=o,delete a[s],!0}})}function hj(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:sc(n)?n:()=>n,isIndexable:sc(r)?r:()=>r}}const yPe=(e,t)=>e?e+nI(t):t,dI=(e,t)=>br(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function pj(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const r=n();return e[t]=r,r}function xPe(e,t,n){const{_proxy:r,_context:i,_subProxy:a,_descriptors:s}=e;let o=r[t];return sc(o)&&s.isScriptable(t)&&(o=bPe(t,o,e,n)),oi(o)&&o.length&&(o=_Pe(t,o,e,s.isIndexable)),dI(t,o)&&(o=Rh(o,i,a&&a[t],s)),o}function bPe(e,t,n,r){const{_proxy:i,_context:a,_subProxy:s,_stack:o}=n;if(o.has(e))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+e);o.add(e);let c=t(a,s||r);return o.delete(e),dI(e,c)&&(c=fI(i._scopes,i,e,c)),c}function _Pe(e,t,n,r){const{_proxy:i,_context:a,_subProxy:s,_descriptors:o}=n;if(typeof a.index<"u"&&r(e))return t[a.index%t.length];if(br(t[0])){const c=t,f=i._scopes.filter(p=>p!==c);t=[];for(const p of c){const g=fI(f,i,e,p);t.push(Rh(g,a,s&&s[e],o))}}return t}function mj(e,t,n){return sc(e)?e(t,n):e}const wPe=(e,t)=>e===!0?t:typeof e=="string"?Mh(t,e):void 0;function CPe(e,t,n,r,i){for(const a of t){const s=wPe(n,a);if(s){e.add(s);const o=mj(s._fallback,n,i);if(typeof o<"u"&&o!==n&&o!==r)return o}else if(s===!1&&typeof r<"u"&&n!==r)return null}return!1}function fI(e,t,n,r){const i=t._rootScopes,a=mj(t._fallback,n,r),s=[...e,...i],o=new Set;o.add(r);let c=EL(o,s,n,a||n,r);return c===null||typeof a<"u"&&a!==n&&(c=EL(o,s,a,c,r),c===null)?!1:cI(Array.from(o),[""],i,a,()=>SPe(t,n,r))}function EL(e,t,n,r,i){for(;n;)n=CPe(e,t,n,r,i);return n}function SPe(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return oi(i)&&br(n)?n:i||{}}function EPe(e,t,n,r){let i;for(const a of t)if(i=gj(yPe(a,e),n),typeof i<"u")return dI(e,i)?fI(n,r,e,i):i}function gj(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function PL(e){let t=e._keys;return t||(t=e._keys=PPe(e._scopes)),t}function PPe(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}const TPe=Number.EPSILON||1e-14,Dh=(e,t)=>t<e.length&&!e[t].skip&&e[t],vj=e=>e==="x"?"y":"x";function kPe(e,t,n,r){const i=e.skip?t:e,a=t,s=n.skip?t:n,o=LE(a,i),c=LE(s,a);let f=o/(o+c),p=c/(o+c);f=isNaN(f)?0:f,p=isNaN(p)?0:p;const g=r*f,v=r*p;return{previous:{x:a.x-g*(s.x-i.x),y:a.y-g*(s.y-i.y)},next:{x:a.x+v*(s.x-i.x),y:a.y+v*(s.y-i.y)}}}function IPe(e,t,n){const r=e.length;let i,a,s,o,c,f=Dh(e,0);for(let p=0;p<r-1;++p)if(c=f,f=Dh(e,p+1),!(!c||!f)){if(tg(t[p],0,TPe)){n[p]=n[p+1]=0;continue}i=n[p]/t[p],a=n[p+1]/t[p],o=Math.pow(i,2)+Math.pow(a,2),!(o<=9)&&(s=3/Math.sqrt(o),n[p]=i*s*t[p],n[p+1]=a*s*t[p])}}function MPe(e,t,n="x"){const r=vj(n),i=e.length;let a,s,o,c=Dh(e,0);for(let f=0;f<i;++f){if(s=o,o=c,c=Dh(e,f+1),!o)continue;const p=o[n],g=o[r];s&&(a=(p-s[n])/3,o[`cp1${n}`]=p-a,o[`cp1${r}`]=g-a*t[f]),c&&(a=(c[n]-p)/3,o[`cp2${n}`]=p+a,o[`cp2${r}`]=g+a*t[f])}}function RPe(e,t="x"){const n=vj(t),r=e.length,i=Array(r).fill(0),a=Array(r);let s,o,c,f=Dh(e,0);for(s=0;s<r;++s)if(o=c,c=f,f=Dh(e,s+1),!!c){if(f){const p=f[t]-c[t];i[s]=p!==0?(f[n]-c[n])/p:0}a[s]=o?f?ll(i[s-1])!==ll(i[s])?0:(i[s-1]+i[s])/2:i[s-1]:i[s]}IPe(e,i,a),MPe(e,a,t)}function F0(e,t,n){return Math.max(Math.min(e,n),t)}function DPe(e,t){let n,r,i,a,s,o=Hl(e[0],t);for(n=0,r=e.length;n<r;++n)s=a,a=o,o=n<r-1&&Hl(e[n+1],t),a&&(i=e[n],s&&(i.cp1x=F0(i.cp1x,t.left,t.right),i.cp1y=F0(i.cp1y,t.top,t.bottom)),o&&(i.cp2x=F0(i.cp2x,t.left,t.right),i.cp2y=F0(i.cp2y,t.top,t.bottom)))}function OPe(e,t,n,r,i){let a,s,o,c;if(t.spanGaps&&(e=e.filter(f=>!f.skip)),t.cubicInterpolationMode==="monotone")RPe(e,i);else{let f=r?e[e.length-1]:e[0];for(a=0,s=e.length;a<s;++a)o=e[a],c=kPe(f,o,e[Math.min(a+1,s-(r?0:1))%s],t.tension),o.cp1x=c.previous.x,o.cp1y=c.previous.y,o.cp2x=c.next.x,o.cp2y=c.next.y,f=o}t.capBezierPoints&&DPe(e,n)}function yj(){return typeof window<"u"&&typeof document<"u"}function hI(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function r_(e,t,n){let r;return typeof e=="string"?(r=parseInt(e,10),e.indexOf("%")!==-1&&(r=r/100*t.parentNode[n])):r=e,r}const H1=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function APe(e,t){return H1(e).getPropertyValue(t)}const NPe=["top","right","bottom","left"];function wd(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const a=NPe[i];r[a]=parseFloat(e[t+"-"+a+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const LPe=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function FPe(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:a}=r;let s=!1,o,c;if(LPe(i,a,e.target))o=i,c=a;else{const f=t.getBoundingClientRect();o=r.clientX-f.left,c=r.clientY-f.top,s=!0}return{x:o,y:c,box:s}}function rd(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=H1(n),a=i.boxSizing==="border-box",s=wd(i,"padding"),o=wd(i,"border","width"),{x:c,y:f,box:p}=FPe(e,n),g=s.left+(p&&o.left),v=s.top+(p&&o.top);let{width:b,height:_}=t;return a&&(b-=s.width+o.width,_-=s.height+o.height),{x:Math.round((c-g)/b*n.width/r),y:Math.round((f-v)/_*n.height/r)}}function zPe(e,t,n){let r,i;if(t===void 0||n===void 0){const a=hI(e);if(!a)t=e.clientWidth,n=e.clientHeight;else{const s=a.getBoundingClientRect(),o=H1(a),c=wd(o,"border","width"),f=wd(o,"padding");t=s.width-f.width-c.width,n=s.height-f.height-c.height,r=r_(o.maxWidth,a,"clientWidth"),i=r_(o.maxHeight,a,"clientHeight")}}return{width:t,height:n,maxWidth:r||t_,maxHeight:i||t_}}const z0=e=>Math.round(e*10)/10;function $Pe(e,t,n,r){const i=H1(e),a=wd(i,"margin"),s=r_(i.maxWidth,e,"clientWidth")||t_,o=r_(i.maxHeight,e,"clientHeight")||t_,c=zPe(e,t,n);let{width:f,height:p}=c;if(i.boxSizing==="content-box"){const v=wd(i,"border","width"),b=wd(i,"padding");f-=b.width+v.width,p-=b.height+v.height}return f=Math.max(0,f-a.width),p=Math.max(0,r?f/r:p-a.height),f=z0(Math.min(f,s,c.maxWidth)),p=z0(Math.min(p,o,c.maxHeight)),f&&!p&&(p=z0(f/2)),(t!==void 0||n!==void 0)&&r&&c.height&&p>c.height&&(p=c.height,f=z0(Math.floor(p*r))),{width:f,height:p}}function TL(e,t,n){const r=t||1,i=Math.floor(e.height*r),a=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const s=e.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${e.height}px`,s.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||s.height!==i||s.width!==a?(e.currentDevicePixelRatio=r,s.height=i,s.width=a,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const BPe=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return e}();function kL(e,t){const n=APe(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function id(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function VPe(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function UPe(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},a={x:t.cp1x,y:t.cp1y},s=id(e,i,n),o=id(i,a,n),c=id(a,t,n),f=id(s,o,n),p=id(o,c,n);return id(f,p,n)}const jPe=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},HPe=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function ah(e,t,n){return e?jPe(t,n):HPe()}function xj(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function bj(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function _j(e){return e==="angle"?{between:ij,compare:jEe,normalize:Es}:{between:md,compare:(t,n)=>t-n,normalize:t=>t}}function IL({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function KPe(e,t,n){const{property:r,start:i,end:a}=n,{between:s,normalize:o}=_j(r),c=t.length;let{start:f,end:p,loop:g}=e,v,b;if(g){for(f+=c,p+=c,v=0,b=c;v<b&&s(o(t[f%c][r]),i,a);++v)f--,p--;f%=c,p%=c}return p<f&&(p+=c),{start:f,end:p,loop:g,style:e.style}}function WPe(e,t,n){if(!n)return[e];const{property:r,start:i,end:a}=n,s=t.length,{compare:o,between:c,normalize:f}=_j(r),{start:p,end:g,loop:v,style:b}=KPe(e,t,n),_=[];let T=!1,k=null,P,M,O;const N=()=>c(i,O,P)&&o(i,O)!==0,L=()=>o(a,P)===0||c(a,O,P),$=()=>T||N(),j=()=>!T||L();for(let U=p,G=p;U<=g;++U)M=t[U%s],!M.skip&&(P=f(M[r]),P!==O&&(T=c(P,i,a),k===null&&$()&&(k=o(P,i)===0?U:G),k!==null&&j()&&(_.push(IL({start:k,end:U,loop:v,count:s,style:b})),k=null),G=U,O=P));return k!==null&&_.push(IL({start:k,end:g,loop:v,count:s,style:b})),_}function GPe(e,t){const n=[],r=e.segments;for(let i=0;i<r.length;i++){const a=WPe(r[i],e.points,t);a.length&&n.push(...a)}return n}function qPe(e,t,n,r){let i=0,a=t-1;if(n&&!r)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(a+=i);a>i&&e[a%t].skip;)a--;return a%=t,{start:i,end:a}}function ZPe(e,t,n,r){const i=e.length,a=[];let s=t,o=e[t],c;for(c=t+1;c<=n;++c){const f=e[c%i];f.skip||f.stop?o.skip||(r=!1,a.push({start:t%i,end:(c-1)%i,loop:r}),t=s=f.stop?c:null):(s=c,o.skip&&(t=c)),o=f}return s!==null&&a.push({start:t%i,end:s%i,loop:r}),a}function XPe(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const a=!!e._loop,{start:s,end:o}=qPe(n,i,a,r);if(r===!0)return ML(e,[{start:s,end:o,loop:a}],n,t);const c=o<s?o+i:o,f=!!e._fullLoop&&s===0&&o===i-1;return ML(e,ZPe(n,s,c,f),n,t)}function ML(e,t,n,r){return!r||!r.setContext||!n?t:YPe(e,t,n,r)}function YPe(e,t,n,r){const i=e._chart.getContext(),a=RL(e.options),{_datasetIndex:s,options:{spanGaps:o}}=e,c=n.length,f=[];let p=a,g=t[0].start,v=g;function b(_,T,k,P){const M=o?-1:1;if(_!==T){for(_+=c;n[_%c].skip;)_-=M;for(;n[T%c].skip;)T+=M;_%c!==T%c&&(f.push({start:_%c,end:T%c,loop:k,style:P}),p=P,g=T%c)}}for(const _ of t){g=o?g:_.start;let T=n[g%c],k;for(v=g+1;v<=_.end;v++){const P=n[v%c];k=RL(r.setContext(gc(i,{type:"segment",p0:T,p1:P,p0DataIndex:(v-1)%c,p1DataIndex:v%c,datasetIndex:s}))),QPe(k,p)&&b(g,v-1,_.loop,p),T=P,p=k}g<v-1&&b(g,v-1,_.loop,p)}return f}function RL(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function QPe(e,t){if(!t)return!1;const n=[],r=function(i,a){return aI(a)?(n.includes(a)||n.push(a),n.indexOf(a)):a};return JSON.stringify(e,r)!==JSON.stringify(t,r)}/*!
* Chart.js v4.4.0
* https://www.chartjs.org
* (c) 2023 Chart.js Contributors
* Released under the MIT License
*/class JPe{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const a=n.listeners[i],s=n.duration;a.forEach(o=>o({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(r-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=sj.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const a=r.items;let s=a.length-1,o=!1,c;for(;s>=0;--s)c=a[s],c._active?(c._total>r.duration&&(r.duration=c._total),c.tick(t),o=!0):(a[s]=a[a.length-1],a.pop());o&&(i.draw(),this._notify(i,r,t,"progress")),a.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=a.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);!n||(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Dl=new JPe;const DL="transparent",eTe={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=wL(e||DL),i=r.valid&&wL(t||DL);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class tTe{constructor(t,n,r,i){const a=n[r];i=L0([t.to,i,a,t.from]);const s=L0([t.from,a,i]);this._active=!0,this._fn=t.fn||eTe[t.type||typeof s],this._easing=ng[t.easing]||ng.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],a=r-this._start,s=this._duration-a;this._start=r,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=L0([t.to,n,i,t.from]),this._from=L0([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,a=this._from,s=this._loop,o=this._to;let c;if(this._active=a!==o&&(s||n<r),!this._active){this._target[i]=o,this._notify(!0);return}if(n<0){this._target[i]=a;return}c=n/r%2,c=s&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[i]=this._fn(a,o,c)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}class wj{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!br(t))return;const n=Object.keys(gi.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const a=t[i];if(!br(a))return;const s={};for(const o of n)s[o]=a[o];(oi(a.properties)&&a.properties||[i]).forEach(o=>{(o===i||!r.has(o))&&r.set(o,s)})})}_animateOptions(t,n){const r=n.options,i=rTe(t,r);if(!i)return[];const a=this._createAnimations(i,r);return r.$shared&&nTe(t.options.$animations,r).then(()=>{t.options=r},()=>{}),a}_createAnimations(t,n){const r=this._properties,i=[],a=t.$animations||(t.$animations={}),s=Object.keys(n),o=Date.now();let c;for(c=s.length-1;c>=0;--c){const f=s[c];if(f.charAt(0)==="$")continue;if(f==="options"){i.push(...this._animateOptions(t,n));continue}const p=n[f];let g=a[f];const v=r.get(f);if(g)if(v&&g.active()){g.update(v,p,o);continue}else g.cancel();if(!v||!v.duration){t[f]=p;continue}a[f]=g=new tTe(v,t,f,p),i.push(g)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return Dl.add(this._chart,r),!0}}function nTe(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const a=e[r[i]];a&&a.active()&&n.push(a.wait())}return Promise.all(n)}function rTe(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function OL(e,t){const n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,a=n.max===void 0?t:0;return{start:r?a:i,end:r?i:a}}function iTe(e,t,n){if(n===!1)return!1;const r=OL(e,n),i=OL(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function oTe(e){let t,n,r,i;return br(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i,disabled:e===!1}}function Cj(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,a;for(i=0,a=r.length;i<a;++i)n.push(r[i].index);return n}function AL(e,t,n,r={}){const i=e.keys,a=r.mode==="single";let s,o,c,f;if(t!==null){for(s=0,o=i.length;s<o;++s){if(c=+i[s],c===n){if(r.all)continue;break}f=e.values[c],eo(f)&&(a||t===0||ll(t)===ll(f))&&(t+=f)}return t}}function aTe(e){const t=Object.keys(e),n=new Array(t.length);let r,i,a;for(r=0,i=t.length;r<i;++r)a=t[r],n[r]={x:a,y:e[a]};return n}function NL(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function sTe(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function lTe(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function uTe(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function LL(e,t,n,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const a=e[i.index];if(n&&a>0||!n&&a<0)return i.index}return null}function FL(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:a,vScale:s,index:o}=r,c=a.axis,f=s.axis,p=sTe(a,s,r),g=t.length;let v;for(let b=0;b<g;++b){const _=t[b],{[c]:T,[f]:k}=_,P=_._stacks||(_._stacks={});v=P[f]=uTe(i,p,T),v[o]=k,v._top=LL(v,s,!0,r.type),v._bottom=LL(v,s,!1,r.type);const M=v._visualValues||(v._visualValues={});M[o]=k}}function qS(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function cTe(e,t){return gc(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function dTe(e,t,n){return gc(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function gm(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(!!r){t=t||e._parsed;for(const i of t){const a=i._stacks;if(!a||a[r]===void 0||a[r][n]===void 0)return;delete a[r][n],a[r]._visualValues!==void 0&&a[r]._visualValues[n]!==void 0&&delete a[r]._visualValues[n]}}}const ZS=e=>e==="reset"||e==="none",zL=(e,t)=>t?e:Object.assign({},e),fTe=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:Cj(n,!0),values:null};class sh{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=NL(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&gm(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(g,v,b,_)=>g==="x"?v:g==="r"?_:b,a=n.xAxisID=sr(r.xAxisID,qS(t,"x")),s=n.yAxisID=sr(r.yAxisID,qS(t,"y")),o=n.rAxisID=sr(r.rAxisID,qS(t,"r")),c=n.indexAxis,f=n.iAxisID=i(c,a,s,o),p=n.vAxisID=i(c,s,a,o);n.xScale=this.getScaleForId(a),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(o),n.iScale=this.getScaleForId(f),n.vScale=this.getScaleForId(p)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&xL(this._data,this),t._stacked&&gm(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(br(n))this._data=aTe(n);else if(r!==n){if(r){xL(r,this);const i=this._cachedMeta;gm(i),i._parsed=[]}n&&Object.isExtensible(n)&&GEe(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const a=n._stacked;n._stacked=NL(n.vScale,n),n.stack!==r.stack&&(i=!0,gm(n),n.stack=r.stack),this._resyncElements(t),(i||a!==n._stacked)&&FL(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:a,_stacked:s}=r,o=a.axis;let c=t===0&&n===i.length?!0:r._sorted,f=t>0&&r._parsed[t-1],p,g,v;if(this._parsing===!1)r._parsed=i,r._sorted=!0,v=i;else{oi(i[t])?v=this.parseArrayData(r,i,t,n):br(i[t])?v=this.parseObjectData(r,i,t,n):v=this.parsePrimitiveData(r,i,t,n);const b=()=>g[o]===null||f&&g[o]<f[o];for(p=0;p<n;++p)r._parsed[p+t]=g=v[p],c&&(b()&&(c=!1),f=g);r._sorted=c}s&&FL(this,v)}parsePrimitiveData(t,n,r,i){const{iScale:a,vScale:s}=t,o=a.axis,c=s.axis,f=a.getLabels(),p=a===s,g=new Array(i);let v,b,_;for(v=0,b=i;v<b;++v)_=v+r,g[v]={[o]:p||a.parse(f[_],_),[c]:s.parse(n[_],_)};return g}parseArrayData(t,n,r,i){const{xScale:a,yScale:s}=t,o=new Array(i);let c,f,p,g;for(c=0,f=i;c<f;++c)p=c+r,g=n[p],o[c]={x:a.parse(g[0],p),y:s.parse(g[1],p)};return o}parseObjectData(t,n,r,i){const{xScale:a,yScale:s}=t,{xAxisKey:o="x",yAxisKey:c="y"}=this._parsing,f=new Array(i);let p,g,v,b;for(p=0,g=i;p<g;++p)v=p+r,b=n[v],f[p]={x:a.parse(Mh(b,o),v),y:s.parse(Mh(b,c),v)};return f}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const i=this.chart,a=this._cachedMeta,s=n[t.axis],o={keys:Cj(i,!0),values:n._stacks[t.axis]._visualValues};return AL(o,s,a.index,{mode:r})}updateRangeFromParsed(t,n,r,i){const a=r[n.axis];let s=a===null?NaN:a;const o=i&&r._stacks[n.axis];i&&o&&(i.values=o,s=AL(i,a,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,n){const r=this._cachedMeta,i=r._parsed,a=r._sorted&&t===r.iScale,s=i.length,o=this._getOtherScale(t),c=fTe(n,r,this.chart),f={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:p,max:g}=lTe(o);let v,b;function _(){b=i[v];const T=b[o.axis];return!eo(b[t.axis])||p>T||g<T}for(v=0;v<s&&!(!_()&&(this.updateRangeFromParsed(f,t,b,c),a));++v);if(a){for(v=s-1;v>=0;--v)if(!_()){this.updateRangeFromParsed(f,t,b,c);break}}return f}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,a,s;for(i=0,a=n.length;i<a;++i)s=n[i][t.axis],eo(s)&&r.push(s);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,i=n.vScale,a=this.getParsed(t);return{label:r?""+r.getLabelForValue(a[r.axis]):"",value:i?""+i.getLabelForValue(a[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=oTe(sr(this.options.clip,iTe(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],a=n.chartArea,s=[],o=this._drawStart||0,c=this._drawCount||i.length-o,f=this.options.drawActiveElementsOnTop;let p;for(r.dataset&&r.dataset.draw(t,a,o,c),p=o;p<o+c;++p){const g=i[p];g.hidden||(g.active&&f?s.push(g):g.draw(t,a))}for(p=0;p<s.length;++p)s[p].draw(t,a)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const i=this.getDataset();let a;if(t>=0&&t<this._cachedMeta.data.length){const s=this._cachedMeta.data[t];a=s.$context||(s.$context=dTe(this.getContext(),t,s)),a.parsed=this.getParsed(t),a.raw=i.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=cTe(this.chart.getContext(),this.index)),a.dataset=i,a.index=a.datasetIndex=this.index;return a.active=!!n,a.mode=r,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const i=n==="active",a=this._cachedDataOpts,s=t+"-"+n,o=a[s],c=this.enableOptionSharing&&Bg(r);if(o)return zL(o,c);const f=this.chart.config,p=f.datasetElementScopeKeys(this._type,t),g=i?[`${t}Hover`,"hover",t,""]:[t,""],v=f.getOptionScopes(this.getDataset(),p),b=Object.keys(gi.elements[t]),_=()=>this.getContext(r,i,n),T=f.resolveNamedOptions(v,b,_,g);return T.$shared&&(T.$shared=c,a[s]=Object.freeze(zL(T,c))),T}_resolveAnimations(t,n,r){const i=this.chart,a=this._cachedDataOpts,s=`animation-${n}`,o=a[s];if(o)return o;let c;if(i.options.animation!==!1){const p=this.chart.config,g=p.datasetAnimationScopeKeys(this._type,n),v=p.getOptionScopes(this.getDataset(),g);c=p.createResolver(v,this.getContext(t,r,n))}const f=new wj(i,c&&c.animations);return c&&c._cacheable&&(a[s]=Object.freeze(f)),f}getSharedOptions(t){if(!!t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||ZS(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,a=this.getSharedOptions(r),s=this.includeOptions(n,a)||a!==i;return this.updateSharedOptions(a,n,r),{sharedOptions:a,includeOptions:s}}updateElement(t,n,r,i){ZS(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!ZS(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const a=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(a)||a})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[o,c,f]of this._syncList)this[o](c,f);this._syncList=[];const i=r.length,a=n.length,s=Math.min(a,i);s&&this.parse(0,s),a>i?this._insertElements(i,a-i,t):a<i&&this._removeElements(a,i-a)}_insertElements(t,n,r=!0){const i=this._cachedMeta,a=i.data,s=t+n;let o;const c=f=>{for(f.length+=n,o=f.length-1;o>=s;o--)f[o]=f[o-n]};for(c(a),o=t;o<s;++o)a[o]=new this.dataElementType;this._parsing&&c(i._parsed),this.parse(t,n),r&&this.updateElements(a,t,n,"reset")}updateElements(t,n,r,i){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,n);r._stacked&&gm(r,i)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,i]=t;this[n](r,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}Ln(sh,"defaults",{}),Ln(sh,"datasetElementType",null),Ln(sh,"dataElementType",null);function hTe(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let i=0,a=n.length;i<a;i++)r=r.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=aj(r.sort((i,a)=>i-a))}return e._cache.$bar}function pTe(e){const t=e.iScale,n=hTe(t,e.type);let r=t._length,i,a,s,o;const c=()=>{s===32767||s===-32768||(Bg(o)&&(r=Math.min(r,Math.abs(s-o)||r)),o=s)};for(i=0,a=n.length;i<a;++i)s=t.getPixelForValue(n[i]),c();for(o=void 0,i=0,a=t.ticks.length;i<a;++i)s=t.getPixelForTick(i),c();return r}function mTe(e,t,n,r){const i=n.barThickness;let a,s;return Ir(i)?(a=t.min*n.categoryPercentage,s=n.barPercentage):(a=i*r,s=1),{chunk:a/r,ratio:s,start:t.pixels[e]-a/2}}function gTe(e,t,n,r){const i=t.pixels,a=i[e];let s=e>0?i[e-1]:null,o=e<i.length-1?i[e+1]:null;const c=n.categoryPercentage;s===null&&(s=a-(o===null?t.end-t.start:o-a)),o===null&&(o=a+a-s);const f=a-(a-Math.min(s,o))/2*c;return{chunk:Math.abs(o-s)/2*c/r,ratio:n.barPercentage,start:f}}function vTe(e,t,n,r){const i=n.parse(e[0],r),a=n.parse(e[1],r),s=Math.min(i,a),o=Math.max(i,a);let c=s,f=o;Math.abs(s)>Math.abs(o)&&(c=o,f=s),t[n.axis]=f,t._custom={barStart:c,barEnd:f,start:i,end:a,min:s,max:o}}function Sj(e,t,n,r){return oi(e)?vTe(e,t,n,r):t[n.axis]=n.parse(e,r),t}function $L(e,t,n,r){const i=e.iScale,a=e.vScale,s=i.getLabels(),o=i===a,c=[];let f,p,g,v;for(f=n,p=n+r;f<p;++f)v=t[f],g={},g[i.axis]=o||i.parse(s[f],f),c.push(Sj(v,g,a,f));return c}function XS(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function yTe(e,t,n){return e!==0?ll(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function xTe(e){let t,n,r,i,a;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(i="end",a="start"):(i="start",a="end"),{start:n,end:r,reverse:t,top:i,bottom:a}}function bTe(e,t,n,r){let i=t.borderSkipped;const a={};if(!i){e.borderSkipped=a;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:o,reverse:c,top:f,bottom:p}=xTe(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?i=f:(n._bottom||0)===r?i=p:(a[BL(p,s,o,c)]=!0,i=f)),a[BL(i,s,o,c)]=!0,e.borderSkipped=a}function BL(e,t,n,r){return r?(e=_Te(e,t,n),e=VL(e,n,t)):e=VL(e,t,n),e}function _Te(e,t,n){return e===t?n:e===n?t:e}function VL(e,t,n){return e==="start"?t:e==="end"?n:e}function wTe(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class Cx extends sh{parsePrimitiveData(t,n,r,i){return $L(t,n,r,i)}parseArrayData(t,n,r,i){return $L(t,n,r,i)}parseObjectData(t,n,r,i){const{iScale:a,vScale:s}=t,{xAxisKey:o="x",yAxisKey:c="y"}=this._parsing,f=a.axis==="x"?o:c,p=s.axis==="x"?o:c,g=[];let v,b,_,T;for(v=r,b=r+i;v<b;++v)T=n[v],_={},_[a.axis]=a.parse(Mh(T,f),v),g.push(Sj(Mh(T,p),_,s,v));return g}updateRangeFromParsed(t,n,r,i){super.updateRangeFromParsed(t,n,r,i);const a=r._custom;a&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:i}=n,a=this.getParsed(t),s=a._custom,o=XS(s)?"["+s.start+", "+s.end+"]":""+i.getLabelForValue(a[i.axis]);return{label:""+r.getLabelForValue(a[r.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,i){const a=i==="reset",{index:s,_cachedMeta:{vScale:o}}=this,c=o.getBasePixel(),f=o.isHorizontal(),p=this._getRuler(),{sharedOptions:g,includeOptions:v}=this._getSharedOptions(n,i);for(let b=n;b<n+r;b++){const _=this.getParsed(b),T=a||Ir(_[o.axis])?{base:c,head:c}:this._calculateBarValuePixels(b),k=this._calculateBarIndexPixels(b,p),P=(_._stacks||{})[o.axis],M={horizontal:f,base:T.base,enableBorderRadius:!P||XS(_._custom)||s===P._top||s===P._bottom,x:f?T.head:k.center,y:f?k.center:T.head,height:f?k.size:Math.abs(T.size),width:f?Math.abs(T.size):k.size};v&&(M.options=g||this.resolveDataElementOptions(b,t[b].active?"active":i));const O=M.options||t[b].options;bTe(M,O,P,s),wTe(M,O,p.ratio),this.updateElement(t[b],b,M,i)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(c=>c.controller.options.grouped),a=r.options.stacked,s=[],o=c=>{const f=c.controller.getParsed(n),p=f&&f[c.vScale.axis];if(Ir(p)||isNaN(p))return!0};for(const c of i)if(!(n!==void 0&&o(c))&&((a===!1||s.indexOf(c.stack)===-1||a===void 0&&c.stack===void 0)&&s.push(c.stack),c.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,r){const i=this._getStacks(t,r),a=n!==void 0?i.indexOf(n):-1;return a===-1?i.length-1:a}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let a,s;for(a=0,s=n.data.length;a<s;++a)i.push(r.getPixelForValue(this.getParsed(a)[r.axis],a));const o=t.barThickness;return{min:o||pTe(n),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:o?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:r,index:i},options:{base:a,minBarLength:s}}=this,o=a||0,c=this.getParsed(t),f=c._custom,p=XS(f);let g=c[n.axis],v=0,b=r?this.applyStack(n,c,r):g,_,T;b!==g&&(v=b-g,b=g),p&&(g=f.barStart,b=f.barEnd-f.barStart,g!==0&&ll(g)!==ll(f.barEnd)&&(v=0),v+=g);const k=!Ir(a)&&!p?a:v;let P=n.getPixelForValue(k);if(this.chart.getDataVisibility(t)?_=n.getPixelForValue(v+b):_=P,T=_-P,Math.abs(T)<s){T=yTe(T,n,o)*s,g===o&&(P-=T/2);const M=n.getPixelForDecimal(0),O=n.getPixelForDecimal(1),N=Math.min(M,O),L=Math.max(M,O);P=Math.max(Math.min(P,L),N),_=P+T,r&&!p&&(c._stacks[n.axis]._visualValues[i]=n.getValueForPixel(_)-n.getValueForPixel(P))}if(P===n.getPixelForValue(o)){const M=ll(T)*n.getLineWidthForValue(o)/2;P+=M,T-=M}return{size:T,base:P,head:_,center:_+T/2}}_calculateBarIndexPixels(t,n){const r=n.scale,i=this.options,a=i.skipNull,s=sr(i.maxBarThickness,1/0);let o,c;if(n.grouped){const f=a?this._getStackCount(t):n.stackCount,p=i.barThickness==="flex"?gTe(t,n,i,f):mTe(t,n,i,f),g=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0);o=p.start+p.chunk*g+p.chunk/2,c=Math.min(s,p.chunk*p.ratio)}else o=r.getPixelForValue(this.getParsed(t)[r.axis],t),c=Math.min(s,n.min*n.ratio);return{base:o-c/2,head:o+c/2,center:o,size:c}}draw(){const t=this._cachedMeta,n=t.vScale,r=t.data,i=r.length;let a=0;for(;a<i;++a)this.getParsed(a)[n.axis]!==null&&r[a].draw(this._ctx)}}Ln(Cx,"id","bar"),Ln(Cx,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),Ln(Cx,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Sx extends sh{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:a}=n,s=this.chart._animationsDisabled;let{start:o,count:c}=XEe(n,i,s);this._drawStart=o,this._drawCount=c,YEe(n)&&(o=0,c=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!a._decimated,r.points=i;const f=this.resolveDatasetElementOptions(t);this.options.showLine||(f.borderWidth=0),f.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:f},t),this.updateElements(i,o,c,t)}updateElements(t,n,r,i){const a=i==="reset",{iScale:s,vScale:o,_stacked:c,_dataset:f}=this._cachedMeta,{sharedOptions:p,includeOptions:g}=this._getSharedOptions(n,i),v=s.axis,b=o.axis,{spanGaps:_,segment:T}=this.options,k=Vg(_)?_:Number.POSITIVE_INFINITY,P=this.chart._animationsDisabled||a||i==="none",M=n+r,O=t.length;let N=n>0&&this.getParsed(n-1);for(let L=0;L<O;++L){const $=t[L],j=P?$:{};if(L<n||L>=M){j.skip=!0;continue}const U=this.getParsed(L),G=Ir(U[b]),Z=j[v]=s.getPixelForValue(U[v],L),Q=j[b]=a||G?o.getBasePixel():o.getPixelForValue(c?this.applyStack(o,U,c):U[b],L);j.skip=isNaN(Z)||isNaN(Q)||G,j.stop=L>0&&Math.abs(U[v]-N[v])>k,T&&(j.parsed=U,j.raw=f.data[L]),g&&(j.options=p||this.resolveDataElementOptions(L,$.active?"active":i)),P||this.updateElement($,L,j,i),N=U}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const a=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,a,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Ln(Sx,"id","line"),Ln(Sx,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),Ln(Sx,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});function Gc(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class pI{constructor(t){Ln(this,"options");this.options=t||{}}static override(t){Object.assign(pI.prototype,t)}init(){}formats(){return Gc()}parse(){return Gc()}format(){return Gc()}add(){return Gc()}diff(){return Gc()}startOf(){return Gc()}endOf(){return Gc()}}var CTe={_date:pI};function STe(e,t,n,r){const{controller:i,data:a,_sorted:s}=e,o=i._cachedMeta.iScale;if(o&&t===o.axis&&t!=="r"&&s&&a.length){const c=o._reversePixels?KEe:gd;if(r){if(i._sharedOptions){const f=a[0],p=typeof f.getRange=="function"&&f.getRange(t);if(p){const g=c(a,t,n-p),v=c(a,t,n+p);return{lo:g.lo,hi:v.hi}}}}else return c(a,t,n)}return{lo:0,hi:a.length-1}}function Nv(e,t,n,r,i){const a=e.getSortedVisibleDatasetMetas(),s=n[t];for(let o=0,c=a.length;o<c;++o){const{index:f,data:p}=a[o],{lo:g,hi:v}=STe(a[o],t,s,i);for(let b=g;b<=v;++b){const _=p[b];_.skip||r(_,f,b)}}}function ETe(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,i){const a=t?Math.abs(r.x-i.x):0,s=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(s,2))}}function YS(e,t,n,r,i){const a=[];return!i&&!e.isPointInArea(t)||Nv(e,n,t,function(o,c,f){!i&&!Hl(o,e.chartArea,0)||o.inRange(t.x,t.y,r)&&a.push({element:o,datasetIndex:c,index:f})},!0),a}function PTe(e,t,n,r){let i=[];function a(s,o,c){const{startAngle:f,endAngle:p}=s.getProps(["startAngle","endAngle"],r),{angle:g}=UEe(s,{x:t.x,y:t.y});ij(g,f,p)&&i.push({element:s,datasetIndex:o,index:c})}return Nv(e,n,t,a),i}function TTe(e,t,n,r,i,a){let s=[];const o=ETe(n);let c=Number.POSITIVE_INFINITY;function f(p,g,v){const b=p.inRange(t.x,t.y,i);if(r&&!b)return;const _=p.getCenterPoint(i);if(!(!!a||e.isPointInArea(_))&&!b)return;const k=o(t,_);k<c?(s=[{element:p,datasetIndex:g,index:v}],c=k):k===c&&s.push({element:p,datasetIndex:g,index:v})}return Nv(e,n,t,f),s}function QS(e,t,n,r,i,a){return!a&&!e.isPointInArea(t)?[]:n==="r"&&!r?PTe(e,t,n,i):TTe(e,t,n,r,i,a)}function UL(e,t,n,r,i){const a=[],s=n==="x"?"inXRange":"inYRange";let o=!1;return Nv(e,n,t,(c,f,p)=>{c[s](t[n],i)&&(a.push({element:c,datasetIndex:f,index:p}),o=o||c.inRange(t.x,t.y,i))}),r&&!o?[]:a}var kTe={evaluateInteractionItems:Nv,modes:{index(e,t,n,r){const i=rd(t,e),a=n.axis||"x",s=n.includeInvisible||!1,o=n.intersect?YS(e,i,a,r,s):QS(e,i,a,!1,r,s),c=[];return o.length?(e.getSortedVisibleDatasetMetas().forEach(f=>{const p=o[0].index,g=f.data[p];g&&!g.skip&&c.push({element:g,datasetIndex:f.index,index:p})}),c):[]},dataset(e,t,n,r){const i=rd(t,e),a=n.axis||"xy",s=n.includeInvisible||!1;let o=n.intersect?YS(e,i,a,r,s):QS(e,i,a,!1,r,s);if(o.length>0){const c=o[0].datasetIndex,f=e.getDatasetMeta(c).data;o=[];for(let p=0;p<f.length;++p)o.push({element:f[p],datasetIndex:c,index:p})}return o},point(e,t,n,r){const i=rd(t,e),a=n.axis||"xy",s=n.includeInvisible||!1;return YS(e,i,a,r,s)},nearest(e,t,n,r){const i=rd(t,e),a=n.axis||"xy",s=n.includeInvisible||!1;return QS(e,i,a,n.intersect,r,s)},x(e,t,n,r){const i=rd(t,e);return UL(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=rd(t,e);return UL(e,i,"y",n.intersect,r)}}};const Ej=["left","top","right","bottom"];function vm(e,t){return e.filter(n=>n.pos===t)}function jL(e,t){return e.filter(n=>Ej.indexOf(n.pos)===-1&&n.box.axis===t)}function ym(e,t){return e.sort((n,r)=>{const i=t?r:n,a=t?n:r;return i.weight===a.weight?i.index-a.index:i.weight-a.weight})}function ITe(e){const t=[];let n,r,i,a,s,o;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:a,options:{stack:s,stackWeight:o=1}}=i,t.push({index:n,box:i,pos:a,horizontal:i.isHorizontal(),weight:i.weight,stack:s&&a+s,stackWeight:o});return t}function MTe(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:a}=n;if(!r||!Ej.includes(i))continue;const s=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=a}return t}function RTe(e,t){const n=MTe(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let a,s,o;for(a=0,s=e.length;a<s;++a){o=e[a];const{fullSize:c}=o.box,f=n[o.stack],p=f&&o.stackWeight/f.weight;o.horizontal?(o.width=p?p*r:c&&t.availableWidth,o.height=i):(o.width=r,o.height=p?p*i:c&&t.availableHeight)}return n}function DTe(e){const t=ITe(e),n=ym(t.filter(f=>f.box.fullSize),!0),r=ym(vm(t,"left"),!0),i=ym(vm(t,"right")),a=ym(vm(t,"top"),!0),s=ym(vm(t,"bottom")),o=jL(t,"x"),c=jL(t,"y");return{fullSize:n,leftAndTop:r.concat(a),rightAndBottom:i.concat(c).concat(s).concat(o),chartArea:vm(t,"chartArea"),vertical:r.concat(i).concat(c),horizontal:a.concat(s).concat(o)}}function HL(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function Pj(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function OTe(e,t,n,r){const{pos:i,box:a}=n,s=e.maxPadding;if(!br(i)){n.size&&(e[i]-=n.size);const g=r[n.stack]||{size:0,count:1};g.size=Math.max(g.size,n.horizontal?a.height:a.width),n.size=g.size/g.count,e[i]+=n.size}a.getPadding&&Pj(s,a.getPadding());const o=Math.max(0,t.outerWidth-HL(s,e,"left","right")),c=Math.max(0,t.outerHeight-HL(s,e,"top","bottom")),f=o!==e.w,p=c!==e.h;return e.w=o,e.h=c,n.horizontal?{same:f,other:p}:{same:p,other:f}}function ATe(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function NTe(e,t){const n=t.maxPadding;function r(i){const a={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{a[s]=Math.max(t[s],n[s])}),a}return r(e?["left","right"]:["top","bottom"])}function Rm(e,t,n,r){const i=[];let a,s,o,c,f,p;for(a=0,s=e.length,f=0;a<s;++a){o=e[a],c=o.box,c.update(o.width||t.w,o.height||t.h,NTe(o.horizontal,t));const{same:g,other:v}=OTe(t,n,o,r);f|=g&&i.length,p=p||v,c.fullSize||i.push(o)}return f&&Rm(i,t,n,r)||p}function $0(e,t,n,r,i){e.top=n,e.left=t,e.right=t+r,e.bottom=n+i,e.width=r,e.height=i}function KL(e,t,n,r){const i=n.padding;let{x:a,y:s}=t;for(const o of e){const c=o.box,f=r[o.stack]||{count:1,placed:0,weight:1},p=o.stackWeight/f.weight||1;if(o.horizontal){const g=t.w*p,v=f.size||c.height;Bg(f.start)&&(s=f.start),c.fullSize?$0(c,i.left,s,n.outerWidth-i.right-i.left,v):$0(c,t.left+f.placed,s,g,v),f.start=s,f.placed+=g,s=c.bottom}else{const g=t.h*p,v=f.size||c.width;Bg(f.start)&&(a=f.start),c.fullSize?$0(c,a,i.top,v,n.outerHeight-i.bottom-i.top):$0(c,a,t.top+f.placed,v,g),f.start=a,f.placed+=g,a=c.right}}t.x=a,t.y=s}var ns={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const i=Io(e.options.layout.padding),a=Math.max(t-i.width,0),s=Math.max(n-i.height,0),o=DTe(e.boxes),c=o.vertical,f=o.horizontal;kr(e.boxes,T=>{typeof T.beforeLayout=="function"&&T.beforeLayout()});const p=c.reduce((T,k)=>k.box.options&&k.box.options.display===!1?T:T+1,0)||1,g=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:a,availableHeight:s,vBoxMaxWidth:a/2/p,hBoxMaxHeight:s/2}),v=Object.assign({},i);Pj(v,Io(r));const b=Object.assign({maxPadding:v,w:a,h:s,x:i.left,y:i.top},i),_=RTe(c.concat(f),g);Rm(o.fullSize,b,g,_),Rm(c,b,g,_),Rm(f,b,g,_)&&Rm(c,b,g,_),ATe(b),KL(o.leftAndTop,b,g,_),b.x+=b.w,b.y+=b.h,KL(o.rightAndBottom,b,g,_),e.chartArea={left:b.left,top:b.top,right:b.left+b.w,bottom:b.top+b.h,height:b.h,width:b.w},kr(o.chartArea,T=>{const k=T.box;Object.assign(k,e.chartArea),k.update(b.w,b.h,{left:0,top:0,right:0,bottom:0})})}};class Tj{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class LTe extends Tj{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Ex="$chartjs",FTe={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},WL=e=>e===null||e==="";function zTe(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[Ex]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",WL(i)){const a=kL(e,"width");a!==void 0&&(e.width=a)}if(WL(r))if(e.style.height==="")e.height=e.width/(t||2);else{const a=kL(e,"height");a!==void 0&&(e.height=a)}return e}const kj=BPe?{passive:!0}:!1;function $Te(e,t,n){e.addEventListener(t,n,kj)}function BTe(e,t,n){e.canvas.removeEventListener(t,n,kj)}function VTe(e,t){const n=FTe[e.type]||e.type,{x:r,y:i}=rd(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function i_(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function UTe(e,t,n){const r=e.canvas,i=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||i_(o.addedNodes,r),s=s&&!i_(o.removedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function jTe(e,t,n){const r=e.canvas,i=new MutationObserver(a=>{let s=!1;for(const o of a)s=s||i_(o.removedNodes,r),s=s&&!i_(o.addedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const jg=new Map;let GL=0;function Ij(){const e=window.devicePixelRatio;e!==GL&&(GL=e,jg.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function HTe(e,t){jg.size||window.addEventListener("resize",Ij),jg.set(e,t)}function KTe(e){jg.delete(e),jg.size||window.removeEventListener("resize",Ij)}function WTe(e,t,n){const r=e.canvas,i=r&&hI(r);if(!i)return;const a=lj((o,c)=>{const f=i.clientWidth;n(o,c),f<i.clientWidth&&n()},window),s=new ResizeObserver(o=>{const c=o[0],f=c.contentRect.width,p=c.contentRect.height;f===0&&p===0||a(f,p)});return s.observe(i),HTe(e,a),s}function JS(e,t,n){n&&n.disconnect(),t==="resize"&&KTe(e)}function GTe(e,t,n){const r=e.canvas,i=lj(a=>{e.ctx!==null&&n(VTe(a,e))},e);return $Te(r,t,i),i}class qTe extends Tj{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(zTe(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[Ex])return!1;const r=n[Ex].initial;["height","width"].forEach(a=>{const s=r[a];Ir(s)?n.removeAttribute(a):n.setAttribute(a,s)});const i=r.style||{};return Object.keys(i).forEach(a=>{n.style[a]=i[a]}),n.width=n.width,delete n[Ex],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),s={attach:UTe,detach:jTe,resize:WTe}[n]||GTe;i[n]=s(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:JS,detach:JS,resize:JS}[n]||BTe)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return $Pe(t,n,r,i)}isAttached(t){const n=hI(t);return!!(n&&n.isConnected)}}function ZTe(e){return!yj()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?LTe:qTe}class ul{constructor(){Ln(this,"x");Ln(this,"y");Ln(this,"active",!1);Ln(this,"options");Ln(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return Vg(this.x)&&Vg(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(a=>{i[a]=r[a]&&r[a].active()?r[a]._to:this[a]}),i}}Ln(ul,"defaults",{}),Ln(ul,"defaultRoutes");function XTe(e,t){const n=e.options.ticks,r=YTe(e),i=Math.min(n.maxTicksLimit||r,r),a=n.major.enabled?JTe(t):[],s=a.length,o=a[0],c=a[s-1],f=[];if(s>i)return eke(t,f,a,s/i),f;const p=QTe(a,t,i);if(s>0){let g,v;const b=s>1?Math.round((c-o)/(s-1)):null;for(B0(t,f,p,Ir(b)?0:o-b,o),g=0,v=s-1;g<v;g++)B0(t,f,p,a[g],a[g+1]);return B0(t,f,p,c,Ir(b)?t.length:c+b),f}return B0(t,f,p),f}function YTe(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}function QTe(e,t,n){const r=tke(e),i=t.length/n;if(!r)return Math.max(i,1);const a=BEe(r);for(let s=0,o=a.length-1;s<o;s++){const c=a[s];if(c>i)return c}return Math.max(i,1)}function JTe(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function eke(e,t,n,r){let i=0,a=n[0],s;for(r=Math.ceil(r),s=0;s<e.length;s++)s===a&&(t.push(e[s]),i++,a=n[i*r])}function B0(e,t,n,r,i){const a=sr(r,0),s=Math.min(sr(i,e.length),e.length);let o=0,c,f,p;for(n=Math.ceil(n),i&&(c=i-r,n=c/Math.floor(c/n)),p=a;p<0;)o++,p=Math.round(a+o*n);for(f=Math.max(a,0);f<s;f++)f===p&&(t.push(e[f]),o++,p=Math.round(a+o*n))}function tke(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}const nke=e=>e==="left"?"right":e==="right"?"left":e,qL=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,ZL=(e,t)=>Math.min(t||e,e);function XL(e,t){const n=[],r=e.length/t,i=e.length;let a=0;for(;a<i;a+=r)n.push(e[Math.floor(a)]);return n}function rke(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),a=e._startPixel,s=e._endPixel,o=1e-6;let c=e.getPixelForTick(i),f;if(!(n&&(r===1?f=Math.max(c-a,s-c):t===0?f=(e.getPixelForTick(1)-c)/2:f=(c-e.getPixelForTick(i-1))/2,c+=i<t?f:-f,c<a-o||c>s+o)))return c}function ike(e,t){kr(e,n=>{const r=n.gc,i=r.length/2;let a;if(i>t){for(a=0;a<i;++a)delete n.data[r[a]];r.splice(0,i)}})}function xm(e){return e.drawTicks?e.tickLength:0}function YL(e,t){if(!e.display)return 0;const n=Hi(e.font,t),r=Io(e.padding);return(oi(e.text)?e.text.length:1)*n.lineHeight+r.height}function oke(e,t){return gc(e,{scale:t,type:"scale"})}function ake(e,t,n){return gc(e,{tick:n,index:t,type:"tick"})}function ske(e,t,n){let r=oI(e);return(n&&t!=="right"||!n&&t==="right")&&(r=nke(r)),r}function lke(e,t,n,r){const{top:i,left:a,bottom:s,right:o,chart:c}=e,{chartArea:f,scales:p}=c;let g=0,v,b,_;const T=s-i,k=o-a;if(e.isHorizontal()){if(b=wo(r,a,o),br(n)){const P=Object.keys(n)[0],M=n[P];_=p[P].getPixelForValue(M)+T-t}else n==="center"?_=(f.bottom+f.top)/2+T-t:_=qL(e,n,t);v=o-a}else{if(br(n)){const P=Object.keys(n)[0],M=n[P];b=p[P].getPixelForValue(M)-k+t}else n==="center"?b=(f.left+f.right)/2-k+t:b=qL(e,n,t);_=wo(r,s,i),g=n==="left"?-Ca:Ca}return{titleX:b,titleY:_,maxWidth:v,rotation:g}}class Gd extends ul{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return t=ya(t,Number.POSITIVE_INFINITY),n=ya(n,Number.NEGATIVE_INFINITY),r=ya(r,Number.POSITIVE_INFINITY),i=ya(i,Number.NEGATIVE_INFINITY),{min:ya(t,r),max:ya(n,i),minDefined:eo(t),maxDefined:eo(n)}}getMinMax(t){let{min:n,max:r,minDefined:i,maxDefined:a}=this.getUserBounds(),s;if(i&&a)return{min:n,max:r};const o=this.getMatchingVisibleMetas();for(let c=0,f=o.length;c<f;++c)s=o[c].controller.getMinMax(this,t),i||(n=Math.min(n,s.min)),a||(r=Math.max(r,s.max));return n=a&&n>r?r:n,r=i&&n>r?n:r,{min:ya(n,ya(r,n)),max:ya(r,ya(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){qr(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:a,ticks:s}=this.options,o=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=vPe(this,a,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=o<this.ticks.length;this._convertTicksToLabels(c?XL(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=XTe(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){qr(this.options.afterUpdate,[this])}beforeSetDimensions(){qr(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){qr(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),qr(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){qr(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,i,a;for(r=0,i=t.length;r<i;r++)a=t[r],a.label=qr(n.callback,[a.value,r,t],this)}afterTickToLabelConversion(){qr(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){qr(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=ZL(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,a=n.maxRotation;let s=i,o,c,f;if(!this._isVisible()||!n.display||i>=a||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const p=this._getLabelSizes(),g=p.widest.width,v=p.highest.height,b=Sa(this.chart.width-g,0,this.maxWidth);o=t.offset?this.maxWidth/r:b/(r-1),g+6>o&&(o=b/(r-(t.offset?.5:1)),c=this.maxHeight-xm(t.grid)-n.padding-YL(t.title,this.chart.options.font),f=Math.sqrt(g*g+v*v),s=rI(Math.min(Math.asin(Sa((p.highest.height+6)/o,-1,1)),Math.asin(Sa(c/f,-1,1))-Math.asin(Sa(v/f,-1,1)))),s=Math.max(i,Math.min(a,s))),this.labelRotation=s}afterCalculateLabelRotation(){qr(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){qr(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:a}}=this,s=this._isVisible(),o=this.isHorizontal();if(s){const c=YL(i,n.options.font);if(o?(t.width=this.maxWidth,t.height=xm(a)+c):(t.height=this.maxHeight,t.width=xm(a)+c),r.display&&this.ticks.length){const{first:f,last:p,widest:g,highest:v}=this._getLabelSizes(),b=r.padding*2,_=Vu(this.labelRotation),T=Math.cos(_),k=Math.sin(_);if(o){const P=r.mirror?0:k*g.width+T*v.height;t.height=Math.min(this.maxHeight,t.height+P+b)}else{const P=r.mirror?0:T*g.width+k*v.height;t.width=Math.min(this.maxWidth,t.width+P+b)}this._calculatePadding(f,p,k,T)}}this._handleMargins(),o?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:a,padding:s},position:o}=this.options,c=this.labelRotation!==0,f=o!=="top"&&this.axis==="x";if(this.isHorizontal()){const p=this.getPixelForTick(0)-this.left,g=this.right-this.getPixelForTick(this.ticks.length-1);let v=0,b=0;c?f?(v=i*t.width,b=r*n.height):(v=r*t.height,b=i*n.width):a==="start"?b=n.width:a==="end"?v=t.width:a!=="inner"&&(v=t.width/2,b=n.width/2),this.paddingLeft=Math.max((v-p+s)*this.width/(this.width-p),0),this.paddingRight=Math.max((b-g+s)*this.width/(this.width-g),0)}else{let p=n.height/2,g=t.height/2;a==="start"?(p=0,g=t.height):a==="end"&&(p=n.height,g=0),this.paddingTop=p+s,this.paddingBottom=g+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){qr(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)Ir(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=XL(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:i,_longestTextCache:a}=this,s=[],o=[],c=Math.floor(n/ZL(n,r));let f=0,p=0,g,v,b,_,T,k,P,M,O,N,L;for(g=0;g<n;g+=c){if(_=t[g].label,T=this._resolveTickFontOptions(g),i.font=k=T.string,P=a[k]=a[k]||{data:{},gc:[]},M=T.lineHeight,O=N=0,!Ir(_)&&!oi(_))O=n_(i,P.data,P.gc,O,_),N=M;else if(oi(_))for(v=0,b=_.length;v<b;++v)L=_[v],!Ir(L)&&!oi(L)&&(O=n_(i,P.data,P.gc,O,L),N+=M);s.push(O),o.push(N),f=Math.max(O,f),p=Math.max(N,p)}ike(a,n);const $=s.indexOf(f),j=o.indexOf(p),U=G=>({width:s[G]||0,height:o[G]||0});return{first:U(0),last:U(n-1),widest:U($),highest:U(j),widths:s,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return HEe(this._alignToPixels?Wc(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=ake(this.getContext(),t,r))}return this.$context||(this.$context=oke(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Vu(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),a=this._getLabelSizes(),s=t.autoSkipPadding||0,o=a?a.widest.width+s:0,c=a?a.highest.height+s:0;return this.isHorizontal()?c*r>o*i?o/r:c/i:c*i<o*r?c/r:o/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:a,position:s,border:o}=i,c=a.offset,f=this.isHorizontal(),g=this.ticks.length+(c?1:0),v=xm(a),b=[],_=o.setContext(this.getContext()),T=_.display?_.width:0,k=T/2,P=function(ie){return Wc(r,ie,T)};let M,O,N,L,$,j,U,G,Z,Q,J,re;if(s==="top")M=P(this.bottom),j=this.bottom-v,G=M-k,Q=P(t.top)+k,re=t.bottom;else if(s==="bottom")M=P(this.top),Q=t.top,re=P(t.bottom)-k,j=M+k,G=this.top+v;else if(s==="left")M=P(this.right),$=this.right-v,U=M-k,Z=P(t.left)+k,J=t.right;else if(s==="right")M=P(this.left),Z=t.left,J=P(t.right)-k,$=M+k,U=this.left+v;else if(n==="x"){if(s==="center")M=P((t.top+t.bottom)/2+.5);else if(br(s)){const ie=Object.keys(s)[0],ue=s[ie];M=P(this.chart.scales[ie].getPixelForValue(ue))}Q=t.top,re=t.bottom,j=M+k,G=j+v}else if(n==="y"){if(s==="center")M=P((t.left+t.right)/2);else if(br(s)){const ie=Object.keys(s)[0],ue=s[ie];M=P(this.chart.scales[ie].getPixelForValue(ue))}$=M-k,U=$-v,Z=t.left,J=t.right}const ne=sr(i.ticks.maxTicksLimit,g),ge=Math.max(1,Math.ceil(g/ne));for(O=0;O<g;O+=ge){const ie=this.getContext(O),ue=a.setContext(ie),oe=o.setContext(ie),me=ue.lineWidth,Te=ue.color,we=oe.dash||[],be=oe.dashOffset,Re=ue.tickWidth,Ee=ue.tickColor,Me=ue.tickBorderDash||[],Ae=ue.tickBorderDashOffset;N=rke(this,O,c),N!==void 0&&(L=Wc(r,N,me),f?$=U=Z=J=L:j=G=Q=re=L,b.push({tx1:$,ty1:j,tx2:U,ty2:G,x1:Z,y1:Q,x2:J,y2:re,width:me,color:Te,borderDash:we,borderDashOffset:be,tickWidth:Re,tickColor:Ee,tickBorderDash:Me,tickBorderDashOffset:Ae}))}return this._ticksLength=g,this._borderValue=M,b}_computeLabelItems(t){const n=this.axis,r=this.options,{position:i,ticks:a}=r,s=this.isHorizontal(),o=this.ticks,{align:c,crossAlign:f,padding:p,mirror:g}=a,v=xm(r.grid),b=v+p,_=g?-p:b,T=-Vu(this.labelRotation),k=[];let P,M,O,N,L,$,j,U,G,Z,Q,J,re="middle";if(i==="top")$=this.bottom-_,j=this._getXAxisLabelAlignment();else if(i==="bottom")$=this.top+_,j=this._getXAxisLabelAlignment();else if(i==="left"){const ge=this._getYAxisLabelAlignment(v);j=ge.textAlign,L=ge.x}else if(i==="right"){const ge=this._getYAxisLabelAlignment(v);j=ge.textAlign,L=ge.x}else if(n==="x"){if(i==="center")$=(t.top+t.bottom)/2+b;else if(br(i)){const ge=Object.keys(i)[0],ie=i[ge];$=this.chart.scales[ge].getPixelForValue(ie)+b}j=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")L=(t.left+t.right)/2-b;else if(br(i)){const ge=Object.keys(i)[0],ie=i[ge];L=this.chart.scales[ge].getPixelForValue(ie)}j=this._getYAxisLabelAlignment(v).textAlign}n==="y"&&(c==="start"?re="top":c==="end"&&(re="bottom"));const ne=this._getLabelSizes();for(P=0,M=o.length;P<M;++P){O=o[P],N=O.label;const ge=a.setContext(this.getContext(P));U=this.getPixelForTick(P)+a.labelOffset,G=this._resolveTickFontOptions(P),Z=G.lineHeight,Q=oi(N)?N.length:1;const ie=Q/2,ue=ge.color,oe=ge.textStrokeColor,me=ge.textStrokeWidth;let Te=j;s?(L=U,j==="inner"&&(P===M-1?Te=this.options.reverse?"left":"right":P===0?Te=this.options.reverse?"right":"left":Te="center"),i==="top"?f==="near"||T!==0?J=-Q*Z+Z/2:f==="center"?J=-ne.highest.height/2-ie*Z+Z:J=-ne.highest.height+Z/2:f==="near"||T!==0?J=Z/2:f==="center"?J=ne.highest.height/2-ie*Z:J=ne.highest.height-Q*Z,g&&(J*=-1),T!==0&&!ge.showLabelBackdrop&&(L+=Z/2*Math.sin(T))):($=U,J=(1-Q)*Z/2);let we;if(ge.showLabelBackdrop){const be=Io(ge.backdropPadding),Re=ne.heights[P],Ee=ne.widths[P];let Me=J-be.top,Ae=0-be.left;switch(re){case"middle":Me-=Re/2;break;case"bottom":Me-=Re;break}switch(j){case"center":Ae-=Ee/2;break;case"right":Ae-=Ee;break}we={left:Ae,top:Me,width:Ee+be.width,height:Re+be.height,color:ge.backdropColor}}k.push({label:N,font:G,textOffset:J,options:{rotation:T,color:ue,strokeColor:oe,strokeWidth:me,textAlign:Te,textBaseline:re,translation:[L,$],backdrop:we}})}return k}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Vu(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:i,padding:a}}=this.options,s=this._getLabelSizes(),o=t+a,c=s.widest.width;let f,p;return n==="left"?i?(p=this.right+a,r==="near"?f="left":r==="center"?(f="center",p+=c/2):(f="right",p+=c)):(p=this.right-o,r==="near"?f="right":r==="center"?(f="center",p-=c/2):(f="left",p=this.left)):n==="right"?i?(p=this.left+a,r==="near"?f="right":r==="center"?(f="center",p-=c/2):(f="left",p-=c)):(p=this.left+o,r==="near"?f="left":r==="center"?(f="center",p+=c/2):(f="right",p=this.right)):f="right",{textAlign:f,x:p}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:i,width:a,height:s}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,a,s),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(a=>a.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,s;const o=(c,f,p)=>{!p.width||!p.color||(r.save(),r.lineWidth=p.width,r.strokeStyle=p.color,r.setLineDash(p.borderDash||[]),r.lineDashOffset=p.borderDashOffset,r.beginPath(),r.moveTo(c.x,c.y),r.lineTo(f.x,f.y),r.stroke(),r.restore())};if(n.display)for(a=0,s=i.length;a<s;++a){const c=i[a];n.drawOnChartArea&&o({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),n.drawTicks&&o({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:r,grid:i}}=this,a=r.setContext(this.getContext()),s=r.display?a.width:0;if(!s)return;const o=i.setContext(this.getContext(0)).lineWidth,c=this._borderValue;let f,p,g,v;this.isHorizontal()?(f=Wc(t,this.left,s)-s/2,p=Wc(t,this.right,o)+o/2,g=v=c):(g=Wc(t,this.top,s)-s/2,v=Wc(t,this.bottom,o)+o/2,f=p=c),n.save(),n.lineWidth=a.width,n.strokeStyle=a.color,n.beginPath(),n.moveTo(f,g),n.lineTo(p,v),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&lI(r,i);const a=this.getLabelItems(t);for(const s of a){const o=s.options,c=s.font,f=s.label,p=s.textOffset;Ld(r,f,0,p,c,o)}i&&uI(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const a=Hi(r.font),s=Io(r.padding),o=r.align;let c=a.lineHeight/2;n==="bottom"||n==="center"||br(n)?(c+=s.bottom,oi(r.text)&&(c+=a.lineHeight*(r.text.length-1))):c+=s.top;const{titleX:f,titleY:p,maxWidth:g,rotation:v}=lke(this,c,n,o);Ld(t,r.text,0,0,a,{color:r.color,maxWidth:g,rotation:v,textAlign:ske(o,n,i),textBaseline:"middle",translation:[f,p]})}draw(t){!this._isVisible()||(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=sr(t.grid&&t.grid.z,-1),i=sr(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Gd.prototype.draw?[{z:n,draw:a=>{this.draw(a)}}]:[{z:r,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let a,s;for(a=0,s=n.length;a<s;++a){const o=n[a];o[r]===this.id&&(!t||o.type===t)&&i.push(o)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return Hi(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class V0{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;dke(n)&&(r=this.register(n));const i=this.items,a=t.id,s=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+t);return a in i||(i[a]=t,uke(t,s,r),this.override&&gi.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,i=this.scope;r in n&&delete n[r],i&&r in gi[i]&&(delete gi[i][r],this.override&&delete Nd[r])}}function uke(e,t,n){const r=$g(Object.create(null),[n?gi.get(n):{},gi.get(t),e.defaults]);gi.set(t,r),e.defaultRoutes&&cke(t,e.defaultRoutes),e.descriptors&&gi.describe(t,e.descriptors)}function cke(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),i=r.pop(),a=[e].concat(r).join("."),s=t[n].split("."),o=s.pop(),c=s.join(".");gi.route(a,i,c,o)})}function dke(e){return"id"in e&&"defaults"in e}class fke{constructor(){this.controllers=new V0(sh,"datasets",!0),this.elements=new V0(ul,"elements"),this.plugins=new V0(Object,"plugins"),this.scales=new V0(Gd,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const a=r||this._getRegistryForType(i);r||a.isForType(i)||a===this.plugins&&i.id?this._exec(t,a,i):kr(i,s=>{const o=r||this._getRegistryForType(s);this._exec(t,o,s)})})}_exec(t,n,r){const i=nI(t);qr(r["before"+i],[],r),n[t](r),qr(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var Js=new fke;class hke{constructor(){this._init=[]}notify(t,n,r,i){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const a=i?this._descriptors(t).filter(i):this._descriptors(t),s=this._notify(a,t,n,r);return n==="afterDestroy"&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall")),s}_notify(t,n,r,i){i=i||{};for(const a of t){const s=a.plugin,o=s[r],c=[n,i,a.options];if(qr(o,c,s)===!1&&i.cancelable)return!1}return!0}invalidate(){Ir(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,i=sr(r.options&&r.options.plugins,{}),a=pke(r);return i===!1&&!n?[]:gke(t,a,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,i=(a,s)=>a.filter(o=>!s.some(c=>o.plugin.id===c.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function pke(e){const t={},n=[],r=Object.keys(Js.plugins.items);for(let a=0;a<r.length;a++)n.push(Js.getPlugin(r[a]));const i=e.plugins||[];for(let a=0;a<i.length;a++){const s=i[a];n.indexOf(s)===-1&&(n.push(s),t[s.id]=!0)}return{plugins:n,localIds:t}}function mke(e,t){return!t&&e===!1?null:e===!0?{}:e}function gke(e,{plugins:t,localIds:n},r,i){const a=[],s=e.getContext();for(const o of t){const c=o.id,f=mke(r[c],i);f!==null&&a.push({plugin:o,options:vke(e.config,{plugin:o,local:n[c]},f,s)})}return a}function vke(e,{plugin:t,local:n},r,i){const a=e.pluginScopeKeys(t),s=e.getOptionScopes(r,a);return n&&t.defaults&&s.push(t.defaults),e.createResolver(s,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function $E(e,t){const n=gi.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function yke(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function xke(e,t){return e===t?"_index_":"_value_"}function QL(e){if(e==="x"||e==="y"||e==="r")return e}function bke(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function BE(e,...t){if(QL(e))return e;for(const n of t){const r=n.axis||bke(n.position)||e.length>1&&QL(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function JL(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function _ke(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return JL(e,"x",n[0])||JL(e,"y",n[0])}return{}}function wke(e,t){const n=Nd[e.type]||{scales:{}},r=t.scales||{},i=$E(e.type,t),a=Object.create(null);return Object.keys(r).forEach(s=>{const o=r[s];if(!br(o))return console.error(`Invalid scale configuration for scale: ${s}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const c=BE(s,o,_ke(s,e),gi.scales[o.type]),f=xke(c,i),p=n.scales||{};a[s]=eg(Object.create(null),[{axis:c},o,p[c],p[f]])}),e.data.datasets.forEach(s=>{const o=s.type||e.type,c=s.indexAxis||$E(o,t),p=(Nd[o]||{}).scales||{};Object.keys(p).forEach(g=>{const v=yke(g,c),b=s[v+"AxisID"]||v;a[b]=a[b]||Object.create(null),eg(a[b],[{axis:v},r[b],p[g]])})}),Object.keys(a).forEach(s=>{const o=a[s];eg(o,[gi.scales[o.type],gi.scale])}),a}function Mj(e){const t=e.options||(e.options={});t.plugins=sr(t.plugins,{}),t.scales=wke(e,t)}function Rj(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Cke(e){return e=e||{},e.data=Rj(e.data),Mj(e),e}const eF=new Map,Dj=new Set;function U0(e,t){let n=eF.get(e);return n||(n=t(),eF.set(e,n),Dj.add(n)),n}const bm=(e,t,n)=>{const r=Mh(t,n);r!==void 0&&e.add(r)};class Ske{constructor(t){this._config=Cke(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Rj(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Mj(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return U0(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return U0(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return U0(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return U0(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:a}=this,s=this._cachedScopes(t,r),o=s.get(n);if(o)return o;const c=new Set;n.forEach(p=>{t&&(c.add(t),p.forEach(g=>bm(c,t,g))),p.forEach(g=>bm(c,i,g)),p.forEach(g=>bm(c,Nd[a]||{},g)),p.forEach(g=>bm(c,gi,g)),p.forEach(g=>bm(c,FE,g))});const f=Array.from(c);return f.length===0&&f.push(Object.create(null)),Dj.has(n)&&s.set(n,f),f}chartOptionScopes(){const{options:t,type:n}=this;return[t,Nd[n]||{},gi.datasets[n]||{},{type:n},gi,FE]}resolveNamedOptions(t,n,r,i=[""]){const a={$shared:!0},{resolver:s,subPrefixes:o}=tF(this._resolverCache,t,i);let c=s;if(Pke(s,n)){a.$shared=!1,r=sc(r)?r():r;const f=this.createResolver(t,r,o);c=Rh(s,r,f)}for(const f of n)a[f]=c[f];return a}createResolver(t,n,r=[""],i){const{resolver:a}=tF(this._resolverCache,t,r);return br(n)?Rh(a,n,void 0,i):a}}function tF(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let a=r.get(i);return a||(a={resolver:cI(t,n),subPrefixes:n.filter(o=>!o.toLowerCase().includes("hover"))},r.set(i,a)),a}const Eke=e=>br(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||sc(e[n]),!1);function Pke(e,t){const{isScriptable:n,isIndexable:r}=hj(e);for(const i of t){const a=n(i),s=r(i),o=(s||a)&&e[i];if(a&&(sc(o)||Eke(o))||s&&oi(o))return!0}return!1}var Tke="4.4.0";const kke=["top","bottom","left","right","chartArea"];function nF(e,t){return e==="top"||e==="bottom"||kke.indexOf(e)===-1&&t==="x"}function rF(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function iF(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),qr(n&&n.onComplete,[e],t)}function Ike(e){const t=e.chart,n=t.options.animation;qr(n&&n.onProgress,[e],t)}function Oj(e){return yj()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Px={},oF=e=>{const t=Oj(e);return Object.values(Px).filter(n=>n.canvas===t).pop()};function Mke(e,t,n){const r=Object.keys(e);for(const i of r){const a=+i;if(a>=t){const s=e[i];delete e[i],(n>0||a>t)&&(e[a+n]=s)}}}function Rke(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}function j0(e,t,n){return e.options.clip?e[n]:t[n]}function Dke(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:j0(n,t,"left"),right:j0(n,t,"right"),top:j0(r,t,"top"),bottom:j0(r,t,"bottom")}:t}class el{static register(...t){Js.add(...t),aF()}static unregister(...t){Js.remove(...t),aF()}constructor(t,n){const r=this.config=new Ske(n),i=Oj(t),a=oF(i);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const s=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||ZTe(i)),this.platform.updateConfig(r);const o=this.platform.acquireContext(i,s.aspectRatio),c=o&&o.canvas,f=c&&c.height,p=c&&c.width;if(this.id=REe(),this.ctx=o,this.canvas=c,this.width=p,this.height=f,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new hke,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=qEe(g=>this.update(g),s.resizeDelay||0),this._dataChanges=[],Px[this.id]=this,!o||!c){console.error("Failed to create chart: can't acquire context from the given item");return}Dl.listen(this,"complete",iF),Dl.listen(this,"progress",Ike),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:a}=this;return Ir(t)?n&&a?a:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Js}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():TL(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return SL(this.canvas,this.ctx),this}stop(){return Dl.stop(this),this}resize(t,n){Dl.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,a=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,t,n,a),o=r.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,TL(this,o,!0)&&(this.notifyPlugins("resize",{size:s}),qr(r.onResize,[this,s],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};kr(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((s,o)=>(s[o]=!1,s),{});let a=[];n&&(a=a.concat(Object.keys(n).map(s=>{const o=n[s],c=BE(s,o),f=c==="r",p=c==="x";return{options:o,dposition:f?"chartArea":p?"bottom":"left",dtype:f?"radialLinear":p?"category":"linear"}}))),kr(a,s=>{const o=s.options,c=o.id,f=BE(c,o),p=sr(o.type,s.dtype);(o.position===void 0||nF(o.position,f)!==nF(s.dposition))&&(o.position=s.dposition),i[c]=!0;let g=null;if(c in r&&r[c].type===p)g=r[c];else{const v=Js.getScale(p);g=new v({id:c,type:p,ctx:this.ctx,chart:this}),r[g.id]=g}g.init(o,t)}),kr(i,(s,o)=>{s||delete r[o]}),kr(r,s=>{ns.configure(this,s,s.options),ns.addBox(this,s)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,a)=>i.index-a.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(rF("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(a=>a===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const a=n[r];let s=this.getDatasetMeta(r);const o=a.type||this.config.type;if(s.type&&s.type!==o&&(this._destroyDatasetMeta(r),s=this.getDatasetMeta(r)),s.type=o,s.indexAxis=a.indexAxis||$E(o,this.options),s.order=a.order||0,s.index=r,s.label=""+a.label,s.visible=this.isDatasetVisible(r),s.controller)s.controller.updateIndex(r),s.controller.linkScales();else{const c=Js.getController(o),{datasetElementType:f,dataElementType:p}=gi.datasets[o];Object.assign(c,{dataElementType:Js.getElement(p),datasetElementType:f&&Js.getElement(f)}),s.controller=new c(this,r),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){kr(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let f=0,p=this.data.datasets.length;f<p;f++){const{controller:g}=this.getDatasetMeta(f),v=!i&&a.indexOf(g)===-1;g.buildOrUpdateElements(v),s=Math.max(+g.getMaxOverflow(),s)}s=this._minPadding=r.layout.autoPadding?s:0,this._updateLayout(s),i||kr(a,f=>{f.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(rF("z","_idx"));const{_active:o,_lastEvent:c}=this;c?this._eventHandler(c,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){kr(this.scales,t=>{ns.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!mL(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:a}of n){const s=r==="_removeElements"?-a:a;Mke(t,i,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=a=>new Set(t.filter(s=>s[0]===a).map((s,o)=>o+","+s.splice(1).join(","))),i=r(0);for(let a=1;a<n;a++)if(!mL(i,r(a)))return;return Array.from(i).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ns.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],kr(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,a)=>{i._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,sc(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Dl.has(this)?this.attached&&!Dl.running(this)&&Dl.start(this):(this.draw(),iF({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resize(r,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let i,a;for(i=0,a=n.length;i<a;++i){const s=n[i];(!t||s.visible)&&r.push(s)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r=t._clip,i=!r.disabled,a=Dke(t,this.chartArea),s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&lI(n,{left:r.left===!1?0:a.left-r.left,right:r.right===!1?this.width:a.right+r.right,top:r.top===!1?0:a.top-r.top,bottom:r.bottom===!1?this.height:a.bottom+r.bottom}),t.controller.draw(),i&&uI(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return Hl(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const a=kTe.modes[n];return typeof a=="function"?a(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(a=>a&&a._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=gc(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",a=this.getDatasetMeta(t),s=a.controller._resolveAnimations(void 0,i);Bg(n)?(a.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),s.update(a,{visible:r}),this.update(o=>o.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Dl.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),SL(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Px[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(a,s)=>{n.addEventListener(this,a,s),t[a]=s},i=(a,s,o)=>{a.offsetX=s,a.offsetY=o,this._eventHandler(a)};kr(this.options.events,a=>r(a,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(c,f)=>{n.addEventListener(this,c,f),t[c]=f},i=(c,f)=>{t[c]&&(n.removeEventListener(this,c,f),delete t[c])},a=(c,f)=>{this.canvas&&this.resize(c,f)};let s;const o=()=>{i("attach",o),this.attached=!0,this.resize(),r("resize",a),r("detach",s)};s=()=>{this.attached=!1,i("resize",a),this._stop(),this._resize(0,0),r("attach",o)},n.isAttached(this.canvas)?o():s()}unbindEvents(){kr(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},kr(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let a,s,o,c;for(n==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+i+"DatasetHoverStyle"]()),o=0,c=t.length;o<c;++o){s=t[o];const f=s&&this.getDatasetMeta(s.datasetIndex).controller;f&&f[i+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:a,index:s})=>{const o=this.getDatasetMeta(a);if(!o)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:o.data[s],index:s}});!Jb(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,a=(c,f)=>c.filter(p=>!f.some(g=>p.datasetIndex===g.datasetIndex&&p.index===g.index)),s=a(n,t),o=r?t:a(t,n);s.length&&this.updateHoverStyle(s,i.mode,!1),o.length&&i.mode&&this.updateHoverStyle(o,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const a=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(a||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:a}=this,s=n,o=this._getActiveElements(t,i,r,s),c=FEe(t),f=Rke(t,this._lastEvent,r,c);r&&(this._lastEvent=null,qr(a.onHover,[t,o,this],this),c&&qr(a.onClick,[t,o,this],this));const p=!Jb(o,i);return(p||n)&&(this._active=o,this._updateHoverStyles(o,i,n)),this._lastEvent=f,p}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,i)}}Ln(el,"defaults",gi),Ln(el,"instances",Px),Ln(el,"overrides",Nd),Ln(el,"registry",Js),Ln(el,"version",Tke),Ln(el,"getChart",oF);function aF(){return kr(el.instances,e=>e._plugins.invalidate())}function Aj(e,t,n=t){e.lineCap=sr(n.borderCapStyle,t.borderCapStyle),e.setLineDash(sr(n.borderDash,t.borderDash)),e.lineDashOffset=sr(n.borderDashOffset,t.borderDashOffset),e.lineJoin=sr(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=sr(n.borderWidth,t.borderWidth),e.strokeStyle=sr(n.borderColor,t.borderColor)}function Oke(e,t,n){e.lineTo(n.x,n.y)}function Ake(e){return e.stepped?lPe:e.tension||e.cubicInterpolationMode==="monotone"?uPe:Oke}function Nj(e,t,n={}){const r=e.length,{start:i=0,end:a=r-1}=n,{start:s,end:o}=t,c=Math.max(i,s),f=Math.min(a,o),p=i<s&&a<s||i>o&&a>o;return{count:r,start:c,loop:t.loop,ilen:f<c&&!p?r+f-c:f-c}}function Nke(e,t,n,r){const{points:i,options:a}=t,{count:s,start:o,loop:c,ilen:f}=Nj(i,n,r),p=Ake(a);let{move:g=!0,reverse:v}=r||{},b,_,T;for(b=0;b<=f;++b)_=i[(o+(v?f-b:b))%s],!_.skip&&(g?(e.moveTo(_.x,_.y),g=!1):p(e,T,_,v,a.stepped),T=_);return c&&(_=i[(o+(v?f:0))%s],p(e,T,_,v,a.stepped)),!!c}function Lke(e,t,n,r){const i=t.points,{count:a,start:s,ilen:o}=Nj(i,n,r),{move:c=!0,reverse:f}=r||{};let p=0,g=0,v,b,_,T,k,P;const M=N=>(s+(f?o-N:N))%a,O=()=>{T!==k&&(e.lineTo(p,k),e.lineTo(p,T),e.lineTo(p,P))};for(c&&(b=i[M(0)],e.moveTo(b.x,b.y)),v=0;v<=o;++v){if(b=i[M(v)],b.skip)continue;const N=b.x,L=b.y,$=N|0;$===_?(L<T?T=L:L>k&&(k=L),p=(g*p+N)/++g):(O(),e.lineTo(N,L),_=$,g=0,T=k=L),P=L}O()}function VE(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?Lke:Nke}function Fke(e){return e.stepped?VPe:e.tension||e.cubicInterpolationMode==="monotone"?UPe:id}function zke(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),Aj(e,t.options),e.stroke(i)}function $ke(e,t,n,r){const{segments:i,options:a}=t,s=VE(t);for(const o of i)Aj(e,a,o.style),e.beginPath(),s(e,t,o,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const Bke=typeof Path2D=="function";function Vke(e,t,n,r){Bke&&!t.options.segment?zke(e,t,n,r):$ke(e,t,n,r)}class Dm extends ul{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;OPe(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=XPe(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],a=this.points,s=GPe(this,{property:n,start:i,end:i});if(!s.length)return;const o=[],c=Fke(r);let f,p;for(f=0,p=s.length;f<p;++f){const{start:g,end:v}=s[f],b=a[g],_=a[v];if(b===_){o.push(b);continue}const T=Math.abs((i-b[n])/(_[n]-b[n])),k=c(b,_,T,r.stepped);k[n]=t[n],o.push(k)}return o.length===1?o[0]:o}pathSegment(t,n,r){return VE(this)(t,this,n,r)}path(t,n,r){const i=this.segments,a=VE(this);let s=this._loop;n=n||0,r=r||this.points.length-n;for(const o of i)s&=a(t,this,o,{start:n,end:n+r-1});return!!s}draw(t,n,r,i){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),Vke(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}Ln(Dm,"id","line"),Ln(Dm,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),Ln(Dm,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),Ln(Dm,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function sF(e,t,n,r){const i=e.options,{[n]:a}=e.getProps([n],r);return Math.abs(t-a)<i.radius+i.hitRadius}class Tx extends ul{constructor(n){super();Ln(this,"parsed");Ln(this,"skip");Ln(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,r,i){const a=this.options,{x:s,y:o}=this.getProps(["x","y"],i);return Math.pow(n-s,2)+Math.pow(r-o,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(n,r){return sF(this,n,"x",r)}inYRange(n,r){return sF(this,n,"y",r)}getCenterPoint(n){const{x:r,y:i}=this.getProps(["x","y"],n);return{x:r,y:i}}size(n){n=n||this.options||{};let r=n.radius||0;r=Math.max(r,r&&n.hoverRadius||0);const i=r&&n.borderWidth||0;return(r+i)*2}draw(n,r){const i=this.options;this.skip||i.radius<.1||!Hl(this,r,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,zE(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}Ln(Tx,"id","point"),Ln(Tx,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),Ln(Tx,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Lj(e,t){const{x:n,y:r,base:i,width:a,height:s}=e.getProps(["x","y","base","width","height"],t);let o,c,f,p,g;return e.horizontal?(g=s/2,o=Math.min(n,i),c=Math.max(n,i),f=r-g,p=r+g):(g=a/2,o=n-g,c=n+g,f=Math.min(r,i),p=Math.max(r,i)),{left:o,top:f,right:c,bottom:p}}function Uu(e,t,n,r){return e?0:Sa(t,n,r)}function Uke(e,t,n){const r=e.options.borderWidth,i=e.borderSkipped,a=fj(r);return{t:Uu(i.top,a.top,0,n),r:Uu(i.right,a.right,0,t),b:Uu(i.bottom,a.bottom,0,n),l:Uu(i.left,a.left,0,t)}}function jke(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,a=_d(i),s=Math.min(t,n),o=e.borderSkipped,c=r||br(i);return{topLeft:Uu(!c||o.top||o.left,a.topLeft,0,s),topRight:Uu(!c||o.top||o.right,a.topRight,0,s),bottomLeft:Uu(!c||o.bottom||o.left,a.bottomLeft,0,s),bottomRight:Uu(!c||o.bottom||o.right,a.bottomRight,0,s)}}function Hke(e){const t=Lj(e),n=t.right-t.left,r=t.bottom-t.top,i=Uke(e,n/2,r/2),a=jke(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:a},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,a.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(i.b,i.r))}}}}function e2(e,t,n,r){const i=t===null,a=n===null,o=e&&!(i&&a)&&Lj(e,r);return o&&(i||md(t,o.left,o.right))&&(a||md(n,o.top,o.bottom))}function Kke(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Wke(e,t){e.rect(t.x,t.y,t.w,t.h)}function t2(e,t,n={}){const r=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,a=(e.x+e.w!==n.x+n.w?t:0)-r,s=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+r,y:e.y+i,w:e.w+a,h:e.h+s,radius:e.radius}}class kx extends ul{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:r,backgroundColor:i}}=this,{inner:a,outer:s}=Hke(this),o=Kke(s.radius)?Ug:Wke;t.save(),(s.w!==a.w||s.h!==a.h)&&(t.beginPath(),o(t,t2(s,n,a)),t.clip(),o(t,t2(a,-n,s)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),o(t,t2(a,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,r){return e2(this,t,n,r)}inXRange(t,n){return e2(this,t,null,n)}inYRange(t,n){return e2(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:i,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(n+i)/2:n,y:a?r:(r+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}Ln(kx,"id","bar"),Ln(kx,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),Ln(kx,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});const lF=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},Gke=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class uF extends ul{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=qr(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=Hi(r.font),a=i.size,s=this._computeTitleHeight(),{boxWidth:o,itemHeight:c}=lF(r,a);let f,p;n.font=i.string,this.isHorizontal()?(f=this.maxWidth,p=this._fitRows(s,a,o,c)+10):(p=this.maxHeight,f=this._fitCols(s,i,o,c)+10),this.width=Math.min(f,t.maxWidth||this.maxWidth),this.height=Math.min(p,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:a,maxWidth:s,options:{labels:{padding:o}}}=this,c=this.legendHitBoxes=[],f=this.lineWidths=[0],p=i+o;let g=t;a.textAlign="left",a.textBaseline="middle";let v=-1,b=-p;return this.legendItems.forEach((_,T)=>{const k=r+n/2+a.measureText(_.text).width;(T===0||f[f.length-1]+k+2*o>s)&&(g+=p,f[f.length-(T>0?0:1)]=0,b+=p,v++),c[T]={left:0,top:b,row:v,width:k,height:i},f[f.length-1]+=k+o}),g}_fitCols(t,n,r,i){const{ctx:a,maxHeight:s,options:{labels:{padding:o}}}=this,c=this.legendHitBoxes=[],f=this.columnSizes=[],p=s-t;let g=o,v=0,b=0,_=0,T=0;return this.legendItems.forEach((k,P)=>{const{itemWidth:M,itemHeight:O}=qke(r,n,a,k,i);P>0&&b+O+2*o>p&&(g+=v+o,f.push({width:v,height:b}),_+=v+o,T++,v=b=0),c[P]={left:_,top:b,col:T,width:M,height:O},v=Math.max(v,M),b+=O+o}),g+=v,f.push({width:v,height:b}),g}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:a}}=this,s=ah(a,this.left,this.width);if(this.isHorizontal()){let o=0,c=wo(r,this.left+i,this.right-this.lineWidths[o]);for(const f of n)o!==f.row&&(o=f.row,c=wo(r,this.left+i,this.right-this.lineWidths[o])),f.top+=this.top+t+i,f.left=s.leftForLtr(s.x(c),f.width),c+=f.width+i}else{let o=0,c=wo(r,this.top+t+i,this.bottom-this.columnSizes[o].height);for(const f of n)f.col!==o&&(o=f.col,c=wo(r,this.top+t+i,this.bottom-this.columnSizes[o].height)),f.top=c,f.left+=this.left+i,f.left=s.leftForLtr(s.x(f.left),f.width),c+=f.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;lI(t,this),this._draw(),uI(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:a,labels:s}=t,o=gi.color,c=ah(t.rtl,this.left,this.width),f=Hi(s.font),{padding:p}=s,g=f.size,v=g/2;let b;this.drawTitle(),i.textAlign=c.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=f.string;const{boxWidth:_,boxHeight:T,itemHeight:k}=lF(s,g),P=function($,j,U){if(isNaN(_)||_<=0||isNaN(T)||T<0)return;i.save();const G=sr(U.lineWidth,1);if(i.fillStyle=sr(U.fillStyle,o),i.lineCap=sr(U.lineCap,"butt"),i.lineDashOffset=sr(U.lineDashOffset,0),i.lineJoin=sr(U.lineJoin,"miter"),i.lineWidth=G,i.strokeStyle=sr(U.strokeStyle,o),i.setLineDash(sr(U.lineDash,[])),s.usePointStyle){const Z={radius:T*Math.SQRT2/2,pointStyle:U.pointStyle,rotation:U.rotation,borderWidth:G},Q=c.xPlus($,_/2),J=j+v;cj(i,Z,Q,J,s.pointStyleWidth&&_)}else{const Z=j+Math.max((g-T)/2,0),Q=c.leftForLtr($,_),J=_d(U.borderRadius);i.beginPath(),Object.values(J).some(re=>re!==0)?Ug(i,{x:Q,y:Z,w:_,h:T,radius:J}):i.rect(Q,Z,_,T),i.fill(),G!==0&&i.stroke()}i.restore()},M=function($,j,U){Ld(i,U.text,$,j+k/2,f,{strikethrough:U.hidden,textAlign:c.textAlign(U.textAlign)})},O=this.isHorizontal(),N=this._computeTitleHeight();O?b={x:wo(a,this.left+p,this.right-r[0]),y:this.top+p+N,line:0}:b={x:this.left+p,y:wo(a,this.top+N+p,this.bottom-n[0].height),line:0},xj(this.ctx,t.textDirection);const L=k+p;this.legendItems.forEach(($,j)=>{i.strokeStyle=$.fontColor,i.fillStyle=$.fontColor;const U=i.measureText($.text).width,G=c.textAlign($.textAlign||($.textAlign=s.textAlign)),Z=_+v+U;let Q=b.x,J=b.y;c.setWidth(this.width),O?j>0&&Q+Z+p>this.right&&(J=b.y+=L,b.line++,Q=b.x=wo(a,this.left+p,this.right-r[b.line])):j>0&&J+L>this.bottom&&(Q=b.x=Q+n[b.line].width+p,b.line++,J=b.y=wo(a,this.top+N+p,this.bottom-n[b.line].height));const re=c.x(Q);if(P(re,J,$),Q=ZEe(G,Q+_+v,O?Q+Z:this.right,t.rtl),M(c.x(Q),J,$),O)b.x+=Z+p;else if(typeof $.text!="string"){const ne=f.lineHeight;b.y+=Fj($,ne)+p}else b.y+=L}),bj(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=Hi(n.font),i=Io(n.padding);if(!n.display)return;const a=ah(t.rtl,this.left,this.width),s=this.ctx,o=n.position,c=r.size/2,f=i.top+c;let p,g=this.left,v=this.width;if(this.isHorizontal())v=Math.max(...this.lineWidths),p=this.top+f,g=wo(t.align,g,this.right-v);else{const _=this.columnSizes.reduce((T,k)=>Math.max(T,k.height),0);p=f+wo(t.align,this.top,this.bottom-_-t.labels.padding-this._computeTitleHeight())}const b=wo(o,g,g+v);s.textAlign=a.textAlign(oI(o)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=r.string,Ld(s,n.text,b,p,r)}_computeTitleHeight(){const t=this.options.title,n=Hi(t.font),r=Io(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,a;if(md(t,this.left,this.right)&&md(n,this.top,this.bottom)){for(a=this.legendHitBoxes,r=0;r<a.length;++r)if(i=a[r],md(t,i.left,i.left+i.width)&&md(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!Yke(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,a=Gke(i,r);i&&!a&&qr(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!a&&qr(n.onHover,[t,r,this],this)}else r&&qr(n.onClick,[t,r,this],this)}}function qke(e,t,n,r,i){const a=Zke(r,e,t,n),s=Xke(i,r,t.lineHeight);return{itemWidth:a,itemHeight:s}}function Zke(e,t,n,r){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((a,s)=>a.length>s.length?a:s)),t+n.size/2+r.measureText(i).width}function Xke(e,t,n){let r=e;return typeof t.text!="string"&&(r=Fj(t,n)),r}function Fj(e,t){const n=e.text?e.text.length:0;return t*n}function Yke(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Qke={id:"legend",_element:uF,start(e,t,n){const r=e.legend=new uF({ctx:e.ctx,options:n,chart:e});ns.configure(e,r,n),ns.addBox(e,r)},stop(e){ns.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;ns.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:a,useBorderRadius:s,borderRadius:o}}=e.legend.options;return e._getSortedDatasetMetas().map(c=>{const f=c.controller.getStyle(n?0:void 0),p=Io(f.borderWidth);return{text:t[c.index].label,fillStyle:f.backgroundColor,fontColor:a,hidden:!c.visible,lineCap:f.borderCapStyle,lineDash:f.borderDash,lineDashOffset:f.borderDashOffset,lineJoin:f.borderJoinStyle,lineWidth:(p.width+p.height)/4,strokeStyle:f.borderColor,pointStyle:r||f.pointStyle,rotation:f.rotation,textAlign:i||f.textAlign,borderRadius:s&&(o||f.borderRadius),datasetIndex:c.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class zj extends ul{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const i=oi(r.text)?r.text.length:1;this._padding=Io(r.padding);const a=i*Hi(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:a,options:s}=this,o=s.align;let c=0,f,p,g;return this.isHorizontal()?(p=wo(o,r,a),g=n+t,f=a-r):(s.position==="left"?(p=r+t,g=wo(o,i,n),c=Ni*-.5):(p=a-t,g=wo(o,n,i),c=Ni*.5),f=i-n),{titleX:p,titleY:g,maxWidth:f,rotation:c}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=Hi(n.font),a=r.lineHeight/2+this._padding.top,{titleX:s,titleY:o,maxWidth:c,rotation:f}=this._drawArgs(a);Ld(t,n.text,0,0,r,{color:n.color,maxWidth:c,rotation:f,textAlign:oI(n.align),textBaseline:"middle",translation:[s,o]})}}function Jke(e,t){const n=new zj({ctx:e.ctx,options:t,chart:e});ns.configure(e,n,t),ns.addBox(e,n),e.titleBlock=n}var eIe={id:"title",_element:zj,start(e,t,n){Jke(e,n)},stop(e){const t=e.titleBlock;ns.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;ns.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Om={average(e){if(!e.length)return!1;let t,n,r=0,i=0,a=0;for(t=0,n=e.length;t<n;++t){const s=e[t].element;if(s&&s.hasValue()){const o=s.tooltipPosition();r+=o.x,i+=o.y,++a}}return{x:r/a,y:i/a}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=Number.POSITIVE_INFINITY,a,s,o;for(a=0,s=e.length;a<s;++a){const c=e[a].element;if(c&&c.hasValue()){const f=c.getCenterPoint(),p=LE(t,f);p<i&&(i=p,o=c)}}if(o){const c=o.tooltipPosition();n=c.x,r=c.y}return{x:n,y:r}}};function Ys(e,t){return t&&(oi(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Ol(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
`)>-1?e.split(`
`):e}function tIe(e,t){const{element:n,datasetIndex:r,index:i}=t,a=e.getDatasetMeta(r).controller,{label:s,value:o}=a.getLabelAndValue(i);return{chart:e,label:s,parsed:a.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:o,dataset:a.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function cF(e,t){const n=e.chart.ctx,{body:r,footer:i,title:a}=e,{boxWidth:s,boxHeight:o}=t,c=Hi(t.bodyFont),f=Hi(t.titleFont),p=Hi(t.footerFont),g=a.length,v=i.length,b=r.length,_=Io(t.padding);let T=_.height,k=0,P=r.reduce((N,L)=>N+L.before.length+L.lines.length+L.after.length,0);if(P+=e.beforeBody.length+e.afterBody.length,g&&(T+=g*f.lineHeight+(g-1)*t.titleSpacing+t.titleMarginBottom),P){const N=t.displayColors?Math.max(o,c.lineHeight):c.lineHeight;T+=b*N+(P-b)*c.lineHeight+(P-1)*t.bodySpacing}v&&(T+=t.footerMarginTop+v*p.lineHeight+(v-1)*t.footerSpacing);let M=0;const O=function(N){k=Math.max(k,n.measureText(N).width+M)};return n.save(),n.font=f.string,kr(e.title,O),n.font=c.string,kr(e.beforeBody.concat(e.afterBody),O),M=t.displayColors?s+2+t.boxPadding:0,kr(r,N=>{kr(N.before,O),kr(N.lines,O),kr(N.after,O)}),M=0,n.font=p.string,kr(e.footer,O),n.restore(),k+=_.width,{width:k,height:T}}function nIe(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function rIe(e,t,n,r){const{x:i,width:a}=r,s=n.caretSize+n.caretPadding;if(e==="left"&&i+a+s>t.width||e==="right"&&i-a-s<0)return!0}function iIe(e,t,n,r){const{x:i,width:a}=n,{width:s,chartArea:{left:o,right:c}}=e;let f="center";return r==="center"?f=i<=(o+c)/2?"left":"right":i<=a/2?f="left":i>=s-a/2&&(f="right"),rIe(f,e,t,n)&&(f="center"),f}function dF(e,t,n){const r=n.yAlign||t.yAlign||nIe(e,n);return{xAlign:n.xAlign||t.xAlign||iIe(e,t,n,r),yAlign:r}}function oIe(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function aIe(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function fF(e,t,n,r){const{caretSize:i,caretPadding:a,cornerRadius:s}=e,{xAlign:o,yAlign:c}=n,f=i+a,{topLeft:p,topRight:g,bottomLeft:v,bottomRight:b}=_d(s);let _=oIe(t,o);const T=aIe(t,c,f);return c==="center"?o==="left"?_+=f:o==="right"&&(_-=f):o==="left"?_-=Math.max(p,v)+i:o==="right"&&(_+=Math.max(g,b)+i),{x:Sa(_,0,r.width-t.width),y:Sa(T,0,r.height-t.height)}}function H0(e,t,n){const r=Io(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function hF(e){return Ys([],Ol(e))}function sIe(e,t,n){return gc(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function pF(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const $j={beforeTitle:Ml,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:Ml,beforeBody:Ml,beforeLabel:Ml,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return Ir(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Ml,afterBody:Ml,beforeFooter:Ml,footer:Ml,afterFooter:Ml};function Xo(e,t,n,r){const i=e[t].call(n,r);return typeof i>"u"?$j[t].call(n,r):i}class UE extends ul{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,a=new wj(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=sIe(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=Xo(r,"beforeTitle",this,t),a=Xo(r,"title",this,t),s=Xo(r,"afterTitle",this,t);let o=[];return o=Ys(o,Ol(i)),o=Ys(o,Ol(a)),o=Ys(o,Ol(s)),o}getBeforeBody(t,n){return hF(Xo(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return kr(t,a=>{const s={before:[],lines:[],after:[]},o=pF(r,a);Ys(s.before,Ol(Xo(o,"beforeLabel",this,a))),Ys(s.lines,Xo(o,"label",this,a)),Ys(s.after,Ol(Xo(o,"afterLabel",this,a))),i.push(s)}),i}getAfterBody(t,n){return hF(Xo(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=Xo(r,"beforeFooter",this,t),a=Xo(r,"footer",this,t),s=Xo(r,"afterFooter",this,t);let o=[];return o=Ys(o,Ol(i)),o=Ys(o,Ol(a)),o=Ys(o,Ol(s)),o}_createItems(t){const n=this._active,r=this.chart.data,i=[],a=[],s=[];let o=[],c,f;for(c=0,f=n.length;c<f;++c)o.push(tIe(this.chart,n[c]));return t.filter&&(o=o.filter((p,g,v)=>t.filter(p,g,v,r))),t.itemSort&&(o=o.sort((p,g)=>t.itemSort(p,g,r))),kr(o,p=>{const g=pF(t.callbacks,p);i.push(Xo(g,"labelColor",this,p)),a.push(Xo(g,"labelPointStyle",this,p)),s.push(Xo(g,"labelTextColor",this,p))}),this.labelColors=i,this.labelPointStyles=a,this.labelTextColors=s,this.dataPoints=o,o}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let a,s=[];if(!i.length)this.opacity!==0&&(a={opacity:0});else{const o=Om[r.position].call(this,i,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);const c=this._size=cF(this,r),f=Object.assign({},o,c),p=dF(this.chart,r,f),g=fF(r,f,p,this.chart);this.xAlign=p.xAlign,this.yAlign=p.yAlign,a={opacity:1,x:g.x,y:g.y,width:c.width,height:c.height,caretX:o.x,caretY:o.y}}this._tooltipItems=s,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const a=this.getCaretPosition(t,r,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:a}=this,{caretSize:s,cornerRadius:o}=r,{topLeft:c,topRight:f,bottomLeft:p,bottomRight:g}=_d(o),{x:v,y:b}=t,{width:_,height:T}=n;let k,P,M,O,N,L;return a==="center"?(N=b+T/2,i==="left"?(k=v,P=k-s,O=N+s,L=N-s):(k=v+_,P=k+s,O=N-s,L=N+s),M=k):(i==="left"?P=v+Math.max(c,p)+s:i==="right"?P=v+_-Math.max(f,g)-s:P=this.caretX,a==="top"?(O=b,N=O-s,k=P-s,M=P+s):(O=b+T,N=O+s,k=P+s,M=P-s),L=O),{x1:k,x2:P,x3:M,y1:O,y2:N,y3:L}}drawTitle(t,n,r){const i=this.title,a=i.length;let s,o,c;if(a){const f=ah(r.rtl,this.x,this.width);for(t.x=H0(this,r.titleAlign,r),n.textAlign=f.textAlign(r.titleAlign),n.textBaseline="middle",s=Hi(r.titleFont),o=r.titleSpacing,n.fillStyle=r.titleColor,n.font=s.string,c=0;c<a;++c)n.fillText(i[c],f.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+o,c+1===a&&(t.y+=r.titleMarginBottom-o)}}_drawColorBox(t,n,r,i,a){const s=this.labelColors[r],o=this.labelPointStyles[r],{boxHeight:c,boxWidth:f}=a,p=Hi(a.bodyFont),g=H0(this,"left",a),v=i.x(g),b=c<p.lineHeight?(p.lineHeight-c)/2:0,_=n.y+b;if(a.usePointStyle){const T={radius:Math.min(f,c)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},k=i.leftForLtr(v,f)+f/2,P=_+c/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,zE(t,T,k,P),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,zE(t,T,k,P)}else{t.lineWidth=br(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const T=i.leftForLtr(v,f),k=i.leftForLtr(i.xPlus(v,1),f-2),P=_d(s.borderRadius);Object.values(P).some(M=>M!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,Ug(t,{x:T,y:_,w:f,h:c,radius:P}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),Ug(t,{x:k,y:_+1,w:f-2,h:c-2,radius:P}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(T,_,f,c),t.strokeRect(T,_,f,c),t.fillStyle=s.backgroundColor,t.fillRect(k,_+1,f-2,c-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:a,bodyAlign:s,displayColors:o,boxHeight:c,boxWidth:f,boxPadding:p}=r,g=Hi(r.bodyFont);let v=g.lineHeight,b=0;const _=ah(r.rtl,this.x,this.width),T=function(U){n.fillText(U,_.x(t.x+b),t.y+v/2),t.y+=v+a},k=_.textAlign(s);let P,M,O,N,L,$,j;for(n.textAlign=s,n.textBaseline="middle",n.font=g.string,t.x=H0(this,k,r),n.fillStyle=r.bodyColor,kr(this.beforeBody,T),b=o&&k!=="right"?s==="center"?f/2+p:f+2+p:0,N=0,$=i.length;N<$;++N){for(P=i[N],M=this.labelTextColors[N],n.fillStyle=M,kr(P.before,T),O=P.lines,o&&O.length&&(this._drawColorBox(n,t,N,_,r),v=Math.max(g.lineHeight,c)),L=0,j=O.length;L<j;++L)T(O[L]),v=g.lineHeight;kr(P.after,T)}b=0,v=g.lineHeight,kr(this.afterBody,T),t.y-=a}drawFooter(t,n,r){const i=this.footer,a=i.length;let s,o;if(a){const c=ah(r.rtl,this.x,this.width);for(t.x=H0(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=c.textAlign(r.footerAlign),n.textBaseline="middle",s=Hi(r.footerFont),n.fillStyle=r.footerColor,n.font=s.string,o=0;o<a;++o)n.fillText(i[o],c.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:a,yAlign:s}=this,{x:o,y:c}=t,{width:f,height:p}=r,{topLeft:g,topRight:v,bottomLeft:b,bottomRight:_}=_d(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(o+g,c),s==="top"&&this.drawCaret(t,n,r,i),n.lineTo(o+f-v,c),n.quadraticCurveTo(o+f,c,o+f,c+v),s==="center"&&a==="right"&&this.drawCaret(t,n,r,i),n.lineTo(o+f,c+p-_),n.quadraticCurveTo(o+f,c+p,o+f-_,c+p),s==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(o+b,c+p),n.quadraticCurveTo(o,c+p,o,c+p-b),s==="center"&&a==="left"&&this.drawCaret(t,n,r,i),n.lineTo(o,c+g),n.quadraticCurveTo(o,c,o+g,c),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,a=r&&r.y;if(i||a){const s=Om[t.position].call(this,this._active,this._eventPosition);if(!s)return;const o=this._size=cF(this,t),c=Object.assign({},s,this._size),f=dF(n,t,c),p=fF(t,c,f,n);(i._to!==p.x||a._to!==p.y)&&(this.xAlign=f.xAlign,this.yAlign=f.yAlign,this.width=o.width,this.height=o.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,p))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},a={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const s=Io(n.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&o&&(t.save(),t.globalAlpha=r,this.drawBackground(a,t,i,n),xj(t,n.textDirection),a.y+=s.top,this.drawTitle(a,t,n),this.drawBody(a,t,n),this.drawFooter(a,t,n),bj(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:o,index:c})=>{const f=this.chart.getDatasetMeta(o);if(!f)throw new Error("Cannot find a dataset at index "+o);return{datasetIndex:o,element:f.data[c],index:c}}),a=!Jb(r,i),s=this._positionChanged(i,n);(a||s)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,a=this._active||[],s=this._getActiveElements(t,a,n,r),o=this._positionChanged(s,t),c=n||!Jb(s,a)||o;return c&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),c}_getActiveElements(t,n,r,i){const a=this.options;if(t.type==="mouseout")return[];if(!i)return n;const s=this.chart.getElementsAtEventForMode(t,a.mode,a,r);return a.reverse&&s.reverse(),s}_positionChanged(t,n){const{caretX:r,caretY:i,options:a}=this,s=Om[a.position].call(this,t,n);return s!==!1&&(r!==s.x||i!==s.y)}}Ln(UE,"positioners",Om);var lIe={id:"tooltip",_element:UE,positioners:Om,afterInit(e,t,n){n&&(e.tooltip=new UE({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:$j},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const uIe=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function cIe(e,t,n,r){const i=e.indexOf(t);if(i===-1)return uIe(e,t,n,r);const a=e.lastIndexOf(t);return i!==a?n:i}const dIe=(e,t)=>e===null?null:Sa(Math.round(e),0,t);function mF(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class jE extends Gd{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:a}of n)r[i]===a&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(Ir(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:cIe(r,t,sr(n,t),this._addedLabels),dIe(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,i=[];let a=this.getLabels();a=t===0&&n===a.length-1?a:a.slice(t,n+1),this._valueRange=Math.max(a.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let s=t;s<=n;s++)i.push({value:s});return i}getLabelForValue(t){return mF.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}Ln(jE,"id","category"),Ln(jE,"defaults",{ticks:{callback:mF}});function fIe(e,t){const n=[],{bounds:i,step:a,min:s,max:o,precision:c,count:f,maxTicks:p,maxDigits:g,includeBounds:v}=e,b=a||1,_=p-1,{min:T,max:k}=t,P=!Ir(s),M=!Ir(o),O=!Ir(f),N=(k-T)/(g+1);let L=vL((k-T)/_/b)*b,$,j,U,G;if(L<1e-14&&!P&&!M)return[{value:T},{value:k}];G=Math.ceil(k/L)-Math.floor(T/L),G>_&&(L=vL(G*L/_/b)*b),Ir(c)||($=Math.pow(10,c),L=Math.ceil(L*$)/$),i==="ticks"?(j=Math.floor(T/L)*L,U=Math.ceil(k/L)*L):(j=T,U=k),P&&M&&a&&VEe((o-s)/a,L/1e3)?(G=Math.round(Math.min((o-s)/L,p)),L=(o-s)/G,j=s,U=o):O?(j=P?s:j,U=M?o:U,G=f-1,L=(U-j)/G):(G=(U-j)/L,tg(G,Math.round(G),L/1e3)?G=Math.round(G):G=Math.ceil(G));const Z=Math.max(yL(L),yL(j));$=Math.pow(10,Ir(c)?Z:c),j=Math.round(j*$)/$,U=Math.round(U*$)/$;let Q=0;for(P&&(v&&j!==s?(n.push({value:s}),j<s&&Q++,tg(Math.round((j+Q*L)*$)/$,s,gF(s,N,e))&&Q++):j<s&&Q++);Q<G;++Q){const J=Math.round((j+Q*L)*$)/$;if(M&&J>o)break;n.push({value:J})}return M&&v&&U!==o?n.length&&tg(n[n.length-1].value,o,gF(o,N,e))?n[n.length-1].value=o:n.push({value:o}):(!M||U===o)&&n.push({value:U}),n}function gF(e,t,{horizontal:n,minRotation:r}){const i=Vu(r),a=(n?Math.sin(i):Math.cos(i))||.001,s=.75*t*(""+e).length;return Math.min(t/a,s)}class o_ extends Gd{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return Ir(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:a}=this;const s=c=>i=n?i:c,o=c=>a=r?a:c;if(t){const c=ll(i),f=ll(a);c<0&&f<0?o(0):c>0&&f>0&&s(0)}if(i===a){let c=a===0?1:Math.abs(a*.05);o(a+c),t||s(i-c)}this.min=i,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},a=this._range||this,s=fIe(i,a);return t.bounds==="ticks"&&rj(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return sI(t,this.chart.options.locale,this.options.ticks.format)}}class HE extends o_{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=eo(t)?t:0,this.max=eo(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=Vu(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}Ln(HE,"id","linear"),Ln(HE,"defaults",{ticks:{callback:j1.formatters.numeric}});const Hg=e=>Math.floor(Bu(e)),qc=(e,t)=>Math.pow(10,Hg(e)+t);function vF(e){return e/Math.pow(10,Hg(e))===1}function yF(e,t,n){const r=Math.pow(10,n),i=Math.floor(e/r);return Math.ceil(t/r)-i}function hIe(e,t){const n=t-e;let r=Hg(n);for(;yF(e,t,r)>10;)r++;for(;yF(e,t,r)<10;)r--;return Math.min(r,Hg(e))}function pIe(e,{min:t,max:n}){t=ya(e.min,t);const r=[],i=Hg(t);let a=hIe(t,n),s=a<0?Math.pow(10,Math.abs(a)):1;const o=Math.pow(10,a),c=i>a?Math.pow(10,i):0,f=Math.round((t-c)*s)/s,p=Math.floor((t-c)/o/10)*o*10;let g=Math.floor((f-p)/Math.pow(10,a)),v=ya(e.min,Math.round((c+p+g*Math.pow(10,a))*s)/s);for(;v<n;)r.push({value:v,major:vF(v),significand:g}),g>=10?g=g<15?15:20:g++,g>=20&&(a++,g=2,s=a>=0?1:s),v=Math.round((c+p+g*Math.pow(10,a))*s)/s;const b=ya(e.max,v);return r.push({value:b,major:vF(b),significand:g}),r}class xF extends Gd{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=o_.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return eo(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=eo(t)?Math.max(0,t):null,this.max=eo(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!eo(this._userMin)&&(this.min=t===qc(this.min,0)?qc(this.min,-1):qc(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const a=o=>r=t?r:o,s=o=>i=n?i:o;r===i&&(r<=0?(a(1),s(10)):(a(qc(r,-1)),s(qc(i,1)))),r<=0&&a(qc(i,-1)),i<=0&&s(qc(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=pIe(n,this);return t.bounds==="ticks"&&rj(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":sI(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Bu(t),this._valueRange=Bu(this.max)-Bu(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Bu(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}Ln(xF,"id","logarithmic"),Ln(xF,"defaults",{ticks:{callback:j1.formatters.logarithmic,major:{enabled:!0}}});function KE(e){const t=e.ticks;if(t.display&&e.display){const n=Io(t.backdropPadding);return sr(t.font&&t.font.size,gi.font.size)+n.height}return 0}function mIe(e,t,n){return n=oi(n)?n:[n],{w:sPe(e,t.string,n),h:n.length*t.lineHeight}}function bF(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:e<r||e>i?{start:t-n,end:t}:{start:t,end:t+n}}function gIe(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],a=e._pointLabels.length,s=e.options.pointLabels,o=s.centerPointLabels?Ni/a:0;for(let c=0;c<a;c++){const f=s.setContext(e.getPointLabelContext(c));i[c]=f.padding;const p=e.getPointPosition(c,e.drawingArea+i[c],o),g=Hi(f.font),v=mIe(e.ctx,g,e._pointLabels[c]);r[c]=v;const b=Es(e.getIndexAngle(c)+o),_=Math.round(rI(b)),T=bF(_,p.x,v.w,0,180),k=bF(_,p.y,v.h,90,270);vIe(n,t,b,T,k)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=bIe(e,r,i)}function vIe(e,t,n,r,i){const a=Math.abs(Math.sin(n)),s=Math.abs(Math.cos(n));let o=0,c=0;r.start<t.l?(o=(t.l-r.start)/a,e.l=Math.min(e.l,t.l-o)):r.end>t.r&&(o=(r.end-t.r)/a,e.r=Math.max(e.r,t.r+o)),i.start<t.t?(c=(t.t-i.start)/s,e.t=Math.min(e.t,t.t-c)):i.end>t.b&&(c=(i.end-t.b)/s,e.b=Math.max(e.b,t.b+c))}function yIe(e,t,n){const r=e.drawingArea,{extra:i,additionalAngle:a,padding:s,size:o}=n,c=e.getPointPosition(t,r+i+s,a),f=Math.round(rI(Es(c.angle+Ca))),p=CIe(c.y,o.h,f),g=_Ie(f),v=wIe(c.x,o.w,g);return{visible:!0,x:c.x,y:p,textAlign:g,left:v,top:p,right:v+o.w,bottom:p+o.h}}function xIe(e,t){if(!t)return!0;const{left:n,top:r,right:i,bottom:a}=e;return!(Hl({x:n,y:r},t)||Hl({x:n,y:a},t)||Hl({x:i,y:r},t)||Hl({x:i,y:a},t))}function bIe(e,t,n){const r=[],i=e._pointLabels.length,a=e.options,{centerPointLabels:s,display:o}=a.pointLabels,c={extra:KE(a)/2,additionalAngle:s?Ni/i:0};let f;for(let p=0;p<i;p++){c.padding=n[p],c.size=t[p];const g=yIe(e,p,c);r.push(g),o==="auto"&&(g.visible=xIe(g,f),g.visible&&(f=g))}return r}function _Ie(e){return e===0||e===180?"center":e<180?"left":"right"}function wIe(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function CIe(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function SIe(e,t,n){const{left:r,top:i,right:a,bottom:s}=n,{backdropColor:o}=t;if(!Ir(o)){const c=_d(t.borderRadius),f=Io(t.backdropPadding);e.fillStyle=o;const p=r-f.left,g=i-f.top,v=a-r+f.width,b=s-i+f.height;Object.values(c).some(_=>_!==0)?(e.beginPath(),Ug(e,{x:p,y:g,w:v,h:b,radius:c}),e.fill()):e.fillRect(p,g,v,b)}}function EIe(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const a=e._pointLabelItems[i];if(!a.visible)continue;const s=r.setContext(e.getPointLabelContext(i));SIe(n,s,a);const o=Hi(s.font),{x:c,y:f,textAlign:p}=a;Ld(n,e._pointLabels[i],c,f+o.lineHeight/2,o,{color:s.color,textAlign:p,textBaseline:"middle"})}}function Bj(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,os);else{let a=e.getPointPosition(0,t);i.moveTo(a.x,a.y);for(let s=1;s<r;s++)a=e.getPointPosition(s,t),i.lineTo(a.x,a.y)}}function PIe(e,t,n,r,i){const a=e.ctx,s=t.circular,{color:o,lineWidth:c}=t;!s&&!r||!o||!c||n<0||(a.save(),a.strokeStyle=o,a.lineWidth=c,a.setLineDash(i.dash),a.lineDashOffset=i.dashOffset,a.beginPath(),Bj(e,n,s,r),a.closePath(),a.stroke(),a.restore())}function TIe(e,t,n){return gc(e,{label:n,index:t,type:"pointLabel"})}class K0 extends o_{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Io(KE(this.options)/2),n=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(n,r)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=eo(t)&&!isNaN(t)?t:0,this.max=eo(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/KE(this.options))}generateTickLabels(t){o_.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,r)=>{const i=qr(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?gIe(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,r,i){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,r,i))}getIndexAngle(t){const n=os/(this._pointLabels.length||1),r=this.options.startAngle||0;return Es(t*n+Vu(r))}getDistanceFromCenterForValue(t){if(Ir(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(Ir(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const r=n[t];return TIe(this.getContext(),t,r)}}getPointPosition(t,n,r=0){const i=this.getIndexAngle(t)-Ca+r;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:r,right:i,bottom:a}=this._pointLabelItems[t];return{left:n,top:r,right:i,bottom:a}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),Bj(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:r,grid:i,border:a}=n,s=this._pointLabels.length;let o,c,f;if(n.pointLabels.display&&EIe(this,s),i.display&&this.ticks.forEach((p,g)=>{if(g!==0){c=this.getDistanceFromCenterForValue(p.value);const v=this.getContext(g),b=i.setContext(v),_=a.setContext(v);PIe(this,b,c,s,_)}}),r.display){for(t.save(),o=s-1;o>=0;o--){const p=r.setContext(this.getPointLabelContext(o)),{color:g,lineWidth:v}=p;!v||!g||(t.lineWidth=v,t.strokeStyle=g,t.setLineDash(p.borderDash),t.lineDashOffset=p.borderDashOffset,c=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),f=this.getPointPosition(o,c),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(f.x,f.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let a,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((o,c)=>{if(c===0&&!n.reverse)return;const f=r.setContext(this.getContext(c)),p=Hi(f.font);if(a=this.getDistanceFromCenterForValue(this.ticks[c].value),f.showLabelBackdrop){t.font=p.string,s=t.measureText(o.label).width,t.fillStyle=f.backdropColor;const g=Io(f.backdropPadding);t.fillRect(-s/2-g.left,-a-p.size/2-g.top,s+g.width,p.size+g.height)}Ld(t,o.label,0,-a,p,{color:f.color,strokeColor:f.textStrokeColor,strokeWidth:f.textStrokeWidth})}),t.restore()}drawTitle(){}}Ln(K0,"id","radialLinear"),Ln(K0,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:j1.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),Ln(K0,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),Ln(K0,"descriptors",{angleLines:{_fallback:"grid"}});const K1={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ea=Object.keys(K1);function _F(e,t){return e-t}function wF(e,t){if(Ir(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:a}=e._parseOpts;let s=t;return typeof r=="function"&&(s=r(s)),eo(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(Vg(a)||a===!0)?n.startOf(s,"isoWeek",a):n.startOf(s,i)),+s)}function CF(e,t,n,r){const i=ea.length;for(let a=ea.indexOf(e);a<i-1;++a){const s=K1[ea[a]],o=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-t)/(o*s.size))<=r)return ea[a]}return ea[i-1]}function kIe(e,t,n,r,i){for(let a=ea.length-1;a>=ea.indexOf(n);a--){const s=ea[a];if(K1[s].common&&e._adapter.diff(i,r,s)>=t-1)return s}return ea[n?ea.indexOf(n):0]}function IIe(e){for(let t=ea.indexOf(e)+1,n=ea.length;t<n;++t)if(K1[ea[t]].common)return ea[t]}function SF(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=iI(n,t),a=n[r]>=t?n[r]:n[i];e[a]=!0}}function MIe(e,t,n,r){const i=e._adapter,a=+i.startOf(t[0].value,r),s=t[t.length-1].value;let o,c;for(o=a;o<=s;o=+i.add(o,1,r))c=n[o],c>=0&&(t[c].major=!0);return t}function EF(e,t,n){const r=[],i={},a=t.length;let s,o;for(s=0;s<a;++s)o=t[s],i[o]=s,r.push({value:o,major:!1});return a===0||!n?r:MIe(e,r,i,n)}class a_ extends Gd{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),i=this._adapter=new CTe._date(t.adapters.date);i.init(n),eg(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:wF(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:i,max:a,minDefined:s,maxDefined:o}=this.getUserBounds();function c(f){!s&&!isNaN(f.min)&&(i=Math.min(i,f.min)),!o&&!isNaN(f.max)&&(a=Math.max(a,f.max))}(!s||!o)&&(c(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&c(this.getMinMax(!1))),i=eo(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),a=eo(a)&&!isNaN(a)?a:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,a-1),this.max=Math.max(i+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const a=this.min,s=this.max,o=WEe(i,a,s);return this._unit=n.unit||(r.autoSkip?CF(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):kIe(this,o.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:IIe(this._unit),this.initOffsets(i),t.reverse&&o.reverse(),EF(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,i,a;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?r=a:r=(a-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=Sa(n,0,s),r=Sa(r,0,s),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,a=i.time,s=a.unit||CF(a.minUnit,n,r,this._getLabelCapacity(n)),o=sr(i.ticks.stepSize,1),c=s==="week"?a.isoWeekday:!1,f=Vg(c)||c===!0,p={};let g=n,v,b;if(f&&(g=+t.startOf(g,"isoWeek",c)),g=+t.startOf(g,f?"day":s),t.diff(r,n,s)>1e5*o)throw new Error(n+" and "+r+" are too far apart with stepSize of "+o+" "+s);const _=i.ticks.source==="data"&&this.getDataTimestamps();for(v=g,b=0;v<r;v=+t.add(v,o,s),b++)SF(p,v,_);return(v===r||i.bounds==="ticks"||b===1)&&SF(p,v,_),Object.keys(p).sort(_F).map(T=>+T)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,a=this._unit,s=n||i[a];return this._adapter.format(t,s)}_tickFormatFunction(t,n,r,i){const a=this.options,s=a.ticks.callback;if(s)return qr(s,[t,n,r],this);const o=a.time.displayFormats,c=this._unit,f=this._majorUnit,p=c&&o[c],g=f&&o[f],v=r[n],b=f&&g&&v&&v.major;return this._adapter.format(t,i||(b?g:p))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,i=Vu(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(i),s=Math.sin(i),o=this._resolveTickFontOptions(0).size;return{w:r*a+o*s,h:r*s+o*a}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,a=this._tickFormatFunction(t,0,EF(this,[t],this._majorUnit),i),s=this._getLabelSize(a),o=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return o>0?o:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)t.push(wF(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return aj(t.sort(_F))}}Ln(a_,"id","time"),Ln(a_,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function W0(e,t,n){let r=0,i=e.length-1,a,s,o,c;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=gd(e,"pos",t)),{pos:a,time:o}=e[r],{pos:s,time:c}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=gd(e,"time",t)),{time:a,pos:o}=e[r],{time:s,pos:c}=e[i]);const f=s-a;return f?o+(c-o)*(t-a)/f:o}class PF extends a_{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=W0(n,this.min),this._tableRange=W0(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],a=[];let s,o,c,f,p;for(s=0,o=t.length;s<o;++s)f=t[s],f>=n&&f<=r&&i.push(f);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(s=0,o=i.length;s<o;++s)p=i[s+1],c=i[s-1],f=i[s],Math.round((p+c)/2)!==f&&a.push({time:f,pos:s/(o-1)});return a}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,a)=>i-a)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(W0(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return W0(this._table,r*this._tableRange+this._minPos,!0)}}Ln(PF,"id","timeseries"),Ln(PF,"defaults",a_.defaults);const Vj="label";function TF(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function RIe(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function Uj(e,t){e.labels=t}function jj(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Vj;const r=[];e.datasets=t.map(i=>{const a=e.datasets.find(s=>s[n]===i[n]);return!a||!i.data||r.includes(a)?{...i}:(r.push(a),Object.assign(a,i),a)})}function DIe(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Vj;const n={labels:[],datasets:[]};return Uj(n,e.labels),jj(n,e.datasets,t),n}function OIe(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:a,type:s,data:o,options:c,plugins:f=[],fallbackContent:p,updateMode:g,...v}=e,b=E.exports.useRef(null),_=E.exports.useRef(),T=()=>{!b.current||(_.current=new el(b.current,{type:s,data:DIe(o,a),options:c&&{...c},plugins:f}),TF(t,_.current))},k=()=>{TF(t,null),_.current&&(_.current.destroy(),_.current=null)};return E.exports.useEffect(()=>{!i&&_.current&&c&&RIe(_.current,c)},[i,c]),E.exports.useEffect(()=>{!i&&_.current&&Uj(_.current.config.data,o.labels)},[i,o.labels]),E.exports.useEffect(()=>{!i&&_.current&&o.datasets&&jj(_.current.config.data,o.datasets,a)},[i,o.datasets]),E.exports.useEffect(()=>{!_.current||(i?(k(),setTimeout(T)):_.current.update(g))},[i,c,o.labels,o.datasets,g]),E.exports.useEffect(()=>{!_.current||(k(),setTimeout(T))},[s]),E.exports.useEffect(()=>(T(),()=>k()),[]),A("canvas",{...Object.assign({ref:b,role:"img",height:n,width:r},v),children:p})}const AIe=E.exports.forwardRef(OIe);function NIe(e,t){return el.register(t),E.exports.forwardRef((n,r)=>A(AIe,{...Object.assign({},n,{ref:r,type:e})}))}const LIe=NIe("line",Sx);el.register(jE,Cx,Tx,Dm,HE,kx,eIe,lIe,Qke);const kF={t_shap:"\u0422\u0435\u043C\u043F\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u0432\u043E\u0437\u0434\u0443\u0445\u0430",fi_remont1_shap:"\u0417\u0430\u043C\u0435\u043D\u0430 \u0441\u0442\u043E\u044F\u043A\u043E\u0432 \u0425\u0412\u0421",fi_remont2_shap:"\u0420\u0435\u043C\u043E\u043D\u0442 \u0440\u0430\u0437\u0432\u043E\u0434\u044F\u0449\u0438\u0445 \u0432\u043D\u0443\u0442\u0440\u0438\u0434\u043E\u043C\u043E\u0432\u044B\u0445 \u043C\u0430\u0433\u0438\u0441\u0442\u0440\u0430\u043B\u0435\u0439 \u0425\u0412\u0421",fi_remont3_shap:"\u0417\u0430\u043C\u0435\u043D\u0430 \u0441\u0442\u043E\u044F\u043A\u043E\u0432 \u0413\u0412\u0421",fi_remont4_shap:"\u0420\u0435\u043C\u043E\u043D\u0442 \u0440\u0430\u0437\u0432\u043E\u0434\u044F\u0449\u0438\u0445 \u0432\u043D\u0443\u0442\u0440\u0438\u0434\u043E\u043C\u043E\u0432\u044B\u0445 \u043C\u0430\u0433\u0438\u0441\u0442\u0440\u0430\u043B\u0435\u0439 \u0413\u0412\u0421",fi_remont5_shap:"\u0420\u0435\u043C\u043E\u043D\u0442 \u0441\u0442\u043E\u044F\u043A\u043E\u0432 \u043A\u0430\u043D\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u0438",fi_remont6_shap:"\u0420\u0435\u043C\u043E\u043D\u0442 \u0432\u044B\u043F\u0443\u0441\u043A\u043E\u0432 \u0438 \u0441\u0431\u043E\u0440\u043D\u044B\u0445 \u0442\u0440\u0443\u0431\u043E\u043F\u0440\u043E\u0432\u043E\u0434\u043E\u0432 \u0441\u0438\u0441\u0442\u0435\u043C\u044B \u043A\u0430\u043D\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u0438",fi_remont7_shap:"\u0420\u0435\u043C\u043E\u043D\u0442 \u0432\u043D\u0443\u0442\u0440\u0438\u0434\u043E\u043C\u043E\u0432\u044B\u0445 \u0441\u0438\u0441\u0442\u0435\u043C \u0442\u0435\u043F\u043B\u043E\u0441\u043D\u0430\u0431\u0436\u0435\u043D\u0438\u044F (\u0441 \u0437\u0430\u043C\u0435\u043D\u043E\u0439 \u0441\u0442\u043E\u044F\u043A\u043E\u0432)",fi_remont8_shap:"\u0420\u0435\u043C\u043E\u043D\u0442 \u0440\u0430\u0437\u0432\u043E\u0434\u044F\u0449\u0438\u0445 \u043C\u0430\u0433\u0438\u0441\u0442\u0440\u0430\u043B\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043C\u044B \u0442\u0435\u043F\u043B\u043E\u0441\u043D\u0430\u0431\u0436\u0435\u043D\u0438\u044F",total_area_shap:"\u041E\u0431\u0449\u0430\u044F \u043F\u043B\u043E\u0449\u0430\u0434\u044C",fi_is_block_shap:"\u041C\u0430\u0442\u0435\u0440\u0438\u0430\u043B - \u0431\u043B\u043E\u0447\u043D\u044B\u0439",fi_is_brick_shap:"\u041C\u0430\u0442\u0435\u0440\u0438\u0430\u043B - \u043A\u0438\u0440\u043F\u0438\u0447\u043D\u044B\u0439",fi_is_panel_shap:"\u041C\u0430\u0442\u0435\u0440\u0438\u0430\u043B - \u043F\u0430\u043D\u0435\u043B\u044C\u043D\u044B\u0439",building_wear_shap:"\u0418\u0437\u043D\u043E\u0441",fi_is_monolit_shap:"\u041C\u0430\u0442\u0435\u0440\u0438\u0430\u043B - \u043C\u043E\u043D\u043E\u043B\u0438\u0442\u043D\u044B\u0439",fi_energy_class_shap:"\u041A\u043B\u0430\u0441\u0441 \u044D\u043D\u0435\u0440\u0433\u043E\u044D\u0444\u0444\u0435\u043A\u0442\u0438\u0432\u043D\u043E\u0441\u0442\u0438",fi_building_year_shap:"\u0413\u043E\u0434 \u043F\u043E\u0441\u0442\u0440\u043E\u0439\u043A\u0438",gvs_avg_heat_load_shap:"\u0421\u0440\u0435\u0434\u043D\u044F\u044F \u0442\u0435\u043F\u043B\u043E\u0432\u0430\u044F \u043D\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0413\u0412\u0421",heating_heat_load_shap:"\u0422\u0435\u043F\u043B\u043E\u0432\u0430\u044F \u043D\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u043D\u0430 \u043E\u0442\u043E\u043F\u043B\u0435\u043D\u0438\u0435",gvs_fact_heat_load_shap:"\u0424\u0430\u043A\u0442\u0438\u0447\u0435\u0441\u043A\u0430\u044F \u0442\u0435\u043F\u043B\u043E\u0432\u0430\u044F \u043D\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0413\u0412\u0421",ventilation_heat_load_shap:"\u0422\u0435\u043F\u043B\u043E\u0432\u0430\u044F \u043D\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u043D\u0430 \u0432\u0435\u043D\u0442\u0438\u043B\u044F\u0446\u0438\u044E"},FIe=({point:e})=>{const{data:t}=Vbe(e.id),{consumer_filter:n}=Gi(),r=E.exports.useMemo(()=>t?!n||!n.key.includes("prob")?t.prob1_35:t[`${n.key}_35`]:null,[t,n]);if(!t||!r)return"";const i={indexAxis:"y",elements:{bar:{borderWidth:0,borderRadius:5,pointStyle:"circle"}},plugins:{legend:{display:!1},tooltip:{displayColors:!1,yAlign:"top"}},scales:{y:{stacked:!0},x:{title:{display:!0,text:"\u0412\u043A\u043B\u0430\u0434 \u0432 \u043F\u0440\u043E\u0433\u043D\u043E\u0437, %"},grid:{color:function(o){return o.tick.value===0?"#000000":"#E5E5E5"}}}}},a=Object.keys(kF).sort((o,c)=>Math.abs(r[o])<Math.abs(r[c])?1:-1).slice(0,15),s={labels:a.map(o=>kF[o]),datasets:[{data:a.map(o=>r?r[o]:0),backgroundColor:a.map(o=>r[o]).map(o=>o<=0?"#278211":"#CC2500"),hoverBackgroundColor:a.map(o=>r[o]).map(o=>o<=0?"#2DB20C":"#F22C00"),type:"bar",showLine:!1}]};return A(LIe,{options:i,data:s})},zIe=()=>it("div",{className:"w-[200px]",children:["\u0413\u0440\u0430\u0444\u0438\u043A \u043F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0435\u0442 \u0442\u043E\u043F-15 \u0444\u0430\u043A\u0442\u043E\u0440\u043E\u0432, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u043E\u043A\u0430\u0437\u044B\u0432\u0430\u044E\u0442 \u043D\u0430\u0438\u0431\u043E\u043B\u044C\u0448\u0435\u0435 \u0432\u043B\u0438\u044F\u043D\u0438\u0435 \u043D\u0430 \u043F\u0440\u043E\u0433\u043D\u043E\u0437 \u0430\u0432\u0430\u0440\u0438\u0439\u043D\u043E\u0441\u0442\u0438 \u043E\u0431\u044A\u0435\u043A\u0442\u0430.",A("br",{}),A("br",{}),"\u0424\u0430\u043A\u0442\u043E\u0440\u044B \u043C\u043E\u0433\u0443\u0442 \u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u043F\u043E\u043B\u043E\u0436\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u0438\u043B\u0438 \u043E\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u0432\u043B\u0438\u044F\u043D\u0438\u0435.",A("br",{}),A("br",{}),"\u0427\u0435\u043C \u0431\u043E\u043B\u044C\u0448\u0435 \u0432\u043B\u0438\u044F\u043D\u0438\u044F \u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0435\u0442 \u0444\u0430\u043A\u0442\u043E\u0440 \u043D\u0430 \u0430\u0432\u0430\u0440\u0438\u0439\u043D\u043E\u0441\u0442\u044C, \u0442\u0435\u043C \u0431\u043B\u0438\u0436\u0435 \u0435\u0433\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043A 100% (-100%)."]}),$Ie=({point:e})=>{const[t,n]=E.exports.useState(!1);return it("div",{className:"flex items-center",children:[A(Ra,{title:"\u0412\u043B\u0438\u044F\u043D\u0438\u0435 \u0444\u0430\u043A\u0442\u043E\u0440\u043E\u0432 \u043D\u0430 \u043F\u0440\u043E\u0433\u043D\u043E\u0437",children:A(Xr,{className:"flex justify-center items-center h-6 ml-1 mb-1 p-2",type:"primary",onClick:()=>n(!0),children:"\u0412\u043B\u0438\u044F\u043D\u0438\u0435 \u0444\u0430\u043A\u0442\u043E\u0440\u043E\u0432 \u043D\u0430 \u043F\u0440\u043E\u0433\u043D\u043E\u0437"})}),A(uV,{open:t,title:"\u0412\u043A\u043B\u0430\u0434 \u0444\u0430\u043A\u0442\u043E\u0440\u043E\u0432 \u0432 \u043F\u0440\u043E\u0433\u043D\u043E\u0437 \u0430\u0432\u0430\u0440\u0438\u0439\u043D\u043E\u0441\u0442\u0438",onCancel:()=>n(!1),width:800,footer:(()=>[A(Xr,{type:"primary",onClick:()=>n(!1),children:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C"},"close-button")])(),style:{top:"15px"},children:it("div",{children:[A("div",{className:"flex flex-col gap-2",children:it(ad,{className:kd("p-1"),children:[A(Pb,{className:"font-semibold",span:12,children:"\u0410\u0434\u0440\u0435\u0441 \u0442\u043E\u0447\u043A\u0438:"}),A(Pb,{span:12,children:e.building_address})]})}),A(rae,{}),A(FIe,{point:e}),A(zB,{content:A(zIe,{autoFocus:!0}),trigger:"click",placement:"leftBottom",color:"#ffffff",children:A(Xr,{type:"text",className:"text-[#1890FF] p-0",children:"\u041A\u0430\u043A \u0447\u0438\u0442\u0430\u0442\u044C \u0433\u0440\u0430\u0444\u0438\u043A?"})})]})})]})},BIe=({feature:e})=>it("div",{className:"flex-col gap-2",children:[e.properties.point_type==="potreb"&&A($Ie,{point:e.properties}),A(lEe,{feature:e})]}),VIe={potreb:"\u041F\u043E\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043B\u044C",tp:"\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A",ods:"\u0414\u0438\u0441\u043F\u0435\u0442\u0447\u0435\u0440\u0441\u043A\u0430\u044F"},UIe=({features:e})=>{const{setPopup:t}=U1();return A("div",{className:"space-y-2 p-1",children:e.map(n=>{const r=n.properties.id;return A("div",{className:"flex flex-row items-center gap-2 w-full",children:A(Xr,{className:"text-start flex-1 !w-0",block:!0,onClick:()=>{t({features:[n],coordinates:n.geometry.coordinates})},children:A("div",{className:"space-x-2 flex items-center w-full",children:A("span",{className:"flex-1 truncate inline-block",children:VIe[n.properties.point_type]})})})},r)})})},jIe=({features:e,lat:t,lng:n,onClose:r})=>A(aEe,{lat:t,lng:n,onClose:r,children:(()=>e.length===1?A(BIe,{feature:e[0]}):A(UIe,{features:e}))()}),HIe=({width:e=24,height:t=24})=>it("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",width:e,height:t,children:[A("polygon",{points:"23.7,4.1 23.7,6.1 0.1,6.2 0.1,4.1 "}),it("g",{children:[A("circle",{cx:"6.3",cy:"5.2",r:"3.1"}),A("circle",{fill:"#fff",cx:"6.3",cy:"5.2",r:"1.4"})]}),A("polygon",{points:"23.6,11.1 23.7,13.1 0,13.1 0,11 "}),it("g",{children:[A("circle",{cx:"18.6",cy:"12.1",r:"3.1"}),A("circle",{fill:"#fff",cx:"18.6",cy:"12.1",r:"1.4"})]}),A("polygon",{points:"23.8,18.2 23.9,20.1 0.2,20.2 0.2,18.2 "}),it("g",{children:[A("circle",{cx:"10.2",cy:"19.1",r:"3.1"}),A("circle",{fill:"#fff",cx:"10.2",cy:"19.1",r:"1.4"})]})]}),KIe=({toggleCollapse:e})=>A(Xr,{icon:A(HIe,{width:16,height:16}),onClick:e,className:"border-l-0 rounded-bl-none rounded-tl-none absolute top-[100px] flex items-center justify-center"}),WIe=()=>{const e=E.exports.useRef(null),t=E.exports.useRef(null),n=E.exports.useRef(null),{popup:r,setPopup:i}=U1(),{setClickedPointConfig:a}=wv(),{tableState:s,openTable:o}=D1(),c=k=>{if(!k.features){i(null),a(null);return}const P=k.features[0];if(!P){i(null),a(null);return}const{lng:M}=k.lngLat;if(P.geometry.type==="Point"){const O=P.geometry.coordinates.slice();for(;Math.abs(M-O[0])>180;)O[0]+=M>O[0]?360:-360;i({features:k.features,coordinates:O})}},f=k=>{!k.features[0]||(e.current.getCanvas().style.cursor="pointer")},p=k=>{!k.features[0]||(e.current.getCanvas().style.cursor="")};E.exports.useEffect(()=>{const k=new ResizeObserver(fZ(()=>{var P;(P=e==null?void 0:e.current)==null||P.resize()},16));return t.current&&k.observe(t.current),()=>{k.disconnect()}},[t.current]),E.exports.useEffect(()=>{s.fullScreen&&!s.isOpened&&o()},[s.fullScreen]);const[g,v]=E.exports.useState(!1),b=()=>v(k=>!k),[_,T]=E.exports.useState(!1);return E.exports.useEffect(()=>{gN.map(k=>{var M,O;const P=new Image(((M=k.size)==null?void 0:M.width)||64,((O=k.size)==null?void 0:O.height)||64);P.src=k.url,P.crossOrigin="Anonymous",P.onload=()=>{e.current.addImage(k.name,P)}})},[gN]),A(vZ,{children:it("div",{className:"w-screen h-screen relative flex overflow-hidden",children:[A(m1e,{isCollapsed:g,ref:n}),it("div",{className:"flex-1 h-screen flex flex-col ",children:[A("div",{ref:t,className:kd(s.fullScreen?"":"flex-1"),children:it(HP,{mapLib:hZ,initialViewState:{latitude:55.7558,longitude:37.6173,zoom:12},dragRotate:!1,ref:e,interactiveLayerIds:[wi.consumer,wi.source,wi.dispatcher],onClick:c,onMouseEnter:f,onMouseLeave:p,id:"map",mapStyle:"https://raw.githubusercontent.com/gtitov/basemaps/refs/heads/master/positron-nolabels.json",children:[r&&A(jIe,{lat:r.coordinates[1],lng:r.coordinates[0],features:r.features,onClose:()=>{i(null),a(null)}}),A(__e,{onClick:()=>T(!0)}),A(KIe,{toggleCollapse:b}),A(Z_e,{}),A(W_e,{}),A(q_e,{}),A(Gbe,{}),_&&A(C_e,{onClose:()=>T(!1)})]})}),A("div",{className:"w-full border-solid border-border border-0 border-t-[1px] z-20",children:A(oEe,{fullWidth:g})})]})]})})};function GIe(){return A(WIe,{})}const qIe=new N0e;d0e();function ZIe(){return A($0e,{client:qIe,children:A(qq,{basename:"/",children:A(Gq,{children:A(G5,{path:"/",element:A(GIe,{})})})})})}n2.createRoot(document.getElementById("root")).render(A(ZIe,{}));